[hamradio-commits] [linpsk] 06/25: Imported Upstream version 0.8.1

Iain R. Learmonth irl at moszumanska.debian.org
Fri Apr 15 14:02:33 UTC 2016


This is an automated email from the git hooks/post-receive script.

irl pushed a commit to branch master
in repository linpsk.

commit 46b2295e1c569984945fa5ae7453c34c15acb5c6
Author: Iain R. Learmonth <irl at debian.org>
Date:   Thu Apr 14 11:43:38 2016 +0100

    Imported Upstream version 0.8.1
---
 AUTHORS                                            |     2 +-
 ChangeLog                                          |    81 +
 Makefile.am                                        |    32 +-
 Makefile.dist                                      |    14 -
 Makefile.in                                        |   420 +-
 stamp-h.in => NEWS                                 |     0
 README                                             |     7 -
 TODO                                               |     2 -
 acinclude.m4                                       | 10957 +--------
 aclocal.m4                                         | 16403 +++++--------
 admin/ChangeLog                                    |   761 -
 admin/Doxyfile.am                                  |   163 -
 admin/Doxyfile.global                              |   950 -
 admin/Makefile.common                              |    34 -
 admin/acinclude.m4.in                              |  5392 -----
 admin/am_edit                                      |  2028 --
 admin/compile                                      |    99 -
 admin/conf.change.pl                               |   177 -
 admin/config.pl                                    |   235 -
 admin/configure.in.bot.end                         |    12 -
 admin/configure.in.min                             |    57 -
 admin/cvs-clean.pl                                 |    87 -
 admin/cvs.sh                                       |   499 -
 admin/debianrules                                  |   114 -
 admin/detect-autoconf.sh                           |    81 -
 admin/libtool.m4.in                                |  5399 -----
 admin/ylwrap                                       |   143 -
 admin/config.guess => config.guess                 |   320 +-
 config.h.in                                        |   115 +-
 admin/config.sub => config.sub                     |   157 +-
 configure                                          | 23866 +++++++++----------
 configure.in                                       |    80 +-
 debian/.#changelog                                 |     1 -
 debian/README.Debian                               |     6 -
 debian/changelog                                   |    38 -
 debian/control                                     |    21 -
 debian/copyright                                   |    16 -
 debian/dirs                                        |     1 -
 debian/docs                                        |    11 -
 debian/linpsk.1                                    |    19 -
 debian/linpsk.manpages                             |     1 -
 debian/linpsk.menu                                 |     2 -
 debian/rules                                       |    84 -
 admin/depcomp => depcomp                           |    30 +
 admin/install-sh => install-sh                     |   107 +-
 linpsk.kdevprj                                     |   817 -
 linpsk.kdevses                                     |    11 -
 linpsk.lsm                                         |    14 -
 LinPSK.png => linpsk.png                           |   Bin
 linpsk/Makefile.am                                 |    27 -
 linpsk/Makefile.in                                 |  1070 -
 linpsk/cdisplay.cpp                                |    59 -
 linpsk/cdisplay.h                                  |    52 -
 linpsk/csound.cpp                                  |   339 -
 linpsk/cspectrumdisplay.cpp                        |   395 -
 linpsk/csquelch.cpp                                |   193 -
 linpsk/csquelch.ui.h                               |    46 -
 linpsk/ctrigger.ui                                 |    90 -
 linpsk/ctrigger.ui.h                               |    37 -
 linpsk/ctxdisplay.ui                               |   167 -
 linpsk/ctxdisplay.ui.h                             |    66 -
 linpsk/ctxfunctions.ui                             |   117 -
 linpsk/ctxfunctions.ui.h                           |    47 -
 linpsk/docs/Makefile.am                            |     5 -
 linpsk/docs/Makefile.in                            |   522 -
 linpsk/docs/en/Makefile.am                         |     6 -
 linpsk/docs/en/Makefile.in                         |   385 -
 linpsk/docs/en/index-1.html                        |    28 -
 linpsk/docs/en/index-2.html                        |    58 -
 linpsk/docs/en/index-3.html                        |    27 -
 linpsk/docs/en/index-4.html                        |    24 -
 linpsk/docs/en/index-5.html                        |    24 -
 linpsk/docs/en/index-6.html                        |    37 -
 linpsk/docs/en/index.html                          |    55 -
 linpsk/docs/en/index.sgml                          |    74 -
 linpsk/filenew.xpm                                 |    22 -
 linpsk/filesave.xpm                                |    34 -
 linpsk/frequencyselect.ui                          |   113 -
 linpsk/fskdemodulator.cpp                          |   113 -
 linpsk/generalsettings.tar.gz                      |   Bin 4347 -> 0 bytes
 linpsk/generalsettings.ui.h                        |   177 -
 linpsk/macrowindow.cpp                             |    85 -
 linpsk/mfskdemodulator.cpp                         |   390 -
 linpsk/qsodata.ui.h                                |   108 -
 linpsk/rttydemodulator.cpp                         |   560 -
 linpsk/rttydemodulator.h                           |   133 -
 linpsk/utils.cpp                                   |    80 -
 linpsk/utils.h                                     |    24 -
 linpsk/waveinput.cpp                               |   156 -
 admin/ltmain.sh => ltmain.sh                       |  2449 +-
 admin/missing => missing                           |     0
 admin/mkinstalldirs => mkinstalldirs               |     0
 src/Makefile.am                                    |    57 +
 src/Makefile.in                                    |   684 +
 src/addrxwindow.h                                  |    62 +
 {linpsk => src}/bpskdemodulator.cpp                |    16 +-
 {linpsk => src}/bpskdemodulator.h                  |     1 -
 {linpsk => src}/bpskmodulator.cpp                  |     0
 {linpsk => src}/bpskmodulator.h                    |     0
 {linpsk => src}/cdemodulator.cpp                   |    33 +-
 {linpsk => src}/cdemodulator.h                     |    50 +-
 {linpsk => src}/cledbutton.cpp                     |     0
 {linpsk => src}/cledbutton.h                       |     0
 {linpsk => src}/cmodulator.cpp                     |     9 +
 {linpsk => src}/cmodulator.h                       |     2 +
 {linpsk => src}/color.h                            |     0
 {linpsk => src}/constants.h                        |    44 +-
 {linpsk => src}/controlpanel.cpp                   |    18 +-
 {linpsk => src}/controlpanel.h                     |     4 +-
 {linpsk => src}/cpskdemodulator.cpp                |   135 +-
 {linpsk => src}/cpskdemodulator.h                  |    54 +-
 {linpsk => src}/crecording.cpp                     |     9 +-
 {linpsk => src}/crecording.h                       |     0
 {linpsk => src}/crxchannel.cpp                     |    61 +-
 {linpsk => src}/crxchannel.h                       |    21 +-
 {linpsk => src}/crxdisplay.cpp                     |   158 +-
 {linpsk => src}/crxdisplay.h                       |    23 +-
 {linpsk => src}/crxwindow.cpp                      |    37 +-
 {linpsk => src}/crxwindow.h                        |     4 +-
 src/csound.cpp                                     |   318 +
 {linpsk => src}/csound.h                           |    51 +-
 src/csquelch.cpp                                   |   339 +
 {linpsk => src}/csquelch.h                         |     0
 {linpsk => src}/ctrigger.cpp                       |     0
 {linpsk => src}/ctrigger.h                         |     0
 {linpsk => src}/ctxbuffer.cpp                      |    29 +-
 {linpsk => src}/ctxbuffer.h                        |     9 +-
 {linpsk => src}/ctxdisplay.cpp                     |     9 +-
 {linpsk => src}/ctxdisplay.h                       |     0
 {linpsk => src}/ctxfunctions.cpp                   |     0
 {linpsk => src}/ctxfunctions.h                     |     0
 {linpsk => src}/ctxwindow.cpp                      |   123 +-
 {linpsk => src}/ctxwindow.h                        |     2 +
 {linpsk => src}/deinterleaver.cpp                  |     0
 {linpsk => src}/deinterleaver.h                    |     0
 src/deletemacro.h                                  |    66 +
 src/editmacro.h                                    |    69 +
 {linpsk => src}/feccoder.cpp                       |     0
 {linpsk => src}/feccoder.h                         |     0
 {linpsk => src}/fircoeffs.h                        |    83 +-
 src/firfilter.cpp                                  |   114 +
 linpsk/viterbi.h => src/firfilter.h                |    48 +-
 {linpsk => src}/frequencyselect.cpp                |    96 +-
 {linpsk => src}/frequencyselect.h                  |    15 +-
 src/fskdemodulator.cpp                             |   175 +
 {linpsk => src}/fskdemodulator.h                   |    40 +-
 {linpsk => src}/fskmodulator.cpp                   |    50 +-
 {linpsk => src}/fskmodulator.h                     |     6 +-
 {linpsk => src}/input.cpp                          |    21 -
 {linpsk => src}/input.h                            |    18 +-
 src/interfaces/Makefile.am                         |    65 +
 src/interfaces/Makefile.in                         |   494 +
 {linpsk => src/interfaces}/addmacro.ui             |    11 +-
 {linpsk => src/interfaces}/addmacro.ui.h           |     8 +-
 {linpsk => src/interfaces}/addrxwindow.ui          |    29 +-
 {linpsk => src/interfaces}/addrxwindow.ui.h        |     2 +-
 src/interfaces/deletemacro.ui                      |   293 +
 src/interfaces/deletemacro.ui.h                    |    77 +
 {linpsk => src/interfaces}/editmacro.ui            |     3 +-
 {linpsk => src/interfaces}/editmacro.ui.h          |    16 +-
 {linpsk => src/interfaces}/generalsettings.ui      |   727 +-
 src/interfaces/generalsettings.ui.h                |   181 +
 {linpsk => src/interfaces}/modemenu.ui             |   362 +-
 {linpsk => src/interfaces}/modemenu.ui.h           |    60 +-
 {linpsk => src/interfaces}/qsodata.ui              |   363 +-
 src/interfaces/qsodata.ui.h                        |   179 +
 .../interfaces/renamemacro.ui                      |   214 +-
 src/interfaces/renamemacro.ui.h                    |    46 +
 {linpsk => src}/interleaver.cpp                    |     0
 {linpsk => src}/interleaver.h                      |     0
 {linpsk => src}/linpsk.cpp                         |   578 +-
 {linpsk => src}/linpsk.h                           |    22 +-
 {linpsk => src}/macros.cpp                         |    69 +-
 {linpsk => src}/macros.h                           |    17 +-
 src/macrowindow.cpp                                |   160 +
 {linpsk => src}/macrowindow.h                      |    23 +-
 {linpsk => src}/main.cpp                           |    14 +-
 src/mfskdemodulator.cpp                            |   203 +
 {linpsk => src}/mfskdemodulator.h                  |    90 +-
 {linpsk => src}/mfskmodulator.cpp                  |    19 +-
 {linpsk => src}/mfskmodulator.h                    |     0
 {linpsk => src}/mfskvaricode.cpp                   |     0
 {linpsk => src}/mfskvaricode.h                     |     0
 src/modemenu.cpp                                   |   159 +
 {linpsk => src}/parameter.cpp                      |    61 +-
 {linpsk => src}/parameter.h                        |    56 +-
 src/portaudio/Makefile.am                          |     6 +
 src/portaudio/Makefile.in                          |   471 +
 src/portaudio/pa_convert.c                         |   470 +
 src/portaudio/pa_host.h                            |   191 +
 src/portaudio/pa_lib.c                             |   833 +
 src/portaudio/pa_trace.c                           |    83 +
 src/portaudio/pa_trace.h                           |    67 +
 src/portaudio/pa_unix.c                            |  1122 +
 src/portaudio/pa_unix.h                            |   141 +
 src/portaudio/pa_unix_oss.c                        |   468 +
 src/portaudio/portaudio.h                          |   468 +
 {linpsk => src}/pskmodulator.cpp                   |    18 +-
 {linpsk => src}/pskmodulator.h                     |     5 +-
 {linpsk => src}/psktable.h                         |     0
 {linpsk => src}/qpskdemodulator.cpp                |     3 +-
 {linpsk => src}/qpskdemodulator.h                  |     0
 {linpsk => src}/qpskmodulator.cpp                  |     0
 {linpsk => src}/qpskmodulator.h                    |     0
 src/qsodata.cpp                                    |   237 +
 {linpsk => src}/qsoinfo.cpp                        |     3 +-
 {linpsk => src}/qsoinfo.h                          |     5 +-
 src/rttydemodulator.cpp                            |   509 +
 src/rttydemodulator.h                              |   112 +
 {linpsk => src}/rttymodulator.cpp                  |    81 +-
 {linpsk => src}/rttymodulator.h                    |     6 +-
 src/spectrumdisplay.cpp                            |   360 +
 linpsk/cspectrumdisplay.h => src/spectrumdisplay.h |    67 +-
 {linpsk => src}/textinput.cpp                      |    56 +-
 {linpsk => src}/textinput.h                        |    10 +-
 {linpsk => src}/viterbi.cpp                        |    20 +-
 {linpsk => src}/viterbi.h                          |     2 +-
 src/waveinput.cpp                                  |   291 +
 {linpsk => src}/waveinput.h                        |    42 +-
 subdirs                                            |     3 -
 220 files changed, 31729 insertions(+), 60445 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index 9d5c0c5..0463c0d 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1 +1 @@
-Volker Schroer <dl1ksv at gmx.de>
+$AUTHOR$ <$EMAIL$>
diff --git a/ChangeLog b/ChangeLog
index e69de29..ac5a049 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -0,0 +1,81 @@
+LinPsk ChangeLog
+
+0.8.1
+
+Improved RTTY decoder
+
+Setting for slashed 0 now will be saved
+
+Fixed some memory leakages
+
+Removed dependancy on qwindowsstyle.h, so LinPsk now should compile on Slackware without problems.
+
+Some minor bugfixes
+
+0.8.0.4
+
+Experimental RTTY decoder ( rtty2 ).
+
+Now 8 bit wav files in Demo mode will be supported.
+
+In RTTY shifts up to 999 Hz are possible now.
+
+RTTY is now able to transmit in LSB. 
+
+USB to Serial Converter for RX/TX switching now really works
+  
+Hopefully fixed crash on quit
+
+Using UTC in QSOData
+
+0.8.0.3
+
+New features
+
+Supporting USB to Serial Converter for RX/TX switching
+
+( Due to missing hardware untested )
+
+Looks in the /dev directory for devices that contain the string usbserial.
+
+added to General Settings
+
+Delete macro
+Rename macro
+
+
+Save QSOData now implemented
+Data are saved in ADIF format. You can set the name of this file in General settings. The file will be located in the users home directory.
+
+Command c now copies text from the clipboard into the tx buffer, if the TX window is the active window. 
+
+The proportion between colour spectrum and spectrum can be modified.
+
+
+Fixes
+
+Hopefully fixed the reported freeze when switching from TX to RX.
+
+Fixed that portaudio changes the output volume when level < 10.
+
+Now squelch changes colour when the level goes above selected squelch level ( like LinPsk does).
+
+Some minor bugs fixed. Now using qt 3.3.2 , which improves the layout of some buttons.
+
+Switched to fftw 3.0.1
+
+ 
+0.8.0.2
+
+Characters, that were deleted , won't be transmitted together with the delete anymore.
+
+Fixed bug in setting input and output volume
+
+Windows position now will be saved when exiting the application by Quit.
+
+Trying to fix crash, when closing DarwinPsk by the little red button
+
+
+0.8.0.1
+
+Fixing the "spinning disc of death"
diff --git a/Makefile.am b/Makefile.am
index a57ec57..cc859fe 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,29 +1,5 @@
-####### kdevelop will overwrite this part!!! (begin)##########
-
-SUBDIRS = linpsk 
-
-EXTRA_DIST = linpsk.kdevprj admin AUTHORS COPYING ChangeLog INSTALL README TODO linpsk.lsm 
-
-####### kdevelop will overwrite this part!!! (end)############
-# not a GNU package. You can remove this line, if 
+# not a GNU package. You can remove this line, if
 # have all needed files, that a GNU package needs
-AUTOMAKE_OPTIONS = foreign 
-
-#$(top_srcdir)/configure.in: configure.in.in $(top_srcdir)/subdirs
-#	cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common configure.in ;
-
-$(top_srcdir)/subdirs:
-	cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common subdirs
-
-$(top_srcdir)/acinclude.m4: $(top_srcdir)/admin/acinclude.m4.in $(top_srcdir)/admin/libtool.m4.in
-	@cd $(top_srcdir) && cat admin/acinclude.m4.in admin/libtool.m4.in > acinclude.m4
-
-MAINTAINERCLEANFILES = subdirs configure.in acinclude.m4 configure.files 
-
-package-messages:
-	$(MAKE) -f admin/Makefile.common package-messages
-	$(MAKE) -C po merge
-
-dist-hook:
-	cd $(top_distdir) && perl admin/am_edit -padmin
-	cd $(top_distdir) && $(MAKE) -f admin/Makefile.common subdirs
+AUTOMAKE_OPTIONS = foreign 1.4
+EXTRA_DIST= linpsk.png
+SUBDIRS = src
diff --git a/Makefile.dist b/Makefile.dist
deleted file mode 100644
index be59a86..0000000
--- a/Makefile.dist
+++ /dev/null
@@ -1,14 +0,0 @@
-all: 
-	@echo "This Makefile is only for the CVS repository"
-	@echo "This will be deleted before making the distribution"
-	@echo ""
-	@if test ! -d admin; then \
-	   echo "Please recheckout this module!" ;\
-	   echo "for cvs: use checkout once and after that update again" ;\
-	   echo "for cvsup: checkout kde-common from cvsup and" ;\
-	   echo "   link kde-common/admin to ./admin" ;\
-	   exit 1 ;\
-	fi
-	$(MAKE) -f admin/Makefile.common cvs
-
-.SILENT:
diff --git a/Makefile.in b/Makefile.in
index f1ec8fa..7a8721c 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.7.2 from Makefile.am.
-# KDE tags expanded automatically by am_edit - $Revision: 1.349.2.2 $ 
+# Makefile.in generated by automake 1.9.4 from Makefile.am.
 # @configure_input@
 
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
-# Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004  Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -14,9 +13,6 @@
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
-
-####### kdevelop will overwrite this part!!! (begin)##########
-
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
 VPATH = @srcdir@
@@ -24,7 +20,6 @@ pkgdatadir = $(datadir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 top_builddir = .
-
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
 INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
@@ -40,11 +35,49 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-target_triplet = @target@
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in $(srcdir)/config.h.in \
+	$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
+	TODO config.guess config.sub depcomp install-sh ltmain.sh \
+	missing mkinstalldirs
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno configure.status.lineno
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-exec-recursive install-info-recursive \
+	install-recursive installcheck-recursive installdirs-recursive \
+	pdf-recursive ps-recursive uninstall-info-recursive \
+	uninstall-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+  { test ! -d $(distdir) \
+    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr $(distdir); }; }
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
 ACLOCAL = @ACLOCAL@
 AMDEP_FALSE = @AMDEP_FALSE@
 AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
+AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -67,47 +100,20 @@ ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-FRAMEWORK_COREAUDIO = @FRAMEWORK_COREAUDIO@
+F77 = @F77@
+FFLAGS = @FFLAGS@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@
-KDE_MT_LIBS = @KDE_MT_LIBS@
-KDE_PLUGIN = @KDE_PLUGIN@
-KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
-KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
-KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
-KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
 LDFLAGS = @LDFLAGS@
-LIBCOMPAT = @LIBCOMPAT@
-LIBCRYPT = @LIBCRYPT@
-LIBDL = @LIBDL@
-LIBJPEG = @LIBJPEG@
 LIBOBJS = @LIBOBJS@
-LIBPNG = @LIBPNG@
-LIBPTHREAD = @LIBPTHREAD@
-LIBRESOLV = @LIBRESOLV@
 LIBS = @LIBS@
-LIBSM = @LIBSM@
-LIBSOCKET = @LIBSOCKET@
 LIBTOOL = @LIBTOOL@
-LIBUCB = @LIBUCB@
-LIBUTIL = @LIBUTIL@
-LIBXINERAMA = @LIBXINERAMA@
-LIBZ = @LIBZ@
-LIB_POLL = @LIB_POLL@
-LIB_QPE = @LIB_QPE@
-LIB_QT = @LIB_QT@
-LIB_X11 = @LIB_X11@
-LIB_XEXT = @LIB_XEXT@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MOC = @MOC@
-NOOPT_CFLAGS = @NOOPT_CFLAGS@
-NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
-NOREPO = @NOREPO@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -116,40 +122,29 @@ PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
-QTE_NORTTI = @QTE_NORTTI@
-QT_INCLUDES = @QT_INCLUDES@
-QT_LDFLAGS = @QT_LDFLAGS@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_LDADD = @QT_LDADD@
 RANLIB = @RANLIB@
-REPO = @REPO@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-TOPSUBDIRS = @TOPSUBDIRS@
 UIC = @UIC@
-UIC_TR = @UIC_TR@
-USER_INCLUDES = @USER_INCLUDES@
-USER_LDFLAGS = @USER_LDFLAGS@
-USE_EXCEPTIONS = @USE_EXCEPTIONS@
-USE_RTTI = @USE_RTTI@
-USE_THREADS = @USE_THREADS@
 VERSION = @VERSION@
-WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
-X_EXTRA_LIBS = @X_EXTRA_LIBS@
-X_INCLUDES = @X_INCLUDES@
-X_LDFLAGS = @X_LDFLAGS@
-X_PRE_LIBS = @X_PRE_LIBS@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
 ac_ct_RANLIB = @ac_ct_RANLIB@
 ac_ct_STRIP = @ac_ct_STRIP@
-all_includes = @all_includes@
-all_libraries = @all_libraries@
 am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
 am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
 am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
 am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
+am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -166,81 +161,60 @@ host_vendor = @host_vendor@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
-kde_qtver = @kde_qtver@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localstatedir = @localstatedir@
 mandir = @mandir@
+mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
-qt_includes = @qt_includes@
-qt_libraries = @qt_libraries@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 sysconfdir = @sysconfdir@
-target = @target@
 target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-x_includes = @x_includes@
-x_libraries = @x_libraries@
-
-SUBDIRS = linpsk 
 
-EXTRA_DIST = linpsk.kdevprj admin AUTHORS COPYING ChangeLog INSTALL README TODO linpsk.lsm 
-
-####### kdevelop will overwrite this part!!! (end)############
-# not a GNU package. You can remove this line, if 
+# not a GNU package. You can remove this line, if
 # have all needed files, that a GNU package needs
-AUTOMAKE_OPTIONS = foreign 
-
-MAINTAINERCLEANFILES = subdirs configure.in acinclude.m4 configure.files 
-subdir = .
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
-CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES =
-DIST_SOURCES =
-
-RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
-	ps-recursive install-info-recursive uninstall-info-recursive \
-	all-recursive install-data-recursive install-exec-recursive \
-	installdirs-recursive install-recursive uninstall-recursive \
-	check-recursive installcheck-recursive
-DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \
-	Makefile.in TODO acinclude.m4 aclocal.m4 admin/ChangeLog \
-	admin/compile admin/config.guess admin/config.sub admin/depcomp \
-	admin/install-sh admin/ltmain.sh admin/missing \
-	admin/mkinstalldirs admin/ylwrap config.h.in configure \
-	configure.in
-DIST_SUBDIRS = $(SUBDIRS)
-#>- all: config.h
-#>+ 1
-all: docs-am  config.h
+AUTOMAKE_OPTIONS = foreign 1.4
+EXTRA_DIST = linpsk.png
+SUBDIRS = src
+all: config.h
 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
 
 .SUFFIXES:
-
-am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno
-$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
-#>- 	cd $(top_srcdir) && \
-#>- 	  $(AUTOMAKE) --foreign  Makefile
-#>+ 3
+am--refresh:
+	@:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
+	      cd $(srcdir) && $(AUTOMAKE) --foreign  \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  Makefile'; \
 	cd $(top_srcdir) && \
 	  $(AUTOMAKE) --foreign  Makefile
-	cd $(top_srcdir) && perl admin/am_edit linpsk-0.7.1/linpsk/Makefile.in
-Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
-
-$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    echo ' $(SHELL) ./config.status'; \
+	    $(SHELL) ./config.status;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
 	$(SHELL) ./config.status --recheck
-$(srcdir)/configure:  $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
-	cd $(srcdir) && $(AUTOCONF)
 
-$(ACLOCAL_M4):  configure.in acinclude.m4
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
 
 config.h: stamp-h1
@@ -252,10 +226,10 @@ config.h: stamp-h1
 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
 	@rm -f stamp-h1
 	cd $(top_builddir) && $(SHELL) ./config.status config.h
-
-$(srcdir)/config.h.in:  $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+$(srcdir)/config.h.in:  $(am__configure_deps) 
 	cd $(top_srcdir) && $(AUTOHEADER)
-	touch $(srcdir)/config.h.in
+	rm -f stamp-h1
+	touch $@
 
 distclean-hdr:
 	-rm -f config.h stamp-h1
@@ -329,14 +303,6 @@ ctags-recursive:
 	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
 	done
 
-ETAGS = etags
-ETAGSFLAGS =
-
-CTAGS = ctags
-CTAGSFLAGS =
-
-tags: TAGS
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
@@ -345,14 +311,23 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	  $(AWK) '    { files[$$0] = 1; } \
 	       END { for (i in files) print i; }'`; \
 	mkid -fID $$unique
+tags: TAGS
 
 TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
 	tags=; \
 	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
 	list='$(SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
-	    test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+	    test ! -f $$subdir/TAGS || \
+	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
 	  fi; \
 	done; \
 	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
@@ -361,10 +336,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
 	  done | \
 	  $(AWK) '    { files[$$0] = 1; } \
 	       END { for (i in files) print i; }'`; \
-	test -z "$(ETAGS_ARGS)$$tags$$unique" \
-	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	     $$tags $$unique
-
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
 ctags: CTAGS
 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
@@ -387,29 +363,10 @@ GTAGS:
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-#>+ 4
-KDE_DIST=stamp-h.in subdirs linpsk.kdevses LinPSK.png Makefile.dist configure-stamp 
-
-DISTFILES= $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST)
-
-
-top_distdir = .
-distdir = $(PACKAGE)-$(VERSION)
-
-am__remove_distdir = \
-  { test ! -d $(distdir) \
-    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
-         && rm -fr $(distdir); }; }
-
-GZIP_ENV = --best
-distuninstallcheck_listfiles = find . -type f -print
-distcleancheck_listfiles = find . -type f -print
 
 distdir: $(DISTFILES)
 	$(am__remove_distdir)
 	mkdir $(distdir)
-	$(mkinstalldirs) $(distdir)/admin
 	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
 	list='$(DISTFILES)'; for file in $$list; do \
@@ -421,7 +378,7 @@ distdir: $(DISTFILES)
 	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
 	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
 	    dir="/$$dir"; \
-	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
 	  else \
 	    dir=''; \
 	  fi; \
@@ -436,48 +393,74 @@ distdir: $(DISTFILES)
 	    || exit 1; \
 	  fi; \
 	done
-	list='$(SUBDIRS)'; for subdir in $$list; do \
+	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
-	    test -d $(distdir)/$$subdir \
-	    || mkdir $(distdir)/$$subdir \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(mkdir_p) "$(distdir)/$$subdir" \
 	    || exit 1; \
+	    distdir=`$(am__cd) $(distdir) && pwd`; \
+	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
 	    (cd $$subdir && \
 	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$(top_distdir)" \
-	        distdir=../$(distdir)/$$subdir \
+	        top_distdir="$$top_distdir" \
+	        distdir="$$distdir/$$subdir" \
 	        distdir) \
 	      || exit 1; \
 	  fi; \
 	done
-	$(MAKE) $(AM_MAKEFLAGS) \
-	  top_distdir="$(top_distdir)" distdir="$(distdir)" \
-	  dist-hook
 	-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
 	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
 	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
 	  ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
 	|| chmod -R a+r $(distdir)
 dist-gzip: distdir
-	$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+dist-bzip2: distdir
+	tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+	$(am__remove_distdir)
+
+dist-tarZ: distdir
+	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+	$(am__remove_distdir)
+
+dist-shar: distdir
+	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+	$(am__remove_distdir)
+
+dist-zip: distdir
+	-rm -f $(distdir).zip
+	zip -rq $(distdir).zip $(distdir)
 	$(am__remove_distdir)
 
 dist dist-all: distdir
-	$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
 	$(am__remove_distdir)
 
 # This target untars the dist file and tries a VPATH configuration.  Then
 # it guarantees that the distribution is self-contained by making another
 # tarfile.
 distcheck: dist
-	$(am__remove_distdir)
-	GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
+	case '$(DIST_ARCHIVES)' in \
+	*.tar.gz*) \
+	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+	*.tar.bz2*) \
+	  bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+	*.tar.Z*) \
+	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+	*.shar.gz*) \
+	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+	*.zip*) \
+	  unzip $(distdir).zip ;;\
+	esac
 	chmod -R a-w $(distdir); chmod a+w $(distdir)
-	mkdir $(distdir)/=build
-	mkdir $(distdir)/=inst
+	mkdir $(distdir)/_build
+	mkdir $(distdir)/_inst
 	chmod a-w $(distdir)
-	dc_install_base=`$(am__cd) $(distdir)/=inst && pwd` \
+	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
 	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
-	  && cd $(distdir)/=build \
+	  && cd $(distdir)/_build \
 	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
 	    $(DISTCHECK_CONFIGURE_FLAGS) \
 	  && $(MAKE) $(AM_MAKEFLAGS) \
@@ -490,21 +473,22 @@ distcheck: dist
 	        distuninstallcheck \
 	  && chmod -R a-w "$$dc_install_base" \
 	  && ({ \
-	       (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \
+	       (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
 	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
 	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
 	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
 	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
 	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
 	  && rm -rf "$$dc_destdir" \
-	  && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
-	  && rm -f $(distdir).tar.gz \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist \
+	  && rm -rf $(DIST_ARCHIVES) \
 	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
 	$(am__remove_distdir)
-	@echo "$(distdir).tar.gz is ready for distribution" | \
-	  sed 'h;s/./=/g;p;x;p;x'
+	@(echo "$(distdir) archives ready for distribution: "; \
+	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+	  sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
 distuninstallcheck:
-	cd $(distuninstallcheck_dir) \
+	@cd $(distuninstallcheck_dir) \
 	&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
 	   || { echo "ERROR: files left after uninstall:" ; \
 	        if test -n "$(DESTDIR)"; then \
@@ -513,11 +497,11 @@ distuninstallcheck:
 	        $(distuninstallcheck_listfiles) ; \
 	        exit 1; } >&2
 distcleancheck: distclean
-	if test '$(srcdir)' = . ; then \
+	@if test '$(srcdir)' = . ; then \
 	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
 	  exit 1 ; \
 	fi
-	test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+	@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
 	  || { echo "ERROR: files left in build directory after distclean:" ; \
 	       $(distcleancheck_listfiles) ; \
 	       exit 1; } >&2
@@ -526,7 +510,6 @@ check: check-recursive
 all-am: Makefile config.h
 installdirs: installdirs-recursive
 installdirs-am:
-
 install: install-recursive
 install-exec: install-exec-recursive
 install-data: install-data-recursive
@@ -538,7 +521,7 @@ install-am: all-am
 installcheck: installcheck-recursive
 install-strip:
 	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  INSTALL_STRIP_FLAG=-s \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
 	  `test -z '$(STRIP)' || \
 	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
 mostlyclean-generic:
@@ -546,27 +529,27 @@ mostlyclean-generic:
 clean-generic:
 
 distclean-generic:
-	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
 	@echo "it deletes files that may require special tools to rebuild."
-	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
-#>- clean: clean-recursive
-#>+ 1
-clean: kde-rpo-clean  clean-recursive
+clean: clean-recursive
 
 clean-am: clean-generic clean-libtool mostlyclean-am
 
 distclean: distclean-recursive
 	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-distclean-am: clean-am distclean-generic distclean-hdr distclean-libtool \
-	distclean-tags
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-hdr \
+	distclean-libtool distclean-tags
 
 dvi: dvi-recursive
 
 dvi-am:
 
+html: html-recursive
+
 info: info-recursive
 
 info-am:
@@ -583,7 +566,8 @@ installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
 	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-	-rm -rf autom4te.cache
+	-rm -rf $(top_srcdir)/autom4te.cache
+	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
 mostlyclean: mostlyclean-recursive
@@ -602,73 +586,21 @@ uninstall-am: uninstall-info-am
 
 uninstall-info: uninstall-info-recursive
 
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
-	clean-generic clean-libtool clean-recursive ctags \
-	ctags-recursive dist dist-all dist-gzip distcheck distclean \
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
+	check-am clean clean-generic clean-libtool clean-recursive \
+	ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
+	dist-shar dist-tarZ dist-zip distcheck distclean \
 	distclean-generic distclean-hdr distclean-libtool \
 	distclean-recursive distclean-tags distcleancheck distdir \
-	distuninstallcheck dvi dvi-am dvi-recursive info info-am \
-	info-recursive install install-am install-data install-data-am \
-	install-data-recursive install-exec install-exec-am \
-	install-exec-recursive install-info install-info-am \
-	install-info-recursive install-man install-recursive \
+	distuninstallcheck dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-exec \
+	install-exec-am install-info install-info-am install-man \
 	install-strip installcheck installcheck-am installdirs \
-	installdirs-am installdirs-recursive maintainer-clean \
-	maintainer-clean-generic maintainer-clean-recursive mostlyclean \
-	mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \
-	pdf pdf-am pdf-recursive ps ps-am ps-recursive tags \
-	tags-recursive uninstall uninstall-am uninstall-info-am \
-	uninstall-info-recursive uninstall-recursive
+	installdirs-am maintainer-clean maintainer-clean-generic \
+	maintainer-clean-recursive mostlyclean mostlyclean-generic \
+	mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
+	tags tags-recursive uninstall uninstall-am uninstall-info-am
 
-
-#$(top_srcdir)/configure.in: configure.in.in $(top_srcdir)/subdirs
-#	cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common configure.in ;
-
-$(top_srcdir)/subdirs:
-	cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common subdirs
-
-$(top_srcdir)/acinclude.m4: $(top_srcdir)/admin/acinclude.m4.in $(top_srcdir)/admin/libtool.m4.in
-	@cd $(top_srcdir) && cat admin/acinclude.m4.in admin/libtool.m4.in > acinclude.m4
-
-package-messages:
-	$(MAKE) -f admin/Makefile.common package-messages
-	$(MAKE) -C po merge
-
-dist-hook:
-	cd $(top_distdir) && perl admin/am_edit -padmin
-	cd $(top_distdir) && $(MAKE) -f admin/Makefile.common subdirs
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
-
-
-
-#>+ 2
-docs-am:
-
-#>+ 6
-force-reedit:
-		cd $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign  Makefile
-	cd $(top_srcdir) && perl admin/am_edit linpsk-0.7.1/linpsk/Makefile.in
-
-
-#>+ 2
-final:
-	$(MAKE) all-am
-#>+ 2
-final-install:
-	$(MAKE) install-am
-#>+ 2
-no-final:
-	$(MAKE) all-am
-#>+ 2
-no-final-install:
-	$(MAKE) install-am
-#>+ 3
-cvs-clean:
-	$(MAKE) admindir=$(top_srcdir)/admin -f $(top_srcdir)/admin/Makefile.common cvs-clean
-
-#>+ 3
-kde-rpo-clean:
-	-rm -f *.rpo
diff --git a/stamp-h.in b/NEWS
similarity index 100%
rename from stamp-h.in
rename to NEWS
diff --git a/README b/README
index 11589ff..e69de29 100644
--- a/README
+++ b/README
@@ -1,7 +0,0 @@
-LinPSK 0.7 is a redesigned version of LinPSK 0.6.2 for use with qt3 and gcc 3.
-
-It requires the fftw lib for the computation of the spectrum.
-
-I slightly changed the definition of the modulator and demodulator classes
-to implement new modes easier in the future.
-The MFSK mode is not functional in the moment.
diff --git a/TODO b/TODO
index 3656503..e69de29 100644
--- a/TODO
+++ b/TODO
@@ -1,2 +0,0 @@
-1) Writing dokumentation
-2) Implementing some more modes
diff --git a/acinclude.m4 b/acinclude.m4
index dfde28b..ba3d33e 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -1,10791 +1,240 @@
-##   -*- autoconf -*-
-
-dnl    This file is part of the KDE libraries/packages
-dnl    Copyright (C) 1997 Janos Farkas (chexum at shadow.banki.hu)
-dnl              (C) 1997,98,99 Stephan Kulow (coolo at kde.org)
-
-dnl    This file is free software; you can redistribute it and/or
-dnl    modify it under the terms of the GNU Library General Public
-dnl    License as published by the Free Software Foundation; either
-dnl    version 2 of the License, or (at your option) any later version.
-
-dnl    This library is distributed in the hope that it will be useful,
-dnl    but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-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 IMPORTANT NOTE:
-dnl Please do not modify this file unless you expect your modifications to be
-dnl carried into every other module in the repository. 
-dnl
-dnl Single-module modifications are best placed in configure.in for kdelibs
-dnl and kdebase or configure.in.in if present.
-
-dnl ------------------------------------------------------------------------
-dnl Forward compatibility macros (make autoconf 2.13 look like 2.50),
-dnl thanks to Raja R Harinath.
-dnl ------------------------------------------------------------------------
-dnl
-ifdef([_AC_PATH_X_XMKMF],[],
-   [AC_DEFUN([_AC_PATH_X_XMKMF],[AC_PATH_X_XMKMF])])
-ifdef([AC_OUTPUT_SUBDIRS],[],
-   [AC_DEFUN([AC_OUTPUT_SUBDIRS],[subdirs=$1; _AC_OUTPUT_SUBDIRS])])
-
-# KDE_PATH_X_DIRECT
-dnl Internal subroutine of AC_PATH_X.
-dnl Set ac_x_includes and/or ac_x_libraries.
-AC_DEFUN(KDE_PATH_X_DIRECT,
-[
-AC_REQUIRE([KDE_CHECK_LIB64])
-
-if test "$ac_x_includes" = NO; then
-  # Guess where to find include files, by looking for this one X11 .h file.
-  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
-
-  # First, try using that file with no special directory specified.
-AC_TRY_CPP([#include <$x_direct_test_include>],
-[# We can compile using X headers with no special include directory.
-ac_x_includes=],
-[# Look for the header file in a standard set of common directories.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-  for ac_dir in               \
-    /usr/X11/include          \
-    /usr/X11R6/include        \
-    /usr/X11R5/include        \
-    /usr/X11R4/include        \
-                              \
-    /usr/include/X11          \
-    /usr/include/X11R6        \
-    /usr/include/X11R5        \
-    /usr/include/X11R4        \
-                              \
-    /usr/local/X11/include    \
-    /usr/local/X11R6/include  \
-    /usr/local/X11R5/include  \
-    /usr/local/X11R4/include  \
-                              \
-    /usr/local/include/X11    \
-    /usr/local/include/X11R6  \
-    /usr/local/include/X11R5  \
-    /usr/local/include/X11R4  \
-                              \
-    /usr/X386/include         \
-    /usr/x386/include         \
-    /usr/XFree86/include/X11  \
-                              \
-    /usr/include              \
-    /usr/local/include        \
-    /usr/unsupported/include  \
-    /usr/athena/include       \
-    /usr/local/x11r5/include  \
-    /usr/lpp/Xamples/include  \
-                              \
-    /usr/openwin/include      \
-    /usr/openwin/share/include \
-    ; \
-  do
-    if test -r "$ac_dir/$x_direct_test_include"; then
-      ac_x_includes=$ac_dir
-      break
-    fi
-  done])
-fi # $ac_x_includes = NO
-
-if test "$ac_x_libraries" = NO; then
-  # Check for the libraries.
-
-  test -z "$x_direct_test_library" && x_direct_test_library=Xt
-  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
-
-  # See if we find them without any special options.
-  # Don't add to $LIBS permanently.
-  ac_save_LIBS="$LIBS"
-  LIBS="-l$x_direct_test_library $LIBS"
-AC_TRY_LINK(, [${x_direct_test_function}()],
-[LIBS="$ac_save_LIBS"
-# We can link X programs with no special library path.
-ac_x_libraries=],
-[LIBS="$ac_save_LIBS"
-# First see if replacing the include by lib works.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-for ac_dir in `echo "$ac_x_includes" | sed s/include/lib${kdelibsuff}/` \
-    /usr/X11/lib${kdelibsuff}           \
-    /usr/X11R6/lib${kdelibsuff}         \
-    /usr/X11R5/lib${kdelibsuff}         \
-    /usr/X11R4/lib${kdelibsuff}         \
-                                        \
-    /usr/lib${kdelibsuff}/X11           \
-    /usr/lib${kdelibsuff}/X11R6         \
-    /usr/lib${kdelibsuff}/X11R5         \
-    /usr/lib${kdelibsuff}/X11R4         \
-                                        \
-    /usr/local/X11/lib${kdelibsuff}     \
-    /usr/local/X11R6/lib${kdelibsuff}   \
-    /usr/local/X11R5/lib${kdelibsuff}   \
-    /usr/local/X11R4/lib${kdelibsuff}   \
-                                        \
-    /usr/local/lib${kdelibsuff}/X11     \
-    /usr/local/lib${kdelibsuff}/X11R6   \
-    /usr/local/lib${kdelibsuff}/X11R5   \
-    /usr/local/lib${kdelibsuff}/X11R4   \
-                                        \
-    /usr/X386/lib${kdelibsuff}          \
-    /usr/x386/lib${kdelibsuff}          \
-    /usr/XFree86/lib${kdelibsuff}/X11   \
-                                        \
-    /usr/lib${kdelibsuff}               \
-    /usr/local/lib${kdelibsuff}         \
-    /usr/unsupported/lib${kdelibsuff}   \
-    /usr/athena/lib${kdelibsuff}        \
-    /usr/local/x11r5/lib${kdelibsuff}   \
-    /usr/lpp/Xamples/lib${kdelibsuff}   \
-    /lib/usr/lib${kdelibsuff}/X11       \
-                                        \
-    /usr/openwin/lib${kdelibsuff}       \
-    /usr/openwin/share/lib${kdelibsuff} \
-    ; \
-do
-dnl Don't even attempt the hair of trying to link an X program!
-  for ac_extension in a so sl; do
-    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
-      ac_x_libraries=$ac_dir
-      break 2
-    fi
-  done
-done])
-fi # $ac_x_libraries = NO
-])
-
-
-dnl ------------------------------------------------------------------------
-dnl Find a file (or one of more files in a list of dirs)
-dnl ------------------------------------------------------------------------
-dnl
-AC_DEFUN(AC_FIND_FILE,
-[
-$3=NO
-for i in $2;
-do
-  for j in $1;
-  do
-    echo "configure: __oline__: $i/$j" >&AC_FD_CC
-    if test -r "$i/$j"; then
-      echo "taking that" >&AC_FD_CC
-      $3=$i
-      break 2
-    fi
-  done
-done
-])
-
-dnl KDE_FIND_PATH(programm-name, variable-name, list of directories,
-dnl	if-not-found, test-parameter)
-AC_DEFUN(KDE_FIND_PATH,
-[
-   AC_MSG_CHECKING([for $1])
-   if test -n "$$2"; then
-        kde_cv_path="$$2";
-   else
-        kde_cache=`echo $1 | sed 'y%./+-%__p_%'`
-
-        AC_CACHE_VAL(kde_cv_path_$kde_cache,
-        [
-        kde_cv_path="NONE"
-	dirs="$3"
-	kde_save_IFS=$IFS
-	IFS=':'
-	for dir in $PATH; do
-	  dirs="$dirs $dir"
-        done
-	IFS=$kde_save_IFS
-
-        for dir in $dirs; do
-	  if test -x "$dir/$1"; then
-	    if test -n "$5"
-	    then
-              evalstr="$dir/$1 $5 2>&1 "
-	      if eval $evalstr; then
-                kde_cv_path="$dir/$1"
-                break
-	      fi
-            else
-		kde_cv_path="$dir/$1"
-                break
-	    fi
-          fi
-        done
-
-        eval "kde_cv_path_$kde_cache=$kde_cv_path"
-
-        ])
-
-      eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
-
-   fi
-
-   if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
-      AC_MSG_RESULT(not found)
-      $4
-   else
-      AC_MSG_RESULT($kde_cv_path)
-      $2=$kde_cv_path
-
-   fi
-])
-
-AC_DEFUN(KDE_MOC_ERROR_MESSAGE,
-[
-    AC_MSG_ERROR([No Qt meta object compiler (moc) found!
-Please check whether you installed Qt correctly.
-You need to have a running moc binary.
-configure tried to run $ac_cv_path_moc and the test didn't
-succeed. If configure shouldn't have tried this one, set
-the environment variable MOC to the right one before running
-configure.
-])
-])
-
-AC_DEFUN(KDE_UIC_ERROR_MESSAGE,
-[
-    AC_MSG_WARN([No Qt ui compiler (uic) found!
-Please check whether you installed Qt correctly.
-You need to have a running uic binary.
-configure tried to run $ac_cv_path_uic and the test didn't
-succeed. If configure shouldn't have tried this one, set
-the environment variable UIC to the right one before running
-configure.
-])
-])
-
-
-AC_DEFUN(KDE_CHECK_UIC_FLAG,
-[
-    AC_MSG_CHECKING([whether uic supports -$1 ])
-    kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
-    AC_CACHE_VAL(kde_cv_prog_uic_$kde_cache,
-    [
-        cat >conftest.ui <<EOT
-        <!DOCTYPE UI><UI version="3" stdsetdef="1"></UI>
-EOT
-        ac_uic_testrun="$UIC_PATH -$1 $2 conftest.ui >/dev/null"
-        if AC_TRY_EVAL(ac_uic_testrun); then
-            eval "kde_cv_prog_uic_$kde_cache=yes"
-        else
-            eval "kde_cv_prog_uic_$kde_cache=no"
-        fi
-        rm -f conftest*
-    ])
-
-    if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then
-        AC_MSG_RESULT([yes])
-        :
-        $3
-    else
-        AC_MSG_RESULT([no])
-        :
-        $4
-    fi
-])
-
-
-dnl ------------------------------------------------------------------------
-dnl Find the meta object compiler and the ui compiler in the PATH,
-dnl in $QTDIR/bin, and some more usual places
-dnl ------------------------------------------------------------------------
-dnl
-AC_DEFUN(AC_PATH_QT_MOC_UIC,
-[
-   qt_bindirs=""
-   for dir in $kde_qt_dirs; do
-      qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc"
-   done
-   qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin"
-   if test ! "$ac_qt_bindir" = "NO"; then
-      qt_bindirs="$ac_qt_bindir $qt_bindirs"
-   fi
-
-   KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE])
-   if test -z "$UIC_NOT_NEEDED"; then
-     KDE_FIND_PATH(uic, UIC_PATH, [$qt_bindirs], [UIC_PATH=""])
-     if test -z "$UIC_PATH" ; then
-       KDE_UIC_ERROR_MESSAGE
-       exit 1
-     elif test $kde_qtver = 3; then
-       KDE_CHECK_UIC_FLAG(L,[/nonexistant],ac_uic_supports_libpath=yes,ac_uic_supports_libpath=no)
-       KDE_CHECK_UIC_FLAG(nounload,,ac_uic_supports_nounload=yes,ac_uic_supports_nounload=no)
-
-       UIC=$UIC_PATH
-       if test x$ac_uic_supports_libpath = xyes; then
-           UIC="$UIC -L \$(kde_widgetdir)"
-       fi
-       if test x$ac_uic_supports_nounload = xyes; then
-           UIC="$UIC -nounload"
-       fi
-     fi
-   else
-     UIC="echo uic not available: "
-   fi
-
-   AC_SUBST(MOC)
-   AC_SUBST(UIC)
-
-   UIC_TR="i18n"
-   if test $kde_qtver = 3; then
-     UIC_TR="tr2i18n"
-   fi
-
-   AC_SUBST(UIC_TR)
-])
-
-AC_DEFUN(KDE_1_CHECK_PATHS,
+# Check for Qt compiler flags, linker flags, and binary packages
+AC_DEFUN([CHECK_QT],
 [
-  KDE_1_CHECK_PATH_HEADERS
-
-  KDE_TEST_RPATH=
-
-  if test -n "$USE_RPATH"; then
-
-     if test -n "$kde_libraries"; then
-       KDE_TEST_RPATH="-R $kde_libraries"
-     fi
-
-     if test -n "$qt_libraries"; then
-       KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries"
-     fi
-
-     if test -n "$x_libraries"; then
-       KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries"
-     fi
-
-     KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH"
-  fi
-
-AC_MSG_CHECKING([for KDE libraries installed])
-ac_link='$LIBTOOL_SHELL --silent --mode=link ${CXX-g++} -o conftest $CXXFLAGS $all_includes $CPPFLAGS $LDFLAGS $all_libraries conftest.$ac_ext $LIBS -lkdecore $LIBQT $KDE_TEST_RPATH 1>&5'
-
-if AC_TRY_EVAL(ac_link) && test -s conftest; then
-  AC_MSG_RESULT(yes)
-else
-  AC_MSG_ERROR([your system fails at linking a small KDE application!
-Check, if your compiler is installed correctly and if you have used the
-same compiler to compile Qt and kdelibs as you did use now.
-For more details about this problem, look at the end of config.log.])
-fi
-
-if eval `KDEDIR= ./conftest 2>&5`; then
-  kde_result=done
-else
-  kde_result=problems
+AC_REQUIRE([AC_PROG_CXX])
+AC_REQUIRE([AC_PATH_X])
+
+AC_MSG_CHECKING([QTDIR])
+AC_ARG_WITH([qtdir], [  --with-qtdir=DIR        Qt installation directory [default=$QTDIR]], QTDIR=$withval)
+# Check that QTDIR is defined or that --with-qtdir given
+if test x"$QTDIR" = x ; then
+    QT_SEARCH="/usr/lib/qt31 /usr/local/qt31 /usr/lib/qt3 /usr/local/qt3 /usr/qt/3 /usr/local/qt2 /usr/lib/qt /usr/local/qt"
+    for i in $QT_SEARCH; do
+        if test -f $i/include/qglobal.h -a x$QTDIR = x; then QTDIR=$i; fi
+    done
 fi
-
-KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
-kde_have_all_paths=yes
-
-KDE_SET_PATHS($kde_result)
-
-])
-
-AC_DEFUN(KDE_SET_PATHS,
-[
-  kde_cv_all_paths="kde_have_all_paths=\"yes\" \
-	kde_htmldir=\"$kde_htmldir\" \
-	kde_appsdir=\"$kde_appsdir\" \
-	kde_icondir=\"$kde_icondir\" \
-	kde_sounddir=\"$kde_sounddir\" \
-	kde_datadir=\"$kde_datadir\" \
-	kde_locale=\"$kde_locale\" \
-	kde_cgidir=\"$kde_cgidir\" \
-	kde_confdir=\"$kde_confdir\" \
-	kde_mimedir=\"$kde_mimedir\" \
-	kde_toolbardir=\"$kde_toolbardir\" \
-	kde_wallpaperdir=\"$kde_wallpaperdir\" \
-	kde_templatesdir=\"$kde_templatesdir\" \
-	kde_bindir=\"$kde_bindir\" \
-	kde_servicesdir=\"$kde_servicesdir\" \
-	kde_servicetypesdir=\"$kde_servicetypesdir\" \
-	kde_moduledir=\"$kde_moduledir\" \
-   kde_styledir=\"$kde_styledir\" \
-	kde_widgetdir=\"$kde_widgetdir\" \
-	kde_result=$1"
-])
-
-AC_DEFUN(KDE_SET_DEFAULT_PATHS,
-[
-if test "$1" = "default"; then
-
-  if test -z "$kde_htmldir"; then
-    kde_htmldir='\${prefix}/share/doc/HTML'
-  fi
-  if test -z "$kde_appsdir"; then
-    kde_appsdir='\${prefix}/share/applnk'
-  fi
-  if test -z "$kde_icondir"; then
-    kde_icondir='\${prefix}/share/icons'
-  fi
-  if test -z "$kde_sounddir"; then
-    kde_sounddir='\${prefix}/share/sounds'
-  fi
-  if test -z "$kde_datadir"; then
-    kde_datadir='\${prefix}/share/apps'
-  fi
-  if test -z "$kde_locale"; then
-    kde_locale='\${prefix}/share/locale'
-  fi
-  if test -z "$kde_cgidir"; then
-    kde_cgidir='\${exec_prefix}/cgi-bin'
-  fi
-  if test -z "$kde_confdir"; then
-    kde_confdir='\${prefix}/share/config'
-  fi
-  if test -z "$kde_mimedir"; then
-    kde_mimedir='\${prefix}/share/mimelnk'
-  fi
-  if test -z "$kde_toolbardir"; then
-    kde_toolbardir='\${prefix}/share/toolbar'
-  fi
-  if test -z "$kde_wallpaperdir"; then
-    kde_wallpaperdir='\${prefix}/share/wallpapers'
-  fi
-  if test -z "$kde_templatesdir"; then
-    kde_templatesdir='\${prefix}/share/templates'
-  fi
-  if test -z "$kde_bindir"; then
-    kde_bindir='\${exec_prefix}/bin'
-  fi
-  if test -z "$kde_servicesdir"; then
-    kde_servicesdir='\${prefix}/share/services'
-  fi
-  if test -z "$kde_servicetypesdir"; then
-    kde_servicetypesdir='\${prefix}/share/servicetypes'
-  fi
-  if test -z "$kde_moduledir"; then
-    if test "$kde_qtver" = "2"; then
-      kde_moduledir='\${libdir}/kde2'
-    else
-      kde_moduledir='\${libdir}/kde3'
-    fi
-  fi
-  if test -z "$kde_styledir"; then
-    kde_styledir='\${libdir}/kde3/plugins/styles'
-  fi
-  if test -z "$kde_widgetdir"; then
-    kde_widgetdir='\${libdir}/kde3/plugins/designer'
-  fi
-
-  KDE_SET_PATHS(defaults)
-
-else
-
-  if test $kde_qtver = 1; then
-     AC_MSG_RESULT([compiling])
-     KDE_1_CHECK_PATHS
-  else
-     AC_MSG_ERROR([path checking not yet supported for KDE 2])
-  fi
-
+if test x"$QTDIR" = x ; then
+    AC_MSG_ERROR([*** QTDIR must be defined, or --with-qtdir option given])
 fi
-])
-
-AC_DEFUN(KDE_CHECK_PATHS_FOR_COMPLETENESS,
-[ if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
-   test -z "$kde_icondir" || test -z "$kde_sounddir" ||
-   test -z "$kde_datadir" || test -z "$kde_locale"  ||
-   test -z "$kde_cgidir"  || test -z "$kde_confdir" ||
-   test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
-   test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
-   test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
-   test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
-   test -z "$kde_styledir" || test -z "kde_widgetdir" 
-   test "x$kde_have_all_paths" != "xyes"; then
-     kde_have_all_paths=no
-  fi
-])
-
-AC_DEFUN(KDE_MISSING_PROG_ERROR,
-[
-    AC_MSG_ERROR([The important program $1 was not found!
-Please check whether you installed KDE correctly.
-])
-])
-
-AC_DEFUN(KDE_MISSING_ARTS_ERROR,
-[
-    AC_MSG_ERROR([The important program $1 was not found!
-Please check whether you installed aRts correctly.
-])
-])
+AC_MSG_RESULT([$QTDIR])
 
-AC_DEFUN(KDE_SUBST_PROGRAMS,
-[
+# Change backslashes in QTDIR to forward slashes to prevent escaping
+# problems later on in the build process, mainly for Cygwin build
+# environment using MSVC as the compiler
+# TODO: Use sed instead of perl
+#QTDIR=`echo $QTDIR | perl -p -e 's/\\\\/\\//g'`
 
-        kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde3/bin /usr/kde/bin /usr/local/kde/bin"
-        test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs"
-        if test -n "$KDEDIRS"; then
-           kde_save_IFS=$IFS
-           IFS=:
-           for dir in $KDEDIRS; do
-                kde_default_bindirs="$dir/bin $kde_default_bindirs "
-           done
-           IFS=$kde_save_IFS
-        fi
-        kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_default_bindirs"
-        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)])
-        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)])
-        KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs])
-        KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
-      
-        if test -n "$MEINPROC" && test ! "$MEINPROC" = "compiled"; then  
- 	    kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
-            test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
-            AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
-	    if test "$KDE_XSL_STYLESHEET" = "NO"; then
-		KDE_XSL_STYLESHEET=""
-	    else
-                KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl"
-	    fi
+# Figure out which version of Qt we are using
+AC_MSG_CHECKING([Qt version])
+QT_VER=`grep 'define.*QT_VERSION_STR\W' $QTDIR/include/qglobal.h | perl -p -e 's/\D//g'`
+case "${QT_VER}" in
+    2*)
+        QT_MAJOR="2"
+    ;;
+    3*)
+        QT_MAJOR="3"
+    ;;
+    *)
+        AC_MSG_ERROR([*** Don't know how to handle this Qt major version])
+    ;;
+esac
+AC_MSG_RESULT([$QT_VER ($QT_MAJOR)])
+
+# Check that moc is in path
+AC_CHECK_PROG(MOC, moc,$QTDIR/bin/moc,,$QTDIR/bin)
+if test x$MOC = x ; then
+        AC_MSG_ERROR([*** moc not found])
+fi
+
+# uic is the Qt user interface compiler
+AC_CHECK_PROG(UIC, uic, $QTDIR/bin/uic,,$QTDIR/bin)
+if test x$UIC = x ; then
+        AC_MSG_ERROR([*** uic not found])
+fi
+
+# qembed is the Qt data embedding utility.
+# It is located in $QTDIR/tools/qembed, and must be compiled and installed
+# manually, we'll let it slide if it isn't present
+#AC_CHECK_PROG(QEMBED, qembed, qembed)
+
+
+# Calculate Qt include path
+QT_CXXFLAGS="-I$QTDIR/include"
+
+QT_IS_EMBEDDED="no"
+# On unix, figure out if we're doing a static or dynamic link
+case "${host}" in
+    *-cygwin)
+	AC_DEFINE_UNQUOTED(WIN32, "", Defined if on Win32 platform)
+        if test -f "$QTDIR/lib/qt.lib" ; then
+            QT_LIB="qt.lib"
+            QT_IS_STATIC="yes"
+            QT_IS_MT="no"
+        elif test -f "$QTDIR/lib/qt-mt.lib" ; then
+            QT_LIB="qt-mt.lib" 
+            QT_IS_STATIC="yes"
+            QT_IS_MT="yes"
+        elif test -f "$QTDIR/lib/qt$QT_VER.lib" ; then
+            QT_LIB="qt$QT_VER.lib"
+            QT_IS_STATIC="no"
+            QT_IS_MT="no"
+        elif test -f "$QTDIR/lib/qt-mt$QT_VER.lib" ; then
+            QT_LIB="qt-mt$QT_VER.lib"
+            QT_IS_STATIC="no"
+            QT_IS_MT="yes"
         fi
+        ;;
 
-        DCOP_DEPENDENCIES='$(DCOPIDL)'
-        AC_SUBST(DCOPIDL)
-        AC_SUBST(DCOPIDL2CPP)
-        AC_SUBST(DCOP_DEPENDENCIES)
-        AC_SUBST(MCOPIDL)
-        AC_SUBST(ARTSCCONFIG)
-        AC_SUBST(KDECONFIG)
-	AC_SUBST(MEINPROC)
- 	AC_SUBST(KDE_XSL_STYLESHEET)
-
-        if test -x "$KDECONFIG"; then # it can be "compiled"
-          kde_libs_prefix=`$KDECONFIG --prefix`
-          if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
-               AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
-                          This means it has been moved since you installed it.
-                          This won't work. Please recompile kdelibs for the new prefix.
-                          ])
-           fi
-           kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
+    *)
+        QT_IS_STATIC=`ls $QTDIR/lib/*.a 2> /dev/null`
+        if test "x$QT_IS_STATIC" = x; then
+            QT_IS_STATIC="no"
         else
-           kde_libs_prefix='$(prefix)'
-           kde_libs_htmldir='$(kde_htmldir)'
+            QT_IS_STATIC="yes"
+        fi
+        if test x$QT_IS_STATIC = xno ; then
+            QT_IS_DYNAMIC=`ls $QTDIR/lib/*.so 2> /dev/null` 
+            if test "x$QT_IS_DYNAMIC" = x;  then
+                AC_MSG_ERROR([*** Couldn't find any Qt libraries])
+            fi
         fi
-        AC_SUBST(kde_libs_prefix)
-        AC_SUBST(kde_libs_htmldir)
-])dnl
-
-AC_DEFUN(AC_CREATE_KFSSTND,
-[
-AC_REQUIRE([AC_CHECK_RPATH])
-
-AC_MSG_CHECKING([for KDE paths])
-kde_result=""
-kde_cached_paths=yes
-AC_CACHE_VAL(kde_cv_all_paths,
-[
-  KDE_SET_DEFAULT_PATHS($1)
-  kde_cached_paths=no
-])
-eval "$kde_cv_all_paths"
-KDE_CHECK_PATHS_FOR_COMPLETENESS
-if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then
-  # wrong values were cached, may be, we can set better ones
-  kde_result=
-  kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
-  kde_datadir= kde_locale=  kde_cgidir=  kde_confdir=
-  kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
-  kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
-  kde_have_all_paths=
-  kde_styledir=
-  kde_widgetdir=
-  KDE_SET_DEFAULT_PATHS($1)
-  eval "$kde_cv_all_paths"
-  KDE_CHECK_PATHS_FOR_COMPLETENESS
-  kde_result="$kde_result (cache overridden)"
-fi
-if test "$kde_have_all_paths" = "no"; then
-  AC_MSG_ERROR([configure could not run a little KDE program to test the environment.
-Since it had compiled and linked before, it must be a strange problem on your system.
-Look at config.log for details. If you are not able to fix this, look at
-http://www.kde.org/faq/installation.html or any www.kde.org mirror.
-(If you're using an egcs version on Linux, you may update binutils!)
-])
-else
-  rm -f conftest*
-  AC_MSG_RESULT($kde_result)
-fi
-
-bindir=$kde_bindir
-
-KDE_SUBST_PROGRAMS
-
-])
-
-AC_DEFUN(AC_SUBST_KFSSTND,
-[
-AC_SUBST(kde_htmldir)
-AC_SUBST(kde_appsdir)
-AC_SUBST(kde_icondir)
-AC_SUBST(kde_sounddir)
-AC_SUBST(kde_datadir)
-AC_SUBST(kde_locale)
-AC_SUBST(kde_confdir)
-AC_SUBST(kde_mimedir)
-AC_SUBST(kde_wallpaperdir)
-AC_SUBST(kde_bindir)
-dnl for KDE 2
-AC_SUBST(kde_templatesdir)
-AC_SUBST(kde_servicesdir)
-AC_SUBST(kde_servicetypesdir)
-AC_SUBST(kde_moduledir)
-AC_SUBST(kde_styledir)
-AC_SUBST(kde_widgetdir)
-if test "$kde_qtver" = 1; then
-  kde_minidir="$kde_icondir/mini"
-else
-# for KDE 1 - this breaks KDE2 apps using minidir, but
-# that's the plan ;-/
-  kde_minidir="/dev/null"
-fi
-dnl AC_SUBST(kde_minidir)
-dnl AC_SUBST(kde_cgidir)
-dnl AC_SUBST(kde_toolbardir)
-])
-
-AC_DEFUN(KDE_MISC_TESTS,
-[
-   AC_LANG_C
-   dnl Checks for libraries.
-   AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD 
-   AC_SUBST(LIBUTIL)
-   AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD
-   AC_SUBST(LIBCOMPAT)
-   kde_have_crypt=
-   AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes],
-      AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [
-        AC_MSG_WARN([you have no crypt in either libcrypt or libc.
-You should install libcrypt from another source or configure with PAM
-support])
-	kde_have_crypt=no
-      ]))
-   AC_SUBST(LIBCRYPT)
-   if test $kde_have_crypt = yes; then
-      AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
-   fi
-   AC_CHECK_SOCKLEN_T
-   AC_LANG_C
-   AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
-   if test $ac_cv_lib_dnet_dnet_ntoa = no; then
-      AC_CHECK_LIB(dnet_stub, dnet_ntoa,
-        [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
-   fi
-   AC_CHECK_FUNC(inet_ntoa)
-   if test $ac_cv_func_inet_ntoa = no; then
-     AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
-   fi
-   AC_CHECK_FUNC(connect)
-   if test $ac_cv_func_connect = no; then
-      AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
-        $X_EXTRA_LIBS)
-   fi
-
-   AC_CHECK_FUNC(remove)
-   if test $ac_cv_func_remove = no; then
-      AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix")
-   fi
-
-   # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
-   AC_CHECK_FUNC(shmat, ,
-     AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
-   
-   # darwin needs this to initialize the environment
-   AC_CHECK_HEADERS(crt_externs.h)
-   AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define if your system needs _NSGetEnviron to set up the environment])])
- 
-   # more headers that need to be explicitly included on darwin
-   AC_CHECK_HEADERS(sys/types.h stdint.h)
-
-   # darwin requires a poll emulation library
-   AC_CHECK_LIB(poll, poll, LIB_POLL="-lpoll")
-
-   # CoreAudio framework
-   AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [
-     AC_DEFINE(HAVE_COREAUDIO, 1, [Define if you have the CoreAudio API])
-     FRAMEWORK_COREAUDIO="-framework CoreAudio"
-   ])
-
-   AC_CHECK_RES_INIT
-   AC_SUBST(LIB_POLL)
-   AC_SUBST(FRAMEWORK_COREAUDIO)
-   LIBSOCKET="$X_EXTRA_LIBS"
-   AC_SUBST(LIBSOCKET)
-   AC_SUBST(X_EXTRA_LIBS)
-   AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
-   AC_SUBST(LIBUCB)
-
-   case $host in  dnl this *is* LynxOS specific
-   *-*-lynxos* )
-        AC_MSG_CHECKING([LynxOS header file wrappers])
-        [CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"]
-        AC_MSG_RESULT(disabled)
-        AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS
-         ;;
-    esac
-
-   KDE_CHECK_TYPES
-   KDE_CHECK_LIBDL
-
-AH_VERBATIM(_AIX_STRINGS_H_BZERO,
-[
-/*
- * AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
- * that defines bzero.
- */
-
-#if defined(_AIX)
-#include <strings.h>
-#endif
-])
-
-AC_CHECK_FUNCS([vsnprintf snprintf])
-
-AH_VERBATIM(_TRU64,[
-/*
- * On HP-UX, the declaration of vsnprintf() is needed every time !
- */
-
-#if !defined(HAVE_VSNPRINTF) || defined(hpux)
-#if __STDC__
-#include <stdarg.h>
-#include <stdlib.h>
-#else
-#include <varargs.h>
-#endif
-#ifdef __cplusplus
-extern "C"
-#endif
-int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
-#ifdef __cplusplus
-extern "C"
-#endif
-int snprintf(char *str, size_t n, char const *fmt, ...);
-#endif
-])
-
-])
-
-dnl ------------------------------------------------------------------------
-dnl Find the header files and libraries for X-Windows. Extended the
-dnl macro AC_PATH_X
-dnl ------------------------------------------------------------------------
-dnl
-AC_DEFUN(K_PATH_X,
-[
-AC_REQUIRE([KDE_MISC_TESTS])dnl
-AC_REQUIRE([KDE_CHECK_LIB64])
-
-AC_ARG_ENABLE(
-  embedded,
-  [  --enable-embedded       link to Qt-embedded, don't use X],
-  kde_use_qt_emb=$enableval,
-  kde_use_qt_emb=no
-)
-
-AC_ARG_ENABLE(
-  qtopia,
-  [  --enable-qtopia         link to Qt-embedded, link to the Qtopia Environment],
-  kde_use_qt_emb_palm=$enableval,
-  kde_use_qt_emb_palm=no
-)
-
-if test "$kde_use_qt_emb" = "no"; then
-
-AC_MSG_CHECKING(for X)
-AC_LANG_SAVE
-AC_LANG_C
-AC_CACHE_VAL(kde_cv_have_x,
-[# One or both of the vars are not set, and there is no cached value.
-if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
-   kde_x_includes=NO
-else
-   kde_x_includes=$x_includes
-fi
-if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then
-   kde_x_libraries=NO
-else
-   kde_x_libraries=$x_libraries
-fi
-
-# below we use the standard autoconf calls
-ac_x_libraries=$kde_x_libraries
-ac_x_includes=$kde_x_includes
 
-KDE_PATH_X_DIRECT
-dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
-dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
-dnl location. The correct location is /usr/lib32 or an undefined value
-dnl (the linker is smart enough to pick the correct default library).
-dnl Things work just fine if you use just AC_PATH_X_DIRECT.
-dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to
-dnl /usr/openwin/include, which doesn't work. /usr/include does work, so
-dnl x_includes should be left alone.
-case "$host" in
-mips-sgi-irix6*)
-  ;;
-*-*-solaris*)
-  ;;
-*)
-  _AC_PATH_X_XMKMF
-  if test -z "$ac_x_includes"; then
-    ac_x_includes="."
-  fi
-  if test -z "$ac_x_libraries"; then
-    ac_x_libraries="/usr/lib${kdelibsuff}"
-  fi
+        if test "x`ls $QTDIR/lib/libqt-mt.* 2> /dev/null`" != x ; then
+            QT_LIB="-lqt-mt"
+            QT_IS_MT="yes"
+        elif test "x`ls $QTDIR/lib/libqt.* 2> /dev/null`" != x ; then
+            QT_LIB="-lqt"
+            QT_IS_MT="no"
+        elif test "x`ls $QTDIR/lib/libqte.* 2> /dev/null`" != x ; then
+            QT_LIB="-lqte"
+            QT_IS_MT="no"
+            QT_IS_EMBEDDED="yes"
+        elif test "x`ls $QTDIR/lib/libqte-mt.* 2> /dev/null`" != x ; then
+            QT_LIB="-lqte-mt"
+            QT_IS_MT="yes"
+            QT_IS_EMBEDDED="yes"
+        fi
+        ;;
 esac
-#from now on we use our own again
-
-# when the user already gave --x-includes, we ignore
-# what the standard autoconf macros told us.
-if test "$kde_x_includes" = NO; then
-  kde_x_includes=$ac_x_includes
-fi
-
-# for --x-libraries too
-if test "$kde_x_libraries" = NO; then
-  kde_x_libraries=$ac_x_libraries
-fi
-
-if test "$kde_x_includes" = NO; then
-  AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!])
-fi
-
-if test "$kde_x_libraries" = NO; then
-  AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!])
-fi
-
-# Record where we found X for the cache.
-kde_cv_have_x="have_x=yes \
-         kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
-])dnl
-
-eval "$kde_cv_have_x"
-
-if test "$have_x" != yes; then
-  AC_MSG_RESULT($have_x)
-  no_x=yes
-else
-  AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes])
-fi
-
-if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
-  X_INCLUDES=""
-  x_includes="."; dnl better than nothing :-
- else
-  x_includes=$kde_x_includes
-  X_INCLUDES="-I$x_includes"
-fi
-
-if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then
-  X_LDFLAGS=""
-  x_libraries="/usr/lib"; dnl better than nothing :-
- else
-  x_libraries=$kde_x_libraries
-  X_LDFLAGS="-L$x_libraries"
-fi
-all_includes="$X_INCLUDES"
-all_libraries="$X_LDFLAGS"
-
-AC_SUBST(X_INCLUDES)
-AC_SUBST(X_LDFLAGS)
-AC_SUBST(x_libraries)
-AC_SUBST(x_includes)
-
-# Check for libraries that X11R6 Xt/Xaw programs need.
-ac_save_LDFLAGS="$LDFLAGS"
-LDFLAGS="$LDFLAGS $X_LDFLAGS"
-# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
-# check for ICE first), but we must link in the order -lSM -lICE or
-# we get undefined symbols.  So assume we have SM if we have ICE.
-# These have to be linked with before -lX11, unlike the other
-# libraries we check for below, so use a different variable.
-#  --interran at uluru.Stanford.EDU, kb at cs.umb.edu.
-AC_CHECK_LIB(ICE, IceConnectionNumber,
-  [LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS)
-AC_SUBST(LIBSM)
-LDFLAGS="$ac_save_LDFLAGS"
-
-AC_SUBST(X_PRE_LIBS)
-
-LIB_X11='-lX11 $(LIBSOCKET)'
-AC_SUBST(LIB_X11)
-
-AC_MSG_CHECKING(for libXext)
-AC_CACHE_VAL(kde_cv_have_libXext,
-[
-kde_ldflags_safe="$LDFLAGS"
-kde_libs_safe="$LIBS"
-
-LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
-LIBS="-lXext -lX11 $LIBSOCKET"
-
-AC_TRY_LINK([
-#include <stdio.h>
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-#endif
-],
-[
-printf("hello Xext\n");
-],
-kde_cv_have_libXext=yes,
-kde_cv_have_libXext=no
-   )
-
-LDFLAGS=$kde_ldflags_safe
-LIBS=$kde_libs_safe
- ])
-
-AC_MSG_RESULT($kde_cv_have_libXext)
-
-if test "$kde_cv_have_libXext" = "no"; then
-  AC_MSG_ERROR([We need a working libXext to proceed. Since configure
-can't find it itself, we stop here assuming that make wouldn't find
-them either.])
-fi
-
-AC_MSG_CHECKING(for Xinerama)
-
- AC_ARG_WITH(xinerama,
-  [  --with-xinerama         enable support for Xinerama ],
-  [
-    no_xinerama=no
-  ], [
-    no_xinerama=yes
-  ]
-)
-
-kde_save_LDFLAGS="$LDFLAGS"
-kde_save_CFLAGS="$CFLAGS"
-kde_save_LIBS="$LIBS"
-LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
-CFLAGS="$CFLAGS -I$x_includes"
-LIBS="-lXinerama -lXext"
-
-if test "x$no_xinerama" = "xno"; then
-
-  AC_CACHE_VAL(ac_cv_have_xinerama,
-  [
-	  AC_TRY_LINK([#include <X11/Xlib.h>
-  			#include <X11/extensions/Xinerama.h>],
-	  	  [XineramaIsActive(NULL);],
-		  [ac_cv_have_xinerama="yes"],
-		  [ac_cv_have_xinerama="no"])
-  ])
-else
-  ac_cv_have_xinerama=no;
-fi
-
-AC_MSG_RESULT($ac_cv_have_xinerama)
-
-LIBXINERAMA=""
-
-if test "$ac_cv_have_xinerama" = "yes"; then
-  AC_DEFINE(HAVE_XINERAMA, 1, [Define if you want Xinerama support])
-  LIBXINERAMA="-lXinerama"
-fi
-
-AC_SUBST(LIBXINERAMA)
-
-LDFLAGS="$kde_save_LDFLAGS"
-CFLAGS="$kde_save_CFLAGS"
-LIBS="$kde_save_LIBS"
+AC_MSG_CHECKING([if Qt is static])
+AC_MSG_RESULT([$QT_IS_STATIC])
+AC_MSG_CHECKING([if Qt is multithreaded])
+AC_MSG_RESULT([$QT_IS_MT])
+AC_MSG_CHECKING([if Qt is embedded])
+AC_MSG_RESULT([$QT_IS_EMBEDDED])
+
+QT_GUILINK=""
+QASSISTANTCLIENT_LDADD="-lqassistantclient"
+case "${host}" in
+    *irix*)
+        QT_LIBS="$QT_LIB"
+        if test $QT_IS_STATIC = yes ; then
+            QT_LIBS="$QT_LIBS -L$x_libraries -lXext -lX11 -lm -lSM -lICE"
+        fi
+        ;;
 
-LIB_XEXT="-lXext"
-QTE_NORTTI=""
+    *linux*)
+        QT_LIBS="$QT_LIB"
+        if test $QT_IS_STATIC = yes && test $QT_IS_EMBEDDED = no; then
+            QT_LIBS="$QT_LIBS -L$x_libraries -lXext -lX11 -lm -lSM -lICE -ldl -ljpeg"
+        fi
+        ;;
 
-else
-  dnl We're using QT Embedded
-  CPPFLAGS=-DQWS
-  CXXFLAGS="$CXXFLAGS -fno-rtti"
-  QTE_NORTTI="-fno-rtti -DQWS"
-  X_PRE_LIBS=""
-  LIB_X11=""
-  LIB_XEXT=""
-  LIBSM=""
-  X_INCLUDES=""
-  X_LDFLAGS=""
-  x_includes=""
-  x_libraries=""
-  AC_SUBST(X_PRE_LIBS)
-  AC_SUBST(LIB_X11)
-  AC_SUBST(LIBSM)
-  AC_SUBST(X_INCLUDES)
-  AC_SUBST(X_LDFLAGS)
-  AC_SUBST(x_includes)
-  AC_SUBST(x_libraries)
-fi
-AC_SUBST(QTE_NORTTI)
-AC_SUBST(LIB_XEXT)
 
+    *osf*) 
+        # Digital Unix (aka DGUX aka Tru64)
+        QT_LIBS="$QT_LIB"
+        if test $QT_IS_STATIC = yes ; then
+            QT_LIBS="$QT_LIBS -L$x_libraries -lXext -lX11 -lm -lSM -lICE"
+        fi
+        ;;
 
-AC_LANG_RESTORE
+    *solaris*)
+        QT_LIBS="$QT_LIB"
+        if test $QT_IS_STATIC = yes ; then
+            QT_LIBS="$QT_LIBS -L$x_libraries -lXext -lX11 -lm -lSM -lICE -lresolv -lsocket -lnsl"
+        fi
+        ;;
 
-])
 
-AC_DEFUN(KDE_PRINT_QT_PROGRAM,
-[
-AC_REQUIRE([KDE_USE_QT])
-cat > conftest.$ac_ext <<EOF
-#include "confdefs.h"
-#include <qglobal.h>
-#include <qapplication.h>
-EOF
-if test "$kde_qtver" = "2"; then
-cat >> conftest.$ac_ext <<EOF
-#include <qevent.h>
-#include <qstring.h>
-#include <qstyle.h>
-EOF
+    *win*)
+        # linker flag to suppress console when linking a GUI app on Win32
+        QT_GUILINK="/subsystem:windows"
 
-if test $kde_qtsubver -gt 0; then
-cat >> conftest.$ac_ext <<EOF
-#if QT_VERSION < 210
-#error 1
-#endif
-EOF
-fi
-fi
+	if test $QT_MAJOR = "3" ; then
+	    if test $QT_IS_MT = yes ; then
+        	QT_LIBS="/nodefaultlib:libcmt"
+            else
+            	QT_LIBS="/nodefaultlib:libc"
+            fi
+        fi
 
-if test "$kde_qtver" = "3"; then
-cat >> conftest.$ac_ext <<EOF
-#include <qcursor.h>
-#include <qstylefactory.h>
-#include <private/qucomextra_p.h>
-EOF
-fi
+        if test $QT_IS_STATIC = yes ; then
+            QT_LIBS="$QT_LIBS $QT_LIB kernel32.lib user32.lib gdi32.lib comdlg32.lib ole32.lib shell32.lib imm32.lib advapi32.lib wsock32.lib winspool.lib winmm.lib netapi32.lib"
+            if test $QT_MAJOR = "3" ; then
+                QT_LIBS="$QT_LIBS qtmain.lib"
+            fi
+        else
+            QT_LIBS="$QT_LIBS $QT_LIB"        
+            if test $QT_MAJOR = "3" ; then
+                QT_CXXFLAGS="$QT_CXXFLAGS -DQT_DLL"
+                QT_LIBS="$QT_LIBS qtmain.lib qui.lib user32.lib netapi32.lib"
+            fi
+        fi
+        QASSISTANTCLIENT_LDADD="qassistantclient.lib"
+        ;;
 
-echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
-cat >> conftest.$ac_ext <<EOF
-#error 1
-#endif
+esac
 
-int main() {
-EOF
-if test "$kde_qtver" = "2"; then
-cat >> conftest.$ac_ext <<EOF
-    QStringList *t = new QStringList();
-    Q_UNUSED(t);
-EOF
-if test $kde_qtsubver -gt 0; then
-cat >> conftest.$ac_ext <<EOF
-    QString s;
-    s.setLatin1("Elvis is alive", 14);
-EOF
-fi
-fi
-if test "$kde_qtver" = "3"; then
-cat >> conftest.$ac_ext <<EOF
-    (void)QStyleFactory::create(QString::null);
-    QCursor c(Qt::WhatsThisCursor);
-EOF
-fi
-cat >> conftest.$ac_ext <<EOF
-    return 0;
-}
-EOF
-])
 
-AC_DEFUN(KDE_USE_QT,
-[
-if test -z "$1"; then
-  # Current default Qt version: 3.1
-  kde_qtver=3
-  kde_qtsubver=1
-else
-  kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
-  # following is the check if subversion isnt found in passed argument
-  if test "$kde_qtsubver" = "$1"; then
-    kde_qtsubver=1
-  fi
-  kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
-  if test "$kde_qtver" = "1"; then
-    kde_qtsubver=42
-  fi
+if test x"$QT_IS_EMBEDDED" = "xyes" ; then
+        QT_CXXFLAGS="-DQWS $QT_CXXFLAGS"
 fi
 
-if test -z "$2"; then
-  if test "$kde_qtver" = "2"; then
-    if test $kde_qtsubver -gt 0; then
-      kde_qt_minversion=">= Qt 2.2.2"
-    else
-      kde_qt_minversion=">= Qt 2.0.2"
-    fi
-  fi
-  if test "$kde_qtver" = "3"; then
-    if test $kde_qtsubver -gt 0; then
-      kde_qt_minversion=">= Qt 3.1.0"
-    else
-      kde_qt_minversion=">= Qt 3.0"
-    fi
-  fi
-  if test "$kde_qtver" = "1"; then
-    kde_qt_minversion=">= 1.42 and < 2.0"
-  fi
-else
-   kde_qt_minversion=$2
-fi
+QT_LDADD="-L$QTDIR/lib $QT_LIB"
+if test x"$QT_IS_MT" = "xyes" ; then
+        QT_CXXFLAGS="$QT_CXXFLAGS -D_REENTRANT -DQT_THREAD_SUPPORT"
+	QT_LDADD="${QT_LDADD} -lpthread"
+	AC_MSG_CHECKING([QT_LDADD])
+	AC_MSG_RESULT([$QT_LDADD])
 
-if test -z "$3"; then
-   if test $kde_qtver = 3; then
-     if test $kde_qtsubver -gt 0; then
-       kde_qt_verstring="QT_VERSION >= 0x030100"
-     else
-       kde_qt_verstring="QT_VERSION >= 300"
-     fi
-   fi
-   if test $kde_qtver = 2; then
-     if test $kde_qtsubver -gt 0; then
-       kde_qt_verstring="QT_VERSION >= 222"
-     else
-       kde_qt_verstring="QT_VERSION >= 200"
-     fi
-   fi
-   if test $kde_qtver = 1; then
-    kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
-   fi
 else
-   kde_qt_verstring=$3
+ if test x$QT_IS_STATIC = xyes ; then
+    OLDLIBS="$LIBS"
+    LIBS="$QT_LDADD"
+    AC_CHECK_LIB(Xft, XftFontOpen, QT_LDADD="$QT_LDADD -lXft")
+    LIBS="$LIBS"
+ fi
 fi
 
-if test $kde_qtver = 3; then
-  kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt /usr/share/qt3"
-fi
-if test $kde_qtver = 2; then
-   kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
-fi
-if test $kde_qtver = 1; then
-   kde_qt_dirs="$QTDIR /usr/lib/qt"
-fi
+AC_MSG_CHECKING([QT_CXXFLAGS])
+AC_MSG_RESULT([$QT_CXXFLAGS])
+AC_MSG_CHECKING([QT_LDADD])
+AC_MSG_RESULT([$QT_LDADD])
+all_libraries="${all_libraries} ${QT_LDADD}"
 ])
 
-AC_DEFUN(KDE_CHECK_QT_DIRECT,
+#Check for fftw header and libs
+AC_DEFUN([FIND_FFTW],
 [
-AC_REQUIRE([KDE_USE_QT])
-AC_MSG_CHECKING([if Qt compiles without flags])
-AC_CACHE_VAL(kde_cv_qt_direct,
-[
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH
-ac_LIBRARY_PATH="$LIBRARY_PATH"
-ac_cxxflags_safe="$CXXFLAGS"
-ac_ldflags_safe="$LDFLAGS"
-ac_libs_safe="$LIBS"
-
-CXXFLAGS="$CXXFLAGS -I$qt_includes"
-LDFLAGS="$LDFLAGS $X_LDFLAGS"
-if test "x$kde_use_qt_emb" != "xyes"; then
-LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
-else
-LIBS="$LIBQT $LIBSOCKET"
-fi
-LD_LIBRARY_PATH=
-export LD_LIBRARY_PATH
-LIBRARY_PATH=
-export LIBRARY_PATH
-
-KDE_PRINT_QT_PROGRAM
-
-if AC_TRY_EVAL(ac_link) && test -s conftest; then
-  kde_cv_qt_direct="yes"
-else
-  kde_cv_qt_direct="no"
-  echo "configure: failed program was:" >&AC_FD_CC
-  cat conftest.$ac_ext >&AC_FD_CC
-fi
-
-rm -f conftest*
-CXXFLAGS="$ac_cxxflags_safe"
-LDFLAGS="$ac_ldflags_safe"
-LIBS="$ac_libs_safe"
-
-LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"
-export LD_LIBRARY_PATH
-LIBRARY_PATH="$ac_LIBRARY_PATH"
-export LIBRARY_PATH
-AC_LANG_RESTORE
-])
-
-if test "$kde_cv_qt_direct" = "yes"; then
-  AC_MSG_RESULT(yes)
-  $1
-else
-  AC_MSG_RESULT(no)
-  $2
+AC_MSG_CHECKING([FFTW lib])
+AC_ARG_WITH([fftw_dir],[  --with-fftw-dir=DIR    Base directory for fftw include and library],FFTW_BASE_DIR=$withval)
+if test ${FFTW_BASE_DIR}x = "x" ; then
+    FFTW_SEARCH="/usr /usr/local /usr/lib  /sw /sw/lib "
+    for i in $FFTW_SEARCH; do
+        if test -f $i/include/fftw3.h -a x${FFTW_BASE_DIR} = x; then FFTW_BASE_DIR=$i; fi
+    done
 fi
-])
-
-dnl ------------------------------------------------------------------------
-dnl Try to find the Qt headers and libraries.
-dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed)
-dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed)
-dnl ------------------------------------------------------------------------
-dnl
-AC_DEFUN(AC_PATH_QT_1_3,
-[
-AC_REQUIRE([K_PATH_X])
-AC_REQUIRE([KDE_USE_QT])
-AC_REQUIRE([KDE_CHECK_LIB64])
-
-dnl ------------------------------------------------------------------------
-dnl Add configure flag to enable linking to MT version of Qt library.
-dnl ------------------------------------------------------------------------
-
-AC_ARG_ENABLE(
-  mt,
-  [  --disable-mt            link to non-threaded Qt (deprecated)],
-  kde_use_qt_mt=$enableval,
-  [
-    if test $kde_qtver = 3; then
-      kde_use_qt_mt=yes
-    else
-      kde_use_qt_mt=no
-    fi
-  ]
-)
-
-USING_QT_MT=""
-
-dnl ------------------------------------------------------------------------
-dnl If we not get --disable-qt-mt then adjust some vars for the host.
-dnl ------------------------------------------------------------------------
-
-KDE_MT_LDFLAGS=
-KDE_MT_LIBS=
-if test "x$kde_use_qt_mt" = "xyes"; then
-  KDE_CHECK_THREADING
-  if test "x$kde_use_threading" = "xyes"; then
-    CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
-    KDE_MT_LDFLAGS="$USE_THREADS"
-    KDE_MT_LIBS="$LIBPTHREAD"
-  else
-    kde_use_qt_mt=no
-  fi
+if test ${FFTW_BASE_DIR}x = "x" ; then
+    AC_MSG_ERROR([*** FFTW 3 required, but not found. If FFTW is installed use --with-fftw-dir option])
 fi
-AC_SUBST(KDE_MT_LDFLAGS)
-AC_SUBST(KDE_MT_LIBS)
+AC_MSG_RESULT([$FFTW_BASE_DIR])
 
-kde_qt_was_given=yes
-
-dnl ------------------------------------------------------------------------
-dnl If we haven't been told how to link to Qt, we work it out for ourselves.
-dnl ------------------------------------------------------------------------
-if test -z "$LIBQT_GLOB"; then
-  if test "x$kde_use_qt_emb" = "xyes"; then
-    LIBQT_GLOB="libqte.*"
-  else
-    LIBQT_GLOB="libqt.*"
-  fi
+if test "$FFTW_BASE_DIR" != "/usr"; then
+	all_includes="${all_includes} -I$FFTW_BASE_DIR/include"
+	all_libraries="${all_libraries} -L$FFTW_BASE_DIR/lib"
 fi
 
-if test -z "$LIBQT"; then
-dnl ------------------------------------------------------------
-dnl If we got --enable-embedded then adjust the Qt library name.
-dnl ------------------------------------------------------------
-  if test "x$kde_use_qt_emb" = "xyes"; then
-    qtlib="qte"
-  else
-    qtlib="qt"
-  fi
-
-  kde_int_qt="-l$qtlib"
-else
-  kde_int_qt="$LIBQT"
-  kde_lib_qt_set=yes
-fi
-
-if test -z "$LIBQPE"; then
-dnl ------------------------------------------------------------
-dnl If we got --enable-palmtop then add -lqpe to the link line
-dnl ------------------------------------------------------------
-  if test "x$kde_use_qt_emb" = "xyes"; then
-    if test "x$kde_use_qt_emb_palm" = "xyes"; then
-      LIB_QPE="-lqpe"
-    else
-      LIB_QPE=""
-    fi
-  else
-    LIB_QPE=""
-  fi
-fi
-
-dnl ------------------------------------------------------------------------
-dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
-dnl ------------------------------------------------------------------------
-
-if test "x$kde_use_qt_mt" = "xyes"; then
-  if test -z "$LIBQT"; then
-    LIBQT="-l$qtlib-mt"
-    kde_int_qt="-l$qtlib-mt"
-  else
-    LIBQT="$qtlib-mt"
-    kde_int_qt="$qtlib-mt"
-  fi
-  LIBQT_GLOB="lib$qtlib-mt.*"
-  USING_QT_MT="using -mt"
-else
-  LIBQT="-l$qtlib"
-fi
-
-if test $kde_qtver != 1; then
-
-  AC_REQUIRE([AC_FIND_PNG])
-  AC_REQUIRE([AC_FIND_JPEG])
-  LIBQT="$LIBQT $LIBPNG $LIBJPEG"
-fi
-
-if test $kde_qtver = 3; then
-  AC_REQUIRE([KDE_CHECK_LIBDL])
-  LIBQT="$LIBQT $LIBDL"
-fi
-
-AC_MSG_CHECKING([for Qt])
-
-if test "x$kde_use_qt_emb" != "xyes"; then
-LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
-fi
-ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
-qt_libraries=""
-qt_includes=""
-AC_ARG_WITH(qt-dir,
-    [  --with-qt-dir=DIR       where the root of Qt is installed ],
-    [  ac_qt_includes="$withval"/include
-       ac_qt_libraries="$withval"/lib${kdelibsuff}
-       ac_qt_bindir="$withval"/bin
-    ])
-
-AC_ARG_WITH(qt-includes,
-    [  --with-qt-includes=DIR  where the Qt includes are. ],
-    [
-       ac_qt_includes="$withval"
-    ])
-
-kde_qt_libs_given=no
-
-AC_ARG_WITH(qt-libraries,
-    [  --with-qt-libraries=DIR where the Qt library is installed.],
-    [  ac_qt_libraries="$withval"
-       kde_qt_libs_given=yes
-    ])
-
-AC_CACHE_VAL(ac_cv_have_qt,
-[#try to guess Qt locations
-
-qt_incdirs=""
-for dir in $kde_qt_dirs; do
-   qt_incdirs="$qt_incdirs $dir/include $dir"
-done
-qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/X11R6/include/qt2 $x_includes"
-if test ! "$ac_qt_includes" = "NO"; then
-   qt_incdirs="$ac_qt_includes $qt_incdirs"
-fi
-
-if test "$kde_qtver" != "1"; then
-  kde_qt_header=qstyle.h
-else
-  kde_qt_header=qglobal.h
-fi
-
-AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
-ac_qt_includes="$qt_incdir"
-
-qt_libdirs=""
-for dir in $kde_qt_dirs; do
-   qt_libdirs="$qt_libdirs $dir/lib${kdelibsuff} $dir"
-done
-qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
-if test ! "$ac_qt_libraries" = "NO"; then
-  qt_libdir=$ac_qt_libraries
-else
-  qt_libdirs="$ac_qt_libraries $qt_libdirs"
-  # if the Qt was given, the chance is too big that libqt.* doesn't exist
-  qt_libdir=NONE
-  for dir in $qt_libdirs; do
-    try="ls -1 $dir/${LIBQT_GLOB}"
-    if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
-  done
-fi
-
-ac_qt_libraries="$qt_libdir"
-
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-
-ac_cxxflags_safe="$CXXFLAGS"
-ac_ldflags_safe="$LDFLAGS"
-ac_libs_safe="$LIBS"
-
-CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
-LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
-LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
-
-KDE_PRINT_QT_PROGRAM
-
-if AC_TRY_EVAL(ac_link) && test -s conftest; then
-  rm -f conftest*
-else
-  echo "configure: failed program was:" >&AC_FD_CC
-  cat conftest.$ac_ext >&AC_FD_CC
-  ac_qt_libraries="NO"
-fi
-rm -f conftest*
-CXXFLAGS="$ac_cxxflags_safe"
-LDFLAGS="$ac_ldflags_safe"
-LIBS="$ac_libs_safe"
-
-AC_LANG_RESTORE
-if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
-  ac_cv_have_qt="have_qt=no"
-  ac_qt_notfound=""
-  missing_qt_mt=""
-  if test "$ac_qt_includes" = NO; then
-    if test "$ac_qt_libraries" = NO; then
-      ac_qt_notfound="(headers and libraries)";
-    else
-      ac_qt_notfound="(headers)";
-    fi
-  else
-    if test "x$kde_use_qt_mt" = "xyes"; then
-       missing_qt_mt="
-Make sure that you have compiled Qt with thread support!"
-       ac_qt_notfound="(library $qtlib-mt)";
-    else
-       ac_qt_notfound="(library $qtlib)";
-    fi
-  fi
-
-  AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
-For more details about this problem, look at the end of config.log.$missing_qt_mt])
-else
-  have_qt="yes"
-fi
-])
-
-eval "$ac_cv_have_qt"
-
-if test "$have_qt" != yes; then
-  AC_MSG_RESULT([$have_qt]);
-else
-  ac_cv_have_qt="have_qt=yes \
-    ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
-  AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT])
-
-  qt_libraries="$ac_qt_libraries"
-  qt_includes="$ac_qt_includes"
-fi
-
-if test ! "$kde_qt_libs_given" = "yes"; then
-KDE_CHECK_QT_DIRECT(qt_libraries= ,[])
-fi
-
-AC_SUBST(qt_libraries)
-AC_SUBST(qt_includes)
-
-if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
- QT_INCLUDES=""
-else
- QT_INCLUDES="-I$qt_includes"
- all_includes="$QT_INCLUDES $all_includes"
-fi
-
-if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then
- QT_LDFLAGS=""
-else
- QT_LDFLAGS="-L$qt_libraries"
- all_libraries="$all_libraries $QT_LDFLAGS"
-fi
-test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
-
-AC_SUBST(QT_INCLUDES)
-AC_SUBST(QT_LDFLAGS)
-AC_PATH_QT_MOC_UIC
-
-KDE_CHECK_QT_JPEG
-
-if test "x$kde_use_qt_emb" != "xyes"; then
-LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
-else
-LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBPNG)'
-fi
-test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
-
-AC_SUBST(LIB_QT)
-AC_SUBST(LIB_QPE)
-
-AC_SUBST(kde_qtver)
-])
-
-AC_DEFUN(AC_PATH_QT,
-[
-AC_PATH_QT_1_3
-])
-
-AC_DEFUN(KDE_CHECK_UIC_PLUGINS,
-[
-AC_REQUIRE([AC_PATH_QT_MOC_UIC])
-
-if test x$ac_uic_supports_libpath = xyes; then
-
-AC_MSG_CHECKING([if UIC has KDE plugins available])
-AC_CACHE_VAL(kde_cv_uic_plugins,
-[
-cat > actest.ui << EOF
-<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
-<class>NewConnectionDialog</class>
-<widget class="QDialog">
-   <widget class="KLineEdit">
-        <property name="name">
-           <cstring>testInput</cstring>
-        </property>
-   </widget>
-</widget>
-</UI>
-EOF
-       
-
-
-kde_cv_uic_plugins=no
-kde_line="$UIC_PATH -L $kde_widgetdir"
-if test x$ac_uic_supports_nounload = xyes; then
-   kde_line="$kde_line -nounload"
-fi
-kde_line="$kde_line -impl actest.h actest.ui > actest.cpp"
-if AC_TRY_EVAL(kde_line); then
-	if test -f actest.cpp && grep klineedit actest.cpp > /dev/null; then
-		kde_cv_uic_plugins=yes
-	fi
-fi
-rm -f actest.ui actest.cpp
-])
-
-if test "$kde_cv_uic_plugins" = yes; then
-	AC_MSG_RESULT([yes])
-else
-	AC_MSG_ERROR([not found - you need to install kdelibs first.])
-fi
-fi
-])
-
-AC_DEFUN(KDE_CHECK_FINAL,
-[
-  AC_ARG_ENABLE(final, [  --enable-final          build size optimized apps (experimental - needs lots of memory)],
-	kde_use_final=$enableval, kde_use_final=no)
-
-  KDE_COMPILER_REPO
-  if test "x$kde_use_final" = "xyes"; then
-      KDE_USE_FINAL_TRUE=""
-      KDE_USE_FINAL_FALSE="#"
-   else
-      KDE_USE_FINAL_TRUE="#"
-      KDE_USE_FINAL_FALSE=""
-  fi
-  AC_SUBST(KDE_USE_FINAL_TRUE)
-  AC_SUBST(KDE_USE_FINAL_FALSE)
-
-  AC_ARG_ENABLE(closure, [  --disable-closure       don't delay template instantiation],
-  	kde_use_closure=$enableval, kde_use_closure=yes)
-
-  if test "x$kde_use_closure" = "xyes"; then
-       KDE_USE_CLOSURE_TRUE=""
-       KDE_USE_CLOSURE_FALSE="#"
-#       CXXFLAGS="$CXXFLAGS $REPO"
-  else
-       KDE_USE_CLOSURE_TRUE="#"
-       KDE_USE_CLOSURE_FALSE=""
-  fi
-  AC_SUBST(KDE_USE_CLOSURE_TRUE)
-  AC_SUBST(KDE_USE_CLOSURE_FALSE)
-])
-
-dnl ------------------------------------------------------------------------
-dnl Now, the same with KDE
-dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed)
-dnl and $(kde_includes) will be the kdehdrlocation (if needed)
-dnl ------------------------------------------------------------------------
-dnl
-AC_DEFUN(AC_BASE_PATH_KDE,
-[
-AC_PREREQ([2.13])
-AC_REQUIRE([AC_PATH_QT])dnl
-AC_REQUIRE([KDE_CHECK_LIB64])
-
-AC_CHECK_RPATH
-AC_MSG_CHECKING([for KDE])
-
-if test "${prefix}" != NONE; then
-  kde_includes=${prefix}/include
-  ac_kde_includes=$prefix/include
-
-  if test "${exec_prefix}" != NONE; then
-     kde_libraries=${libdir}
-     ac_kde_libraries=$libdir
-     if test "$ac_kde_libraries" = '${exec_prefix}/lib'${kdelibsuff}; then
-	ac_kde_libraries=$exec_prefix/lib${kdelibsuff}
-     fi
-  else
-     kde_libraries=${prefix}/lib${kdelibsuff}
-     ac_kde_libraries=$prefix/lib${kdelibsuff}
-  fi
-else
-  ac_kde_includes=
-  ac_kde_libraries=
-  kde_libraries=""
-  kde_includes=""
-fi
-
-AC_CACHE_VAL(ac_cv_have_kde,
-[#try to guess kde locations
-
-if test "$kde_qtver" = 1; then
-  kde_check_header="ksock.h"
-  kde_check_lib="libkdecore.la"
-else
-  kde_check_header="ksharedptr.h"
-  kde_check_lib="libkio.la"
-fi
-
-if test -z "$1"; then
-
-kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes"
-test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
-kde_incdirs="$ac_kde_includes $kde_incdirs"
-AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
-ac_kde_includes="$kde_incdir"
-
-if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
-  AC_MSG_ERROR([
-in the prefix, you've chosen, are no KDE headers installed. This will fail.
-So, check this please and use another prefix!])
-fi
-
-kde_libdirs="/usr/lib/kde/lib${kdelibsuff} /usr/local/kde/lib${kdelibsuff} /usr/kde/lib${kdelibsuff} /usr/lib${kdelibsuff}/kde /usr/lib${kdelibsuff}/kde3 /usr/lib${kdelibsuff} /usr/X11R6/lib${kdelibsuff} /usr/local/lib${kdelibsuff} /opt/kde3/lib${kdelibsuff} /opt/kde/lib${kdelibsuff} /usr/X11R6/kde/lib${kdelibsuff}"
-test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib${kdelibsuff} $KDEDIR $kde_libdirs"
-kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs"
-AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
-ac_kde_libraries="$kde_libdir"
-
-kde_widgetdir=NO
-dnl this might be somewhere else
-AC_FIND_FILE("kde3/plugins/designer/kdewidgets.la", $kde_libdirs, kde_widgetdir)
-
-if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
-AC_MSG_ERROR([
-in the prefix, you've chosen, are no KDE libraries installed. This will fail.
-So, check this please and use another prefix!])
-fi
-
-if test -n "$kde_widgetdir" && test ! -r "$kde_widgetdir/kde3/plugins/designer/kdewidgets.la"; then
-AC_MSG_ERROR([
-I can't find the designer plugins. These are required and should have been installed
-by kdelibs])
-fi
-
-if test -n "$kde_widgetdir"; then
-    kde_widgetdir="$kde_widgetdir/kde3/plugins/designer"
-fi
-
-
-if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO || test "$kde_widgetdir" = NO; then
-  ac_cv_have_kde="have_kde=no"
-else
-  ac_cv_have_kde="have_kde=yes \
-    ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
-fi
-
-else dnl test -z $1
-
-  ac_cv_have_kde="have_kde=no"
-
-fi
-])dnl
-
-eval "$ac_cv_have_kde"
-
-if test "$have_kde" != "yes"; then
- if test "${prefix}" = NONE; then
-  ac_kde_prefix="$ac_default_prefix"
- else
-  ac_kde_prefix="$prefix"
- fi
- if test "$exec_prefix" = NONE; then
-  ac_kde_exec_prefix="$ac_kde_prefix"
-  AC_MSG_RESULT([will be installed in $ac_kde_prefix])
- else
-  ac_kde_exec_prefix="$exec_prefix"
-  AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix])
- fi
-
- kde_libraries="${libdir}"
- kde_includes=${ac_kde_prefix}/include
-
-else
-  ac_cv_have_kde="have_kde=yes \
-    ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
-  AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes])
-
-  kde_libraries="$ac_kde_libraries"
-  kde_includes="$ac_kde_includes"
-fi
-AC_SUBST(kde_libraries)
-AC_SUBST(kde_includes)
-
-if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes"  || test "$kde_includes" = "/usr/include"; then
- KDE_INCLUDES=""
-else
- KDE_INCLUDES="-I$kde_includes"
- all_includes="$KDE_INCLUDES $all_includes"
-fi
- 
-KDE_LDFLAGS="-L$kde_libraries"
-if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then 
- all_libraries="$all_libraries $KDE_LDFLAGS"
-fi
-
-AC_SUBST(KDE_LDFLAGS)
-AC_SUBST(KDE_INCLUDES)
-
-AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
-
-all_libraries="$all_libraries $USER_LDFLAGS"
-all_includes="$all_includes $USER_INCLUDES"
-AC_SUBST(all_includes)
-AC_SUBST(all_libraries)
-
-if test -z "$1"; then
-KDE_CHECK_UIC_PLUGINS
-fi
-
-ac_kde_libraries="$kde_libdir"
-
-AC_SUBST(AUTODIRS)
-
-
-])
-
-AC_DEFUN(KDE_CHECK_EXTRA_LIBS,
-[
-AC_MSG_CHECKING(for extra includes)
-AC_ARG_WITH(extra-includes, [  --with-extra-includes=DIR
-                          adds non standard include paths],
-  kde_use_extra_includes="$withval",
-  kde_use_extra_includes=NONE
-)
-kde_extra_includes=
-if test -n "$kde_use_extra_includes" && \
-   test "$kde_use_extra_includes" != "NONE"; then
-
-   ac_save_ifs=$IFS
-   IFS=':'
-   for dir in $kde_use_extra_includes; do
-     kde_extra_includes="$kde_extra_includes $dir"
-     USER_INCLUDES="$USER_INCLUDES -I$dir"
-   done
-   IFS=$ac_save_ifs
-   kde_use_extra_includes="added"
-else
-   kde_use_extra_includes="no"
-fi
-AC_SUBST(USER_INCLUDES)
-
-AC_MSG_RESULT($kde_use_extra_includes)
-
-kde_extra_libs=
-AC_MSG_CHECKING(for extra libs)
-AC_ARG_WITH(extra-libs, [  --with-extra-libs=DIR   adds non standard library paths],
-  kde_use_extra_libs=$withval,
-  kde_use_extra_libs=NONE
-)
-if test -n "$kde_use_extra_libs" && \
-   test "$kde_use_extra_libs" != "NONE"; then
-
-   ac_save_ifs=$IFS
-   IFS=':'
-   for dir in $kde_use_extra_libs; do
-     kde_extra_libs="$kde_extra_libs $dir"
-     KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
-     USER_LDFLAGS="$USER_LDFLAGS -L$dir"
-   done
-   IFS=$ac_save_ifs
-   kde_use_extra_libs="added"
-else
-   kde_use_extra_libs="no"
-fi
-
-AC_SUBST(USER_LDFLAGS)
-
-AC_MSG_RESULT($kde_use_extra_libs)
-
-])
-
-AC_DEFUN(KDE_1_CHECK_PATH_HEADERS,
-[
-    AC_MSG_CHECKING([for KDE headers installed])
-    AC_LANG_SAVE
-    AC_LANG_CPLUSPLUS
-cat > conftest.$ac_ext <<EOF
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-#endif
-#include <stdio.h>
-#include "confdefs.h"
-#include <kapp.h>
-
-int main() {
-    printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
-    printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
-    printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
-    printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
-    printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
-    printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
-    printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
-    printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
-    printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
-    printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
-    printf("kde_wallpaperdir=\\"%s\\"\n",
-	KApplication::kde_wallpaperdir().data());
-    printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
-    printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
-    printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
-    printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
-    printf("kde_moduledir=\\"/tmp/dummy\\"\n");
-    printf("kde_styledir=\\"/tmp/dummy\\"\n");
-    printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
-    return 0;
-    }
-EOF
-
- ac_compile='${CXX-g++} -c $CXXFLAGS $all_includes $CPPFLAGS conftest.$ac_ext'
- if AC_TRY_EVAL(ac_compile); then
-   AC_MSG_RESULT(yes)
- else
-   AC_MSG_ERROR([your system is not able to compile a small KDE application!
-Check, if you installed the KDE header files correctly.
-For more details about this problem, look at the end of config.log.])
-  fi
-
-  AC_LANG_RESTORE
-])
-
-AC_DEFUN(KDE_CHECK_KDEQTADDON,
-[
-AC_MSG_CHECKING(for kde-qt-addon)
-AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
-[
- kde_ldflags_safe="$LDFLAGS"
- kde_libs_safe="$LIBS"
- kde_cxxflags_safe="$CXXFLAGS"
-
- LIBS="-lkde-qt-addon $LIBQT $LIBS"
- CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes"
- LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
-
- AC_TRY_LINK([
-   #include <qdom.h>
- ],
- [
-   QDomDocument doc;
- ],
-  kde_cv_have_kdeqtaddon=yes,
-  kde_cv_have_kdeqtaddon=no
- )
-
- LDFLAGS=$kde_ldflags_safe
- LIBS=$kde_libs_safe
- CXXFLAGS=$kde_cxxflags_safe
-])
-
-AC_MSG_RESULT($kde_cv_have_kdeqtaddon)
-
-if test "$kde_cv_have_kdeqtaddon" = "no"; then
-  AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first.
-It is a separate package (and CVS module) named kde-qt-addon.])
-fi
-])
-
-AC_DEFUN(KDE_CHECK_KIMGIO,
-[
-   AC_REQUIRE([AC_BASE_PATH_KDE])
-   AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
-   AC_REQUIRE([AC_FIND_TIFF])
-   AC_REQUIRE([AC_FIND_JPEG])
-   AC_REQUIRE([AC_FIND_PNG])
-   AC_REQUIRE([KDE_CREATE_LIBS_ALIASES])
-
-   if test "$1" = "existance"; then
-     AC_LANG_SAVE
-     AC_LANG_CPLUSPLUS
-     kde_save_LIBS="$LIBS"
-     LIBS="$LIBS $all_libraries $LIBJPEG $LIBTIFF $LIBPNG $LIBQT -lm"
-     AC_CHECK_LIB(kimgio, kimgioRegister, [
-      LIBKIMGIO_EXISTS=yes],LIBKIMGIO_EXISTS=no)
-     LIBS="$kde_save_LIBS"
-     AC_LANG_RESTORE
-   else
-     LIBKIMGIO_EXISTS=yes
-   fi
-
-   if test "$LIBKIMGIO_EXISTS" = "yes"; then
-     LIB_KIMGIO='-lkimgio'
-   else
-     LIB_KIMGIO=''
-   fi
-   AC_SUBST(LIB_KIMGIO)
-])
-
-AC_DEFUN(KDE_CREATE_LIBS_ALIASES,
-[
-   AC_REQUIRE([KDE_MISC_TESTS])
-   AC_REQUIRE([KDE_CHECK_LIBDL])
-   AC_REQUIRE([K_PATH_X])
-
-if test $kde_qtver = 3; then
-   AC_SUBST(LIB_KDECORE, "-lkdecore")
-   AC_SUBST(LIB_KDEUI, "-lkdeui")
-   AC_SUBST(LIB_KIO, "-lkio")
-   AC_SUBST(LIB_SMB, "-lsmb")
-   AC_SUBST(LIB_KAB, "-lkab")
-   AC_SUBST(LIB_KABC, "-lkabc")
-   AC_SUBST(LIB_KHTML, "-lkhtml")
-   AC_SUBST(LIB_KSPELL, "-lkspell")
-   AC_SUBST(LIB_KPARTS, "-lkparts")
-   AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
-# these are for backward compatibility
-   AC_SUBST(LIB_KSYCOCA, "-lkio")
-   AC_SUBST(LIB_KFILE, "-lkio")
-elif test $kde_qtver = 2; then
-   AC_SUBST(LIB_KDECORE, "-lkdecore")
-   AC_SUBST(LIB_KDEUI, "-lkdeui")
-   AC_SUBST(LIB_KIO, "-lkio")
-   AC_SUBST(LIB_KSYCOCA, "-lksycoca")
-   AC_SUBST(LIB_SMB, "-lsmb")
-   AC_SUBST(LIB_KFILE, "-lkfile")
-   AC_SUBST(LIB_KAB, "-lkab")
-   AC_SUBST(LIB_KHTML, "-lkhtml")
-   AC_SUBST(LIB_KSPELL, "-lkspell")
-   AC_SUBST(LIB_KPARTS, "-lkparts")
-   AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
-else
-   AC_SUBST(LIB_KDECORE, "-lkdecore -lXext $(LIB_QT)")
-   AC_SUBST(LIB_KDEUI, "-lkdeui $(LIB_KDECORE)")
-   AC_SUBST(LIB_KFM, "-lkfm $(LIB_KDECORE)")
-   AC_SUBST(LIB_KFILE, "-lkfile $(LIB_KFM) $(LIB_KDEUI)")
-   AC_SUBST(LIB_KAB, "-lkab $(LIB_KIMGIO) $(LIB_KDECORE)")
-fi
-])
-
-AC_DEFUN(AC_PATH_KDE,
-[
-  AC_BASE_PATH_KDE
-  AC_ARG_ENABLE(path-check, [  --disable-path-check    don't try to find out, where to install],
-  [
-  if test "$enableval" = "no";
-    then ac_use_path_checking="default"
-    else ac_use_path_checking=""
-  fi
-  ],
-  [
-  if test "$kde_qtver" = 1;
-    then ac_use_path_checking=""
-    else ac_use_path_checking="default"
-  fi
-  ]
-  )
-
-  AC_CREATE_KFSSTND($ac_use_path_checking)
-
-  AC_SUBST_KFSSTND
-  KDE_CREATE_LIBS_ALIASES
-])
-
-dnl KDE_CHECK_FUNC_EXT(<func>, [headers], [sample-use], [C prototype], [autoheader define], [call if found])
-AC_DEFUN(KDE_CHECK_FUNC_EXT,
-[
-AC_MSG_CHECKING(for $1)
-AC_CACHE_VAL(kde_cv_func_$1,
-[
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-save_CXXFLAGS="$CXXFLAGS"
-kde_safe_LIBS="$LIBS"
-LIBS="$LIBS $X_EXTRA_LIBS"
-if test "$GXX" = "yes"; then
-  CXXFLAGS="$CXXFLAGS -pedantic-errors"
-fi
-AC_TRY_COMPILE([
-$2
-],
-[
-$3
-],
-kde_cv_func_$1=yes,
-kde_cv_func_$1=no)
-CXXFLAGS="$save_CXXFLAGS"
-LIBS=$kde_safe_LIBS
-AC_LANG_RESTORE
-])
-
-AC_MSG_RESULT($kde_cv_func_$1)
-
-AC_MSG_CHECKING([if $1 needs custom prototype])
-AC_CACHE_VAL(kde_cv_proto_$1,
-[
-if test "x$kde_cv_func_$1" = xyes; then
-  kde_cv_proto_$1=no
-else
-  case "$1" in
-	setenv|unsetenv|usleep|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat)
-		kde_cv_proto_$1="yes - in libkdefakes"
-		;;
-	*)
-		kde_cv_proto_$1=unknown
-		;;
-  esac
-fi
-
-if test "x$kde_cv_proto_$1" = xunknown; then
-
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-  kde_safe_libs=$LIBS
-  LIBS="$LIBS $X_EXTRA_LIBS"
-  AC_TRY_LINK([
-$2
-
-extern "C" $4;
-],
-[
-$3
-],
-[ kde_cv_func_$1=yes
-  kde_cv_proto_$1=yes ],
-  [kde_cv_proto_$1="$1 unavailable"]
-)
-LIBS=$kde_safe_libs
-AC_LANG_RESTORE
-fi
-])
-AC_MSG_RESULT($kde_cv_proto_$1)
-
-if test "x$kde_cv_func_$1" = xyes; then
-  AC_DEFINE(HAVE_$5, 1, [Define if you have $1])
-  $6
-fi
-if test "x$kde_cv_proto_$1" = xno; then
-  AC_DEFINE(HAVE_$5_PROTO, 1,
-  [Define if you have the $1 prototype])
-fi
-
-AH_VERBATIM([_HAVE_$5_PROTO],
-[
-#if !defined(HAVE_$5_PROTO)
-#ifdef __cplusplus
-extern "C"
-#endif
-$4;
-#endif
-])
-])
-
-AC_DEFUN(AC_CHECK_SETENV,
-[
-	KDE_CHECK_FUNC_EXT(setenv, [
-#include <stdlib.h>
-], 
-		[setenv("VAR", "VALUE", 1);],
-	        [int setenv (const char *, const char *, int)],
-		[SETENV])
-])
-
-AC_DEFUN(AC_CHECK_UNSETENV,
-[
-	KDE_CHECK_FUNC_EXT(unsetenv, [
-#include <stdlib.h>
-], 
-		[unsetenv("VAR");],
-	        [void unsetenv (const char *)],
-		[UNSETENV])
-])
-
-AC_DEFUN(AC_CHECK_GETDOMAINNAME,
-[
-	KDE_CHECK_FUNC_EXT(getdomainname, [
-#include <stdlib.h>
-#include <unistd.h>
-], 
-		[
-char buffer[200];
-getdomainname(buffer, 200);
-], 	
-	        [int getdomainname (char *, unsigned int)],
-		[GETDOMAINNAME])
-])
-
-AC_DEFUN(AC_CHECK_GETHOSTNAME,
-[
-	KDE_CHECK_FUNC_EXT(gethostname, [
-#include <stdlib.h>
-#include <unistd.h>
-], 
-		[
-char buffer[200];
-gethostname(buffer, 200);
-], 	
-	        [int gethostname (char *, unsigned int)],
-		[GETHOSTNAME])
-])
-
-AC_DEFUN(AC_CHECK_USLEEP,
-[
-	KDE_CHECK_FUNC_EXT(usleep, [
-#include <unistd.h>
-], 
-		[
-usleep(200);
-], 	
-	        [int usleep (unsigned int)],
-		[USLEEP])
-])
-
-
-AC_DEFUN(AC_CHECK_RANDOM,
-[
-	KDE_CHECK_FUNC_EXT(random, [
-#include <stdlib.h>
-], 
-		[
-random();
-], 	
-	        [long int random(void)],
-		[RANDOM])
-
-	KDE_CHECK_FUNC_EXT(srandom, [
-#include <stdlib.h>
-], 
-		[
-srandom(27);
-], 	
-	        [void srandom(unsigned int)],
-		[SRANDOM])
-
-])
-
-AC_DEFUN(AC_CHECK_INITGROUPS,
-[
-	KDE_CHECK_FUNC_EXT(initgroups, [
-#include <sys/types.h>
-#include <unistd.h>
-#include <grp.h>
-],
-	[
-char buffer[200];
-initgroups(buffer, 27);
-],
-	[int initgroups(const char *, gid_t)],
-	[INITGROUPS])
-])
-
-AC_DEFUN(AC_CHECK_MKSTEMP,
-[
-	KDE_CHECK_FUNC_EXT(mkstemp, [
-#include <stdlib.h>
-],
-	[
-mkstemp("/tmp/aaaXXXXXX");
-],
-	[int mkstemp(char *)],
-	[MKSTEMP])
-])
-
-AC_DEFUN(AC_CHECK_MKSTEMPS,
-[
-	KDE_CHECK_FUNC_EXT(mkstemps, [
-#include <stdlib.h>
-#include <unistd.h>
-],
-	[
-mkstemps("/tmp/aaaXXXXXX", 6);
-],
-	[int mkstemps(char *, int)],
-	[MKSTEMPS])
-])
-
-AC_DEFUN(AC_CHECK_RES_INIT,
-[
-  AC_MSG_CHECKING([if res_init needs -lresolv])
-  kde_libs_safe="$LIBS"
-  LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
-  AC_TRY_LINK(
-    [
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#include <resolv.h>
-    ],
-    [
-      res_init(); 
-    ],
-    [
-      LIBRESOLV="-lresolv"
-      AC_MSG_RESULT(yes)
-      AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
-    ],
-    [ AC_MSG_RESULT(no) ]
-  )
-  LIBS="$kde_libs_safe"
-  AC_SUBST(LIBRESOLV)
-
-  AC_MSG_CHECKING([if res_init is available])
-  AC_TRY_COMPILE(
-    [
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#include <resolv.h>
-    ],
-    [
-      res_init();
-    ],
-    [
-      AC_MSG_RESULT(yes)
-      AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
-    ],
-    [ AC_MSG_RESULT(no) ]
-  )
-])
-
-AC_DEFUN(AC_CHECK_STRLCPY,
-[
-	KDE_CHECK_FUNC_EXT(strlcpy, [
-#include <string.h>
-],
-[ char buf[20];
-  strlcpy(buf, "KDE function test", sizeof(buf));
-],
- 	[unsigned long strlcpy(char*, const char*, unsigned long)],
-	[STRLCPY])
-])
-
-AC_DEFUN(AC_CHECK_STRLCAT,
-[
-	KDE_CHECK_FUNC_EXT(strlcat, [
-#include <string.h>
-],
-[ char buf[20];
-  buf[0]='\0';
-  strlcat(buf, "KDE function test", sizeof(buf));
-],
- 	[unsigned long strlcat(char*, const char*, unsigned long)],
-	[STRLCAT])
-])
-
-AC_DEFUN(AC_FIND_GIF,
-   [AC_MSG_CHECKING([for giflib])
-AC_CACHE_VAL(ac_cv_lib_gif,
-[ac_save_LIBS="$LIBS"
-if test "x$kde_use_qt_emb" != "xyes"; then
-LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
-else
-LIBS="$all_libraries -lgif"
-fi
-AC_TRY_LINK(dnl
-[
-#ifdef __cplusplus
-extern "C" {
-#endif
-int GifLastError(void);
-#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.  */
-],
-            [return GifLastError();],
-            eval "ac_cv_lib_gif=yes",
-            eval "ac_cv_lib_gif=no")
-LIBS="$ac_save_LIBS"
-])dnl
-if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then
-  AC_MSG_RESULT(yes)
-  AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif])
-else
-  AC_MSG_ERROR(You need giflib30. Please install the kdesupport package)
-fi
-])
-
-AC_DEFUN(KDE_FIND_JPEG_HELPER,
-[
-AC_MSG_CHECKING([for libjpeg$2])
-AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
-[
-AC_LANG_C
-ac_save_LIBS="$LIBS"
-LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
-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 "C" {
-#endif
-    void jpeg_CreateDecompress(j_decompress_ptr cinfo,
-                                    int version, size_t structsize);
-#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);],
-            eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
-            eval "ac_cv_lib_jpeg_$1=no")
-LIBS="$ac_save_LIBS"
-CFLAGS="$ac_save_CFLAGS"
-])
-
-if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
-  LIBJPEG="$ac_cv_lib_jpeg_$1"
-  AC_MSG_RESULT($ac_cv_lib_jpeg_$1)
-else
-  AC_MSG_RESULT(no)
-  $3
-fi
-
-])
-
-AC_DEFUN(AC_FIND_JPEG,
-[
-dnl first look for libraries
-KDE_FIND_JPEG_HELPER(6b, 6b,
-   KDE_FIND_JPEG_HELPER(normal, [],
-    [
-       LIBJPEG=
-    ]
-   )
-)
-
-dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
-dnl requires system dependent includes loaded before it)
-jpeg_incdirs="$includedir /usr/include /usr/local/include $kde_extra_includes"
-AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
-test "x$jpeg_incdir" = xNO && jpeg_incdir=
-
-dnl if headers _and_ libraries are missing, this is no error, and we
-dnl continue with a warning (the user will get no jpeg support in khtml)
-dnl if only one is missing, it means a configuration error, but we still
-dnl only warn
-if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
-  AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg])
-else
-  if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
-    AC_MSG_WARN([
-There is an installation error in jpeg support. You seem to have only one
-of either the headers _or_ the libraries installed. You may need to either
-provide correct --with-extra-... options, or the development package of
-libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
-Disabling JPEG support.
-])
-  else
-    AC_MSG_WARN([libjpeg not found. disable JPEG support.])
-  fi
-  jpeg_incdir=
-  LIBJPEG=
-fi
-
-AC_SUBST(LIBJPEG)
-AH_VERBATIM(_AC_CHECK_JPEG,
-[/*
- * jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
- * headers and I'm too lazy to write a configure test as long as only
- * unixware is related
- */
-#ifdef _UNIXWARE
-#define HAVE_BOOLEAN
-#endif
-])
-])
-
-AC_DEFUN(KDE_CHECK_QT_JPEG,
-[
-AC_MSG_CHECKING([if Qt needs $LIBJPEG])
-AC_CACHE_VAL(kde_cv_qt_jpeg,
-[
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-ac_save_LIBS="$LIBS"
-LIBS="$all_libraries $USER_LDFLAGS $LIBQT"
-LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
-ac_save_CXXFLAGS="$CXXFLAGS"
-CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
-AC_TRY_LINK(
-[#include <qapplication.h>],
-            [
-            int argc;
-            char** argv;
-            QApplication app(argc, argv);],
-            eval "kde_cv_qt_jpeg=no",
-            eval "kde_cv_qt_jpeg=yes")
-LIBS="$ac_save_LIBS"
-CXXFLAGS="$ac_save_CXXFLAGS"
-AC_LANG_RESTORE
-])
-
-if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then
-  AC_MSG_RESULT(yes)
-  LIBJPEG_QT='$(LIBJPEG)'
-else
-  AC_MSG_RESULT(no)
-  LIBJPEG_QT=
-fi
-
-])
-
-AC_DEFUN(AC_FIND_ZLIB,
-[
-AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
-AC_MSG_CHECKING([for libz])
-AC_CACHE_VAL(ac_cv_lib_z,
-[
-AC_LANG_C
-kde_save_LIBS="$LIBS"
-LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
-kde_save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
-AC_TRY_LINK(dnl
-[
-#include<zlib.h>
-],
-            [return (zlibVersion() == ZLIB_VERSION); ],
-            eval "ac_cv_lib_z='-lz'",
-            eval "ac_cv_lib_z=no")
-LIBS="$kde_save_LIBS"
-CFLAGS="$kde_save_CFLAGS"
-])dnl
-if test ! "$ac_cv_lib_z" = no; then
-  AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
-  LIBZ="$ac_cv_lib_z"
-  AC_SUBST(LIBZ)
-  AC_MSG_RESULT($ac_cv_lib_z)
-else
-  AC_MSG_ERROR(not found. Check your installation and look into config.log)
-  LIBZ=""
-  AC_SUBST(LIBZ)
-fi
-])
-
-AC_DEFUN(KDE_TRY_TIFFLIB,
-[
-AC_MSG_CHECKING([for libtiff $1])
-
-AC_CACHE_VAL(kde_cv_libtiff_$1,
-[
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-kde_save_LIBS="$LIBS"
-if test "x$kde_use_qt_emb" != "xyes"; then
-LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
-else
-LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
-fi
-kde_save_CXXFLAGS="$CXXFLAGS"
-CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
-
-AC_TRY_LINK(dnl
-[
-#include<tiffio.h>
-],
-    [return (TIFFOpen( "", "r") == 0); ],
-[
-    kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ"
-], [
-    kde_cv_libtiff_$1=no
-])
-
-LIBS="$kde_save_LIBS"
-CXXFLAGS="$kde_save_CXXFLAGS"
-AC_LANG_RESTORE
-])
-
-if test "$kde_cv_libtiff_$1" = "no"; then
-    AC_MSG_RESULT(no)
-    LIBTIFF=""
-    $3
-else
-    LIBTIFF="$kde_cv_libtiff_$1"
-    AC_MSG_RESULT(yes)
-    AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff])
-    $2
-fi
-
-])
-
-AC_DEFUN(AC_FIND_TIFF,
-[
-AC_REQUIRE([K_PATH_X])
-AC_REQUIRE([AC_FIND_ZLIB])
-AC_REQUIRE([AC_FIND_JPEG])
-AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
-
-KDE_TRY_TIFFLIB(tiff, [],
-   KDE_TRY_TIFFLIB(tiff34))
-
-AC_SUBST(LIBTIFF)
-])
-
-
-AC_DEFUN(AC_FIND_PNG,
-[
-AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
-AC_REQUIRE([AC_FIND_ZLIB])
-AC_MSG_CHECKING([for libpng])
-AC_CACHE_VAL(ac_cv_lib_png,
-[
-kde_save_LIBS="$LIBS"
-if test "x$kde_use_qt_emb" != "xyes"; then
-LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
-else
-LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
-fi
-kde_save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
-AC_LANG_C
-AC_TRY_LINK(dnl
-    [
-    #include<png.h>
-    ],
-    [
-    png_structp png_ptr = png_create_read_struct(  /* image ptr */
-		PNG_LIBPNG_VER_STRING, 0, 0, 0 );
-    return( png_ptr != 0 );
-    ],
-    eval "ac_cv_lib_png='-lpng $LIBZ -lm'",
-    eval "ac_cv_lib_png=no"
-)
-LIBS="$kde_save_LIBS"
-CFLAGS="$kde_save_CFLAGS"
-])dnl
-if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
-  AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng])
-  LIBPNG="$ac_cv_lib_png"
-  AC_SUBST(LIBPNG)
-  AC_MSG_RESULT($ac_cv_lib_png)
-else
-  AC_MSG_RESULT(no)
-  LIBPNG=""
-  AC_SUBST(LIBPNG)
-fi
-])
-
-AC_DEFUN(AC_CHECK_BOOL,
-[
-  AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
-])
-
-AC_DEFUN(AC_CHECK_GNU_EXTENSIONS,
-[
-AC_MSG_CHECKING(if you need GNU extensions)
-AC_CACHE_VAL(ac_cv_gnu_extensions,
-[
-cat > conftest.c << EOF
-#include <features.h>
-
-#ifdef __GNU_LIBRARY__
-yes
-#endif
-EOF
-
-if (eval "$ac_cpp conftest.c") 2>&5 |
-  egrep "yes" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_gnu_extensions=yes
-else
-  ac_cv_gnu_extensions=no
-fi
-])
-
-AC_MSG_RESULT($ac_cv_gnu_extensions)
-if test "$ac_cv_gnu_extensions" = "yes"; then
-  AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions])
-fi
-])
-
-AC_DEFUN(KDE_CHECK_COMPILER_FLAG,
-[
-AC_MSG_CHECKING(whether $CXX supports -$1)
-kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
-AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
-[
-  AC_LANG_SAVE
-  AC_LANG_CPLUSPLUS
-  save_CXXFLAGS="$CXXFLAGS"
-  CXXFLAGS="$CXXFLAGS -$1"
-  AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
-  CXXFLAGS="$save_CXXFLAGS"
-  AC_LANG_RESTORE
-])
-if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
- AC_MSG_RESULT(yes)
- :
- $2
-else
- AC_MSG_RESULT(no)
- :
- $3
-fi
-])
-
-dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
-dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
-dnl it's all white-space separated
-AC_DEFUN(AC_REMOVE_FORBIDDEN,
-[ __val=$$1
-  __forbid=" $2 "
-  if test -n "$__val"; then
-    __new=""
-    ac_save_IFS=$IFS
-    IFS=" 	"
-    for i in $__val; do
-      case "$__forbid" in
-        *" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;;
-	*) # Careful to not add spaces, where there were none, because otherwise
-	   # libtool gets confused, if we change e.g. CXX
-	   if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
-      esac
-    done
-    IFS=$ac_save_IFS
-    $1=$__new
-  fi
-])
-
-dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
-AC_DEFUN(AC_VALIDIFY_CXXFLAGS,
-[dnl
-if test "x$kde_use_qt_emb" != "xyes"; then
- AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
- AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
-else
- AC_REMOVE_FORBIDDEN(CXX, [-rpath])
- AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
-fi
-])
-
-AC_DEFUN(AC_CHECK_COMPILERS,
-[
-  AC_ARG_ENABLE(debug,[  --enable-debug[=ARG]    enables debug symbols (yes|no|full) [default=no]],
-  [
-    case $enableval in
-      yes)
-        kde_use_debug_code="yes"
-        kde_use_debug_define=no
-        ;;
-      full)
-        kde_use_debug_code="full"
-        kde_use_debug_define=no
-        ;;
-      *)
-        kde_use_debug_code="no"
-        kde_use_debug_define=yes
-        ;;
-    esac
-  ], 
-    [kde_use_debug_code="no"
-      kde_use_debug_define=no
-  ])
-
-  dnl Just for configure --help
-  AC_ARG_ENABLE(dummyoption,[  --disable-debug         disables debug output and debug symbols [default=no]],[],[])
-
-  AC_ARG_ENABLE(strict,[  --enable-strict         compiles with strict compiler options (may not work!)],
-   [
-    if test $enableval = "no"; then
-         kde_use_strict_options="no"
-       else
-         kde_use_strict_options="yes"
-    fi
-   ], [kde_use_strict_options="no"])
-
-  AC_ARG_ENABLE(warnings,[  --disable-warnings      disables compilation with -Wall and similiar],
-   [
-    if test $enableval = "no"; then
-         kde_use_warnings="no"
-       else
-         kde_use_warnings="yes"
-    fi
-   ], [kde_use_warnings="yes"])
-
-  dnl enable warnings for debug build
-  if test "$kde_use_debug_code" != "no"; then
-    kde_use_warnings=yes
-  fi
-
-  AC_ARG_ENABLE(profile,[  --enable-profile        creates profiling infos [default=no]],
-    [kde_use_profiling=$enableval],
-    [kde_use_profiling="no"]
-  )
-
-  AC_ARG_ENABLE(gcov,[  --enable-gcov           enables gcov test coverage support [default=no]],
-    [kde_use_gcov=$enableval],
-    [kde_use_gcov=no]
-  )
-
-  dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
-  CFLAGS=" $CFLAGS"
-
-  AC_PROG_CC 
-
-  AC_PROG_CPP
-
-  if test "$GCC" = "yes"; then
-    if test "$kde_use_debug_code" != "no"; then
-      if test $kde_use_debug_code = "full" || test $kde_use_gcov = "yes"; then
-        CFLAGS="-g3 $CFLAGS"
-      else
-        CFLAGS="-g -O2 $CFLAGS"
-      fi
-    else
-      CFLAGS="-O2 $CFLAGS"
-    fi
-  fi
-
-  if test "$kde_use_debug_define" = "yes"; then
-    CFLAGS="-DNDEBUG $CFLAGS"
-  fi
-
-
-  case "$host" in
-  *-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
-  *-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
-  esac
-
-  if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
-     LDFLAGS=""
-  fi
-
-  CXXFLAGS=" $CXXFLAGS"
-
-  AC_PROG_CXX
-
-  if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
-    if test "$kde_use_debug_code" != "no"; then
-      if test "$CXX" = "KCC"; then
-        CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
-      else
-        if test "$kde_use_debug_code" = "full"; then
-          CXXFLAGS="-g3 $CXXFLAGS"
-        else
-          CXXFLAGS="-g -O2 $CXXFLAGS"
-        fi
-      fi
-      KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
-
-      dnl convenience compiler flags
-      KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
-      AC_SUBST(WOVERLOADED_VIRTUAL)
-    else
-      if test "$CXX" = "KCC"; then
-        CXXFLAGS="+K3 $CXXFLAGS"
-      else
-        CXXFLAGS="-O2 $CXXFLAGS"
-      fi  
-    fi
-  fi
-
-  if test "$kde_use_debug_define" = "yes"; then
-    CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
-  fi  
-
-  if test "$kde_use_profiling" = "yes"; then
-    KDE_CHECK_COMPILER_FLAG(pg,
-    [
-      CFLAGS="-pg $CFLAGS"
-      CXXFLAGS="-pg $CXXFLAGS"
-    ])
-  fi
-
-  if test "$kde_use_gcov" = "yes"; then
-    KDE_CHECK_COMPILER_FLAG(fprofile-arcs,
-    [
-      CFLAGS="-fprofile-arcs -ftest-coverage $CFLAGS"
-      CXXFLAGS="-fprofile-arcs -ftest-coverage $CXXFLAGS"
-    ])
-  fi
-
-  if test "$kde_use_warnings" = "yes"; then
-      if test "$GCC" = "yes"; then
-        case $host in
-          *-*-linux-gnu)	
-            CFLAGS="-ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
-            CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion $CXXFLAGS"
-          ;;
-        esac
-        CXXFLAGS="-Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
-        KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
-        KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
-        KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"])
-     fi
-  fi
-
-  if test "$GCC" = "yes" && test "$kde_use_strict_options" = "yes"; then
-    CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
-  fi
-    
-  if test "$GXX" = "yes"; then
-    KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
-    KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
-    KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS=	)
-  fi
-  if test "$CXX" = "KCC"; 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="$CXXFLAGS --no_exceptions"])
-    dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS=	)
-
-    AC_ARG_ENABLE(pch,[  --enable-pch            enables precompiled header support (currently only KCC) [default=no]],
-    [
-      kde_use_pch=$enableval
-    ],[kde_use_pch=no])
- 
-    if test "$kde_use_pch" = "yes"; then
-      dnl TODO: support --pch-dir!
-      KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
-      dnl the below works (but the dir must exist), but it's
-      dnl useless for a whole package.
-      dnl The are precompiled headers for each source file, so when compiling
-      dnl from scratch, it doesn't make a difference, and they take up
-      dnl around ~5Mb _per_ sourcefile.
-      dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
-      dnl   [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
-    fi
-    dnl this flag controls inlining. by default KCC inlines in optimisation mode
-    dnl all implementations that are defined inside the class {} declaration. 
-    dnl because of templates-compatibility with broken gcc compilers, this
-    dnl can cause excessive inlining. This flag limits it to a sane level
-    KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
-    KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
-    KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
-    KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
-    dnl Some source files are shared between multiple executables
-    dnl (or libraries) and some of those need template instantiations.
-    dnl In that case KCC needs to compile those sources with
-    dnl --one_instantiation_per_object.  To make it easy for us we compile
-    dnl _all_ objects with that flag (--one_per is a shorthand).
-    KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
-  fi
-  AC_SUBST(USE_EXCEPTIONS)
-  dnl obsolete macro - provided to keep things going
-  USE_RTTI=
-  AC_SUBST(USE_RTTI)
-
-  case "$host" in
-      *-*-irix*)  test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
-      *-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
-      *-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
-      *-*-solaris*) 
-        if test "$GXX" = yes; then
-          libstdcpp=`$CXX -print-file-name=libstdc++.so`
-          if test ! -f $libstdcpp; then
-             AC_MSG_ERROR([You've compiled gcc without --enable-shared. This doesn't work with KDE. Please recompile gcc with --enable-shared to receive a libstdc++.so])
-          fi
-        fi
-        ;;
-  esac
-
-  AC_VALIDIFY_CXXFLAGS
-
-  AC_PROG_CXXCPP
-
-  if test "$GCC" = yes; then
-     NOOPT_CXXFLAGS=-O0
-     NOOPT_CFLAGS=-O0
-  fi
-
-  AC_SUBST(NOOPT_CXXFLAGS)
-  AC_SUBST(NOOPT_CFLAGS)
-
-  KDE_CHECK_FINAL
-
-  ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
-])
-
-AC_DEFUN(KDE_ADD_DEPENDENCIES,
-[
-   [A]M_DEPENDENCIES(CC)
-   [A]M_DEPENDENCIES(CXX)
-])
-
-dnl just a wrapper to clean up configure.in
-AC_DEFUN(KDE_PROG_LIBTOOL,
-[
-AC_REQUIRE([AC_CHECK_COMPILERS])
-AC_REQUIRE([AC_ENABLE_SHARED])
-AC_REQUIRE([AC_ENABLE_STATIC])
-
-AC_REQUIRE([AC_LIBTOOL_DLOPEN])
-AC_REQUIRE([KDE_CHECK_LIB64])
-
-AC_LANG_SAVE
-AC_LANG_C
-AC_OBJEXT
-AC_EXEEXT
-AC_LANG_RESTORE
-
-AM_PROG_LIBTOOL
-AC_LIBTOOL_CXX
-
-LIBTOOL_SHELL="/bin/sh ./libtool"
-#  LIBTOOL="$LIBTOOL --silent"
-KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
-AC_SUBST(KDE_PLUGIN)
-
-AC_ARG_ENABLE(objprelink, [  --enable-objprelink     prelink apps using objprelink (obsolete)],
-       kde_use_objprelink=$enableval, kde_use_objprelink=no)
-  if test "x$kde_use_objprelink" = "xyes"; then 
-        AC_MSG_WARN([
-------------------------------------------------------------
-Configuration option --enable-objprelink is no longer useful.
-See http:://objprelink.sourceforge.net for details:
-1- Recent binutils are fast enough to do without objprelink.
-2- Newer versions of objprelink do not need this option.
-------------------------------------------------------------
-])
-  fi
-])
-
-AC_DEFUN(KDE_CHECK_LIB64,
-[
-    kdelibsuff=none
-    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 "$kdelibsuff" = "none"; then
-       kdelibsuff=
-    fi
-    if test -z "$kdelibsuff"; then
-        AC_MSG_RESULT([not using lib directory suffix])
-        AC_DEFINE(KDELIBSUFF, [""], Suffix for lib directories)
-    else
-        if test "$libdir" = '${exec_prefix}/lib'; then
-            libdir="$libdir${kdelibsuff}"
-            AC_SUBST([libdir], ["$libdir"])  dnl ugly hack for lib64 platforms
-        fi
-        AC_DEFINE_UNQUOTED(KDELIBSUFF, ["\"${kdelibsuff}\""], Suffix for lib directories)
-        AC_MSG_RESULT([using lib directory suffix $kdelibsuff])
-    fi
-])
-
-AC_DEFUN(KDE_CHECK_TYPES,
-[  AC_CHECK_SIZEOF(int, 4)dnl
-  AC_CHECK_SIZEOF(long, 4)dnl
-  AC_CHECK_SIZEOF(char *, 4)dnl
-  AC_CHECK_SIZEOF(char, 1)dnl
-])dnl
-
-AC_DEFUN(KDE_DO_IT_ALL,
-[
-AC_CANONICAL_SYSTEM
-AC_ARG_PROGRAM
-AM_INIT_AUTOMAKE($1, $2)
-AM_DISABLE_LIBRARIES
-AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
-AC_CHECK_COMPILERS
-KDE_PROG_LIBTOOL
-AM_KDE_WITH_NLS
-AC_PATH_KDE
-])
-
-AC_DEFUN(AC_CHECK_RPATH,
-[
-AC_MSG_CHECKING(for rpath)
-AC_ARG_ENABLE(rpath,
-      [  --disable-rpath         do not use the rpath feature of ld],
-      USE_RPATH=$enableval, USE_RPATH=yes)
-
-if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
-
-  KDE_RPATH="-R \$(kde_libraries)"
-
-  if test -n "$qt_libraries"; then
-    KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
-  fi
-  dnl $x_libraries is set to /usr/lib in case
-  if test -n "$X_LDFLAGS"; then
-    KDE_RPATH="$KDE_RPATH -R \$(x_libraries)"
-  fi
-  if test -n "$KDE_EXTRA_RPATH"; then
-    KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
-  fi
-fi
-AC_SUBST(KDE_EXTRA_RPATH)
-AC_SUBST(KDE_RPATH)
-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 <sys/types.h>
-#include <sys/socket.h>
-      ],[
-socklen_t a=0;
-getsockname(0,(struct sockaddr*)0, &a);
-      ],
-      ac_cv_socklen_t=socklen_t,
-      AC_TRY_COMPILE([
-#include <sys/types.h>
-#include <sys/socket.h>
-        ],[
-int a=0;
-getsockname(0,(struct sockaddr*)0, &a);
-        ],
-        ac_cv_socklen_t=int,
-        ac_cv_socklen_t=size_t
-      )
-    )
-    AC_LANG_RESTORE
-  ])
-
-  AC_MSG_RESULT($ac_cv_socklen_t)
-  if test "$ac_cv_socklen_t" != "socklen_t"; 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])
-
-])
-
-dnl This is a merge of some macros out of the gettext aclocal.m4
-dnl since we don't need anything, I took the things we need
-dnl the copyright for them is:
-dnl >
-dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
-dnl This Makefile.in is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-dnl >
-dnl for this file it is relicensed under LGPL
-
-AC_DEFUN(AM_KDE_WITH_NLS,
-  [
-    dnl If we use NLS figure out what method
-
-    AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt,
-        [test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt)
-    AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
-
-     if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then
-        AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it])
-        GMSGFMT=":"
-      fi
-      MSGFMT=$GMSGFMT
-      AC_SUBST(GMSGFMT)
-      AC_SUBST(MSGFMT)
-
-      AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext,
-	[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
-
-      dnl Test whether we really found GNU xgettext.
-      if test "$XGETTEXT" != ":"; then
-	dnl If it is no GNU xgettext we define it as : so that the
-	dnl Makefiles still can work.
-	if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
-	  : ;
-	else
-	  AC_MSG_RESULT(
-	    [found xgettext programs is not GNU xgettext; ignore it])
-	  XGETTEXT=":"
-	fi
-      fi
-     AC_SUBST(XGETTEXT)
-
-  ])
-
-# Search path for a program which passes the given test.
-# Ulrich Drepper <drepper at cygnus.com>, 1996.
-
-# serial 1
-# Stephan Kulow: I appended a _KDE against name conflicts
-
-dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR,
-dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
-AC_DEFUN(AM_PATH_PROG_WITH_TEST_KDE,
-[# Extract the first word of "$2", so it can be a program name with args.
-set dummy $2; ac_word=[$]2
-AC_MSG_CHECKING([for $ac_word])
-AC_CACHE_VAL(ac_cv_path_$1,
-[case "[$]$1" in
-  /*)
-  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in ifelse([$5], , $PATH, [$5]); do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if [$3]; then
-	ac_cv_path_$1="$ac_dir/$ac_word"
-	break
-      fi
-    fi
-  done
-  IFS="$ac_save_ifs"
-dnl If no 4th arg is given, leave the cache variable unset,
-dnl so AC_PATH_PROGS will keep looking.
-ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
-])dnl
-  ;;
-esac])dnl
-$1="$ac_cv_path_$1"
-if test -n "[$]$1"; then
-  AC_MSG_RESULT([$]$1)
-else
-  AC_MSG_RESULT(no)
-fi
-AC_SUBST($1)dnl
-])
-
-
-# Check whether LC_MESSAGES is available in <locale.h>.
-# Ulrich Drepper <drepper at cygnus.com>, 1995.
-
-# serial 1
-
-AC_DEFUN(AM_LC_MESSAGES,
-  [if test $ac_cv_header_locale_h = yes; then
-    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
-      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
-       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
-    if test $am_cv_val_LC_MESSAGES = yes; then
-      AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES])
-    fi
-  fi])
-
-dnl From Jim Meyering.
-dnl FIXME: migrate into libit.
-
-AC_DEFUN([AM_FUNC_OBSTACK],
-[AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
- [AC_TRY_LINK([#include "obstack.h"],
-	      [struct obstack *mem;obstack_free(mem,(char *) 0)],
-	      am_cv_func_obstack=yes,
-	      am_cv_func_obstack=no)])
- if test $am_cv_func_obstack = yes; then
-   AC_DEFINE(HAVE_OBSTACK)
- else
-   LIBOBJS="$LIBOBJS obstack.o"
- fi
-])
-
-dnl From Jim Meyering.  Use this if you use the GNU error.[ch].
-dnl FIXME: Migrate into libit
-
-AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
-[AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
- [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
-              am_cv_lib_error_at_line=yes,
-	      am_cv_lib_error_at_line=no)])
- if test $am_cv_lib_error_at_line = no; then
-   LIBOBJS="$LIBOBJS error.o"
- fi
- AC_SUBST(LIBOBJS)dnl
-])
-
-# Macro to add for using GNU gettext.
-# Ulrich Drepper <drepper at cygnus.com>, 1995.
-
-# serial 1
-# Stephan Kulow: I put a KDE in it to avoid name conflicts
-
-AC_DEFUN(AM_KDE_GNU_GETTEXT,
-  [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-   AC_REQUIRE([AC_PROG_RANLIB])dnl
-   AC_REQUIRE([AC_HEADER_STDC])dnl
-   AC_REQUIRE([AC_TYPE_OFF_T])dnl
-   AC_REQUIRE([AC_TYPE_SIZE_T])dnl
-   AC_REQUIRE([AC_FUNC_ALLOCA])dnl
-   AC_REQUIRE([AC_FUNC_MMAP])dnl
-   AC_REQUIRE([AM_KDE_WITH_NLS])dnl
-   AC_CHECK_HEADERS([limits.h locale.h nl_types.h string.h values.h alloca.h])
-   AC_CHECK_FUNCS([getcwd munmap putenv setlocale strchr strcasecmp \
-__argz_count __argz_stringify __argz_next])
-
-   AC_MSG_CHECKING(for stpcpy)
-   AC_CACHE_VAL(kde_cv_func_stpcpy,
-   [
-   kde_safe_cxxflags=$CXXFLAGS
-   CXXFLAGS="-Wmissing-prototypes -Werror"
-   AC_LANG_SAVE
-   AC_LANG_CPLUSPLUS
-   AC_TRY_COMPILE([
-   #include <string.h>
-   ],
-   [
-   char buffer[200];
-   stpcpy(buffer, buffer);
-   ],
-   kde_cv_func_stpcpy=yes,
-   kde_cv_func_stpcpy=no)
-   AC_LANG_RESTORE
-   CXXFLAGS=$kde_safe_cxxflags
-   ])
-   AC_MSG_RESULT($kde_cv_func_stpcpy)
-   if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then
-     AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy])
-   fi
-
-   AM_LC_MESSAGES
-
-   if test "x$CATOBJEXT" != "x"; then
-     if test "x$ALL_LINGUAS" = "x"; then
-       LINGUAS=
-     else
-       AC_MSG_CHECKING(for catalogs to be installed)
-       NEW_LINGUAS=
-       for lang in ${LINGUAS=$ALL_LINGUAS}; do
-         case "$ALL_LINGUAS" in
-          *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
-         esac
-       done
-       LINGUAS=$NEW_LINGUAS
-       AC_MSG_RESULT($LINGUAS)
-     fi
-
-     dnl Construct list of names of catalog files to be constructed.
-     if test -n "$LINGUAS"; then
-       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
-     fi
-   fi
-
-  ])
-
-AC_DEFUN(AC_HAVE_XPM,
- [AC_REQUIRE_CPP()dnl
-  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
-
- test -z "$XPM_LDFLAGS" && XPM_LDFLAGS=
- test -z "$XPM_INCLUDE" && XPM_INCLUDE=
-
- AC_ARG_WITH(xpm, [  --without-xpm           disable color pixmap XPM tests],
-	xpm_test=$withval, xpm_test="yes")
- if test "x$xpm_test" = xno; then
-   ac_cv_have_xpm=no
- else
-   AC_MSG_CHECKING(for XPM)
-   AC_CACHE_VAL(ac_cv_have_xpm,
-   [
-    AC_LANG_C
-    ac_save_ldflags="$LDFLAGS"
-    ac_save_cflags="$CFLAGS"
-    if test "x$kde_use_qt_emb" != "xyes"; then
-      LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
-    else
-      LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
-    fi
-    CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
-    test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
-    AC_TRY_LINK([#include <X11/xpm.h>],[],
-	ac_cv_have_xpm="yes",ac_cv_have_xpm="no")
-    LDFLAGS="$ac_save_ldflags"
-    CFLAGS="$ac_save_cflags"
-   ])dnl
-
-  if test "$ac_cv_have_xpm" = no; then
-    AC_MSG_RESULT(no)
-    XPM_LDFLAGS=""
-    XPMINC=""
-    $2
-  else
-    AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support])
-    if test "$XPM_LDFLAGS" = ""; then
-       XPMLIB='-lXpm $(LIB_X11)'
-    else
-       XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)'
-    fi
-    if test "$XPM_INCLUDE" = ""; then
-       XPMINC=""
-    else
-       XPMINC="-I$XPM_INCLUDE"
-    fi
-    AC_MSG_RESULT(yes)
-    $1
-  fi
- fi
- AC_SUBST(XPMINC)
- AC_SUBST(XPMLIB)
-])
-
-AC_DEFUN(AC_HAVE_DPMS,
- [AC_REQUIRE_CPP()dnl
-  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
-
- test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS=
- test -z "$DPMS_INCLUDE" && DPMS_INCLUDE=
- DPMS_LIB=
-
- AC_ARG_WITH(dpms, [  --without-dpms          disable DPMS power saving],
-	dpms_test=$withval, dpms_test="yes")
- if test "x$dpms_test" = xno; then
-   ac_cv_have_dpms=no
- else
-   AC_MSG_CHECKING(for DPMS)
-   dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms.
-   dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
-   AC_CACHE_VAL(ac_cv_have_dpms,
-   [
-    if test "x$kde_use_qt_emb" = "xyes"; then
-      AC_MSG_RESULT(no)
-      ac_cv_have_dpms="no"
-    else
-      AC_LANG_C
-      ac_save_ldflags="$LDFLAGS"
-      ac_save_cflags="$CFLAGS"
-      ac_save_libs="$LIBS"
-      LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
-      CFLAGS="$CFLAGS $X_INCLUDES"
-      test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
-      AC_TRY_LINK([
-	  #include <X11/Xproto.h>
-	  #include <X11/X.h>
-	  #include <X11/Xlib.h>
-	  #include <X11/extensions/dpms.h>
-	  int foo_test_dpms()
-	  { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
-	  ac_cv_have_dpms="yes", [
-              LDFLAGS="$ac_save_ldflags"
-              CFLAGS="$ac_save_cflags"
-              LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
-              LIBS="$LIBS -lXdpms"
-              CFLAGS="$CFLAGS $X_INCLUDES"
-              test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
-              AC_TRY_LINK([
-	          #include <X11/Xproto.h>
-        	  #include <X11/X.h>
-        	  #include <X11/Xlib.h>
-        	  #include <X11/extensions/dpms.h>
-        	  int foo_test_dpms()
-        	  { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
-        	  [
-                  ac_cv_have_dpms="-lXdpms"
-                  ],ac_cv_have_dpms="no")
-              ])
-      LDFLAGS="$ac_save_ldflags"
-      CFLAGS="$ac_save_cflags"
-      LIBS="$ac_save_libs"
-    fi
-   ])dnl
-
-  if test "$ac_cv_have_dpms" = no; then
-    AC_MSG_RESULT(no)
-    DPMS_LDFLAGS=""
-    DPMSINC=""
-    $2
-  else
-    AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support])
-    if test "$ac_cv_have_dpms" = "-lXdpms"; then
-       DPMS_LIB="-lXdpms"
-    fi
-    if test "$DPMS_LDFLAGS" = ""; then
-       DPMSLIB="$DPMS_LIB "'$(LIB_X11)'
-    else
-       DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)'
-    fi
-    if test "$DPMS_INCLUDE" = ""; then
-       DPMSINC=""
-    else
-       DPMSINC="-I$DPMS_INCLUDE"
-    fi
-    AC_MSG_RESULT(yes)
-    $1
-  fi
- fi
- AC_SUBST(DPMSINC)
- AC_SUBST(DPMSLIB)
-])
-
-AC_DEFUN(AC_HAVE_GL,
- [AC_REQUIRE_CPP()dnl
-  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
-
- test -z "$GL_LDFLAGS" && GL_LDFLAGS=
- test -z "$GL_INCLUDE" && GL_INCLUDE=
-
- AC_ARG_WITH(gl, [  --without-gl            disable 3D GL modes],
-	gl_test=$withval, gl_test="yes")
- if test "x$kde_use_qt_emb" = "xyes"; then
-   # GL and Qt Embedded is a no-go for now.
-   ac_cv_have_gl=no
- elif test "x$gl_test" = xno; then
-   ac_cv_have_gl=no
- else
-   AC_MSG_CHECKING(for GL)
-   AC_CACHE_VAL(ac_cv_have_gl,
-   [
-    AC_LANG_SAVE
-    AC_LANG_CPLUSPLUS
-    ac_save_ldflags="$LDFLAGS"
-    ac_save_cxxflags="$CXXFLAGS"
-    LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU"
-    test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
-    LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
-    CXXFLAGS="$CFLAGS $X_INCLUDES"
-    test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
-    AC_TRY_LINK([#include <GL/gl.h>
-#include <GL/glu.h>
-], [],
-	ac_cv_have_gl="mesa", ac_cv_have_gl="no")
-    if test "x$ac_cv_have_gl" = "xno"; then
-      LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGLU -lGL"
-      test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
-      LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
-      CXXFLAGS="$ac_save_cflags $X_INCLUDES"
-      test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
-      AC_TRY_LINK([#include <GL/gl.h>
-#include <GL/glu.h>
-], [],
-	  ac_cv_have_gl="yes", ac_cv_have_gl="no")
-    fi
-    AC_LANG_RESTORE
-    LDFLAGS="$ac_save_ldflags"
-    CXXFLAGS="$ac_save_cxxflags"
-   ])dnl
-
-  if test "$ac_cv_have_gl" = "no"; then
-    AC_MSG_RESULT(no)
-    GL_LDFLAGS=""
-    GLINC=""
-    $2
-  else
-    AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
-    if test "$GL_LDFLAGS" = ""; then
-       if test "$ac_cv_have_gl" = "mesa"; then
-          GLLIB='-lMesaGLU -lMesaGL $(LIB_X11)'
-       else
-          GLLIB='-lGLU -lGL $(LIB_X11)'
-       fi
-    else
-       if test "$ac_cv_have_gl" = "mesa"; then
-          GLLIB="$GL_LDFLAGS -lMesaGLU -lMesaGL "'$(LIB_X11)'
-       else
-          GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)'
-       fi
-    fi
-    if test "$GL_INCLUDE" = ""; then
-       GLINC=""
-    else
-       GLINC="-I$GL_INCLUDE"
-    fi
-    AC_MSG_RESULT($ac_cv_have_gl)
-    $1
-  fi
- fi
- AC_SUBST(GLINC)
- AC_SUBST(GLLIB)
-])
-
-
- dnl shadow password and PAM magic - maintained by ossi at kde.org
-
-AC_DEFUN(KDE_PAM, [
-  AC_REQUIRE([KDE_CHECK_LIBDL])
-
-  AC_ARG_WITH(pam,
-    [  --with-pam[=ARG]        enable support for PAM: ARG=[yes|no|service name]],
-    [ if test "x$withval" = "xyes"; then
-        use_pam=yes
-        pam_service=kde
-      elif test "x$withval" = "xno"; then
-        use_pam=no
-      else
-        use_pam=yes
-        pam_service=$withval
-      fi
-      ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
-    ], [
-      AC_CACHE_VAL(ac_cv_path_pam,
-        [ use_pam=no
-          AC_CHECK_LIB(pam, pam_start,
-            [ AC_CHECK_HEADER(security/pam_appl.h,
-                [ use_pam=yes
-                  pam_service=kde ]) 
-            ], , $LIBDL)
-          ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
-        ])
-    ])
-  eval "$ac_cv_path_pam"
-
-  AC_MSG_CHECKING(for PAM)
-  if test "x$use_pam" = xno; then
-    AC_MSG_RESULT(no)
-    PAMLIBS=""
-  else
-    AC_MSG_RESULT(yes)
-    AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
-    PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
-
-    dnl test whether struct pam_message is const (Linux) or not (Sun)
-    AC_MSG_CHECKING(for const pam_message)
-    AC_EGREP_HEADER([struct pam_message], security/pam_appl.h,
-      [ AC_EGREP_HEADER([const struct pam_message], security/pam_appl.h,
-                        [AC_MSG_RESULT([const: Linux-type PAM])],
-                        [AC_MSG_RESULT([nonconst: Sun-type PAM])
-                        AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
-                        )],
-      [AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
-  fi
-
-  AC_SUBST(PAMLIBS)
-])
-
-dnl DEF_PAM_SERVICE(arg name, full name, define name)
-AC_DEFUN(DEF_PAM_SERVICE, [
-  AC_ARG_WITH($1-pam,
-    [  --with-$1-pam=[val]    override PAM service from --with-pam for $2],
-    [ if test "x$use_pam" = xyes; then
-        $3_PAM_SERVICE="$withval"
-      else
-        AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
-You may want to enforce it by using --with-pam.])
-      fi
-    ], 
-    [ if test "x$use_pam" = xyes; then
-        $3_PAM_SERVICE="$pam_service"
-      fi
-    ])
-    if test -n "$$3_PAM_SERVICE"; then
-      AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
-      AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
-    fi
-    AC_SUBST($3_PAM_SERVICE)
-])
-
-AC_DEFUN(KDE_SHADOWPASSWD, [
-  AC_REQUIRE([KDE_PAM])
-
-  AC_CHECK_LIB(shadow, getspent,
-    [ LIBSHADOW="-lshadow"
-      ac_use_shadow=yes
-    ],
-    [ dnl for UnixWare
-      AC_CHECK_LIB(gen, getspent, 
-        [ LIBGEN="-lgen"
-          ac_use_shadow=yes
-        ], 
-        [ AC_CHECK_FUNC(getspent, 
-            [ ac_use_shadow=yes ],
-            [ ac_use_shadow=no ])
-	])
-    ])
-  AC_SUBST(LIBSHADOW)
-  AC_SUBST(LIBGEN)
-  
-  AC_MSG_CHECKING([for shadow passwords])
-
-  AC_ARG_WITH(shadow,
-    [  --with-shadow		  If you want shadow password support ],
-    [ if test "x$withval" != "xno"; then
-        use_shadow=yes
-      else
-        use_shadow=no
-      fi
-    ], [
-      use_shadow="$ac_use_shadow"
-    ])
-
-  if test "x$use_shadow" = xyes; then
-    AC_MSG_RESULT(yes)
-    AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
-  else
-    AC_MSG_RESULT(no)
-    LIBSHADOW=
-    LIBGEN=
-  fi
-
-  dnl finally make the relevant binaries setuid root, if we have shadow passwds.
-  dnl this still applies, if we could use it indirectly through pam.
-  if test "x$use_shadow" = xyes || 
-     ( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
-      case $host in
-      *-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
-	SETUIDFLAGS="-m 4755 -o root";;
-      *)
-	SETUIDFLAGS="-m 4755";;
-      esac
-  fi
-  AC_SUBST(SETUIDFLAGS)
-
-])
-
-AC_DEFUN(KDE_PASSWDLIBS, [
-  AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
-  AC_REQUIRE([KDE_PAM])
-  AC_REQUIRE([KDE_SHADOWPASSWD])
-
-  if test "x$use_pam" = "xyes"; then 
-    PASSWDLIBS="$PAMLIBS"
-  else
-    PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
-  fi
-
-  dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
-  dnl /etc/master.passwd holds the actual passwords.  /etc/master.passwd requires
-  dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
-  dnl may need to read /etc/master.passwd).
-  case $host in
-  *-*-freebsd*)
-    SETUIDFLAGS="-m 4755 -o root"
-    ;;
-  *)
-    ;;
-  esac
-
-  AC_SUBST(PASSWDLIBS)
-])
-
-AC_DEFUN(KDE_CHECK_LIBDL,
-[
-AC_CHECK_LIB(dl, dlopen, [
-LIBDL="-ldl"
-ac_cv_have_dlfcn=yes
-])
-
-AC_CHECK_LIB(dld, shl_unload, [
-LIBDL="-ldld"
-ac_cv_have_shload=yes
-])
-
-AC_SUBST(LIBDL)
-])
-
-AC_DEFUN(KDE_CHECK_DLOPEN,
-[
-KDE_CHECK_LIBDL
-AC_CHECK_HEADERS(dlfcn.h dl.h)
-if test "$ac_cv_header_dlfcn_h" = "no"; then
-  ac_cv_have_dlfcn=no
-fi
-
-if test "$ac_cv_header_dl_h" = "no"; then
-  ac_cv_have_shload=no
-fi
-
-dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
-dnl (MM)
-AC_ARG_ENABLE(dlopen,
-[  --disable-dlopen        link statically [default=no]] ,
-enable_dlopen=$enableval,
-enable_dlopen=yes)
-
-# override the user's opinion, if we know it better ;)
-if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then
-  enable_dlopen=no
-fi
-
-if test "$ac_cv_have_dlfcn" = "yes"; then
-  AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn])
-fi
-
-if test "$ac_cv_have_shload" = "yes"; then
-  AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload])
-fi
-
-if test "$enable_dlopen" = no ; then
-  test -n "$1" && eval $1
-else
-  test -n "$2" && eval $2
-fi
-
-])
-
-AC_DEFUN(KDE_CHECK_DYNAMIC_LOADING,
-[
-KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no)
-KDE_PROG_LIBTOOL
-AC_MSG_CHECKING([dynamic loading])
-eval "`egrep '^build_libtool_libs=' libtool`"
-if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then
-  dynamic_loading=yes
-  AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING)
-else
-  dynamic_loading=no
-fi
-AC_MSG_RESULT($dynamic_loading)
-if test "$dynamic_loading" = "yes"; then
-  $1
-else
-  $2
-fi
-])
-
-AC_DEFUN(KDE_ADD_INCLUDES,
-[
-if test -z "$1"; then
-  test_include="Pix.h"
-else
-  test_include="$1"
-fi
-
-AC_MSG_CHECKING([for libg++ ($test_include)])
-
-AC_CACHE_VAL(kde_cv_libgpp_includes,
-[
-kde_cv_libgpp_includes=no
-
-   for ac_dir in               \
-                               \
-     /usr/include/g++          \
-     /usr/include              \
-     /usr/unsupported/include  \
-     /opt/include              \
-     $extra_include            \
-     ; \
-   do
-     if test -r "$ac_dir/$test_include"; then
-       kde_cv_libgpp_includes=$ac_dir
-       break
-     fi
-   done
-])
-
-AC_MSG_RESULT($kde_cv_libgpp_includes)
-if test "$kde_cv_libgpp_includes" != "no"; then
-  all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES"
-fi
-])
-])
-
-
-AC_DEFUN(KDE_CHECK_MICO,
-[
-AC_REQUIRE([KDE_CHECK_LIBDL])
-AC_REQUIRE([KDE_MISC_TESTS])
-AC_MSG_CHECKING(for MICO)
-
-if test -z "$MICODIR"; then
-    kde_micodir=/usr/local
- else
-    kde_micodir="$MICODIR"
-fi
-
-AC_ARG_WITH(micodir,
-  [  --with-micodir=micodir  where mico is installed ],
-  kde_micodir=$withval,
-  kde_micodir=$kde_micodir
-)
-
-AC_CACHE_VAL(kde_cv_mico_incdir,
-[
-  mico_incdirs="$kde_micodir/include /usr/include /usr/local/include /usr/local/include /opt/local/include $kde_extra_includes"
-AC_FIND_FILE(CORBA.h, $mico_incdirs, kde_cv_mico_incdir)
-
-])
-kde_micodir=`echo $kde_cv_mico_incdir | sed -e 's#/include##'`
-
-if test ! -r  $kde_micodir/include/CORBA.h; then
-  AC_MSG_ERROR([No CORBA.h found, specify another micodir])
-fi
-
-AC_MSG_RESULT($kde_micodir)
-
-MICO_INCLUDES=-I$kde_micodir/include
-AC_SUBST(MICO_INCLUDES)
-MICO_LDFLAGS=-L$kde_micodir/lib
-AC_SUBST(MICO_LDFLAGS)
-micodir=$kde_micodir
-AC_SUBST(micodir)
-
-AC_MSG_CHECKING([for MICO version])
-AC_CACHE_VAL(kde_cv_mico_version,
-[
-AC_LANG_C
-cat >conftest.$ac_ext <<EOF
-#include <stdio.h>
-#include <mico/version.h>
-int main() {
-
-   printf("MICO_VERSION=%s\n",MICO_VERSION);
-   return (0);
-}
-EOF
-ac_compile='${CC-gcc} $CFLAGS $MICO_INCLUDES conftest.$ac_ext -o conftest'
-if AC_TRY_EVAL(ac_compile); then
-  if eval `./conftest 2>&5`; then
-    kde_cv_mico_version=$MICO_VERSION
-  else
-    AC_MSG_ERROR([your system is not able to execute a small application to
-    find MICO version! Check $kde_micodir/include/mico/version.h])
-  fi
-else
-  AC_MSG_ERROR([your system is not able to compile a small application to
-  find MICO version! Check $kde_micodir/include/mico/version.h])
-fi
-])
-
-dnl installed MICO version
-mico_v_maj=`echo $kde_cv_mico_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
-mico_v_mid=`echo $kde_cv_mico_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
-mico_v_min=`echo $kde_cv_mico_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
-
-if test "x$1" = "x"; then
- req_version="2.3.0"
-else
- req_version=$1
-fi
-
-dnl required MICO version
-req_v_maj=`echo $req_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
-req_v_mid=`echo $req_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
-req_v_min=`echo $req_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
-
-if test "$mico_v_maj" -lt "$req_v_maj" || \
-   ( test "$mico_v_maj" -eq "$req_v_maj" && \
-        test "$mico_v_mid" -lt "$req_v_mid" ) || \
-   ( test "$mico_v_mid" -eq "$req_v_mid" && \
-        test "$mico_v_min" -lt "$req_v_min" )
-
-then
-  AC_MSG_ERROR([found MICO version $kde_cv_mico_version but version $req_version \
-at least is required. You should upgrade MICO.])
-else
-  AC_MSG_RESULT([$kde_cv_mico_version (minimum version $req_version, ok)])
-fi
-
-LIBMICO="-lmico$kde_cv_mico_version $LIBCRYPT $LIBSOCKET $LIBDL"
-AC_SUBST(LIBMICO)
-if test -z "$IDL"; then
-  IDL='$(kde_bindir)/cuteidl'
-fi
-AC_SUBST(IDL)
-IDL_DEPENDENCIES='$(kde_includes)/CUTE.h'
-AC_SUBST(IDL_DEPENDENCIES)
-
-idldir="\$(includedir)/idl"
-AC_SUBST(idldir)
-
-])
-
-AC_DEFUN(KDE_CHECK_MINI_STL,
-[
-AC_REQUIRE([KDE_CHECK_MICO])
-
-AC_MSG_CHECKING(if we use mico's mini-STL)
-AC_CACHE_VAL(kde_cv_have_mini_stl,
-[
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-kde_save_cxxflags="$CXXFLAGS"
-CXXFLAGS="$CXXFLAGS $MICO_INCLUDES"
-AC_TRY_COMPILE(
-[
-#include <mico/config.h>
-],
-[
-#ifdef HAVE_MINI_STL
-#error "nothing"
-#endif
-],
-kde_cv_have_mini_stl=no,
-kde_cv_have_mini_stl=yes)
-CXXFLAGS="$kde_save_cxxflags"
-AC_LANG_RESTORE
-])
-
-if test "x$kde_cv_have_mini_stl" = "xyes"; then
-   AC_MSG_RESULT(yes)
-   $1
-else
-   AC_MSG_RESULT(no)
-   $2
-fi
-])
-
-])
-
-
-AC_DEFUN(KDE_CHECK_LIBPTHREAD,
-[
-AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"] )
-AC_SUBST(LIBPTHREAD)
-])
-
-AC_DEFUN(KDE_CHECK_PTHREAD_OPTION,
-[
-    AC_ARG_ENABLE(kernel-threads, [  --enable-kernel-threads Enable the use of the LinuxThreads port on FreeBSD/i386 only.],
-	kde_use_kernthreads=$enableval, kde_use_kernthreads=no)
-
-    if test "$kde_use_kernthreads" = "yes"; then
-      ac_save_CXXFLAGS="$CXXFLAGS"
-      ac_save_CFLAGS="$CFLAGS"
-      CXXFLAGS="-I/usr/local/include/pthread/linuxthreads $CXXFLAGS"
-      CFLAGS="-I/usr/local/include/pthread/linuxthreads $CFLAGS"
-      AC_CHECK_HEADERS(pthread/linuxthreads/pthread.h)
-      CXXFLAGS="$ac_save_CXXFLAGS"
-      CFLAGS="$ac_save_CFLAGS"
-      if test "$ac_cv_header_pthread_linuxthreads_pthread_h" = "no"; then
-        kde_use_kernthreads=no
-      else
-        dnl Add proper -I and -l statements
-        AC_CHECK_LIB(lthread, pthread_join, [LIBPTHREAD="-llthread -llgcc_r"]) dnl for FreeBSD
-        if test "x$LIBPTHREAD" = "x"; then
-          kde_use_kernthreads=no
-        else
-          USE_THREADS="-D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads"
-        fi
-      fi
-    else 
-      USE_THREADS=""
-      if test -z "$LIBPTHREAD"; then
-        KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-pthread"] )
-      fi
-    fi
-
-    AH_VERBATIM(__svr_define, [
-#if defined(__SVR4) && !defined(__svr4__)
-#define __svr4__ 1
-#endif
-])
-    case $host_os in
- 	solaris*)
-		KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
-                CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
-    		;;
-        freebsd*)
-                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
-                ;;
-        aix*)
-                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
-                LIBPTHREAD="$LIBPTHREAD -lc_r"
-                ;;
-        linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
-                if test "$CXX" = "KCC"; then
-                  CXXFLAGS="$CXXFLAGS --thread_safe"
-		  NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
-                fi
-                ;;
-	*)
-		;;
-    esac
-    AC_SUBST(USE_THREADS)
-    AC_SUBST(LIBPTHREAD)
-])
-
-AC_DEFUN(KDE_CHECK_THREADING,
-[
-  AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
-  AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
-  dnl default is yes if libpthread is found and no if no libpthread is available
-  if test -z "$LIBPTHREAD"; then
-    if test -z "$USE_THREADS"; then
-      kde_check_threading_default=no
-    else
-      kde_check_threading_default=yes
-    fi
-  else
-    kde_check_threading_default=yes
-  fi
-  AC_ARG_ENABLE(threading, [  --disable-threading     disables threading even if libpthread found ],
-   kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
-  if test "x$kde_use_threading" = "xyes"; then
-    AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
-  fi
-])
-
-AC_DEFUN(KDE_TRY_LINK_PYTHON,
-[
-if test "$kde_python_link_found" = no; then
-
-if test "$1" = normal; then
-  AC_MSG_CHECKING(if a Python application links)
-else
-  AC_MSG_CHECKING(if Python depends on $2)
-fi
-
-AC_CACHE_VAL(kde_cv_try_link_python_$1,
-[
-AC_LANG_SAVE
-AC_LANG_C
-kde_save_cflags="$CFLAGS"
-CFLAGS="$CFLAGS $PYTHONINC"
-kde_save_libs="$LIBS"
-LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET"
-kde_save_ldflags="$LDFLAGS"
-LDFLAGS="$LDFLAGS $PYTHONLIB"
-
-AC_TRY_LINK(
-[
-#include <Python.h>
-],[
-	PySys_SetArgv(1, 0);
-],
-	[kde_cv_try_link_python_$1=yes],
-	[kde_cv_try_link_python_$1=no]
-)
-CFLAGS="$kde_save_cflags"
-LIBS="$kde_save_libs"
-LDFLAGS="$kde_save_ldflags"
-])
-
-if test "$kde_cv_try_link_python_$1" = "yes"; then
-  AC_MSG_RESULT(yes)
-  kde_python_link_found=yes
-  if test ! "$1" = normal; then
-    LIBPYTHON="$LIBPYTHON $2"
-  fi
-  $3
-else
-  AC_MSG_RESULT(no)
-  $4
-fi
-AC_LANG_RESTORE
-
-fi
-
-])
-
-AC_DEFUN(KDE_CHECK_PYTHON_DIR,
-[
-AC_MSG_CHECKING([for Python directory])
- 
-AC_CACHE_VAL(kde_cv_pythondir,
-[
-  if test -z "$PYTHONDIR"; then
-    kde_cv_pythondir=/usr/local
-  else
-    kde_cv_pythondir="$PYTHONDIR"
-  fi
-])
- 
-AC_ARG_WITH(pythondir,
-[  --with-pythondir=pythondir   use python installed in pythondir ],
-[
-  ac_python_dir=$withval
-], ac_python_dir=$kde_cv_pythondir
-)
- 
-AC_MSG_RESULT($ac_python_dir)
-])
-
-AC_DEFUN(KDE_CHECK_PYTHON_INTERN,
-[
-AC_REQUIRE([KDE_CHECK_LIBDL])
-AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
-AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
-
-if test -z "$1"; then
-  version="1.5"
-else
-  version="$1"
-fi
-
-AC_MSG_CHECKING([for Python$version])
-
-python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes"
-AC_FIND_FILE(Python.h, $python_incdirs, python_incdir)
-if test ! -r $python_incdir/Python.h; then
-  AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
-  python_incdir=$python_incdir/python$version
-  if test ! -r $python_incdir/Python.h; then
-    python_incdir=no
-  fi
-fi
-
-PYTHONINC=-I$python_incdir
-
-python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
-AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
-if test ! -r $python_libdir/libpython$version.a; then
-  AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
-  python_libdir=$python_libdir/python$version/config
-  if test ! -r $python_libdir/libpython$version.a; then
-    python_libdir=no
-  fi
-fi
-
-PYTHONLIB=-L$python_libdir
-kde_orig_LIBPYTHON=$LIBPYTHON
-if test -z "$LIBPYTHON"; then
-  LIBPYTHON=-lpython$version
-fi
-
-python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
-AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
-python_moddir=$python_moddir/python$version
-if test ! -r $python_moddir/copy.py; then
-  python_moddir=no
-fi
-
-PYTHONMODDIR=$python_moddir
-
-AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
-
-if test x$python_incdir = xno ||  test x$python_libdir = xno ||  test x$python_moddir = xno; then
-   LIBPYTHON=$kde_orig_LIBPYTHON
-   test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
-   test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
-   $2
-else 
-  dnl Note: this test is very weak
-  kde_python_link_found=no
-  KDE_TRY_LINK_PYTHON(normal)
-  KDE_TRY_LINK_PYTHON(m, -lm)
-  KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
-  KDE_TRY_LINK_PYTHON(tcl, -ltcl)
-  KDE_TRY_LINK_PYTHON(db2, -ldb2)
-  KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
-  KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
-  KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
-  KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
-  KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
-  KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
-  KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
-	[AC_MSG_WARN([it seems, Python depends on another library.
-    Pleae set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
-    and contact the authors to let them know about this problem])
-	])
-
-  LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
-  AC_SUBST(PYTHONINC)
-  AC_SUBST(PYTHONLIB)
-  AC_SUBST(LIBPYTHON)
-  AC_SUBST(PYTHONMODDIR)
-  AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
-fi
-
-])
-
-
-AC_DEFUN(KDE_CHECK_PYTHON,
-[
-  KDE_CHECK_PYTHON_INTERN("2.2", 
-    [KDE_CHECK_PYTHON_INTERN("2.1", 
-      [KDE_CHECK_PYTHON_INTERN("2.0", [ KDE_CHECK_PYTHON_INTERN($1, $2) ])
-  ])])
-])
-
-AC_DEFUN(KDE_CHECK_STL_SGI,
-[
-    AC_MSG_CHECKING([if STL implementation is SGI like])
-    AC_CACHE_VAL(kde_cv_stl_type_sgi,
-    [
-      AC_TRY_COMPILE([
-#include <string>
-using namespace std;
-],[
-  string astring="Hallo Welt.";
-  astring.erase(0, 6); // now astring is "Welt"
-  return 0;
-], kde_cv_stl_type_sgi=yes,
-   kde_cv_stl_type_sgi=no)
-])
-
-   AC_MSG_RESULT($kde_cv_stl_type_sgi)
-
-   if test "$kde_cv_stl_type_sgi" = "yes"; then
-	AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
-   fi
-])
-
-AC_DEFUN(KDE_CHECK_STL_HP,
-[
-    AC_MSG_CHECKING([if STL implementation is HP like])
-    AC_CACHE_VAL(kde_cv_stl_type_hp,
-    [
-      AC_TRY_COMPILE([
-#include <string>
-using namespace std;
-],[
-  string astring="Hello World";
-  astring.remove(0, 6); // now astring is "World"
-  return 0;
-], kde_cv_stl_type_hp=yes,
-   kde_cv_stl_type_hp=no)
-])
-   AC_MSG_RESULT($kde_cv_stl_type_hp)
-
-   if test "$kde_cv_stl_type_hp" = "yes"; then
-	AC_DEFINE_UNQUOTED(HAVE_HP_STL, 1, [Define if you have a STL implementation by HP])
-   fi
-])
-
-AC_DEFUN(KDE_CHECK_STL,
-[
-    AC_LANG_SAVE
-    AC_LANG_CPLUSPLUS
-    ac_save_CXXFLAGS="$CXXFLAGS"
-    CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
-    KDE_CHECK_STL_SGI
-
-    if test "$kde_cv_stl_type_sgi" = "no"; then
-       KDE_CHECK_STL_HP
-
-       if test "$kde_cv_stl_type_hp" = "no"; then
-         AC_MSG_ERROR("no known STL type found - did you forget to install libstdc++[-devel] ?")
-       fi
-    fi
-
-    CXXFLAGS="$ac_save_CXXFLAGS"
-    AC_LANG_RESTORE
-])
-
-AC_DEFUN(AC_FIND_QIMGIO,
-   [AC_REQUIRE([AC_FIND_JPEG])
-AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
-AC_MSG_CHECKING([for qimgio])
-AC_CACHE_VAL(ac_cv_lib_qimgio,
-[
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-ac_save_LIBS="$LIBS"
-ac_save_CXXFLAGS="$CXXFLAGS"
-LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT"
-CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
-AC_TRY_RUN(dnl
-[
-#include <qimageio.h>
-#include <qstring.h>
-int main() {
-		QString t = "hallo";
-		t.fill('t');
-		qInitImageIO();
-}
-],
-            ac_cv_lib_qimgio=yes,
-            ac_cv_lib_qimgio=no,
-	    ac_cv_lib_qimgio=no)
-LIBS="$ac_save_LIBS"
-CXXFLAGS="$ac_save_CXXFLAGS"
-AC_LANG_RESTORE
-])dnl
-if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then
-  LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG"
-  AC_MSG_RESULT(yes)
-  AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available])
-  AC_SUBST(LIBQIMGIO)
-else
-  AC_MSG_RESULT(not found)
-fi
-])
-
-AC_DEFUN(KDE_CHECK_ANSI,
-[
-])
-
-AC_DEFUN(KDE_CHECK_INSURE,
-[
-  AC_ARG_ENABLE(insure, [  --enable-insure             use insure++ for debugging [default=no]],
-  [
-  if test $enableval = "no"; dnl
-	then ac_use_insure="no"
-	else ac_use_insure="yes"
-   fi
-  ], [ac_use_insure="no"])
-
-  AC_MSG_CHECKING(if we will use Insure++ to debug)
-  AC_MSG_RESULT($ac_use_insure)
-  if test "$ac_use_insure" = "yes"; dnl
-       then CC="insure"; CXX="insure"; dnl CFLAGS="$CLAGS -fno-rtti -fno-exceptions "????
-   fi
-])
-
-AC_DEFUN(AM_DISABLE_LIBRARIES,
-[
-    AC_PROVIDE([AM_ENABLE_STATIC])
-    AC_PROVIDE([AM_ENABLE_SHARED])
-    enable_static=no
-    enable_shared=yes
-])
-
-
-AC_DEFUN(AC_CHECK_UTMP_FILE,
-[
-    AC_MSG_CHECKING([for utmp file])
-
-    AC_CACHE_VAL(kde_cv_utmp_file,
-    [
-    kde_cv_utmp_file=no
-
-    for ac_file in    \
-                      \
-	/var/run/utmp \
-	/var/adm/utmp \
-	/etc/utmp     \
-     ; \
-    do
-     if test -r "$ac_file"; then
-       kde_cv_utmp_file=$ac_file
-       break
-     fi
-    done
-    ])
-
-    if test "$kde_cv_utmp_file" != "no"; then
-	AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries])
-	$1
-	AC_MSG_RESULT($kde_cv_utmp_file)
-    else
-    	$2
-	AC_MSG_RESULT([non found])
-    fi
-])
-
-
-AC_DEFUN(KDE_CREATE_SUBDIRSLIST,
-[
-
-DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
-
-if test ! -s $srcdir/subdirs; then
-  dnl Note: Makefile.common creates subdirs, so this is just a fallback
-  TOPSUBDIRS=""
-  files=`cd $srcdir && ls -1`
-  dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
-  for i in $dirs; do
-    echo $i >> $srcdir/subdirs
-  done
-fi
-
-if test -s $srcdir/inst-apps; then
-  ac_topsubdirs="`cat $srcdir/inst-apps`"
-else
-  ac_topsubdirs="`cat $srcdir/subdirs`"
-fi
-
-for i in $ac_topsubdirs; do
-  AC_MSG_CHECKING([if $i should be compiled])
-  if test -d $srcdir/$i; then
-    install_it="yes"
-    for j in $DO_NOT_COMPILE; do
-      if test $i = $j; then
-        install_it="no"
-      fi
-    done
-  else
-    install_it="no"
-  fi
-  AC_MSG_RESULT($install_it)
-  vari=`echo $i | sed -e 's,[[-+.]],_,g'`
-  if test $install_it = "yes"; then
-    TOPSUBDIRS="$TOPSUBDIRS $i"
-    eval "$vari""_SUBDIR_included=yes"
-  else
-    eval "$vari""_SUBDIR_included=no"
-  fi
-done
-
-AC_SUBST(TOPSUBDIRS)
-])
-
-AC_DEFUN(KDE_CHECK_NAMESPACES,
-[
-AC_MSG_CHECKING(whether C++ compiler supports namespaces)
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-AC_TRY_COMPILE([
-],
-[
-namespace Foo {
-  extern int i;
-  namespace Bar {
-    extern int i;
-  }
-}
-
-int Foo::i = 0;
-int Foo::Bar::i = 1;
-],[
-  AC_MSG_RESULT(yes)
-  AC_DEFINE(HAVE_NAMESPACES)
-], [
-AC_MSG_RESULT(no)
-])
-AC_LANG_RESTORE
-])
-
-AC_DEFUN(KDE_CHECK_NEWLIBS,
-[
-
-])
-
-dnl ------------------------------------------------------------------------
-dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure at kde.org
-dnl ------------------------------------------------------------------------
-dnl
-AC_DEFUN(AC_CHECK_S_ISSOCK,
-[
-AC_MSG_CHECKING(for S_ISSOCK)
-AC_CACHE_VAL(ac_cv_have_s_issock,
-[
-AC_LANG_SAVE
-AC_LANG_C
-AC_TRY_LINK(
-[
-#include <sys/stat.h>
-],
-[
-struct stat buff;
-int b = S_ISSOCK( buff.st_mode );
-],
-ac_cv_have_s_issock=yes,
-ac_cv_have_s_issock=no)
-AC_LANG_RESTORE
-])
-AC_MSG_RESULT($ac_cv_have_s_issock)
-if test "$ac_cv_have_s_issock" = "yes"; then
-  AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.])
-fi
-
-AH_VERBATIM(_ISSOCK,
-[
-#ifndef HAVE_S_ISSOCK
-#define HAVE_S_ISSOCK
-#define S_ISSOCK(mode) (1==0)
-#endif
-])
-
-])
-
-dnl ------------------------------------------------------------------------
-dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure at kde.org
-dnl ------------------------------------------------------------------------
-dnl
-AC_DEFUN(AC_CHECK_KDEMAXPATHLEN,
-[
-AC_MSG_CHECKING(for MAXPATHLEN)
-AC_CACHE_VAL(ac_cv_maxpathlen,
-[
-AC_LANG_C
-cat > conftest.$ac_ext <<EOF
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-#endif
-#include <stdio.h>
-#include <sys/param.h>
-#ifndef MAXPATHLEN
-#define MAXPATHLEN 1024
-#endif
-
-KDE_HELLO MAXPATHLEN
-
-EOF
-
-ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out"
-
-if AC_TRY_EVAL(ac_try) && test -s conftest.out; then
-    ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out`
-else
-    ac_cv_maxpathlen=1024
-fi
-
-rm conftest.*
-
-])
-AC_MSG_RESULT($ac_cv_maxpathlen)
-AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] )
-])
-
-dnl -------------------------------------------------------------------------
-dnl See if the compiler supports a template repository         bero at redhat.de
-dnl -------------------------------------------------------------------------
-AC_DEFUN(KDE_COMPILER_REPO,
-[
-  REPO=""
-  NOREPO=""
-
-  KDE_CHECK_COMPILER_FLAG(frepo,
-   [
-     REPO="-frepo"
-     NOREPO="-fno-repo"
-   ])
-
-  if test -z "$REPO"; then
-  KDE_CHECK_COMPILER_FLAG(instances=explicit,
-  [
-     REPO="-instances=explicit"
-     NOREPO="-instances=extern"
-  ])
-  fi
-
-  if test -n "$REPO"; then
-     AC_DEFINE_UNQUOTED(HAVE_TEMPLATE_REPOSITORY, 1,
-		[C++ compiler supports template repository])
-     $1
-  fi
-
-  AC_SUBST(REPO)
-  AC_SUBST(NOREPO)
-])
-
-AC_DEFUN(KDE_CHECK_HEADER,
-[
-   AC_LANG_SAVE
-   kde_safe_cppflags=$CPPFLAGS
-   CPPFLAGS="$CPPFLAGS $all_includes"
-   AC_LANG_CPLUSPLUS
-   AC_CHECK_HEADER($1, $2, $3, $4)
-   CPPFLAGS=$kde_safe_cppflags
-   AC_LANG_RESTORE
-])
-
-AC_DEFUN(KDE_CHECK_HEADERS,
-[
-   AH_CHECK_HEADERS([$1])
-   AC_LANG_SAVE
-   kde_safe_cppflags=$CPPFLAGS
-   CPPFLAGS="$CPPFLAGS $all_includes"
-   AC_LANG_CPLUSPLUS
-   AC_CHECK_HEADERS([$1], [$2], [$3], [$4])
-   CPPFLAGS=$kde_safe_cppflags
-   AC_LANG_RESTORE
-])
-
-AC_DEFUN(KDE_FAST_CONFIGURE,
-[
-  dnl makes configure fast (needs perl)
-  AC_ARG_ENABLE(fast-perl, [  --disable-fast-perl     disable fast Makefile generation (needs perl)],
-      with_fast_perl=$enableval, with_fast_perl=yes)
-])
-
-AC_DEFUN(KDE_CONF_FILES,
-[
-  val=
-  if test -f $srcdir/configure.files ; then
-    val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files`
-  fi
-  CONF_FILES=
-  if test -n "$val" ; then
-    for i in $val ; do
-      CONF_FILES="$CONF_FILES $i"
-    done
-  fi
-  AC_SUBST(CONF_FILES)
-])dnl
-
-AC_DEFUN(KDE_SET_PREFIX,
-[
-  unset CDPATH
-  dnl make $KDEDIR the default for the installation
-  AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
-
-  if test "x$prefix" = "xNONE"; then
-    prefix=$ac_default_prefix
-    ac_configure_args="$ac_configure_args --prefix=$prefix"
-  fi
-  # And delete superflous '/' to make compares easier
-  prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
-  exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
-  KDE_FAST_CONFIGURE
-  KDE_CONF_FILES
-])
-
-pushdef([AC_PROG_INSTALL],
-[
-  dnl our own version, testing for a -p flag
-  popdef([AC_PROG_INSTALL])
-  dnl as AC_PROG_INSTALL works as it works we first have
-  dnl to save if the user didn't specify INSTALL, as the
-  dnl autoconf one overwrites INSTALL and we have no chance to find
-  dnl out afterwards
-  test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
-  test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
-  test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
-  AC_PROG_INSTALL
-
-  if test -z "$kde_save_INSTALL_given" ; then
-    # OK, user hasn't given any INSTALL, autoconf found one for us
-    # now we test, if it supports the -p flag
-    AC_MSG_CHECKING(for -p flag to install)
-    rm -f confinst.$$.* > /dev/null 2>&1
-    echo "Testtest" > confinst.$$.orig
-    ac_res=no
-    if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
-      if test -f confinst.$$.new ; then
-        # OK, -p seems to do no harm to install
-	INSTALL="${INSTALL} -p"
-	ac_res=yes
-      fi
-    fi
-    rm -f confinst.$$.*
-    AC_MSG_RESULT($ac_res)
-  fi
-  dnl the following tries to resolve some signs and wonders coming up
-  dnl with different autoconf/automake versions
-  dnl e.g.:
-  dnl  *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s
-  dnl   and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS)
-  dnl   it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s
-  dnl  *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has
-  dnl   INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the
-  dnl   install- at DIR@PROGRAMS targets to explicitly use that flag
-  dnl  *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as
-  dnl   INSTALL_SCRIPT, which breaks with automake <= 1.4
-  dnl  *autoconf >2.13 (since 10.Apr 1999) has not that failure
-  dnl  *sometimes KDE does not use the install- at DIR@PROGRAM targets from
-  dnl   automake (due to broken Makefile.am or whatever) to install programs,
-  dnl   and so does not see the -s flag in automake > 1.4
-  dnl to clean up that mess we:
-  dnl  +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG
-  dnl   which cleans KDE's program with automake > 1.4;
-  dnl  +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems
-  dnl   with automake<=1.4
-  dnl  note that dues to this sometimes two '-s' flags are used (if KDE
-  dnl   properly uses install- at DIR@PROGRAMS, but I don't care
-  dnl
-  dnl And to all this comes, that I even can't write in comments variable
-  dnl  names used by automake, because it is so stupid to think I wanted to
-  dnl  _use_ them, therefor I have written A_M_... instead of AM_
-  dnl hmm, I wanted to say something ... ahh yes: Arghhh.
-
-  if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
-    INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
-  fi
-  if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
-    INSTALL_SCRIPT='${INSTALL}'
-  fi
-])dnl
-
-AC_DEFUN(KDE_LANG_CPLUSPLUS,
-[AC_LANG_CPLUSPLUS
-ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
-pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS])
-])
-
-pushdef([AC_LANG_CPLUSPLUS],
-[popdef([AC_LANG_CPLUSPLUS])
-KDE_LANG_CPLUSPLUS
-])
-
-AC_DEFUN(KDE_CHECK_LONG_LONG,
-[
-AC_MSG_CHECKING(for long long)
-AC_CACHE_VAL(kde_cv_c_long_long,
-[
-  AC_LANG_SAVE
-  AC_LANG_CPLUSPLUS
-  AC_TRY_LINK([], [
-  long long foo = 0;
-  foo = foo+1;
-  ],
-  kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
-  AC_LANG_RESTORE
-])
-AC_MSG_RESULT($kde_cv_c_long_long)
-if test "$kde_cv_c_long_long" = yes; then
-   AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype])
-fi
-])
-
-AC_DEFUN(KDE_CHECK_LIB,
-[
-     kde_save_LDFLAGS="$LDFLAGS"
-     dnl AC_CHECK_LIB modifies LIBS, so save it here
-     kde_save_LIBS="$LIBS"
-     LDFLAGS="$LDFLAGS $all_libraries"
-     case $host_os in
-      aix*) LDFLAGS="-brtl $LDFLAGS"
-	test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS"
-	;;
-     esac
-     AC_CHECK_LIB($1, $2, $3, $4, $5)
-     LDFLAGS="$kde_save_LDFLAGS"
-     LIBS="$kde_save_LIBS"
-])
-
-AC_DEFUN(KDE_JAVA_PREFIX,
-[
-	dir=`dirname "$1"`
-	base=`basename "$1"`
-	list=`ls -1 $dir 2> /dev/null`
-	for entry in $list; do 
-		if test -d $dir/$entry/bin; then
-			case $entry in
-			   $base)
-				javadirs="$javadirs $dir/$entry/bin"
-				;;
-			esac
-		elif test -d $dir/$entry/jre/bin; then
-			case $entry in
-			   $base)
-				javadirs="$javadirs $dir/$entry/jre/bin"
-				;;
-			esac
-		fi
-	done
-])
-
-dnl KDE_CHEC_JAVA_DIR(onlyjre)
-AC_DEFUN(KDE_CHECK_JAVA_DIR,
-[
-
-AC_ARG_WITH(java,
-[  --with-java=javadir     use java installed in javadir, --without-java disables ],
-[  ac_java_dir=$withval
-], ac_java_dir=""
-)
-
-AC_MSG_CHECKING([for Java])
-
-dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
-if test "x$ac_java_dir" = "xno"; then
-   kde_java_bindir=no
-   kde_java_includedir=no
-   kde_java_libjvmdir=no
-   kde_java_libhpidir=no
-else
-  if test "x$ac_java_dir" = "x"; then
-     
-     
-      dnl No option set -> look in $PATH
-      KDE_JAVA_PREFIX(/usr/j2se)
-      KDE_JAVA_PREFIX(/usr/j*dk*)
-      KDE_JAVA_PREFIX(/usr/lib/j*dk*)
-      KDE_JAVA_PREFIX(/opt/j*sdk*)
-      KDE_JAVA_PREFIX(/usr/lib/java*)
-      KDE_JAVA_PREFIX(/usr/java*)
-      KDE_JAVA_PREFIX(/usr/java/j*dk*)
-      KDE_JAVA_PREFIX(/usr/java/j*re*)
-      KDE_JAVA_PREFIX(/usr/lib/SunJava2*)
-      KDE_JAVA_PREFIX(/usr/lib/SunJava*)
-      KDE_JAVA_PREFIX(/usr/lib/IBMJava2*)
-      KDE_JAVA_PREFIX(/usr/lib/IBMJava*)
-      KDE_JAVA_PREFIX(/opt/java*)
-    
-      kde_cv_path="NONE"
-      kde_save_IFS=$IFS
-      IFS=':'
-      for dir in $PATH; do
-	  javadirs="$javadirs $dir"
-      done
-      IFS=$kde_save_IFS
-      jredirs=
-
-      for dir in $javadirs; do
-	  if test ! -d $dir; then break; fi
-          if test -x "$dir/java"; then
-                libjvmdir=`find $dir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
-		if test ! -f $libjvmdir/libjvm.so; then continue; fi
-		jredirs="$jredirs $dir"
-	  fi
-      done
-
-      JAVAC=
-      JAVA=
-      kde_java_bindir=no
-      for dir in $jredirs; do
-	  JAVA="$dir/java"
-	  kde_java_bindir=$dir
-	  if test -x "$dir/javac"; then
-		JAVAC="$dir/javac"
-                break
-	  fi
-      done
-
-      if test -n "$JAVAC"; then
-          dnl this substitution might not work - well, we test for jni.h below
-          kde_java_includedir=`echo $JAVAC | sed -e 's,bin/javac$,include/,'`
-      else
-          kde_java_includedir=no
-      fi
-  else
-    dnl config option set
-    kde_java_bindir=$ac_java_dir/bin
-    if test -x $ac_java_dir/bin/java && test ! -x $ac_java_dir/bin/javac; then
-	kde_java_includedir=no
-    else
-        kde_java_includedir=$ac_java_dir/include
-    fi
-  fi
-fi
-
-dnl At this point kde_java_bindir and kde_java_includedir are either set or "no"
-if test "x$kde_java_bindir" != "xno"; then
-
-  dnl Look for libjvm.so
-  kde_java_libjvmdir=`find $kde_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
-  dnl Look for libhpi.so and avoid green threads
-  kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,' | head -n 1`
-
-  dnl Now check everything's fine under there
-  dnl the include dir is our flag for having the JDK
-  if test -d "$kde_java_includedir"; then
-    if test ! -x "$kde_java_bindir/javac"; then
-      AC_MSG_ERROR([javac not found under $kde_java_bindir - it seems you passed a wrong --with-java.])
-    fi
-    if test ! -x "$kde_java_bindir/javah"; then
-      AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
-    fi
-    if test ! -x "$kde_java_bindir/jar"; then
-      AC_MSG_ERROR([jar not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
-    fi
-    if test ! -r "$kde_java_includedir/jni.h"; then
-      AC_MSG_ERROR([jni.h not found under $kde_java_includedir. Use --with-java or --without-java.])
-    fi
-
-    jni_includes="-I$kde_java_includedir"
-    dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
-    dnl and under linux here..
-    test -d "$kde_java_includedir/linux" && jni_includes="$jni_includes -I$kde_java_includedir/linux"
-    test -d "$kde_java_includedir/solaris" && jni_includes="$jni_includes -I$kde_java_includedir/solaris"
-    test -d "$kde_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_java_includedir/genunix"
-
-  else
-    JAVAC=
-    jni_includes=
-  fi
-
-  if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
-     AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
-  fi 
-
-  if test ! -x "$kde_java_bindir/java"; then
-      AC_MSG_ERROR([java not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
-  fi
-
-  if test ! -r "$kde_java_libhpidir/libhpi.so"; then
-    AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
-  fi
-
-  if test -n "$jni_includes"; then
-    dnl Check for JNI version
-    AC_LANG_SAVE
-    AC_LANG_CPLUSPLUS
-    ac_cxxflags_safe="$CXXFLAGS"
-    CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
-
-    AC_TRY_COMPILE([
-  #include <jni.h>
-	      ],
-	      [
-  #ifndef JNI_VERSION_1_2
-  Syntax Error
-  #endif
-	      ],[ kde_jni_works=yes ],
-	      [ kde_jni_works=no ])
-
-    if test $kde_jni_works = no; then
-      AC_MSG_ERROR([Incorrect version of $kde_java_includedir/jni.h.
-		    You need to have Java Development Kit (JDK) version 1.2. 
-
-		    Use --with-java to specify another location.
-		    Use --without-java to configure without java support.
-		    Or download a newer JDK and try again. 
-		    See e.g. http://java.sun.com/products/jdk/1.2 ])
-    fi
-
-    CXXFLAGS="$ac_cxxflags_safe"    
-    AC_LANG_RESTORE
-
-    dnl All tests ok, inform and subst the variables
-
-    JAVAC=$kde_java_bindir/javac
-    JAVAH=$kde_java_bindir/javah
-    JAR=$kde_java_bindir/jar
-    AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
-    JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
-    AC_MSG_RESULT([java JDK in $kde_java_bindir])
-
-  else
-      AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
-      AC_MSG_RESULT([java JRE in $kde_java_bindir])
-  fi
-else # no
-  AC_MSG_RESULT([none found])
-fi
-
-AC_SUBST(JAVAC)
-AC_SUBST(JAVAH)
-AC_SUBST(JAR)
-AC_SUBST(JVMLIBS)
-AC_SUBST(jni_includes)
-
-# for backward compat
-kde_cv_java_includedir=$kde_java_includedir
-kde_cv_java_bindir=$kde_java_bindir
-])
-
-dnl this is a redefinition of autoconf 2.5x's AC_FOREACH.
-dnl When the argument list becomes big, as in KDE for AC_OUTPUT in
-dnl big packages, m4_foreach is dog-slow.  So use our own version of
-dnl it.  (matz at kde.org)
-m4_define([mm_foreach],
-[m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])])
-m4_define([mm_car], [[$1]])
-m4_define([mm_car2], [[$@]])
-m4_define([_mm_foreach],
-[m4_if(m4_quote($2), [], [],
-       [m4_define([$1], [mm_car($2)])$3[]_mm_foreach([$1],
-                                                     mm_car2(m4_shift($2)),
-                                                     [$3])])])
-m4_define([AC_FOREACH],
-[mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
-
-AC_DEFUN(KDE_NEED_FLEX,
-[
-kde_libs_safe=$LIBS
-LIBS="$LIBS $USER_LDFLAGS"
-AM_PROG_LEX
-LIBS=$kde_libs_safe
-if test -z "$LEXLIB"; then
-    AC_MSG_ERROR([You need to have flex installed.])
-fi
-AC_SUBST(LEXLIB)
-])
-
-AC_DEFUN(AC_PATH_QTOPIA,
-[
-  dnl TODO: use AC_CACHE_VAL
-
-  if test -z "$1"; then
-    qtopia_minver_maj=1
-    qtopia_minver_min=5
-    qtopia_minver_pat=0
-  else
-    qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
-    qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
-    qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
-  fi
-
-  qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
-  qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
-
-  AC_REQUIRE([AC_PATH_QT])
-
-  AC_MSG_CHECKING([for Qtopia])
-
-  LIB_QTOPIA="-lqpe"
-  AC_SUBST(LIB_QTOPIA)
-
-  kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
-
-  ac_qtopia_incdir=NO
-
-  AC_ARG_WITH(qtopia-dir,
-              [  --with-qtopia-dir=DIR   where the root of Qtopia is installed ],
-              [  ac_qtopia_incdir="$withval"/include] ) 
-  
-  qtopia_incdirs=""
-  for dir in $kde_qtopia_dirs; do
-    qtopia_incdirs="$qtopia_incdirs $dir/include"
-  done
-
-  if test ! "$ac_qtopia_incdir" = "NO"; then
-    qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
-  fi
-
-  qtopia_incdir=""
-  AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
-  ac_qtopia_incdir="$qtopia_incdir"
-
-  if test -z "$qtopia_incdir"; then
-    AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
-  fi
-
-  qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
-  qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
-  qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
-
-  qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
-  qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
-  if test "$qtopia_ver" -lt "$qtopia_minver"; then
-    AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
-is required.])
-  fi
-
-  AC_LANG_SAVE
-  AC_LANG_CPLUSPLUS
-
-  ac_cxxflags_safe="$CXXFLAGS"
-  ac_ldflags_safe="$LDFLAGS"
-  ac_libs_safe="$LIBS"
-
-  CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
-  LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
-  LIBS="$LIBS $LIB_QTOPIA $LIBQT"
-
-  cat > conftest.$ac_ext <<EOF
-#include "confdefs.h"
-#include <qpe/qpeapplication.h>
-#include <qpe/version.h>
-
-int main( int argc, char **argv )
-{
-    QPEApplication app( argc, argv );
-    return 0;
-}
-EOF
-
-  if AC_TRY_EVAL(ac_link) && test -s conftest; then
-    rm -f conftest*
-  else
-    rm -f conftest*
-    AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
-the end of config.log])
-  fi
-
-  CXXFLAGS="$ac_cxxflags_safe"
-  LDFLAGS="$ac_ldflags_safe"
-  LIBS="$ac_libs_safe"
-
-  AC_LANG_RESTORE
-
-  QTOPIA_INCLUDES="-I$qtopia_incdir"
-  AC_SUBST(QTOPIA_INCLUDES)
-
-  AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
-])
-
-
-AC_DEFUN(KDE_INIT_DOXYGEN,
-[
-AC_MSG_CHECKING([for Qt docs])
-kde_qtdir=
-if test "${with_qt_dir+set}" = set; then
-  kde_qtdir="$with_qt_dir"
-fi
-
-AC_FIND_FILE(qsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html ], QTDOCDIR)
-AC_MSG_RESULT($QTDOCDIR)
-
-AC_SUBST(QTDOCDIR)
-
-KDE_FIND_PATH(dot, DOT, [], [])
-if test -n "$DOT"; then
-  KDE_HAVE_DOT="YES"
-else
-  KDE_HAVE_DOT="NO"
-fi
-AC_SUBST(KDE_HAVE_DOT)
-KDE_FIND_PATH(doxygen, DOXYGEN, [], [])
-AC_SUBST(DOXYGEN)
-
-DOXYGEN_PROJECT_NAME="$1"
-DOXYGEN_PROJECT_NUMBER="$2"
-AC_SUBST(DOXYGEN_PROJECT_NAME)
-AC_SUBST(DOXYGEN_PROJECT_NUMBER)
-
-KDE_HAS_DOXYGEN=no
-if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
-  KDE_HAS_DOXYGEN=yes
-fi
-AC_SUBST(KDE_HAS_DOXYGEN)
-
-])
-
-
-AC_DEFUN(AC_FIND_BZIP2,
-[
-AC_MSG_CHECKING([for bzDecompress in libbz2])
-AC_CACHE_VAL(ac_cv_lib_bzip2,
-[
-AC_LANG_C
-kde_save_LIBS="$LIBS"
-LIBS="$all_libraries $USER_LDFLAGS -lbz2 $LIBSOCKET"
-kde_save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
-AC_TRY_LINK(dnl
-[
-#define BZ_NO_STDIO
-#include<bzlib.h>
-],
-            [ bz_stream s; (void) bzDecompress(&s); ],
-            eval "ac_cv_lib_bzip2='-lbz2'",
-            eval "ac_cv_lib_bzip2=no")
-LIBS="$kde_save_LIBS"
-CFLAGS="$kde_save_CFLAGS"
-])dnl
-AC_MSG_RESULT($ac_cv_lib_bzip2)
-
-if test ! "$ac_cv_lib_bzip2" = no; then
-  BZIP2DIR=bzip2
-
-  LIBBZ2="$ac_cv_lib_bzip2"
-  AC_SUBST(LIBBZ2)
-
-else
-
-   cxx_shared_flag=
-   ld_shared_flag=
-   KDE_CHECK_COMPILER_FLAG(shared, [
-	ld_shared_flag="-shared"
-   ])
-   KDE_CHECK_COMPILER_FLAG(fPIC, [
-        cxx_shared_flag="-fPIC"
-   ])
-
-   AC_MSG_CHECKING([for BZ2_bzDecompress in (shared) libbz2])
-   AC_CACHE_VAL(ac_cv_lib_bzip2_prefix,
-   [
-   AC_LANG_CPLUSPLUS
-   kde_save_LIBS="$LIBS"
-   LIBS="$all_libraries $USER_LDFLAGS $ld_shared_flag -lbz2 $LIBSOCKET"
-   kde_save_CXXFLAGS="$CXXFLAGS"
-   CXXFLAGS="$CFLAGS $cxx_shared_flag $all_includes $USER_INCLUDES"
-
-   AC_TRY_LINK(dnl
-   [
-   #define BZ_NO_STDIO
-   #include<bzlib.h>
-   ],
-               [ bz_stream s; (void) BZ2_bzDecompress(&s); ],
-               eval "ac_cv_lib_bzip2_prefix='-lbz2'",
-               eval "ac_cv_lib_bzip2_prefix=no")
-   LIBS="$kde_save_LIBS"
-   CXXFLAGS="$kde_save_CXXFLAGS"
-   ])dnl
-
-   AC_MSG_RESULT($ac_cv_lib_bzip2_prefix)
-   
-
-
-   if test ! "$ac_cv_lib_bzip2_prefix" = no; then
-     BZIP2DIR=bzip2
-    
-     LIBBZ2="$ac_cv_lib_bzip2_prefix"
-     AC_SUBST(LIBBZ2)
-
-     AC_DEFINE(NEED_BZ2_PREFIX, 1, [Define if the libbz2 functions need the BZ2_ prefix])
-   dnl else, we just ignore this
-   fi
-
-fi
-AM_CONDITIONAL(include_BZIP2, test -n "$BZIP2DIR")
-])
-
-dnl ------------------------------------------------------------------------
-dnl Try to find the SSL headers and libraries.
-dnl $(SSL_LDFLAGS) will be -Lsslliblocation (if needed)
-dnl and $(SSL_INCLUDES) will be -Isslhdrlocation (if needed)
-dnl ------------------------------------------------------------------------
-dnl
-AC_DEFUN(KDE_CHECK_SSL,
-[
-LIBSSL="-lssl -lcrypto"
-AC_REQUIRE([KDE_CHECK_LIB64])
-
-ac_ssl_includes=NO ac_ssl_libraries=NO
-ssl_libraries=""
-ssl_includes=""
-AC_ARG_WITH(ssl-dir,
-    [  --with-ssl-dir=DIR      where the root of OpenSSL is installed],
-    [  ac_ssl_includes="$withval"/include
-       ac_ssl_libraries="$withval"/lib$kdelibsuff
-    ])
-
-want_ssl=yes
-AC_ARG_WITH(ssl,
-    [  --without-ssl           disable SSL checks],
-    [want_ssl=$withval])
-
-if test $want_ssl = yes; then
-
-AC_MSG_CHECKING(for OpenSSL)
-
-AC_CACHE_VAL(ac_cv_have_ssl,
-[#try to guess OpenSSL locations
-  
-  ssl_incdirs="/usr/include /usr/local/include /usr/ssl/include /usr/local/ssl/include $prefix/include $kde_extra_includes"
-  ssl_incdirs="$ac_ssl_includes $ssl_incdirs"
-  AC_FIND_FILE(openssl/ssl.h, $ssl_incdirs, ssl_incdir)
-  ac_ssl_includes="$ssl_incdir"
-
-  ssl_libdirs="/usr/lib$kdelibsuff /usr/local/lib$kdelibsuff /usr/ssl/lib$kdelibsuff /usr/local/ssl/lib$kdelibsuff $libdir $prefix/lib$kdelibsuff $exec_prefix/lib$kdelibsuff $kde_extra_libs"
-  if test ! "$ac_ssl_libraries" = "NO"; then
-    ssl_libdirs="$ac_ssl_libraries $ssl_libdirs"
-  fi
-
-  test=NONE
-  ssl_libdir=NONE
-  for dir in $ssl_libdirs; do
-    try="ls -1 $dir/libssl*"
-    if test=`eval $try 2> /dev/null`; then ssl_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
-  done
-
-  ac_ssl_libraries="$ssl_libdir"
-
-  AC_LANG_SAVE
-  AC_LANG_C
-
-  ac_cflags_safe="$CFLAGS"
-  ac_ldflags_safe="$LDFLAGS"
-  ac_libs_safe="$LIBS"
-
-  CFLAGS="$CFLAGS -I$ssl_incdir $all_includes"
-  LDFLAGS="$LDFLAGS -L$ssl_libdir $all_libraries"
-  LIBS="$LIBS $LIBSSL -lRSAglue -lrsaref"
-
-  AC_TRY_LINK(,void RSAPrivateEncrypt(void);RSAPrivateEncrypt();,
-  ac_ssl_rsaref="yes"
-  ,
-  ac_ssl_rsaref="no"
-  )
-
-  CFLAGS="$ac_cflags_safe"
-  LDFLAGS="$ac_ldflags_safe"
-  LIBS="$ac_libs_safe"
-
-  AC_LANG_RESTORE
-
-  if test "$ac_ssl_includes" = NO || test "$ac_ssl_libraries" = NO; then
-    have_ssl=no
-  else
-    have_ssl=yes;
-  fi
-
-  ])
-
-  eval "$ac_cv_have_ssl"
-
-  AC_MSG_RESULT([libraries $ac_ssl_libraries, headers $ac_ssl_includes])
-
-  AC_MSG_CHECKING([whether OpenSSL uses rsaref])
-  AC_MSG_RESULT($ac_ssl_rsaref)
-
-  AC_MSG_CHECKING([for easter eggs])
-  AC_MSG_RESULT([none found])
-
-else
-  have_ssl=no
-fi
-
-if test "$have_ssl" = yes; then
-  AC_MSG_CHECKING(for OpenSSL version)
-  dnl Check for SSL version
-  AC_CACHE_VAL(ac_cv_ssl_version,
-  [
-    AC_LANG_SAVE
-    AC_LANG_C 
-
-    cat >conftest.$ac_ext <<EOF
-#include <openssl/opensslv.h>
-#include <stdio.h>
-    int main() {
- 
-#ifndef OPENSSL_VERSION_NUMBER
-      printf("ssl_version=\\"error\\"\n");
-#else
-      if (OPENSSL_VERSION_NUMBER < 0x00906000)
-        printf("ssl_version=\\"old\\"\n");
-      else
-        printf("ssl_version=\\"ok\\"\n");
-#endif
-     return (0);
-    }
-EOF
-
-    ac_compile='${CC-gcc} $CFLAGS -I$ac_ssl_includes conftest.$ac_ext -o conftest'
-    if AC_TRY_EVAL(ac_compile); then 
-
-      if eval `./conftest 2>&5`; then
-        if test $ssl_version = error; then
-          AC_MSG_ERROR([$ssl_incdir/openssl/opensslv.h doesn't define OPENSSL_VERSION_NUMBER !])
-        else
-          if test $ssl_version = old; then
-            AC_MSG_WARN([OpenSSL version too old. Upgrade to 0.9.6 at least, see http://www.openssl.org. SSL support disabled.])
-            have_ssl=no
-          fi
-        fi
-        ac_cv_ssl_version="ssl_version=$ssl_version"
-      else
-        AC_MSG_ERROR([Your system couldn't run a small SSL test program.
-        Check config.log, and if you can't figure it out, send a mail to 
-        David Faure <faure at kde.org>, attaching your config.log])
-      fi
-
-    else
-      AC_MSG_ERROR([Your system couldn't link a small SSL test program.
-      Check config.log, and if you can't figure it out, send a mail to 
-      David Faure <faure at kde.org>, attaching your config.log])
-    fi 
-
-    AC_LANG_RESTORE
-
-  ])
-
-  eval "$ac_cv_ssl_version"
-  AC_MSG_RESULT($ssl_version)
-fi
-
-if test "$have_ssl" != yes; then
-  LIBSSL="";
-else
-  AC_DEFINE(HAVE_SSL, 1, [If we are going to use OpenSSL])
-  ac_cv_have_ssl="have_ssl=yes \
-    ac_ssl_includes=$ac_ssl_includes ac_ssl_libraries=$ac_ssl_libraries ac_ssl_rsaref=$ac_ssl_rsaref"
-  
-  
-  ssl_libraries="$ac_ssl_libraries"
-  ssl_includes="$ac_ssl_includes"
-
-  if test "$ac_ssl_rsaref" = yes; then
-    LIBSSL="-lssl -lcrypto -lRSAglue -lrsaref" 
-  fi
-
-  if test $ssl_version = "old"; then
-    AC_DEFINE(HAVE_OLD_SSL_API, 1, [Define if you have OpenSSL < 0.9.6])
-  fi
-fi
-
-if test "$ssl_includes" = "/usr/include" || test  "$ssl_includes" = "/usr/local/include" || test -z "$ssl_includes"; then
- SSL_INCLUDES="";
-else
- SSL_INCLUDES="-I$ssl_includes"
-fi
-
-if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries"; then
- SSL_LDFLAGS=""
-else
- SSL_LDFLAGS="-L$ssl_libraries -R$ssl_libraries"
-fi
-
-AC_SUBST(SSL_INCLUDES)
-AC_SUBST(SSL_LDFLAGS)
-AC_SUBST(LIBSSL)
-])
-
-AC_DEFUN(KDE_CHECK_STRLCPY,
-[
-  AC_CHECK_STRLCPY
-  AC_CHECK_STRLCAT
-  AC_CHECK_SIZEOF(size_t)
-  AC_CHECK_SIZEOF(unsigned long)
-
-  AC_MSG_CHECKING([sizeof(size_t) == sizeof(unsigned long)])
-  AC_TRY_COMPILE(,[
-    #if SIZEOF_SIZE_T != SIZEOF_UNSIGNED_LONG
-       choke me
-    #endif
-    ],[AC_MSG_RESULT([yes])],[
-      AC_MSG_RESULT([no])
-      AC_MSG_ERROR([
-       Apparently on your system our assumption sizeof(size_t) == sizeof(unsigned long)
-       does not apply. Please mail kde-devel at kde.org with a description of your system!
-      ])
-  ])
-])
-
-# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
-## Copyright 1996, 1997, 1998, 1999, 2000, 2001
-## Free Software Foundation, Inc.
-## Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
-##
-## 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
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## 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.
-##
-## 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.
-
-# serial 47 AC_PROG_LIBTOOL
-
-# AC_PROG_LIBTOOL
-# ---------------
-AC_DEFUN([AC_PROG_LIBTOOL],
-[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
-dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
-dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
-  AC_PROVIDE_IFELSE([AC_PROG_CXX],
-    [AC_LIBTOOL_CXX],
-    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
-  ])])
-
-dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
-dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
-dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
-  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
-    [AC_LIBTOOL_GCJ],
-    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
-      [AC_LIBTOOL_GCJ],
-      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
-	[AC_LIBTOOL_GCJ],
-      [ifdef([AC_PROG_GCJ],
-	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
-       ifdef([A][M_PROG_GCJ],
-	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
-       ifdef([LT_AC_PROG_GCJ],
-	     [define([LT_AC_PROG_GCJ],
-		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
-])])# AC_PROG_LIBTOOL
-
-
-# _AC_PROG_LIBTOOL
-# ----------------
-AC_DEFUN([_AC_PROG_LIBTOOL],
-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent'
-AC_SUBST(LIBTOOL)dnl
-
-# Prevent multiple expansion
-define([AC_PROG_LIBTOOL], [])
-])# _AC_PROG_LIBTOOL
-
-
-# AC_LIBTOOL_SETUP
-# ----------------
-AC_DEFUN([AC_LIBTOOL_SETUP],
-[AC_PREREQ(2.50)dnl
-AC_REQUIRE([AC_ENABLE_SHARED])dnl
-AC_REQUIRE([AC_ENABLE_STATIC])dnl
-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_LD])dnl
-AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
-AC_REQUIRE([AC_PROG_NM])dnl
-AC_REQUIRE([LT_AC_PROG_SED])dnl
-
-AC_REQUIRE([AC_PROG_LN_S])dnl
-AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-AC_REQUIRE([AC_OBJEXT])dnl
-AC_REQUIRE([AC_EXEEXT])dnl
-dnl
-
-AC_LIBTOOL_SYS_MAX_CMD_LEN
-AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-AC_LIBTOOL_OBJDIR
-
-AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
-_LT_AC_PROG_ECHO_BACKSLASH
-
-case $host_os in
-aix3*)
-  # AIX sometimes has problems with the GCC collect2 program.  For some
-  # reason, if we set the COLLECT_NAMES environment variable, the problems
-  # vanish in a puff of smoke.
-  if test "X${COLLECT_NAMES+set}" != Xset; then
-    COLLECT_NAMES=
-    export COLLECT_NAMES
-  fi
-  ;;
-esac
-
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e s/^X//'
-[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
-
-# Same as above, but do not quote variable references.
-[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-
-# Constants:
-rm="rm -f"
-
-# Global variables:
-default_ofile=libtool
-can_build_shared=yes
-
-# All known linkers require a `.a' archive for static linking (except M$VC,
-# which needs '.lib').
-libext=a
-ltmain="$ac_aux_dir/ltmain.sh"
-ofile="$default_ofile"
-with_gnu_ld="$lt_cv_prog_gnu_ld"
-
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-AC_CHECK_TOOL(STRIP, strip, :)
-
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-
-# Set sane defaults for various variables
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-test -z "$AS" && AS=as
-test -z "$CC" && CC=cc
-test -z "$LTCC" && LTCC=$CC
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-test -z "$LD" && LD=ld
-test -z "$LN_S" && LN_S="ln -s"
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-test -z "$NM" && NM=nm
-test -z "$SED" && SED=sed
-test -z "$OBJDUMP" && OBJDUMP=objdump
-test -z "$RANLIB" && RANLIB=:
-test -z "$STRIP" && STRIP=:
-test -z "$ac_objext" && ac_objext=o
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
-  case $host_os in
-  openbsd*)
-    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
-    ;;
-  *)
-    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
-    ;;
-  esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-fi
-
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
-  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
-    AC_PATH_MAGIC
-  fi
-  ;;
-esac
-
-ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-enable_win32_dll=yes, enable_win32_dll=no)
-
-AC_ARG_ENABLE([libtool-lock],
-    [AC_HELP_STRING([--disable-libtool-lock],
-	[avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-AC_ARG_WITH([pic],
-    [AC_HELP_STRING([--with-pic],
-	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
-    [pic_mode="$withval"],
-    [pic_mode=default])
-test -z "$pic_mode" && pic_mode=default
-
-# Use C for the default configuration in the libtool script
-tagname=
-AC_LIBTOOL_LANG_C_CONFIG
-_LT_AC_TAGCONFIG
-])# AC_LIBTOOL_SETUP
-
-
-# _LT_AC_SYS_COMPILER
-# -------------------
-AC_DEFUN([_LT_AC_SYS_COMPILER],
-[AC_REQUIRE([AC_PROG_CC])dnl
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# Allow CC to be a program name with arguments.
-set dummy $CC
-compiler="[$]2"
-])# _LT_AC_SYS_COMPILER
-
-
-# _LT_AC_SYS_LIBPATH_AIX
-# ----------------------
-# Links a minimal program and checks the executable
-# for the system default hardcoded library path. In most cases,
-# this is /usr/lib:/lib, but when the MPI compilers are used
-# the location of the communication and MPI libs are included too.
-# If we don't find anything, use the default library path according
-# to the aix ld manual.
-AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
-[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`; fi],[])
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-])# _LT_AC_SYS_LIBPATH_AIX
-
-
-# _LT_AC_PROG_ECHO_BACKSLASH
-# --------------------------
-# Add some code to the start of the generated configure script which
-# will find an echo command which doesn't interpret backslashes.
-AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
-[ifdef([AC_DIVERSION_NOTICE],
-	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
-	 [AC_DIVERT_PUSH(NOTICE)])
-
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-case X$ECHO in
-X*--fallback-echo)
-  # Remove one level of quotation (which was required for Make).
-  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
-  ;;
-esac
-
-echo=${ECHO-echo}
-if test "X[$]1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X[$]1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
-  # Yippee, $echo works!
-  :
-else
-  # Restart under the correct shell.
-  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
-fi
-
-if test "X[$]1" = X--fallback-echo; then
-  # used as fallback echo
-  shift
-  cat <<EOF
-[$]*
-EOF
-  exit 0
-fi
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
-
-if test -z "$ECHO"; then
-if test "X${echo_test_string+set}" != Xset; then
-# find a string as large as possible, as long as the shell can cope with it
-  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
-    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
-    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
-       echo_test_string="`eval $cmd`" &&
-       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
-    then
-      break
-    fi
-  done
-fi
-
-if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
-   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
-   test "X$echo_testing_string" = "X$echo_test_string"; then
-  :
-else
-  # The Solaris, AIX, and Digital Unix default echo programs unquote
-  # backslashes.  This makes it impossible to quote backslashes using
-  #   echo "$something" | sed 's/\\/\\\\/g'
-  #
-  # So, first we look for a working echo in the user's PATH.
-
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for dir in $PATH /usr/ucb; do
-    IFS="$lt_save_ifs"
-    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
-       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
-       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
-       test "X$echo_testing_string" = "X$echo_test_string"; then
-      echo="$dir/echo"
-      break
-    fi
-  done
-  IFS="$lt_save_ifs"
-
-  if test "X$echo" = Xecho; then
-    # We didn't find a better echo, so look for alternatives.
-    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
-       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
-       test "X$echo_testing_string" = "X$echo_test_string"; then
-      # This shell has a builtin print -r that does the trick.
-      echo='print -r'
-    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
-	 test "X$CONFIG_SHELL" != X/bin/ksh; then
-      # If we have ksh, try running configure again with it.
-      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-      export ORIGINAL_CONFIG_SHELL
-      CONFIG_SHELL=/bin/ksh
-      export CONFIG_SHELL
-      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
-    else
-      # Try using printf.
-      echo='printf %s\n'
-      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
-	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
-	 test "X$echo_testing_string" = "X$echo_test_string"; then
-	# Cool, printf works
-	:
-      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
-	   test "X$echo_testing_string" = 'X\t' &&
-	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-	   test "X$echo_testing_string" = "X$echo_test_string"; then
-	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
-	export CONFIG_SHELL
-	SHELL="$CONFIG_SHELL"
-	export SHELL
-	echo="$CONFIG_SHELL [$]0 --fallback-echo"
-      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
-	   test "X$echo_testing_string" = 'X\t' &&
-	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-	   test "X$echo_testing_string" = "X$echo_test_string"; then
-	echo="$CONFIG_SHELL [$]0 --fallback-echo"
-      else
-	# maybe with a smaller string...
-	prev=:
-
-	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
-	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
-	  then
-	    break
-	  fi
-	  prev="$cmd"
-	done
-
-	if test "$prev" != 'sed 50q "[$]0"'; then
-	  echo_test_string=`eval $prev`
-	  export echo_test_string
-	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
-	else
-	  # Oops.  We lost completely, so just stick with echo.
-	  echo=echo
-	fi
-      fi
-    fi
-  fi
-fi
-fi
-
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-ECHO=$echo
-if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
-   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
-fi
-
-AC_SUBST(ECHO)
-AC_DIVERT_POP
-])# _LT_AC_PROG_ECHO_BACKSLASH
-
-
-# _LT_AC_LOCK
-# -----------
-AC_DEFUN([_LT_AC_LOCK],
-[AC_ARG_ENABLE([libtool-lock],
-    [AC_HELP_STRING([--disable-libtool-lock],
-	[avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-ia64-*-hpux*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.$ac_objext` in
-    *ELF-32*)
-      HPUX_IA64_MODE="32"
-      ;;
-    *ELF-64*)
-      HPUX_IA64_MODE="64"
-      ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-*-*-irix6*)
-  # Find out which ABI we are using.
-  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.$ac_objext` in
-    *32-bit*)
-      LD="${LD-ld} -32"
-      ;;
-    *N32*)
-      LD="${LD-ld} -n32"
-      ;;
-    *64-bit*)
-      LD="${LD-ld} -64"
-      ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-
-*-*-linux*)
-  # Test if the compiler is 64bit
-  echo 'int i;' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.$ac_objext` in
-    *"ELF 32"*)
-      LINUX_64_MODE="32"
-      ;;
-    *"ELF 64"*)
-      LINUX_64_MODE="64"
-      ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-  
-*-*-sco3.2v5*)
-  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
-  SAVE_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -belf"
-  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
-    [AC_LANG_PUSH(C)
-     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
-     AC_LANG_POP])
-  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
-    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
-    CFLAGS="$SAVE_CFLAGS"
-  fi
-  ;;
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
-  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
-  AC_CHECK_TOOL(AS, as, false)
-  AC_CHECK_TOOL(OBJDUMP, objdump, false)
-
-  # recent cygwin and mingw systems supply a stub DllMain which the user
-  # can override, but on older systems we have to supply one
-  AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
-    [AC_TRY_LINK([],
-      [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
-      DllMain (0, 0, 0);],
-      [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
-
-  case $host/$CC in
-  *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
-    # old mingw systems require "-dll" to link a DLL, while more recent ones
-    # require "-mdll"
-    SAVE_CFLAGS="$CFLAGS"
-    CFLAGS="$CFLAGS -mdll"
-    AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
-      [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
-    CFLAGS="$SAVE_CFLAGS" ;;
-  *-*-cygwin* | *-*-pw32*)
-    # cygwin systems need to pass --dll to the linker, and not link
-    # crt.o which will require a WinMain at 16 definition.
-    lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
-  esac
-  ;;
-  ])
-esac
-
-need_locks="$enable_libtool_lock"
-
-])# _LT_AC_LOCK
-
-
-# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
-# ----------------------------------------------------------------
-# Check whether the given compiler option works
-AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
-[AC_CACHE_CHECK([$1], [$2],
-  [$2=no
-  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
-   save_CFLAGS="$CFLAGS"
-   CFLAGS="$CFLAGS $3"
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   if (eval $ac_compile 2>conftest.err) && test -s $ac_outfile; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     if test -s conftest.err; then
-       # Append any errors to the config.log.
-       cat conftest.err 1>&AS_MESSAGE_LOG_FD
-     else
-       $2=yes
-     fi
-   fi
-   $rm conftest*
-   CFLAGS="$save_CFLAGS"
-])
-
-if test x"[$]$2" = xyes; then
-    ifelse([$5], , :, [$5])
-else
-    ifelse([$6], , :, [$6])
-fi
-])# AC_LIBTOOL_COMPILER_OPTION
-
-
-# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-#                          [ACTION-SUCCESS], [ACTION-FAILURE])
-# ------------------------------------------------------------
-# Check whether the given compiler option works
-AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
-[AC_CACHE_CHECK([$1], [$2],
-  [$2=no
-   save_LDFLAGS="$LDFLAGS"
-   LDFLAGS="$LDFLAGS $3"
-   echo "$lt_simple_link_test_code" > conftest.$ac_ext
-   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     if test -s conftest.err; then
-       # Append any errors to the config.log.
-       cat conftest.err 1>&AS_MESSAGE_LOG_FD
-     else
-       $2=yes
-     fi
-   fi
-   $rm conftest*
-   LDFLAGS="$save_LDFLAGS"
-])
-
-if test x"[$]$2" = xyes; then
-    ifelse([$4], , :, [$4])
-else
-    ifelse([$5], , :, [$5])
-fi
-])# AC_LIBTOOL_LINKER_OPTION
-
-
-# AC_LIBTOOL_SYS_MAX_CMD_LEN
-# --------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
-[# find the maximum length of command line arguments
-AC_MSG_CHECKING([the maximum length of command line arguments])
-AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
-  i=0
-  testring="ABCD"
-
-  case $host_os in
-  msdosdjgpp*)
-    # On DJGPP, this test can blow up pretty badly due to problems in libc
-    # (any single argument exceeding 2000 bytes causes a buffer overrun
-    # during glob expansion).  Even if it were fixed, the result of this
-    # check would be larger than it should be.
-    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
-    ;;
-
-  gnu*)
-    # Under GNU Hurd, this test is not required because there is
-    # no limit to the length of command line arguments.
-    # Libtool will interpret -1 as no limit whatsoever
-    lt_cv_sys_max_cmd_len=-1;
-    ;;
-
-  *)
-    # If test is not a shell built-in, we'll probably end up computing a
-    # maximum length that is only half of the actual maximum length, but
-    # we can't tell.
-    while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
-	       = "XX$testring") >/dev/null 2>&1 &&
-	    new_result=`expr "X$testring" : ".*" 2>&1` &&
-	    lt_cv_sys_max_cmd_len=$new_result &&
-	    test $i != 17 # 1/2 MB should be enough
-    do
-      i=`expr $i + 1`
-      testring=$testring$testring
-    done
-    testring=
-    # Add a significant safety factor because C++ compilers can tack on massive
-    # amounts of additional arguments before passing them to the linker.
-    # It appears as though 1/2 is a usable value.
-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
-    ;;
-  esac
-])
-if test -n $lt_cv_sys_max_cmd_len ; then
-  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
-else
-  AC_MSG_RESULT(none)
-fi
-])# AC_LIBTOOL_SYS_MAX_CMD_LEN
-
-
-# _LT_AC_CHECK_DLFCN
-# --------------------
-AC_DEFUN([_LT_AC_CHECK_DLFCN],
-[AC_CHECK_HEADERS(dlfcn.h)dnl
-])# _LT_AC_CHECK_DLFCN
-
-
-# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
-#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
-# ------------------------------------------------------------------
-AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
-[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
-if test "$cross_compiling" = yes; then :
-  [$4]
-else
-  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-  lt_status=$lt_dlunknown
-  cat > conftest.$ac_ext <<EOF
-[#line __oline__ "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-#  define LT_DLGLOBAL		RTLD_GLOBAL
-#else
-#  ifdef DL_GLOBAL
-#    define LT_DLGLOBAL		DL_GLOBAL
-#  else
-#    define LT_DLGLOBAL		0
-#  endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
-   find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-#  ifdef RTLD_LAZY
-#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
-#  else
-#    ifdef DL_LAZY
-#      define LT_DLLAZY_OR_NOW		DL_LAZY
-#    else
-#      ifdef RTLD_NOW
-#        define LT_DLLAZY_OR_NOW	RTLD_NOW
-#      else
-#        ifdef DL_NOW
-#          define LT_DLLAZY_OR_NOW	DL_NOW
-#        else
-#          define LT_DLLAZY_OR_NOW	0
-#        endif
-#      endif
-#    endif
-#  endif
-#endif
-
-#ifdef __cplusplus
-extern "C" void exit (int);
-#endif
-
-void fnord() { int i=42;}
-int main ()
-{
-  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-  int status = $lt_dlunknown;
-
-  if (self)
-    {
-      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
-      /* dlclose (self); */
-    }
-
-    exit (status);
-}]
-EOF
-  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
-    (./conftest; exit; ) 2>/dev/null
-    lt_status=$?
-    case x$lt_status in
-      x$lt_dlno_uscore) $1 ;;
-      x$lt_dlneed_uscore) $2 ;;
-      x$lt_unknown|x*) $3 ;;
-    esac
-  else :
-    # compilation failed
-    $3
-  fi
-fi
-rm -fr conftest*
-])# _LT_AC_TRY_DLOPEN_SELF
-
-
-# AC_LIBTOOL_DLOPEN_SELF
-# -------------------
-AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
-[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
-if test "x$enable_dlopen" != xyes; then
-  enable_dlopen=unknown
-  enable_dlopen_self=unknown
-  enable_dlopen_self_static=unknown
-else
-  lt_cv_dlopen=no
-  lt_cv_dlopen_libs=
-
-  case $host_os in
-  beos*)
-    lt_cv_dlopen="load_add_on"
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=yes
-    ;;
-
-  cygwin* | mingw* | pw32*)
-    lt_cv_dlopen="LoadLibrary"
-    lt_cv_dlopen_libs=
-   ;;
-
-  *)
-    AC_CHECK_FUNC([shl_load],
-	  [lt_cv_dlopen="shl_load"],
-      [AC_CHECK_LIB([dld], [shl_load],
-	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
-	[AC_CHECK_FUNC([dlopen],
-	      [lt_cv_dlopen="dlopen"],
-	  [AC_CHECK_LIB([dl], [dlopen],
-		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
-	    [AC_CHECK_LIB([svld], [dlopen],
-		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
-	      [AC_CHECK_LIB([dld], [dld_link],
-		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
-	      ])
-	    ])
-	  ])
-	])
-      ])
-    ;;
-  esac
-
-  if test "x$lt_cv_dlopen" != xno; then
-    enable_dlopen=yes
-  else
-    enable_dlopen=no
-  fi
-
-  case $lt_cv_dlopen in
-  dlopen)
-    save_CPPFLAGS="$CPPFLAGS"
-    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-
-    save_LDFLAGS="$LDFLAGS"
-    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-
-    save_LIBS="$LIBS"
-    LIBS="$lt_cv_dlopen_libs $LIBS"
-
-    AC_CACHE_CHECK([whether a program can dlopen itself],
-	  lt_cv_dlopen_self, [dnl
-	  _LT_AC_TRY_DLOPEN_SELF(
-	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
-	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
-    ])
-
-    if test "x$lt_cv_dlopen_self" = xyes; then
-      LDFLAGS="$LDFLAGS $link_static_flag"
-      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
-    	  lt_cv_dlopen_self_static, [dnl
-	  _LT_AC_TRY_DLOPEN_SELF(
-	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
-	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
-      ])
-    fi
-
-    CPPFLAGS="$save_CPPFLAGS"
-    LDFLAGS="$save_LDFLAGS"
-    LIBS="$save_LIBS"
-    ;;
-  esac
-
-  case $lt_cv_dlopen_self in
-  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
-  *) enable_dlopen_self=unknown ;;
-  esac
-
-  case $lt_cv_dlopen_self_static in
-  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
-  *) enable_dlopen_self_static=unknown ;;
-  esac
-fi
-])# AC_LIBTOOL_DLOPEN_SELF
-
-
-# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
-# ---------------------------------
-# Check to see if options -c and -o are simultaneously supported by compiler
-AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
-AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
-  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
-  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
-   $rm -r conftest 2>/dev/null
-   mkdir conftest
-   cd conftest
-   mkdir out
-   ifelse([$1],[],[save_CFLAGS="$CFLAGS"
-		   CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"],
-	  [$1],[CXX],[save_CXXFLAGS="$CXXFLAGS"
-		   CXXFLAGS="$CXXFLAGS -o out/conftest2.$ac_objext"],
-	  [$1],[GCJ],[save_GCJFLAGS="$GCJFLAGS"
-		   GCJFLAGS="$GCJFLAGS -o out/conftest2.$ac_objext"])
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-   # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
-   # that will create temporary files in the current directory regardless of
-   # the output directory.  Thus, making CWD read-only will cause this test
-   # to fail, enabling locking or at least warning the user not to do parallel
-   # builds.
-   chmod -w .
-
-   if (eval $ac_compile 2>out/conftest.err) && test -s out/conftest2.$ac_objext
-   then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     if test -s out/conftest.err; then
-       # Append any errors to the config.log.
-       cat out/conftest.err 1>&AS_MESSAGE_LOG_FD
-     else
-       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
-     fi
-   fi
-   ifelse([$1],[],[CFLAGS="$save_CFLAGS"],
-	  [$1],[CXX],[CXXFLAGS="$save_CXXFLAGS"],
-	  [$1],[GCJ],[GCJFLAGS="$save_GCJFLAGS"])
-   chmod u+w .
-   $rm conftest* out/*
-   rmdir out
-   cd ..
-   rmdir conftest
-   $rm conftest*
-])
-])# AC_LIBTOOL_PROG_CC_C_O
-
-
-# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
-# -----------------------------------------
-# Check to see if we can do hard links to lock some files if needed
-AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
-[AC_REQUIRE([_LT_AC_LOCK])dnl
-
-hard_links="nottested"
-if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
-  # do not overwrite the value of need_locks provided by the user
-  AC_MSG_CHECKING([if we can lock with hard links])
-  hard_links=yes
-  $rm conftest*
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  touch conftest.a
-  ln conftest.a conftest.b 2>&5 || hard_links=no
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  AC_MSG_RESULT([$hard_links])
-  if test "$hard_links" = no; then
-    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
-    need_locks=warn
-  fi
-else
-  need_locks=no
-fi
-])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
-
-
-# AC_LIBTOOL_OBJDIR
-# -----------------
-AC_DEFUN([AC_LIBTOOL_OBJDIR],
-[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
-[rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
-  lt_cv_objdir=.libs
-else
-  # MS-DOS does not allow filenames that begin with a dot.
-  lt_cv_objdir=_libs
-fi
-rmdir .libs 2>/dev/null])
-objdir=$lt_cv_objdir
-])# AC_LIBTOOL_OBJDIR
-
-
-# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
-# ----------------------------------------------
-# Check hardcoding attributes.
-AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
-[AC_MSG_CHECKING([how to hardcode library paths into programs])
-_LT_AC_TAGVAR(hardcode_action, $1)=
-if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
-   test -n "$_LT_AC_TAGVAR(runpath_var $1)"; then
-
-  # We can hardcode non-existant directories.
-  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
-     # If the only mechanism to avoid hardcoding is shlibpath_var, we
-     # have to relink, otherwise we might link with an installed library
-     # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
-     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
-    # Linking always hardcodes the temporary library directory.
-    _LT_AC_TAGVAR(hardcode_action, $1)=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
-  fi
-else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
-fi
-AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
-
-if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
-  # Fast installation is not supported
-  enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
-  # Fast installation is not necessary
-  enable_fast_install=needless
-fi
-])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
-
-
-# AC_LIBTOOL_SYS_LIB_STRIP
-# ------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
-[striplib=
-old_striplib=
-AC_MSG_CHECKING([whether stripping libraries is possible])
-if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
-  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
-  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
-  AC_MSG_RESULT([yes])
-else
-  AC_MSG_RESULT([no])
-fi
-])# AC_LIBTOOL_SYS_LIB_STRIP
-
-
-# AC_LIBTOOL_SYS_DYNAMIC_LINKER
-# -----------------------------
-# PORTME Fill in your ld.so characteristics
-AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
-[AC_MSG_CHECKING([dynamic linker characteristics])
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
-  version_type=linux
-  library_names_spec='${libname}${release}.so$versuffix $libname.a'
-  shlibpath_var=LIBPATH
-
-  # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}.so$major'
-  ;;
-
-aix4* | aix5*)
-  version_type=linux
-  if test "$host_cpu" = ia64; then
-    # AIX 5 supports IA64
-    library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
-    shlibpath_var=LD_LIBRARY_PATH
-  else
-    # With GCC up to 2.95.x, collect2 would create an import file
-    # for dependence libraries.  The import file would start with
-    # the line `#! .'.  This would cause the generated library to
-    # depend on `.', always an invalid library.  This was fixed in
-    # development snapshots of GCC prior to 3.0.
-    case $host_os in
-      aix4 | aix4.[[01]] | aix4.[[01]].*)
-      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
-	   echo ' yes '
-	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
-	:
-      else
-	can_build_shared=no
-      fi
-      ;;
-    esac
-    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
-    # soname into executable. Probably we can add versioning support to
-    # collect2, so additional links can be useful in future.
-    if test "$aix_use_runtimelinking" = yes; then
-      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
-      # instead of lib<name>.a to let people know that these are not
-      # typical AIX shared libraries.
-      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-    else
-      # We preserve .a as extension for shared libraries through AIX4.2
-      # and later when we are not doing run time linking.
-      library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}.so$major'
-    fi
-    shlibpath_var=LIBPATH
-  fi
-  ;;
-
-amigaos*)
-  library_names_spec='$libname.ixlibrary $libname.a'
-  # Create ${libname}_ixlibrary.a entries in /sys/libs.
-  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
-  ;;
-
-beos*)
-  library_names_spec='${libname}.so'
-  dynamic_linker="$host_os ld.so"
-  shlibpath_var=LIBRARY_PATH
-  ;;
-
-bsdi4*)
-  version_type=linux
-  need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
-  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
-  # the default ld.so.conf also contains /usr/contrib/lib and
-  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
-  # libtool to hard-code these into programs
-  ;;
-
-cygwin* | mingw* | pw32*)
-  version_type=windows
-  need_version=no
-  need_lib_prefix=no
-  case $GCC,$host_os in
-  yes,cygwin*)
-    library_names_spec='$libname.dll.a'
-    sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
-    soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
-    postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
-      dldir=$destdir/`dirname \$dlpath`~
-      test -d \$dldir || mkdir -p \$dldir~
-      $install_prog .libs/$dlname \$dldir/$dlname'
-    postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
-      dlpath=$dir/\$dldll~
-       $rm \$dlpath'
-    ;;
-  yes,mingw*)
-    library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
-    sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://"`
-    if echo "$sys_lib_search_path_spec" | [egrep ';[C-Z]:/' >/dev/null]; then
-      # It is most probably a Windows format PATH printed by
-      # mingw gcc, but we are running on Cygwin. Gcc prints its search
-      # path with ; separators, and with drive letters. We can handle the
-      # drive letters (cygwin fileutils understands them), so leave them,
-      # especially as we might pass files found there to a mingw objdump,
-      # which wouldn't understand a cygwinified path. Ahh.
-      sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'`
-    else
-      sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed  -e "s/$PATH_SEPARATOR/ /g"`
-    fi
-    ;;
-  yes,pw32*)
-    library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
-    ;;
-  *)
-    library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
-    ;;
-  esac
-  dynamic_linker='Win32 ld.exe'
-  # FIXME: first we should search . and the directory the executable is in
-  shlibpath_var=PATH
-  ;;
-
-darwin* | rhapsody*)
-  dynamic_linker="$host_os dyld"
-  version_type=darwin
-  need_lib_prefix=no
-  need_version=no
-  # FIXME: Relying on posixy $() will cause problems for
-  #        cross-compilation, but unfortunately the echo tests do not
-  #        yet detect zsh echo's removal of \ escapes.
-  library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
-  soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
-  shlibpath_overrides_runpath=yes
-  shlibpath_var=DYLD_LIBRARY_PATH
-  ;;
-
-dgux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-freebsd1*)
-  dynamic_linker=no
-  ;;
-
-freebsd*)
-  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
-  version_type=freebsd-$objformat
-  case $version_type in
-    freebsd-elf*)
-      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
-      need_version=no
-      need_lib_prefix=no
-      ;;
-    freebsd-*)
-      library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
-      need_version=yes
-      ;;
-  esac
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_os in
-  freebsd2*)
-    shlibpath_overrides_runpath=yes
-    ;;
-  freebsd3.[01]* | freebsdelf3.[01]*)
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  *) # from 3.2 on
-    shlibpath_overrides_runpath=no
-    hardcode_into_libs=yes
-    ;;
-  esac
-  ;;
-
-gnu*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
-  soname_spec='${libname}${release}.so$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  hardcode_into_libs=yes
-  ;;
-
-hpux9* | hpux10* | hpux11*)
-  # Give a soname corresponding to the major version so that dld.sl refuses to
-  # link against other versions.
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  if test "$host_cpu" = ia64; then
-    hardcode_into_libs=yes
-    dynamic_linker="$host_os dld.so"
-    shlibpath_var=LD_LIBRARY_PATH
-    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-    soname_spec='${libname}${release}.so$major'
-    if test "X$HPUX_IA64_MODE" = X32; then
-      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
-    else
-      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
-    fi
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-  else
-    dynamic_linker="$host_os dld.sl"
-    shlibpath_var=SHLIB_PATH
-    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
-    soname_spec='${libname}${release}.sl$major'
-  fi
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
-  postinstall_cmds='chmod 555 $lib'
-  ;;
-
-irix5* | irix6* | nonstopux*)
-  case $host_os in
-    nonstopux*) version_type=nonstopux ;;
-    *)          version_type=irix ;;
-  esac
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}.so$major'
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
-  case $host_os in
-  irix5* | nonstopux*)
-    libsuff= shlibsuff=
-    ;;
-  *)
-    case $LD in # libtool.m4 will add one of these switches to LD
-    *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
-    *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
-    *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
-    *) libsuff= shlibsuff= libmagic=never-match;;
-    esac
-    ;;
-  esac
-  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
-  shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
-  ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
-  dynamic_linker=no
-  ;;
-
-# This must be Linux ELF.
-linux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
-  libsuff=
-  if test "x$LINUX_64_MODE" = x64; then
-    # Some platforms are per default 64-bit, so there's no /lib64
-    if test -d /lib64; then
-      libsuff=64
-    fi
-  fi
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
-  sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
-  # This implies no fast_install, which is unacceptable.
-  # Some rework will be needed to allow for fast_install
-  # before this can be enabled.
-  hardcode_into_libs=yes
-
-  # We used to test for /lib/ld.so.1 and disable shared libraries on
-  # powerpc, because MkLinux only supported shared libraries with the
-  # GNU dynamic linker.  Since this was broken with cross compilers,
-  # most powerpc-linux boxes support dynamic linking these days and
-  # people can always --disable-shared, the test was removed, and we
-  # assume the GNU/Linux dynamic linker is in use.
-  dynamic_linker='GNU/Linux ld.so'
-  ;;
-
-netbsd*)
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
-    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-    dynamic_linker='NetBSD (a.out) ld.so'
-  else
-    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
-    soname_spec='${libname}${release}.so$major'
-    dynamic_linker='NetBSD ld.elf_so'
-  fi
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  ;;
-
-newsos6)
-  version_type=linux
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
-
-nto-qnx)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
-
-openbsd*)
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    case $host_os in
-      openbsd2.[[89]] | openbsd2.[[89]].*)
-	shlibpath_overrides_runpath=no
-	;;
-      *)
-	shlibpath_overrides_runpath=yes
-	;;
-      esac
-  else
-    shlibpath_overrides_runpath=yes
-  fi
-  ;;
-
-os2*)
-  libname_spec='$name'
-  need_lib_prefix=no
-  library_names_spec='$libname.dll $libname.a'
-  dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
-  ;;
-
-osf3* | osf4* | osf5*)
-  version_type=osf
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}.so'
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
-  ;;
-
-sco3.2v5*)
-  version_type=osf
-  soname_spec='${libname}${release}.so$major'
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-solaris*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  # ldd complains unless libraries are executable
-  postinstall_cmds='chmod +x $lib'
-  ;;
-
-sunos4*)
-  version_type=sunos
-  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
-  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
-    need_lib_prefix=no
-  fi
-  need_version=yes
-  ;;
-
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-  version_type=linux
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_vendor in
-    sni)
-      shlibpath_overrides_runpath=no
-      ;;
-    motorola)
-      need_lib_prefix=no
-      need_version=no
-      shlibpath_overrides_runpath=no
-      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
-      ;;
-  esac
-  ;;
-
-sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux
-    library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
-    soname_spec='$libname.so.$major'
-    shlibpath_var=LD_LIBRARY_PATH
-  fi
-  ;;
-
-uts4*)
-  version_type=linux
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-*)
-  dynamic_linker=no
-  ;;
-esac
-AC_MSG_RESULT([$dynamic_linker])
-test "$dynamic_linker" = no && can_build_shared=no
-])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
-
-
-# _LT_AC_TAGCONFIG
-# ----------------
-AC_DEFUN([_LT_AC_TAGCONFIG],
-[AC_ARG_WITH([tags],
-    [AC_HELP_STRING([--with-tags=TAGS],
-	[include additional configurations @<:@CXX,GCJ@:>@])],
-    [tagnames="$withval"],
-    [tagnames="CXX,GCJ"
-    case $host_os in
-      mingw*|cygwin*) tagnames="$tagnames,RC" ;;
-    esac])
-
-if test -f "$ltmain" && test -n "$tagnames"; then
-  if test ! -f "${ofile}"; then
-    AC_MSG_WARN([output file `$ofile' does not exist])
-  fi
-
-  if test -z "$LTCC"; then
-    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
-    if test -z "$LTCC"; then
-      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
-    else
-      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
-    fi
-  fi
-
-  # Extract list of available tagged configurations in $ofile.
-  # Note that this assumes the entire list is on one line.
-  available_tags=`grep "^available_tags=" "${ofile}" | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
-
-  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-  for tagname in $tagnames; do
-    IFS="$lt_save_ifs"
-    # Check whether tagname contains only valid characters
-    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
-    "") ;;
-    *)  AC_MSG_ERROR([invalid tag name: $tagname])
-	;;
-    esac
-
-    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
-    then
-      AC_MSG_ERROR([tag name \"$tagname\" already exists])
-    fi
-
-    # Update the list of available tags.
-    if test -n "$tagname"; then
-      echo appending configuration tag \"$tagname\" to $ofile
-
-      case $tagname in
-      CXX)
-	AC_LIBTOOL_LANG_CXX_CONFIG
-	;;
-
-      GCJ)
-	AC_LIBTOOL_LANG_GCJ_CONFIG
-	;;
-
-      RC)
-	AC_LIBTOOL_LANG_RC_CONFIG
-	;;
-
-      *)
-	AC_MSG_ERROR([Unsupported tag name: $tagname])
-	;;
-      esac
-
-      # Append the new tag name to the list of available tags.
-      available_tags="$available_tags $tagname"
-    fi
-  done
-  IFS="$lt_save_ifs"
-
-  # Now substitute the updated list of available tags.
-  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
-    mv "${ofile}T" "$ofile"
-    chmod +x "$ofile"
-  else
-    rm -f "${ofile}T"
-    AC_MSG_ERROR([unable to update list of available tagged configurations.])
-  fi
-fi
-])# _LT_AC_TAGCONFIG
-
-
-# AC_LIBTOOL_DLOPEN
-# -----------------
-# enable checks for dlopen support
-AC_DEFUN([AC_LIBTOOL_DLOPEN],
- [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
-])# AC_LIBTOOL_DLOPEN
-
-
-# AC_LIBTOOL_WIN32_DLL
-# --------------------
-# declare package support for building win32 dll's
-AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
-[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
-])# AC_LIBTOOL_WIN32_DLL
-
-
-# AC_ENABLE_SHARED([DEFAULT])
-# ---------------------------
-# implement the --enable-shared flag
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
-AC_DEFUN([AC_ENABLE_SHARED],
-[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE([shared],
-    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
-	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
-    [p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_shared=yes ;;
-    no) enable_shared=no ;;
-    *)
-      enable_shared=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-	IFS="$lt_save_ifs"
-	if test "X$pkg" = "X$p"; then
-	  enable_shared=yes
-	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac],
-    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
-])# AC_ENABLE_SHARED
-
-
-# AC_DISABLE_SHARED
-# -----------------
-#- set the default shared flag to --disable-shared
-AC_DEFUN([AC_DISABLE_SHARED],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_SHARED(no)
-])# AC_DISABLE_SHARED
-
-
-# AC_ENABLE_STATIC([DEFAULT])
-# ---------------------------
-# implement the --enable-static flag
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
-AC_DEFUN([AC_ENABLE_STATIC],
-[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE([static],
-    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
-	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
-    [p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_static=yes ;;
-    no) enable_static=no ;;
-    *)
-     enable_static=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-	IFS="$lt_save_ifs"
-	if test "X$pkg" = "X$p"; then
-	  enable_static=yes
-	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac],
-    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
-])# AC_ENABLE_STATIC
-
-
-# AC_DISABLE_STATIC
-# -----------------
-# set the default static flag to --disable-static
-AC_DEFUN([AC_DISABLE_STATIC],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_STATIC(no)
-])# AC_DISABLE_STATIC
-
-
-# AC_ENABLE_FAST_INSTALL([DEFAULT])
-# ---------------------------------
-# implement the --enable-fast-install flag
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
-AC_DEFUN([AC_ENABLE_FAST_INSTALL],
-[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE([fast-install],
-    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
-    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
-    [p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_fast_install=yes ;;
-    no) enable_fast_install=no ;;
-    *)
-      enable_fast_install=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-	IFS="$lt_save_ifs"
-	if test "X$pkg" = "X$p"; then
-	  enable_fast_install=yes
-	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac],
-    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
-])# AC_ENABLE_FAST_INSTALL
-
-
-# AC_DISABLE_FAST_INSTALL
-# -----------------------
-# set the default to --disable-fast-install
-AC_DEFUN([AC_DISABLE_FAST_INSTALL],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_FAST_INSTALL(no)
-])# AC_DISABLE_FAST_INSTALL
-
-
-# AC_LIBTOOL_PICMODE([MODE])
-# --------------------------
-# implement the --with-pic flag
-# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
-AC_DEFUN([AC_LIBTOOL_PICMODE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-pic_mode=ifelse($#,1,$1,default)
-])# AC_LIBTOOL_PICMODE
-
-
-# AC_PATH_TOOL_PREFIX
-# -------------------
-# find a file program which can recognise shared library
-AC_DEFUN([AC_PATH_TOOL_PREFIX],
-[AC_MSG_CHECKING([for $1])
-AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
-[case $MAGIC_CMD in
-[[\\/*] |  ?:[\\/]*])
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
-  ;;
-*)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-dnl $ac_dummy forces splitting on constant user-supplied paths.
-dnl POSIX.2 word splitting is done only on the output of word expansions,
-dnl not every word.  This closes a longstanding sh security hole.
-  ac_dummy="ifelse([$2], , $PATH, [$2])"
-  for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$1; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
-      if test -n "$file_magic_test_file"; then
-	case $deplibs_check_method in
-	"file_magic "*)
-	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
-	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
-	    egrep "$file_magic_regex" > /dev/null; then
-	    :
-	  else
-	    cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such.  This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem.  Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool at gnu.org
-
-EOF
-	  fi ;;
-	esac
-      fi
-      break
-    fi
-  done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
-  ;;
-esac])
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
-  AC_MSG_RESULT($MAGIC_CMD)
-else
-  AC_MSG_RESULT(no)
-fi
-])# AC_PATH_TOOL_PREFIX
-
-
-# AC_PATH_MAGIC
-# -------------
-# find a file program which can recognise a shared library
-AC_DEFUN([AC_PATH_MAGIC],
-[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
-if test -z "$lt_cv_path_MAGIC_CMD"; then
-  if test -n "$ac_tool_prefix"; then
-    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
-  else
-    MAGIC_CMD=:
-  fi
-fi
-])# AC_PATH_MAGIC
-
-
-# AC_PROG_LD
-# ----------
-# find the path to the GNU or non-GNU linker
-AC_DEFUN([AC_PROG_LD],
-[AC_ARG_WITH([gnu-ld],
-    [AC_HELP_STRING([--with-gnu-ld],
-	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
-    [test "$withval" = no || with_gnu_ld=yes],
-    [with_gnu_ld=no])
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-ac_prog=ld
-if test "$GCC" = yes; then
-  # Check if gcc -print-prog-name=ld gives a path.
-  AC_MSG_CHECKING([for ld used by GCC])
-  case $host in
-  *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
-    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
-  *)
-    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
-  esac
-  case $ac_prog in
-    # Accept absolute paths.
-    [[\\/]]* | ?:[[\\/]]*)
-      re_direlt='/[[^/]][[^/]]*/\.\./'
-      # Canonicalize the path of ld
-      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
-      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
-	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
-      done
-      test -z "$LD" && LD="$ac_prog"
-      ;;
-  "")
-    # If it fails, then pretend we aren't using GCC.
-    ac_prog=ld
-    ;;
-  *)
-    # If it is relative, then search for the first ld in PATH.
-    with_gnu_ld=unknown
-    ;;
-  esac
-elif test "$with_gnu_ld" = yes; then
-  AC_MSG_CHECKING([for GNU ld])
-else
-  AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(lt_cv_path_LD,
-[if test -z "$LD"; then
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for ac_dir in $PATH; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      lt_cv_path_LD="$ac_dir/$ac_prog"
-      # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some GNU ld's only accept -v.
-      # Break only if it was the GNU/non-GNU ld that we prefer.
-      if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
-	test "$with_gnu_ld" != no && break
-      else
-	test "$with_gnu_ld" != yes && break
-      fi
-    fi
-  done
-  IFS="$lt_save_ifs"
-else
-  lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
-  AC_MSG_RESULT($LD)
-else
-  AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_PROG_LD_GNU
-])# AC_PROG_LD
-
-
-# AC_PROG_LD_GNU
-# --------------
-AC_DEFUN([AC_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
-  lt_cv_prog_gnu_ld=yes
-else
-  lt_cv_prog_gnu_ld=no
-fi])
-with_gnu_ld=$lt_cv_prog_gnu_ld
-])# AC_PROG_LD_GNU
-
-
-# AC_PROG_LD_RELOAD_FLAG
-# ----------------------
-# find reload flag for linker
-#   -- PORTME Some linkers may need a different reload flag.
-AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
-[AC_CACHE_CHECK([for $LD option to reload object files],
-  lt_cv_ld_reload_flag,
-  [lt_cv_ld_reload_flag='-r'])
-reload_flag=$lt_cv_ld_reload_flag
-case $reload_flag in
-"" | " "*) ;;
-*) reload_flag=" $reload_flag" ;;
-esac
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-])# AC_PROG_LD_RELOAD_FLAG
-
-
-# AC_DEPLIBS_CHECK_METHOD
-# -----------------------
-# how to check for library dependencies
-#  -- PORTME fill in with the dynamic library characteristics
-AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
-[AC_CACHE_CHECK([how to recognise dependant libraries],
-lt_cv_deplibs_check_method,
-[lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given egrep regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix4* | aix5*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-beos*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-bsdi4*)
-  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
-  lt_cv_file_magic_cmd='/usr/bin/file -L'
-  lt_cv_file_magic_test_file=/shlib/libc.so
-  ;;
-
-cygwin* | mingw* | pw32*)
-  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
-  lt_cv_file_magic_cmd='$OBJDUMP -f'
-  ;;
-
-darwin* | rhapsody*)
-  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
-  lt_cv_file_magic_cmd='/usr/bin/file -L'
-  case "$host_os" in
-  rhapsody* | darwin1.[[012]])
-    lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
-    ;;
-  *) # Darwin 1.3 on
-    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
-    ;;
-  esac
-  ;;
-
-freebsd*)
-  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
-    case $host_cpu in
-    i*86 )
-      # Not sure whether the presence of OpenBSD here was a mistake.
-      # Let's accept both of them until this is cleared up.
-      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
-      lt_cv_file_magic_cmd=/usr/bin/file
-      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
-      ;;
-    esac
-  else
-    lt_cv_deplibs_check_method=pass_all
-  fi
-  ;;
-
-gnu*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-hpux10.20* | hpux11*)
-  lt_cv_file_magic_cmd=/usr/bin/file
-  if test "$host_cpu" = ia64; then
-    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
-    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
-  else
-    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
-    lt_cv_file_magic_test_file=/usr/lib/libc.sl
-  fi
-  ;;
-
-irix5* | irix6* | nonstopux*)
-  case $host_os in
-  irix5* | nonstopux*)
-    # this will be overridden with pass_all, but let us keep it just in case
-    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
-    ;;
-  *)
-    case $LD in
-    *-32|*"-32 ") libmagic=32-bit;;
-    *-n32|*"-n32 ") libmagic=N32;;
-    *-64|*"-64 ") libmagic=64-bit;;
-    *) libmagic=never-match;;
-    esac
-    # this will be overridden with pass_all, but let us keep it just in case
-    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
-    ;;
-  esac
-  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-# This must be Linux ELF.
-linux*)
-  case $host_cpu in
-  alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh* | x86_64* )
-    lt_cv_deplibs_check_method=pass_all ;;
-  *)
-    # glibc up to 2.1.1 does not perform some relocations on ARM
-    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
-  esac
-  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
-  ;;
-
-netbsd*)
-  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
-  else
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
-  fi
-  ;;
-
-newos6*)
-  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
-  lt_cv_file_magic_cmd=/usr/bin/file
-  lt_cv_file_magic_test_file=/usr/lib/libnls.so
-  ;;
-
-nto-qnx)
-  lt_cv_deplibs_check_method=unknown
-  ;;
-
-openbsd*)
-  lt_cv_file_magic_cmd=/usr/bin/file
-  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
-  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
-  else
-    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
-  fi
-  ;;
-
-osf3* | osf4* | osf5*)
-  # this will be overridden with pass_all, but let us keep it just in case
-  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
-  lt_cv_file_magic_test_file=/shlib/libc.so
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-sco3.2v5*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-solaris*)
-  lt_cv_deplibs_check_method=pass_all
-  lt_cv_file_magic_test_file=/lib/libc.so
-  ;;
-
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-  case $host_vendor in
-  motorola)
-    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
-    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
-    ;;
-  ncr)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  sequent)
-    lt_cv_file_magic_cmd='/bin/file'
-    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
-    ;;
-  sni)
-    lt_cv_file_magic_cmd='/bin/file'
-    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
-    lt_cv_file_magic_test_file=/lib/libc.so
-    ;;
-  esac
-  ;;
-
-sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-esac
-])
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
-])# AC_DEPLIBS_CHECK_METHOD
-
-
-# AC_PROG_NM
-# ----------
-# find the path to a BSD-compatible name lister
-AC_DEFUN([AC_PROG_NM],
-[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
-[if test -n "$NM"; then
-  # Let the user override the test.
-  lt_cv_path_NM="$NM"
-else
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
-    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
-      # Check to see if the nm accepts a BSD-compat flag.
-      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
-      #   nm: unknown option "B" ignored
-      # Tru64's nm complains that /dev/null is an invalid object file
-      if ("$tmp_nm" -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
-	lt_cv_path_NM="$tmp_nm -B"
-	break
-      elif ("$tmp_nm" -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
-	lt_cv_path_NM="$tmp_nm -p"
-	break
-      else
-	lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
-	continue # so that we can try to find one that supports BSD flags
-      fi
-    fi
-  done
-  IFS="$lt_save_ifs"
-  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
-fi])
-NM="$lt_cv_path_NM"
-])# AC_PROG_NM
-
-
-# AC_CHECK_LIBM
-# -------------
-# check for math library
-AC_DEFUN([AC_CHECK_LIBM],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32*)
-  # These system don't have libm
-  ;;
-*-ncr-sysv4.3*)
-  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
-  AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
-  ;;
-*)
-  AC_CHECK_LIB(m, main, LIBM="-lm")
-  ;;
-esac
-])# AC_CHECK_LIBM
-
-
-# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
-# -----------------------------------
-# sets LIBLTDL to the link flags for the libltdl convenience library and
-# LTDLINCL to the include flags for the libltdl header and adds
-# --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
-# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
-# DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
-# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
-# '${top_srcdir}/' (note the single quotes!).  If your package is not
-# flat and you're not using automake, define top_builddir and
-# top_srcdir appropriately in the Makefiles.
-AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-  case $enable_ltdl_convenience in
-  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
-  "") enable_ltdl_convenience=yes
-      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
-  esac
-  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
-  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
-  # For backwards non-gettext consistent compatibility...
-  INCLTDL="$LTDLINCL"
-])# AC_LIBLTDL_CONVENIENCE
-
-
-# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
-# -----------------------------------
-# sets LIBLTDL to the link flags for the libltdl installable library and
-# LTDLINCL to the include flags for the libltdl header and adds
-# --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
-# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
-# DIRECTORY is not provided and an installed libltdl is not found, it is
-# assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
-# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
-# quotes!).  If your package is not flat and you're not using automake,
-# define top_builddir and top_srcdir appropriately in the Makefiles.
-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
-AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-  AC_CHECK_LIB(ltdl, main,
-  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
-  [if test x"$enable_ltdl_install" = xno; then
-     AC_MSG_WARN([libltdl not installed, but installation disabled])
-   else
-     enable_ltdl_install=yes
-   fi
-  ])
-  if test x"$enable_ltdl_install" = x"yes"; then
-    ac_configure_args="$ac_configure_args --enable-ltdl-install"
-    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
-    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
-  else
-    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
-    LIBLTDL="-lltdl"
-    LTDLINCL=
-  fi
-  # For backwards non-gettext consistent compatibility...
-  INCLTDL="$LTDLINCL"
-])# AC_LIBLTDL_INSTALLABLE
-
-
-# If this macro is not defined by Autoconf, define it here.
-ifdef([AC_PROVIDE_IFELSE],
-      [],
-      [define([AC_PROVIDE_IFELSE],
-	      [ifdef([AC_PROVIDE_$1],
-		     [$2], [$3])])])
-
-
-# AC_LIBTOOL_CXX
-# --------------
-# enable support for C++ libraries
-AC_DEFUN([AC_LIBTOOL_CXX],
-[AC_REQUIRE([_LT_AC_LANG_CXX])
-])# AC_LIBTOOL_CXX
-
-
-# _LT_AC_LANG_CXX
-# ---------------
-AC_DEFUN([_LT_AC_LANG_CXX],
-[AC_REQUIRE([AC_PROG_CXX])
-AC_REQUIRE([AC_PROG_CXXCPP])
-])# _LT_AC_LANG_CXX
-
-
-# AC_LIBTOOL_GCJ
-# --------------
-# enable support for GCJ libraries
-AC_DEFUN([AC_LIBTOOL_GCJ],
-[AC_REQUIRE([_LT_AC_LANG_GCJ])
-])# AC_LIBTOOL_GCJ
-
-
-# _LT_AC_LANG_GCJ
-# ---------------
-AC_DEFUN([_LT_AC_LANG_GCJ],
-[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
-  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
-    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
-      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
-	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
-	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
-])# _LT_AC_LANG_GCJ
-
-
-# AC_LIBTOOL_RC
-# --------------
-# enable support for Windows resource files
-AC_DEFUN([AC_LIBTOOL_RC],
-[AC_REQUIRE([AC_PROG_RC])
-])# AC_LIBTOOL_RC
-
-
-# AC_LIBTOOL_LANG_C_CONFIG
-# ------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined.  Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
-AC_DEFUN([_LT_AC_LANG_C_CONFIG],
-[lt_save_CC="$CC"
-AC_LANG_PUSH(C)
-
-# Source file extension for C test sources.
-ac_ext=c
-
-# Object file extension for compiled C test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='main(){return(0);}'
-
-_LT_AC_SYS_COMPILER
-
-#
-# Check for any special shared library compilation flags.
-#
-_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
-if test "$GCC" = no; then
-  case $host_os in
-  sco3.2v5*)
-    _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
-    ;;
-  esac
-fi
-if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
-  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
-  if echo "$old_CC $old_CFLAGS " | egrep -e "[[ 	]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ 	]]" >/dev/null; then :
-  else
-    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
-    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
-  fi
-fi
-
-
-#
-# Check to make sure the static flag actually works.
-#
-AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
-  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
-  $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
-  [],
-  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
-
-
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
-AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-AC_LIBTOOL_SYS_LIB_STRIP
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_DLOPEN_SELF($1)
-
-# Report which librarie types wil actually be built
-AC_MSG_CHECKING([if libtool supports shared libraries])
-AC_MSG_RESULT([$can_build_shared])
-
-AC_MSG_CHECKING([whether to build shared libraries])
-test "$can_build_shared" = "no" && enable_shared=no
-
-# On AIX, shared libraries and static libraries use the same namespace, and
-# are all built from PIC.
-case "$host_os" in
-aix3*)
-  test "$enable_shared" = yes && enable_static=no
-  if test -n "$RANLIB"; then
-    archive_cmds="$archive_cmds~\$RANLIB \$lib"
-    postinstall_cmds='$RANLIB $lib'
-  fi
-  ;;
-
-aix4*)
-  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-    test "$enable_shared" = yes && enable_static=no
-  fi
-  ;;
-esac
-AC_MSG_RESULT([$enable_shared])
-
-AC_MSG_CHECKING([whether to build static libraries])
-# Make sure either enable_shared or enable_static is yes.
-test "$enable_shared" = yes || enable_static=yes
-AC_MSG_RESULT([$enable_static])
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_POP
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_C_CONFIG
-
-
-# AC_LIBTOOL_LANG_CXX_CONFIG
-# --------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined.  Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
-AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
-[AC_LANG_PUSH(C++)
-AC_REQUIRE([AC_PROG_CXX])
-AC_REQUIRE([AC_PROG_CXXCPP])
-
-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_AC_TAGVAR(allow_undefined_flag, $1)=
-_LT_AC_TAGVAR(always_export_symbols, $1)=no
-_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
-_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_AC_TAGVAR(hardcode_direct, $1)=no
-_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
-_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_AC_TAGVAR(no_undefined_flag, $1)=
-_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-
-# Dependencies to place before and after the object being linked:
-_LT_AC_TAGVAR(predep_objects, $1)=
-_LT_AC_TAGVAR(postdep_objects, $1)=
-_LT_AC_TAGVAR(predeps, $1)=
-_LT_AC_TAGVAR(postdeps, $1)=
-_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
-
-# Source file extension for C test sources.
-ac_ext=cc
-
-# Object file extension for compiled C test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(int char *[]) { return(0); }'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${CXX-"c++"}
-set dummy $CC
-compiler="[$]2"
-_LT_AC_TAGVAR(compiler, $1)=$CC
-cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
-
-# We don't want -fno-exception wen compiling C++ code, so set the
-# no_builtin_flag separately
-if test "$GXX" = yes; then
-  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
-else
-  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-fi
-
-if test "$GXX" = yes; then
-  # Set up default GNU C++ configuration
-
-  # Check if GNU C++ uses GNU ld as the underlying linker, since the
-  # archiving commands below assume that GNU ld is being used.
-  if eval "`$CC -print-prog-name=ld` --version 2>&1" | \
-      egrep 'GNU ld' > /dev/null; then
-    with_gnu_ld=yes
-
-    _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(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
-    # If archive_cmds runs LD, not CC, wlarc should be empty
-    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
-    #     investigate it a little bit more. (MM)
-    wlarc='${wl}'
-
-    # ancient GNU ld didn't support --whole-archive et. al.
-    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
-	egrep 'no-whole-archive' > /dev/null; then
-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-    else
-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-    fi
-  else
-    with_gnu_ld=no
-    wlarc=
-
-    # A generic and very simple default shared library creation
-    # command for GNU C++ for the case where it uses the native
-    # 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 $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-  fi
-
-  # Commands to make compiler produce verbose output that lists
-  # what "hidden" libraries, object files and flags are used when
-  # linking a shared library.
-  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
-
-else
-  GXX=no
-  with_gnu_ld=no
-  wlarc=
-fi
-
-# PORTME: fill in a description of your system's C++ link characteristics
-AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-_LT_AC_TAGVAR(ld_shlibs, $1)=yes
-case $host_os in
-  aix3*)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  aix4* | aix5*)
-    if test "$host_cpu" = ia64; then
-      # On IA64, the linker does run time linking by default, so we don't
-      # have to do anything special.
-      aix_use_runtimelinking=no
-      exp_sym_flag='-Bexport'
-      no_entry_flag=""
-    else
-      # KDE requires run time linking.  Make it the default.
-      aix_use_runtimelinking=yes
-      exp_sym_flag='-bexport'
-      no_entry_flag='-bnoentry'
-    fi
-
-    # When large executables or shared objects are built, AIX ld can
-    # have problems creating the table of contents.  If linking a library
-    # or program results in "error TOC overflow" add -mminimal-toc to
-    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
-    _LT_AC_TAGVAR(archive_cmds, $1)=''
-    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
-    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-
-    if test "$GXX" = yes; then
-      case $host_os in aix4.[012]|aix4.[012].*)
-      # We only want to do this on AIX 4.2 and lower, the check
-      # below for broken collect2 doesn't work under 4.3+
-	collect2name=`${CC} -print-prog-name=collect2`
-	if test -f "$collect2name" && \
-	   strings "$collect2name" | grep resolve_lib_name >/dev/null
-	then
-	  # We have reworked collect2
-	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-	else
-	  # We have old collect2
-	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
-	  # It fails to find uninstalled libraries when the uninstalled
-	  # path is not listed in the libpath.  Setting hardcode_minus_L
-	  # to unsupported forces relinking
-	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-	fi
-      esac
-      shared_flag='-shared'
-    else
-      # not using gcc
-      if test "$host_cpu" = ia64; then
-	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-	# chokes on -Wl,-G. The following line is correct:
-	shared_flag='-G'
-      else
-	if test "$aix_use_runtimelinking" = yes; then
-	  shared_flag='-qmkshrobj ${wl}-G'
-	else
-	  shared_flag='-qmkshrobj'
-	fi
-      fi
-    fi
-
-    # Let the compiler handle the export list.
-    _LT_AC_TAGVAR(always_export_symbols, $1)=no
-    if test "$aix_use_runtimelinking" = yes; then
-      # Warning - without using the other runtime loading flags (-brtl),
-      # -berok will link without error, but may produce a broken library.
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
-      # 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:'"$aix_libpath"
-
-      _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-     else
-      if test "$host_cpu" = ia64; then
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
-      else
-	# 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:'"$aix_libpath"
-	# Warning - without using the other run time loading flags,
-	# -berok will link without error, but may produce a broken library.
-	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-	# -bexpall does not export symbols beginning with underscore (_)
-	_LT_AC_TAGVAR(always_export_symbols, $1)=yes
-	# Exported symbols can be pulled into shared objects from archives
-	_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)="\$CC $shared_flag"' -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'
-      fi
-    fi
-    ;;
-  chorus*)
-    case $cc_basename in
-      *)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-    esac
-    ;;
-  dgux*)
-    case $cc_basename in
-      ec++)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      ghcx)
-	# Green Hills C++ Compiler
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      *)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-    esac
-    ;;
-  freebsd[12]*)
-    # C++ shared libraries reported to be fairly broken before switch to ELF
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  freebsd-elf*)
-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-    ;;
-  freebsd*)
-    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
-    # conventions
-    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
-    ;;
-  gnu*)
-    ;;
-  hpux*)
-    if test $with_gnu_ld = no; then
-      if test "$host_cpu" = ia64; then
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      else
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-      fi
-    fi
-    if test "$host_cpu" = ia64; then
-      _LT_AC_TAGVAR(hardcode_direct, $1)=no
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-    else
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-    fi
-    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
-					    # but as the default
-					    # location of the library.
-
-    case $cc_basename in
-      CC)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      aCC)
-	case $host_os in
-	hpux9*)
-	  _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'
-	  ;;
-	*)
-	  if test "$host_cpu" = ia64; then
-	    _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
-	  else
-	    _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'
-	  fi
-	  ;;
-	esac
-	# Commands to make compiler produce verbose output that lists
-	# what "hidden" libraries, object files and flags are used when
-	# linking a shared library.
-	#
-	# There doesn't appear to be a way to prevent this compiler from
-	# explicitly linking system object files so we need to strip them
-	# from the output so that they don't get included in the library
-	# dependencies.
-	output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-	;;
-      *)
-	if test "$GXX" = yes; then
-	  if test $with_gnu_ld = no; then
-	    case $host_os in
-	    hpux9*)
-	      _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'
-	      ;;
-	    *)
-	      if test "$host_cpu" = ia64; then
-		_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
-	      else
-		_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'
-	      fi
-	      ;;
-	    esac
-	  fi
-	else
-	  # FIXME: insert proper C++ library support
-	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
-	fi
-	;;
-    esac
-    ;;
-  irix5* | irix6*)
-    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 "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
-
-	# Archives containing C++ object files must be created using
-	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
-	# necessary to make sure instantiated templates are included
-	# in the archive.
-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
-	;;
-      *)
-	if test "$GXX" = yes; then
-	  if test "$with_gnu_ld" = 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 "$verstring" && 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 $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
-	  fi
-	fi
-	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-	;;
-    esac
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-    ;;
-  linux*)
-    case $cc_basename in
-      KCC)
-	# Kuck and Associates, Inc. (KAI) C++ Compiler
-
-	# KCC will only create a shared library if the output file
-	# ends with ".so" (or ".sl" for HP-UX), so rename the library
-	# to its proper name (with version) after linking.
-	_LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
-
-	# Commands to make compiler produce verbose output that lists
-	# what "hidden" libraries, object files and flags are used when
-	# linking a shared library.
-	#
-	# There doesn't appear to be a way to prevent this compiler from
-	# explicitly linking system object files so we need to strip them
-	# from the output so that they don't get included in the library
-	# dependencies.
-	output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
-	# Archives containing C++ object files must be created using
-	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
-	;;
-      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'
-
-	runpath_var=LD_RUN_PATH
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-	# Commands to make compiler produce verbose output that lists
-	# what "hidden" libraries, object files and flags are used when
-	# linking a shared library.
-	#
-	# There doesn't appear to be a way to prevent this compiler from
-	# explicitly linking system object files so we need to strip them
-	# from the output so that they don't get included in the library
-	# dependencies.
-	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-	;;
-    esac
-    ;;
-  lynxos*)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  m88k*)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  mvs*)
-    case $cc_basename in
-      cxx)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      *)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-    esac
-    ;;
-  netbsd*)
-    # NetBSD uses g++ - do we need to do anything?
-    ;;
-  osf3*)
-    case $cc_basename in
-      KCC)
-	# Kuck and Associates, Inc. (KAI) C++ Compiler
-
-	# KCC will only create a shared library if the output file
-	# ends with ".so" (or ".sl" for HP-UX), so rename the library
-	# to its proper name (with version) after linking.
-	_LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --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)=:
-
-	# Archives containing C++ object files must be created using
-	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
-
-	;;
-      RCC)
-	# Rational C++ 2.4.1
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      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 "$verstring" && 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)=:
-
-	# Commands to make compiler produce verbose output that lists
-	# what "hidden" libraries, object files and flags are used when
-	# linking a shared library.
-	#
-	# There doesn't appear to be a way to prevent this compiler from
-	# explicitly linking system object files so we need to strip them
-	# from the output so that they don't get included in the library
-	# dependencies.
-	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-	;;
-      *)
-	if test "$GXX" = yes && test "$with_gnu_ld" = 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 "$verstring" && 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)=:
-
-	  # Commands to make compiler produce verbose output that lists
-	  # what "hidden" libraries, object files and flags are used when
-	  # linking a shared library.
-	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
-
-	else
-	  # FIXME: insert proper C++ library support
-	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
-	fi
-	;;
-    esac
-    ;;
-  osf4* | osf5*)
-    case $cc_basename in
-      KCC)
-	# Kuck and Associates, Inc. (KAI) C++ Compiler
-
-	# KCC will only create a shared library if the output file
-	# ends with ".so" (or ".sl" for HP-UX), so rename the library
-	# to its proper name (with version) after linking.
-	_LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --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)=:
-
-	# Archives containing C++ object files must be created using
-	# the KAI C++ compiler.
-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
-	;;
-      RCC)
-	# Rational C++ 2.4.1
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      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 "$verstring" && 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 "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done~
-	  echo "-hidden">> $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 "$verstring" && echo -set_version	$verstring` -update_registry $objdir/so_locations -o $lib~
-	  $rm $lib.exp'
-
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-	# Commands to make compiler produce verbose output that lists
-	# what "hidden" libraries, object files and flags are used when
-	# linking a shared library.
-	#
-	# There doesn't appear to be a way to prevent this compiler from
-	# explicitly linking system object files so we need to strip them
-	# from the output so that they don't get included in the library
-	# dependencies.
-	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-	;;
-      *)
-	if test "$GXX" = yes && test "$with_gnu_ld" = 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 "$verstring" && 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)=:
-
-	  # Commands to make compiler produce verbose output that lists
-	  # what "hidden" libraries, object files and flags are used when
-	  # linking a shared library.
-	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
-
-	else
-	  # FIXME: insert proper C++ library support
-	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
-	fi
-	;;
-    esac
-    ;;
-  psos*)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  sco*)
-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-    case $cc_basename in
-      CC)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      *)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-    esac
-    ;;
-  sunos4*)
-    case $cc_basename in
-      CC)
-	# Sun C++ 4.x
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      lcc)
-	# Lucid
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      *)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-    esac
-    ;;
-  solaris*)
-    case $cc_basename 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_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $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'
-
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-	case $host_os in
-	  solaris2.[0-5] | solaris2.[0-5].*) ;;
-	  *)
-	    # The C++ compiler is used as linker so we must use $wl
-	    # flag to pass the commands to the underlying system
-	    # linker.
-	    # Supported since Solaris 2.6 (maybe 2.5.1?)
-	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
-	    ;;
-	esac
-	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-
-	# Commands to make compiler produce verbose output that lists
-	# what "hidden" libraries, object files and flags are used when
-	# linking a shared library.
-	#
-	# There doesn't appear to be a way to prevent this compiler from
-	# explicitly linking system object files so we need to strip them
-	# from the output so that they don't get included in the library
-	# dependencies.
-	output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-
-	# Archives containing C++ object files must be created using
-	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
-	# necessary to make sure instantiated templates are included
-	# in the archive.
-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
-	;;
-      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'
-
-	# The C++ compiler must be used to create the archive.
-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
-	;;
-      *)
-	# GNU C++ compiler with Solaris linker
-	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
-	  if $CC --version | egrep -v '^2\.7' > /dev/null; then
-	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
-	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
-
-	    # Commands to make compiler produce verbose output that lists
-	    # what "hidden" libraries, object files and flags are used when
-	    # linking a shared library.
-	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
-	  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 $linker_flags ${wl}-h $wl$soname -o $lib'
-	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
-
-	    # Commands to make compiler produce verbose output that lists
-	    # what "hidden" libraries, object files and flags are used when
-	    # linking a shared library.
-	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
-	  fi
-
-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
-	fi
-	;;
-    esac
-    ;;
-  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-    ;;
-  tandem*)
-    case $cc_basename in
-      NCC)
-	# NonStop-UX NCC 3.20
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      *)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-    esac
-    ;;
-  vxworks*)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  *)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-esac
-AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
-# Figure out "hidden" C++ library dependencies from verbose
-# compiler output whening linking a shared library.
-cat > conftest.$ac_ext <<EOF
-class Foo
-{
-public:
-  Foo (void) { a = 0; }
-private:
-  int a;
-};
-EOF
-
-
-if AC_TRY_EVAL(ac_compile); then
-  # Parse the compiler output and extract the necessary
-  # objects, libraries and library flags.
-
-  # Sentinel used to keep track of whether or not we are before
-  # the conftest object file.
-  pre_test_object_deps_done=no
-
-  # The `*' in the case matches for architectures that use `case' in
-  # $output_verbose_cmd can trigger glob expansion during the loop
-  # eval without this substitution.
-  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
-
-  for p in `eval $output_verbose_link_cmd`; do
-    case $p in
-
-    -L* | -R* | -l*)
-       # Some compilers place space between "-{L,R}" and the path.
-       # Remove the space.
-       if test $p = "-L" \
-	  || test $p = "-R"; then
-	 prev=$p
-	 continue
-       else
-	 prev=
-       fi
-
-       if test "$pre_test_object_deps_done" = no; then
-	 case $p in
-	 -L* | -R*)
-	   # Internal compiler library paths should come after those
-	   # provided the user.  The postdeps already come after the
-	   # user supplied libs so there is no need to process them.
-	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
-	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
-	   else
-	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
-	   fi
-	   ;;
-	 # The "-l" case would never come before the object being
-	 # linked, so don't bother handling this case.
-	 esac
-       else
-	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
-	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
-	 else
-	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
-	 fi
-       fi
-       ;;
-
-    *.$objext|*.$libext)
-       # This assumes that the test object file only shows up
-       # once in the compiler output.
-       if test "$p" = "conftest.$objext"; then
-	 pre_test_object_deps_done=yes
-	 continue
-       fi
-
-       if test "$pre_test_object_deps_done" = no; then
-	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
-	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
-	 else
-	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
-	 fi
-       else
-	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
-	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
-	 else
-	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
-	 fi
-       fi
-       ;;
-
-    *) ;; # Ignore the rest.
-
-    esac
-  done
-
-  # Clean up.
-  rm -f a.out
-else
-  echo "libtool.m4: error: problem compiling C++ test program"
-fi
-
-$rm -f confest.$objext
-
-case " $_LT_AC_TAGVAR(postdeps, $1) " in
-*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
-*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ;;
-esac
-
-_LT_AC_TAGVAR(GCC, $1)="$GXX"
-_LT_AC_TAGVAR(LD, $1)="$LD"
-
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-AC_LIBTOOL_SYS_LIB_STRIP
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_DLOPEN_SELF($1)
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_POP
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_CXX_CONFIG
-
-
-# AC_LIBTOOL_LANG_GCJ_CONFIG
-# --------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined.  Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
-AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
-[AC_LANG_SAVE
-
-# Source file extension for C test sources.
-ac_ext=java
-
-# Object file extension for compiled C test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${GCJ-"gcj"}
-set dummy $CC
-compiler="[$]2"
-_LT_AC_TAGVAR(compiler, $1)=$CC
-
-# GCJ did not exist at the time GCC didn't implicitly link libc in.
-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
-AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-AC_LIBTOOL_SYS_LIB_STRIP
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_DLOPEN_SELF($1)
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_RESTORE
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_GCJ_CONFIG
-
-
-# AC_LIBTOOL_LANG_RC_CONFIG
-# --------------------------
-# Ensure that the configuration vars for the Windows resource compiler are
-# suitably defined.  Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
-AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
-[AC_LANG_SAVE
-
-# Source file extension for RC test sources.
-ac_ext=rc
-
-# Object file extension for compiled RC test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
-
-# Code to be used in simple link tests
-lt_simple_link_test_code="$lt_simple_compile_test_code"
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${RC-"windres"}
-set dummy $CC
-compiler="[$]2"
-_LT_AC_TAGVAR(compiler, $1)=$CC
-_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_RESTORE
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_RC_CONFIG
-
-
-# AC_LIBTOOL_CONFIG([TAGNAME])
-# ----------------------------
-# If TAGNAME is not passed, then create an initial libtool script
-# with a default configuration from the untagged config vars.  Otherwise
-# add code to config.status for appending the configuration named by
-# TAGNAME from the matching tagged config vars.
-AC_DEFUN([AC_LIBTOOL_CONFIG],
-[# The else clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
-  # Now quote all the things that may contain metacharacters while being
-  # careful not to overquote the AC_SUBSTed values.  We take copies of the
-  # variables and quote the copies for generation of the libtool script.
-  for var in echo old_CC old_CFLAGS AR AR_FLAGS RANLIB LN_S LTCC NM SED SHELL \
-    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
-    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
-    deplibs_check_method reload_flag reload_cmds need_locks \
-    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
-    lt_cv_sys_global_symbol_to_c_name_address \
-    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
-    old_postinstall_cmds old_postuninstall_cmds \
-    _LT_AC_TAGVAR(compiler, $1) \
-    _LT_AC_TAGVAR(CC, $1) \
-    _LT_AC_TAGVAR(LD, $1) \
-    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
-    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
-    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
-    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
-    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
-    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
-    _LT_AC_TAGVAR(old_archive_cmds, $1) \
-    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
-    _LT_AC_TAGVAR(predep_objects, $1) \
-    _LT_AC_TAGVAR(postdep_objects, $1) \
-    _LT_AC_TAGVAR(predeps, $1) \
-    _LT_AC_TAGVAR(postdeps, $1) \
-    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
-    _LT_AC_TAGVAR(archive_cmds, $1) \
-    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
-    _LT_AC_TAGVAR(postinstall_cmds, $1) \
-    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
-    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
-    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
-    _LT_AC_TAGVAR(no_undefined_flag, $1) \
-    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
-    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
-    _LT_AC_TAGVAR(exclude_expsyms, $1) \
-    _LT_AC_TAGVAR(include_expsyms, $1); do
-
-    case $var in
-    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
-    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
-    _LT_AC_TAGVAR(archive_cmds, $1) | \
-    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
-    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
-    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
-    extract_expsyms_cmds | reload_cmds | finish_cmds | \
-    postinstall_cmds | postuninstall_cmds | \
-    old_postinstall_cmds | old_postuninstall_cmds | \
-    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
-      # Double-quote double-evaled strings.
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
-      ;;
-    *)
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
-      ;;
-    esac
-  done
-
-  case $lt_echo in
-  *'\[$]0 --fallback-echo"')
-    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
-    ;;
-  esac
-
-ifelse([$1], [],
-  [cfgfile="${ofile}T"
-  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
-  $rm -f "$cfgfile"
-  AC_MSG_NOTICE([creating $ofile])],
-  [cfgfile="$ofile"])
-
-  cat <<__EOF__ >> "$cfgfile"
-ifelse([$1], [],
-[#! $SHELL
-
-# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
-# Free Software Foundation, Inc.
-#
-# This file is part of GNU Libtool:
-# Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
-#
-# 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
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# 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.
-#
-# 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.
-
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="sed -e s/^X//"
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
-
-# The names of the tagged configurations supported by this script.
-available_tags=
-
-# ### BEGIN LIBTOOL CONFIG],
-[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
-
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
-
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
-
-# The host system.
-host_alias=$host_alias
-host=$host
-
-# An echo program that does not interpret backslashes.
-echo=$lt_echo
-
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
-
-# A C compiler.
-LTCC=$lt_LTCC
-
-# A language-specific compiler.
-CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
-
-# Is the compiler the GNU C compiler?
-with_gcc=$_LT_AC_TAGVAR(GCC, $1)
-
-# The linker used to build libraries.
-LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
-
-# Whether we need hard or soft links.
-LN_S=$lt_LN_S
-
-# A BSD-compatible nm program.
-NM=$lt_NM
-
-# A sed program that does not truncate output.
-SED=$lt_SED
-
-# A symbol stripping program
-STRIP=$STRIP
-
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
-
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
-
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
-
-# Used on cygwin: assembler.
-AS="$AS"
-
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
-
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
-
-# How to pass a linker flag through the compiler.
-wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
-
-# Object file suffix (normally "o").
-objext="$ac_objext"
-
-# Old archive suffix (normally "a").
-libext="$libext"
-
-# Executable file suffix (normally "").
-exeext="$exeext"
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
-pic_mode=$pic_mode
-
-# What is the maximum length of a command?
-max_cmd_len=$lt_cv_sys_max_cmd_len
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
-
-# Must we lock files when doing compilation ?
-need_locks=$lt_need_locks
-
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
-
-# Do we need a version for libraries?
-need_version=$need_version
-
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
-
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
-
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
-
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
-
-# Library versioning type.
-version_type=$version_type
-
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
-
-# List of archive names.  First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=$lt_library_names_spec
-
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
-
-# Commands used to build and install an old-style archive.
-RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
-
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
-archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
-postinstall_cmds=$lt_postinstall_cmds
-postuninstall_cmds=$lt_postuninstall_cmds
-
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
-
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
-
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd=$lt_file_magic_cmd
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
-
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
-
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$lt_finish_eval
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
-
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
-
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
-
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
-
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
-
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
-
-# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
-
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
-
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
-
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
-
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
-
-# Set to yes if exported symbols are required.
-always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
-
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
-
-# Symbols that must always be exported.
-include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
-
-ifelse([$1],[],
-[# ### END LIBTOOL CONFIG],
-[# ### END LIBTOOL TAG CONFIG: $tagname])
-
-__EOF__
-
-ifelse([$1],[], [
-  case $host_os in
-  aix3*)
-    cat <<\EOF >> "$cfgfile"
-
-# AIX sometimes has problems with the GCC collect2 program.  For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
-  COLLECT_NAMES=
-  export COLLECT_NAMES
-fi
-EOF
-    ;;
-
-  cygwin* | mingw* | pw32* | os2*)
-    cat <<'EOF' >> "$cfgfile"
-    # This is a source program that is used to create dlls on Windows
-    # Don't remove nor modify the starting and closing comments
-    _LT_AC_FILE_LTDLL_C
-    # This is a source program that is used to create import libraries
-    # on Windows for dlls which lack them. Don't remove nor modify the
-    # starting and closing comments
-    _LT_AC_FILE_IMPGEN_C
-EOF
-    ;;
-  esac
-
-  # We use sed instead of cat because bash on DJGPP gets confused if
-  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
-  # text mode, it properly converts lines to CR/LF.  This bash problem
-  # is reportedly fixed, but why not run on old versions too?
-  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
-
-  mv -f "$cfgfile" "$ofile" || \
-    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
-  chmod +x "$ofile"
-])
-else
-  # If there is no Makefile yet, we rely on a make rule to execute
-  # `config.status --recheck' to rerun these tests and create the
-  # libtool script then.
-  test -f Makefile && make "$ltmain"
-fi
-])# AC_LIBTOOL_CONFIG
-
-
-# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
-# -------------------------------------------
-AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
-
-_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-
-if test "$GCC" = yes; then
-  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
-
-  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
-    lt_cv_prog_compiler_rtti_exceptions,
-    [-fno-rtti -fno-exceptions -c conftest.$ac_ext], [],
-    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
-fi
-])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
-
-
-# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-# ---------------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
-[AC_REQUIRE([AC_CANONICAL_HOST])
-AC_REQUIRE([AC_PROG_NM])
-AC_REQUIRE([AC_OBJEXT])
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-AC_MSG_CHECKING([command to parse $NM output from $compiler object])
-AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
-[
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
-
-# Character class describing NM global symbol codes.
-symcode='[[BCDEGRST]]'
-
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
-
-# Transform the above into a raw symbol and a C symbol.
-symxfrm='\1 \2\3 \3'
-
-# Transform an extracted symbol line into a proper C declaration
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
-
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
-
-# Define system-specific variables.
-case $host_os in
-aix*)
-  symcode='[[BCDT]]'
-  ;;
-cygwin* | mingw* | pw32*)
-  symcode='[[ABCDGISTW]]'
-  ;;
-hpux*) # Its linker distinguishes data from code symbols
-  if test "$host_cpu" = ia64; then
-    symcode='[[ABCDEGRST]]'
-  fi
-  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
-  ;;
-irix* | nonstopux*)
-  symcode='[[BCDEGRST]]'
-  ;;
-solaris* | sysv5*)
-  symcode='[[BDT]]'
-  ;;
-sysv4)
-  symcode='[[DFNSTU]]'
-  ;;
-esac
-
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $host_os in
-mingw*)
-  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
-  ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
-  symcode='[[ABCDGISTW]]'
-fi
-
-# Try without a prefix undercore, then with it.
-for ac_symprfx in "" "_"; do
-
-  # Write the raw and C identifiers.
-  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
-
-  # Check to see that the pipe works correctly.
-  pipe_works=no
-
-  rm -f conftest*
-  cat > conftest.$ac_ext <<EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-EOF
-
-  if AC_TRY_EVAL(ac_compile); then
-    # Now try to grab the symbols.
-    nlist=conftest.nm
-    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
-      # Try sorting and uniquifying the output.
-      if sort "$nlist" | uniq > "$nlist"T; then
-	mv -f "$nlist"T "$nlist"
-      else
-	rm -f "$nlist"T
-      fi
-
-      # Make sure that we snagged all the symbols we need.
-      if egrep ' nm_test_var$' "$nlist" >/dev/null; then
-	if egrep ' nm_test_func$' "$nlist" >/dev/null; then
-	  cat <<EOF > conftest.$ac_ext
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-EOF
-	  # Now generate the symbol file.
-	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
-
-	  cat <<EOF >> conftest.$ac_ext
-#if defined (__STDC__) && __STDC__
-# define lt_ptr_t void *
-#else
-# define lt_ptr_t char *
-# define const
-#endif
-
-/* The mapping between symbol names and symbols. */
-const struct {
-  const char *name;
-  lt_ptr_t address;
-}
-lt_preloaded_symbols[[]] =
-{
-EOF
-	  sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
-	  cat <<\EOF >> conftest.$ac_ext
-  {0, (lt_ptr_t) 0}
-};
-
-#ifdef __cplusplus
-}
-#endif
-EOF
-	  # Now try linking the two files.
-	  mv conftest.$ac_objext conftstm.$ac_objext
-	  lt_save_LIBS="$LIBS"
-	  lt_save_CFLAGS="$CFLAGS"
-	  LIBS="conftstm.$ac_objext"
-	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
-	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
-	    pipe_works=yes
-	  fi
-	  LIBS="$lt_save_LIBS"
-	  CFLAGS="$lt_save_CFLAGS"
-	else
-	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
-	fi
-      else
-	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
-      fi
-    else
-      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
-    fi
-  else
-    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
-    cat conftest.$ac_ext >&5
-  fi
-  rm -f conftest* conftst*
-
-  # Do not use the global_symbol_pipe unless it works.
-  if test "$pipe_works" = yes; then
-    break
-  else
-    lt_cv_sys_global_symbol_pipe=
-  fi
-done
-])
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
-  lt_cv_sys_global_symbol_to_cdecl=
-fi
-if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
-  AC_MSG_RESULT(failed)
-else
-  AC_MSG_RESULT(ok)
-fi
-]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-
-
-# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
-# ---------------------------------------
-AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
-[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
-_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
-
-AC_MSG_CHECKING([for $compiler option to produce PIC])
- ifelse([$1],[CXX],[
-  # C++ specific cases for pic, static, wl, etc.
-  if test "$GXX" = yes; then
-    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
-    case $host_os in
-    aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      fi
-      ;;
-    amigaos*)
-      # FIXME: we need at least 68020 code to build shared libraries, but
-      # adding the `-m68020' flag to GCC prevents building anything better,
-      # like `-m68040'.
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
-      ;;
-    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
-    cygwin* | mingw* | os2*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
-      ;;
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
-      ;;
-    *djgpp*)
-      # DJGPP does not support shared libraries at all
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-      ;;
-    sysv4*MP*)
-      if test -d /usr/nec; then
-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
-      fi
-      ;;
-    hpux*)
-      # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
-      if test "$host_cpu" != ia64; then
-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-      fi
-      ;;
-    *)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-      ;;
-    esac
-  else
-    case $host_os in
-      aix4* | aix5*)
-	# All AIX code is PIC.
-	if test "$host_cpu" = ia64; then
-	  # AIX 5 now supports IA64 processor
-	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	else
-	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
-	fi
-	;;
-      chorus*)
-	case $cc_basename in
-	cxch68)
-	  # Green Hills C++ Compiler
-	  # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
-	  ;;
-	esac
-	;;
-      dgux*)
-	case $cc_basename in
-	  ec++)
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	    ;;
-	  ghcx)
-	    # Green Hills C++ Compiler
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      freebsd*)
-	# FreeBSD uses GNU C++
-	;;
-      hpux9* | hpux10* | hpux11*)
-	case $cc_basename in
-	  CC)
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
-	    if test "$host_cpu" != ia64; then
-	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
-	    fi
-	    ;;
-	  aCC)
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
-	    if test "$host_cpu" != ia64; then
-	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
-	    fi
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      irix5* | irix6* | nonstopux*)
-	case $cc_basename in
-	  CC)
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-	    # CC pic flag -KPIC is the default.
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      linux*)
-	case $cc_basename in
-	  KCC)
-	    # KAI C++ Compiler
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-	    ;;
-	  cxx)
-	    # Compaq C++
-	    # Make sure the PIC flag is empty.  It appears that all Alpha
-	    # Linux and Compaq Tru64 Unix objects are PIC.
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      lynxos*)
-	;;
-      m88k*)
-	;;
-      mvs*)
-	case $cc_basename in
-	  cxx)
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      netbsd*)
-	;;
-      osf3* | osf4* | osf5*)
-	case $cc_basename in
-	  KCC)
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
-	    ;;
-	  RCC)
-	    # Rational C++ 2.4.1
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-	    ;;
-	  cxx)
-	    # Digital/Compaq C++
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    # Make sure the PIC flag is empty.  It appears that all Alpha
-	    # Linux and Compaq Tru64 Unix objects are PIC.
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      psos*)
-	;;
-      sco*)
-	case $cc_basename in
-	  CC)
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      solaris*)
-	case $cc_basename in
-	  CC)
-	    # Sun C++ 4.2, 5.x and Centerline C++
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
-	    ;;
-	  gcx)
-	    # Green Hills C++ Compiler
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      sunos4*)
-	case $cc_basename in
-	  CC)
-	    # Sun C++ 4.x
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	    ;;
-	  lcc)
-	    # Lucid
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      tandem*)
-	case $cc_basename in
-	  NCC)
-	    # NonStop-UX NCC 3.20
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      unixware*)
-	;;
-      vxworks*)
-	;;
-      *)
-	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-	;;
-    esac
-  fi
-],
-[
-  if test "$GCC" = yes; then
-    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
-    case $host_os in
-      aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      fi
-      ;;
-
-    amigaos*)
-      # FIXME: we need at least 68020 code to build shared libraries, but
-      # adding the `-m68020' flag to GCC prevents building anything better,
-      # like `-m68040'.
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
-      ;;
-
-    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
-
-    cygwin* | mingw* | pw32* | os2*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
-      ;;
-
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
-      ;;
-
-    msdosdjgpp*)
-      # Just because we use GCC doesn't mean we suddenly get shared libraries
-      # on systems that don't support them.
-      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-      enable_shared=no
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec; then
-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
-      fi
-      ;;
-
-    hpux*)
-      # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
-      if test "$host_cpu" != ia64; then
-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-      fi
-      ;;
-
-    *)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-      ;;
-    esac
-  else
-    # PORTME Check for flag to pass linker flags through the system compiler.
-    case $host_os in
-    aix*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      else
-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
-      fi
-      ;;
-
-    cygwin* | mingw* | pw32* | os2*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
-      ;;
-
-    hpux9* | hpux10* | hpux11*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      if test "$host_cpu" != ia64; then
-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
-      fi
-      # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
-      ;;
-
-    irix5* | irix6* | nonstopux*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      # PIC (with -KPIC) is the default.
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-      ;;
-
-    newsos6)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    osf3* | osf4* | osf5*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      # All OSF/1 code is PIC.
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-      ;;
-
-    sco3.2v5*)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
-      ;;
-
-    solaris*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    sunos4*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-      if test "x$host_vendor" = xsni; then
-	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-LD'
-      else
-	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      fi
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec ;then
-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      fi
-      ;;
-
-    uts4*)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    *)
-      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-      ;;
-    esac
-  fi
-])
-AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
-  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
-    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
-    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC], [],
-    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
-     "" | " "*) ;;
-     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
-     esac],
-    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
-fi
-case "$host_os" in
-  # For platforms which do not support PIC, -DPIC is meaningless:
-  *djgpp*)
-    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-    ;;
-  *)
-    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC"
-    ;;
-esac
-])
-
-
-# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
-# ------------------------------------
-# See if the linker supports building shared libraries.
-AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
-[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-ifelse([$1],[CXX],[
-  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  case $host_os in
-  aix4* | aix5*)
-    # If we're using GNU nm, then we don't want the "-C" option.
-    # -C means demangle to AIX nm, but means don't demangle with GNU nm
-    if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
-      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
-    else
-      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
-    fi
-    ;;
-  cygwin* | mingw* | pw32*)
-    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
-  ;;
-  *)
-    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  ;;
-  esac
-],[
-  runpath_var=
-  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
-
-  _LT_AC_TAGVAR(archive_cmds, $1)=
-  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=
-  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
-  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
-  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
-  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
-  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
-  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
-  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-  _LT_AC_TAGVAR(hardcode_direct, $1)=no
-  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
-  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
-  _LT_AC_TAGVAR(always_export_symbols, $1)=no
-  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  # include_expsyms should be a list of space-separated symbols to be *always*
-  # included in the symbol list
-  _LT_AC_TAGVAR(include_expsyms, $1)=
-  # exclude_expsyms can be an egrep regular expression of symbols to exclude
-  # it will be wrapped by ` (' and `)$', so one must not match beginning or
-  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-  # as well as any symbol that contains `d'.
-  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
-  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
-  # platforms (ab)use it in PIC code, but their linkers get confused if
-  # the symbol is explicitly referenced.  Since portable code cannot
-  # rely on this symbol name, it's probably fine to never include it in
-  # preloaded symbol tables.
-  extract_expsyms_cmds=
-
-  case $host_os in
-  cygwin* | mingw* | pw32*)
-    # FIXME: the MSVC++ port hasn't been tested in a loooong time
-    # When not using gcc, we currently assume that we are using
-    # Microsoft Visual C++.
-    if test "$GCC" != yes; then
-      with_gnu_ld=no
-    fi
-    ;;
-  openbsd*)
-    with_gnu_ld=no
-    ;;
-  esac
-
-  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
-  if test "$with_gnu_ld" = yes; then
-    # If archive_cmds runs LD, not CC, wlarc should be empty
-    wlarc='${wl}'
-
-    # See if GNU ld supports shared libraries.
-    case $host_os in
-    aix3* | aix4* | aix5*)
-      # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	cat <<EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
-
-EOF
-      fi
-      ;;
-
-    amigaos*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-
-      # Samuel A. Falvo II <kc5tja at dolphin.openprojects.net> reports
-      # that the semantics of dynamic libraries on AmigaOS, at least up
-      # to version 4, is to share data among multiple programs linked
-      # with the same dynamic library.  Since this doesn't match the
-      # behavior of shared libraries on other platforms, we can't use
-      # them.
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      ;;
-
-    beos*)
-      if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-	# Joseph Beckenbach <jrb3 at best.com> 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'
-      else
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    cygwin* | mingw* | pw32*)
-      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, as there is
-      # no search path for DLLs.
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
-
-      extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
-	sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
-	test -f $output_objdir/impgen.exe || (cd $output_objdir && \
-	if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
-	else $CC -o impgen impgen.c ; fi)~
-	$output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
-
-      _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
-
-      # cygwin and mingw dlls have different entry points and sets of symbols
-      # to exclude.
-      # FIXME: what about values for MSVC?
-      dll_entry=__cygwin_dll_entry at 12
-      dll_exclude_symbols=DllMain at 12,_cygwin_dll_entry at 12,_cygwin_noncygwin_dll_entry at 12~
-      case $host_os in
-      mingw*)
-	# mingw values
-	dll_entry=_DllMainCRTStartup at 12
-	dll_exclude_symbols=DllMain at 12,DllMainCRTStartup at 12,DllEntryPoint at 12~
-	;;
-      esac
-
-      # mingw and cygwin differ, and it's simplest to just exclude the union
-      # of the two symbol sets.
-      dll_exclude_symbols=DllMain at 12,_cygwin_dll_entry at 12,_cygwin_noncygwin_dll_entry at 12,DllMainCRTStartup at 12,DllEntryPoint at 12
-
-      # recent cygwin and mingw systems supply a stub DllMain which the user
-      # can override, but on older systems we have to supply one (in ltdll.c)
-      if test "x$lt_cv_need_dllmain" = "xyes"; then
-	ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
-	ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
-  	test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
-      else
-	ltdll_obj=
-	ltdll_cmds=
-      fi
-
-      # Extract the symbol export list from an `--export-all' def file,
-      # then regenerate the def file from the symbol export list, so that
-      # the compiled dll only exports the symbol export list.
-      # Be careful not to strip the DATA tag left by newer dlltools.
-      _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"'
-	$DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
-	sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
-
-      # If the export-symbols file already is a .def file (1st line
-      # is EXPORTS), use it as is.
-      # If DATA tags from a recent dlltool are present, honour them!
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`head -1 $export_symbols`" = xEXPORTS; then
-	  cp $export_symbols $output_objdir/$soname-def;
-	else
-	  echo EXPORTS > $output_objdir/$soname-def;
-	  _lt_hint=1;
-	  cat $export_symbols | while read symbol; do
-	   set dummy \$symbol;
-	   case \[$]# in
-	     2) echo "   \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
-	     *) echo "   \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
-	   esac;
-	   _lt_hint=`expr 1 + \$_lt_hint`;
-	  done;
-	fi~
-	'"$ltdll_cmds"'
-	$CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
-	$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
-	$CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
-	$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
-	$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
-      ;;
-
-    netbsd*)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
-	wlarc=
-      else
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      fi
-      ;;
-
-    solaris* | sysv5*)
-      if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	cat <<EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-EOF
-      elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /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'
-      else
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    sunos4*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      wlarc=
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    *)
-      if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /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'
-      else
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-    esac
-
-    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
-      runpath_var=LD_RUN_PATH
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-      case $host_os in
-      cygwin* | mingw* | pw32*)
-	# dlltool doesn't understand --whole-archive et. al.
-	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-	;;
-      *)
-	# ancient GNU ld didn't support --whole-archive et. al.
-	if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
-  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-	else
-  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-	fi
-	;;
-      esac
-    fi
-  else
-    # PORTME fill in a description of your system's linker (not GNU ld)
-    case $host_os in
-    aix3*)
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
-      # Note: this linker hardcodes the directories in LIBPATH if there
-      # are no directories specified by -L.
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      if test "$GCC" = yes && test -z "$link_static_flag"; then
-	# Neither direct hardcoding nor static linking is supported with a
-	# broken collect2.
-	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
-      fi
-      ;;
-
-    aix4* | aix5*)
-      if test "$host_cpu" = ia64; then
-	# On IA64, the linker does run time linking by default, so we don't
-	# have to do anything special.
-	aix_use_runtimelinking=no
-	exp_sym_flag='-Bexport'
-	no_entry_flag=""
-      else
-	# If we're using GNU nm, then we don't want the "-C" option.
-	# -C means demangle to AIX nm, but means don't demangle with GNU nm
-	if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
-	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
-	else
-	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
-	fi
-
-	# KDE requires run time linking.  Make it the default.
-	aix_use_runtimelinking=yes
-	exp_sym_flag='-bexport'
-	no_entry_flag='-bnoentry'
-      fi
-
-      # When large executables or shared objects are built, AIX ld can
-      # have problems creating the table of contents.  If linking a library
-      # or program results in "error TOC overflow" add -mminimal-toc to
-      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
-      _LT_AC_TAGVAR(archive_cmds, $1)=''
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-
-      if test "$GCC" = yes; then
-	case $host_os in aix4.[012]|aix4.[012].*)
-	# We only want to do this on AIX 4.2 and lower, the check
-	# below for broken collect2 doesn't work under 4.3+
-	  collect2name=`${CC} -print-prog-name=collect2`
-	  if test -f "$collect2name" && \
-  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
-	  then
-  	  # We have reworked collect2
-  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-	  else
-  	  # We have old collect2
-  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
-  	  # It fails to find uninstalled libraries when the uninstalled
-  	  # path is not listed in the libpath.  Setting hardcode_minus_L
-  	  # to unsupported forces relinking
-  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-	  fi
-	esac
-	shared_flag='-shared'
-      else
-	# not using gcc
-	if test "$host_cpu" = ia64; then
-  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-  	# chokes on -Wl,-G. The following line is correct:
-	  shared_flag='-G'
-	else
-  	if test "$aix_use_runtimelinking" = yes; then
-	    shared_flag='-qmkshrobj ${wl}-G'
-	  else
-	    shared_flag='-qmkshrobj'
-  	fi
-	fi
-      fi
-
-      # Let the compiler handle the export list.
-      _LT_AC_TAGVAR(always_export_symbols, $1)=no
-      if test "$aix_use_runtimelinking" = yes; then
-	# Warning - without using the other runtime loading flags (-brtl),
-	# -berok will link without error, but may produce a broken library.
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
-       # 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:'"$aix_libpath"
-	_LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-       else
-	if test "$host_cpu" = ia64; then
-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
-	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
-	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
-	else
-	 # 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:'"$aix_libpath"
-	  # Warning - without using the other run time loading flags,
-	  # -berok will link without error, but may produce a broken library.
-	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
-	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-	  # -bexpall does not export symbols beginning with underscore (_)
-	  _LT_AC_TAGVAR(always_export_symbols, $1)=yes
-	  # Exported symbols can be pulled into shared objects from archives
-	  _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)="\$CC $shared_flag"' -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'
-	fi
-      fi
-      ;;
-
-    amigaos*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      # see comment about different semantics on the GNU ld section
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      ;;
-
-    bsdi4*)
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
-      ;;
-
-    cygwin* | mingw* | pw32*)
-      # When not using gcc, we currently assume that we are using
-      # Microsoft Visual C++.
-      # hardcode_libdir_flag_spec is actually meaningless, as there is
-      # no search path for DLLs.
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-      # Tell ltmain to make .lib files, not .a files.
-      libext=lib
-      # FIXME: Setting linknames here is a bad hack.
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | 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.
-      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
-      fix_srcfile_path='`cygpath -w "$srcfile"`'
-      ;;
-
-    darwin* | rhapsody*)
-      case "$host_os" in
-      rhapsody* | darwin1.[[012]])
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
-	;;
-      *) # Darwin 1.3 on
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
-	;;
-      esac
-
-      # FIXME: Relying on posixy $() will cause problems for
-      #        cross-compilation, but unfortunately the echo tests do not
-      #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
-      #	       `"' quotes if we put them in here... so don't!
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
-      # We need to add '_' to the symbols in $export_symbols first
-      #_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
-      ;;
-
-    dgux*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    freebsd1*)
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      ;;
-
-    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
-    # support.  Future versions do this automatically, but an explicit c++rt0.o
-    # does not break anything, and helps significantly (at the cost of a little
-    # extra space).
-    freebsd2.2*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
-      _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
-      ;;
-
-    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    # 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'
-      _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
-      ;;
-
-    hpux9* | hpux10* | hpux11*)
-      if test "$GCC" = yes; then
-	case $host_os in
-	  hpux9*)
-	    _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'
-	    ;;
-	  *)
-	    if test "$host_cpu" = ia64; then
-	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	    else
-	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-	    fi
-	    ;;
-	esac
-      else
-	case $host_os in
-	  hpux9*)
-	    _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'
-	    ;;
-	  *)
-	    if test "$host_cpu" = ia64; then
-	      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
-	    else
-	      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
-	    fi
-	    ;;
-	esac
-      fi
-      if test "$host_cpu" = ia64; then
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-	_LT_AC_TAGVAR(hardcode_direct, $1)=no
-	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      else
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      fi
-      # hardcode_minus_L: Not really in the search PATH,
-      # but as the default location of the library.
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-      ;;
-
-    irix5* | irix6* | nonstopux*)
-      if test "$GCC" = yes; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && 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 "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-      fi
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-      ;;
-
-    netbsd*)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
-      else
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
-      fi
-      _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
-      ;;
-
-    newsos6)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    openbsd*)
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-
-      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-      else
-       case $host_os in
-	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
-	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-	   ;;
-	 *)
-	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
-	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	   ;;
-       esac
-      fi
-      ;;
-
-    os2*)
-      _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 "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $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 "$GCC" = 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 "$verstring" && 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 "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-      fi
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-      ;;
-
-    osf4* | osf5*)	# as osf3* with the addition of -msym flag
-      if test "$GCC" = 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 "$verstring" && 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 \*'
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
-	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
-
-	# Both c and cxx compiler support -rpath directly
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
-      fi
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-      ;;
-
-    sco3.2v5*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
-      runpath_var=LD_RUN_PATH
-      hardcode_runpath_var=yes
-      ;;
-
-    solaris*)
-      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
-      if test "$GCC" = yes; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$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 "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
-      fi
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      case $host_os in
-      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
-      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
-	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
-      esac
-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-      ;;
-
-    sunos4*)
-      if test "x$host_vendor" = 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'
-      else
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    sysv4)
-      if test "x$host_vendor" = xsni; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	_LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
-      else
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	_LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
-      fi
-      runpath_var='LD_RUN_PATH'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    sysv4.3*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-	runpath_var=LD_RUN_PATH
-	hardcode_runpath_var=yes
-	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
-      fi
-      ;;
-
-    sysv4.2uw2*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      hardcode_runpath_var=yes
-      runpath_var=LD_RUN_PATH
-      ;;
-
-   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
-      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
-      if test "$GCC" = yes; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      runpath_var='LD_RUN_PATH'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    sysv5*)
-      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
-      # $CC -shared without GNU ld will not create a library from C++
-      # object files and a static libstdc++, better avoid it by now
-      _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 "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-  		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      runpath_var='LD_RUN_PATH'
-      ;;
-
-    uts4*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    *)
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      ;;
-    esac
-  fi
-])
-AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
-  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-#
-# Do we need to explicitly link libc?
-#
-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
-if test "$enable_shared" = yes && test "$GCC" = yes; then
-  case $_LT_AC_TAGVAR(archive_cmds, $1) in
-  *'~'*)
-    # FIXME: we may have to deal with multi-command sequences.
-    ;;
-  '$CC '*)
-    # Test whether the compiler implicitly links with -lc since on some
-    # systems, -lgcc has to come before -lc. If gcc already passes -lc
-    # to ld, don't add -lc before -lgcc.
-    AC_MSG_CHECKING([whether -lc should be explicitly linked in])
-    $rm conftest*
-    echo 'static int dummy;' > conftest.$ac_ext
-
-    if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
-      soname=conftest
-      lib=conftest
-      libobjs=conftest.$ac_objext
-      deplibs=
-      wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
-      compiler_flags=-v
-      linker_flags=-v
-      verstring=
-      output_objdir=.
-      libname=conftest
-      lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=
-      if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
-      then
-	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-      else
-	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
-      fi
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
-    else
-      cat conftest.err 1>&5
-    fi
-    $rm conftest*
-    AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
-    ;;
-  esac
-fi
-])# AC_LIBTOOL_PROG_LD_SHLIBS
-
-
-# _LT_AC_FILE_LTDLL_C
-# -------------------
-# Be careful that the start marker always follows a newline.
-AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
-# /* ltdll.c starts here */
-# #define WIN32_LEAN_AND_MEAN
-# #include <windows.h>
-# #undef WIN32_LEAN_AND_MEAN
-# #include <stdio.h>
-#
-# #ifndef __CYGWIN__
-# #  ifdef __CYGWIN32__
-# #    define __CYGWIN__ __CYGWIN32__
-# #  endif
-# #endif
-#
-# #ifdef __cplusplus
-# extern "C" {
-# #endif
-# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
-# #ifdef __cplusplus
-# }
-# #endif
-#
-# #ifdef __CYGWIN__
-# #include <cygwin/cygwin_dll.h>
-# DECLARE_CYGWIN_DLL( DllMain );
-# #endif
-# HINSTANCE __hDllInstance_base;
-#
-# BOOL APIENTRY
-# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
-# {
-#   __hDllInstance_base = hInst;
-#   return TRUE;
-# }
-# /* ltdll.c ends here */
-])# _LT_AC_FILE_LTDLL_C
-
-
-# _LT_AC_FILE_IMPGEN_C
-# --------------------
-# Be careful that the start marker always follows a newline.
-AC_DEFUN([_LT_AC_FILE_IMPGEN_C], [
-# /* impgen.c starts here */
-# /*   Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
-#
-#  This file is part of GNU libtool.
-#
-#  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
-#  the Free Software Foundation; either version 2 of the License, or
-#  (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  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.
-#  */
-#
-# #include <stdio.h>		/* for printf() */
-# #include <unistd.h>		/* for open(), lseek(), read() */
-# #include <fcntl.h>		/* for O_RDONLY, O_BINARY */
-# #include <string.h>		/* for strdup() */
-#
-# /* O_BINARY isn't required (or even defined sometimes) under Unix */
-# #ifndef O_BINARY
-# #define O_BINARY 0
-# #endif
-#
-# static unsigned int
-# pe_get16 (fd, offset)
-#      int fd;
-#      int offset;
-# {
-#   unsigned char b[2];
-#   lseek (fd, offset, SEEK_SET);
-#   read (fd, b, 2);
-#   return b[0] + (b[1]<<8);
-# }
-#
-# static unsigned int
-# pe_get32 (fd, offset)
-#     int fd;
-#     int offset;
-# {
-#   unsigned char b[4];
-#   lseek (fd, offset, SEEK_SET);
-#   read (fd, b, 4);
-#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
-# }
-#
-# static unsigned int
-# pe_as32 (ptr)
-#      void *ptr;
-# {
-#   unsigned char *b = ptr;
-#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
-# }
-#
-# int
-# main (argc, argv)
-#     int argc;
-#     char *argv[];
-# {
-#     int dll;
-#     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
-#     unsigned long export_rva, export_size, nsections, secptr, expptr;
-#     unsigned long name_rvas, nexp;
-#     unsigned char *expdata, *erva;
-#     char *filename, *dll_name;
-#
-#     filename = argv[1];
-#
-#     dll = open(filename, O_RDONLY|O_BINARY);
-#     if (dll < 1)
-# 	return 1;
-#
-#     dll_name = filename;
-#
-#     for (i=0; filename[i]; i++)
-# 	if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
-# 	    dll_name = filename + i +1;
-#
-#     pe_header_offset = pe_get32 (dll, 0x3c);
-#     opthdr_ofs = pe_header_offset + 4 + 20;
-#     num_entries = pe_get32 (dll, opthdr_ofs + 92);
-#
-#     if (num_entries < 1) /* no exports */
-# 	return 1;
-#
-#     export_rva = pe_get32 (dll, opthdr_ofs + 96);
-#     export_size = pe_get32 (dll, opthdr_ofs + 100);
-#     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
-#     secptr = (pe_header_offset + 4 + 20 +
-# 	      pe_get16 (dll, pe_header_offset + 4 + 16));
-#
-#     expptr = 0;
-#     for (i = 0; i < nsections; i++)
-#     {
-# 	char sname[8];
-# 	unsigned long secptr1 = secptr + 40 * i;
-# 	unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
-# 	unsigned long vsize = pe_get32 (dll, secptr1 + 16);
-# 	unsigned long fptr = pe_get32 (dll, secptr1 + 20);
-# 	lseek(dll, secptr1, SEEK_SET);
-# 	read(dll, sname, 8);
-# 	if (vaddr <= export_rva && vaddr+vsize > export_rva)
-# 	{
-# 	    expptr = fptr + (export_rva - vaddr);
-# 	    if (export_rva + export_size > vaddr + vsize)
-# 		export_size = vsize - (export_rva - vaddr);
-# 	    break;
-# 	}
-#     }
-#
-#     expdata = (unsigned char*)malloc(export_size);
-#     lseek (dll, expptr, SEEK_SET);
-#     read (dll, expdata, export_size);
-#     erva = expdata - export_rva;
-#
-#     nexp = pe_as32 (expdata+24);
-#     name_rvas = pe_as32 (expdata+32);
-#
-#     printf ("EXPORTS\n");
-#     for (i = 0; i<nexp; i++)
-#     {
-# 	unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
-# 	printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
-#     }
-#
-#     return 0;
-# }
-# /* impgen.c ends here */
-])# _LT_AC_FILE_IMPGEN_C
-
-# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
-# ---------------------------------
-AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
-
-
-# old names
-AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
-AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
-AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
-AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
-AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
-AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
-AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
-
-# This is just to silence aclocal about the macro not being used
-ifelse([AC_DISABLE_FAST_INSTALL])
-
-AC_DEFUN([LT_AC_PROG_GCJ],
-[AC_CHECK_TOOL(GCJ, gcj, no)
-  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
-  AC_SUBST(GCJFLAGS)
-])
-
-AC_DEFUN([LT_AC_PROG_RC],
-[AC_CHECK_TOOL(RC, windres, no)
-])
-
-############################################################
-# NOTE: This macro has been submitted for inclusion into   #
-#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
-#  a released version of Autoconf we should remove this    #
-#  macro and use it instead.                               #
-############################################################
-# LT_AC_PROG_SED
-# --------------
-# Check for a fully-functional sed program, that truncates
-# as few characters as possible.  Prefer GNU sed if found.
-AC_DEFUN([LT_AC_PROG_SED],
-[AC_MSG_CHECKING([for a sed that does not truncate output])
-AC_CACHE_VAL(lt_cv_path_SED,
-[# Loop through the user's path and test for sed and gsed.
-# Then use that list of sed's as ones to test for truncation.
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_prog in sed gsed; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
-        _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
-      fi
-    done
-  done
-done
-
-  # Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
-  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
-  trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-
-# Create a (secure) tmp directory for tmp files.
-: ${TMPDIR=/tmp}
-{
-  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
-}  ||
-{
-  tmp=$TMPDIR/sed$$-$RANDOM
-  (umask 077 && mkdir $tmp)
-} ||
-{
-   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
-   { (exit 1); exit 1; }
-}
-  _max=0
-  _count=0
-  # Add /usr/xpg4/bin/sed as it is typically found on Solaris
-  # along with /bin/sed that truncates output.
-  for _sed in $_sed_list /usr/xpg4/bin/sed; do
-    test ! -f ${_sed} && break
-    cat /dev/null > "$tmp/sed.in"
-    _count=0
-    echo $ECHO_N "0123456789$ECHO_C" >"$tmp/sed.in"
-    # Check for GNU sed and select it if it is found.
-    if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
-      lt_cv_path_SED=${_sed}
-      break;
-    fi
-    while true; do
-      cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
-      mv "$tmp/sed.tmp" "$tmp/sed.in"
-      cp "$tmp/sed.in" "$tmp/sed.nl"
-      echo >>"$tmp/sed.nl"
-      ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
-      cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
-      # 10000 chars as input seems more than enough
-      test $_count -gt 10 && break
-      _count=`expr $_count + 1`
-      if test $_count -gt $_max; then
-        _max=$_count
-        lt_cv_path_SED=$_sed
-      fi
-    done
-  done
-  rm -rf "$tmp"
-])
-AC_MSG_RESULT([$SED])
+all_libraries="${all_libraries} -lfftw3"
+#AC_SUBST(FFTW_BASE_DIR)
 ])
diff --git a/aclocal.m4 b/aclocal.m4
index b99dd24..fe3557e 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.7.2 -*- Autoconf -*-
+# generated automatically by aclocal 1.9.4 -*- Autoconf -*-
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
 # Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -11,11024 +11,6082 @@
 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 # PARTICULAR PURPOSE.
 
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 
-dnl    This file is part of the KDE libraries/packages
-dnl    Copyright (C) 1997 Janos Farkas (chexum at shadow.banki.hu)
-dnl              (C) 1997,98,99 Stephan Kulow (coolo at kde.org)
+# serial 47 AC_PROG_LIBTOOL
 
-dnl    This file is free software; you can redistribute it and/or
-dnl    modify it under the terms of the GNU Library General Public
-dnl    License as published by the Free Software Foundation; either
-dnl    version 2 of the License, or (at your option) any later version.
 
-dnl    This library is distributed in the hope that it will be useful,
-dnl    but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-dnl    Library General Public License for more details.
+# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
+# -----------------------------------------------------------
+# If this macro is not defined by Autoconf, define it here.
+m4_ifdef([AC_PROVIDE_IFELSE],
+         [],
+         [m4_define([AC_PROVIDE_IFELSE],
+	         [m4_ifdef([AC_PROVIDE_$1],
+		           [$2], [$3])])])
 
-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 IMPORTANT NOTE:
-dnl Please do not modify this file unless you expect your modifications to be
-dnl carried into every other module in the repository. 
-dnl
-dnl Single-module modifications are best placed in configure.in for kdelibs
-dnl and kdebase or configure.in.in if present.
+# AC_PROG_LIBTOOL
+# ---------------
+AC_DEFUN([AC_PROG_LIBTOOL],
+[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
+dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
+dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
+  AC_PROVIDE_IFELSE([AC_PROG_CXX],
+    [AC_LIBTOOL_CXX],
+    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
+  ])])
+dnl And a similar setup for Fortran 77 support
+  AC_PROVIDE_IFELSE([AC_PROG_F77],
+    [AC_LIBTOOL_F77],
+    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
+])])
 
-dnl ------------------------------------------------------------------------
-dnl Forward compatibility macros (make autoconf 2.13 look like 2.50),
-dnl thanks to Raja R Harinath.
-dnl ------------------------------------------------------------------------
-dnl
-ifdef([_AC_PATH_X_XMKMF],[],
-   [AC_DEFUN([_AC_PATH_X_XMKMF],[AC_PATH_X_XMKMF])])
-ifdef([AC_OUTPUT_SUBDIRS],[],
-   [AC_DEFUN([AC_OUTPUT_SUBDIRS],[subdirs=$1; _AC_OUTPUT_SUBDIRS])])
-
-# KDE_PATH_X_DIRECT
-dnl Internal subroutine of AC_PATH_X.
-dnl Set ac_x_includes and/or ac_x_libraries.
-AC_DEFUN(KDE_PATH_X_DIRECT,
-[
-AC_REQUIRE([KDE_CHECK_LIB64])
-
-if test "$ac_x_includes" = NO; then
-  # Guess where to find include files, by looking for this one X11 .h file.
-  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
-
-  # First, try using that file with no special directory specified.
-AC_TRY_CPP([#include <$x_direct_test_include>],
-[# We can compile using X headers with no special include directory.
-ac_x_includes=],
-[# Look for the header file in a standard set of common directories.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-  for ac_dir in               \
-    /usr/X11/include          \
-    /usr/X11R6/include        \
-    /usr/X11R5/include        \
-    /usr/X11R4/include        \
-                              \
-    /usr/include/X11          \
-    /usr/include/X11R6        \
-    /usr/include/X11R5        \
-    /usr/include/X11R4        \
-                              \
-    /usr/local/X11/include    \
-    /usr/local/X11R6/include  \
-    /usr/local/X11R5/include  \
-    /usr/local/X11R4/include  \
-                              \
-    /usr/local/include/X11    \
-    /usr/local/include/X11R6  \
-    /usr/local/include/X11R5  \
-    /usr/local/include/X11R4  \
-                              \
-    /usr/X386/include         \
-    /usr/x386/include         \
-    /usr/XFree86/include/X11  \
-                              \
-    /usr/include              \
-    /usr/local/include        \
-    /usr/unsupported/include  \
-    /usr/athena/include       \
-    /usr/local/x11r5/include  \
-    /usr/lpp/Xamples/include  \
-                              \
-    /usr/openwin/include      \
-    /usr/openwin/share/include \
-    ; \
-  do
-    if test -r "$ac_dir/$x_direct_test_include"; then
-      ac_x_includes=$ac_dir
-      break
-    fi
-  done])
-fi # $ac_x_includes = NO
-
-if test "$ac_x_libraries" = NO; then
-  # Check for the libraries.
-
-  test -z "$x_direct_test_library" && x_direct_test_library=Xt
-  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
-
-  # See if we find them without any special options.
-  # Don't add to $LIBS permanently.
-  ac_save_LIBS="$LIBS"
-  LIBS="-l$x_direct_test_library $LIBS"
-AC_TRY_LINK(, [${x_direct_test_function}()],
-[LIBS="$ac_save_LIBS"
-# We can link X programs with no special library path.
-ac_x_libraries=],
-[LIBS="$ac_save_LIBS"
-# First see if replacing the include by lib works.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-for ac_dir in `echo "$ac_x_includes" | sed s/include/lib${kdelibsuff}/` \
-    /usr/X11/lib${kdelibsuff}           \
-    /usr/X11R6/lib${kdelibsuff}         \
-    /usr/X11R5/lib${kdelibsuff}         \
-    /usr/X11R4/lib${kdelibsuff}         \
-                                        \
-    /usr/lib${kdelibsuff}/X11           \
-    /usr/lib${kdelibsuff}/X11R6         \
-    /usr/lib${kdelibsuff}/X11R5         \
-    /usr/lib${kdelibsuff}/X11R4         \
-                                        \
-    /usr/local/X11/lib${kdelibsuff}     \
-    /usr/local/X11R6/lib${kdelibsuff}   \
-    /usr/local/X11R5/lib${kdelibsuff}   \
-    /usr/local/X11R4/lib${kdelibsuff}   \
-                                        \
-    /usr/local/lib${kdelibsuff}/X11     \
-    /usr/local/lib${kdelibsuff}/X11R6   \
-    /usr/local/lib${kdelibsuff}/X11R5   \
-    /usr/local/lib${kdelibsuff}/X11R4   \
-                                        \
-    /usr/X386/lib${kdelibsuff}          \
-    /usr/x386/lib${kdelibsuff}          \
-    /usr/XFree86/lib${kdelibsuff}/X11   \
-                                        \
-    /usr/lib${kdelibsuff}               \
-    /usr/local/lib${kdelibsuff}         \
-    /usr/unsupported/lib${kdelibsuff}   \
-    /usr/athena/lib${kdelibsuff}        \
-    /usr/local/x11r5/lib${kdelibsuff}   \
-    /usr/lpp/Xamples/lib${kdelibsuff}   \
-    /lib/usr/lib${kdelibsuff}/X11       \
-                                        \
-    /usr/openwin/lib${kdelibsuff}       \
-    /usr/openwin/share/lib${kdelibsuff} \
-    ; \
-do
-dnl Don't even attempt the hair of trying to link an X program!
-  for ac_extension in a so sl; do
-    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
-      ac_x_libraries=$ac_dir
-      break 2
-    fi
-  done
-done])
-fi # $ac_x_libraries = NO
-])
+dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
+dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
+dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
+  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+    [AC_LIBTOOL_GCJ],
+    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+      [AC_LIBTOOL_GCJ],
+      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
+	[AC_LIBTOOL_GCJ],
+      [ifdef([AC_PROG_GCJ],
+	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
+       ifdef([A][M_PROG_GCJ],
+	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
+       ifdef([LT_AC_PROG_GCJ],
+	     [define([LT_AC_PROG_GCJ],
+		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
+])])# AC_PROG_LIBTOOL
 
 
-dnl ------------------------------------------------------------------------
-dnl Find a file (or one of more files in a list of dirs)
-dnl ------------------------------------------------------------------------
-dnl
-AC_DEFUN(AC_FIND_FILE,
-[
-$3=NO
-for i in $2;
-do
-  for j in $1;
-  do
-    echo "configure: __oline__: $i/$j" >&AC_FD_CC
-    if test -r "$i/$j"; then
-      echo "taking that" >&AC_FD_CC
-      $3=$i
-      break 2
-    fi
-  done
-done
-])
+# _AC_PROG_LIBTOOL
+# ----------------
+AC_DEFUN([_AC_PROG_LIBTOOL],
+[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
 
-dnl KDE_FIND_PATH(programm-name, variable-name, list of directories,
-dnl	if-not-found, test-parameter)
-AC_DEFUN(KDE_FIND_PATH,
-[
-   AC_MSG_CHECKING([for $1])
-   if test -n "$$2"; then
-        kde_cv_path="$$2";
-   else
-        kde_cache=`echo $1 | sed 'y%./+-%__p_%'`
-
-        AC_CACHE_VAL(kde_cv_path_$kde_cache,
-        [
-        kde_cv_path="NONE"
-	dirs="$3"
-	kde_save_IFS=$IFS
-	IFS=':'
-	for dir in $PATH; do
-	  dirs="$dirs $dir"
-        done
-	IFS=$kde_save_IFS
-
-        for dir in $dirs; do
-	  if test -x "$dir/$1"; then
-	    if test -n "$5"
-	    then
-              evalstr="$dir/$1 $5 2>&1 "
-	      if eval $evalstr; then
-                kde_cv_path="$dir/$1"
-                break
-	      fi
-            else
-		kde_cv_path="$dir/$1"
-                break
-	    fi
-          fi
-        done
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
 
-        eval "kde_cv_path_$kde_cache=$kde_cv_path"
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+# Prevent multiple expansion
+define([AC_PROG_LIBTOOL], [])
+])# _AC_PROG_LIBTOOL
 
-        ])
 
-      eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
+# AC_LIBTOOL_SETUP
+# ----------------
+AC_DEFUN([AC_LIBTOOL_SETUP],
+[AC_PREREQ(2.50)dnl
+AC_REQUIRE([AC_ENABLE_SHARED])dnl
+AC_REQUIRE([AC_ENABLE_STATIC])dnl
+AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_LD])dnl
+AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
+AC_REQUIRE([AC_PROG_NM])dnl
 
-   fi
+AC_REQUIRE([AC_PROG_LN_S])dnl
+AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
+# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+AC_REQUIRE([AC_OBJEXT])dnl
+AC_REQUIRE([AC_EXEEXT])dnl
+dnl
 
-   if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
-      AC_MSG_RESULT(not found)
-      $4
-   else
-      AC_MSG_RESULT($kde_cv_path)
-      $2=$kde_cv_path
+AC_LIBTOOL_SYS_MAX_CMD_LEN
+AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+AC_LIBTOOL_OBJDIR
 
-   fi
-])
+AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+_LT_AC_PROG_ECHO_BACKSLASH
 
-AC_DEFUN(KDE_MOC_ERROR_MESSAGE,
-[
-    AC_MSG_ERROR([No Qt meta object compiler (moc) found!
-Please check whether you installed Qt correctly.
-You need to have a running moc binary.
-configure tried to run $ac_cv_path_moc and the test didn't
-succeed. If configure shouldn't have tried this one, set
-the environment variable MOC to the right one before running
-configure.
-])
-])
+case $host_os in
+aix3*)
+  # AIX sometimes has problems with the GCC collect2 program.  For some
+  # reason, if we set the COLLECT_NAMES environment variable, the problems
+  # vanish in a puff of smoke.
+  if test "X${COLLECT_NAMES+set}" != Xset; then
+    COLLECT_NAMES=
+    export COLLECT_NAMES
+  fi
+  ;;
+esac
 
-AC_DEFUN(KDE_UIC_ERROR_MESSAGE,
-[
-    AC_MSG_WARN([No Qt ui compiler (uic) found!
-Please check whether you installed Qt correctly.
-You need to have a running uic binary.
-configure tried to run $ac_cv_path_uic and the test didn't
-succeed. If configure shouldn't have tried this one, set
-the environment variable UIC to the right one before running
-configure.
-])
-])
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e s/^X//'
+[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
 
+# Same as above, but do not quote variable references.
+[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
 
-AC_DEFUN(KDE_CHECK_UIC_FLAG,
-[
-    AC_MSG_CHECKING([whether uic supports -$1 ])
-    kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
-    AC_CACHE_VAL(kde_cv_prog_uic_$kde_cache,
-    [
-        cat >conftest.ui <<EOT
-        <!DOCTYPE UI><UI version="3" stdsetdef="1"></UI>
-EOT
-        ac_uic_testrun="$UIC_PATH -$1 $2 conftest.ui >/dev/null"
-        if AC_TRY_EVAL(ac_uic_testrun); then
-            eval "kde_cv_prog_uic_$kde_cache=yes"
-        else
-            eval "kde_cv_prog_uic_$kde_cache=no"
-        fi
-        rm -f conftest*
-    ])
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
 
-    if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then
-        AC_MSG_RESULT([yes])
-        :
-        $3
-    else
-        AC_MSG_RESULT([no])
-        :
-        $4
-    fi
-])
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
 
+# Constants:
+rm="rm -f"
 
-dnl ------------------------------------------------------------------------
-dnl Find the meta object compiler and the ui compiler in the PATH,
-dnl in $QTDIR/bin, and some more usual places
-dnl ------------------------------------------------------------------------
-dnl
-AC_DEFUN(AC_PATH_QT_MOC_UIC,
-[
-   qt_bindirs=""
-   for dir in $kde_qt_dirs; do
-      qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc"
-   done
-   qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin"
-   if test ! "$ac_qt_bindir" = "NO"; then
-      qt_bindirs="$ac_qt_bindir $qt_bindirs"
-   fi
+# Global variables:
+default_ofile=libtool
+can_build_shared=yes
 
-   KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE])
-   if test -z "$UIC_NOT_NEEDED"; then
-     KDE_FIND_PATH(uic, UIC_PATH, [$qt_bindirs], [UIC_PATH=""])
-     if test -z "$UIC_PATH" ; then
-       KDE_UIC_ERROR_MESSAGE
-       exit 1
-     elif test $kde_qtver = 3; then
-       KDE_CHECK_UIC_FLAG(L,[/nonexistant],ac_uic_supports_libpath=yes,ac_uic_supports_libpath=no)
-       KDE_CHECK_UIC_FLAG(nounload,,ac_uic_supports_nounload=yes,ac_uic_supports_nounload=no)
-
-       UIC=$UIC_PATH
-       if test x$ac_uic_supports_libpath = xyes; then
-           UIC="$UIC -L \$(kde_widgetdir)"
-       fi
-       if test x$ac_uic_supports_nounload = xyes; then
-           UIC="$UIC -nounload"
-       fi
-     fi
-   else
-     UIC="echo uic not available: "
-   fi
+# All known linkers require a `.a' archive for static linking (except M$VC,
+# which needs '.lib').
+libext=a
+ltmain="$ac_aux_dir/ltmain.sh"
+ofile="$default_ofile"
+with_gnu_ld="$lt_cv_prog_gnu_ld"
 
-   AC_SUBST(MOC)
-   AC_SUBST(UIC)
+AC_CHECK_TOOL(AR, ar, false)
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+AC_CHECK_TOOL(STRIP, strip, :)
 
-   UIC_TR="i18n"
-   if test $kde_qtver = 3; then
-     UIC_TR="tr2i18n"
-   fi
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
 
-   AC_SUBST(UIC_TR)
-])
+# Set sane defaults for various variables
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+test -z "$AS" && AS=as
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+test -z "$LD" && LD=ld
+test -z "$LN_S" && LN_S="ln -s"
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+test -z "$NM" && NM=nm
+test -z "$SED" && SED=sed
+test -z "$OBJDUMP" && OBJDUMP=objdump
+test -z "$RANLIB" && RANLIB=:
+test -z "$STRIP" && STRIP=:
+test -z "$ac_objext" && ac_objext=o
 
-AC_DEFUN(KDE_1_CHECK_PATHS,
-[
-  KDE_1_CHECK_PATH_HEADERS
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
 
-  KDE_TEST_RPATH=
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
+    ;;
+  *)
+    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
+    ;;
+  esac
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
 
-  if test -n "$USE_RPATH"; then
+cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
 
-     if test -n "$kde_libraries"; then
-       KDE_TEST_RPATH="-R $kde_libraries"
-     fi
+# Only perform the check for file, if the check method requires it
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    AC_PATH_MAGIC
+  fi
+  ;;
+esac
 
-     if test -n "$qt_libraries"; then
-       KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries"
-     fi
+AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
+AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
+enable_win32_dll=yes, enable_win32_dll=no)
 
-     if test -n "$x_libraries"; then
-       KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries"
-     fi
+AC_ARG_ENABLE([libtool-lock],
+    [AC_HELP_STRING([--disable-libtool-lock],
+	[avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
-     KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH"
-  fi
+AC_ARG_WITH([pic],
+    [AC_HELP_STRING([--with-pic],
+	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+    [pic_mode="$withval"],
+    [pic_mode=default])
+test -z "$pic_mode" && pic_mode=default
 
-AC_MSG_CHECKING([for KDE libraries installed])
-ac_link='$LIBTOOL_SHELL --silent --mode=link ${CXX-g++} -o conftest $CXXFLAGS $all_includes $CPPFLAGS $LDFLAGS $all_libraries conftest.$ac_ext $LIBS -lkdecore $LIBQT $KDE_TEST_RPATH 1>&5'
+# Check if we have a version mismatch between libtool.m4 and ltmain.sh.
+#
+# Note:  This should be in AC_LIBTOOL_SETUP, _after_ $ltmain have been defined.
+#        We also should do it _before_ AC_LIBTOOL_LANG_C_CONFIG that actually
+#        calls AC_LIBTOOL_CONFIG and creates libtool.
+#
+_LT_VERSION_CHECK
 
-if AC_TRY_EVAL(ac_link) && test -s conftest; then
-  AC_MSG_RESULT(yes)
-else
-  AC_MSG_ERROR([your system fails at linking a small KDE application!
-Check, if your compiler is installed correctly and if you have used the
-same compiler to compile Qt and kdelibs as you did use now.
-For more details about this problem, look at the end of config.log.])
-fi
+# Use C for the default configuration in the libtool script
+tagname=
+AC_LIBTOOL_LANG_C_CONFIG
+_LT_AC_TAGCONFIG
+])# AC_LIBTOOL_SETUP
 
-if eval `KDEDIR= ./conftest 2>&5`; then
-  kde_result=done
+
+# _LT_VERSION_CHECK
+# -----------------
+AC_DEFUN([_LT_VERSION_CHECK],
+[AC_MSG_CHECKING([for correct ltmain.sh version])
+if test -z "$ltmain"; then
+  AC_MSG_RESULT(no)
+  echo
+  echo "*** [Gentoo] sanity check failed! ***"
+  echo "*** \$ltmain is not defined, please check the patch for consistency! ***"
+  echo
+  exit 1
+fi
+gentoo_lt_version="1.5.10"
+gentoo_ltmain_version=`grep '^[[:space:]]*VERSION=' $ltmain | sed -e 's|^[[:space:]]*VERSION=||'`
+if test "$gentoo_lt_version" != "$gentoo_ltmain_version"; then
+  AC_MSG_RESULT(no)
+  echo
+  echo "*** [Gentoo] sanity check failed! ***"
+  echo "*** libtool.m4 and ltmain.sh have a version mismatch! ***"
+  echo "*** (libtool.m4 = $gentoo_lt_version, ltmain.sh = $gentoo_ltmain_version) ***"
+  echo
+  echo "Please run:"
+  echo
+  echo "  libtoolize --copy --force"
+  echo
+  echo "if appropriate, please contact the maintainer of this"
+  echo "package (or your distribution) for help."
+  echo
+  exit 1
 else
-  kde_result=problems
+  AC_MSG_RESULT(yes)
 fi
+])# _LT_VERSION_CHECK
 
-KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
-kde_have_all_paths=yes
 
-KDE_SET_PATHS($kde_result)
+# _LT_AC_SYS_COMPILER
+# -------------------
+AC_DEFUN([_LT_AC_SYS_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
 
-])
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
 
-AC_DEFUN(KDE_SET_PATHS,
-[
-  kde_cv_all_paths="kde_have_all_paths=\"yes\" \
-	kde_htmldir=\"$kde_htmldir\" \
-	kde_appsdir=\"$kde_appsdir\" \
-	kde_icondir=\"$kde_icondir\" \
-	kde_sounddir=\"$kde_sounddir\" \
-	kde_datadir=\"$kde_datadir\" \
-	kde_locale=\"$kde_locale\" \
-	kde_cgidir=\"$kde_cgidir\" \
-	kde_confdir=\"$kde_confdir\" \
-	kde_mimedir=\"$kde_mimedir\" \
-	kde_toolbardir=\"$kde_toolbardir\" \
-	kde_wallpaperdir=\"$kde_wallpaperdir\" \
-	kde_templatesdir=\"$kde_templatesdir\" \
-	kde_bindir=\"$kde_bindir\" \
-	kde_servicesdir=\"$kde_servicesdir\" \
-	kde_servicetypesdir=\"$kde_servicetypesdir\" \
-	kde_moduledir=\"$kde_moduledir\" \
-   kde_styledir=\"$kde_styledir\" \
-	kde_widgetdir=\"$kde_widgetdir\" \
-	kde_result=$1"
-])
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _LT_AC_SYS_COMPILER
 
-AC_DEFUN(KDE_SET_DEFAULT_PATHS,
-[
-if test "$1" = "default"; then
 
-  if test -z "$kde_htmldir"; then
-    kde_htmldir='\${prefix}/share/doc/HTML'
-  fi
-  if test -z "$kde_appsdir"; then
-    kde_appsdir='\${prefix}/share/applnk'
-  fi
-  if test -z "$kde_icondir"; then
-    kde_icondir='\${prefix}/share/icons'
-  fi
-  if test -z "$kde_sounddir"; then
-    kde_sounddir='\${prefix}/share/sounds'
-  fi
-  if test -z "$kde_datadir"; then
-    kde_datadir='\${prefix}/share/apps'
-  fi
-  if test -z "$kde_locale"; then
-    kde_locale='\${prefix}/share/locale'
-  fi
-  if test -z "$kde_cgidir"; then
-    kde_cgidir='\${exec_prefix}/cgi-bin'
-  fi
-  if test -z "$kde_confdir"; then
-    kde_confdir='\${prefix}/share/config'
-  fi
-  if test -z "$kde_mimedir"; then
-    kde_mimedir='\${prefix}/share/mimelnk'
-  fi
-  if test -z "$kde_toolbardir"; then
-    kde_toolbardir='\${prefix}/share/toolbar'
-  fi
-  if test -z "$kde_wallpaperdir"; then
-    kde_wallpaperdir='\${prefix}/share/wallpapers'
-  fi
-  if test -z "$kde_templatesdir"; then
-    kde_templatesdir='\${prefix}/share/templates'
-  fi
-  if test -z "$kde_bindir"; then
-    kde_bindir='\${exec_prefix}/bin'
-  fi
-  if test -z "$kde_servicesdir"; then
-    kde_servicesdir='\${prefix}/share/services'
-  fi
-  if test -z "$kde_servicetypesdir"; then
-    kde_servicetypesdir='\${prefix}/share/servicetypes'
-  fi
-  if test -z "$kde_moduledir"; then
-    if test "$kde_qtver" = "2"; then
-      kde_moduledir='\${libdir}/kde2'
-    else
-      kde_moduledir='\${libdir}/kde3'
-    fi
-  fi
-  if test -z "$kde_styledir"; then
-    kde_styledir='\${libdir}/kde3/plugins/styles'
-  fi
-  if test -z "$kde_widgetdir"; then
-    kde_widgetdir='\${libdir}/kde3/plugins/designer'
-  fi
-
-  KDE_SET_PATHS(defaults)
-
-else
-
-  if test $kde_qtver = 1; then
-     AC_MSG_RESULT([compiling])
-     KDE_1_CHECK_PATHS
-  else
-     AC_MSG_ERROR([path checking not yet supported for KDE 2])
-  fi
-
-fi
-])
-
-AC_DEFUN(KDE_CHECK_PATHS_FOR_COMPLETENESS,
-[ if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
-   test -z "$kde_icondir" || test -z "$kde_sounddir" ||
-   test -z "$kde_datadir" || test -z "$kde_locale"  ||
-   test -z "$kde_cgidir"  || test -z "$kde_confdir" ||
-   test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
-   test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
-   test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
-   test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
-   test -z "$kde_styledir" || test -z "kde_widgetdir" 
-   test "x$kde_have_all_paths" != "xyes"; then
-     kde_have_all_paths=no
-  fi
-])
-
-AC_DEFUN(KDE_MISSING_PROG_ERROR,
-[
-    AC_MSG_ERROR([The important program $1 was not found!
-Please check whether you installed KDE correctly.
-])
-])
-
-AC_DEFUN(KDE_MISSING_ARTS_ERROR,
-[
-    AC_MSG_ERROR([The important program $1 was not found!
-Please check whether you installed aRts correctly.
-])
-])
-
-AC_DEFUN(KDE_SUBST_PROGRAMS,
-[
-
-        kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde3/bin /usr/kde/bin /usr/local/kde/bin"
-        test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs"
-        if test -n "$KDEDIRS"; then
-           kde_save_IFS=$IFS
-           IFS=:
-           for dir in $KDEDIRS; do
-                kde_default_bindirs="$dir/bin $kde_default_bindirs "
-           done
-           IFS=$kde_save_IFS
-        fi
-        kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_default_bindirs"
-        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)])
-        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)])
-        KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs])
-        KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
-      
-        if test -n "$MEINPROC" && test ! "$MEINPROC" = "compiled"; then  
- 	    kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
-            test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
-            AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
-	    if test "$KDE_XSL_STYLESHEET" = "NO"; then
-		KDE_XSL_STYLESHEET=""
-	    else
-                KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl"
-	    fi
-        fi
-
-        DCOP_DEPENDENCIES='$(DCOPIDL)'
-        AC_SUBST(DCOPIDL)
-        AC_SUBST(DCOPIDL2CPP)
-        AC_SUBST(DCOP_DEPENDENCIES)
-        AC_SUBST(MCOPIDL)
-        AC_SUBST(ARTSCCONFIG)
-        AC_SUBST(KDECONFIG)
-	AC_SUBST(MEINPROC)
- 	AC_SUBST(KDE_XSL_STYLESHEET)
-
-        if test -x "$KDECONFIG"; then # it can be "compiled"
-          kde_libs_prefix=`$KDECONFIG --prefix`
-          if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
-               AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
-                          This means it has been moved since you installed it.
-                          This won't work. Please recompile kdelibs for the new prefix.
-                          ])
-           fi
-           kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
-        else
-           kde_libs_prefix='$(prefix)'
-           kde_libs_htmldir='$(kde_htmldir)'
-        fi
-        AC_SUBST(kde_libs_prefix)
-        AC_SUBST(kde_libs_htmldir)
-])dnl
-
-AC_DEFUN(AC_CREATE_KFSSTND,
-[
-AC_REQUIRE([AC_CHECK_RPATH])
-
-AC_MSG_CHECKING([for KDE paths])
-kde_result=""
-kde_cached_paths=yes
-AC_CACHE_VAL(kde_cv_all_paths,
-[
-  KDE_SET_DEFAULT_PATHS($1)
-  kde_cached_paths=no
-])
-eval "$kde_cv_all_paths"
-KDE_CHECK_PATHS_FOR_COMPLETENESS
-if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then
-  # wrong values were cached, may be, we can set better ones
-  kde_result=
-  kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
-  kde_datadir= kde_locale=  kde_cgidir=  kde_confdir=
-  kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
-  kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
-  kde_have_all_paths=
-  kde_styledir=
-  kde_widgetdir=
-  KDE_SET_DEFAULT_PATHS($1)
-  eval "$kde_cv_all_paths"
-  KDE_CHECK_PATHS_FOR_COMPLETENESS
-  kde_result="$kde_result (cache overridden)"
-fi
-if test "$kde_have_all_paths" = "no"; then
-  AC_MSG_ERROR([configure could not run a little KDE program to test the environment.
-Since it had compiled and linked before, it must be a strange problem on your system.
-Look at config.log for details. If you are not able to fix this, look at
-http://www.kde.org/faq/installation.html or any www.kde.org mirror.
-(If you're using an egcs version on Linux, you may update binutils!)
-])
-else
-  rm -f conftest*
-  AC_MSG_RESULT($kde_result)
-fi
-
-bindir=$kde_bindir
-
-KDE_SUBST_PROGRAMS
-
-])
-
-AC_DEFUN(AC_SUBST_KFSSTND,
-[
-AC_SUBST(kde_htmldir)
-AC_SUBST(kde_appsdir)
-AC_SUBST(kde_icondir)
-AC_SUBST(kde_sounddir)
-AC_SUBST(kde_datadir)
-AC_SUBST(kde_locale)
-AC_SUBST(kde_confdir)
-AC_SUBST(kde_mimedir)
-AC_SUBST(kde_wallpaperdir)
-AC_SUBST(kde_bindir)
-dnl for KDE 2
-AC_SUBST(kde_templatesdir)
-AC_SUBST(kde_servicesdir)
-AC_SUBST(kde_servicetypesdir)
-AC_SUBST(kde_moduledir)
-AC_SUBST(kde_styledir)
-AC_SUBST(kde_widgetdir)
-if test "$kde_qtver" = 1; then
-  kde_minidir="$kde_icondir/mini"
-else
-# for KDE 1 - this breaks KDE2 apps using minidir, but
-# that's the plan ;-/
-  kde_minidir="/dev/null"
-fi
-dnl AC_SUBST(kde_minidir)
-dnl AC_SUBST(kde_cgidir)
-dnl AC_SUBST(kde_toolbardir)
-])
-
-AC_DEFUN(KDE_MISC_TESTS,
-[
-   AC_LANG_C
-   dnl Checks for libraries.
-   AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD 
-   AC_SUBST(LIBUTIL)
-   AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD
-   AC_SUBST(LIBCOMPAT)
-   kde_have_crypt=
-   AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes],
-      AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [
-        AC_MSG_WARN([you have no crypt in either libcrypt or libc.
-You should install libcrypt from another source or configure with PAM
-support])
-	kde_have_crypt=no
-      ]))
-   AC_SUBST(LIBCRYPT)
-   if test $kde_have_crypt = yes; then
-      AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
-   fi
-   AC_CHECK_SOCKLEN_T
-   AC_LANG_C
-   AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
-   if test $ac_cv_lib_dnet_dnet_ntoa = no; then
-      AC_CHECK_LIB(dnet_stub, dnet_ntoa,
-        [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
-   fi
-   AC_CHECK_FUNC(inet_ntoa)
-   if test $ac_cv_func_inet_ntoa = no; then
-     AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
-   fi
-   AC_CHECK_FUNC(connect)
-   if test $ac_cv_func_connect = no; then
-      AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
-        $X_EXTRA_LIBS)
-   fi
-
-   AC_CHECK_FUNC(remove)
-   if test $ac_cv_func_remove = no; then
-      AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix")
-   fi
-
-   # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
-   AC_CHECK_FUNC(shmat, ,
-     AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
-   
-   # darwin needs this to initialize the environment
-   AC_CHECK_HEADERS(crt_externs.h)
-   AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define if your system needs _NSGetEnviron to set up the environment])])
- 
-   # more headers that need to be explicitly included on darwin
-   AC_CHECK_HEADERS(sys/types.h stdint.h)
-
-   # darwin requires a poll emulation library
-   AC_CHECK_LIB(poll, poll, LIB_POLL="-lpoll")
-
-   # CoreAudio framework
-   AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [
-     AC_DEFINE(HAVE_COREAUDIO, 1, [Define if you have the CoreAudio API])
-     FRAMEWORK_COREAUDIO="-framework CoreAudio"
-   ])
-
-   AC_CHECK_RES_INIT
-   AC_SUBST(LIB_POLL)
-   AC_SUBST(FRAMEWORK_COREAUDIO)
-   LIBSOCKET="$X_EXTRA_LIBS"
-   AC_SUBST(LIBSOCKET)
-   AC_SUBST(X_EXTRA_LIBS)
-   AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
-   AC_SUBST(LIBUCB)
-
-   case $host in  dnl this *is* LynxOS specific
-   *-*-lynxos* )
-        AC_MSG_CHECKING([LynxOS header file wrappers])
-        [CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"]
-        AC_MSG_RESULT(disabled)
-        AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS
-         ;;
-    esac
-
-   KDE_CHECK_TYPES
-   KDE_CHECK_LIBDL
-
-AH_VERBATIM(_AIX_STRINGS_H_BZERO,
-[
-/*
- * AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
- * that defines bzero.
- */
-
-#if defined(_AIX)
-#include <strings.h>
-#endif
-])
-
-AC_CHECK_FUNCS([vsnprintf snprintf])
+# _LT_AC_SYS_LIBPATH_AIX
+# ----------------------
+# Links a minimal program and checks the executable
+# for the system default hardcoded library path. In most cases,
+# this is /usr/lib:/lib, but when the MPI compilers are used
+# the location of the communication and MPI libs are included too.
+# If we don't find anything, use the default library path according
+# to the aix ld manual.
+AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
+[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi],[])
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+])# _LT_AC_SYS_LIBPATH_AIX
 
-AH_VERBATIM(_TRU64,[
-/*
- * On HP-UX, the declaration of vsnprintf() is needed every time !
- */
 
-#if !defined(HAVE_VSNPRINTF) || defined(hpux)
-#if __STDC__
-#include <stdarg.h>
-#include <stdlib.h>
-#else
-#include <varargs.h>
-#endif
-#ifdef __cplusplus
-extern "C"
-#endif
-int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
-#ifdef __cplusplus
-extern "C"
-#endif
-int snprintf(char *str, size_t n, char const *fmt, ...);
-#endif
-])
+# _LT_AC_SHELL_INIT(ARG)
+# ----------------------
+AC_DEFUN([_LT_AC_SHELL_INIT],
+[ifdef([AC_DIVERSION_NOTICE],
+	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+	 [AC_DIVERT_PUSH(NOTICE)])
+$1
+AC_DIVERT_POP
+])# _LT_AC_SHELL_INIT
 
-])
 
-dnl ------------------------------------------------------------------------
-dnl Find the header files and libraries for X-Windows. Extended the
-dnl macro AC_PATH_X
-dnl ------------------------------------------------------------------------
-dnl
-AC_DEFUN(K_PATH_X,
-[
-AC_REQUIRE([KDE_MISC_TESTS])dnl
-AC_REQUIRE([KDE_CHECK_LIB64])
-
-AC_ARG_ENABLE(
-  embedded,
-  [  --enable-embedded       link to Qt-embedded, don't use X],
-  kde_use_qt_emb=$enableval,
-  kde_use_qt_emb=no
-)
-
-AC_ARG_ENABLE(
-  qtopia,
-  [  --enable-qtopia         link to Qt-embedded, link to the Qtopia Environment],
-  kde_use_qt_emb_palm=$enableval,
-  kde_use_qt_emb_palm=no
-)
-
-if test "$kde_use_qt_emb" = "no"; then
-
-AC_MSG_CHECKING(for X)
-AC_LANG_SAVE
-AC_LANG_C
-AC_CACHE_VAL(kde_cv_have_x,
-[# One or both of the vars are not set, and there is no cached value.
-if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
-   kde_x_includes=NO
-else
-   kde_x_includes=$x_includes
-fi
-if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then
-   kde_x_libraries=NO
-else
-   kde_x_libraries=$x_libraries
-fi
+# _LT_AC_PROG_ECHO_BACKSLASH
+# --------------------------
+# Add some code to the start of the generated configure script which
+# will find an echo command which doesn't interpret backslashes.
+AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
+[_LT_AC_SHELL_INIT([
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
 
-# below we use the standard autoconf calls
-ac_x_libraries=$kde_x_libraries
-ac_x_includes=$kde_x_includes
-
-KDE_PATH_X_DIRECT
-dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
-dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
-dnl location. The correct location is /usr/lib32 or an undefined value
-dnl (the linker is smart enough to pick the correct default library).
-dnl Things work just fine if you use just AC_PATH_X_DIRECT.
-dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to
-dnl /usr/openwin/include, which doesn't work. /usr/include does work, so
-dnl x_includes should be left alone.
-case "$host" in
-mips-sgi-irix6*)
-  ;;
-*-*-solaris*)
+case X$ECHO in
+X*--fallback-echo)
+  # Remove one level of quotation (which was required for Make).
+  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
   ;;
-*)
-  _AC_PATH_X_XMKMF
-  if test -z "$ac_x_includes"; then
-    ac_x_includes="."
-  fi
-  if test -z "$ac_x_libraries"; then
-    ac_x_libraries="/usr/lib${kdelibsuff}"
-  fi
 esac
-#from now on we use our own again
 
-# when the user already gave --x-includes, we ignore
-# what the standard autoconf macros told us.
-if test "$kde_x_includes" = NO; then
-  kde_x_includes=$ac_x_includes
+echo=${ECHO-echo}
+if test "X[$]1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X[$]1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
+  # Yippee, $echo works!
+  :
+else
+  # Restart under the correct shell.
+  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
 fi
 
-# for --x-libraries too
-if test "$kde_x_libraries" = NO; then
-  kde_x_libraries=$ac_x_libraries
+if test "X[$]1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+[$]*
+EOF
+  exit 0
 fi
 
-if test "$kde_x_includes" = NO; then
-  AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!])
-fi
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
-if test "$kde_x_libraries" = NO; then
-  AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!])
+if test -z "$ECHO"; then
+if test "X${echo_test_string+set}" != Xset; then
+# find a string as large as possible, as long as the shell can cope with it
+  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
+    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
+       echo_test_string="`eval $cmd`" &&
+       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
+    then
+      break
+    fi
+  done
 fi
 
-# Record where we found X for the cache.
-kde_cv_have_x="have_x=yes \
-         kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
-])dnl
-
-eval "$kde_cv_have_x"
-
-if test "$have_x" != yes; then
-  AC_MSG_RESULT($have_x)
-  no_x=yes
+if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+   test "X$echo_testing_string" = "X$echo_test_string"; then
+  :
 else
-  AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes])
-fi
-
-if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
-  X_INCLUDES=""
-  x_includes="."; dnl better than nothing :-
- else
-  x_includes=$kde_x_includes
-  X_INCLUDES="-I$x_includes"
-fi
-
-if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then
-  X_LDFLAGS=""
-  x_libraries="/usr/lib"; dnl better than nothing :-
- else
-  x_libraries=$kde_x_libraries
-  X_LDFLAGS="-L$x_libraries"
-fi
-all_includes="$X_INCLUDES"
-all_libraries="$X_LDFLAGS"
-
-AC_SUBST(X_INCLUDES)
-AC_SUBST(X_LDFLAGS)
-AC_SUBST(x_libraries)
-AC_SUBST(x_includes)
-
-# Check for libraries that X11R6 Xt/Xaw programs need.
-ac_save_LDFLAGS="$LDFLAGS"
-LDFLAGS="$LDFLAGS $X_LDFLAGS"
-# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
-# check for ICE first), but we must link in the order -lSM -lICE or
-# we get undefined symbols.  So assume we have SM if we have ICE.
-# These have to be linked with before -lX11, unlike the other
-# libraries we check for below, so use a different variable.
-#  --interran at uluru.Stanford.EDU, kb at cs.umb.edu.
-AC_CHECK_LIB(ICE, IceConnectionNumber,
-  [LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS)
-AC_SUBST(LIBSM)
-LDFLAGS="$ac_save_LDFLAGS"
-
-AC_SUBST(X_PRE_LIBS)
-
-LIB_X11='-lX11 $(LIBSOCKET)'
-AC_SUBST(LIB_X11)
-
-AC_MSG_CHECKING(for libXext)
-AC_CACHE_VAL(kde_cv_have_libXext,
-[
-kde_ldflags_safe="$LDFLAGS"
-kde_libs_safe="$LIBS"
-
-LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
-LIBS="-lXext -lX11 $LIBSOCKET"
+  # The Solaris, AIX, and Digital Unix default echo programs unquote
+  # backslashes.  This makes it impossible to quote backslashes using
+  #   echo "$something" | sed 's/\\/\\\\/g'
+  #
+  # So, first we look for a working echo in the user's PATH.
 
-AC_TRY_LINK([
-#include <stdio.h>
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-#endif
-],
-[
-printf("hello Xext\n");
-],
-kde_cv_have_libXext=yes,
-kde_cv_have_libXext=no
-   )
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for dir in $PATH /usr/ucb; do
+    IFS="$lt_save_ifs"
+    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      echo="$dir/echo"
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
 
-LDFLAGS=$kde_ldflags_safe
-LIBS=$kde_libs_safe
- ])
+  if test "X$echo" = Xecho; then
+    # We didn't find a better echo, so look for alternatives.
+    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      # This shell has a builtin print -r that does the trick.
+      echo='print -r'
+    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
+	 test "X$CONFIG_SHELL" != X/bin/ksh; then
+      # If we have ksh, try running configure again with it.
+      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+      export ORIGINAL_CONFIG_SHELL
+      CONFIG_SHELL=/bin/ksh
+      export CONFIG_SHELL
+      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
+    else
+      # Try using printf.
+      echo='printf %s\n'
+      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+	 test "X$echo_testing_string" = "X$echo_test_string"; then
+	# Cool, printf works
+	:
+      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+	   test "X$echo_testing_string" = 'X\t' &&
+	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+	export CONFIG_SHELL
+	SHELL="$CONFIG_SHELL"
+	export SHELL
+	echo="$CONFIG_SHELL [$]0 --fallback-echo"
+      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+	   test "X$echo_testing_string" = 'X\t' &&
+	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	echo="$CONFIG_SHELL [$]0 --fallback-echo"
+      else
+	# maybe with a smaller string...
+	prev=:
 
-AC_MSG_RESULT($kde_cv_have_libXext)
+	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
+	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
+	  then
+	    break
+	  fi
+	  prev="$cmd"
+	done
 
-if test "$kde_cv_have_libXext" = "no"; then
-  AC_MSG_ERROR([We need a working libXext to proceed. Since configure
-can't find it itself, we stop here assuming that make wouldn't find
-them either.])
+	if test "$prev" != 'sed 50q "[$]0"'; then
+	  echo_test_string=`eval $prev`
+	  export echo_test_string
+	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
+	else
+	  # Oops.  We lost completely, so just stick with echo.
+	  echo=echo
+	fi
+      fi
+    fi
+  fi
 fi
-
-AC_MSG_CHECKING(for Xinerama)
-
- AC_ARG_WITH(xinerama,
-  [  --with-xinerama         enable support for Xinerama ],
-  [
-    no_xinerama=no
-  ], [
-    no_xinerama=yes
-  ]
-)
-
-kde_save_LDFLAGS="$LDFLAGS"
-kde_save_CFLAGS="$CFLAGS"
-kde_save_LIBS="$LIBS"
-LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
-CFLAGS="$CFLAGS -I$x_includes"
-LIBS="-lXinerama -lXext"
-
-if test "x$no_xinerama" = "xno"; then
-
-  AC_CACHE_VAL(ac_cv_have_xinerama,
-  [
-	  AC_TRY_LINK([#include <X11/Xlib.h>
-  			#include <X11/extensions/Xinerama.h>],
-	  	  [XineramaIsActive(NULL);],
-		  [ac_cv_have_xinerama="yes"],
-		  [ac_cv_have_xinerama="no"])
-  ])
-else
-  ac_cv_have_xinerama=no;
 fi
 
-AC_MSG_RESULT($ac_cv_have_xinerama)
-
-LIBXINERAMA=""
-
-if test "$ac_cv_have_xinerama" = "yes"; then
-  AC_DEFINE(HAVE_XINERAMA, 1, [Define if you want Xinerama support])
-  LIBXINERAMA="-lXinerama"
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+ECHO=$echo
+if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
+   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
 fi
 
-AC_SUBST(LIBXINERAMA)
+AC_SUBST(ECHO)
+])])# _LT_AC_PROG_ECHO_BACKSLASH
 
-LDFLAGS="$kde_save_LDFLAGS"
-CFLAGS="$kde_save_CFLAGS"
-LIBS="$kde_save_LIBS"
-
-LIB_XEXT="-lXext"
-QTE_NORTTI=""
-
-else
-  dnl We're using QT Embedded
-  CPPFLAGS=-DQWS
-  CXXFLAGS="$CXXFLAGS -fno-rtti"
-  QTE_NORTTI="-fno-rtti -DQWS"
-  X_PRE_LIBS=""
-  LIB_X11=""
-  LIB_XEXT=""
-  LIBSM=""
-  X_INCLUDES=""
-  X_LDFLAGS=""
-  x_includes=""
-  x_libraries=""
-  AC_SUBST(X_PRE_LIBS)
-  AC_SUBST(LIB_X11)
-  AC_SUBST(LIBSM)
-  AC_SUBST(X_INCLUDES)
-  AC_SUBST(X_LDFLAGS)
-  AC_SUBST(x_includes)
-  AC_SUBST(x_libraries)
-fi
-AC_SUBST(QTE_NORTTI)
-AC_SUBST(LIB_XEXT)
 
+# _LT_AC_LOCK
+# -----------
+AC_DEFUN([_LT_AC_LOCK],
+[AC_ARG_ENABLE([libtool-lock],
+    [AC_HELP_STRING([--disable-libtool-lock],
+	[avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
-AC_LANG_RESTORE
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *ELF-32*)
+      HPUX_IA64_MODE="32"
+      ;;
+    *ELF-64*)
+      HPUX_IA64_MODE="64"
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+   if test "$lt_cv_prog_gnu_ld" = yes; then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -melf32bsmip"
+      ;;
+    *N32*)
+      LD="${LD-ld} -melf32bmipn32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -melf64bmip"
+      ;;
+    esac
+   else
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -32"
+      ;;
+    *N32*)
+      LD="${LD-ld} -n32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -64"
+      ;;
+    esac
+   fi
+  fi
+  rm -rf conftest*
+  ;;
 
-])
+x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case "`/usr/bin/file conftest.o`" in
+    *32-bit*)
+      case $host in
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_i386"
+          ;;
+        ppc64-*linux*|powerpc64-*linux*)
+          LD="${LD-ld} -m elf32ppclinux"
+          ;;
+        s390x-*linux*)
+          LD="${LD-ld} -m elf_s390"
+          ;;
+        sparc64-*linux*)
+          LD="${LD-ld} -m elf32_sparc"
+          ;;
+      esac
+      ;;
+    *64-bit*)
+      case $host in
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_x86_64"
+          ;;
+        ppc*-*linux*|powerpc*-*linux*)
+          LD="${LD-ld} -m elf64ppc"
+          ;;
+        s390*-*linux*)
+          LD="${LD-ld} -m elf64_s390"
+          ;;
+        sparc*-*linux*)
+          LD="${LD-ld} -m elf64_sparc"
+          ;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
 
-AC_DEFUN(KDE_PRINT_QT_PROGRAM,
-[
-AC_REQUIRE([KDE_USE_QT])
-cat > conftest.$ac_ext <<EOF
-#include "confdefs.h"
-#include <qglobal.h>
-#include <qapplication.h>
-EOF
-if test "$kde_qtver" = "2"; then
-cat >> conftest.$ac_ext <<EOF
-#include <qevent.h>
-#include <qstring.h>
-#include <qstyle.h>
-EOF
+*-*-linux*)
+  # Test if the compiler is 64bit
+  echo 'int i;' > conftest.$ac_ext
+  lt_cv_cc_64bit_output=no
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *"ELF 64"*)
+      lt_cv_cc_64bit_output=yes
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+  
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+    [AC_LANG_PUSH(C)
+     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+     AC_LANG_POP])
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
+[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
+  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+  AC_CHECK_TOOL(AS, as, false)
+  AC_CHECK_TOOL(OBJDUMP, objdump, false)
+  ;;
+  ])
+esac
 
-if test $kde_qtsubver -gt 0; then
-cat >> conftest.$ac_ext <<EOF
-#if QT_VERSION < 210
-#error 1
-#endif
-EOF
-fi
-fi
+need_locks="$enable_libtool_lock"
 
-if test "$kde_qtver" = "3"; then
-cat >> conftest.$ac_ext <<EOF
-#include <qcursor.h>
-#include <qstylefactory.h>
-#include <private/qucomextra_p.h>
-EOF
-fi
+])# _LT_AC_LOCK
 
-echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
-cat >> conftest.$ac_ext <<EOF
-#error 1
-#endif
 
-int main() {
-EOF
-if test "$kde_qtver" = "2"; then
-cat >> conftest.$ac_ext <<EOF
-    QStringList *t = new QStringList();
-    Q_UNUSED(t);
-EOF
-if test $kde_qtsubver -gt 0; then
-cat >> conftest.$ac_ext <<EOF
-    QString s;
-    s.setLatin1("Elvis is alive", 14);
-EOF
-fi
-fi
-if test "$kde_qtver" = "3"; then
-cat >> conftest.$ac_ext <<EOF
-    (void)QStyleFactory::create(QString::null);
-    QCursor c(Qt::WhatsThisCursor);
-EOF
-fi
-cat >> conftest.$ac_ext <<EOF
-    return 0;
-}
-EOF
+# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
+[AC_REQUIRE([LT_AC_PROG_SED])
+AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$3"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&AS_MESSAGE_LOG_FD
+   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test ! -s conftest.err; then
+       $2=yes
+     fi
+   fi
+   $rm conftest*
 ])
 
-AC_DEFUN(KDE_USE_QT,
-[
-if test -z "$1"; then
-  # Current default Qt version: 3.1
-  kde_qtver=3
-  kde_qtsubver=1
+if test x"[$]$2" = xyes; then
+    ifelse([$5], , :, [$5])
 else
-  kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
-  # following is the check if subversion isnt found in passed argument
-  if test "$kde_qtsubver" = "$1"; then
-    kde_qtsubver=1
-  fi
-  kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
-  if test "$kde_qtver" = "1"; then
-    kde_qtsubver=42
-  fi
+    ifelse([$6], , :, [$6])
 fi
+])# AC_LIBTOOL_COMPILER_OPTION
 
-if test -z "$2"; then
-  if test "$kde_qtver" = "2"; then
-    if test $kde_qtsubver -gt 0; then
-      kde_qt_minversion=">= Qt 2.2.2"
-    else
-      kde_qt_minversion=">= Qt 2.0.2"
-    fi
-  fi
-  if test "$kde_qtver" = "3"; then
-    if test $kde_qtsubver -gt 0; then
-      kde_qt_minversion=">= Qt 3.1.0"
-    else
-      kde_qt_minversion=">= Qt 3.0"
-    fi
-  fi
-  if test "$kde_qtver" = "1"; then
-    kde_qt_minversion=">= 1.42 and < 2.0"
-  fi
-else
-   kde_qt_minversion=$2
-fi
 
-if test -z "$3"; then
-   if test $kde_qtver = 3; then
-     if test $kde_qtsubver -gt 0; then
-       kde_qt_verstring="QT_VERSION >= 0x030100"
-     else
-       kde_qt_verstring="QT_VERSION >= 300"
-     fi
-   fi
-   if test $kde_qtver = 2; then
-     if test $kde_qtsubver -gt 0; then
-       kde_qt_verstring="QT_VERSION >= 222"
+# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#                          [ACTION-SUCCESS], [ACTION-FAILURE])
+# ------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
+[AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $3"
+   printf "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&AS_MESSAGE_LOG_FD
      else
-       kde_qt_verstring="QT_VERSION >= 200"
+       $2=yes
      fi
    fi
-   if test $kde_qtver = 1; then
-    kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
-   fi
-else
-   kde_qt_verstring=$3
-fi
-
-if test $kde_qtver = 3; then
-  kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt /usr/share/qt3"
-fi
-if test $kde_qtver = 2; then
-   kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
-fi
-if test $kde_qtver = 1; then
-   kde_qt_dirs="$QTDIR /usr/lib/qt"
-fi
+   $rm conftest*
+   LDFLAGS="$save_LDFLAGS"
 ])
 
-AC_DEFUN(KDE_CHECK_QT_DIRECT,
-[
-AC_REQUIRE([KDE_USE_QT])
-AC_MSG_CHECKING([if Qt compiles without flags])
-AC_CACHE_VAL(kde_cv_qt_direct,
-[
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH
-ac_LIBRARY_PATH="$LIBRARY_PATH"
-ac_cxxflags_safe="$CXXFLAGS"
-ac_ldflags_safe="$LDFLAGS"
-ac_libs_safe="$LIBS"
-
-CXXFLAGS="$CXXFLAGS -I$qt_includes"
-LDFLAGS="$LDFLAGS $X_LDFLAGS"
-if test "x$kde_use_qt_emb" != "xyes"; then
-LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
-else
-LIBS="$LIBQT $LIBSOCKET"
-fi
-LD_LIBRARY_PATH=
-export LD_LIBRARY_PATH
-LIBRARY_PATH=
-export LIBRARY_PATH
-
-KDE_PRINT_QT_PROGRAM
-
-if AC_TRY_EVAL(ac_link) && test -s conftest; then
-  kde_cv_qt_direct="yes"
+if test x"[$]$2" = xyes; then
+    ifelse([$4], , :, [$4])
 else
-  kde_cv_qt_direct="no"
-  echo "configure: failed program was:" >&AC_FD_CC
-  cat conftest.$ac_ext >&AC_FD_CC
+    ifelse([$5], , :, [$5])
 fi
+])# AC_LIBTOOL_LINKER_OPTION
 
-rm -f conftest*
-CXXFLAGS="$ac_cxxflags_safe"
-LDFLAGS="$ac_ldflags_safe"
-LIBS="$ac_libs_safe"
-
-LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"
-export LD_LIBRARY_PATH
-LIBRARY_PATH="$ac_LIBRARY_PATH"
-export LIBRARY_PATH
-AC_LANG_RESTORE
-])
-
-if test "$kde_cv_qt_direct" = "yes"; then
-  AC_MSG_RESULT(yes)
-  $1
-else
-  AC_MSG_RESULT(no)
-  $2
-fi
-])
 
-dnl ------------------------------------------------------------------------
-dnl Try to find the Qt headers and libraries.
-dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed)
-dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed)
-dnl ------------------------------------------------------------------------
-dnl
-AC_DEFUN(AC_PATH_QT_1_3,
-[
-AC_REQUIRE([K_PATH_X])
-AC_REQUIRE([KDE_USE_QT])
-AC_REQUIRE([KDE_CHECK_LIB64])
-
-dnl ------------------------------------------------------------------------
-dnl Add configure flag to enable linking to MT version of Qt library.
-dnl ------------------------------------------------------------------------
-
-AC_ARG_ENABLE(
-  mt,
-  [  --disable-mt            link to non-threaded Qt (deprecated)],
-  kde_use_qt_mt=$enableval,
-  [
-    if test $kde_qtver = 3; then
-      kde_use_qt_mt=yes
-    else
-      kde_use_qt_mt=no
-    fi
-  ]
-)
-
-USING_QT_MT=""
-
-dnl ------------------------------------------------------------------------
-dnl If we not get --disable-qt-mt then adjust some vars for the host.
-dnl ------------------------------------------------------------------------
-
-KDE_MT_LDFLAGS=
-KDE_MT_LIBS=
-if test "x$kde_use_qt_mt" = "xyes"; then
-  KDE_CHECK_THREADING
-  if test "x$kde_use_threading" = "xyes"; then
-    CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
-    KDE_MT_LDFLAGS="$USE_THREADS"
-    KDE_MT_LIBS="$LIBPTHREAD"
-  else
-    kde_use_qt_mt=no
-  fi
-fi
-AC_SUBST(KDE_MT_LDFLAGS)
-AC_SUBST(KDE_MT_LIBS)
+# AC_LIBTOOL_SYS_MAX_CMD_LEN
+# --------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
+[# find the maximum length of command line arguments
+AC_MSG_CHECKING([the maximum length of command line arguments])
+AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+  i=0
+  teststring="ABCD"
 
-kde_qt_was_given=yes
+  case $build_os in
+  msdosdjgpp*)
+    # On DJGPP, this test can blow up pretty badly due to problems in libc
+    # (any single argument exceeding 2000 bytes causes a buffer overrun
+    # during glob expansion).  Even if it were fixed, the result of this
+    # check would be larger than it should be.
+    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
+    ;;
 
-dnl ------------------------------------------------------------------------
-dnl If we haven't been told how to link to Qt, we work it out for ourselves.
-dnl ------------------------------------------------------------------------
-if test -z "$LIBQT_GLOB"; then
-  if test "x$kde_use_qt_emb" = "xyes"; then
-    LIBQT_GLOB="libqte.*"
-  else
-    LIBQT_GLOB="libqt.*"
-  fi
-fi
+  gnu*)
+    # Under GNU Hurd, this test is not required because there is
+    # no limit to the length of command line arguments.
+    # Libtool will interpret -1 as no limit whatsoever
+    lt_cv_sys_max_cmd_len=-1;
+    ;;
 
-if test -z "$LIBQT"; then
-dnl ------------------------------------------------------------
-dnl If we got --enable-embedded then adjust the Qt library name.
-dnl ------------------------------------------------------------
-  if test "x$kde_use_qt_emb" = "xyes"; then
-    qtlib="qte"
-  else
-    qtlib="qt"
-  fi
+  cygwin* | mingw*)
+    # On Win9x/ME, this test blows up -- it succeeds, but takes
+    # about 5 minutes as the teststring grows exponentially.
+    # Worse, since 9x/ME are not pre-emptively multitasking,
+    # you end up with a "frozen" computer, even though with patience
+    # the test eventually succeeds (with a max line length of 256k).
+    # Instead, let's just punt: use the minimum linelength reported by
+    # all of the supported platforms: 8192 (on NT/2K/XP).
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
 
-  kde_int_qt="-l$qtlib"
-else
-  kde_int_qt="$LIBQT"
-  kde_lib_qt_set=yes
-fi
+  amigaos*)
+    # On AmigaOS with pdksh, this test takes hours, literally.
+    # So we just punt and use a minimum line length of 8192.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
 
-if test -z "$LIBQPE"; then
-dnl ------------------------------------------------------------
-dnl If we got --enable-palmtop then add -lqpe to the link line
-dnl ------------------------------------------------------------
-  if test "x$kde_use_qt_emb" = "xyes"; then
-    if test "x$kde_use_qt_emb_palm" = "xyes"; then
-      LIB_QPE="-lqpe"
+  netbsd* | freebsd* | openbsd* | darwin* )
+    # This has been around since 386BSD, at least.  Likely further.
+    if test -x /sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+    elif test -x /usr/sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
     else
-      LIB_QPE=""
+      lt_cv_sys_max_cmd_len=65536 # usable default for *BSD
     fi
-  else
-    LIB_QPE=""
-  fi
-fi
-
-dnl ------------------------------------------------------------------------
-dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
-dnl ------------------------------------------------------------------------
+    # And add a safety zone
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+    ;;
 
-if test "x$kde_use_qt_mt" = "xyes"; then
-  if test -z "$LIBQT"; then
-    LIBQT="-l$qtlib-mt"
-    kde_int_qt="-l$qtlib-mt"
-  else
-    LIBQT="$qtlib-mt"
-    kde_int_qt="$qtlib-mt"
-  fi
-  LIBQT_GLOB="lib$qtlib-mt.*"
-  USING_QT_MT="using -mt"
-else
-  LIBQT="-l$qtlib"
+ *)
+    # If test is not a shell built-in, we'll probably end up computing a
+    # maximum length that is only half of the actual maximum length, but
+    # we can't tell.
+    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
+	       = "XX$teststring") >/dev/null 2>&1 &&
+	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
+	    lt_cv_sys_max_cmd_len=$new_result &&
+	    test $i != 17 # 1/2 MB should be enough
+    do
+      i=`expr $i + 1`
+      teststring=$teststring$teststring
+    done
+    teststring=
+    # Add a significant safety factor because C++ compilers can tack on massive
+    # amounts of additional arguments before passing them to the linker.
+    # It appears as though 1/2 is a usable value.
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+    ;;
+  esac
+])
+if test -n $lt_cv_sys_max_cmd_len ; then
+  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+  AC_MSG_RESULT(none)
 fi
+])# AC_LIBTOOL_SYS_MAX_CMD_LEN
 
-if test $kde_qtver != 1; then
 
-  AC_REQUIRE([AC_FIND_PNG])
-  AC_REQUIRE([AC_FIND_JPEG])
-  LIBQT="$LIBQT $LIBPNG $LIBJPEG"
-fi
+# _LT_AC_CHECK_DLFCN
+# --------------------
+AC_DEFUN([_LT_AC_CHECK_DLFCN],
+[AC_CHECK_HEADERS(dlfcn.h)dnl
+])# _LT_AC_CHECK_DLFCN
 
-if test $kde_qtver = 3; then
-  AC_REQUIRE([KDE_CHECK_LIBDL])
-  LIBQT="$LIBQT $LIBDL"
-fi
 
-AC_MSG_CHECKING([for Qt])
+# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ------------------------------------------------------------------
+AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
+[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+if test "$cross_compiling" = yes; then :
+  [$4]
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<EOF
+[#line __oline__ "configure"
+#include "confdefs.h"
 
-if test "x$kde_use_qt_emb" != "xyes"; then
-LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
-fi
-ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
-qt_libraries=""
-qt_includes=""
-AC_ARG_WITH(qt-dir,
-    [  --with-qt-dir=DIR       where the root of Qt is installed ],
-    [  ac_qt_includes="$withval"/include
-       ac_qt_libraries="$withval"/lib${kdelibsuff}
-       ac_qt_bindir="$withval"/bin
-    ])
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
 
-AC_ARG_WITH(qt-includes,
-    [  --with-qt-includes=DIR  where the Qt includes are. ],
-    [
-       ac_qt_includes="$withval"
-    ])
+#include <stdio.h>
 
-kde_qt_libs_given=no
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
 
-AC_ARG_WITH(qt-libraries,
-    [  --with-qt-libraries=DIR where the Qt library is installed.],
-    [  ac_qt_libraries="$withval"
-       kde_qt_libs_given=yes
-    ])
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
 
-AC_CACHE_VAL(ac_cv_have_qt,
-[#try to guess Qt locations
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
 
-qt_incdirs=""
-for dir in $kde_qt_dirs; do
-   qt_incdirs="$qt_incdirs $dir/include $dir"
-done
-qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/X11R6/include/qt2 $x_includes"
-if test ! "$ac_qt_includes" = "NO"; then
-   qt_incdirs="$ac_qt_includes $qt_incdirs"
-fi
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
 
-if test "$kde_qtver" != "1"; then
-  kde_qt_header=qstyle.h
-else
-  kde_qt_header=qglobal.h
+    exit (status);
+}]
+EOF
+  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) $1 ;;
+      x$lt_dlneed_uscore) $2 ;;
+      x$lt_unknown|x*) $3 ;;
+    esac
+  else :
+    # compilation failed
+    $3
+  fi
 fi
+rm -fr conftest*
+])# _LT_AC_TRY_DLOPEN_SELF
 
-AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
-ac_qt_includes="$qt_incdir"
 
-qt_libdirs=""
-for dir in $kde_qt_dirs; do
-   qt_libdirs="$qt_libdirs $dir/lib${kdelibsuff} $dir"
-done
-qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
-if test ! "$ac_qt_libraries" = "NO"; then
-  qt_libdir=$ac_qt_libraries
+# AC_LIBTOOL_DLOPEN_SELF
+# -------------------
+AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
+[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
 else
-  qt_libdirs="$ac_qt_libraries $qt_libdirs"
-  # if the Qt was given, the chance is too big that libqt.* doesn't exist
-  qt_libdir=NONE
-  for dir in $qt_libdirs; do
-    try="ls -1 $dir/${LIBQT_GLOB}"
-    if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
-  done
-fi
-
-ac_qt_libraries="$qt_libdir"
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
 
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
 
-ac_cxxflags_safe="$CXXFLAGS"
-ac_ldflags_safe="$LDFLAGS"
-ac_libs_safe="$LIBS"
+  mingw* | pw32*)
+    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen_libs=
+   ;;
 
-CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
-LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
-LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
+  cygwin*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+   ;;
 
-KDE_PRINT_QT_PROGRAM
+  darwin*)
+  # if libdl is installed we need to link against it
+    AC_CHECK_LIB([dl], [dlopen],
+		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ])
+   ;;
 
-if AC_TRY_EVAL(ac_link) && test -s conftest; then
-  rm -f conftest*
-else
-  echo "configure: failed program was:" >&AC_FD_CC
-  cat conftest.$ac_ext >&AC_FD_CC
-  ac_qt_libraries="NO"
-fi
-rm -f conftest*
-CXXFLAGS="$ac_cxxflags_safe"
-LDFLAGS="$ac_ldflags_safe"
-LIBS="$ac_libs_safe"
+  *)
+    AC_CHECK_FUNC([shl_load],
+	  [lt_cv_dlopen="shl_load"],
+      [AC_CHECK_LIB([dld], [shl_load],
+	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
+	[AC_CHECK_FUNC([dlopen],
+	      [lt_cv_dlopen="dlopen"],
+	  [AC_CHECK_LIB([dl], [dlopen],
+		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+	    [AC_CHECK_LIB([svld], [dlopen],
+		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+	      [AC_CHECK_LIB([dld], [dld_link],
+		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
+	      ])
+	    ])
+	  ])
+	])
+      ])
+    ;;
+  esac
 
-AC_LANG_RESTORE
-if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
-  ac_cv_have_qt="have_qt=no"
-  ac_qt_notfound=""
-  missing_qt_mt=""
-  if test "$ac_qt_includes" = NO; then
-    if test "$ac_qt_libraries" = NO; then
-      ac_qt_notfound="(headers and libraries)";
-    else
-      ac_qt_notfound="(headers)";
-    fi
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
   else
-    if test "x$kde_use_qt_mt" = "xyes"; then
-       missing_qt_mt="
-Make sure that you have compiled Qt with thread support!"
-       ac_qt_notfound="(library $qtlib-mt)";
-    else
-       ac_qt_notfound="(library $qtlib)";
-    fi
+    enable_dlopen=no
   fi
 
-  AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
-For more details about this problem, look at the end of config.log.$missing_qt_mt])
-else
-  have_qt="yes"
-fi
-])
-
-eval "$ac_cv_have_qt"
-
-if test "$have_qt" != yes; then
-  AC_MSG_RESULT([$have_qt]);
-else
-  ac_cv_have_qt="have_qt=yes \
-    ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
-  AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT])
-
-  qt_libraries="$ac_qt_libraries"
-  qt_includes="$ac_qt_includes"
-fi
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
 
-if test ! "$kde_qt_libs_given" = "yes"; then
-KDE_CHECK_QT_DIRECT(qt_libraries= ,[])
-fi
+    save_LDFLAGS="$LDFLAGS"
+    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
 
-AC_SUBST(qt_libraries)
-AC_SUBST(qt_includes)
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
 
-if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
- QT_INCLUDES=""
-else
- QT_INCLUDES="-I$qt_includes"
- all_includes="$QT_INCLUDES $all_includes"
-fi
+    AC_CACHE_CHECK([whether a program can dlopen itself],
+	  lt_cv_dlopen_self, [dnl
+	  _LT_AC_TRY_DLOPEN_SELF(
+	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+    ])
 
-if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then
- QT_LDFLAGS=""
-else
- QT_LDFLAGS="-L$qt_libraries"
- all_libraries="$all_libraries $QT_LDFLAGS"
-fi
-test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      LDFLAGS="$LDFLAGS $link_static_flag"
+      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+    	  lt_cv_dlopen_self_static, [dnl
+	  _LT_AC_TRY_DLOPEN_SELF(
+	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
+      ])
+    fi
 
-AC_SUBST(QT_INCLUDES)
-AC_SUBST(QT_LDFLAGS)
-AC_PATH_QT_MOC_UIC
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
 
-KDE_CHECK_QT_JPEG
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
 
-if test "x$kde_use_qt_emb" != "xyes"; then
-LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
-else
-LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBPNG)'
+  case $lt_cv_dlopen_self_static in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
+  esac
 fi
-test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
+])# AC_LIBTOOL_DLOPEN_SELF
 
-AC_SUBST(LIB_QT)
-AC_SUBST(LIB_QPE)
 
-AC_SUBST(kde_qtver)
+# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
+# ---------------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler
+AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
+[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&AS_MESSAGE_LOG_FD
+   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test ! -s out/conftest.err; then
+       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+     fi
+   fi
+   chmod u+w .
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
+   cd ..
+   rmdir conftest
+   $rm conftest*
 ])
+])# AC_LIBTOOL_PROG_CC_C_O
 
-AC_DEFUN(AC_PATH_QT,
-[
-AC_PATH_QT_1_3
-])
 
-AC_DEFUN(KDE_CHECK_UIC_PLUGINS,
-[
-AC_REQUIRE([AC_PATH_QT_MOC_UIC])
+# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
+# -----------------------------------------
+# Check to see if we can do hard links to lock some files if needed
+AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
+[AC_REQUIRE([_LT_AC_LOCK])dnl
 
-if test x$ac_uic_supports_libpath = xyes; then
-
-AC_MSG_CHECKING([if UIC has KDE plugins available])
-AC_CACHE_VAL(kde_cv_uic_plugins,
-[
-cat > actest.ui << EOF
-<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
-<class>NewConnectionDialog</class>
-<widget class="QDialog">
-   <widget class="KLineEdit">
-        <property name="name">
-           <cstring>testInput</cstring>
-        </property>
-   </widget>
-</widget>
-</UI>
-EOF
-       
-
-
-kde_cv_uic_plugins=no
-kde_line="$UIC_PATH -L $kde_widgetdir"
-if test x$ac_uic_supports_nounload = xyes; then
-   kde_line="$kde_line -nounload"
-fi
-kde_line="$kde_line -impl actest.h actest.ui > actest.cpp"
-if AC_TRY_EVAL(kde_line); then
-	if test -f actest.cpp && grep klineedit actest.cpp > /dev/null; then
-		kde_cv_uic_plugins=yes
-	fi
-fi
-rm -f actest.ui actest.cpp
-])
-
-if test "$kde_cv_uic_plugins" = yes; then
-	AC_MSG_RESULT([yes])
-else
-	AC_MSG_ERROR([not found - you need to install kdelibs first.])
-fi
-fi
-])
-
-AC_DEFUN(KDE_CHECK_FINAL,
-[
-  AC_ARG_ENABLE(final, [  --enable-final          build size optimized apps (experimental - needs lots of memory)],
-	kde_use_final=$enableval, kde_use_final=no)
-
-  KDE_COMPILER_REPO
-  if test "x$kde_use_final" = "xyes"; then
-      KDE_USE_FINAL_TRUE=""
-      KDE_USE_FINAL_FALSE="#"
-   else
-      KDE_USE_FINAL_TRUE="#"
-      KDE_USE_FINAL_FALSE=""
-  fi
-  AC_SUBST(KDE_USE_FINAL_TRUE)
-  AC_SUBST(KDE_USE_FINAL_FALSE)
-
-  AC_ARG_ENABLE(closure, [  --disable-closure       don't delay template instantiation],
-  	kde_use_closure=$enableval, kde_use_closure=yes)
-
-  if test "x$kde_use_closure" = "xyes"; then
-       KDE_USE_CLOSURE_TRUE=""
-       KDE_USE_CLOSURE_FALSE="#"
-#       CXXFLAGS="$CXXFLAGS $REPO"
-  else
-       KDE_USE_CLOSURE_TRUE="#"
-       KDE_USE_CLOSURE_FALSE=""
-  fi
-  AC_SUBST(KDE_USE_CLOSURE_TRUE)
-  AC_SUBST(KDE_USE_CLOSURE_FALSE)
-])
-
-dnl ------------------------------------------------------------------------
-dnl Now, the same with KDE
-dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed)
-dnl and $(kde_includes) will be the kdehdrlocation (if needed)
-dnl ------------------------------------------------------------------------
-dnl
-AC_DEFUN(AC_BASE_PATH_KDE,
-[
-AC_PREREQ([2.13])
-AC_REQUIRE([AC_PATH_QT])dnl
-AC_REQUIRE([KDE_CHECK_LIB64])
-
-AC_CHECK_RPATH
-AC_MSG_CHECKING([for KDE])
-
-if test "${prefix}" != NONE; then
-  kde_includes=${prefix}/include
-  ac_kde_includes=$prefix/include
-
-  if test "${exec_prefix}" != NONE; then
-     kde_libraries=${libdir}
-     ac_kde_libraries=$libdir
-     if test "$ac_kde_libraries" = '${exec_prefix}/lib'${kdelibsuff}; then
-	ac_kde_libraries=$exec_prefix/lib${kdelibsuff}
-     fi
-  else
-     kde_libraries=${prefix}/lib${kdelibsuff}
-     ac_kde_libraries=$prefix/lib${kdelibsuff}
+hard_links="nottested"
+if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  AC_MSG_CHECKING([if we can lock with hard links])
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  AC_MSG_RESULT([$hard_links])
+  if test "$hard_links" = no; then
+    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+    need_locks=warn
   fi
 else
-  ac_kde_includes=
-  ac_kde_libraries=
-  kde_libraries=""
-  kde_includes=""
+  need_locks=no
 fi
+])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
 
-AC_CACHE_VAL(ac_cv_have_kde,
-[#try to guess kde locations
 
-if test "$kde_qtver" = 1; then
-  kde_check_header="ksock.h"
-  kde_check_lib="libkdecore.la"
+# AC_LIBTOOL_OBJDIR
+# -----------------
+AC_DEFUN([AC_LIBTOOL_OBJDIR],
+[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+[rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  lt_cv_objdir=.libs
 else
-  kde_check_header="ksharedptr.h"
-  kde_check_lib="libkio.la"
-fi
-
-if test -z "$1"; then
-
-kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes"
-test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
-kde_incdirs="$ac_kde_includes $kde_incdirs"
-AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
-ac_kde_includes="$kde_incdir"
-
-if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
-  AC_MSG_ERROR([
-in the prefix, you've chosen, are no KDE headers installed. This will fail.
-So, check this please and use another prefix!])
+  # MS-DOS does not allow filenames that begin with a dot.
+  lt_cv_objdir=_libs
 fi
+rmdir .libs 2>/dev/null])
+objdir=$lt_cv_objdir
+])# AC_LIBTOOL_OBJDIR
 
-kde_libdirs="/usr/lib/kde/lib${kdelibsuff} /usr/local/kde/lib${kdelibsuff} /usr/kde/lib${kdelibsuff} /usr/lib${kdelibsuff}/kde /usr/lib${kdelibsuff}/kde3 /usr/lib${kdelibsuff} /usr/X11R6/lib${kdelibsuff} /usr/local/lib${kdelibsuff} /opt/kde3/lib${kdelibsuff} /opt/kde/lib${kdelibsuff} /usr/X11R6/kde/lib${kdelibsuff}"
-test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib${kdelibsuff} $KDEDIR $kde_libdirs"
-kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs"
-AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
-ac_kde_libraries="$kde_libdir"
-
-kde_widgetdir=NO
-dnl this might be somewhere else
-AC_FIND_FILE("kde3/plugins/designer/kdewidgets.la", $kde_libdirs, kde_widgetdir)
 
-if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
-AC_MSG_ERROR([
-in the prefix, you've chosen, are no KDE libraries installed. This will fail.
-So, check this please and use another prefix!])
-fi
+# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
+# ----------------------------------------------
+# Check hardcoding attributes.
+AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
+[AC_MSG_CHECKING([how to hardcode library paths into programs])
+_LT_AC_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
+   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
+   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
 
-if test -n "$kde_widgetdir" && test ! -r "$kde_widgetdir/kde3/plugins/designer/kdewidgets.la"; then
-AC_MSG_ERROR([
-I can't find the designer plugins. These are required and should have been installed
-by kdelibs])
+  # We can hardcode non-existant directories.
+  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
+    # Linking always hardcodes the temporary library directory.
+    _LT_AC_TAGVAR(hardcode_action, $1)=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
 fi
+AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
 
-if test -n "$kde_widgetdir"; then
-    kde_widgetdir="$kde_widgetdir/kde3/plugins/designer"
+if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
 fi
+])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
 
 
-if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO || test "$kde_widgetdir" = NO; then
-  ac_cv_have_kde="have_kde=no"
+# AC_LIBTOOL_SYS_LIB_STRIP
+# ------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
+[striplib=
+old_striplib=
+AC_MSG_CHECKING([whether stripping libraries is possible])
+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  AC_MSG_RESULT([yes])
 else
-  ac_cv_have_kde="have_kde=yes \
-    ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+   darwin*)
+       if test -n "$STRIP" ; then
+         striplib="$STRIP -x"
+         AC_MSG_RESULT([yes])
+       else
+  AC_MSG_RESULT([no])
 fi
-
-else dnl test -z $1
-
-  ac_cv_have_kde="have_kde=no"
-
+       ;;
+   *)
+  AC_MSG_RESULT([no])
+    ;;
+  esac
 fi
-])dnl
-
-eval "$ac_cv_have_kde"
-
-if test "$have_kde" != "yes"; then
- if test "${prefix}" = NONE; then
-  ac_kde_prefix="$ac_default_prefix"
- else
-  ac_kde_prefix="$prefix"
- fi
- if test "$exec_prefix" = NONE; then
-  ac_kde_exec_prefix="$ac_kde_prefix"
-  AC_MSG_RESULT([will be installed in $ac_kde_prefix])
- else
-  ac_kde_exec_prefix="$exec_prefix"
-  AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix])
- fi
-
- kde_libraries="${libdir}"
- kde_includes=${ac_kde_prefix}/include
-
-else
-  ac_cv_have_kde="have_kde=yes \
-    ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
-  AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes])
+])# AC_LIBTOOL_SYS_LIB_STRIP
 
-  kde_libraries="$ac_kde_libraries"
-  kde_includes="$ac_kde_includes"
-fi
-AC_SUBST(kde_libraries)
-AC_SUBST(kde_includes)
 
-if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes"  || test "$kde_includes" = "/usr/include"; then
- KDE_INCLUDES=""
+# AC_LIBTOOL_SYS_DYNAMIC_LINKER
+# -----------------------------
+# PORTME Fill in your ld.so characteristics
+AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
+[AC_MSG_CHECKING([dynamic linker characteristics])
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+if test "$GCC" = yes; then
+  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
 else
- KDE_INCLUDES="-I$kde_includes"
- all_includes="$KDE_INCLUDES $all_includes"
-fi
- 
-KDE_LDFLAGS="-L$kde_libraries"
-if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then 
- all_libraries="$all_libraries $KDE_LDFLAGS"
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
 fi
+need_lib_prefix=unknown
+hardcode_into_libs=no
 
-AC_SUBST(KDE_LDFLAGS)
-AC_SUBST(KDE_INCLUDES)
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
 
-AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
 
-all_libraries="$all_libraries $USER_LDFLAGS"
-all_includes="$all_includes $USER_INCLUDES"
-AC_SUBST(all_includes)
-AC_SUBST(all_libraries)
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
 
-if test -z "$1"; then
-KDE_CHECK_UIC_PLUGINS
-fi
+aix4* | aix5*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[[01]] | aix4.[[01]].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
 
-ac_kde_libraries="$kde_libdir"
+amigaos*)
+  library_names_spec='$libname.ixlibrary $libname.a'
+  # Create ${libname}_ixlibrary.a entries in /sys/libs.
+  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+  ;;
 
-AC_SUBST(AUTODIRS)
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
 
+bsdi[[45]]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
 
-])
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
 
-AC_DEFUN(KDE_CHECK_EXTRA_LIBS,
-[
-AC_MSG_CHECKING(for extra includes)
-AC_ARG_WITH(extra-includes, [  --with-extra-includes=DIR
-                          adds non standard include paths],
-  kde_use_extra_includes="$withval",
-  kde_use_extra_includes=NONE
-)
-kde_extra_includes=
-if test -n "$kde_use_extra_includes" && \
-   test "$kde_use_extra_includes" != "NONE"; then
-
-   ac_save_ifs=$IFS
-   IFS=':'
-   for dir in $kde_use_extra_includes; do
-     kde_extra_includes="$kde_extra_includes $dir"
-     USER_INCLUDES="$USER_INCLUDES -I$dir"
-   done
-   IFS=$ac_save_ifs
-   kde_use_extra_includes="added"
-else
-   kde_use_extra_includes="no"
-fi
-AC_SUBST(USER_INCLUDES)
-
-AC_MSG_RESULT($kde_use_extra_includes)
-
-kde_extra_libs=
-AC_MSG_CHECKING(for extra libs)
-AC_ARG_WITH(extra-libs, [  --with-extra-libs=DIR   adds non standard library paths],
-  kde_use_extra_libs=$withval,
-  kde_use_extra_libs=NONE
-)
-if test -n "$kde_use_extra_libs" && \
-   test "$kde_use_extra_libs" != "NONE"; then
-
-   ac_save_ifs=$IFS
-   IFS=':'
-   for dir in $kde_use_extra_libs; do
-     kde_extra_libs="$kde_extra_libs $dir"
-     KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
-     USER_LDFLAGS="$USER_LDFLAGS -L$dir"
-   done
-   IFS=$ac_save_ifs
-   kde_use_extra_libs="added"
-else
-   kde_use_extra_libs="no"
-fi
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
 
-AC_SUBST(USER_LDFLAGS)
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
 
-AC_MSG_RESULT($kde_use_extra_libs)
+  linux*)
+    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      supports_anon_versioning=no
+      case `$LD -v 2>/dev/null` in
+        *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+        *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+        *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+        *\ 2.11.*) ;; # other 2.11 versions
+        *) supports_anon_versioning=yes ;;
+      esac
+      if test $supports_anon_versioning = yes; then
+        archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
+cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+$echo "local: *; };" >> $output_objdir/$libname.ver~
+        $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+      else
+        $archive_expsym_cmds="$archive_cmds"
+      fi
+    else
+      ld_shlibs=no
+    fi
+    ;;
 
-])
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
 
-AC_DEFUN(KDE_1_CHECK_PATH_HEADERS,
-[
-    AC_MSG_CHECKING([for KDE headers installed])
-    AC_LANG_SAVE
-    AC_LANG_CPLUSPLUS
-cat > conftest.$ac_ext <<EOF
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-#endif
-#include <stdio.h>
-#include "confdefs.h"
-#include <kapp.h>
-
-int main() {
-    printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
-    printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
-    printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
-    printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
-    printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
-    printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
-    printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
-    printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
-    printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
-    printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
-    printf("kde_wallpaperdir=\\"%s\\"\n",
-	KApplication::kde_wallpaperdir().data());
-    printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
-    printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
-    printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
-    printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
-    printf("kde_moduledir=\\"/tmp/dummy\\"\n");
-    printf("kde_styledir=\\"/tmp/dummy\\"\n");
-    printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
-    return 0;
-    }
-EOF
-
- ac_compile='${CXX-g++} -c $CXXFLAGS $all_includes $CPPFLAGS conftest.$ac_ext'
- if AC_TRY_EVAL(ac_compile); then
-   AC_MSG_RESULT(yes)
- else
-   AC_MSG_ERROR([your system is not able to compile a small KDE application!
-Check, if you installed the KDE header files correctly.
-For more details about this problem, look at the end of config.log.])
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
+  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+  if test "$GCC" = yes; then
+    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+  else
+    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
   fi
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
 
-  AC_LANG_RESTORE
-])
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
 
-AC_DEFUN(KDE_CHECK_KDEQTADDON,
-[
-AC_MSG_CHECKING(for kde-qt-addon)
-AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
-[
- kde_ldflags_safe="$LDFLAGS"
- kde_libs_safe="$LIBS"
- kde_cxxflags_safe="$CXXFLAGS"
-
- LIBS="-lkde-qt-addon $LIBQT $LIBS"
- CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes"
- LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
-
- AC_TRY_LINK([
-   #include <qdom.h>
- ],
- [
-   QDomDocument doc;
- ],
-  kde_cv_have_kdeqtaddon=yes,
-  kde_cv_have_kdeqtaddon=no
- )
-
- LDFLAGS=$kde_ldflags_safe
- LIBS=$kde_libs_safe
- CXXFLAGS=$kde_cxxflags_safe
-])
+freebsd1*)
+  dynamic_linker=no
+  ;;
 
-AC_MSG_RESULT($kde_cv_have_kdeqtaddon)
+kfreebsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
 
-if test "$kde_cv_have_kdeqtaddon" = "no"; then
-  AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first.
-It is a separate package (and CVS module) named kde-qt-addon.])
-fi
-])
+freebsd*)
+  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  *) # from 3.2 on
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
 
-AC_DEFUN(KDE_CHECK_KIMGIO,
-[
-   AC_REQUIRE([AC_BASE_PATH_KDE])
-   AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
-   AC_REQUIRE([AC_FIND_TIFF])
-   AC_REQUIRE([AC_FIND_JPEG])
-   AC_REQUIRE([AC_FIND_PNG])
-   AC_REQUIRE([KDE_CREATE_LIBS_ALIASES])
-
-   if test "$1" = "existance"; then
-     AC_LANG_SAVE
-     AC_LANG_CPLUSPLUS
-     kde_save_LIBS="$LIBS"
-     LIBS="$LIBS $all_libraries $LIBJPEG $LIBTIFF $LIBPNG $LIBQT -lm"
-     AC_CHECK_LIB(kimgio, kimgioRegister, [
-      LIBKIMGIO_EXISTS=yes],LIBKIMGIO_EXISTS=no)
-     LIBS="$kde_save_LIBS"
-     AC_LANG_RESTORE
-   else
-     LIBKIMGIO_EXISTS=yes
-   fi
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
 
-   if test "$LIBKIMGIO_EXISTS" = "yes"; then
-     LIB_KIMGIO='-lkimgio'
-   else
-     LIB_KIMGIO=''
-   fi
-   AC_SUBST(LIB_KIMGIO)
-])
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case "$host_cpu" in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
 
-AC_DEFUN(KDE_CREATE_LIBS_ALIASES,
-[
-   AC_REQUIRE([KDE_MISC_TESTS])
-   AC_REQUIRE([KDE_CHECK_LIBDL])
-   AC_REQUIRE([K_PATH_X])
-
-if test $kde_qtver = 3; then
-   AC_SUBST(LIB_KDECORE, "-lkdecore")
-   AC_SUBST(LIB_KDEUI, "-lkdeui")
-   AC_SUBST(LIB_KIO, "-lkio")
-   AC_SUBST(LIB_SMB, "-lsmb")
-   AC_SUBST(LIB_KAB, "-lkab")
-   AC_SUBST(LIB_KABC, "-lkabc")
-   AC_SUBST(LIB_KHTML, "-lkhtml")
-   AC_SUBST(LIB_KSPELL, "-lkspell")
-   AC_SUBST(LIB_KPARTS, "-lkparts")
-   AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
-# these are for backward compatibility
-   AC_SUBST(LIB_KSYCOCA, "-lkio")
-   AC_SUBST(LIB_KFILE, "-lkio")
-elif test $kde_qtver = 2; then
-   AC_SUBST(LIB_KDECORE, "-lkdecore")
-   AC_SUBST(LIB_KDEUI, "-lkdeui")
-   AC_SUBST(LIB_KIO, "-lkio")
-   AC_SUBST(LIB_KSYCOCA, "-lksycoca")
-   AC_SUBST(LIB_SMB, "-lsmb")
-   AC_SUBST(LIB_KFILE, "-lkfile")
-   AC_SUBST(LIB_KAB, "-lkab")
-   AC_SUBST(LIB_KHTML, "-lkhtml")
-   AC_SUBST(LIB_KSPELL, "-lkspell")
-   AC_SUBST(LIB_KPARTS, "-lkparts")
-   AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
-else
-   AC_SUBST(LIB_KDECORE, "-lkdecore -lXext $(LIB_QT)")
-   AC_SUBST(LIB_KDEUI, "-lkdeui $(LIB_KDECORE)")
-   AC_SUBST(LIB_KFM, "-lkfm $(LIB_KDECORE)")
-   AC_SUBST(LIB_KFILE, "-lkfile $(LIB_KFM) $(LIB_KDEUI)")
-   AC_SUBST(LIB_KAB, "-lkab $(LIB_KIMGIO) $(LIB_KDECORE)")
-fi
-])
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
 
-AC_DEFUN(AC_PATH_KDE,
-[
-  AC_BASE_PATH_KDE
-  AC_ARG_ENABLE(path-check, [  --disable-path-check    don't try to find out, where to install],
-  [
-  if test "$enableval" = "no";
-    then ac_use_path_checking="default"
-    else ac_use_path_checking=""
-  fi
-  ],
-  [
-  if test "$kde_qtver" = 1;
-    then ac_use_path_checking=""
-    else ac_use_path_checking="default"
-  fi
-  ]
-  )
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
 
-  AC_CREATE_KFSSTND($ac_use_path_checking)
+# This must be Linux ELF.
+linux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
 
-  AC_SUBST_KFSSTND
-  KDE_CREATE_LIBS_ALIASES
-])
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+  fi
 
-dnl KDE_CHECK_FUNC_EXT(<func>, [headers], [sample-use], [C prototype], [autoheader define], [call if found])
-AC_DEFUN(KDE_CHECK_FUNC_EXT,
-[
-AC_MSG_CHECKING(for $1)
-AC_CACHE_VAL(kde_cv_func_$1,
-[
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-save_CXXFLAGS="$CXXFLAGS"
-kde_safe_LIBS="$LIBS"
-LIBS="$LIBS $X_EXTRA_LIBS"
-if test "$GXX" = "yes"; then
-  CXXFLAGS="$CXXFLAGS -pedantic-errors"
-fi
-AC_TRY_COMPILE([
-$2
-],
-[
-$3
-],
-kde_cv_func_$1=yes,
-kde_cv_func_$1=no)
-CXXFLAGS="$save_CXXFLAGS"
-LIBS=$kde_safe_LIBS
-AC_LANG_RESTORE
-])
+  case $host_cpu:$lt_cv_cc_64bit_output in
+  powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
+    sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/X11R6/lib64"
+    sys_lib_search_path_spec="/lib64 /usr/lib64 /usr/local/lib64 /usr/X11R6/lib64"
+    ;;
+  esac
 
-AC_MSG_RESULT($kde_cv_func_$1)
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
 
-AC_MSG_CHECKING([if $1 needs custom prototype])
-AC_CACHE_VAL(kde_cv_proto_$1,
-[
-if test "x$kde_cv_func_$1" = xyes; then
-  kde_cv_proto_$1=no
-else
-  case "$1" in
-	setenv|unsetenv|usleep|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat)
-		kde_cv_proto_$1="yes - in libkdefakes"
-		;;
-	*)
-		kde_cv_proto_$1=unknown
-		;;
+  # Find out which ABI we are using (multilib Linux x86_64 hack).
+  libsuff=
+  case "$host_cpu" in
+  x86_64*)
+    echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+    if AC_TRY_EVAL(ac_compile); then
+      case `/usr/bin/file conftest.$ac_objext` in
+      *64-bit*)
+        libsuff=64
+        ;;
+      esac
+    fi
+    rm -rf conftest*
+    ;;
+  *)
+    ;;
   esac
-fi
-
-if test "x$kde_cv_proto_$1" = xunknown; then
+  sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
+  sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+  ;;
 
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-  kde_safe_libs=$LIBS
-  LIBS="$LIBS $X_EXTRA_LIBS"
-  AC_TRY_LINK([
-$2
+knetbsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
 
-extern "C" $4;
-],
-[
-$3
-],
-[ kde_cv_func_$1=yes
-  kde_cv_proto_$1=yes ],
-  [kde_cv_proto_$1="$1 unavailable"]
-)
-LIBS=$kde_safe_libs
-AC_LANG_RESTORE
-fi
-])
-AC_MSG_RESULT($kde_cv_proto_$1)
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
 
-if test "x$kde_cv_func_$1" = xyes; then
-  AC_DEFINE(HAVE_$5, 1, [Define if you have $1])
-  $6
-fi
-if test "x$kde_cv_proto_$1" = xno; then
-  AC_DEFINE(HAVE_$5_PROTO, 1,
-  [Define if you have the $1 prototype])
-fi
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
 
-AH_VERBATIM([_HAVE_$5_PROTO],
-[
-#if !defined(HAVE_$5_PROTO)
-#ifdef __cplusplus
-extern "C"
-#endif
-$4;
-#endif
-])
-])
+nto-qnx*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
 
-AC_DEFUN(AC_CHECK_SETENV,
-[
-	KDE_CHECK_FUNC_EXT(setenv, [
-#include <stdlib.h>
-], 
-		[setenv("VAR", "VALUE", 1);],
-	        [int setenv (const char *, const char *, int)],
-		[SETENV])
-])
+openbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[[89]] | openbsd2.[[89]].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
 
-AC_DEFUN(AC_CHECK_UNSETENV,
-[
-	KDE_CHECK_FUNC_EXT(unsetenv, [
-#include <stdlib.h>
-], 
-		[unsetenv("VAR");],
-	        [void unsetenv (const char *)],
-		[UNSETENV])
-])
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
 
-AC_DEFUN(AC_CHECK_GETDOMAINNAME,
-[
-	KDE_CHECK_FUNC_EXT(getdomainname, [
-#include <stdlib.h>
-#include <unistd.h>
-], 
-		[
-char buffer[200];
-getdomainname(buffer, 200);
-], 	
-	        [int getdomainname (char *, unsigned int)],
-		[GETDOMAINNAME])
-])
-
-AC_DEFUN(AC_CHECK_GETHOSTNAME,
-[
-	KDE_CHECK_FUNC_EXT(gethostname, [
-#include <stdlib.h>
-#include <unistd.h>
-], 
-		[
-char buffer[200];
-gethostname(buffer, 200);
-], 	
-	        [int gethostname (char *, unsigned int)],
-		[GETHOSTNAME])
-])
-
-AC_DEFUN(AC_CHECK_USLEEP,
-[
-	KDE_CHECK_FUNC_EXT(usleep, [
-#include <unistd.h>
-], 
-		[
-usleep(200);
-], 	
-	        [int usleep (unsigned int)],
-		[USLEEP])
-])
-
-
-AC_DEFUN(AC_CHECK_RANDOM,
-[
-	KDE_CHECK_FUNC_EXT(random, [
-#include <stdlib.h>
-], 
-		[
-random();
-], 	
-	        [long int random(void)],
-		[RANDOM])
-
-	KDE_CHECK_FUNC_EXT(srandom, [
-#include <stdlib.h>
-], 
-		[
-srandom(27);
-], 	
-	        [void srandom(unsigned int)],
-		[SRANDOM])
-
-])
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
 
-AC_DEFUN(AC_CHECK_INITGROUPS,
-[
-	KDE_CHECK_FUNC_EXT(initgroups, [
-#include <sys/types.h>
-#include <unistd.h>
-#include <grp.h>
-],
-	[
-char buffer[200];
-initgroups(buffer, 27);
-],
-	[int initgroups(const char *, gid_t)],
-	[INITGROUPS])
-])
+sco3.2v5*)
+  version_type=osf
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
 
-AC_DEFUN(AC_CHECK_MKSTEMP,
-[
-	KDE_CHECK_FUNC_EXT(mkstemp, [
-#include <stdlib.h>
-],
-	[
-mkstemp("/tmp/aaaXXXXXX");
-],
-	[int mkstemp(char *)],
-	[MKSTEMP])
-])
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
 
-AC_DEFUN(AC_CHECK_MKSTEMPS,
-[
-	KDE_CHECK_FUNC_EXT(mkstemps, [
-#include <stdlib.h>
-#include <unistd.h>
-],
-	[
-mkstemps("/tmp/aaaXXXXXX", 6);
-],
-	[int mkstemps(char *, int)],
-	[MKSTEMPS])
-])
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
 
-AC_DEFUN(AC_CHECK_RES_INIT,
-[
-  AC_MSG_CHECKING([if res_init needs -lresolv])
-  kde_libs_safe="$LIBS"
-  LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
-  AC_TRY_LINK(
-    [
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#include <resolv.h>
-    ],
-    [
-      res_init(); 
-    ],
-    [
-      LIBRESOLV="-lresolv"
-      AC_MSG_RESULT(yes)
-      AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
-    ],
-    [ AC_MSG_RESULT(no) ]
-  )
-  LIBS="$kde_libs_safe"
-  AC_SUBST(LIBRESOLV)
-
-  AC_MSG_CHECKING([if res_init is available])
-  AC_TRY_COMPILE(
-    [
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#include <resolv.h>
-    ],
-    [
-      res_init();
-    ],
-    [
-      AC_MSG_RESULT(yes)
-      AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
-    ],
-    [ AC_MSG_RESULT(no) ]
-  )
-])
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
 
-AC_DEFUN(AC_CHECK_STRLCPY,
-[
-	KDE_CHECK_FUNC_EXT(strlcpy, [
-#include <string.h>
-],
-[ char buf[20];
-  strlcpy(buf, "KDE function test", sizeof(buf));
-],
- 	[unsigned long strlcpy(char*, const char*, unsigned long)],
-	[STRLCPY])
-])
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
 
-AC_DEFUN(AC_CHECK_STRLCAT,
-[
-	KDE_CHECK_FUNC_EXT(strlcat, [
-#include <string.h>
-],
-[ char buf[20];
-  buf[0]='\0';
-  strlcat(buf, "KDE function test", sizeof(buf));
-],
- 	[unsigned long strlcat(char*, const char*, unsigned long)],
-	[STRLCAT])
-])
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
 
-AC_DEFUN(AC_FIND_GIF,
-   [AC_MSG_CHECKING([for giflib])
-AC_CACHE_VAL(ac_cv_lib_gif,
-[ac_save_LIBS="$LIBS"
-if test "x$kde_use_qt_emb" != "xyes"; then
-LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
-else
-LIBS="$all_libraries -lgif"
-fi
-AC_TRY_LINK(dnl
-[
-#ifdef __cplusplus
-extern "C" {
-#endif
-int GifLastError(void);
-#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.  */
-],
-            [return GifLastError();],
-            eval "ac_cv_lib_gif=yes",
-            eval "ac_cv_lib_gif=no")
-LIBS="$ac_save_LIBS"
-])dnl
-if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then
-  AC_MSG_RESULT(yes)
-  AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif])
-else
-  AC_MSG_ERROR(You need giflib30. Please install the kdesupport package)
-fi
-])
+*)
+  dynamic_linker=no
+  ;;
+esac
+AC_MSG_RESULT([$dynamic_linker])
+test "$dynamic_linker" = no && can_build_shared=no
+])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
 
-AC_DEFUN(KDE_FIND_JPEG_HELPER,
-[
-AC_MSG_CHECKING([for libjpeg$2])
-AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
-[
-AC_LANG_C
-ac_save_LIBS="$LIBS"
-LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
-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 "C" {
-#endif
-    void jpeg_CreateDecompress(j_decompress_ptr cinfo,
-                                    int version, size_t structsize);
-#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);],
-            eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
-            eval "ac_cv_lib_jpeg_$1=no")
-LIBS="$ac_save_LIBS"
-CFLAGS="$ac_save_CFLAGS"
-])
 
-if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
-  LIBJPEG="$ac_cv_lib_jpeg_$1"
-  AC_MSG_RESULT($ac_cv_lib_jpeg_$1)
-else
-  AC_MSG_RESULT(no)
-  $3
-fi
+# _LT_AC_TAGCONFIG
+# ----------------
+AC_DEFUN([_LT_AC_TAGCONFIG],
+[AC_ARG_WITH([tags],
+    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
+        [include additional configurations @<:@automatic@:>@])],
+    [tagnames="$withval"])
 
-])
+if test -f "$ltmain" && test -n "$tagnames"; then
+  if test ! -f "${ofile}"; then
+    AC_MSG_WARN([output file `$ofile' does not exist])
+  fi
 
-AC_DEFUN(AC_FIND_JPEG,
-[
-dnl first look for libraries
-KDE_FIND_JPEG_HELPER(6b, 6b,
-   KDE_FIND_JPEG_HELPER(normal, [],
-    [
-       LIBJPEG=
-    ]
-   )
-)
-
-dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
-dnl requires system dependent includes loaded before it)
-jpeg_incdirs="$includedir /usr/include /usr/local/include $kde_extra_includes"
-AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
-test "x$jpeg_incdir" = xNO && jpeg_incdir=
-
-dnl if headers _and_ libraries are missing, this is no error, and we
-dnl continue with a warning (the user will get no jpeg support in khtml)
-dnl if only one is missing, it means a configuration error, but we still
-dnl only warn
-if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
-  AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg])
-else
-  if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
-    AC_MSG_WARN([
-There is an installation error in jpeg support. You seem to have only one
-of either the headers _or_ the libraries installed. You may need to either
-provide correct --with-extra-... options, or the development package of
-libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
-Disabling JPEG support.
-])
-  else
-    AC_MSG_WARN([libjpeg not found. disable JPEG support.])
+  if test -z "$LTCC"; then
+    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
+    if test -z "$LTCC"; then
+      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
+    else
+      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
+    fi
   fi
-  jpeg_incdir=
-  LIBJPEG=
-fi
 
-AC_SUBST(LIBJPEG)
-AH_VERBATIM(_AC_CHECK_JPEG,
-[/*
- * jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
- * headers and I'm too lazy to write a configure test as long as only
- * unixware is related
- */
-#ifdef _UNIXWARE
-#define HAVE_BOOLEAN
-#endif
-])
-])
+  # Extract list of available tagged configurations in $ofile.
+  # Note that this assumes the entire list is on one line.
+  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
 
-AC_DEFUN(KDE_CHECK_QT_JPEG,
-[
-AC_MSG_CHECKING([if Qt needs $LIBJPEG])
-AC_CACHE_VAL(kde_cv_qt_jpeg,
-[
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-ac_save_LIBS="$LIBS"
-LIBS="$all_libraries $USER_LDFLAGS $LIBQT"
-LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
-ac_save_CXXFLAGS="$CXXFLAGS"
-CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
-AC_TRY_LINK(
-[#include <qapplication.h>],
-            [
-            int argc;
-            char** argv;
-            QApplication app(argc, argv);],
-            eval "kde_cv_qt_jpeg=no",
-            eval "kde_cv_qt_jpeg=yes")
-LIBS="$ac_save_LIBS"
-CXXFLAGS="$ac_save_CXXFLAGS"
-AC_LANG_RESTORE
-])
+  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+  for tagname in $tagnames; do
+    IFS="$lt_save_ifs"
+    # Check whether tagname contains only valid characters
+    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
+    "") ;;
+    *)  AC_MSG_ERROR([invalid tag name: $tagname])
+	;;
+    esac
 
-if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then
-  AC_MSG_RESULT(yes)
-  LIBJPEG_QT='$(LIBJPEG)'
-else
-  AC_MSG_RESULT(no)
-  LIBJPEG_QT=
-fi
+    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
+    then
+      AC_MSG_ERROR([tag name \"$tagname\" already exists])
+    fi
 
-])
+    # Update the list of available tags.
+    if test -n "$tagname"; then
+      echo appending configuration tag \"$tagname\" to $ofile
 
-AC_DEFUN(AC_FIND_ZLIB,
-[
-AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
-AC_MSG_CHECKING([for libz])
-AC_CACHE_VAL(ac_cv_lib_z,
-[
-AC_LANG_C
-kde_save_LIBS="$LIBS"
-LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
-kde_save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
-AC_TRY_LINK(dnl
-[
-#include<zlib.h>
-],
-            [return (zlibVersion() == ZLIB_VERSION); ],
-            eval "ac_cv_lib_z='-lz'",
-            eval "ac_cv_lib_z=no")
-LIBS="$kde_save_LIBS"
-CFLAGS="$kde_save_CFLAGS"
-])dnl
-if test ! "$ac_cv_lib_z" = no; then
-  AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
-  LIBZ="$ac_cv_lib_z"
-  AC_SUBST(LIBZ)
-  AC_MSG_RESULT($ac_cv_lib_z)
-else
-  AC_MSG_ERROR(not found. Check your installation and look into config.log)
-  LIBZ=""
-  AC_SUBST(LIBZ)
-fi
-])
+      case $tagname in
+      CXX)
+	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 
+	    (test "X$CXX" != "Xg++"))) ; then
+	  AC_LIBTOOL_LANG_CXX_CONFIG
+	else
+	  tagname=""
+	fi
+	;;
 
-AC_DEFUN(KDE_TRY_TIFFLIB,
-[
-AC_MSG_CHECKING([for libtiff $1])
+      F77)
+	if test -n "$F77" && test "X$F77" != "Xno"; then
+	  AC_LIBTOOL_LANG_F77_CONFIG
+	else
+	  tagname=""
+	fi
+	;;
 
-AC_CACHE_VAL(kde_cv_libtiff_$1,
-[
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-kde_save_LIBS="$LIBS"
-if test "x$kde_use_qt_emb" != "xyes"; then
-LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
-else
-LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
-fi
-kde_save_CXXFLAGS="$CXXFLAGS"
-CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
+      GCJ)
+	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
+	  AC_LIBTOOL_LANG_GCJ_CONFIG
+	else
+	  tagname=""
+	fi
+	;;
 
-AC_TRY_LINK(dnl
-[
-#include<tiffio.h>
-],
-    [return (TIFFOpen( "", "r") == 0); ],
-[
-    kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ"
-], [
-    kde_cv_libtiff_$1=no
-])
+      RC)
+	AC_LIBTOOL_LANG_RC_CONFIG
+	;;
 
-LIBS="$kde_save_LIBS"
-CXXFLAGS="$kde_save_CXXFLAGS"
-AC_LANG_RESTORE
-])
+      *)
+	AC_MSG_ERROR([Unsupported tag name: $tagname])
+	;;
+      esac
 
-if test "$kde_cv_libtiff_$1" = "no"; then
-    AC_MSG_RESULT(no)
-    LIBTIFF=""
-    $3
-else
-    LIBTIFF="$kde_cv_libtiff_$1"
-    AC_MSG_RESULT(yes)
-    AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff])
-    $2
+      # Append the new tag name to the list of available tags.
+      if test -n "$tagname" ; then
+      available_tags="$available_tags $tagname"
+    fi
+    fi
+  done
+  IFS="$lt_save_ifs"
+
+  # Now substitute the updated list of available tags.
+  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
+    mv "${ofile}T" "$ofile"
+    chmod +x "$ofile"
+  else
+    rm -f "${ofile}T"
+    AC_MSG_ERROR([unable to update list of available tagged configurations.])
+  fi
 fi
+])# _LT_AC_TAGCONFIG
 
-])
 
-AC_DEFUN(AC_FIND_TIFF,
-[
-AC_REQUIRE([K_PATH_X])
-AC_REQUIRE([AC_FIND_ZLIB])
-AC_REQUIRE([AC_FIND_JPEG])
-AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+# AC_LIBTOOL_DLOPEN
+# -----------------
+# enable checks for dlopen support
+AC_DEFUN([AC_LIBTOOL_DLOPEN],
+ [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
+])# AC_LIBTOOL_DLOPEN
 
-KDE_TRY_TIFFLIB(tiff, [],
-   KDE_TRY_TIFFLIB(tiff34))
 
-AC_SUBST(LIBTIFF)
-])
+# AC_LIBTOOL_WIN32_DLL
+# --------------------
+# declare package support for building win32 dll's
+AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
+])# AC_LIBTOOL_WIN32_DLL
 
 
-AC_DEFUN(AC_FIND_PNG,
-[
-AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
-AC_REQUIRE([AC_FIND_ZLIB])
-AC_MSG_CHECKING([for libpng])
-AC_CACHE_VAL(ac_cv_lib_png,
-[
-kde_save_LIBS="$LIBS"
-if test "x$kde_use_qt_emb" != "xyes"; then
-LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
-else
-LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
-fi
-kde_save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
-AC_LANG_C
-AC_TRY_LINK(dnl
-    [
-    #include<png.h>
-    ],
-    [
-    png_structp png_ptr = png_create_read_struct(  /* image ptr */
-		PNG_LIBPNG_VER_STRING, 0, 0, 0 );
-    return( png_ptr != 0 );
-    ],
-    eval "ac_cv_lib_png='-lpng $LIBZ -lm'",
-    eval "ac_cv_lib_png=no"
-)
-LIBS="$kde_save_LIBS"
-CFLAGS="$kde_save_CFLAGS"
-])dnl
-if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
-  AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng])
-  LIBPNG="$ac_cv_lib_png"
-  AC_SUBST(LIBPNG)
-  AC_MSG_RESULT($ac_cv_lib_png)
-else
-  AC_MSG_RESULT(no)
-  LIBPNG=""
-  AC_SUBST(LIBPNG)
-fi
-])
-
-AC_DEFUN(AC_CHECK_BOOL,
-[
-  AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
-])
-
-AC_DEFUN(AC_CHECK_GNU_EXTENSIONS,
-[
-AC_MSG_CHECKING(if you need GNU extensions)
-AC_CACHE_VAL(ac_cv_gnu_extensions,
-[
-cat > conftest.c << EOF
-#include <features.h>
-
-#ifdef __GNU_LIBRARY__
-yes
-#endif
-EOF
-
-if (eval "$ac_cpp conftest.c") 2>&5 |
-  egrep "yes" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_gnu_extensions=yes
-else
-  ac_cv_gnu_extensions=no
-fi
-])
-
-AC_MSG_RESULT($ac_cv_gnu_extensions)
-if test "$ac_cv_gnu_extensions" = "yes"; then
-  AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions])
-fi
-])
+# AC_ENABLE_SHARED([DEFAULT])
+# ---------------------------
+# implement the --enable-shared flag
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_SHARED],
+[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([shared],
+    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_shared=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
+])# AC_ENABLE_SHARED
 
-AC_DEFUN(KDE_CHECK_COMPILER_FLAG,
-[
-AC_MSG_CHECKING(whether $CXX supports -$1)
-kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
-AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
-[
-  AC_LANG_SAVE
-  AC_LANG_CPLUSPLUS
-  save_CXXFLAGS="$CXXFLAGS"
-  CXXFLAGS="$CXXFLAGS -$1"
-  AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
-  CXXFLAGS="$save_CXXFLAGS"
-  AC_LANG_RESTORE
-])
-if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
- AC_MSG_RESULT(yes)
- :
- $2
-else
- AC_MSG_RESULT(no)
- :
- $3
-fi
-])
 
-dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
-dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
-dnl it's all white-space separated
-AC_DEFUN(AC_REMOVE_FORBIDDEN,
-[ __val=$$1
-  __forbid=" $2 "
-  if test -n "$__val"; then
-    __new=""
-    ac_save_IFS=$IFS
-    IFS=" 	"
-    for i in $__val; do
-      case "$__forbid" in
-        *" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;;
-	*) # Careful to not add spaces, where there were none, because otherwise
-	   # libtool gets confused, if we change e.g. CXX
-	   if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
-      esac
-    done
-    IFS=$ac_save_IFS
-    $1=$__new
-  fi
-])
+# AC_DISABLE_SHARED
+# -----------------
+#- set the default shared flag to --disable-shared
+AC_DEFUN([AC_DISABLE_SHARED],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_SHARED(no)
+])# AC_DISABLE_SHARED
 
-dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
-AC_DEFUN(AC_VALIDIFY_CXXFLAGS,
-[dnl
-if test "x$kde_use_qt_emb" != "xyes"; then
- AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
- AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
-else
- AC_REMOVE_FORBIDDEN(CXX, [-rpath])
- AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
-fi
-])
 
-AC_DEFUN(AC_CHECK_COMPILERS,
-[
-  AC_ARG_ENABLE(debug,[  --enable-debug[=ARG]    enables debug symbols (yes|no|full) [default=no]],
-  [
+# AC_ENABLE_STATIC([DEFAULT])
+# ---------------------------
+# implement the --enable-static flag
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_STATIC],
+[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([static],
+    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
     case $enableval in
-      yes)
-        kde_use_debug_code="yes"
-        kde_use_debug_define=no
-        ;;
-      full)
-        kde_use_debug_code="full"
-        kde_use_debug_define=no
-        ;;
-      *)
-        kde_use_debug_code="no"
-        kde_use_debug_define=yes
-        ;;
-    esac
-  ], 
-    [kde_use_debug_code="no"
-      kde_use_debug_define=no
-  ])
-
-  dnl Just for configure --help
-  AC_ARG_ENABLE(dummyoption,[  --disable-debug         disables debug output and debug symbols [default=no]],[],[])
-
-  AC_ARG_ENABLE(strict,[  --enable-strict         compiles with strict compiler options (may not work!)],
-   [
-    if test $enableval = "no"; then
-         kde_use_strict_options="no"
-       else
-         kde_use_strict_options="yes"
-    fi
-   ], [kde_use_strict_options="no"])
-
-  AC_ARG_ENABLE(warnings,[  --disable-warnings      disables compilation with -Wall and similiar],
-   [
-    if test $enableval = "no"; then
-         kde_use_warnings="no"
-       else
-         kde_use_warnings="yes"
-    fi
-   ], [kde_use_warnings="yes"])
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
+    *)
+     enable_static=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_static=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
+])# AC_ENABLE_STATIC
 
-  dnl enable warnings for debug build
-  if test "$kde_use_debug_code" != "no"; then
-    kde_use_warnings=yes
-  fi
 
-  AC_ARG_ENABLE(profile,[  --enable-profile        creates profiling infos [default=no]],
-    [kde_use_profiling=$enableval],
-    [kde_use_profiling="no"]
-  )
+# AC_DISABLE_STATIC
+# -----------------
+# set the default static flag to --disable-static
+AC_DEFUN([AC_DISABLE_STATIC],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_STATIC(no)
+])# AC_DISABLE_STATIC
 
-  AC_ARG_ENABLE(gcov,[  --enable-gcov           enables gcov test coverage support [default=no]],
-    [kde_use_gcov=$enableval],
-    [kde_use_gcov=no]
-  )
 
-  dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
-  CFLAGS=" $CFLAGS"
+# AC_ENABLE_FAST_INSTALL([DEFAULT])
+# ---------------------------------
+# implement the --enable-fast-install flag
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_FAST_INSTALL],
+[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([fast-install],
+    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
+    *)
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_fast_install=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
+])# AC_ENABLE_FAST_INSTALL
 
-  AC_PROG_CC 
 
-  AC_PROG_CPP
+# AC_DISABLE_FAST_INSTALL
+# -----------------------
+# set the default to --disable-fast-install
+AC_DEFUN([AC_DISABLE_FAST_INSTALL],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_FAST_INSTALL(no)
+])# AC_DISABLE_FAST_INSTALL
 
-  if test "$GCC" = "yes"; then
-    if test "$kde_use_debug_code" != "no"; then
-      if test $kde_use_debug_code = "full" || test $kde_use_gcov = "yes"; then
-        CFLAGS="-g3 $CFLAGS"
-      else
-        CFLAGS="-g -O2 $CFLAGS"
-      fi
-    else
-      CFLAGS="-O2 $CFLAGS"
-    fi
-  fi
 
-  if test "$kde_use_debug_define" = "yes"; then
-    CFLAGS="-DNDEBUG $CFLAGS"
-  fi
+# AC_LIBTOOL_PICMODE([MODE])
+# --------------------------
+# implement the --with-pic flag
+# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
+AC_DEFUN([AC_LIBTOOL_PICMODE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+pic_mode=ifelse($#,1,$1,default)
+])# AC_LIBTOOL_PICMODE
 
 
-  case "$host" in
-  *-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
-  *-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
-  esac
+# AC_PROG_EGREP
+# -------------
+# This is predefined starting with Autoconf 2.54, so this conditional
+# definition can be removed once we require Autoconf 2.54 or later.
+m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
+[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
+   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+    then ac_cv_prog_egrep='grep -E'
+    else ac_cv_prog_egrep='egrep'
+    fi])
+ EGREP=$ac_cv_prog_egrep
+ AC_SUBST([EGREP])
+])])
 
-  if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
-     LDFLAGS=""
-  fi
 
-  CXXFLAGS=" $CXXFLAGS"
+# AC_PATH_TOOL_PREFIX
+# -------------------
+# find a file program which can recognise shared library
+AC_DEFUN([AC_PATH_TOOL_PREFIX],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+[[\\/*] |  ?:[\\/]*])
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word.  This closes a longstanding sh security hole.
+  ac_dummy="ifelse([$2], , $PATH, [$2])"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$1; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<EOF 1>&2
 
-  AC_PROG_CXX
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool at gnu.org
 
-  if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
-    if test "$kde_use_debug_code" != "no"; then
-      if test "$CXX" = "KCC"; then
-        CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
-      else
-        if test "$kde_use_debug_code" = "full"; then
-          CXXFLAGS="-g3 $CXXFLAGS"
-        else
-          CXXFLAGS="-g -O2 $CXXFLAGS"
-        fi
+EOF
+	  fi ;;
+	esac
       fi
-      KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
-
-      dnl convenience compiler flags
-      KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
-      AC_SUBST(WOVERLOADED_VIRTUAL)
-    else
-      if test "$CXX" = "KCC"; then
-        CXXFLAGS="+K3 $CXXFLAGS"
-      else
-        CXXFLAGS="-O2 $CXXFLAGS"
-      fi  
+      break
     fi
-  fi
-
-  if test "$kde_use_debug_define" = "yes"; then
-    CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
-  fi  
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac])
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  AC_MSG_RESULT($MAGIC_CMD)
+else
+  AC_MSG_RESULT(no)
+fi
+])# AC_PATH_TOOL_PREFIX
 
-  if test "$kde_use_profiling" = "yes"; then
-    KDE_CHECK_COMPILER_FLAG(pg,
-    [
-      CFLAGS="-pg $CFLAGS"
-      CXXFLAGS="-pg $CXXFLAGS"
-    ])
-  fi
 
-  if test "$kde_use_gcov" = "yes"; then
-    KDE_CHECK_COMPILER_FLAG(fprofile-arcs,
-    [
-      CFLAGS="-fprofile-arcs -ftest-coverage $CFLAGS"
-      CXXFLAGS="-fprofile-arcs -ftest-coverage $CXXFLAGS"
-    ])
+# AC_PATH_MAGIC
+# -------------
+# find a file program which can recognise a shared library
+AC_DEFUN([AC_PATH_MAGIC],
+[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+  else
+    MAGIC_CMD=:
   fi
+fi
+])# AC_PATH_MAGIC
 
-  if test "$kde_use_warnings" = "yes"; then
-      if test "$GCC" = "yes"; then
-        case $host in
-          *-*-linux-gnu)	
-            CFLAGS="-ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
-            CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion $CXXFLAGS"
-          ;;
-        esac
-        CXXFLAGS="-Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
-        KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
-        KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
-        KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"])
-     fi
-  fi
 
-  if test "$GCC" = "yes" && test "$kde_use_strict_options" = "yes"; then
-    CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
-  fi
-    
-  if test "$GXX" = "yes"; then
-    KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
-    KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
-    KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS=	)
-  fi
-  if test "$CXX" = "KCC"; 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="$CXXFLAGS --no_exceptions"])
-    dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS=	)
-
-    AC_ARG_ENABLE(pch,[  --enable-pch            enables precompiled header support (currently only KCC) [default=no]],
-    [
-      kde_use_pch=$enableval
-    ],[kde_use_pch=no])
- 
-    if test "$kde_use_pch" = "yes"; then
-      dnl TODO: support --pch-dir!
-      KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
-      dnl the below works (but the dir must exist), but it's
-      dnl useless for a whole package.
-      dnl The are precompiled headers for each source file, so when compiling
-      dnl from scratch, it doesn't make a difference, and they take up
-      dnl around ~5Mb _per_ sourcefile.
-      dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
-      dnl   [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
-    fi
-    dnl this flag controls inlining. by default KCC inlines in optimisation mode
-    dnl all implementations that are defined inside the class {} declaration. 
-    dnl because of templates-compatibility with broken gcc compilers, this
-    dnl can cause excessive inlining. This flag limits it to a sane level
-    KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
-    KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
-    KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
-    KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
-    dnl Some source files are shared between multiple executables
-    dnl (or libraries) and some of those need template instantiations.
-    dnl In that case KCC needs to compile those sources with
-    dnl --one_instantiation_per_object.  To make it easy for us we compile
-    dnl _all_ objects with that flag (--one_per is a shorthand).
-    KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
-  fi
-  AC_SUBST(USE_EXCEPTIONS)
-  dnl obsolete macro - provided to keep things going
-  USE_RTTI=
-  AC_SUBST(USE_RTTI)
-
-  case "$host" in
-      *-*-irix*)  test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
-      *-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
-      *-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
-      *-*-solaris*) 
-        if test "$GXX" = yes; then
-          libstdcpp=`$CXX -print-file-name=libstdc++.so`
-          if test ! -f $libstdcpp; then
-             AC_MSG_ERROR([You've compiled gcc without --enable-shared. This doesn't work with KDE. Please recompile gcc with --enable-shared to receive a libstdc++.so])
-          fi
-        fi
-        ;;
+# AC_PROG_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([AC_PROG_LD],
+[AC_ARG_WITH([gnu-ld],
+    [AC_HELP_STRING([--with-gnu-ld],
+	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
+    [test "$withval" = no || with_gnu_ld=yes],
+    [with_gnu_ld=no])
+AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  AC_MSG_CHECKING([for ld used by $CC])
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
   esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [[\\/]]* | ?:[[\\/]]*)
+      re_direlt='/[[^/]][[^/]]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  AC_MSG_CHECKING([for GNU ld])
+else
+  AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some GNU ld's only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  AC_MSG_RESULT($LD)
+else
+  AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_PROG_LD_GNU
+])# AC_PROG_LD
 
-  AC_VALIDIFY_CXXFLAGS
-
-  AC_PROG_CXXCPP
-
-  if test "$GCC" = yes; then
-     NOOPT_CXXFLAGS=-O0
-     NOOPT_CFLAGS=-O0
-  fi
-
-  AC_SUBST(NOOPT_CXXFLAGS)
-  AC_SUBST(NOOPT_CFLAGS)
-
-  KDE_CHECK_FINAL
-
-  ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
-])
-
-AC_DEFUN(KDE_ADD_DEPENDENCIES,
-[
-   [A]M_DEPENDENCIES(CC)
-   [A]M_DEPENDENCIES(CXX)
-])
-
-dnl just a wrapper to clean up configure.in
-AC_DEFUN(KDE_PROG_LIBTOOL,
-[
-AC_REQUIRE([AC_CHECK_COMPILERS])
-AC_REQUIRE([AC_ENABLE_SHARED])
-AC_REQUIRE([AC_ENABLE_STATIC])
-
-AC_REQUIRE([AC_LIBTOOL_DLOPEN])
-AC_REQUIRE([KDE_CHECK_LIB64])
 
-AC_LANG_SAVE
-AC_LANG_C
-AC_OBJEXT
-AC_EXEEXT
-AC_LANG_RESTORE
+# AC_PROG_LD_GNU
+# --------------
+AC_DEFUN([AC_PROG_LD_GNU],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# AC_PROG_LD_GNU
 
-AM_PROG_LIBTOOL
-AC_LIBTOOL_CXX
-
-LIBTOOL_SHELL="/bin/sh ./libtool"
-#  LIBTOOL="$LIBTOOL --silent"
-KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
-AC_SUBST(KDE_PLUGIN)
-
-AC_ARG_ENABLE(objprelink, [  --enable-objprelink     prelink apps using objprelink (obsolete)],
-       kde_use_objprelink=$enableval, kde_use_objprelink=no)
-  if test "x$kde_use_objprelink" = "xyes"; then 
-        AC_MSG_WARN([
-------------------------------------------------------------
-Configuration option --enable-objprelink is no longer useful.
-See http:://objprelink.sourceforge.net for details:
-1- Recent binutils are fast enough to do without objprelink.
-2- Newer versions of objprelink do not need this option.
-------------------------------------------------------------
-])
-  fi
-])
 
-AC_DEFUN(KDE_CHECK_LIB64,
-[
-    kdelibsuff=none
-    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 "$kdelibsuff" = "none"; then
-       kdelibsuff=
-    fi
-    if test -z "$kdelibsuff"; then
-        AC_MSG_RESULT([not using lib directory suffix])
-        AC_DEFINE(KDELIBSUFF, [""], Suffix for lib directories)
+# AC_PROG_LD_RELOAD_FLAG
+# ----------------------
+# find reload flag for linker
+#   -- PORTME Some linkers may need a different reload flag.
+AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+  lt_cv_ld_reload_flag,
+  [lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+  darwin*)
+    if test "$GCC" = yes; then
+      reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
     else
-        if test "$libdir" = '${exec_prefix}/lib'; then
-            libdir="$libdir${kdelibsuff}"
-            AC_SUBST([libdir], ["$libdir"])  dnl ugly hack for lib64 platforms
-        fi
-        AC_DEFINE_UNQUOTED(KDELIBSUFF, ["\"${kdelibsuff}\""], Suffix for lib directories)
-        AC_MSG_RESULT([using lib directory suffix $kdelibsuff])
+      reload_cmds='$LD$reload_flag -o $output$reload_objs'
     fi
-])
-
-AC_DEFUN(KDE_CHECK_TYPES,
-[  AC_CHECK_SIZEOF(int, 4)dnl
-  AC_CHECK_SIZEOF(long, 4)dnl
-  AC_CHECK_SIZEOF(char *, 4)dnl
-  AC_CHECK_SIZEOF(char, 1)dnl
-])dnl
-
-AC_DEFUN(KDE_DO_IT_ALL,
-[
-AC_CANONICAL_SYSTEM
-AC_ARG_PROGRAM
-AM_INIT_AUTOMAKE($1, $2)
-AM_DISABLE_LIBRARIES
-AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
-AC_CHECK_COMPILERS
-KDE_PROG_LIBTOOL
-AM_KDE_WITH_NLS
-AC_PATH_KDE
-])
-
-AC_DEFUN(AC_CHECK_RPATH,
-[
-AC_MSG_CHECKING(for rpath)
-AC_ARG_ENABLE(rpath,
-      [  --disable-rpath         do not use the rpath feature of ld],
-      USE_RPATH=$enableval, USE_RPATH=yes)
+    ;;
+esac
+])# AC_PROG_LD_RELOAD_FLAG
 
-if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
 
-  KDE_RPATH="-R \$(kde_libraries)"
+# AC_DEPLIBS_CHECK_METHOD
+# -----------------------
+# how to check for library dependencies
+#  -- PORTME fill in with the dynamic library characteristics
+AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
+[AC_CACHE_CHECK([how to recognise dependent libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
 
-  if test -n "$qt_libraries"; then
-    KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
-  fi
-  dnl $x_libraries is set to /usr/lib in case
-  if test -n "$X_LDFLAGS"; then
-    KDE_RPATH="$KDE_RPATH -R \$(x_libraries)"
-  fi
-  if test -n "$KDE_EXTRA_RPATH"; then
-    KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
-  fi
-fi
-AC_SUBST(KDE_EXTRA_RPATH)
-AC_SUBST(KDE_RPATH)
-AC_MSG_RESULT($USE_RPATH)
-])
+case $host_os in
+aix4* | aix5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-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 <sys/types.h>
-#include <sys/socket.h>
-      ],[
-socklen_t a=0;
-getsockname(0,(struct sockaddr*)0, &a);
-      ],
-      ac_cv_socklen_t=socklen_t,
-      AC_TRY_COMPILE([
-#include <sys/types.h>
-#include <sys/socket.h>
-        ],[
-int a=0;
-getsockname(0,(struct sockaddr*)0, &a);
-        ],
-        ac_cv_socklen_t=int,
-        ac_cv_socklen_t=size_t
-      )
-    )
-    AC_LANG_RESTORE
-  ])
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-  AC_MSG_RESULT($ac_cv_socklen_t)
-  if test "$ac_cv_socklen_t" != "socklen_t"; 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])
+bsdi[[45]]*)
+  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  ;;
 
-])
+cygwin*)
+  # func_win32_libid is a shell function defined in ltmain.sh
+  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+  lt_cv_file_magic_cmd='func_win32_libid'
+  ;;
 
-dnl This is a merge of some macros out of the gettext aclocal.m4
-dnl since we don't need anything, I took the things we need
-dnl the copyright for them is:
-dnl >
-dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
-dnl This Makefile.in is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-dnl >
-dnl for this file it is relicensed under LGPL
-
-AC_DEFUN(AM_KDE_WITH_NLS,
-  [
-    dnl If we use NLS figure out what method
-
-    AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt,
-        [test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt)
-    AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
-
-     if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then
-        AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it])
-        GMSGFMT=":"
-      fi
-      MSGFMT=$GMSGFMT
-      AC_SUBST(GMSGFMT)
-      AC_SUBST(MSGFMT)
-
-      AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext,
-	[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
-
-      dnl Test whether we really found GNU xgettext.
-      if test "$XGETTEXT" != ":"; then
-	dnl If it is no GNU xgettext we define it as : so that the
-	dnl Makefiles still can work.
-	if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
-	  : ;
-	else
-	  AC_MSG_RESULT(
-	    [found xgettext programs is not GNU xgettext; ignore it])
-	  XGETTEXT=":"
-	fi
-      fi
-     AC_SUBST(XGETTEXT)
+mingw* | pw32*)
+  # Base MSYS/MinGW do not provide the 'file' command needed by
+  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
+  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  ;;
 
-  ])
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-# Search path for a program which passes the given test.
-# Ulrich Drepper <drepper at cygnus.com>, 1996.
+freebsd* | kfreebsd*-gnu)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    case $host_cpu in
+    i*86 )
+      # Not sure whether the presence of OpenBSD here was a mistake.
+      # Let's accept both of them until this is cleared up.
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
+      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+      ;;
+    esac
+  else
+    lt_cv_deplibs_check_method=pass_all
+  fi
+  ;;
 
-# serial 1
-# Stephan Kulow: I appended a _KDE against name conflicts
-
-dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR,
-dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
-AC_DEFUN(AM_PATH_PROG_WITH_TEST_KDE,
-[# Extract the first word of "$2", so it can be a program name with args.
-set dummy $2; ac_word=[$]2
-AC_MSG_CHECKING([for $ac_word])
-AC_CACHE_VAL(ac_cv_path_$1,
-[case "[$]$1" in
-  /*)
-  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
   ;;
+
+hpux10.20* | hpux11*)
+  lt_cv_file_magic_cmd=/usr/bin/file
+  case "$host_cpu" in
+  ia64*)
+    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
+    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+    ;;
+  hppa*64*)
+    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
+    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+    ;;
   *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in ifelse([$5], , $PATH, [$5]); do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if [$3]; then
-	ac_cv_path_$1="$ac_dir/$ac_word"
-	break
-      fi
-    fi
-  done
-  IFS="$ac_save_ifs"
-dnl If no 4th arg is given, leave the cache variable unset,
-dnl so AC_PATH_PROGS will keep looking.
-ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
-])dnl
+    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
+    lt_cv_file_magic_test_file=/usr/lib/libc.sl
+    ;;
+  esac
   ;;
-esac])dnl
-$1="$ac_cv_path_$1"
-if test -n "[$]$1"; then
-  AC_MSG_RESULT([$]$1)
-else
-  AC_MSG_RESULT(no)
-fi
-AC_SUBST($1)dnl
-])
-
 
-# Check whether LC_MESSAGES is available in <locale.h>.
-# Ulrich Drepper <drepper at cygnus.com>, 1995.
+irix5* | irix6* | nonstopux*)
+  case $LD in
+  *-32|*"-32 ") libmagic=32-bit;;
+  *-n32|*"-n32 ") libmagic=N32;;
+  *-64|*"-64 ") libmagic=64-bit;;
+  *) libmagic=never-match;;
+  esac
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-# serial 1
+# This must be Linux ELF.
+linux*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-AC_DEFUN(AM_LC_MESSAGES,
-  [if test $ac_cv_header_locale_h = yes; then
-    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
-      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
-       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
-    if test $am_cv_val_LC_MESSAGES = yes; then
-      AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES])
-    fi
-  fi])
-
-dnl From Jim Meyering.
-dnl FIXME: migrate into libit.
-
-AC_DEFUN([AM_FUNC_OBSTACK],
-[AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
- [AC_TRY_LINK([#include "obstack.h"],
-	      [struct obstack *mem;obstack_free(mem,(char *) 0)],
-	      am_cv_func_obstack=yes,
-	      am_cv_func_obstack=no)])
- if test $am_cv_func_obstack = yes; then
-   AC_DEFINE(HAVE_OBSTACK)
- else
-   LIBOBJS="$LIBOBJS obstack.o"
- fi
-])
+netbsd*)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+  fi
+  ;;
 
-dnl From Jim Meyering.  Use this if you use the GNU error.[ch].
-dnl FIXME: Migrate into libit
-
-AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
-[AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
- [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
-              am_cv_lib_error_at_line=yes,
-	      am_cv_lib_error_at_line=no)])
- if test $am_cv_lib_error_at_line = no; then
-   LIBOBJS="$LIBOBJS error.o"
- fi
- AC_SUBST(LIBOBJS)dnl
-])
+newos6*)
+  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
 
-# Macro to add for using GNU gettext.
-# Ulrich Drepper <drepper at cygnus.com>, 1995.
+nto-qnx*)
+  lt_cv_deplibs_check_method=unknown
+  ;;
 
-# serial 1
-# Stephan Kulow: I put a KDE in it to avoid name conflicts
-
-AC_DEFUN(AM_KDE_GNU_GETTEXT,
-  [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-   AC_REQUIRE([AC_PROG_RANLIB])dnl
-   AC_REQUIRE([AC_HEADER_STDC])dnl
-   AC_REQUIRE([AC_TYPE_OFF_T])dnl
-   AC_REQUIRE([AC_TYPE_SIZE_T])dnl
-   AC_REQUIRE([AC_FUNC_ALLOCA])dnl
-   AC_REQUIRE([AC_FUNC_MMAP])dnl
-   AC_REQUIRE([AM_KDE_WITH_NLS])dnl
-   AC_CHECK_HEADERS([limits.h locale.h nl_types.h string.h values.h alloca.h])
-   AC_CHECK_FUNCS([getcwd munmap putenv setlocale strchr strcasecmp \
-__argz_count __argz_stringify __argz_next])
-
-   AC_MSG_CHECKING(for stpcpy)
-   AC_CACHE_VAL(kde_cv_func_stpcpy,
-   [
-   kde_safe_cxxflags=$CXXFLAGS
-   CXXFLAGS="-Wmissing-prototypes -Werror"
-   AC_LANG_SAVE
-   AC_LANG_CPLUSPLUS
-   AC_TRY_COMPILE([
-   #include <string.h>
-   ],
-   [
-   char buffer[200];
-   stpcpy(buffer, buffer);
-   ],
-   kde_cv_func_stpcpy=yes,
-   kde_cv_func_stpcpy=no)
-   AC_LANG_RESTORE
-   CXXFLAGS=$kde_safe_cxxflags
-   ])
-   AC_MSG_RESULT($kde_cv_func_stpcpy)
-   if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then
-     AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy])
-   fi
+openbsd*)
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+  fi
+  ;;
 
-   AM_LC_MESSAGES
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-   if test "x$CATOBJEXT" != "x"; then
-     if test "x$ALL_LINGUAS" = "x"; then
-       LINGUAS=
-     else
-       AC_MSG_CHECKING(for catalogs to be installed)
-       NEW_LINGUAS=
-       for lang in ${LINGUAS=$ALL_LINGUAS}; do
-         case "$ALL_LINGUAS" in
-          *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
-         esac
-       done
-       LINGUAS=$NEW_LINGUAS
-       AC_MSG_RESULT($LINGUAS)
-     fi
+sco3.2v5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-     dnl Construct list of names of catalog files to be constructed.
-     if test -n "$LINGUAS"; then
-       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
-     fi
-   fi
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-  ])
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+  case $host_vendor in
+  motorola)
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
+    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+    ;;
+  ncr)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  sequent)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
+    ;;
+  sni)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
+    lt_cv_file_magic_test_file=/lib/libc.so
+    ;;
+  siemens)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  esac
+  ;;
 
-AC_DEFUN(AC_HAVE_XPM,
- [AC_REQUIRE_CPP()dnl
-  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
-
- test -z "$XPM_LDFLAGS" && XPM_LDFLAGS=
- test -z "$XPM_INCLUDE" && XPM_INCLUDE=
-
- AC_ARG_WITH(xpm, [  --without-xpm           disable color pixmap XPM tests],
-	xpm_test=$withval, xpm_test="yes")
- if test "x$xpm_test" = xno; then
-   ac_cv_have_xpm=no
- else
-   AC_MSG_CHECKING(for XPM)
-   AC_CACHE_VAL(ac_cv_have_xpm,
-   [
-    AC_LANG_C
-    ac_save_ldflags="$LDFLAGS"
-    ac_save_cflags="$CFLAGS"
-    if test "x$kde_use_qt_emb" != "xyes"; then
-      LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
-    else
-      LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
-    fi
-    CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
-    test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
-    AC_TRY_LINK([#include <X11/xpm.h>],[],
-	ac_cv_have_xpm="yes",ac_cv_have_xpm="no")
-    LDFLAGS="$ac_save_ldflags"
-    CFLAGS="$ac_save_cflags"
-   ])dnl
-
-  if test "$ac_cv_have_xpm" = no; then
-    AC_MSG_RESULT(no)
-    XPM_LDFLAGS=""
-    XPMINC=""
-    $2
-  else
-    AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support])
-    if test "$XPM_LDFLAGS" = ""; then
-       XPMLIB='-lXpm $(LIB_X11)'
-    else
-       XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)'
-    fi
-    if test "$XPM_INCLUDE" = ""; then
-       XPMINC=""
-    else
-       XPMINC="-I$XPM_INCLUDE"
-    fi
-    AC_MSG_RESULT(yes)
-    $1
-  fi
- fi
- AC_SUBST(XPMINC)
- AC_SUBST(XPMLIB)
+sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+esac
 ])
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+])# AC_DEPLIBS_CHECK_METHOD
 
-AC_DEFUN(AC_HAVE_DPMS,
- [AC_REQUIRE_CPP()dnl
-  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
-
- test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS=
- test -z "$DPMS_INCLUDE" && DPMS_INCLUDE=
- DPMS_LIB=
-
- AC_ARG_WITH(dpms, [  --without-dpms          disable DPMS power saving],
-	dpms_test=$withval, dpms_test="yes")
- if test "x$dpms_test" = xno; then
-   ac_cv_have_dpms=no
- else
-   AC_MSG_CHECKING(for DPMS)
-   dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms.
-   dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
-   AC_CACHE_VAL(ac_cv_have_dpms,
-   [
-    if test "x$kde_use_qt_emb" = "xyes"; then
-      AC_MSG_RESULT(no)
-      ac_cv_have_dpms="no"
-    else
-      AC_LANG_C
-      ac_save_ldflags="$LDFLAGS"
-      ac_save_cflags="$CFLAGS"
-      ac_save_libs="$LIBS"
-      LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
-      CFLAGS="$CFLAGS $X_INCLUDES"
-      test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
-      AC_TRY_LINK([
-	  #include <X11/Xproto.h>
-	  #include <X11/X.h>
-	  #include <X11/Xlib.h>
-	  #include <X11/extensions/dpms.h>
-	  int foo_test_dpms()
-	  { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
-	  ac_cv_have_dpms="yes", [
-              LDFLAGS="$ac_save_ldflags"
-              CFLAGS="$ac_save_cflags"
-              LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
-              LIBS="$LIBS -lXdpms"
-              CFLAGS="$CFLAGS $X_INCLUDES"
-              test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
-              AC_TRY_LINK([
-	          #include <X11/Xproto.h>
-        	  #include <X11/X.h>
-        	  #include <X11/Xlib.h>
-        	  #include <X11/extensions/dpms.h>
-        	  int foo_test_dpms()
-        	  { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
-        	  [
-                  ac_cv_have_dpms="-lXdpms"
-                  ],ac_cv_have_dpms="no")
-              ])
-      LDFLAGS="$ac_save_ldflags"
-      CFLAGS="$ac_save_cflags"
-      LIBS="$ac_save_libs"
-    fi
-   ])dnl
 
-  if test "$ac_cv_have_dpms" = no; then
-    AC_MSG_RESULT(no)
-    DPMS_LDFLAGS=""
-    DPMSINC=""
-    $2
-  else
-    AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support])
-    if test "$ac_cv_have_dpms" = "-lXdpms"; then
-       DPMS_LIB="-lXdpms"
-    fi
-    if test "$DPMS_LDFLAGS" = ""; then
-       DPMSLIB="$DPMS_LIB "'$(LIB_X11)'
-    else
-       DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)'
-    fi
-    if test "$DPMS_INCLUDE" = ""; then
-       DPMSINC=""
-    else
-       DPMSINC="-I$DPMS_INCLUDE"
+# AC_PROG_NM
+# ----------
+# find the pathname to a BSD-compatible name lister
+AC_DEFUN([AC_PROG_NM],
+[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
+[if test -n "$NM"; then
+  # Let the user override the test.
+  lt_cv_path_NM="$NM"
+else
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
+    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+      # Check to see if the nm accepts a BSD-compat flag.
+      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+      #   nm: unknown option "B" ignored
+      # Tru64's nm complains that /dev/null is an invalid object file
+      case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+      */dev/null* | *'Invalid file or object type'*)
+	lt_cv_path_NM="$tmp_nm -B"
+	break
+        ;;
+      *)
+	case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+	*/dev/null*)
+	  lt_cv_path_NM="$tmp_nm -p"
+	  break
+	  ;;
+	*)
+	  lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+	  continue # so that we can try to find one that supports BSD flags
+	  ;;
+	esac
+      esac
     fi
-    AC_MSG_RESULT(yes)
-    $1
-  fi
- fi
- AC_SUBST(DPMSINC)
- AC_SUBST(DPMSLIB)
-])
+  done
+  IFS="$lt_save_ifs"
+  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+fi])
+NM="$lt_cv_path_NM"
+])# AC_PROG_NM
 
-AC_DEFUN(AC_HAVE_GL,
- [AC_REQUIRE_CPP()dnl
-  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
-
- test -z "$GL_LDFLAGS" && GL_LDFLAGS=
- test -z "$GL_INCLUDE" && GL_INCLUDE=
-
- AC_ARG_WITH(gl, [  --without-gl            disable 3D GL modes],
-	gl_test=$withval, gl_test="yes")
- if test "x$kde_use_qt_emb" = "xyes"; then
-   # GL and Qt Embedded is a no-go for now.
-   ac_cv_have_gl=no
- elif test "x$gl_test" = xno; then
-   ac_cv_have_gl=no
- else
-   AC_MSG_CHECKING(for GL)
-   AC_CACHE_VAL(ac_cv_have_gl,
-   [
-    AC_LANG_SAVE
-    AC_LANG_CPLUSPLUS
-    ac_save_ldflags="$LDFLAGS"
-    ac_save_cxxflags="$CXXFLAGS"
-    LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU"
-    test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
-    LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
-    CXXFLAGS="$CFLAGS $X_INCLUDES"
-    test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
-    AC_TRY_LINK([#include <GL/gl.h>
-#include <GL/glu.h>
-], [],
-	ac_cv_have_gl="mesa", ac_cv_have_gl="no")
-    if test "x$ac_cv_have_gl" = "xno"; then
-      LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGLU -lGL"
-      test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
-      LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
-      CXXFLAGS="$ac_save_cflags $X_INCLUDES"
-      test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
-      AC_TRY_LINK([#include <GL/gl.h>
-#include <GL/glu.h>
-], [],
-	  ac_cv_have_gl="yes", ac_cv_have_gl="no")
-    fi
-    AC_LANG_RESTORE
-    LDFLAGS="$ac_save_ldflags"
-    CXXFLAGS="$ac_save_cxxflags"
-   ])dnl
-
-  if test "$ac_cv_have_gl" = "no"; then
-    AC_MSG_RESULT(no)
-    GL_LDFLAGS=""
-    GLINC=""
-    $2
-  else
-    AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
-    if test "$GL_LDFLAGS" = ""; then
-       if test "$ac_cv_have_gl" = "mesa"; then
-          GLLIB='-lMesaGLU -lMesaGL $(LIB_X11)'
-       else
-          GLLIB='-lGLU -lGL $(LIB_X11)'
-       fi
-    else
-       if test "$ac_cv_have_gl" = "mesa"; then
-          GLLIB="$GL_LDFLAGS -lMesaGLU -lMesaGL "'$(LIB_X11)'
-       else
-          GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)'
-       fi
-    fi
-    if test "$GL_INCLUDE" = ""; then
-       GLINC=""
-    else
-       GLINC="-I$GL_INCLUDE"
-    fi
-    AC_MSG_RESULT($ac_cv_have_gl)
-    $1
-  fi
- fi
- AC_SUBST(GLINC)
- AC_SUBST(GLLIB)
-])
 
+# AC_CHECK_LIBM
+# -------------
+# check for math library
+AC_DEFUN([AC_CHECK_LIBM],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
+  # These system don't have libm, or don't need it
+  ;;
+*-ncr-sysv4.3*)
+  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+  ;;
+*)
+  AC_CHECK_LIB(m, cos, LIBM="-lm")
+  ;;
+esac
+])# AC_CHECK_LIBM
 
- dnl shadow password and PAM magic - maintained by ossi at kde.org
 
-AC_DEFUN(KDE_PAM, [
-  AC_REQUIRE([KDE_CHECK_LIBDL])
+# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
+# -----------------------------------
+# sets LIBLTDL to the link flags for the libltdl convenience library and
+# LTDLINCL to the include flags for the libltdl header and adds
+# --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
+# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
+# DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
+# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
+# '${top_srcdir}/' (note the single quotes!).  If your package is not
+# flat and you're not using automake, define top_builddir and
+# top_srcdir appropriately in the Makefiles.
+AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+  case $enable_ltdl_convenience in
+  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
+  "") enable_ltdl_convenience=yes
+      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
+  esac
+  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
+  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+  # For backwards non-gettext consistent compatibility...
+  INCLTDL="$LTDLINCL"
+])# AC_LIBLTDL_CONVENIENCE
 
-  AC_ARG_WITH(pam,
-    [  --with-pam[=ARG]        enable support for PAM: ARG=[yes|no|service name]],
-    [ if test "x$withval" = "xyes"; then
-        use_pam=yes
-        pam_service=kde
-      elif test "x$withval" = "xno"; then
-        use_pam=no
-      else
-        use_pam=yes
-        pam_service=$withval
-      fi
-      ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
-    ], [
-      AC_CACHE_VAL(ac_cv_path_pam,
-        [ use_pam=no
-          AC_CHECK_LIB(pam, pam_start,
-            [ AC_CHECK_HEADER(security/pam_appl.h,
-                [ use_pam=yes
-                  pam_service=kde ]) 
-            ], , $LIBDL)
-          ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
-        ])
-    ])
-  eval "$ac_cv_path_pam"
 
-  AC_MSG_CHECKING(for PAM)
-  if test "x$use_pam" = xno; then
-    AC_MSG_RESULT(no)
-    PAMLIBS=""
+# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
+# -----------------------------------
+# sets LIBLTDL to the link flags for the libltdl installable library and
+# LTDLINCL to the include flags for the libltdl header and adds
+# --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
+# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
+# DIRECTORY is not provided and an installed libltdl is not found, it is
+# assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
+# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
+# quotes!).  If your package is not flat and you're not using automake,
+# define top_builddir and top_srcdir appropriately in the Makefiles.
+# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
+AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+  AC_CHECK_LIB(ltdl, lt_dlinit,
+  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
+  [if test x"$enable_ltdl_install" = xno; then
+     AC_MSG_WARN([libltdl not installed, but installation disabled])
+   else
+     enable_ltdl_install=yes
+   fi
+  ])
+  if test x"$enable_ltdl_install" = x"yes"; then
+    ac_configure_args="$ac_configure_args --enable-ltdl-install"
+    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
+    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
   else
-    AC_MSG_RESULT(yes)
-    AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
-    PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
-
-    dnl test whether struct pam_message is const (Linux) or not (Sun)
-    AC_MSG_CHECKING(for const pam_message)
-    AC_EGREP_HEADER([struct pam_message], security/pam_appl.h,
-      [ AC_EGREP_HEADER([const struct pam_message], security/pam_appl.h,
-                        [AC_MSG_RESULT([const: Linux-type PAM])],
-                        [AC_MSG_RESULT([nonconst: Sun-type PAM])
-                        AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
-                        )],
-      [AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
+    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
+    LIBLTDL="-lltdl"
+    LTDLINCL=
   fi
+  # For backwards non-gettext consistent compatibility...
+  INCLTDL="$LTDLINCL"
+])# AC_LIBLTDL_INSTALLABLE
 
-  AC_SUBST(PAMLIBS)
-])
-
-dnl DEF_PAM_SERVICE(arg name, full name, define name)
-AC_DEFUN(DEF_PAM_SERVICE, [
-  AC_ARG_WITH($1-pam,
-    [  --with-$1-pam=[val]    override PAM service from --with-pam for $2],
-    [ if test "x$use_pam" = xyes; then
-        $3_PAM_SERVICE="$withval"
-      else
-        AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
-You may want to enforce it by using --with-pam.])
-      fi
-    ], 
-    [ if test "x$use_pam" = xyes; then
-        $3_PAM_SERVICE="$pam_service"
-      fi
-    ])
-    if test -n "$$3_PAM_SERVICE"; then
-      AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
-      AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
-    fi
-    AC_SUBST($3_PAM_SERVICE)
-])
-
-AC_DEFUN(KDE_SHADOWPASSWD, [
-  AC_REQUIRE([KDE_PAM])
-
-  AC_CHECK_LIB(shadow, getspent,
-    [ LIBSHADOW="-lshadow"
-      ac_use_shadow=yes
-    ],
-    [ dnl for UnixWare
-      AC_CHECK_LIB(gen, getspent, 
-        [ LIBGEN="-lgen"
-          ac_use_shadow=yes
-        ], 
-        [ AC_CHECK_FUNC(getspent, 
-            [ ac_use_shadow=yes ],
-            [ ac_use_shadow=no ])
-	])
-    ])
-  AC_SUBST(LIBSHADOW)
-  AC_SUBST(LIBGEN)
-  
-  AC_MSG_CHECKING([for shadow passwords])
-
-  AC_ARG_WITH(shadow,
-    [  --with-shadow		  If you want shadow password support ],
-    [ if test "x$withval" != "xno"; then
-        use_shadow=yes
-      else
-        use_shadow=no
-      fi
-    ], [
-      use_shadow="$ac_use_shadow"
-    ])
-
-  if test "x$use_shadow" = xyes; then
-    AC_MSG_RESULT(yes)
-    AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
-  else
-    AC_MSG_RESULT(no)
-    LIBSHADOW=
-    LIBGEN=
-  fi
 
-  dnl finally make the relevant binaries setuid root, if we have shadow passwds.
-  dnl this still applies, if we could use it indirectly through pam.
-  if test "x$use_shadow" = xyes || 
-     ( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
-      case $host in
-      *-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
-	SETUIDFLAGS="-m 4755 -o root";;
-      *)
-	SETUIDFLAGS="-m 4755";;
-      esac
-  fi
-  AC_SUBST(SETUIDFLAGS)
+# AC_LIBTOOL_CXX
+# --------------
+# enable support for C++ libraries
+AC_DEFUN([AC_LIBTOOL_CXX],
+[AC_REQUIRE([_LT_AC_LANG_CXX])
+])# AC_LIBTOOL_CXX
 
-])
 
-AC_DEFUN(KDE_PASSWDLIBS, [
-  AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
-  AC_REQUIRE([KDE_PAM])
-  AC_REQUIRE([KDE_SHADOWPASSWD])
+# _LT_AC_LANG_CXX
+# ---------------
+AC_DEFUN([_LT_AC_LANG_CXX],
+[AC_REQUIRE([AC_PROG_CXX])
+AC_REQUIRE([_LT_AC_PROG_CXXCPP])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
+])# _LT_AC_LANG_CXX
 
-  if test "x$use_pam" = "xyes"; then 
-    PASSWDLIBS="$PAMLIBS"
-  else
-    PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
-  fi
+# _LT_AC_PROG_CXXCPP
+# ---------------
+AC_DEFUN([_LT_AC_PROG_CXXCPP],
+[
+AC_REQUIRE([AC_PROG_CXX])
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 
+    (test "X$CXX" != "Xg++"))) ; then
+  AC_PROG_CXXCPP
+fi
+])# _LT_AC_PROG_CXXCPP
 
-  dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
-  dnl /etc/master.passwd holds the actual passwords.  /etc/master.passwd requires
-  dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
-  dnl may need to read /etc/master.passwd).
-  case $host in
-  *-*-freebsd*)
-    SETUIDFLAGS="-m 4755 -o root"
-    ;;
-  *)
-    ;;
-  esac
+# AC_LIBTOOL_F77
+# --------------
+# enable support for Fortran 77 libraries
+AC_DEFUN([AC_LIBTOOL_F77],
+[AC_REQUIRE([_LT_AC_LANG_F77])
+])# AC_LIBTOOL_F77
 
-  AC_SUBST(PASSWDLIBS)
-])
 
-AC_DEFUN(KDE_CHECK_LIBDL,
-[
-AC_CHECK_LIB(dl, dlopen, [
-LIBDL="-ldl"
-ac_cv_have_dlfcn=yes
-])
+# _LT_AC_LANG_F77
+# ---------------
+AC_DEFUN([_LT_AC_LANG_F77],
+[AC_REQUIRE([AC_PROG_F77])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
+])# _LT_AC_LANG_F77
 
-AC_CHECK_LIB(dld, shl_unload, [
-LIBDL="-ldld"
-ac_cv_have_shload=yes
-])
 
-AC_SUBST(LIBDL)
-])
+# AC_LIBTOOL_GCJ
+# --------------
+# enable support for GCJ libraries
+AC_DEFUN([AC_LIBTOOL_GCJ],
+[AC_REQUIRE([_LT_AC_LANG_GCJ])
+])# AC_LIBTOOL_GCJ
 
-AC_DEFUN(KDE_CHECK_DLOPEN,
-[
-KDE_CHECK_LIBDL
-AC_CHECK_HEADERS(dlfcn.h dl.h)
-if test "$ac_cv_header_dlfcn_h" = "no"; then
-  ac_cv_have_dlfcn=no
-fi
 
-if test "$ac_cv_header_dl_h" = "no"; then
-  ac_cv_have_shload=no
-fi
+# _LT_AC_LANG_GCJ
+# ---------------
+AC_DEFUN([_LT_AC_LANG_GCJ],
+[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
+  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
+    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
+      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
+	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
+	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
+])# _LT_AC_LANG_GCJ
 
-dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
-dnl (MM)
-AC_ARG_ENABLE(dlopen,
-[  --disable-dlopen        link statically [default=no]] ,
-enable_dlopen=$enableval,
-enable_dlopen=yes)
 
-# override the user's opinion, if we know it better ;)
-if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then
-  enable_dlopen=no
-fi
+# AC_LIBTOOL_RC
+# --------------
+# enable support for Windows resource files
+AC_DEFUN([AC_LIBTOOL_RC],
+[AC_REQUIRE([LT_AC_PROG_RC])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
+])# AC_LIBTOOL_RC
 
-if test "$ac_cv_have_dlfcn" = "yes"; then
-  AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn])
-fi
 
-if test "$ac_cv_have_shload" = "yes"; then
-  AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload])
-fi
-
-if test "$enable_dlopen" = no ; then
-  test -n "$1" && eval $1
-else
-  test -n "$2" && eval $2
-fi
+# AC_LIBTOOL_LANG_C_CONFIG
+# ------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
+AC_DEFUN([_LT_AC_LANG_C_CONFIG],
+[lt_save_CC="$CC"
+AC_LANG_PUSH(C)
 
-])
+# Source file extension for C test sources.
+ac_ext=c
 
-AC_DEFUN(KDE_CHECK_DYNAMIC_LOADING,
-[
-KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no)
-KDE_PROG_LIBTOOL
-AC_MSG_CHECKING([dynamic loading])
-eval "`egrep '^build_libtool_libs=' libtool`"
-if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then
-  dynamic_loading=yes
-  AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING)
-else
-  dynamic_loading=no
-fi
-AC_MSG_RESULT($dynamic_loading)
-if test "$dynamic_loading" = "yes"; then
-  $1
-else
-  $2
-fi
-])
+# Object file extension for compiled C test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
 
-AC_DEFUN(KDE_ADD_INCLUDES,
-[
-if test -z "$1"; then
-  test_include="Pix.h"
-else
-  test_include="$1"
-fi
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;\n"
 
-AC_MSG_CHECKING([for libg++ ($test_include)])
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}\n'
 
-AC_CACHE_VAL(kde_cv_libgpp_includes,
-[
-kde_cv_libgpp_includes=no
-
-   for ac_dir in               \
-                               \
-     /usr/include/g++          \
-     /usr/include              \
-     /usr/unsupported/include  \
-     /opt/include              \
-     $extra_include            \
-     ; \
-   do
-     if test -r "$ac_dir/$test_include"; then
-       kde_cv_libgpp_includes=$ac_dir
-       break
-     fi
-   done
-])
+_LT_AC_SYS_COMPILER
 
-AC_MSG_RESULT($kde_cv_libgpp_includes)
-if test "$kde_cv_libgpp_includes" != "no"; then
-  all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES"
+#
+# Check for any special shared library compilation flags.
+#
+_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
+if test "$GCC" = no; then
+  case $host_os in
+  sco3.2v5*)
+    _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
+    ;;
+  esac
 fi
-])
-])
-
-
-AC_DEFUN(KDE_CHECK_MICO,
-[
-AC_REQUIRE([KDE_CHECK_LIBDL])
-AC_REQUIRE([KDE_MISC_TESTS])
-AC_MSG_CHECKING(for MICO)
-
-if test -z "$MICODIR"; then
-    kde_micodir=/usr/local
- else
-    kde_micodir="$MICODIR"
+if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
+  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
+  if echo "$old_CC $old_CFLAGS " | grep "[[ 	]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ 	]]" >/dev/null; then :
+  else
+    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
+    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
+  fi
 fi
 
-AC_ARG_WITH(micodir,
-  [  --with-micodir=micodir  where mico is installed ],
-  kde_micodir=$withval,
-  kde_micodir=$kde_micodir
-)
 
-AC_CACHE_VAL(kde_cv_mico_incdir,
-[
-  mico_incdirs="$kde_micodir/include /usr/include /usr/local/include /usr/local/include /opt/local/include $kde_extra_includes"
-AC_FIND_FILE(CORBA.h, $mico_incdirs, kde_cv_mico_incdir)
+#
+# Check to make sure the static flag actually works.
+#
+AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
+  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
+  $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
+  [],
+  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
 
-])
-kde_micodir=`echo $kde_cv_mico_incdir | sed -e 's#/include##'`
 
-if test ! -r  $kde_micodir/include/CORBA.h; then
-  AC_MSG_ERROR([No CORBA.h found, specify another micodir])
-fi
+AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+AC_LIBTOOL_DLOPEN_SELF($1)
 
-AC_MSG_RESULT($kde_micodir)
+# Report which librarie types wil actually be built
+AC_MSG_CHECKING([if libtool supports shared libraries])
+AC_MSG_RESULT([$can_build_shared])
 
-MICO_INCLUDES=-I$kde_micodir/include
-AC_SUBST(MICO_INCLUDES)
-MICO_LDFLAGS=-L$kde_micodir/lib
-AC_SUBST(MICO_LDFLAGS)
-micodir=$kde_micodir
-AC_SUBST(micodir)
+AC_MSG_CHECKING([whether to build shared libraries])
+test "$can_build_shared" = "no" && enable_shared=no
 
-AC_MSG_CHECKING([for MICO version])
-AC_CACHE_VAL(kde_cv_mico_version,
-[
-AC_LANG_C
-cat >conftest.$ac_ext <<EOF
-#include <stdio.h>
-#include <mico/version.h>
-int main() {
+# On AIX, shared libraries and static libraries use the same namespace, and
+# are all built from PIC.
+case "$host_os" in
+aix3*)
+  test "$enable_shared" = yes && enable_static=no
+  if test -n "$RANLIB"; then
+    archive_cmds="$archive_cmds~\$RANLIB \$lib"
+    postinstall_cmds='$RANLIB $lib'
+  fi
+  ;;
 
-   printf("MICO_VERSION=%s\n",MICO_VERSION);
-   return (0);
-}
-EOF
-ac_compile='${CC-gcc} $CFLAGS $MICO_INCLUDES conftest.$ac_ext -o conftest'
-if AC_TRY_EVAL(ac_compile); then
-  if eval `./conftest 2>&5`; then
-    kde_cv_mico_version=$MICO_VERSION
-  else
-    AC_MSG_ERROR([your system is not able to execute a small application to
-    find MICO version! Check $kde_micodir/include/mico/version.h])
+aix4* | aix5*)
+  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+    test "$enable_shared" = yes && enable_static=no
   fi
-else
-  AC_MSG_ERROR([your system is not able to compile a small application to
-  find MICO version! Check $kde_micodir/include/mico/version.h])
-fi
-])
+    ;;
+esac
+AC_MSG_RESULT([$enable_shared])
 
-dnl installed MICO version
-mico_v_maj=`echo $kde_cv_mico_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
-mico_v_mid=`echo $kde_cv_mico_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
-mico_v_min=`echo $kde_cv_mico_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
+AC_MSG_CHECKING([whether to build static libraries])
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+AC_MSG_RESULT([$enable_static])
 
-if test "x$1" = "x"; then
- req_version="2.3.0"
-else
- req_version=$1
-fi
+AC_LIBTOOL_CONFIG($1)
 
-dnl required MICO version
-req_v_maj=`echo $req_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
-req_v_mid=`echo $req_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
-req_v_min=`echo $req_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
+AC_LANG_POP
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_C_CONFIG
 
-if test "$mico_v_maj" -lt "$req_v_maj" || \
-   ( test "$mico_v_maj" -eq "$req_v_maj" && \
-        test "$mico_v_mid" -lt "$req_v_mid" ) || \
-   ( test "$mico_v_mid" -eq "$req_v_mid" && \
-        test "$mico_v_min" -lt "$req_v_min" )
 
-then
-  AC_MSG_ERROR([found MICO version $kde_cv_mico_version but version $req_version \
-at least is required. You should upgrade MICO.])
-else
-  AC_MSG_RESULT([$kde_cv_mico_version (minimum version $req_version, ok)])
-fi
+# AC_LIBTOOL_LANG_CXX_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
+AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
+[AC_LANG_PUSH(C++)
+AC_REQUIRE([AC_PROG_CXX])
+AC_REQUIRE([_LT_AC_PROG_CXXCPP])
 
-LIBMICO="-lmico$kde_cv_mico_version $LIBCRYPT $LIBSOCKET $LIBDL"
-AC_SUBST(LIBMICO)
-if test -z "$IDL"; then
-  IDL='$(kde_bindir)/cuteidl'
-fi
-AC_SUBST(IDL)
-IDL_DEPENDENCIES='$(kde_includes)/CUTE.h'
-AC_SUBST(IDL_DEPENDENCIES)
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_AC_TAGVAR(allow_undefined_flag, $1)=
+_LT_AC_TAGVAR(always_export_symbols, $1)=no
+_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_direct, $1)=no
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+_LT_AC_TAGVAR(hardcode_automatic, $1)=no
+_LT_AC_TAGVAR(module_cmds, $1)=
+_LT_AC_TAGVAR(module_expsym_cmds, $1)=
+_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_AC_TAGVAR(no_undefined_flag, $1)=
+_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
-idldir="\$(includedir)/idl"
-AC_SUBST(idldir)
+# Dependencies to place before and after the object being linked:
+_LT_AC_TAGVAR(predep_objects, $1)=
+_LT_AC_TAGVAR(postdep_objects, $1)=
+_LT_AC_TAGVAR(predeps, $1)=
+_LT_AC_TAGVAR(postdeps, $1)=
+_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
 
-])
+# Source file extension for C++ test sources.
+ac_ext=cc
 
-AC_DEFUN(KDE_CHECK_MINI_STL,
-[
-AC_REQUIRE([KDE_CHECK_MICO])
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
 
-AC_MSG_CHECKING(if we use mico's mini-STL)
-AC_CACHE_VAL(kde_cv_have_mini_stl,
-[
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-kde_save_cxxflags="$CXXFLAGS"
-CXXFLAGS="$CXXFLAGS $MICO_INCLUDES"
-AC_TRY_COMPILE(
-[
-#include <mico/config.h>
-],
-[
-#ifdef HAVE_MINI_STL
-#error "nothing"
-#endif
-],
-kde_cv_have_mini_stl=no,
-kde_cv_have_mini_stl=yes)
-CXXFLAGS="$kde_save_cxxflags"
-AC_LANG_RESTORE
-])
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
 
-if test "x$kde_cv_have_mini_stl" = "xyes"; then
-   AC_MSG_RESULT(yes)
-   $1
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_LD=$LD
+lt_save_GCC=$GCC
+GCC=$GXX
+lt_save_with_gnu_ld=$with_gnu_ld
+lt_save_path_LD=$lt_cv_path_LD
+if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
 else
-   AC_MSG_RESULT(no)
-   $2
+  unset lt_cv_prog_gnu_ld
 fi
-])
+if test -n "${lt_cv_path_LDCXX+set}"; then
+  lt_cv_path_LD=$lt_cv_path_LDCXX
+else
+  unset lt_cv_path_LD
+fi
+test -z "${LDCXX+set}" || LD=$LDCXX
+CC=${CXX-"c++"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
 
-])
+# We don't want -fno-exception wen compiling C++ code, so set the
+# no_builtin_flag separately
+if test "$GXX" = yes; then
+  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+else
+  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+fi
 
+if test "$GXX" = yes; then
+  # Set up default GNU C++ configuration
 
-AC_DEFUN(KDE_CHECK_LIBPTHREAD,
-[
-AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"] )
-AC_SUBST(LIBPTHREAD)
-])
+  AC_PROG_LD
 
-AC_DEFUN(KDE_CHECK_PTHREAD_OPTION,
-[
-    AC_ARG_ENABLE(kernel-threads, [  --enable-kernel-threads Enable the use of the LinuxThreads port on FreeBSD/i386 only.],
-	kde_use_kernthreads=$enableval, kde_use_kernthreads=no)
-
-    if test "$kde_use_kernthreads" = "yes"; then
-      ac_save_CXXFLAGS="$CXXFLAGS"
-      ac_save_CFLAGS="$CFLAGS"
-      CXXFLAGS="-I/usr/local/include/pthread/linuxthreads $CXXFLAGS"
-      CFLAGS="-I/usr/local/include/pthread/linuxthreads $CFLAGS"
-      AC_CHECK_HEADERS(pthread/linuxthreads/pthread.h)
-      CXXFLAGS="$ac_save_CXXFLAGS"
-      CFLAGS="$ac_save_CFLAGS"
-      if test "$ac_cv_header_pthread_linuxthreads_pthread_h" = "no"; then
-        kde_use_kernthreads=no
-      else
-        dnl Add proper -I and -l statements
-        AC_CHECK_LIB(lthread, pthread_join, [LIBPTHREAD="-llthread -llgcc_r"]) dnl for FreeBSD
-        if test "x$LIBPTHREAD" = "x"; then
-          kde_use_kernthreads=no
-        else
-          USE_THREADS="-D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads"
-        fi
-      fi
-    else 
-      USE_THREADS=""
-      if test -z "$LIBPTHREAD"; then
-        KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-pthread"] )
-      fi
-    fi
+  # 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 "$with_gnu_ld" = 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'
 
-    AH_VERBATIM(__svr_define, [
-#if defined(__SVR4) && !defined(__svr4__)
-#define __svr4__ 1
-#endif
-])
-    case $host_os in
- 	solaris*)
-		KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
-                CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
-    		;;
-        freebsd*)
-                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
-                ;;
-        aix*)
-                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
-                LIBPTHREAD="$LIBPTHREAD -lc_r"
-                ;;
-        linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
-                if test "$CXX" = "KCC"; then
-                  CXXFLAGS="$CXXFLAGS --thread_safe"
-		  NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
-                fi
-                ;;
-	*)
-		;;
-    esac
-    AC_SUBST(USE_THREADS)
-    AC_SUBST(LIBPTHREAD)
-])
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
-AC_DEFUN(KDE_CHECK_THREADING,
-[
-  AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
-  AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
-  dnl default is yes if libpthread is found and no if no libpthread is available
-  if test -z "$LIBPTHREAD"; then
-    if test -z "$USE_THREADS"; then
-      kde_check_threading_default=no
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+    #     investigate it a little bit more. (MM)
+    wlarc='${wl}'
+
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
+	grep 'no-whole-archive' > /dev/null; then
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
     else
-      kde_check_threading_default=yes
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
     fi
   else
-    kde_check_threading_default=yes
-  fi
-  AC_ARG_ENABLE(threading, [  --disable-threading     disables threading even if libpthread found ],
-   kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
-  if test "x$kde_use_threading" = "xyes"; then
-    AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
+    with_gnu_ld=no
+    wlarc=
+
+    # A generic and very simple default shared library creation
+    # command for GNU C++ for the case where it uses the native
+    # 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'
   fi
-])
 
-AC_DEFUN(KDE_TRY_LINK_PYTHON,
-[
-if test "$kde_python_link_found" = no; then
+  # Commands to make compiler produce verbose output that lists
+  # what "hidden" libraries, object files and flags are used when
+  # linking a shared library.
+  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
 
-if test "$1" = normal; then
-  AC_MSG_CHECKING(if a Python application links)
 else
-  AC_MSG_CHECKING(if Python depends on $2)
+  GXX=no
+  with_gnu_ld=no
+  wlarc=
 fi
 
-AC_CACHE_VAL(kde_cv_try_link_python_$1,
-[
-AC_LANG_SAVE
-AC_LANG_C
-kde_save_cflags="$CFLAGS"
-CFLAGS="$CFLAGS $PYTHONINC"
-kde_save_libs="$LIBS"
-LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET"
-kde_save_ldflags="$LDFLAGS"
-LDFLAGS="$LDFLAGS $PYTHONLIB"
-
-AC_TRY_LINK(
-[
-#include <Python.h>
-],[
-	PySys_SetArgv(1, 0);
-],
-	[kde_cv_try_link_python_$1=yes],
-	[kde_cv_try_link_python_$1=no]
-)
-CFLAGS="$kde_save_cflags"
-LIBS="$kde_save_libs"
-LDFLAGS="$kde_save_ldflags"
-])
+# PORTME: fill in a description of your system's C++ link characteristics
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+_LT_AC_TAGVAR(ld_shlibs, $1)=yes
+case $host_os in
+  aix3*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  aix4* | aix5*)
+    if test "$host_cpu" = ia64; then
+      # On IA64, the linker does run time linking by default, so we don't
+      # have to do anything special.
+      aix_use_runtimelinking=no
+      exp_sym_flag='-Bexport'
+      no_entry_flag=""
+    else
+      aix_use_runtimelinking=no
 
-if test "$kde_cv_try_link_python_$1" = "yes"; then
-  AC_MSG_RESULT(yes)
-  kde_python_link_found=yes
-  if test ! "$1" = normal; then
-    LIBPYTHON="$LIBPYTHON $2"
-  fi
-  $3
-else
-  AC_MSG_RESULT(no)
-  $4
-fi
-AC_LANG_RESTORE
-
-fi
-
-])
-
-AC_DEFUN(KDE_CHECK_PYTHON_DIR,
-[
-AC_MSG_CHECKING([for Python directory])
- 
-AC_CACHE_VAL(kde_cv_pythondir,
-[
-  if test -z "$PYTHONDIR"; then
-    kde_cv_pythondir=/usr/local
-  else
-    kde_cv_pythondir="$PYTHONDIR"
-  fi
-])
- 
-AC_ARG_WITH(pythondir,
-[  --with-pythondir=pythondir   use python installed in pythondir ],
-[
-  ac_python_dir=$withval
-], ac_python_dir=$kde_cv_pythondir
-)
- 
-AC_MSG_RESULT($ac_python_dir)
-])
-
-AC_DEFUN(KDE_CHECK_PYTHON_INTERN,
-[
-AC_REQUIRE([KDE_CHECK_LIBDL])
-AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
-AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
-
-if test -z "$1"; then
-  version="1.5"
-else
-  version="$1"
-fi
-
-AC_MSG_CHECKING([for Python$version])
-
-python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes"
-AC_FIND_FILE(Python.h, $python_incdirs, python_incdir)
-if test ! -r $python_incdir/Python.h; then
-  AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
-  python_incdir=$python_incdir/python$version
-  if test ! -r $python_incdir/Python.h; then
-    python_incdir=no
-  fi
-fi
-
-PYTHONINC=-I$python_incdir
-
-python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
-AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
-if test ! -r $python_libdir/libpython$version.a; then
-  AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
-  python_libdir=$python_libdir/python$version/config
-  if test ! -r $python_libdir/libpython$version.a; then
-    python_libdir=no
-  fi
-fi
-
-PYTHONLIB=-L$python_libdir
-kde_orig_LIBPYTHON=$LIBPYTHON
-if test -z "$LIBPYTHON"; then
-  LIBPYTHON=-lpython$version
-fi
-
-python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
-AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
-python_moddir=$python_moddir/python$version
-if test ! -r $python_moddir/copy.py; then
-  python_moddir=no
-fi
-
-PYTHONMODDIR=$python_moddir
-
-AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
-
-if test x$python_incdir = xno ||  test x$python_libdir = xno ||  test x$python_moddir = xno; then
-   LIBPYTHON=$kde_orig_LIBPYTHON
-   test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
-   test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
-   $2
-else 
-  dnl Note: this test is very weak
-  kde_python_link_found=no
-  KDE_TRY_LINK_PYTHON(normal)
-  KDE_TRY_LINK_PYTHON(m, -lm)
-  KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
-  KDE_TRY_LINK_PYTHON(tcl, -ltcl)
-  KDE_TRY_LINK_PYTHON(db2, -ldb2)
-  KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
-  KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
-  KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
-  KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
-  KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
-  KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
-  KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
-	[AC_MSG_WARN([it seems, Python depends on another library.
-    Pleae set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
-    and contact the authors to let them know about this problem])
-	])
-
-  LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
-  AC_SUBST(PYTHONINC)
-  AC_SUBST(PYTHONLIB)
-  AC_SUBST(LIBPYTHON)
-  AC_SUBST(PYTHONMODDIR)
-  AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
-fi
-
-])
-
-
-AC_DEFUN(KDE_CHECK_PYTHON,
-[
-  KDE_CHECK_PYTHON_INTERN("2.2", 
-    [KDE_CHECK_PYTHON_INTERN("2.1", 
-      [KDE_CHECK_PYTHON_INTERN("2.0", [ KDE_CHECK_PYTHON_INTERN($1, $2) ])
-  ])])
-])
-
-AC_DEFUN(KDE_CHECK_STL_SGI,
-[
-    AC_MSG_CHECKING([if STL implementation is SGI like])
-    AC_CACHE_VAL(kde_cv_stl_type_sgi,
-    [
-      AC_TRY_COMPILE([
-#include <string>
-using namespace std;
-],[
-  string astring="Hallo Welt.";
-  astring.erase(0, 6); // now astring is "Welt"
-  return 0;
-], kde_cv_stl_type_sgi=yes,
-   kde_cv_stl_type_sgi=no)
-])
-
-   AC_MSG_RESULT($kde_cv_stl_type_sgi)
-
-   if test "$kde_cv_stl_type_sgi" = "yes"; then
-	AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
-   fi
-])
-
-AC_DEFUN(KDE_CHECK_STL_HP,
-[
-    AC_MSG_CHECKING([if STL implementation is HP like])
-    AC_CACHE_VAL(kde_cv_stl_type_hp,
-    [
-      AC_TRY_COMPILE([
-#include <string>
-using namespace std;
-],[
-  string astring="Hello World";
-  astring.remove(0, 6); // now astring is "World"
-  return 0;
-], kde_cv_stl_type_hp=yes,
-   kde_cv_stl_type_hp=no)
-])
-   AC_MSG_RESULT($kde_cv_stl_type_hp)
-
-   if test "$kde_cv_stl_type_hp" = "yes"; then
-	AC_DEFINE_UNQUOTED(HAVE_HP_STL, 1, [Define if you have a STL implementation by HP])
-   fi
-])
-
-AC_DEFUN(KDE_CHECK_STL,
-[
-    AC_LANG_SAVE
-    AC_LANG_CPLUSPLUS
-    ac_save_CXXFLAGS="$CXXFLAGS"
-    CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
-    KDE_CHECK_STL_SGI
-
-    if test "$kde_cv_stl_type_sgi" = "no"; then
-       KDE_CHECK_STL_HP
+      # Test if we are trying to use run time linking or normal
+      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+      # need to do runtime linking.
+      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
+	for ld_flag in $LDFLAGS; do
+	  case $ld_flag in
+	  *-brtl*)
+	    aix_use_runtimelinking=yes
+	    break
+	    ;;
+	  esac
+	done
+      esac
 
-       if test "$kde_cv_stl_type_hp" = "no"; then
-         AC_MSG_ERROR("no known STL type found - did you forget to install libstdc++[-devel] ?")
-       fi
+      exp_sym_flag='-bexport'
+      no_entry_flag='-bnoentry'
     fi
 
-    CXXFLAGS="$ac_save_CXXFLAGS"
-    AC_LANG_RESTORE
-])
-
-AC_DEFUN(AC_FIND_QIMGIO,
-   [AC_REQUIRE([AC_FIND_JPEG])
-AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
-AC_MSG_CHECKING([for qimgio])
-AC_CACHE_VAL(ac_cv_lib_qimgio,
-[
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-ac_save_LIBS="$LIBS"
-ac_save_CXXFLAGS="$CXXFLAGS"
-LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT"
-CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
-AC_TRY_RUN(dnl
-[
-#include <qimageio.h>
-#include <qstring.h>
-int main() {
-		QString t = "hallo";
-		t.fill('t');
-		qInitImageIO();
-}
-],
-            ac_cv_lib_qimgio=yes,
-            ac_cv_lib_qimgio=no,
-	    ac_cv_lib_qimgio=no)
-LIBS="$ac_save_LIBS"
-CXXFLAGS="$ac_save_CXXFLAGS"
-AC_LANG_RESTORE
-])dnl
-if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then
-  LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG"
-  AC_MSG_RESULT(yes)
-  AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available])
-  AC_SUBST(LIBQIMGIO)
-else
-  AC_MSG_RESULT(not found)
-fi
-])
-
-AC_DEFUN(KDE_CHECK_ANSI,
-[
-])
-
-AC_DEFUN(KDE_CHECK_INSURE,
-[
-  AC_ARG_ENABLE(insure, [  --enable-insure             use insure++ for debugging [default=no]],
-  [
-  if test $enableval = "no"; dnl
-	then ac_use_insure="no"
-	else ac_use_insure="yes"
-   fi
-  ], [ac_use_insure="no"])
-
-  AC_MSG_CHECKING(if we will use Insure++ to debug)
-  AC_MSG_RESULT($ac_use_insure)
-  if test "$ac_use_insure" = "yes"; dnl
-       then CC="insure"; CXX="insure"; dnl CFLAGS="$CLAGS -fno-rtti -fno-exceptions "????
-   fi
-])
-
-AC_DEFUN(AM_DISABLE_LIBRARIES,
-[
-    AC_PROVIDE([AM_ENABLE_STATIC])
-    AC_PROVIDE([AM_ENABLE_SHARED])
-    enable_static=no
-    enable_shared=yes
-])
-
+    # When large executables or shared objects are built, AIX ld can
+    # have problems creating the table of contents.  If linking a library
+    # or program results in "error TOC overflow" add -mminimal-toc to
+    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
-AC_DEFUN(AC_CHECK_UTMP_FILE,
-[
-    AC_MSG_CHECKING([for utmp file])
-
-    AC_CACHE_VAL(kde_cv_utmp_file,
-    [
-    kde_cv_utmp_file=no
-
-    for ac_file in    \
-                      \
-	/var/run/utmp \
-	/var/adm/utmp \
-	/etc/utmp     \
-     ; \
-    do
-     if test -r "$ac_file"; then
-       kde_cv_utmp_file=$ac_file
-       break
-     fi
-    done
-    ])
+    _LT_AC_TAGVAR(archive_cmds, $1)=''
+    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
-    if test "$kde_cv_utmp_file" != "no"; then
-	AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries])
-	$1
-	AC_MSG_RESULT($kde_cv_utmp_file)
+    if test "$GXX" = yes; then
+      case $host_os in aix4.[012]|aix4.[012].*)
+      # We only want to do this on AIX 4.2 and lower, the check
+      # below for broken collect2 doesn't work under 4.3+
+	collect2name=`${CC} -print-prog-name=collect2`
+	if test -f "$collect2name" && \
+	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	then
+	  # We have reworked collect2
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+	else
+	  # We have old collect2
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+	  # It fails to find uninstalled libraries when the uninstalled
+	  # path is not listed in the libpath.  Setting hardcode_minus_L
+	  # to unsupported forces relinking
+	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+	fi
+      esac
+      shared_flag='-shared'
     else
-    	$2
-	AC_MSG_RESULT([non found])
+      # not using gcc
+      if test "$host_cpu" = ia64; then
+	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	# chokes on -Wl,-G. The following line is correct:
+	shared_flag='-G'
+      else
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag='${wl}-G'
+	else
+	  shared_flag='${wl}-bM:SRE'
+	fi
+      fi
     fi
-])
 
+    # It seems that -bexpall does not export symbols beginning with
+    # underscore (_), so it is better to generate a list of symbols to export.
+    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+    if test "$aix_use_runtimelinking" = yes; then
+      # Warning - without using the other runtime loading flags (-brtl),
+      # -berok will link without error, but may produce a broken library.
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
+      # 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:'"$aix_libpath"
 
-AC_DEFUN(KDE_CREATE_SUBDIRSLIST,
-[
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+     else
+      if test "$host_cpu" = ia64; then
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+      else
+	# 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:'"$aix_libpath"
+	# Warning - without using the other run time loading flags,
+	# -berok will link without error, but may produce a broken library.
+	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+	# -bexpall does not export symbols beginning with underscore (_)
+	_LT_AC_TAGVAR(always_export_symbols, $1)=yes
+	# Exported symbols can be pulled into shared objects from archives
+	_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)="\$CC $shared_flag"' -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'
+      fi
+    fi
+    ;;
+  chorus*)
+    case $cc_basename in
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
 
-DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
 
-if test ! -s $srcdir/subdirs; then
-  dnl Note: Makefile.common creates subdirs, so this is just a fallback
-  TOPSUBDIRS=""
-  files=`cd $srcdir && ls -1`
-  dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
-  for i in $dirs; do
-    echo $i >> $srcdir/subdirs
-  done
-fi
+  cygwin* | mingw* | pw32*)
+    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+    # as there is no search path for DLLs.
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+    _LT_AC_TAGVAR(always_export_symbols, $1)=no
+    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
-if test -s $srcdir/inst-apps; then
-  ac_topsubdirs="`cat $srcdir/inst-apps`"
-else
-  ac_topsubdirs="`cat $srcdir/subdirs`"
-fi
+    if $LD --help 2>&1 | grep 'auto-import' > /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'
+      # 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 "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	cp $export_symbols $output_objdir/$soname.def;
+      else
+	echo EXPORTS > $output_objdir/$soname.def;
+	cat $export_symbols >> $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'
+    else
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    fi
+  ;;
+      darwin* | rhapsody*)
+        case "$host_os" in
+        rhapsody* | darwin1.[[012]])
+         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         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_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
-for i in $ac_topsubdirs; do
-  AC_MSG_CHECKING([if $i should be compiled])
-  if test -d $srcdir/$i; then
-    install_it="yes"
-    for j in $DO_NOT_COMPILE; do
-      if test $i = $j; then
-        install_it="no"
+    if test "$GXX" = yes ; then
+      lt_int_apple_cc_single_mod=no
+      output_verbose_link_cmd='echo'
+      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
+       lt_int_apple_cc_single_mod=yes
       fi
-    done
-  else
-    install_it="no"
-  fi
-  AC_MSG_RESULT($install_it)
-  vari=`echo $i | sed -e 's,[[-+.]],_,g'`
-  if test $install_it = "yes"; then
-    TOPSUBDIRS="$TOPSUBDIRS $i"
-    eval "$vari""_SUBDIR_included=yes"
-  else
-    eval "$vari""_SUBDIR_included=no"
-  fi
-done
-
-AC_SUBST(TOPSUBDIRS)
-])
+      if test "X$lt_int_apple_cc_single_mod" = 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'
+      else
+          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -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'
+        fi
+        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $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}'
+          else
+            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -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}'
+          fi
+            _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      else
+      case "$cc_basename" in
+        xlc*)
+         output_verbose_link_cmd='echo'
+          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # 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 "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $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(ld_shlibs, $1)=no
+          ;;
+      esac
+      fi
+        ;;
 
-AC_DEFUN(KDE_CHECK_NAMESPACES,
-[
-AC_MSG_CHECKING(whether C++ compiler supports namespaces)
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-AC_TRY_COMPILE([
-],
-[
-namespace Foo {
-  extern int i;
-  namespace Bar {
-    extern int i;
-  }
-}
+  dgux*)
+    case $cc_basename in
+      ec++)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      ghcx)
+	# Green Hills C++ Compiler
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  freebsd[12]*)
+    # C++ shared libraries reported to be fairly broken before switch to ELF
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  freebsd-elf*)
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    ;;
+  freebsd* | kfreebsd*-gnu)
+    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+    # conventions
+    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+    ;;
+  gnu*)
+    ;;
+  hpux9*)
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+				# but as the default
+				# location of the library.
 
-int Foo::i = 0;
-int Foo::Bar::i = 1;
-],[
-  AC_MSG_RESULT(yes)
-  AC_DEFINE(HAVE_NAMESPACES)
-], [
-AC_MSG_RESULT(no)
-])
-AC_LANG_RESTORE
-])
-
-AC_DEFUN(KDE_CHECK_NEWLIBS,
-[
-
-])
-
-dnl ------------------------------------------------------------------------
-dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure at kde.org
-dnl ------------------------------------------------------------------------
-dnl
-AC_DEFUN(AC_CHECK_S_ISSOCK,
-[
-AC_MSG_CHECKING(for S_ISSOCK)
-AC_CACHE_VAL(ac_cv_have_s_issock,
-[
-AC_LANG_SAVE
-AC_LANG_C
-AC_TRY_LINK(
-[
-#include <sys/stat.h>
-],
-[
-struct stat buff;
-int b = S_ISSOCK( buff.st_mode );
-],
-ac_cv_have_s_issock=yes,
-ac_cv_have_s_issock=no)
-AC_LANG_RESTORE
-])
-AC_MSG_RESULT($ac_cv_have_s_issock)
-if test "$ac_cv_have_s_issock" = "yes"; then
-  AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.])
-fi
+    case $cc_basename in
+    CC)
+      # FIXME: insert proper C++ library support
+      _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'
+      # Commands to make compiler produce verbose output that lists
+      # what "hidden" libraries, object files and flags are used when
+      # linking a shared library.
+      #
+      # There doesn't appear to be a way to prevent this compiler from
+      # explicitly linking system object files so we need to strip them
+      # from the output so that they don't get included in the library
+      # dependencies.
+      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+      ;;
+    *)
+      if test "$GXX" = 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'
+      else
+        # FIXME: insert proper C++ library support
+        _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+    esac
+    ;;
+  hpux10*|hpux11*)
+    if test $with_gnu_ld = no; then
+      case "$host_cpu" in
+      hppa*64*)
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+        ;;
+      ia64*)
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+        ;;
+      *)
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+        ;;
+      esac
+    fi
+    case "$host_cpu" in
+    hppa*64*)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+    ia64*)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+					      # but as the default
+					      # location of the library.
+      ;;
+    *)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+					      # but as the default
+					      # location of the library.
+      ;;
+    esac
 
-AH_VERBATIM(_ISSOCK,
-[
-#ifndef HAVE_S_ISSOCK
-#define HAVE_S_ISSOCK
-#define S_ISSOCK(mode) (1==0)
-#endif
-])
+    case $cc_basename in
+      CC)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      aCC)
+	case "$host_cpu" in
+	hppa*64*|ia64*)
+	  _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'
+	  ;;
+	esac
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	if test "$GXX" = yes; then
+	  if test $with_gnu_ld = no; then
+	    case "$host_cpu" in
+	    ia64*|hppa*64*)
+	      _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'
+	      ;;
+	    esac
+	  fi
+	else
+	  # FIXME: insert proper C++ library support
+	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+    esac
+    ;;
+  irix5* | irix6*)
+    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 "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
 
-])
+	# Archives containing C++ object files must be created using
+	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
+	# necessary to make sure instantiated templates are included
+	# in the archive.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+	;;
+      *)
+	if test "$GXX" = yes; then
+	  if test "$with_gnu_ld" = 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 "$verstring" && 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 "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
+	  fi
+	fi
+	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+	;;
+    esac
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+    ;;
+  linux*)
+    case $cc_basename in
+      KCC)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
 
-dnl ------------------------------------------------------------------------
-dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure at kde.org
-dnl ------------------------------------------------------------------------
-dnl
-AC_DEFUN(AC_CHECK_KDEMAXPATHLEN,
-[
-AC_MSG_CHECKING(for MAXPATHLEN)
-AC_CACHE_VAL(ac_cv_maxpathlen,
-[
-AC_LANG_C
-cat > conftest.$ac_ext <<EOF
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-#endif
-#include <stdio.h>
-#include <sys/param.h>
-#ifndef MAXPATHLEN
-#define MAXPATHLEN 1024
-#endif
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" 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 "s/\${tempext}\..*/.so/"`; $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 "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
-KDE_HELLO MAXPATHLEN
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
-EOF
+	# Archives containing C++ object files must be created using
+	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+	;;
+      icpc)
+	# Intel C++
+	with_gnu_ld=yes
+	# version 8.0 and above of icpc choke on multiply defined symbols
+	# if we add $predep_objects and $postdep_objects, however 7.1 and
+	# earlier do not add the objects themselves.
+	case `$CC -V 2>&1` in
+	*"Version 7."*)
+  	  _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'
+	  ;;
+	*)  # Version 8.0 or newer
+  	  _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'
+	  ;;
+	esac
+	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+	_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'
 
-ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out"
+	runpath_var=LD_RUN_PATH
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
-if AC_TRY_EVAL(ac_try) && test -s conftest.out; then
-    ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out`
-else
-    ac_cv_maxpathlen=1024
-fi
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+    esac
+    ;;
+  lynxos*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  m88k*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  mvs*)
+    case $cc_basename in
+      cxx)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  netbsd*)
+    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+      wlarc=
+      _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
+    fi
+    # Workaround some broken pre-1.5 toolchains
+    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+    ;;
+  openbsd2*)
+    # C++ shared libraries are fairly broken
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  openbsd*)
+    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    fi
+    output_verbose_link_cmd='echo'
+    ;;
+  osf3*)
+    case $cc_basename in
+      KCC)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
 
-rm conftest.*
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" 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 "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
-])
-AC_MSG_RESULT($ac_cv_maxpathlen)
-AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] )
-])
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
-dnl -------------------------------------------------------------------------
-dnl See if the compiler supports a template repository         bero at redhat.de
-dnl -------------------------------------------------------------------------
-AC_DEFUN(KDE_COMPILER_REPO,
-[
-  REPO=""
-  NOREPO=""
-
-  KDE_CHECK_COMPILER_FLAG(frepo,
-   [
-     REPO="-frepo"
-     NOREPO="-fno-repo"
-   ])
-
-  if test -z "$REPO"; then
-  KDE_CHECK_COMPILER_FLAG(instances=explicit,
-  [
-     REPO="-instances=explicit"
-     NOREPO="-instances=extern"
-  ])
-  fi
+	# Archives containing C++ object files must be created using
+	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
 
-  if test -n "$REPO"; then
-     AC_DEFINE_UNQUOTED(HAVE_TEMPLATE_REPOSITORY, 1,
-		[C++ compiler supports template repository])
-     $1
-  fi
+	;;
+      RCC)
+	# Rational C++ 2.4.1
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      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 "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
 
-  AC_SUBST(REPO)
-  AC_SUBST(NOREPO)
-])
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
-AC_DEFUN(KDE_CHECK_HEADER,
-[
-   AC_LANG_SAVE
-   kde_safe_cppflags=$CPPFLAGS
-   CPPFLAGS="$CPPFLAGS $all_includes"
-   AC_LANG_CPLUSPLUS
-   AC_CHECK_HEADER($1, $2, $3, $4)
-   CPPFLAGS=$kde_safe_cppflags
-   AC_LANG_RESTORE
-])
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	if test "$GXX" = yes && test "$with_gnu_ld" = 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 "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
 
-AC_DEFUN(KDE_CHECK_HEADERS,
-[
-   AH_CHECK_HEADERS([$1])
-   AC_LANG_SAVE
-   kde_safe_cppflags=$CPPFLAGS
-   CPPFLAGS="$CPPFLAGS $all_includes"
-   AC_LANG_CPLUSPLUS
-   AC_CHECK_HEADERS([$1], [$2], [$3], [$4])
-   CPPFLAGS=$kde_safe_cppflags
-   AC_LANG_RESTORE
-])
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
-AC_DEFUN(KDE_FAST_CONFIGURE,
-[
-  dnl makes configure fast (needs perl)
-  AC_ARG_ENABLE(fast-perl, [  --disable-fast-perl     disable fast Makefile generation (needs perl)],
-      with_fast_perl=$enableval, with_fast_perl=yes)
-])
+	  # Commands to make compiler produce verbose output that lists
+	  # what "hidden" libraries, object files and flags are used when
+	  # linking a shared library.
+	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
 
-AC_DEFUN(KDE_CONF_FILES,
-[
-  val=
-  if test -f $srcdir/configure.files ; then
-    val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files`
-  fi
-  CONF_FILES=
-  if test -n "$val" ; then
-    for i in $val ; do
-      CONF_FILES="$CONF_FILES $i"
-    done
-  fi
-  AC_SUBST(CONF_FILES)
-])dnl
+	else
+	  # FIXME: insert proper C++ library support
+	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+    esac
+    ;;
+  osf4* | osf5*)
+    case $cc_basename in
+      KCC)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
 
-AC_DEFUN(KDE_SET_PREFIX,
-[
-  unset CDPATH
-  dnl make $KDEDIR the default for the installation
-  AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" 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 "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
-  if test "x$prefix" = "xNONE"; then
-    prefix=$ac_default_prefix
-    ac_configure_args="$ac_configure_args --prefix=$prefix"
-  fi
-  # And delete superflous '/' to make compares easier
-  prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
-  exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
-  KDE_FAST_CONFIGURE
-  KDE_CONF_FILES
-])
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
-pushdef([AC_PROG_INSTALL],
-[
-  dnl our own version, testing for a -p flag
-  popdef([AC_PROG_INSTALL])
-  dnl as AC_PROG_INSTALL works as it works we first have
-  dnl to save if the user didn't specify INSTALL, as the
-  dnl autoconf one overwrites INSTALL and we have no chance to find
-  dnl out afterwards
-  test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
-  test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
-  test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
-  AC_PROG_INSTALL
-
-  if test -z "$kde_save_INSTALL_given" ; then
-    # OK, user hasn't given any INSTALL, autoconf found one for us
-    # now we test, if it supports the -p flag
-    AC_MSG_CHECKING(for -p flag to install)
-    rm -f confinst.$$.* > /dev/null 2>&1
-    echo "Testtest" > confinst.$$.orig
-    ac_res=no
-    if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
-      if test -f confinst.$$.new ; then
-        # OK, -p seems to do no harm to install
-	INSTALL="${INSTALL} -p"
-	ac_res=yes
-      fi
-    fi
-    rm -f confinst.$$.*
-    AC_MSG_RESULT($ac_res)
-  fi
-  dnl the following tries to resolve some signs and wonders coming up
-  dnl with different autoconf/automake versions
-  dnl e.g.:
-  dnl  *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s
-  dnl   and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS)
-  dnl   it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s
-  dnl  *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has
-  dnl   INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the
-  dnl   install- at DIR@PROGRAMS targets to explicitly use that flag
-  dnl  *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as
-  dnl   INSTALL_SCRIPT, which breaks with automake <= 1.4
-  dnl  *autoconf >2.13 (since 10.Apr 1999) has not that failure
-  dnl  *sometimes KDE does not use the install- at DIR@PROGRAM targets from
-  dnl   automake (due to broken Makefile.am or whatever) to install programs,
-  dnl   and so does not see the -s flag in automake > 1.4
-  dnl to clean up that mess we:
-  dnl  +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG
-  dnl   which cleans KDE's program with automake > 1.4;
-  dnl  +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems
-  dnl   with automake<=1.4
-  dnl  note that dues to this sometimes two '-s' flags are used (if KDE
-  dnl   properly uses install- at DIR@PROGRAMS, but I don't care
-  dnl
-  dnl And to all this comes, that I even can't write in comments variable
-  dnl  names used by automake, because it is so stupid to think I wanted to
-  dnl  _use_ them, therefor I have written A_M_... instead of AM_
-  dnl hmm, I wanted to say something ... ahh yes: Arghhh.
-
-  if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
-    INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
-  fi
-  if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
-    INSTALL_SCRIPT='${INSTALL}'
-  fi
-])dnl
+	# Archives containing C++ object files must be created using
+	# the KAI C++ compiler.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
+	;;
+      RCC)
+	# Rational C++ 2.4.1
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      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 "$verstring" && 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 "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+	  echo "-hidden">> $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 "$verstring" && echo -set_version	$verstring` -update_registry $objdir/so_locations -o $lib~
+	  $rm $lib.exp'
 
-AC_DEFUN(KDE_LANG_CPLUSPLUS,
-[AC_LANG_CPLUSPLUS
-ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
-pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS])
-])
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
-pushdef([AC_LANG_CPLUSPLUS],
-[popdef([AC_LANG_CPLUSPLUS])
-KDE_LANG_CPLUSPLUS
-])
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	if test "$GXX" = yes && test "$with_gnu_ld" = 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 "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
 
-AC_DEFUN(KDE_CHECK_LONG_LONG,
-[
-AC_MSG_CHECKING(for long long)
-AC_CACHE_VAL(kde_cv_c_long_long,
-[
-  AC_LANG_SAVE
-  AC_LANG_CPLUSPLUS
-  AC_TRY_LINK([], [
-  long long foo = 0;
-  foo = foo+1;
-  ],
-  kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
-  AC_LANG_RESTORE
-])
-AC_MSG_RESULT($kde_cv_c_long_long)
-if test "$kde_cv_c_long_long" = yes; then
-   AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype])
-fi
-])
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
-AC_DEFUN(KDE_CHECK_LIB,
-[
-     kde_save_LDFLAGS="$LDFLAGS"
-     dnl AC_CHECK_LIB modifies LIBS, so save it here
-     kde_save_LIBS="$LIBS"
-     LDFLAGS="$LDFLAGS $all_libraries"
-     case $host_os in
-      aix*) LDFLAGS="-brtl $LDFLAGS"
-	test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS"
+	  # Commands to make compiler produce verbose output that lists
+	  # what "hidden" libraries, object files and flags are used when
+	  # linking a shared library.
+	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+	else
+	  # FIXME: insert proper C++ library support
+	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
+	fi
 	;;
-     esac
-     AC_CHECK_LIB($1, $2, $3, $4, $5)
-     LDFLAGS="$kde_save_LDFLAGS"
-     LIBS="$kde_save_LIBS"
-])
+    esac
+    ;;
+  psos*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  sco*)
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    case $cc_basename in
+      CC)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  sunos4*)
+    case $cc_basename in
+      CC)
+	# Sun C++ 4.x
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      lcc)
+	# Lucid
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  solaris*)
+    case $cc_basename 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_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $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'
 
-AC_DEFUN(KDE_JAVA_PREFIX,
-[
-	dir=`dirname "$1"`
-	base=`basename "$1"`
-	list=`ls -1 $dir 2> /dev/null`
-	for entry in $list; do 
-		if test -d $dir/$entry/bin; then
-			case $entry in
-			   $base)
-				javadirs="$javadirs $dir/$entry/bin"
-				;;
-			esac
-		elif test -d $dir/$entry/jre/bin; then
-			case $entry in
-			   $base)
-				javadirs="$javadirs $dir/$entry/jre/bin"
-				;;
-			esac
-		fi
-	done
-])
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+	case $host_os in
+	  solaris2.[0-5] | solaris2.[0-5].*) ;;
+	  *)
+	    # The C++ compiler is used as linker so we must use $wl
+	    # flag to pass the commands to the underlying system
+	    # linker.
+	    # Supported since Solaris 2.6 (maybe 2.5.1?)
+	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	    ;;
+	esac
+	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
-dnl KDE_CHEC_JAVA_DIR(onlyjre)
-AC_DEFUN(KDE_CHECK_JAVA_DIR,
-[
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
-AC_ARG_WITH(java,
-[  --with-java=javadir     use java installed in javadir, --without-java disables ],
-[  ac_java_dir=$withval
-], ac_java_dir=""
-)
+	# Archives containing C++ object files must be created using
+	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	# necessary to make sure instantiated templates are included
+	# in the archive.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+	;;
+      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'
 
-AC_MSG_CHECKING([for Java])
+	# The C++ compiler must be used to create the archive.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+	;;
+      *)
+	# GNU C++ compiler with Solaris linker
+	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+	  if $CC --version | grep -v '^2\.7' > /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_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
-dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
-if test "x$ac_java_dir" = "xno"; then
-   kde_java_bindir=no
-   kde_java_includedir=no
-   kde_java_libjvmdir=no
-   kde_java_libhpidir=no
-else
-  if test "x$ac_java_dir" = "x"; then
-     
-     
-      dnl No option set -> look in $PATH
-      KDE_JAVA_PREFIX(/usr/j2se)
-      KDE_JAVA_PREFIX(/usr/j*dk*)
-      KDE_JAVA_PREFIX(/usr/lib/j*dk*)
-      KDE_JAVA_PREFIX(/opt/j*sdk*)
-      KDE_JAVA_PREFIX(/usr/lib/java*)
-      KDE_JAVA_PREFIX(/usr/java*)
-      KDE_JAVA_PREFIX(/usr/java/j*dk*)
-      KDE_JAVA_PREFIX(/usr/java/j*re*)
-      KDE_JAVA_PREFIX(/usr/lib/SunJava2*)
-      KDE_JAVA_PREFIX(/usr/lib/SunJava*)
-      KDE_JAVA_PREFIX(/usr/lib/IBMJava2*)
-      KDE_JAVA_PREFIX(/usr/lib/IBMJava*)
-      KDE_JAVA_PREFIX(/opt/java*)
-    
-      kde_cv_path="NONE"
-      kde_save_IFS=$IFS
-      IFS=':'
-      for dir in $PATH; do
-	  javadirs="$javadirs $dir"
-      done
-      IFS=$kde_save_IFS
-      jredirs=
-
-      for dir in $javadirs; do
-	  if test ! -d $dir; then break; fi
-          if test -x "$dir/java"; then
-                libjvmdir=`find $dir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
-		if test ! -f $libjvmdir/libjvm.so; then continue; fi
-		jredirs="$jredirs $dir"
-	  fi
-      done
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+	  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_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
-      JAVAC=
-      JAVA=
-      kde_java_bindir=no
-      for dir in $jredirs; do
-	  JAVA="$dir/java"
-	  kde_java_bindir=$dir
-	  if test -x "$dir/javac"; then
-		JAVAC="$dir/javac"
-                break
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
 	  fi
-      done
-
-      if test -n "$JAVAC"; then
-          dnl this substitution might not work - well, we test for jni.h below
-          kde_java_includedir=`echo $JAVAC | sed -e 's,bin/javac$,include/,'`
-      else
-          kde_java_includedir=no
-      fi
-  else
-    dnl config option set
-    kde_java_bindir=$ac_java_dir/bin
-    if test -x $ac_java_dir/bin/java && test ! -x $ac_java_dir/bin/javac; then
-	kde_java_includedir=no
-    else
-        kde_java_includedir=$ac_java_dir/include
-    fi
-  fi
-fi
 
-dnl At this point kde_java_bindir and kde_java_includedir are either set or "no"
-if test "x$kde_java_bindir" != "xno"; then
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+	fi
+	;;
+    esac
+    ;;
+  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    ;;
+  tandem*)
+    case $cc_basename in
+      NCC)
+	# NonStop-UX NCC 3.20
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  vxworks*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  *)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+esac
+AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
-  dnl Look for libjvm.so
-  kde_java_libjvmdir=`find $kde_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
-  dnl Look for libhpi.so and avoid green threads
-  kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,' | head -n 1`
+_LT_AC_TAGVAR(GCC, $1)="$GXX"
+_LT_AC_TAGVAR(LD, $1)="$LD"
 
-  dnl Now check everything's fine under there
-  dnl the include dir is our flag for having the JDK
-  if test -d "$kde_java_includedir"; then
-    if test ! -x "$kde_java_bindir/javac"; then
-      AC_MSG_ERROR([javac not found under $kde_java_bindir - it seems you passed a wrong --with-java.])
-    fi
-    if test ! -x "$kde_java_bindir/javah"; then
-      AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
-    fi
-    if test ! -x "$kde_java_bindir/jar"; then
-      AC_MSG_ERROR([jar not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
-    fi
-    if test ! -r "$kde_java_includedir/jni.h"; then
-      AC_MSG_ERROR([jni.h not found under $kde_java_includedir. Use --with-java or --without-java.])
-    fi
+AC_LIBTOOL_POSTDEP_PREDEP($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+AC_LIBTOOL_DLOPEN_SELF($1)
 
-    jni_includes="-I$kde_java_includedir"
-    dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
-    dnl and under linux here..
-    test -d "$kde_java_includedir/linux" && jni_includes="$jni_includes -I$kde_java_includedir/linux"
-    test -d "$kde_java_includedir/solaris" && jni_includes="$jni_includes -I$kde_java_includedir/solaris"
-    test -d "$kde_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_java_includedir/genunix"
+AC_LIBTOOL_CONFIG($1)
 
-  else
-    JAVAC=
-    jni_includes=
-  fi
+AC_LANG_POP
+CC=$lt_save_CC
+LDCXX=$LD
+LD=$lt_save_LD
+GCC=$lt_save_GCC
+with_gnu_ldcxx=$with_gnu_ld
+with_gnu_ld=$lt_save_with_gnu_ld
+lt_cv_path_LDCXX=$lt_cv_path_LD
+lt_cv_path_LD=$lt_save_path_LD
+lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+])# AC_LIBTOOL_LANG_CXX_CONFIG
 
-  if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
-     AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
-  fi 
+# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
+# ------------------------
+# Figure out "hidden" library dependencies from verbose
+# compiler output when linking a shared library.
+# Parse the compiler output and extract the necessary
+# objects, libraries and library flags.
+AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
+dnl we can't use the lt_simple_compile_test_code here,
+dnl because it contains code intended for an executable,
+dnl not a library.  It's possible we should let each
+dnl tag define a new lt_????_link_test_code variable,
+dnl but it's only used here...
+ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
+int a;
+void foo (void) { a = 0; }
+EOF
+],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
+class Foo
+{
+public:
+  Foo (void) { a = 0; }
+private:
+  int a;
+};
+EOF
+],[$1],[F77],[cat > conftest.$ac_ext <<EOF
+      subroutine foo
+      implicit none
+      integer*4 a
+      a=0
+      return
+      end
+EOF
+],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
+public class foo {
+  private int a;
+  public void bar (void) {
+    a = 0;
+  }
+};
+EOF
+])
+dnl Parse the compiler output and extract the necessary
+dnl objects, libraries and library flags.
+if AC_TRY_EVAL(ac_compile); then
+  # Parse the compiler output and extract the necessary
+  # objects, libraries and library flags.
 
-  if test ! -x "$kde_java_bindir/java"; then
-      AC_MSG_ERROR([java not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
-  fi
+  # Sentinel used to keep track of whether or not we are before
+  # the conftest object file.
+  pre_test_object_deps_done=no
 
-  if test ! -r "$kde_java_libhpidir/libhpi.so"; then
-    AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
-  fi
+  # The `*' in the case matches for architectures that use `case' in
+  # $output_verbose_cmd can trigger glob expansion during the loop
+  # eval without this substitution.
+  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
 
-  if test -n "$jni_includes"; then
-    dnl Check for JNI version
-    AC_LANG_SAVE
-    AC_LANG_CPLUSPLUS
-    ac_cxxflags_safe="$CXXFLAGS"
-    CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
-
-    AC_TRY_COMPILE([
-  #include <jni.h>
-	      ],
-	      [
-  #ifndef JNI_VERSION_1_2
-  Syntax Error
-  #endif
-	      ],[ kde_jni_works=yes ],
-	      [ kde_jni_works=no ])
-
-    if test $kde_jni_works = no; then
-      AC_MSG_ERROR([Incorrect version of $kde_java_includedir/jni.h.
-		    You need to have Java Development Kit (JDK) version 1.2. 
-
-		    Use --with-java to specify another location.
-		    Use --without-java to configure without java support.
-		    Or download a newer JDK and try again. 
-		    See e.g. http://java.sun.com/products/jdk/1.2 ])
-    fi
+  for p in `eval $output_verbose_link_cmd`; do
+    case $p in
 
-    CXXFLAGS="$ac_cxxflags_safe"    
-    AC_LANG_RESTORE
+    -L* | -R* | -l*)
+       # Some compilers place space between "-{L,R}" and the path.
+       # Remove the space.
+       if test $p = "-L" \
+	  || test $p = "-R"; then
+	 prev=$p
+	 continue
+       else
+	 prev=
+       fi
 
-    dnl All tests ok, inform and subst the variables
+       if test "$pre_test_object_deps_done" = no; then
+	 case $p in
+	 -L* | -R*)
+	   # Internal compiler library paths should come after those
+	   # provided the user.  The postdeps already come after the
+	   # user supplied libs so there is no need to process them.
+	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
+	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+	   else
+	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+	   fi
+	   ;;
+	 # The "-l" case would never come before the object being
+	 # linked, so don't bother handling this case.
+	 esac
+       else
+	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
+	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
+	 else
+	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
+	 fi
+       fi
+       ;;
 
-    JAVAC=$kde_java_bindir/javac
-    JAVAH=$kde_java_bindir/javah
-    JAR=$kde_java_bindir/jar
-    AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
-    JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
-    AC_MSG_RESULT([java JDK in $kde_java_bindir])
+    *.$objext)
+       # This assumes that the test object file only shows up
+       # once in the compiler output.
+       if test "$p" = "conftest.$objext"; then
+	 pre_test_object_deps_done=yes
+	 continue
+       fi
 
-  else
-      AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
-      AC_MSG_RESULT([java JRE in $kde_java_bindir])
-  fi
-else # no
-  AC_MSG_RESULT([none found])
-fi
+       if test "$pre_test_object_deps_done" = no; then
+	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
+	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
+	 else
+	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
+	 fi
+       else
+	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
+	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
+	 else
+	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
+	 fi
+       fi
+       ;;
 
-AC_SUBST(JAVAC)
-AC_SUBST(JAVAH)
-AC_SUBST(JAR)
-AC_SUBST(JVMLIBS)
-AC_SUBST(jni_includes)
+    *) ;; # Ignore the rest.
 
-# for backward compat
-kde_cv_java_includedir=$kde_java_includedir
-kde_cv_java_bindir=$kde_java_bindir
-])
+    esac
+  done
 
-dnl this is a redefinition of autoconf 2.5x's AC_FOREACH.
-dnl When the argument list becomes big, as in KDE for AC_OUTPUT in
-dnl big packages, m4_foreach is dog-slow.  So use our own version of
-dnl it.  (matz at kde.org)
-m4_define([mm_foreach],
-[m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])])
-m4_define([mm_car], [[$1]])
-m4_define([mm_car2], [[$@]])
-m4_define([_mm_foreach],
-[m4_if(m4_quote($2), [], [],
-       [m4_define([$1], [mm_car($2)])$3[]_mm_foreach([$1],
-                                                     mm_car2(m4_shift($2)),
-                                                     [$3])])])
-m4_define([AC_FOREACH],
-[mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
-
-AC_DEFUN(KDE_NEED_FLEX,
-[
-kde_libs_safe=$LIBS
-LIBS="$LIBS $USER_LDFLAGS"
-AM_PROG_LEX
-LIBS=$kde_libs_safe
-if test -z "$LEXLIB"; then
-    AC_MSG_ERROR([You need to have flex installed.])
+  # Clean up.
+  rm -f a.out a.exe
+else
+  echo "libtool.m4: error: problem compiling $1 test program"
 fi
-AC_SUBST(LEXLIB)
-])
-
-AC_DEFUN(AC_PATH_QTOPIA,
-[
-  dnl TODO: use AC_CACHE_VAL
-
-  if test -z "$1"; then
-    qtopia_minver_maj=1
-    qtopia_minver_min=5
-    qtopia_minver_pat=0
-  else
-    qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
-    qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
-    qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
-  fi
-
-  qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
-  qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
-
-  AC_REQUIRE([AC_PATH_QT])
-
-  AC_MSG_CHECKING([for Qtopia])
 
-  LIB_QTOPIA="-lqpe"
-  AC_SUBST(LIB_QTOPIA)
-
-  kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
-
-  ac_qtopia_incdir=NO
+$rm -f confest.$objext
 
-  AC_ARG_WITH(qtopia-dir,
-              [  --with-qtopia-dir=DIR   where the root of Qtopia is installed ],
-              [  ac_qtopia_incdir="$withval"/include] ) 
-  
-  qtopia_incdirs=""
-  for dir in $kde_qtopia_dirs; do
-    qtopia_incdirs="$qtopia_incdirs $dir/include"
-  done
+case " $_LT_AC_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+])# AC_LIBTOOL_POSTDEP_PREDEP
 
-  if test ! "$ac_qtopia_incdir" = "NO"; then
-    qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
-  fi
+# AC_LIBTOOL_LANG_F77_CONFIG
+# ------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
+AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
+[AC_REQUIRE([AC_PROG_F77])
+AC_LANG_PUSH(Fortran 77)
 
-  qtopia_incdir=""
-  AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
-  ac_qtopia_incdir="$qtopia_incdir"
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_AC_TAGVAR(allow_undefined_flag, $1)=
+_LT_AC_TAGVAR(always_export_symbols, $1)=no
+_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_direct, $1)=no
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+_LT_AC_TAGVAR(hardcode_automatic, $1)=no
+_LT_AC_TAGVAR(module_cmds, $1)=
+_LT_AC_TAGVAR(module_expsym_cmds, $1)=
+_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_AC_TAGVAR(no_undefined_flag, $1)=
+_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
-  if test -z "$qtopia_incdir"; then
-    AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
-  fi
+# Source file extension for f77 test sources.
+ac_ext=f
 
-  qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
-  qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
-  qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
+# Object file extension for compiled f77 test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
 
-  qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
-  qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
-  if test "$qtopia_ver" -lt "$qtopia_minver"; then
-    AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
-is required.])
-  fi
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
 
-  AC_LANG_SAVE
-  AC_LANG_CPLUSPLUS
+# Code to be used in simple link tests
+lt_simple_link_test_code="      program t\n      end\n"
 
-  ac_cxxflags_safe="$CXXFLAGS"
-  ac_ldflags_safe="$LDFLAGS"
-  ac_libs_safe="$LIBS"
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
 
-  CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
-  LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
-  LIBS="$LIBS $LIB_QTOPIA $LIBQT"
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${F77-"f77"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
 
-  cat > conftest.$ac_ext <<EOF
-#include "confdefs.h"
-#include <qpe/qpeapplication.h>
-#include <qpe/version.h>
+AC_MSG_CHECKING([if libtool supports shared libraries])
+AC_MSG_RESULT([$can_build_shared])
 
-int main( int argc, char **argv )
-{
-    QPEApplication app( argc, argv );
-    return 0;
-}
-EOF
+AC_MSG_CHECKING([whether to build shared libraries])
+test "$can_build_shared" = "no" && enable_shared=no
 
-  if AC_TRY_EVAL(ac_link) && test -s conftest; then
-    rm -f conftest*
-  else
-    rm -f conftest*
-    AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
-the end of config.log])
+# On AIX, shared libraries and static libraries use the same namespace, and
+# are all built from PIC.
+case "$host_os" in
+aix3*)
+  test "$enable_shared" = yes && enable_static=no
+  if test -n "$RANLIB"; then
+    archive_cmds="$archive_cmds~\$RANLIB \$lib"
+    postinstall_cmds='$RANLIB $lib'
   fi
+  ;;
+aix4* | aix5*)
+  test "$enable_shared" = yes && enable_static=no
+  ;;
+esac
+AC_MSG_RESULT([$enable_shared])
 
-  CXXFLAGS="$ac_cxxflags_safe"
-  LDFLAGS="$ac_ldflags_safe"
-  LIBS="$ac_libs_safe"
+AC_MSG_CHECKING([whether to build static libraries])
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+AC_MSG_RESULT([$enable_static])
 
-  AC_LANG_RESTORE
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
-  QTOPIA_INCLUDES="-I$qtopia_incdir"
-  AC_SUBST(QTOPIA_INCLUDES)
+_LT_AC_TAGVAR(GCC, $1)="$G77"
+_LT_AC_TAGVAR(LD, $1)="$LD"
 
-  AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
-])
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
 
 
-AC_DEFUN(KDE_INIT_DOXYGEN,
-[
-AC_MSG_CHECKING([for Qt docs])
-kde_qtdir=
-if test "${with_qt_dir+set}" = set; then
-  kde_qtdir="$with_qt_dir"
-fi
+AC_LIBTOOL_CONFIG($1)
 
-AC_FIND_FILE(qsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html ], QTDOCDIR)
-AC_MSG_RESULT($QTDOCDIR)
+AC_LANG_POP
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_F77_CONFIG
 
-AC_SUBST(QTDOCDIR)
 
-KDE_FIND_PATH(dot, DOT, [], [])
-if test -n "$DOT"; then
-  KDE_HAVE_DOT="YES"
-else
-  KDE_HAVE_DOT="NO"
-fi
-AC_SUBST(KDE_HAVE_DOT)
-KDE_FIND_PATH(doxygen, DOXYGEN, [], [])
-AC_SUBST(DOXYGEN)
-
-DOXYGEN_PROJECT_NAME="$1"
-DOXYGEN_PROJECT_NUMBER="$2"
-AC_SUBST(DOXYGEN_PROJECT_NAME)
-AC_SUBST(DOXYGEN_PROJECT_NUMBER)
-
-KDE_HAS_DOXYGEN=no
-if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
-  KDE_HAS_DOXYGEN=yes
-fi
-AC_SUBST(KDE_HAS_DOXYGEN)
+# AC_LIBTOOL_LANG_GCJ_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
+AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
+[AC_LANG_SAVE
 
-])
+# Source file extension for Java test sources.
+ac_ext=java
 
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
 
-AC_DEFUN(AC_FIND_BZIP2,
-[
-AC_MSG_CHECKING([for bzDecompress in libbz2])
-AC_CACHE_VAL(ac_cv_lib_bzip2,
-[
-AC_LANG_C
-kde_save_LIBS="$LIBS"
-LIBS="$all_libraries $USER_LDFLAGS -lbz2 $LIBSOCKET"
-kde_save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
-AC_TRY_LINK(dnl
-[
-#define BZ_NO_STDIO
-#include<bzlib.h>
-],
-            [ bz_stream s; (void) bzDecompress(&s); ],
-            eval "ac_cv_lib_bzip2='-lbz2'",
-            eval "ac_cv_lib_bzip2=no")
-LIBS="$kde_save_LIBS"
-CFLAGS="$kde_save_CFLAGS"
-])dnl
-AC_MSG_RESULT($ac_cv_lib_bzip2)
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}\n"
 
-if test ! "$ac_cv_lib_bzip2" = no; then
-  BZIP2DIR=bzip2
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
 
-  LIBBZ2="$ac_cv_lib_bzip2"
-  AC_SUBST(LIBBZ2)
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
 
-else
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${GCJ-"gcj"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
 
-   cxx_shared_flag=
-   ld_shared_flag=
-   KDE_CHECK_COMPILER_FLAG(shared, [
-	ld_shared_flag="-shared"
-   ])
-   KDE_CHECK_COMPILER_FLAG(fPIC, [
-        cxx_shared_flag="-fPIC"
-   ])
-
-   AC_MSG_CHECKING([for BZ2_bzDecompress in (shared) libbz2])
-   AC_CACHE_VAL(ac_cv_lib_bzip2_prefix,
-   [
-   AC_LANG_CPLUSPLUS
-   kde_save_LIBS="$LIBS"
-   LIBS="$all_libraries $USER_LDFLAGS $ld_shared_flag -lbz2 $LIBSOCKET"
-   kde_save_CXXFLAGS="$CXXFLAGS"
-   CXXFLAGS="$CFLAGS $cxx_shared_flag $all_includes $USER_INCLUDES"
-
-   AC_TRY_LINK(dnl
-   [
-   #define BZ_NO_STDIO
-   #include<bzlib.h>
-   ],
-               [ bz_stream s; (void) BZ2_bzDecompress(&s); ],
-               eval "ac_cv_lib_bzip2_prefix='-lbz2'",
-               eval "ac_cv_lib_bzip2_prefix=no")
-   LIBS="$kde_save_LIBS"
-   CXXFLAGS="$kde_save_CXXFLAGS"
-   ])dnl
-
-   AC_MSG_RESULT($ac_cv_lib_bzip2_prefix)
-   
-
-
-   if test ! "$ac_cv_lib_bzip2_prefix" = no; then
-     BZIP2DIR=bzip2
-    
-     LIBBZ2="$ac_cv_lib_bzip2_prefix"
-     AC_SUBST(LIBBZ2)
-
-     AC_DEFINE(NEED_BZ2_PREFIX, 1, [Define if the libbz2 functions need the BZ2_ prefix])
-   dnl else, we just ignore this
-   fi
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
-fi
-AM_CONDITIONAL(include_BZIP2, test -n "$BZIP2DIR")
-])
+AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+AC_LIBTOOL_DLOPEN_SELF($1)
 
-dnl ------------------------------------------------------------------------
-dnl Try to find the SSL headers and libraries.
-dnl $(SSL_LDFLAGS) will be -Lsslliblocation (if needed)
-dnl and $(SSL_INCLUDES) will be -Isslhdrlocation (if needed)
-dnl ------------------------------------------------------------------------
-dnl
-AC_DEFUN(KDE_CHECK_SSL,
-[
-LIBSSL="-lssl -lcrypto"
-AC_REQUIRE([KDE_CHECK_LIB64])
-
-ac_ssl_includes=NO ac_ssl_libraries=NO
-ssl_libraries=""
-ssl_includes=""
-AC_ARG_WITH(ssl-dir,
-    [  --with-ssl-dir=DIR      where the root of OpenSSL is installed],
-    [  ac_ssl_includes="$withval"/include
-       ac_ssl_libraries="$withval"/lib$kdelibsuff
-    ])
+AC_LIBTOOL_CONFIG($1)
 
-want_ssl=yes
-AC_ARG_WITH(ssl,
-    [  --without-ssl           disable SSL checks],
-    [want_ssl=$withval])
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_GCJ_CONFIG
 
-if test $want_ssl = yes; then
 
-AC_MSG_CHECKING(for OpenSSL)
+# AC_LIBTOOL_LANG_RC_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the Windows resource compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
+AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
+[AC_LANG_SAVE
 
-AC_CACHE_VAL(ac_cv_have_ssl,
-[#try to guess OpenSSL locations
-  
-  ssl_incdirs="/usr/include /usr/local/include /usr/ssl/include /usr/local/ssl/include $prefix/include $kde_extra_includes"
-  ssl_incdirs="$ac_ssl_includes $ssl_incdirs"
-  AC_FIND_FILE(openssl/ssl.h, $ssl_incdirs, ssl_incdir)
-  ac_ssl_includes="$ssl_incdir"
-
-  ssl_libdirs="/usr/lib$kdelibsuff /usr/local/lib$kdelibsuff /usr/ssl/lib$kdelibsuff /usr/local/ssl/lib$kdelibsuff $libdir $prefix/lib$kdelibsuff $exec_prefix/lib$kdelibsuff $kde_extra_libs"
-  if test ! "$ac_ssl_libraries" = "NO"; then
-    ssl_libdirs="$ac_ssl_libraries $ssl_libdirs"
-  fi
+# Source file extension for RC test sources.
+ac_ext=rc
 
-  test=NONE
-  ssl_libdir=NONE
-  for dir in $ssl_libdirs; do
-    try="ls -1 $dir/libssl*"
-    if test=`eval $try 2> /dev/null`; then ssl_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
-  done
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
 
-  ac_ssl_libraries="$ssl_libdir"
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
 
-  AC_LANG_SAVE
-  AC_LANG_C
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
 
-  ac_cflags_safe="$CFLAGS"
-  ac_ldflags_safe="$LDFLAGS"
-  ac_libs_safe="$LIBS"
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
 
-  CFLAGS="$CFLAGS -I$ssl_incdir $all_includes"
-  LDFLAGS="$LDFLAGS -L$ssl_libdir $all_libraries"
-  LIBS="$LIBS $LIBSSL -lRSAglue -lrsaref"
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${RC-"windres"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
 
-  AC_TRY_LINK(,void RSAPrivateEncrypt(void);RSAPrivateEncrypt();,
-  ac_ssl_rsaref="yes"
-  ,
-  ac_ssl_rsaref="no"
-  )
+AC_LIBTOOL_CONFIG($1)
 
-  CFLAGS="$ac_cflags_safe"
-  LDFLAGS="$ac_ldflags_safe"
-  LIBS="$ac_libs_safe"
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_RC_CONFIG
 
-  AC_LANG_RESTORE
 
-  if test "$ac_ssl_includes" = NO || test "$ac_ssl_libraries" = NO; then
-    have_ssl=no
-  else
-    have_ssl=yes;
+# AC_LIBTOOL_CONFIG([TAGNAME])
+# ----------------------------
+# If TAGNAME is not passed, then create an initial libtool script
+# with a default configuration from the untagged config vars.  Otherwise
+# add code to config.status for appending the configuration named by
+# TAGNAME from the matching tagged config vars.
+AC_DEFUN([AC_LIBTOOL_CONFIG],
+[# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
   fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    _LT_AC_TAGVAR(compiler, $1) \
+    _LT_AC_TAGVAR(CC, $1) \
+    _LT_AC_TAGVAR(LD, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
+    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
+    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
+    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
+    _LT_AC_TAGVAR(old_archive_cmds, $1) \
+    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
+    _LT_AC_TAGVAR(predep_objects, $1) \
+    _LT_AC_TAGVAR(postdep_objects, $1) \
+    _LT_AC_TAGVAR(predeps, $1) \
+    _LT_AC_TAGVAR(postdeps, $1) \
+    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
+    _LT_AC_TAGVAR(archive_cmds, $1) \
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
+    _LT_AC_TAGVAR(postinstall_cmds, $1) \
+    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
+    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
+    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
+    _LT_AC_TAGVAR(no_undefined_flag, $1) \
+    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
+    _LT_AC_TAGVAR(hardcode_automatic, $1) \
+    _LT_AC_TAGVAR(module_cmds, $1) \
+    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
+    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
+    _LT_AC_TAGVAR(exclude_expsyms, $1) \
+    _LT_AC_TAGVAR(include_expsyms, $1); do
 
-  ])
-
-  eval "$ac_cv_have_ssl"
-
-  AC_MSG_RESULT([libraries $ac_ssl_libraries, headers $ac_ssl_includes])
+    case $var in
+    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
+    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
+    _LT_AC_TAGVAR(archive_cmds, $1) | \
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
+    _LT_AC_TAGVAR(module_cmds, $1) | \
+    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
+    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
+    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
 
-  AC_MSG_CHECKING([whether OpenSSL uses rsaref])
-  AC_MSG_RESULT($ac_ssl_rsaref)
+  case $lt_echo in
+  *'\[$]0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
+    ;;
+  esac
 
-  AC_MSG_CHECKING([for easter eggs])
-  AC_MSG_RESULT([none found])
+ifelse([$1], [],
+  [cfgfile="${ofile}T"
+  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
+  $rm -f "$cfgfile"
+  AC_MSG_NOTICE([creating $ofile])],
+  [cfgfile="$ofile"])
 
-else
-  have_ssl=no
-fi
+  cat <<__EOF__ >> "$cfgfile"
+ifelse([$1], [],
+[#! $SHELL
 
-if test "$have_ssl" = yes; then
-  AC_MSG_CHECKING(for OpenSSL version)
-  dnl Check for SSL version
-  AC_CACHE_VAL(ac_cv_ssl_version,
-  [
-    AC_LANG_SAVE
-    AC_LANG_C 
+# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+#
+# This file is part of GNU Libtool:
+# Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
+#
+# 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
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# 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.
+#
+# 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.
 
-    cat >conftest.$ac_ext <<EOF
-#include <openssl/opensslv.h>
-#include <stdio.h>
-    int main() {
- 
-#ifndef OPENSSL_VERSION_NUMBER
-      printf("ssl_version=\\"error\\"\n");
-#else
-      if (OPENSSL_VERSION_NUMBER < 0x00906000)
-        printf("ssl_version=\\"old\\"\n");
-      else
-        printf("ssl_version=\\"ok\\"\n");
-#endif
-     return (0);
-    }
-EOF
+# A sed program that does not truncate output.
+SED=$lt_SED
 
-    ac_compile='${CC-gcc} $CFLAGS -I$ac_ssl_includes conftest.$ac_ext -o conftest'
-    if AC_TRY_EVAL(ac_compile); then 
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="$SED -e s/^X//"
 
-      if eval `./conftest 2>&5`; then
-        if test $ssl_version = error; then
-          AC_MSG_ERROR([$ssl_incdir/openssl/opensslv.h doesn't define OPENSSL_VERSION_NUMBER !])
-        else
-          if test $ssl_version = old; then
-            AC_MSG_WARN([OpenSSL version too old. Upgrade to 0.9.6 at least, see http://www.openssl.org. SSL support disabled.])
-            have_ssl=no
-          fi
-        fi
-        ac_cv_ssl_version="ssl_version=$ssl_version"
-      else
-        AC_MSG_ERROR([Your system couldn't run a small SSL test program.
-        Check config.log, and if you can't figure it out, send a mail to 
-        David Faure <faure at kde.org>, attaching your config.log])
-      fi
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
-    else
-      AC_MSG_ERROR([Your system couldn't link a small SSL test program.
-      Check config.log, and if you can't figure it out, send a mail to 
-      David Faure <faure at kde.org>, attaching your config.log])
-    fi 
+# The names of the tagged configurations supported by this script.
+available_tags=
 
-    AC_LANG_RESTORE
+# ### BEGIN LIBTOOL CONFIG],
+[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
 
-  ])
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 
-  eval "$ac_cv_ssl_version"
-  AC_MSG_RESULT($ssl_version)
-fi
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
 
-if test "$have_ssl" != yes; then
-  LIBSSL="";
-else
-  AC_DEFINE(HAVE_SSL, 1, [If we are going to use OpenSSL])
-  ac_cv_have_ssl="have_ssl=yes \
-    ac_ssl_includes=$ac_ssl_includes ac_ssl_libraries=$ac_ssl_libraries ac_ssl_rsaref=$ac_ssl_rsaref"
-  
-  
-  ssl_libraries="$ac_ssl_libraries"
-  ssl_includes="$ac_ssl_includes"
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
 
-  if test "$ac_ssl_rsaref" = yes; then
-    LIBSSL="-lssl -lcrypto -lRSAglue -lrsaref" 
-  fi
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
 
-  if test $ssl_version = "old"; then
-    AC_DEFINE(HAVE_OLD_SSL_API, 1, [Define if you have OpenSSL < 0.9.6])
-  fi
-fi
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
 
-if test "$ssl_includes" = "/usr/include" || test  "$ssl_includes" = "/usr/local/include" || test -z "$ssl_includes"; then
- SSL_INCLUDES="";
-else
- SSL_INCLUDES="-I$ssl_includes"
-fi
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
 
-if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries"; then
- SSL_LDFLAGS=""
-else
- SSL_LDFLAGS="-L$ssl_libraries -R$ssl_libraries"
-fi
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
 
-AC_SUBST(SSL_INCLUDES)
-AC_SUBST(SSL_LDFLAGS)
-AC_SUBST(LIBSSL)
-])
+# The host system.
+host_alias=$host_alias
+host=$host
 
-AC_DEFUN(KDE_CHECK_STRLCPY,
-[
-  AC_CHECK_STRLCPY
-  AC_CHECK_STRLCAT
-  AC_CHECK_SIZEOF(size_t)
-  AC_CHECK_SIZEOF(unsigned long)
-
-  AC_MSG_CHECKING([sizeof(size_t) == sizeof(unsigned long)])
-  AC_TRY_COMPILE(,[
-    #if SIZEOF_SIZE_T != SIZEOF_UNSIGNED_LONG
-       choke me
-    #endif
-    ],[AC_MSG_RESULT([yes])],[
-      AC_MSG_RESULT([no])
-      AC_MSG_ERROR([
-       Apparently on your system our assumption sizeof(size_t) == sizeof(unsigned long)
-       does not apply. Please mail kde-devel at kde.org with a description of your system!
-      ])
-  ])
-])
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
 
-# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
 
-# serial 47 AC_PROG_LIBTOOL
+# A C compiler.
+LTCC=$lt_LTCC
 
-# AC_PROG_LIBTOOL
-# ---------------
-AC_DEFUN([AC_PROG_LIBTOOL],
-[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
-dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
-dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
-  AC_PROVIDE_IFELSE([AC_PROG_CXX],
-    [AC_LIBTOOL_CXX],
-    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
-  ])])
+# A language-specific compiler.
+CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
 
-dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
-dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
-dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
-  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
-    [AC_LIBTOOL_GCJ],
-    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
-      [AC_LIBTOOL_GCJ],
-      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
-	[AC_LIBTOOL_GCJ],
-      [ifdef([AC_PROG_GCJ],
-	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
-       ifdef([A][M_PROG_GCJ],
-	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
-       ifdef([LT_AC_PROG_GCJ],
-	     [define([LT_AC_PROG_GCJ],
-		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
-])])# AC_PROG_LIBTOOL
+# Is the compiler the GNU C compiler?
+with_gcc=$_LT_AC_TAGVAR(GCC, $1)
 
+# An ERE matcher.
+EGREP=$lt_EGREP
 
-# _AC_PROG_LIBTOOL
-# ----------------
-AC_DEFUN([_AC_PROG_LIBTOOL],
-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
+# The linker used to build libraries.
+LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
 
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
 
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent'
-AC_SUBST(LIBTOOL)dnl
+# A BSD-compatible nm program.
+NM=$lt_NM
 
-# Prevent multiple expansion
-define([AC_PROG_LIBTOOL], [])
-])# _AC_PROG_LIBTOOL
+# A symbol stripping program
+STRIP=$lt_STRIP
 
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
 
-# AC_LIBTOOL_SETUP
-# ----------------
-AC_DEFUN([AC_LIBTOOL_SETUP],
-[AC_PREREQ(2.50)dnl
-AC_REQUIRE([AC_ENABLE_SHARED])dnl
-AC_REQUIRE([AC_ENABLE_STATIC])dnl
-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_LD])dnl
-AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
-AC_REQUIRE([AC_PROG_NM])dnl
-AC_REQUIRE([LT_AC_PROG_SED])dnl
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
 
-AC_REQUIRE([AC_PROG_LN_S])dnl
-AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-AC_REQUIRE([AC_OBJEXT])dnl
-AC_REQUIRE([AC_EXEEXT])dnl
-dnl
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
 
-AC_LIBTOOL_SYS_MAX_CMD_LEN
-AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-AC_LIBTOOL_OBJDIR
+# Used on cygwin: assembler.
+AS="$AS"
 
-AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
-_LT_AC_PROG_ECHO_BACKSLASH
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
 
-case $host_os in
-aix3*)
-  # AIX sometimes has problems with the GCC collect2 program.  For some
-  # reason, if we set the COLLECT_NAMES environment variable, the problems
-  # vanish in a puff of smoke.
-  if test "X${COLLECT_NAMES+set}" != Xset; then
-    COLLECT_NAMES=
-    export COLLECT_NAMES
-  fi
-  ;;
-esac
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
 
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e s/^X//'
-[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
+# How to pass a linker flag through the compiler.
+wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
 
-# Same as above, but do not quote variable references.
-[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
+# Object file suffix (normally "o").
+objext="$ac_objext"
 
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+# Old archive suffix (normally "a").
+libext="$libext"
 
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
 
-# Constants:
-rm="rm -f"
+# Executable file suffix (normally "").
+exeext="$exeext"
 
-# Global variables:
-default_ofile=libtool
-can_build_shared=yes
+# Additional compiler flags for building library objects.
+pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
+pic_mode=$pic_mode
 
-# All known linkers require a `.a' archive for static linking (except M$VC,
-# which needs '.lib').
-libext=a
-ltmain="$ac_aux_dir/ltmain.sh"
-ofile="$default_ofile"
-with_gnu_ld="$lt_cv_prog_gnu_ld"
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
 
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-AC_CHECK_TOOL(STRIP, strip, :)
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
 
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
+# Must we lock files when doing compilation ?
+need_locks=$lt_need_locks
 
-# Set sane defaults for various variables
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-test -z "$AS" && AS=as
-test -z "$CC" && CC=cc
-test -z "$LTCC" && LTCC=$CC
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-test -z "$LD" && LD=ld
-test -z "$LN_S" && LN_S="ln -s"
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-test -z "$NM" && NM=nm
-test -z "$SED" && SED=sed
-test -z "$OBJDUMP" && OBJDUMP=objdump
-test -z "$RANLIB" && RANLIB=:
-test -z "$STRIP" && STRIP=:
-test -z "$ac_objext" && ac_objext=o
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
 
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
+# Do we need a version for libraries?
+need_version=$need_version
 
-if test -n "$RANLIB"; then
-  case $host_os in
-  openbsd*)
-    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
-    ;;
-  *)
-    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
-    ;;
-  esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-fi
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
 
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
-  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
-    AC_PATH_MAGIC
-  fi
-  ;;
-esac
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
 
-ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-enable_win32_dll=yes, enable_win32_dll=no)
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
 
-AC_ARG_ENABLE([libtool-lock],
-    [AC_HELP_STRING([--disable-libtool-lock],
-	[avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
 
-AC_ARG_WITH([pic],
-    [AC_HELP_STRING([--with-pic],
-	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
-    [pic_mode="$withval"],
-    [pic_mode=default])
-test -z "$pic_mode" && pic_mode=default
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
 
-# Use C for the default configuration in the libtool script
-tagname=
-AC_LIBTOOL_LANG_C_CONFIG
-_LT_AC_TAGCONFIG
-])# AC_LIBTOOL_SETUP
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
 
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
 
-# _LT_AC_SYS_COMPILER
-# -------------------
-AC_DEFUN([_LT_AC_SYS_COMPILER],
-[AC_REQUIRE([AC_PROG_CC])dnl
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
 
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
+# Library versioning type.
+version_type=$version_type
 
-# Allow CC to be a program name with arguments.
-set dummy $CC
-compiler="[$]2"
-])# _LT_AC_SYS_COMPILER
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
 
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
 
-# _LT_AC_SYS_LIBPATH_AIX
-# ----------------------
-# Links a minimal program and checks the executable
-# for the system default hardcoded library path. In most cases,
-# this is /usr/lib:/lib, but when the MPI compilers are used
-# the location of the communication and MPI libs are included too.
-# If we don't find anything, use the default library path according
-# to the aix ld manual.
-AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
-[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`; fi],[])
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-])# _LT_AC_SYS_LIBPATH_AIX
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
 
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
 
-# _LT_AC_PROG_ECHO_BACKSLASH
-# --------------------------
-# Add some code to the start of the generated configure script which
-# will find an echo command which doesn't interpret backslashes.
-AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
-[ifdef([AC_DIVERSION_NOTICE],
-	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
-	 [AC_DIVERT_PUSH(NOTICE)])
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
 
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
 
-case X$ECHO in
-X*--fallback-echo)
-  # Remove one level of quotation (which was required for Make).
-  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
-  ;;
-esac
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
+archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
 
-echo=${ECHO-echo}
-if test "X[$]1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X[$]1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
-  # Yippee, $echo works!
-  :
-else
-  # Restart under the correct shell.
-  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
-fi
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
+module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
 
-if test "X[$]1" = X--fallback-echo; then
-  # used as fallback echo
-  shift
-  cat <<EOF
-[$]*
-EOF
-  exit 0
-fi
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
 
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
 
-if test -z "$ECHO"; then
-if test "X${echo_test_string+set}" != Xset; then
-# find a string as large as possible, as long as the shell can cope with it
-  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
-    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
-    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
-       echo_test_string="`eval $cmd`" &&
-       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
-    then
-      break
-    fi
-  done
-fi
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
 
-if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
-   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
-   test "X$echo_testing_string" = "X$echo_test_string"; then
-  :
-else
-  # The Solaris, AIX, and Digital Unix default echo programs unquote
-  # backslashes.  This makes it impossible to quote backslashes using
-  #   echo "$something" | sed 's/\\/\\\\/g'
-  #
-  # So, first we look for a working echo in the user's PATH.
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
 
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for dir in $PATH /usr/ucb; do
-    IFS="$lt_save_ifs"
-    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
-       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
-       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
-       test "X$echo_testing_string" = "X$echo_test_string"; then
-      echo="$dir/echo"
-      break
-    fi
-  done
-  IFS="$lt_save_ifs"
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
 
-  if test "X$echo" = Xecho; then
-    # We didn't find a better echo, so look for alternatives.
-    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
-       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
-       test "X$echo_testing_string" = "X$echo_test_string"; then
-      # This shell has a builtin print -r that does the trick.
-      echo='print -r'
-    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
-	 test "X$CONFIG_SHELL" != X/bin/ksh; then
-      # If we have ksh, try running configure again with it.
-      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-      export ORIGINAL_CONFIG_SHELL
-      CONFIG_SHELL=/bin/ksh
-      export CONFIG_SHELL
-      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
-    else
-      # Try using printf.
-      echo='printf %s\n'
-      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
-	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
-	 test "X$echo_testing_string" = "X$echo_test_string"; then
-	# Cool, printf works
-	:
-      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
-	   test "X$echo_testing_string" = 'X\t' &&
-	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-	   test "X$echo_testing_string" = "X$echo_test_string"; then
-	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
-	export CONFIG_SHELL
-	SHELL="$CONFIG_SHELL"
-	export SHELL
-	echo="$CONFIG_SHELL [$]0 --fallback-echo"
-      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
-	   test "X$echo_testing_string" = 'X\t' &&
-	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-	   test "X$echo_testing_string" = "X$echo_test_string"; then
-	echo="$CONFIG_SHELL [$]0 --fallback-echo"
-      else
-	# maybe with a smaller string...
-	prev=:
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
 
-	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
-	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
-	  then
-	    break
-	  fi
-	  prev="$cmd"
-	done
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
 
-	if test "$prev" != 'sed 50q "[$]0"'; then
-	  echo_test_string=`eval $prev`
-	  export echo_test_string
-	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
-	else
-	  # Oops.  We lost completely, so just stick with echo.
-	  echo=echo
-	fi
-      fi
-    fi
-  fi
-fi
-fi
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
 
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-ECHO=$echo
-if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
-   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
-fi
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
 
-AC_SUBST(ECHO)
-AC_DIVERT_POP
-])# _LT_AC_PROG_ECHO_BACKSLASH
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
 
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
 
-# _LT_AC_LOCK
-# -----------
-AC_DEFUN([_LT_AC_LOCK],
-[AC_ARG_ENABLE([libtool-lock],
-    [AC_HELP_STRING([--disable-libtool-lock],
-	[avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
 
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-ia64-*-hpux*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.$ac_objext` in
-    *ELF-32*)
-      HPUX_IA64_MODE="32"
-      ;;
-    *ELF-64*)
-      HPUX_IA64_MODE="64"
-      ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-*-*-irix6*)
-  # Find out which ABI we are using.
-  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.$ac_objext` in
-    *32-bit*)
-      LD="${LD-ld} -32"
-      ;;
-    *N32*)
-      LD="${LD-ld} -n32"
-      ;;
-    *64-bit*)
-      LD="${LD-ld} -64"
-      ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
 
-*-*-linux*)
-  # Test if the compiler is 64bit
-  echo 'int i;' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.$ac_objext` in
-    *"ELF 32"*)
-      LINUX_64_MODE="32"
-      ;;
-    *"ELF 64"*)
-      LINUX_64_MODE="64"
-      ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-  
-*-*-sco3.2v5*)
-  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
-  SAVE_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -belf"
-  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
-    [AC_LANG_PUSH(C)
-     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
-     AC_LANG_POP])
-  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
-    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
-    CFLAGS="$SAVE_CFLAGS"
-  fi
-  ;;
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
-  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
-  AC_CHECK_TOOL(AS, as, false)
-  AC_CHECK_TOOL(OBJDUMP, objdump, false)
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
 
-  # recent cygwin and mingw systems supply a stub DllMain which the user
-  # can override, but on older systems we have to supply one
-  AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
-    [AC_TRY_LINK([],
-      [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
-      DllMain (0, 0, 0);],
-      [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
-
-  case $host/$CC in
-  *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
-    # old mingw systems require "-dll" to link a DLL, while more recent ones
-    # require "-mdll"
-    SAVE_CFLAGS="$CFLAGS"
-    CFLAGS="$CFLAGS -mdll"
-    AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
-      [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
-    CFLAGS="$SAVE_CFLAGS" ;;
-  *-*-cygwin* | *-*-pw32*)
-    # cygwin systems need to pass --dll to the linker, and not link
-    # crt.o which will require a WinMain at 16 definition.
-    lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
-  esac
-  ;;
-  ])
-esac
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
 
-need_locks="$enable_libtool_lock"
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
 
-])# _LT_AC_LOCK
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
 
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
 
-# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
-# ----------------------------------------------------------------
-# Check whether the given compiler option works
-AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
-[AC_CACHE_CHECK([$1], [$2],
-  [$2=no
-  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
-   save_CFLAGS="$CFLAGS"
-   CFLAGS="$CFLAGS $3"
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   if (eval $ac_compile 2>conftest.err) && test -s $ac_outfile; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     if test -s conftest.err; then
-       # Append any errors to the config.log.
-       cat conftest.err 1>&AS_MESSAGE_LOG_FD
-     else
-       $2=yes
-     fi
-   fi
-   $rm conftest*
-   CFLAGS="$save_CFLAGS"
-])
+# How to hardcode a shared library path into an executable.
+hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
 
-if test x"[$]$2" = xyes; then
-    ifelse([$5], , :, [$5])
-else
-    ifelse([$6], , :, [$6])
-fi
-])# AC_LIBTOOL_COMPILER_OPTION
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
 
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
 
-# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-#                          [ACTION-SUCCESS], [ACTION-FAILURE])
-# ------------------------------------------------------------
-# Check whether the given compiler option works
-AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
-[AC_CACHE_CHECK([$1], [$2],
-  [$2=no
-   save_LDFLAGS="$LDFLAGS"
-   LDFLAGS="$LDFLAGS $3"
-   echo "$lt_simple_link_test_code" > conftest.$ac_ext
-   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     if test -s conftest.err; then
-       # Append any errors to the config.log.
-       cat conftest.err 1>&AS_MESSAGE_LOG_FD
-     else
-       $2=yes
-     fi
-   fi
-   $rm conftest*
-   LDFLAGS="$save_LDFLAGS"
-])
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
 
-if test x"[$]$2" = xyes; then
-    ifelse([$4], , :, [$4])
-else
-    ifelse([$5], , :, [$5])
-fi
-])# AC_LIBTOOL_LINKER_OPTION
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
 
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
 
-# AC_LIBTOOL_SYS_MAX_CMD_LEN
-# --------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
-[# find the maximum length of command line arguments
-AC_MSG_CHECKING([the maximum length of command line arguments])
-AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
-  i=0
-  testring="ABCD"
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
 
-  case $host_os in
-  msdosdjgpp*)
-    # On DJGPP, this test can blow up pretty badly due to problems in libc
-    # (any single argument exceeding 2000 bytes causes a buffer overrun
-    # during glob expansion).  Even if it were fixed, the result of this
-    # check would be larger than it should be.
-    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
-    ;;
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
 
-  gnu*)
-    # Under GNU Hurd, this test is not required because there is
-    # no limit to the length of command line arguments.
-    # Libtool will interpret -1 as no limit whatsoever
-    lt_cv_sys_max_cmd_len=-1;
-    ;;
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
 
-  *)
-    # If test is not a shell built-in, we'll probably end up computing a
-    # maximum length that is only half of the actual maximum length, but
-    # we can't tell.
-    while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
-	       = "XX$testring") >/dev/null 2>&1 &&
-	    new_result=`expr "X$testring" : ".*" 2>&1` &&
-	    lt_cv_sys_max_cmd_len=$new_result &&
-	    test $i != 17 # 1/2 MB should be enough
-    do
-      i=`expr $i + 1`
-      testring=$testring$testring
-    done
-    testring=
-    # Add a significant safety factor because C++ compilers can tack on massive
-    # amounts of additional arguments before passing them to the linker.
-    # It appears as though 1/2 is a usable value.
-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
-    ;;
-  esac
-])
-if test -n $lt_cv_sys_max_cmd_len ; then
-  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
-else
-  AC_MSG_RESULT(none)
-fi
-])# AC_LIBTOOL_SYS_MAX_CMD_LEN
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
 
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
 
-# _LT_AC_CHECK_DLFCN
-# --------------------
-AC_DEFUN([_LT_AC_CHECK_DLFCN],
-[AC_CHECK_HEADERS(dlfcn.h)dnl
-])# _LT_AC_CHECK_DLFCN
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
 
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
 
-# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
-#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
-# ------------------------------------------------------------------
-AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
-[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
-if test "$cross_compiling" = yes; then :
-  [$4]
-else
-  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-  lt_status=$lt_dlunknown
-  cat > conftest.$ac_ext <<EOF
-[#line __oline__ "configure"
-#include "confdefs.h"
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
 
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
+# Set to yes if exported symbols are required.
+always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
 
-#include <stdio.h>
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
 
-#ifdef RTLD_GLOBAL
-#  define LT_DLGLOBAL		RTLD_GLOBAL
-#else
-#  ifdef DL_GLOBAL
-#    define LT_DLGLOBAL		DL_GLOBAL
-#  else
-#    define LT_DLGLOBAL		0
-#  endif
-#endif
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
 
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
-   find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-#  ifdef RTLD_LAZY
-#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
-#  else
-#    ifdef DL_LAZY
-#      define LT_DLLAZY_OR_NOW		DL_LAZY
-#    else
-#      ifdef RTLD_NOW
-#        define LT_DLLAZY_OR_NOW	RTLD_NOW
-#      else
-#        ifdef DL_NOW
-#          define LT_DLLAZY_OR_NOW	DL_NOW
-#        else
-#          define LT_DLLAZY_OR_NOW	0
-#        endif
-#      endif
-#    endif
-#  endif
-#endif
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
 
-#ifdef __cplusplus
-extern "C" void exit (int);
-#endif
+# Symbols that must always be exported.
+include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
 
-void fnord() { int i=42;}
-int main ()
-{
-  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-  int status = $lt_dlunknown;
+ifelse([$1],[],
+[# ### END LIBTOOL CONFIG],
+[# ### END LIBTOOL TAG CONFIG: $tagname])
 
-  if (self)
-    {
-      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
-      /* dlclose (self); */
-    }
+__EOF__
 
-    exit (status);
-}]
+ifelse([$1],[], [
+  case $host_os in
+  aix3*)
+    cat <<\EOF >> "$cfgfile"
+
+# AIX sometimes has problems with the GCC collect2 program.  For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+  COLLECT_NAMES=
+  export COLLECT_NAMES
+fi
 EOF
-  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
-    (./conftest; exit; ) 2>/dev/null
-    lt_status=$?
-    case x$lt_status in
-      x$lt_dlno_uscore) $1 ;;
-      x$lt_dlneed_uscore) $2 ;;
-      x$lt_unknown|x*) $3 ;;
-    esac
-  else :
-    # compilation failed
-    $3
+    ;;
+  esac
+
+  # We use sed instead of cat because bash on DJGPP gets confused if
+  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+  # text mode, it properly converts lines to CR/LF.  This bash problem
+  # is reportedly fixed, but why not run on old versions too?
+  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
+
+  mv -f "$cfgfile" "$ofile" || \
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+])
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
   fi
 fi
-rm -fr conftest*
-])# _LT_AC_TRY_DLOPEN_SELF
+])# AC_LIBTOOL_CONFIG
 
 
-# AC_LIBTOOL_DLOPEN_SELF
-# -------------------
-AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
-[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
-if test "x$enable_dlopen" != xyes; then
-  enable_dlopen=unknown
-  enable_dlopen_self=unknown
-  enable_dlopen_self_static=unknown
-else
-  lt_cv_dlopen=no
-  lt_cv_dlopen_libs=
+# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------------------
+AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
+[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
 
-  case $host_os in
-  beos*)
-    lt_cv_dlopen="load_add_on"
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=yes
-    ;;
+_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
-  cygwin* | mingw* | pw32*)
-    lt_cv_dlopen="LoadLibrary"
-    lt_cv_dlopen_libs=
-   ;;
+if test "$GCC" = yes; then
+  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
 
-  *)
-    AC_CHECK_FUNC([shl_load],
-	  [lt_cv_dlopen="shl_load"],
-      [AC_CHECK_LIB([dld], [shl_load],
-	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
-	[AC_CHECK_FUNC([dlopen],
-	      [lt_cv_dlopen="dlopen"],
-	  [AC_CHECK_LIB([dl], [dlopen],
-		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
-	    [AC_CHECK_LIB([svld], [dlopen],
-		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
-	      [AC_CHECK_LIB([dld], [dld_link],
-		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
-	      ])
-	    ])
-	  ])
-	])
-      ])
-    ;;
-  esac
+  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+    lt_cv_prog_compiler_rtti_exceptions,
+    [-fno-rtti -fno-exceptions], [],
+    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
 
-  if test "x$lt_cv_dlopen" != xno; then
-    enable_dlopen=yes
-  else
-    enable_dlopen=no
-  fi
 
-  case $lt_cv_dlopen in
-  dlopen)
-    save_CPPFLAGS="$CPPFLAGS"
-    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+# ---------------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
+[AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([AC_PROG_NM])
+AC_REQUIRE([AC_OBJEXT])
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+[
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
 
-    save_LDFLAGS="$LDFLAGS"
-    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+# Character class describing NM global symbol codes.
+symcode='[[BCDEGRST]]'
 
-    save_LIBS="$LIBS"
-    LIBS="$lt_cv_dlopen_libs $LIBS"
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
 
-    AC_CACHE_CHECK([whether a program can dlopen itself],
-	  lt_cv_dlopen_self, [dnl
-	  _LT_AC_TRY_DLOPEN_SELF(
-	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
-	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
-    ])
+# Transform the above into a raw symbol and a C symbol.
+symxfrm='\1 \2\3 \3'
 
-    if test "x$lt_cv_dlopen_self" = xyes; then
-      LDFLAGS="$LDFLAGS $link_static_flag"
-      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
-    	  lt_cv_dlopen_self_static, [dnl
-	  _LT_AC_TRY_DLOPEN_SELF(
-	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
-	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
-      ])
-    fi
+# Transform an extracted symbol line into a proper C declaration
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
 
-    CPPFLAGS="$save_CPPFLAGS"
-    LDFLAGS="$save_LDFLAGS"
-    LIBS="$save_LIBS"
-    ;;
-  esac
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
 
-  case $lt_cv_dlopen_self in
-  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
-  *) enable_dlopen_self=unknown ;;
-  esac
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[[BCDT]]'
+  ;;
+cygwin* | mingw* | pw32*)
+  symcode='[[ABCDGISTW]]'
+  ;;
+hpux*) # Its linker distinguishes data from code symbols
+  if test "$host_cpu" = ia64; then
+    symcode='[[ABCDEGRST]]'
+  fi
+  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+  ;;
+linux*)
+  if test "$host_cpu" = ia64; then
+    symcode='[[ABCDGIRSTW]]'
+    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+  fi
+  ;;
+irix* | nonstopux*)
+  symcode='[[BCDEGRST]]'
+  ;;
+osf*)
+  symcode='[[BCDEGQRST]]'
+  ;;
+solaris* | sysv5*)
+  symcode='[[BDRT]]'
+  ;;
+sysv4)
+  symcode='[[DFNSTU]]'
+  ;;
+esac
 
-  case $lt_cv_dlopen_self_static in
-  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
-  *) enable_dlopen_self_static=unknown ;;
-  esac
-fi
-])# AC_LIBTOOL_DLOPEN_SELF
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+  ;;
+esac
 
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[[ABCDGIRSTW]]' ;;
+esac
 
-# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
-# ---------------------------------
-# Check to see if options -c and -o are simultaneously supported by compiler
-AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
-AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
-  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
-  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
-   $rm -r conftest 2>/dev/null
-   mkdir conftest
-   cd conftest
-   mkdir out
-   ifelse([$1],[],[save_CFLAGS="$CFLAGS"
-		   CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"],
-	  [$1],[CXX],[save_CXXFLAGS="$CXXFLAGS"
-		   CXXFLAGS="$CXXFLAGS -o out/conftest2.$ac_objext"],
-	  [$1],[GCJ],[save_GCJFLAGS="$GCJFLAGS"
-		   GCJFLAGS="$GCJFLAGS -o out/conftest2.$ac_objext"])
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-   # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
-   # that will create temporary files in the current directory regardless of
-   # the output directory.  Thus, making CWD read-only will cause this test
-   # to fail, enabling locking or at least warning the user not to do parallel
-   # builds.
-   chmod -w .
-
-   if (eval $ac_compile 2>out/conftest.err) && test -s out/conftest2.$ac_objext
-   then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     if test -s out/conftest.err; then
-       # Append any errors to the config.log.
-       cat out/conftest.err 1>&AS_MESSAGE_LOG_FD
-     else
-       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
-     fi
-   fi
-   ifelse([$1],[],[CFLAGS="$save_CFLAGS"],
-	  [$1],[CXX],[CXXFLAGS="$save_CXXFLAGS"],
-	  [$1],[GCJ],[GCJFLAGS="$save_GCJFLAGS"])
-   chmod u+w .
-   $rm conftest* out/*
-   rmdir out
-   cd ..
-   rmdir conftest
-   $rm conftest*
-])
-])# AC_LIBTOOL_PROG_CC_C_O
+# Try without a prefix undercore, then with it.
+for ac_symprfx in "" "_"; do
 
+  # Write the raw and C identifiers.
+  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
 
-# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
-# -----------------------------------------
-# Check to see if we can do hard links to lock some files if needed
-AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
-[AC_REQUIRE([_LT_AC_LOCK])dnl
+  # Check to see that the pipe works correctly.
+  pipe_works=no
 
-hard_links="nottested"
-if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
-  # do not overwrite the value of need_locks provided by the user
-  AC_MSG_CHECKING([if we can lock with hard links])
-  hard_links=yes
-  $rm conftest*
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  touch conftest.a
-  ln conftest.a conftest.b 2>&5 || hard_links=no
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  AC_MSG_RESULT([$hard_links])
-  if test "$hard_links" = no; then
-    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
-    need_locks=warn
-  fi
-else
-  need_locks=no
-fi
-])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
+  rm -f conftest*
+  cat > conftest.$ac_ext <<EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+EOF
 
+  if AC_TRY_EVAL(ac_compile); then
+    # Now try to grab the symbols.
+    nlist=conftest.nm
+    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
+      # Try sorting and uniquifying the output.
+      if sort "$nlist" | uniq > "$nlist"T; then
+	mv -f "$nlist"T "$nlist"
+      else
+	rm -f "$nlist"T
+      fi
 
-# AC_LIBTOOL_OBJDIR
-# -----------------
-AC_DEFUN([AC_LIBTOOL_OBJDIR],
-[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
-[rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
-  lt_cv_objdir=.libs
-else
-  # MS-DOS does not allow filenames that begin with a dot.
-  lt_cv_objdir=_libs
-fi
-rmdir .libs 2>/dev/null])
-objdir=$lt_cv_objdir
-])# AC_LIBTOOL_OBJDIR
+      # Make sure that we snagged all the symbols we need.
+      if grep ' nm_test_var$' "$nlist" >/dev/null; then
+	if grep ' nm_test_func$' "$nlist" >/dev/null; then
+	  cat <<EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
 
+EOF
+	  # Now generate the symbol file.
+	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
 
-# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
-# ----------------------------------------------
-# Check hardcoding attributes.
-AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
-[AC_MSG_CHECKING([how to hardcode library paths into programs])
-_LT_AC_TAGVAR(hardcode_action, $1)=
-if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
-   test -n "$_LT_AC_TAGVAR(runpath_var $1)"; then
+	  cat <<EOF >> conftest.$ac_ext
+#if defined (__STDC__) && __STDC__
+# define lt_ptr_t void *
+#else
+# define lt_ptr_t char *
+# define const
+#endif
 
-  # We can hardcode non-existant directories.
-  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
-     # If the only mechanism to avoid hardcoding is shlibpath_var, we
-     # have to relink, otherwise we might link with an installed library
-     # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
-     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
-    # Linking always hardcodes the temporary library directory.
-    _LT_AC_TAGVAR(hardcode_action, $1)=relink
+/* The mapping between symbol names and symbols. */
+const struct {
+  const char *name;
+  lt_ptr_t address;
+}
+lt_preloaded_symbols[[]] =
+{
+EOF
+	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
+	  cat <<\EOF >> conftest.$ac_ext
+  {0, (lt_ptr_t) 0}
+};
+
+#ifdef __cplusplus
+}
+#endif
+EOF
+	  # Now try linking the two files.
+	  mv conftest.$ac_objext conftstm.$ac_objext
+	  lt_save_LIBS="$LIBS"
+	  lt_save_CFLAGS="$CFLAGS"
+	  LIBS="conftstm.$ac_objext"
+	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+	    pipe_works=yes
+	  fi
+	  LIBS="$lt_save_LIBS"
+	  CFLAGS="$lt_save_CFLAGS"
+	else
+	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+	fi
+      else
+	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+      fi
+    else
+      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+    fi
   else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
+    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+    cat conftest.$ac_ext >&5
+  fi
+  rm -f conftest* conftst*
+
+  # Do not use the global_symbol_pipe unless it works.
+  if test "$pipe_works" = yes; then
+    break
+  else
+    lt_cv_sys_global_symbol_pipe=
   fi
+done
+])
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+  lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+  AC_MSG_RESULT(failed)
 else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
+  AC_MSG_RESULT(ok)
 fi
-AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
+]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
-if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
-  # Fast installation is not supported
-  enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
-  # Fast installation is not necessary
-  enable_fast_install=needless
-fi
-])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
-
-
-# AC_LIBTOOL_SYS_LIB_STRIP
-# ------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
-[striplib=
-old_striplib=
-AC_MSG_CHECKING([whether stripping libraries is possible])
-if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
-  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
-  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
-  AC_MSG_RESULT([yes])
-else
-  AC_MSG_RESULT([no])
-fi
-])# AC_LIBTOOL_SYS_LIB_STRIP
-
-
-# AC_LIBTOOL_SYS_DYNAMIC_LINKER
-# -----------------------------
-# PORTME Fill in your ld.so characteristics
-AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
-[AC_MSG_CHECKING([dynamic linker characteristics])
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
-  version_type=linux
-  library_names_spec='${libname}${release}.so$versuffix $libname.a'
-  shlibpath_var=LIBPATH
-
-  # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}.so$major'
-  ;;
-
-aix4* | aix5*)
-  version_type=linux
-  if test "$host_cpu" = ia64; then
-    # AIX 5 supports IA64
-    library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
-    shlibpath_var=LD_LIBRARY_PATH
-  else
-    # With GCC up to 2.95.x, collect2 would create an import file
-    # for dependence libraries.  The import file would start with
-    # the line `#! .'.  This would cause the generated library to
-    # depend on `.', always an invalid library.  This was fixed in
-    # development snapshots of GCC prior to 3.0.
-    case $host_os in
-      aix4 | aix4.[[01]] | aix4.[[01]].*)
-      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
-	   echo ' yes '
-	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
-	:
-      else
-	can_build_shared=no
-      fi
-      ;;
-    esac
-    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
-    # soname into executable. Probably we can add versioning support to
-    # collect2, so additional links can be useful in future.
-    if test "$aix_use_runtimelinking" = yes; then
-      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
-      # instead of lib<name>.a to let people know that these are not
-      # typical AIX shared libraries.
-      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-    else
-      # We preserve .a as extension for shared libraries through AIX4.2
-      # and later when we are not doing run time linking.
-      library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}.so$major'
-    fi
-    shlibpath_var=LIBPATH
-  fi
-  ;;
-
-amigaos*)
-  library_names_spec='$libname.ixlibrary $libname.a'
-  # Create ${libname}_ixlibrary.a entries in /sys/libs.
-  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
-  ;;
-
-beos*)
-  library_names_spec='${libname}.so'
-  dynamic_linker="$host_os ld.so"
-  shlibpath_var=LIBRARY_PATH
-  ;;
-
-bsdi4*)
-  version_type=linux
-  need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
-  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
-  # the default ld.so.conf also contains /usr/contrib/lib and
-  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
-  # libtool to hard-code these into programs
-  ;;
-
-cygwin* | mingw* | pw32*)
-  version_type=windows
-  need_version=no
-  need_lib_prefix=no
-  case $GCC,$host_os in
-  yes,cygwin*)
-    library_names_spec='$libname.dll.a'
-    sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
-    soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
-    postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
-      dldir=$destdir/`dirname \$dlpath`~
-      test -d \$dldir || mkdir -p \$dldir~
-      $install_prog .libs/$dlname \$dldir/$dlname'
-    postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
-      dlpath=$dir/\$dldll~
-       $rm \$dlpath'
-    ;;
-  yes,mingw*)
-    library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
-    sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://"`
-    if echo "$sys_lib_search_path_spec" | [egrep ';[C-Z]:/' >/dev/null]; then
-      # It is most probably a Windows format PATH printed by
-      # mingw gcc, but we are running on Cygwin. Gcc prints its search
-      # path with ; separators, and with drive letters. We can handle the
-      # drive letters (cygwin fileutils understands them), so leave them,
-      # especially as we might pass files found there to a mingw objdump,
-      # which wouldn't understand a cygwinified path. Ahh.
-      sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'`
-    else
-      sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed  -e "s/$PATH_SEPARATOR/ /g"`
-    fi
-    ;;
-  yes,pw32*)
-    library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
-    ;;
-  *)
-    library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
-    ;;
-  esac
-  dynamic_linker='Win32 ld.exe'
-  # FIXME: first we should search . and the directory the executable is in
-  shlibpath_var=PATH
-  ;;
-
-darwin* | rhapsody*)
-  dynamic_linker="$host_os dyld"
-  version_type=darwin
-  need_lib_prefix=no
-  need_version=no
-  # FIXME: Relying on posixy $() will cause problems for
-  #        cross-compilation, but unfortunately the echo tests do not
-  #        yet detect zsh echo's removal of \ escapes.
-  library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
-  soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
-  shlibpath_overrides_runpath=yes
-  shlibpath_var=DYLD_LIBRARY_PATH
-  ;;
-
-dgux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-freebsd1*)
-  dynamic_linker=no
-  ;;
-
-freebsd*)
-  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
-  version_type=freebsd-$objformat
-  case $version_type in
-    freebsd-elf*)
-      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
-      need_version=no
-      need_lib_prefix=no
-      ;;
-    freebsd-*)
-      library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
-      need_version=yes
-      ;;
-  esac
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_os in
-  freebsd2*)
-    shlibpath_overrides_runpath=yes
-    ;;
-  freebsd3.[01]* | freebsdelf3.[01]*)
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  *) # from 3.2 on
-    shlibpath_overrides_runpath=no
-    hardcode_into_libs=yes
-    ;;
-  esac
-  ;;
-
-gnu*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
-  soname_spec='${libname}${release}.so$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  hardcode_into_libs=yes
-  ;;
-
-hpux9* | hpux10* | hpux11*)
-  # Give a soname corresponding to the major version so that dld.sl refuses to
-  # link against other versions.
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  if test "$host_cpu" = ia64; then
-    hardcode_into_libs=yes
-    dynamic_linker="$host_os dld.so"
-    shlibpath_var=LD_LIBRARY_PATH
-    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-    soname_spec='${libname}${release}.so$major'
-    if test "X$HPUX_IA64_MODE" = X32; then
-      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
-    else
-      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
-    fi
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-  else
-    dynamic_linker="$host_os dld.sl"
-    shlibpath_var=SHLIB_PATH
-    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
-    soname_spec='${libname}${release}.sl$major'
-  fi
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
-  postinstall_cmds='chmod 555 $lib'
-  ;;
-
-irix5* | irix6* | nonstopux*)
-  case $host_os in
-    nonstopux*) version_type=nonstopux ;;
-    *)          version_type=irix ;;
-  esac
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}.so$major'
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
-  case $host_os in
-  irix5* | nonstopux*)
-    libsuff= shlibsuff=
-    ;;
-  *)
-    case $LD in # libtool.m4 will add one of these switches to LD
-    *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
-    *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
-    *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
-    *) libsuff= shlibsuff= libmagic=never-match;;
-    esac
-    ;;
-  esac
-  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
-  shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
-  ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
-  dynamic_linker=no
-  ;;
-
-# This must be Linux ELF.
-linux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
-  libsuff=
-  if test "x$LINUX_64_MODE" = x64; then
-    # Some platforms are per default 64-bit, so there's no /lib64
-    if test -d /lib64; then
-      libsuff=64
-    fi
-  fi
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
-  sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
-  # This implies no fast_install, which is unacceptable.
-  # Some rework will be needed to allow for fast_install
-  # before this can be enabled.
-  hardcode_into_libs=yes
-
-  # We used to test for /lib/ld.so.1 and disable shared libraries on
-  # powerpc, because MkLinux only supported shared libraries with the
-  # GNU dynamic linker.  Since this was broken with cross compilers,
-  # most powerpc-linux boxes support dynamic linking these days and
-  # people can always --disable-shared, the test was removed, and we
-  # assume the GNU/Linux dynamic linker is in use.
-  dynamic_linker='GNU/Linux ld.so'
-  ;;
-
-netbsd*)
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
-    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-    dynamic_linker='NetBSD (a.out) ld.so'
-  else
-    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
-    soname_spec='${libname}${release}.so$major'
-    dynamic_linker='NetBSD ld.elf_so'
-  fi
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  ;;
-
-newsos6)
-  version_type=linux
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
-
-nto-qnx)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
-
-openbsd*)
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    case $host_os in
-      openbsd2.[[89]] | openbsd2.[[89]].*)
-	shlibpath_overrides_runpath=no
-	;;
-      *)
-	shlibpath_overrides_runpath=yes
-	;;
-      esac
-  else
-    shlibpath_overrides_runpath=yes
-  fi
-  ;;
-
-os2*)
-  libname_spec='$name'
-  need_lib_prefix=no
-  library_names_spec='$libname.dll $libname.a'
-  dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
-  ;;
-
-osf3* | osf4* | osf5*)
-  version_type=osf
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}.so'
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
-  ;;
-
-sco3.2v5*)
-  version_type=osf
-  soname_spec='${libname}${release}.so$major'
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-solaris*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  # ldd complains unless libraries are executable
-  postinstall_cmds='chmod +x $lib'
-  ;;
-
-sunos4*)
-  version_type=sunos
-  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
-  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
-    need_lib_prefix=no
-  fi
-  need_version=yes
-  ;;
-
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-  version_type=linux
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_vendor in
-    sni)
-      shlibpath_overrides_runpath=no
-      ;;
-    motorola)
-      need_lib_prefix=no
-      need_version=no
-      shlibpath_overrides_runpath=no
-      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
-      ;;
-  esac
-  ;;
-
-sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux
-    library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
-    soname_spec='$libname.so.$major'
-    shlibpath_var=LD_LIBRARY_PATH
-  fi
-  ;;
-
-uts4*)
-  version_type=linux
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-*)
-  dynamic_linker=no
-  ;;
-esac
-AC_MSG_RESULT([$dynamic_linker])
-test "$dynamic_linker" = no && can_build_shared=no
-])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
-
-
-# _LT_AC_TAGCONFIG
-# ----------------
-AC_DEFUN([_LT_AC_TAGCONFIG],
-[AC_ARG_WITH([tags],
-    [AC_HELP_STRING([--with-tags=TAGS],
-	[include additional configurations @<:@CXX,GCJ@:>@])],
-    [tagnames="$withval"],
-    [tagnames="CXX,GCJ"
-    case $host_os in
-      mingw*|cygwin*) tagnames="$tagnames,RC" ;;
-    esac])
-
-if test -f "$ltmain" && test -n "$tagnames"; then
-  if test ! -f "${ofile}"; then
-    AC_MSG_WARN([output file `$ofile' does not exist])
-  fi
-
-  if test -z "$LTCC"; then
-    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
-    if test -z "$LTCC"; then
-      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
-    else
-      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
-    fi
-  fi
-
-  # Extract list of available tagged configurations in $ofile.
-  # Note that this assumes the entire list is on one line.
-  available_tags=`grep "^available_tags=" "${ofile}" | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
-
-  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-  for tagname in $tagnames; do
-    IFS="$lt_save_ifs"
-    # Check whether tagname contains only valid characters
-    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
-    "") ;;
-    *)  AC_MSG_ERROR([invalid tag name: $tagname])
-	;;
-    esac
-
-    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
-    then
-      AC_MSG_ERROR([tag name \"$tagname\" already exists])
-    fi
-
-    # Update the list of available tags.
-    if test -n "$tagname"; then
-      echo appending configuration tag \"$tagname\" to $ofile
-
-      case $tagname in
-      CXX)
-	AC_LIBTOOL_LANG_CXX_CONFIG
-	;;
-
-      GCJ)
-	AC_LIBTOOL_LANG_GCJ_CONFIG
-	;;
-
-      RC)
-	AC_LIBTOOL_LANG_RC_CONFIG
-	;;
-
-      *)
-	AC_MSG_ERROR([Unsupported tag name: $tagname])
-	;;
-      esac
-
-      # Append the new tag name to the list of available tags.
-      available_tags="$available_tags $tagname"
-    fi
-  done
-  IFS="$lt_save_ifs"
-
-  # Now substitute the updated list of available tags.
-  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
-    mv "${ofile}T" "$ofile"
-    chmod +x "$ofile"
-  else
-    rm -f "${ofile}T"
-    AC_MSG_ERROR([unable to update list of available tagged configurations.])
-  fi
-fi
-])# _LT_AC_TAGCONFIG
-
-
-# AC_LIBTOOL_DLOPEN
-# -----------------
-# enable checks for dlopen support
-AC_DEFUN([AC_LIBTOOL_DLOPEN],
- [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
-])# AC_LIBTOOL_DLOPEN
-
-
-# AC_LIBTOOL_WIN32_DLL
-# --------------------
-# declare package support for building win32 dll's
-AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
-[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
-])# AC_LIBTOOL_WIN32_DLL
-
-
-# AC_ENABLE_SHARED([DEFAULT])
-# ---------------------------
-# implement the --enable-shared flag
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
-AC_DEFUN([AC_ENABLE_SHARED],
-[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE([shared],
-    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
-	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
-    [p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_shared=yes ;;
-    no) enable_shared=no ;;
-    *)
-      enable_shared=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-	IFS="$lt_save_ifs"
-	if test "X$pkg" = "X$p"; then
-	  enable_shared=yes
-	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac],
-    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
-])# AC_ENABLE_SHARED
-
-
-# AC_DISABLE_SHARED
-# -----------------
-#- set the default shared flag to --disable-shared
-AC_DEFUN([AC_DISABLE_SHARED],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_SHARED(no)
-])# AC_DISABLE_SHARED
-
-
-# AC_ENABLE_STATIC([DEFAULT])
-# ---------------------------
-# implement the --enable-static flag
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
-AC_DEFUN([AC_ENABLE_STATIC],
-[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE([static],
-    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
-	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
-    [p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_static=yes ;;
-    no) enable_static=no ;;
-    *)
-     enable_static=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-	IFS="$lt_save_ifs"
-	if test "X$pkg" = "X$p"; then
-	  enable_static=yes
-	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac],
-    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
-])# AC_ENABLE_STATIC
-
-
-# AC_DISABLE_STATIC
-# -----------------
-# set the default static flag to --disable-static
-AC_DEFUN([AC_DISABLE_STATIC],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_STATIC(no)
-])# AC_DISABLE_STATIC
-
-
-# AC_ENABLE_FAST_INSTALL([DEFAULT])
-# ---------------------------------
-# implement the --enable-fast-install flag
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
-AC_DEFUN([AC_ENABLE_FAST_INSTALL],
-[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE([fast-install],
-    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
-    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
-    [p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_fast_install=yes ;;
-    no) enable_fast_install=no ;;
-    *)
-      enable_fast_install=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-	IFS="$lt_save_ifs"
-	if test "X$pkg" = "X$p"; then
-	  enable_fast_install=yes
-	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac],
-    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
-])# AC_ENABLE_FAST_INSTALL
-
-
-# AC_DISABLE_FAST_INSTALL
-# -----------------------
-# set the default to --disable-fast-install
-AC_DEFUN([AC_DISABLE_FAST_INSTALL],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_FAST_INSTALL(no)
-])# AC_DISABLE_FAST_INSTALL
-
-
-# AC_LIBTOOL_PICMODE([MODE])
-# --------------------------
-# implement the --with-pic flag
-# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
-AC_DEFUN([AC_LIBTOOL_PICMODE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-pic_mode=ifelse($#,1,$1,default)
-])# AC_LIBTOOL_PICMODE
-
-
-# AC_PATH_TOOL_PREFIX
-# -------------------
-# find a file program which can recognise shared library
-AC_DEFUN([AC_PATH_TOOL_PREFIX],
-[AC_MSG_CHECKING([for $1])
-AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
-[case $MAGIC_CMD in
-[[\\/*] |  ?:[\\/]*])
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
-  ;;
-*)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-dnl $ac_dummy forces splitting on constant user-supplied paths.
-dnl POSIX.2 word splitting is done only on the output of word expansions,
-dnl not every word.  This closes a longstanding sh security hole.
-  ac_dummy="ifelse([$2], , $PATH, [$2])"
-  for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$1; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
-      if test -n "$file_magic_test_file"; then
-	case $deplibs_check_method in
-	"file_magic "*)
-	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
-	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
-	    egrep "$file_magic_regex" > /dev/null; then
-	    :
-	  else
-	    cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such.  This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem.  Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool at gnu.org
-
-EOF
-	  fi ;;
-	esac
-      fi
-      break
-    fi
-  done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
-  ;;
-esac])
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
-  AC_MSG_RESULT($MAGIC_CMD)
-else
-  AC_MSG_RESULT(no)
-fi
-])# AC_PATH_TOOL_PREFIX
-
-
-# AC_PATH_MAGIC
-# -------------
-# find a file program which can recognise a shared library
-AC_DEFUN([AC_PATH_MAGIC],
-[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
-if test -z "$lt_cv_path_MAGIC_CMD"; then
-  if test -n "$ac_tool_prefix"; then
-    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
-  else
-    MAGIC_CMD=:
-  fi
-fi
-])# AC_PATH_MAGIC
-
-
-# AC_PROG_LD
-# ----------
-# find the path to the GNU or non-GNU linker
-AC_DEFUN([AC_PROG_LD],
-[AC_ARG_WITH([gnu-ld],
-    [AC_HELP_STRING([--with-gnu-ld],
-	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
-    [test "$withval" = no || with_gnu_ld=yes],
-    [with_gnu_ld=no])
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-ac_prog=ld
-if test "$GCC" = yes; then
-  # Check if gcc -print-prog-name=ld gives a path.
-  AC_MSG_CHECKING([for ld used by GCC])
-  case $host in
-  *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
-    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
-  *)
-    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
-  esac
-  case $ac_prog in
-    # Accept absolute paths.
-    [[\\/]]* | ?:[[\\/]]*)
-      re_direlt='/[[^/]][[^/]]*/\.\./'
-      # Canonicalize the path of ld
-      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
-      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
-	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
-      done
-      test -z "$LD" && LD="$ac_prog"
-      ;;
-  "")
-    # If it fails, then pretend we aren't using GCC.
-    ac_prog=ld
-    ;;
-  *)
-    # If it is relative, then search for the first ld in PATH.
-    with_gnu_ld=unknown
-    ;;
-  esac
-elif test "$with_gnu_ld" = yes; then
-  AC_MSG_CHECKING([for GNU ld])
-else
-  AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(lt_cv_path_LD,
-[if test -z "$LD"; then
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for ac_dir in $PATH; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      lt_cv_path_LD="$ac_dir/$ac_prog"
-      # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some GNU ld's only accept -v.
-      # Break only if it was the GNU/non-GNU ld that we prefer.
-      if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
-	test "$with_gnu_ld" != no && break
-      else
-	test "$with_gnu_ld" != yes && break
-      fi
-    fi
-  done
-  IFS="$lt_save_ifs"
-else
-  lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
-  AC_MSG_RESULT($LD)
-else
-  AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_PROG_LD_GNU
-])# AC_PROG_LD
-
-
-# AC_PROG_LD_GNU
-# --------------
-AC_DEFUN([AC_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
-  lt_cv_prog_gnu_ld=yes
-else
-  lt_cv_prog_gnu_ld=no
-fi])
-with_gnu_ld=$lt_cv_prog_gnu_ld
-])# AC_PROG_LD_GNU
-
-
-# AC_PROG_LD_RELOAD_FLAG
-# ----------------------
-# find reload flag for linker
-#   -- PORTME Some linkers may need a different reload flag.
-AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
-[AC_CACHE_CHECK([for $LD option to reload object files],
-  lt_cv_ld_reload_flag,
-  [lt_cv_ld_reload_flag='-r'])
-reload_flag=$lt_cv_ld_reload_flag
-case $reload_flag in
-"" | " "*) ;;
-*) reload_flag=" $reload_flag" ;;
-esac
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-])# AC_PROG_LD_RELOAD_FLAG
-
-
-# AC_DEPLIBS_CHECK_METHOD
-# -----------------------
-# how to check for library dependencies
-#  -- PORTME fill in with the dynamic library characteristics
-AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
-[AC_CACHE_CHECK([how to recognise dependant libraries],
-lt_cv_deplibs_check_method,
-[lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given egrep regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix4* | aix5*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-beos*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-bsdi4*)
-  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
-  lt_cv_file_magic_cmd='/usr/bin/file -L'
-  lt_cv_file_magic_test_file=/shlib/libc.so
-  ;;
-
-cygwin* | mingw* | pw32*)
-  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
-  lt_cv_file_magic_cmd='$OBJDUMP -f'
-  ;;
-
-darwin* | rhapsody*)
-  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
-  lt_cv_file_magic_cmd='/usr/bin/file -L'
-  case "$host_os" in
-  rhapsody* | darwin1.[[012]])
-    lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
-    ;;
-  *) # Darwin 1.3 on
-    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
-    ;;
-  esac
-  ;;
-
-freebsd*)
-  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
-    case $host_cpu in
-    i*86 )
-      # Not sure whether the presence of OpenBSD here was a mistake.
-      # Let's accept both of them until this is cleared up.
-      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
-      lt_cv_file_magic_cmd=/usr/bin/file
-      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
-      ;;
-    esac
-  else
-    lt_cv_deplibs_check_method=pass_all
-  fi
-  ;;
-
-gnu*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-hpux10.20* | hpux11*)
-  lt_cv_file_magic_cmd=/usr/bin/file
-  if test "$host_cpu" = ia64; then
-    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
-    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
-  else
-    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
-    lt_cv_file_magic_test_file=/usr/lib/libc.sl
-  fi
-  ;;
-
-irix5* | irix6* | nonstopux*)
-  case $host_os in
-  irix5* | nonstopux*)
-    # this will be overridden with pass_all, but let us keep it just in case
-    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
-    ;;
-  *)
-    case $LD in
-    *-32|*"-32 ") libmagic=32-bit;;
-    *-n32|*"-n32 ") libmagic=N32;;
-    *-64|*"-64 ") libmagic=64-bit;;
-    *) libmagic=never-match;;
-    esac
-    # this will be overridden with pass_all, but let us keep it just in case
-    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
-    ;;
-  esac
-  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-# This must be Linux ELF.
-linux*)
-  case $host_cpu in
-  alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh* | x86_64* )
-    lt_cv_deplibs_check_method=pass_all ;;
-  *)
-    # glibc up to 2.1.1 does not perform some relocations on ARM
-    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
-  esac
-  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
-  ;;
-
-netbsd*)
-  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
-  else
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
-  fi
-  ;;
-
-newos6*)
-  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
-  lt_cv_file_magic_cmd=/usr/bin/file
-  lt_cv_file_magic_test_file=/usr/lib/libnls.so
-  ;;
-
-nto-qnx)
-  lt_cv_deplibs_check_method=unknown
-  ;;
-
-openbsd*)
-  lt_cv_file_magic_cmd=/usr/bin/file
-  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
-  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
-  else
-    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
-  fi
-  ;;
-
-osf3* | osf4* | osf5*)
-  # this will be overridden with pass_all, but let us keep it just in case
-  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
-  lt_cv_file_magic_test_file=/shlib/libc.so
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-sco3.2v5*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-solaris*)
-  lt_cv_deplibs_check_method=pass_all
-  lt_cv_file_magic_test_file=/lib/libc.so
-  ;;
-
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-  case $host_vendor in
-  motorola)
-    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
-    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
-    ;;
-  ncr)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  sequent)
-    lt_cv_file_magic_cmd='/bin/file'
-    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
-    ;;
-  sni)
-    lt_cv_file_magic_cmd='/bin/file'
-    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
-    lt_cv_file_magic_test_file=/lib/libc.so
-    ;;
-  esac
-  ;;
-
-sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-esac
-])
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
-])# AC_DEPLIBS_CHECK_METHOD
-
-
-# AC_PROG_NM
-# ----------
-# find the path to a BSD-compatible name lister
-AC_DEFUN([AC_PROG_NM],
-[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
-[if test -n "$NM"; then
-  # Let the user override the test.
-  lt_cv_path_NM="$NM"
-else
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
-    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
-      # Check to see if the nm accepts a BSD-compat flag.
-      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
-      #   nm: unknown option "B" ignored
-      # Tru64's nm complains that /dev/null is an invalid object file
-      if ("$tmp_nm" -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
-	lt_cv_path_NM="$tmp_nm -B"
-	break
-      elif ("$tmp_nm" -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
-	lt_cv_path_NM="$tmp_nm -p"
-	break
-      else
-	lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
-	continue # so that we can try to find one that supports BSD flags
-      fi
-    fi
-  done
-  IFS="$lt_save_ifs"
-  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
-fi])
-NM="$lt_cv_path_NM"
-])# AC_PROG_NM
-
-
-# AC_CHECK_LIBM
-# -------------
-# check for math library
-AC_DEFUN([AC_CHECK_LIBM],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32*)
-  # These system don't have libm
-  ;;
-*-ncr-sysv4.3*)
-  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
-  AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
-  ;;
-*)
-  AC_CHECK_LIB(m, main, LIBM="-lm")
-  ;;
-esac
-])# AC_CHECK_LIBM
-
-
-# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
-# -----------------------------------
-# sets LIBLTDL to the link flags for the libltdl convenience library and
-# LTDLINCL to the include flags for the libltdl header and adds
-# --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
-# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
-# DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
-# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
-# '${top_srcdir}/' (note the single quotes!).  If your package is not
-# flat and you're not using automake, define top_builddir and
-# top_srcdir appropriately in the Makefiles.
-AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-  case $enable_ltdl_convenience in
-  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
-  "") enable_ltdl_convenience=yes
-      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
-  esac
-  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
-  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
-  # For backwards non-gettext consistent compatibility...
-  INCLTDL="$LTDLINCL"
-])# AC_LIBLTDL_CONVENIENCE
-
-
-# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
-# -----------------------------------
-# sets LIBLTDL to the link flags for the libltdl installable library and
-# LTDLINCL to the include flags for the libltdl header and adds
-# --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
-# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
-# DIRECTORY is not provided and an installed libltdl is not found, it is
-# assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
-# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
-# quotes!).  If your package is not flat and you're not using automake,
-# define top_builddir and top_srcdir appropriately in the Makefiles.
-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
-AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-  AC_CHECK_LIB(ltdl, main,
-  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
-  [if test x"$enable_ltdl_install" = xno; then
-     AC_MSG_WARN([libltdl not installed, but installation disabled])
-   else
-     enable_ltdl_install=yes
-   fi
-  ])
-  if test x"$enable_ltdl_install" = x"yes"; then
-    ac_configure_args="$ac_configure_args --enable-ltdl-install"
-    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
-    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
-  else
-    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
-    LIBLTDL="-lltdl"
-    LTDLINCL=
-  fi
-  # For backwards non-gettext consistent compatibility...
-  INCLTDL="$LTDLINCL"
-])# AC_LIBLTDL_INSTALLABLE
-
-
-# If this macro is not defined by Autoconf, define it here.
-ifdef([AC_PROVIDE_IFELSE],
-      [],
-      [define([AC_PROVIDE_IFELSE],
-	      [ifdef([AC_PROVIDE_$1],
-		     [$2], [$3])])])
-
-
-# AC_LIBTOOL_CXX
-# --------------
-# enable support for C++ libraries
-AC_DEFUN([AC_LIBTOOL_CXX],
-[AC_REQUIRE([_LT_AC_LANG_CXX])
-])# AC_LIBTOOL_CXX
-
-
-# _LT_AC_LANG_CXX
-# ---------------
-AC_DEFUN([_LT_AC_LANG_CXX],
-[AC_REQUIRE([AC_PROG_CXX])
-AC_REQUIRE([AC_PROG_CXXCPP])
-])# _LT_AC_LANG_CXX
-
-
-# AC_LIBTOOL_GCJ
-# --------------
-# enable support for GCJ libraries
-AC_DEFUN([AC_LIBTOOL_GCJ],
-[AC_REQUIRE([_LT_AC_LANG_GCJ])
-])# AC_LIBTOOL_GCJ
-
-
-# _LT_AC_LANG_GCJ
-# ---------------
-AC_DEFUN([_LT_AC_LANG_GCJ],
-[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
-  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
-    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
-      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
-	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
-	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
-])# _LT_AC_LANG_GCJ
-
-
-# AC_LIBTOOL_RC
-# --------------
-# enable support for Windows resource files
-AC_DEFUN([AC_LIBTOOL_RC],
-[AC_REQUIRE([AC_PROG_RC])
-])# AC_LIBTOOL_RC
-
-
-# AC_LIBTOOL_LANG_C_CONFIG
-# ------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined.  Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
-AC_DEFUN([_LT_AC_LANG_C_CONFIG],
-[lt_save_CC="$CC"
-AC_LANG_PUSH(C)
-
-# Source file extension for C test sources.
-ac_ext=c
-
-# Object file extension for compiled C test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='main(){return(0);}'
-
-_LT_AC_SYS_COMPILER
-
-#
-# Check for any special shared library compilation flags.
-#
-_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
-if test "$GCC" = no; then
-  case $host_os in
-  sco3.2v5*)
-    _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
-    ;;
-  esac
-fi
-if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
-  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
-  if echo "$old_CC $old_CFLAGS " | egrep -e "[[ 	]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ 	]]" >/dev/null; then :
-  else
-    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
-    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
-  fi
-fi
-
-
-#
-# Check to make sure the static flag actually works.
-#
-AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
-  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
-  $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
-  [],
-  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
-
-
-AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-AC_LIBTOOL_SYS_LIB_STRIP
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_DLOPEN_SELF($1)
-
-# Report which librarie types wil actually be built
-AC_MSG_CHECKING([if libtool supports shared libraries])
-AC_MSG_RESULT([$can_build_shared])
-
-AC_MSG_CHECKING([whether to build shared libraries])
-test "$can_build_shared" = "no" && enable_shared=no
-
-# On AIX, shared libraries and static libraries use the same namespace, and
-# are all built from PIC.
-case "$host_os" in
-aix3*)
-  test "$enable_shared" = yes && enable_static=no
-  if test -n "$RANLIB"; then
-    archive_cmds="$archive_cmds~\$RANLIB \$lib"
-    postinstall_cmds='$RANLIB $lib'
-  fi
-  ;;
-
-aix4*)
-  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-    test "$enable_shared" = yes && enable_static=no
-  fi
-  ;;
-esac
-AC_MSG_RESULT([$enable_shared])
-
-AC_MSG_CHECKING([whether to build static libraries])
-# Make sure either enable_shared or enable_static is yes.
-test "$enable_shared" = yes || enable_static=yes
-AC_MSG_RESULT([$enable_static])
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_POP
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_C_CONFIG
-
-
-# AC_LIBTOOL_LANG_CXX_CONFIG
-# --------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined.  Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
-AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
-[AC_LANG_PUSH(C++)
-AC_REQUIRE([AC_PROG_CXX])
-AC_REQUIRE([AC_PROG_CXXCPP])
-
-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_AC_TAGVAR(allow_undefined_flag, $1)=
-_LT_AC_TAGVAR(always_export_symbols, $1)=no
-_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
-_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_AC_TAGVAR(hardcode_direct, $1)=no
-_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
-_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_AC_TAGVAR(no_undefined_flag, $1)=
-_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-
-# Dependencies to place before and after the object being linked:
-_LT_AC_TAGVAR(predep_objects, $1)=
-_LT_AC_TAGVAR(postdep_objects, $1)=
-_LT_AC_TAGVAR(predeps, $1)=
-_LT_AC_TAGVAR(postdeps, $1)=
-_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
-
-# Source file extension for C test sources.
-ac_ext=cc
-
-# Object file extension for compiled C test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(int char *[]) { return(0); }'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${CXX-"c++"}
-set dummy $CC
-compiler="[$]2"
-_LT_AC_TAGVAR(compiler, $1)=$CC
-cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
-
-# We don't want -fno-exception wen compiling C++ code, so set the
-# no_builtin_flag separately
-if test "$GXX" = yes; then
-  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
-else
-  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-fi
-
-if test "$GXX" = yes; then
-  # Set up default GNU C++ configuration
-
-  # Check if GNU C++ uses GNU ld as the underlying linker, since the
-  # archiving commands below assume that GNU ld is being used.
-  if eval "`$CC -print-prog-name=ld` --version 2>&1" | \
-      egrep 'GNU ld' > /dev/null; then
-    with_gnu_ld=yes
-
-    _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(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
-    # If archive_cmds runs LD, not CC, wlarc should be empty
-    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
-    #     investigate it a little bit more. (MM)
-    wlarc='${wl}'
-
-    # ancient GNU ld didn't support --whole-archive et. al.
-    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
-	egrep 'no-whole-archive' > /dev/null; then
-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-    else
-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-    fi
-  else
-    with_gnu_ld=no
-    wlarc=
-
-    # A generic and very simple default shared library creation
-    # command for GNU C++ for the case where it uses the native
-    # 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 $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-  fi
-
-  # Commands to make compiler produce verbose output that lists
-  # what "hidden" libraries, object files and flags are used when
-  # linking a shared library.
-  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
-
-else
-  GXX=no
-  with_gnu_ld=no
-  wlarc=
-fi
-
-# PORTME: fill in a description of your system's C++ link characteristics
-AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-_LT_AC_TAGVAR(ld_shlibs, $1)=yes
-case $host_os in
-  aix3*)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  aix4* | aix5*)
-    if test "$host_cpu" = ia64; then
-      # On IA64, the linker does run time linking by default, so we don't
-      # have to do anything special.
-      aix_use_runtimelinking=no
-      exp_sym_flag='-Bexport'
-      no_entry_flag=""
-    else
-      # KDE requires run time linking.  Make it the default.
-      aix_use_runtimelinking=yes
-      exp_sym_flag='-bexport'
-      no_entry_flag='-bnoentry'
-    fi
-
-    # When large executables or shared objects are built, AIX ld can
-    # have problems creating the table of contents.  If linking a library
-    # or program results in "error TOC overflow" add -mminimal-toc to
-    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
-    _LT_AC_TAGVAR(archive_cmds, $1)=''
-    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
-    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-
-    if test "$GXX" = yes; then
-      case $host_os in aix4.[012]|aix4.[012].*)
-      # We only want to do this on AIX 4.2 and lower, the check
-      # below for broken collect2 doesn't work under 4.3+
-	collect2name=`${CC} -print-prog-name=collect2`
-	if test -f "$collect2name" && \
-	   strings "$collect2name" | grep resolve_lib_name >/dev/null
-	then
-	  # We have reworked collect2
-	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-	else
-	  # We have old collect2
-	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
-	  # It fails to find uninstalled libraries when the uninstalled
-	  # path is not listed in the libpath.  Setting hardcode_minus_L
-	  # to unsupported forces relinking
-	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-	fi
-      esac
-      shared_flag='-shared'
-    else
-      # not using gcc
-      if test "$host_cpu" = ia64; then
-	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-	# chokes on -Wl,-G. The following line is correct:
-	shared_flag='-G'
-      else
-	if test "$aix_use_runtimelinking" = yes; then
-	  shared_flag='-qmkshrobj ${wl}-G'
-	else
-	  shared_flag='-qmkshrobj'
-	fi
-      fi
-    fi
-
-    # Let the compiler handle the export list.
-    _LT_AC_TAGVAR(always_export_symbols, $1)=no
-    if test "$aix_use_runtimelinking" = yes; then
-      # Warning - without using the other runtime loading flags (-brtl),
-      # -berok will link without error, but may produce a broken library.
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
-      # 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:'"$aix_libpath"
-
-      _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-     else
-      if test "$host_cpu" = ia64; then
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
-      else
-	# 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:'"$aix_libpath"
-	# Warning - without using the other run time loading flags,
-	# -berok will link without error, but may produce a broken library.
-	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-	# -bexpall does not export symbols beginning with underscore (_)
-	_LT_AC_TAGVAR(always_export_symbols, $1)=yes
-	# Exported symbols can be pulled into shared objects from archives
-	_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)="\$CC $shared_flag"' -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'
-      fi
-    fi
-    ;;
-  chorus*)
-    case $cc_basename in
-      *)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-    esac
-    ;;
-  dgux*)
-    case $cc_basename in
-      ec++)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      ghcx)
-	# Green Hills C++ Compiler
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      *)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-    esac
-    ;;
-  freebsd[12]*)
-    # C++ shared libraries reported to be fairly broken before switch to ELF
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  freebsd-elf*)
-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-    ;;
-  freebsd*)
-    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
-    # conventions
-    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
-    ;;
-  gnu*)
-    ;;
-  hpux*)
-    if test $with_gnu_ld = no; then
-      if test "$host_cpu" = ia64; then
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      else
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-      fi
-    fi
-    if test "$host_cpu" = ia64; then
-      _LT_AC_TAGVAR(hardcode_direct, $1)=no
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-    else
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-    fi
-    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
-					    # but as the default
-					    # location of the library.
-
-    case $cc_basename in
-      CC)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      aCC)
-	case $host_os in
-	hpux9*)
-	  _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'
-	  ;;
-	*)
-	  if test "$host_cpu" = ia64; then
-	    _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
-	  else
-	    _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'
-	  fi
-	  ;;
-	esac
-	# Commands to make compiler produce verbose output that lists
-	# what "hidden" libraries, object files and flags are used when
-	# linking a shared library.
-	#
-	# There doesn't appear to be a way to prevent this compiler from
-	# explicitly linking system object files so we need to strip them
-	# from the output so that they don't get included in the library
-	# dependencies.
-	output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-	;;
-      *)
-	if test "$GXX" = yes; then
-	  if test $with_gnu_ld = no; then
-	    case $host_os in
-	    hpux9*)
-	      _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'
-	      ;;
-	    *)
-	      if test "$host_cpu" = ia64; then
-		_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
-	      else
-		_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'
-	      fi
-	      ;;
-	    esac
-	  fi
-	else
-	  # FIXME: insert proper C++ library support
-	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
-	fi
-	;;
-    esac
-    ;;
-  irix5* | irix6*)
-    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 "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
-
-	# Archives containing C++ object files must be created using
-	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
-	# necessary to make sure instantiated templates are included
-	# in the archive.
-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
-	;;
-      *)
-	if test "$GXX" = yes; then
-	  if test "$with_gnu_ld" = 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 "$verstring" && 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 $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
-	  fi
-	fi
-	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-	;;
-    esac
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-    ;;
-  linux*)
-    case $cc_basename in
-      KCC)
-	# Kuck and Associates, Inc. (KAI) C++ Compiler
-
-	# KCC will only create a shared library if the output file
-	# ends with ".so" (or ".sl" for HP-UX), so rename the library
-	# to its proper name (with version) after linking.
-	_LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
-
-	# Commands to make compiler produce verbose output that lists
-	# what "hidden" libraries, object files and flags are used when
-	# linking a shared library.
-	#
-	# There doesn't appear to be a way to prevent this compiler from
-	# explicitly linking system object files so we need to strip them
-	# from the output so that they don't get included in the library
-	# dependencies.
-	output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
-	# Archives containing C++ object files must be created using
-	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
-	;;
-      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'
-
-	runpath_var=LD_RUN_PATH
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-	# Commands to make compiler produce verbose output that lists
-	# what "hidden" libraries, object files and flags are used when
-	# linking a shared library.
-	#
-	# There doesn't appear to be a way to prevent this compiler from
-	# explicitly linking system object files so we need to strip them
-	# from the output so that they don't get included in the library
-	# dependencies.
-	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-	;;
-    esac
-    ;;
-  lynxos*)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  m88k*)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  mvs*)
-    case $cc_basename in
-      cxx)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      *)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-    esac
-    ;;
-  netbsd*)
-    # NetBSD uses g++ - do we need to do anything?
-    ;;
-  osf3*)
-    case $cc_basename in
-      KCC)
-	# Kuck and Associates, Inc. (KAI) C++ Compiler
-
-	# KCC will only create a shared library if the output file
-	# ends with ".so" (or ".sl" for HP-UX), so rename the library
-	# to its proper name (with version) after linking.
-	_LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --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)=:
-
-	# Archives containing C++ object files must be created using
-	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
-
-	;;
-      RCC)
-	# Rational C++ 2.4.1
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      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 "$verstring" && 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)=:
-
-	# Commands to make compiler produce verbose output that lists
-	# what "hidden" libraries, object files and flags are used when
-	# linking a shared library.
-	#
-	# There doesn't appear to be a way to prevent this compiler from
-	# explicitly linking system object files so we need to strip them
-	# from the output so that they don't get included in the library
-	# dependencies.
-	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-	;;
-      *)
-	if test "$GXX" = yes && test "$with_gnu_ld" = 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 "$verstring" && 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)=:
-
-	  # Commands to make compiler produce verbose output that lists
-	  # what "hidden" libraries, object files and flags are used when
-	  # linking a shared library.
-	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
-
-	else
-	  # FIXME: insert proper C++ library support
-	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
-	fi
-	;;
-    esac
-    ;;
-  osf4* | osf5*)
-    case $cc_basename in
-      KCC)
-	# Kuck and Associates, Inc. (KAI) C++ Compiler
-
-	# KCC will only create a shared library if the output file
-	# ends with ".so" (or ".sl" for HP-UX), so rename the library
-	# to its proper name (with version) after linking.
-	_LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --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)=:
-
-	# Archives containing C++ object files must be created using
-	# the KAI C++ compiler.
-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
-	;;
-      RCC)
-	# Rational C++ 2.4.1
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      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 "$verstring" && 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 "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done~
-	  echo "-hidden">> $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 "$verstring" && echo -set_version	$verstring` -update_registry $objdir/so_locations -o $lib~
-	  $rm $lib.exp'
-
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-	# Commands to make compiler produce verbose output that lists
-	# what "hidden" libraries, object files and flags are used when
-	# linking a shared library.
-	#
-	# There doesn't appear to be a way to prevent this compiler from
-	# explicitly linking system object files so we need to strip them
-	# from the output so that they don't get included in the library
-	# dependencies.
-	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-	;;
-      *)
-	if test "$GXX" = yes && test "$with_gnu_ld" = 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 "$verstring" && 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)=:
-
-	  # Commands to make compiler produce verbose output that lists
-	  # what "hidden" libraries, object files and flags are used when
-	  # linking a shared library.
-	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
-
-	else
-	  # FIXME: insert proper C++ library support
-	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
-	fi
-	;;
-    esac
-    ;;
-  psos*)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  sco*)
-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-    case $cc_basename in
-      CC)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      *)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-    esac
-    ;;
-  sunos4*)
-    case $cc_basename in
-      CC)
-	# Sun C++ 4.x
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      lcc)
-	# Lucid
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      *)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-    esac
-    ;;
-  solaris*)
-    case $cc_basename 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_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $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'
-
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-	case $host_os in
-	  solaris2.[0-5] | solaris2.[0-5].*) ;;
-	  *)
-	    # The C++ compiler is used as linker so we must use $wl
-	    # flag to pass the commands to the underlying system
-	    # linker.
-	    # Supported since Solaris 2.6 (maybe 2.5.1?)
-	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
-	    ;;
-	esac
-	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-
-	# Commands to make compiler produce verbose output that lists
-	# what "hidden" libraries, object files and flags are used when
-	# linking a shared library.
-	#
-	# There doesn't appear to be a way to prevent this compiler from
-	# explicitly linking system object files so we need to strip them
-	# from the output so that they don't get included in the library
-	# dependencies.
-	output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-
-	# Archives containing C++ object files must be created using
-	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
-	# necessary to make sure instantiated templates are included
-	# in the archive.
-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
-	;;
-      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'
-
-	# The C++ compiler must be used to create the archive.
-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
-	;;
-      *)
-	# GNU C++ compiler with Solaris linker
-	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
-	  if $CC --version | egrep -v '^2\.7' > /dev/null; then
-	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
-	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
-
-	    # Commands to make compiler produce verbose output that lists
-	    # what "hidden" libraries, object files and flags are used when
-	    # linking a shared library.
-	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
-	  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 $linker_flags ${wl}-h $wl$soname -o $lib'
-	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
-
-	    # Commands to make compiler produce verbose output that lists
-	    # what "hidden" libraries, object files and flags are used when
-	    # linking a shared library.
-	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
-	  fi
-
-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
-	fi
-	;;
-    esac
-    ;;
-  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-    ;;
-  tandem*)
-    case $cc_basename in
-      NCC)
-	# NonStop-UX NCC 3.20
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      *)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-    esac
-    ;;
-  vxworks*)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  *)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-esac
-AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
-# Figure out "hidden" C++ library dependencies from verbose
-# compiler output whening linking a shared library.
-cat > conftest.$ac_ext <<EOF
-class Foo
-{
-public:
-  Foo (void) { a = 0; }
-private:
-  int a;
-};
-EOF
-
-
-if AC_TRY_EVAL(ac_compile); then
-  # Parse the compiler output and extract the necessary
-  # objects, libraries and library flags.
-
-  # Sentinel used to keep track of whether or not we are before
-  # the conftest object file.
-  pre_test_object_deps_done=no
-
-  # The `*' in the case matches for architectures that use `case' in
-  # $output_verbose_cmd can trigger glob expansion during the loop
-  # eval without this substitution.
-  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
-
-  for p in `eval $output_verbose_link_cmd`; do
-    case $p in
-
-    -L* | -R* | -l*)
-       # Some compilers place space between "-{L,R}" and the path.
-       # Remove the space.
-       if test $p = "-L" \
-	  || test $p = "-R"; then
-	 prev=$p
-	 continue
-       else
-	 prev=
-       fi
-
-       if test "$pre_test_object_deps_done" = no; then
-	 case $p in
-	 -L* | -R*)
-	   # Internal compiler library paths should come after those
-	   # provided the user.  The postdeps already come after the
-	   # user supplied libs so there is no need to process them.
-	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
-	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
-	   else
-	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
-	   fi
-	   ;;
-	 # The "-l" case would never come before the object being
-	 # linked, so don't bother handling this case.
-	 esac
-       else
-	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
-	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
-	 else
-	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
-	 fi
-       fi
-       ;;
-
-    *.$objext|*.$libext)
-       # This assumes that the test object file only shows up
-       # once in the compiler output.
-       if test "$p" = "conftest.$objext"; then
-	 pre_test_object_deps_done=yes
-	 continue
-       fi
-
-       if test "$pre_test_object_deps_done" = no; then
-	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
-	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
-	 else
-	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
-	 fi
-       else
-	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
-	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
-	 else
-	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
-	 fi
-       fi
-       ;;
-
-    *) ;; # Ignore the rest.
-
-    esac
-  done
-
-  # Clean up.
-  rm -f a.out
-else
-  echo "libtool.m4: error: problem compiling C++ test program"
-fi
-
-$rm -f confest.$objext
-
-case " $_LT_AC_TAGVAR(postdeps, $1) " in
-*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
-*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ;;
-esac
-
-_LT_AC_TAGVAR(GCC, $1)="$GXX"
-_LT_AC_TAGVAR(LD, $1)="$LD"
-
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-AC_LIBTOOL_SYS_LIB_STRIP
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_DLOPEN_SELF($1)
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_POP
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_CXX_CONFIG
-
-
-# AC_LIBTOOL_LANG_GCJ_CONFIG
-# --------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined.  Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
-AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
-[AC_LANG_SAVE
-
-# Source file extension for C test sources.
-ac_ext=java
-
-# Object file extension for compiled C test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${GCJ-"gcj"}
-set dummy $CC
-compiler="[$]2"
-_LT_AC_TAGVAR(compiler, $1)=$CC
-
-# GCJ did not exist at the time GCC didn't implicitly link libc in.
-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-
-AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-AC_LIBTOOL_SYS_LIB_STRIP
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_DLOPEN_SELF($1)
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_RESTORE
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_GCJ_CONFIG
-
-
-# AC_LIBTOOL_LANG_RC_CONFIG
-# --------------------------
-# Ensure that the configuration vars for the Windows resource compiler are
-# suitably defined.  Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
-AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
-[AC_LANG_SAVE
-
-# Source file extension for RC test sources.
-ac_ext=rc
-
-# Object file extension for compiled RC test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
-
-# Code to be used in simple link tests
-lt_simple_link_test_code="$lt_simple_compile_test_code"
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${RC-"windres"}
-set dummy $CC
-compiler="[$]2"
-_LT_AC_TAGVAR(compiler, $1)=$CC
-_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_RESTORE
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_RC_CONFIG
-
-
-# AC_LIBTOOL_CONFIG([TAGNAME])
-# ----------------------------
-# If TAGNAME is not passed, then create an initial libtool script
-# with a default configuration from the untagged config vars.  Otherwise
-# add code to config.status for appending the configuration named by
-# TAGNAME from the matching tagged config vars.
-AC_DEFUN([AC_LIBTOOL_CONFIG],
-[# The else clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
-  # Now quote all the things that may contain metacharacters while being
-  # careful not to overquote the AC_SUBSTed values.  We take copies of the
-  # variables and quote the copies for generation of the libtool script.
-  for var in echo old_CC old_CFLAGS AR AR_FLAGS RANLIB LN_S LTCC NM SED SHELL \
-    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
-    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
-    deplibs_check_method reload_flag reload_cmds need_locks \
-    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
-    lt_cv_sys_global_symbol_to_c_name_address \
-    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
-    old_postinstall_cmds old_postuninstall_cmds \
-    _LT_AC_TAGVAR(compiler, $1) \
-    _LT_AC_TAGVAR(CC, $1) \
-    _LT_AC_TAGVAR(LD, $1) \
-    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
-    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
-    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
-    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
-    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
-    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
-    _LT_AC_TAGVAR(old_archive_cmds, $1) \
-    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
-    _LT_AC_TAGVAR(predep_objects, $1) \
-    _LT_AC_TAGVAR(postdep_objects, $1) \
-    _LT_AC_TAGVAR(predeps, $1) \
-    _LT_AC_TAGVAR(postdeps, $1) \
-    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
-    _LT_AC_TAGVAR(archive_cmds, $1) \
-    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
-    _LT_AC_TAGVAR(postinstall_cmds, $1) \
-    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
-    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
-    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
-    _LT_AC_TAGVAR(no_undefined_flag, $1) \
-    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
-    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
-    _LT_AC_TAGVAR(exclude_expsyms, $1) \
-    _LT_AC_TAGVAR(include_expsyms, $1); do
-
-    case $var in
-    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
-    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
-    _LT_AC_TAGVAR(archive_cmds, $1) | \
-    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
-    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
-    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
-    extract_expsyms_cmds | reload_cmds | finish_cmds | \
-    postinstall_cmds | postuninstall_cmds | \
-    old_postinstall_cmds | old_postuninstall_cmds | \
-    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
-      # Double-quote double-evaled strings.
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
-      ;;
-    *)
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
-      ;;
-    esac
-  done
-
-  case $lt_echo in
-  *'\[$]0 --fallback-echo"')
-    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
-    ;;
-  esac
-
-ifelse([$1], [],
-  [cfgfile="${ofile}T"
-  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
-  $rm -f "$cfgfile"
-  AC_MSG_NOTICE([creating $ofile])],
-  [cfgfile="$ofile"])
-
-  cat <<__EOF__ >> "$cfgfile"
-ifelse([$1], [],
-[#! $SHELL
-
-# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
-# Free Software Foundation, Inc.
-#
-# This file is part of GNU Libtool:
-# Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
-#
-# 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
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# 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.
-#
-# 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.
-
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="sed -e s/^X//"
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
-
-# The names of the tagged configurations supported by this script.
-available_tags=
-
-# ### BEGIN LIBTOOL CONFIG],
-[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
-
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
-
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
-
-# The host system.
-host_alias=$host_alias
-host=$host
-
-# An echo program that does not interpret backslashes.
-echo=$lt_echo
-
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
-
-# A C compiler.
-LTCC=$lt_LTCC
-
-# A language-specific compiler.
-CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
-
-# Is the compiler the GNU C compiler?
-with_gcc=$_LT_AC_TAGVAR(GCC, $1)
-
-# The linker used to build libraries.
-LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
-
-# Whether we need hard or soft links.
-LN_S=$lt_LN_S
-
-# A BSD-compatible nm program.
-NM=$lt_NM
-
-# A sed program that does not truncate output.
-SED=$lt_SED
-
-# A symbol stripping program
-STRIP=$STRIP
-
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
-
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
-
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
-
-# Used on cygwin: assembler.
-AS="$AS"
-
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
-
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
-
-# How to pass a linker flag through the compiler.
-wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
-
-# Object file suffix (normally "o").
-objext="$ac_objext"
-
-# Old archive suffix (normally "a").
-libext="$libext"
-
-# Executable file suffix (normally "").
-exeext="$exeext"
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
-pic_mode=$pic_mode
-
-# What is the maximum length of a command?
-max_cmd_len=$lt_cv_sys_max_cmd_len
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
-
-# Must we lock files when doing compilation ?
-need_locks=$lt_need_locks
-
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
-
-# Do we need a version for libraries?
-need_version=$need_version
-
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
-
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
-
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
-
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
-
-# Library versioning type.
-version_type=$version_type
-
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
-
-# List of archive names.  First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=$lt_library_names_spec
-
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
-
-# Commands used to build and install an old-style archive.
-RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
-
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
-archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
-postinstall_cmds=$lt_postinstall_cmds
-postuninstall_cmds=$lt_postuninstall_cmds
-
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
-
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
-
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd=$lt_file_magic_cmd
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
-
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
-
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$lt_finish_eval
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
-
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
-
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
-
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
-
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
-
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
-
-# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
-
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
-
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
-
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
-
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
-
-# Set to yes if exported symbols are required.
-always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
-
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
-
-# Symbols that must always be exported.
-include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
-
-ifelse([$1],[],
-[# ### END LIBTOOL CONFIG],
-[# ### END LIBTOOL TAG CONFIG: $tagname])
-
-__EOF__
-
-ifelse([$1],[], [
-  case $host_os in
-  aix3*)
-    cat <<\EOF >> "$cfgfile"
-
-# AIX sometimes has problems with the GCC collect2 program.  For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
-  COLLECT_NAMES=
-  export COLLECT_NAMES
-fi
-EOF
-    ;;
-
-  cygwin* | mingw* | pw32* | os2*)
-    cat <<'EOF' >> "$cfgfile"
-    # This is a source program that is used to create dlls on Windows
-    # Don't remove nor modify the starting and closing comments
-    _LT_AC_FILE_LTDLL_C
-    # This is a source program that is used to create import libraries
-    # on Windows for dlls which lack them. Don't remove nor modify the
-    # starting and closing comments
-    _LT_AC_FILE_IMPGEN_C
-EOF
-    ;;
-  esac
-
-  # We use sed instead of cat because bash on DJGPP gets confused if
-  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
-  # text mode, it properly converts lines to CR/LF.  This bash problem
-  # is reportedly fixed, but why not run on old versions too?
-  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
-
-  mv -f "$cfgfile" "$ofile" || \
-    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
-  chmod +x "$ofile"
-])
-else
-  # If there is no Makefile yet, we rely on a make rule to execute
-  # `config.status --recheck' to rerun these tests and create the
-  # libtool script then.
-  test -f Makefile && make "$ltmain"
-fi
-])# AC_LIBTOOL_CONFIG
-
-
-# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
-# -------------------------------------------
-AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
-
-_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-
-if test "$GCC" = yes; then
-  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
-
-  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
-    lt_cv_prog_compiler_rtti_exceptions,
-    [-fno-rtti -fno-exceptions -c conftest.$ac_ext], [],
-    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
-fi
-])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
-
-
-# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-# ---------------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
-[AC_REQUIRE([AC_CANONICAL_HOST])
-AC_REQUIRE([AC_PROG_NM])
-AC_REQUIRE([AC_OBJEXT])
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-AC_MSG_CHECKING([command to parse $NM output from $compiler object])
-AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
-[
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
-
-# Character class describing NM global symbol codes.
-symcode='[[BCDEGRST]]'
-
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
-
-# Transform the above into a raw symbol and a C symbol.
-symxfrm='\1 \2\3 \3'
-
-# Transform an extracted symbol line into a proper C declaration
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
-
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
-
-# Define system-specific variables.
-case $host_os in
-aix*)
-  symcode='[[BCDT]]'
-  ;;
-cygwin* | mingw* | pw32*)
-  symcode='[[ABCDGISTW]]'
-  ;;
-hpux*) # Its linker distinguishes data from code symbols
-  if test "$host_cpu" = ia64; then
-    symcode='[[ABCDEGRST]]'
-  fi
-  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
-  ;;
-irix* | nonstopux*)
-  symcode='[[BCDEGRST]]'
-  ;;
-solaris* | sysv5*)
-  symcode='[[BDT]]'
-  ;;
-sysv4)
-  symcode='[[DFNSTU]]'
-  ;;
-esac
-
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $host_os in
-mingw*)
-  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
-  ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
-  symcode='[[ABCDGISTW]]'
-fi
-
-# Try without a prefix undercore, then with it.
-for ac_symprfx in "" "_"; do
-
-  # Write the raw and C identifiers.
-  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
-
-  # Check to see that the pipe works correctly.
-  pipe_works=no
-
-  rm -f conftest*
-  cat > conftest.$ac_ext <<EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-EOF
-
-  if AC_TRY_EVAL(ac_compile); then
-    # Now try to grab the symbols.
-    nlist=conftest.nm
-    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
-      # Try sorting and uniquifying the output.
-      if sort "$nlist" | uniq > "$nlist"T; then
-	mv -f "$nlist"T "$nlist"
-      else
-	rm -f "$nlist"T
-      fi
-
-      # Make sure that we snagged all the symbols we need.
-      if egrep ' nm_test_var$' "$nlist" >/dev/null; then
-	if egrep ' nm_test_func$' "$nlist" >/dev/null; then
-	  cat <<EOF > conftest.$ac_ext
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-EOF
-	  # Now generate the symbol file.
-	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
-
-	  cat <<EOF >> conftest.$ac_ext
-#if defined (__STDC__) && __STDC__
-# define lt_ptr_t void *
-#else
-# define lt_ptr_t char *
-# define const
-#endif
-
-/* The mapping between symbol names and symbols. */
-const struct {
-  const char *name;
-  lt_ptr_t address;
-}
-lt_preloaded_symbols[[]] =
-{
-EOF
-	  sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
-	  cat <<\EOF >> conftest.$ac_ext
-  {0, (lt_ptr_t) 0}
-};
-
-#ifdef __cplusplus
-}
-#endif
-EOF
-	  # Now try linking the two files.
-	  mv conftest.$ac_objext conftstm.$ac_objext
-	  lt_save_LIBS="$LIBS"
-	  lt_save_CFLAGS="$CFLAGS"
-	  LIBS="conftstm.$ac_objext"
-	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
-	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
-	    pipe_works=yes
-	  fi
-	  LIBS="$lt_save_LIBS"
-	  CFLAGS="$lt_save_CFLAGS"
-	else
-	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
-	fi
-      else
-	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
-      fi
-    else
-      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
-    fi
-  else
-    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
-    cat conftest.$ac_ext >&5
-  fi
-  rm -f conftest* conftst*
-
-  # Do not use the global_symbol_pipe unless it works.
-  if test "$pipe_works" = yes; then
-    break
-  else
-    lt_cv_sys_global_symbol_pipe=
-  fi
-done
-])
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
-  lt_cv_sys_global_symbol_to_cdecl=
-fi
-if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
-  AC_MSG_RESULT(failed)
-else
-  AC_MSG_RESULT(ok)
-fi
-]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-
-
-# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
-# ---------------------------------------
-AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
-[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
-_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
-
-AC_MSG_CHECKING([for $compiler option to produce PIC])
- ifelse([$1],[CXX],[
-  # C++ specific cases for pic, static, wl, etc.
-  if test "$GXX" = yes; then
-    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
-    case $host_os in
-    aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      fi
-      ;;
-    amigaos*)
-      # FIXME: we need at least 68020 code to build shared libraries, but
-      # adding the `-m68020' flag to GCC prevents building anything better,
-      # like `-m68040'.
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
-      ;;
-    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
-    cygwin* | mingw* | os2*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
-      ;;
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
-      ;;
-    *djgpp*)
-      # DJGPP does not support shared libraries at all
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-      ;;
-    sysv4*MP*)
-      if test -d /usr/nec; then
-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
-      fi
-      ;;
-    hpux*)
-      # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
-      if test "$host_cpu" != ia64; then
-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-      fi
-      ;;
-    *)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-      ;;
-    esac
-  else
-    case $host_os in
-      aix4* | aix5*)
-	# All AIX code is PIC.
-	if test "$host_cpu" = ia64; then
-	  # AIX 5 now supports IA64 processor
-	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	else
-	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
-	fi
-	;;
-      chorus*)
-	case $cc_basename in
-	cxch68)
-	  # Green Hills C++ Compiler
-	  # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
-	  ;;
-	esac
-	;;
-      dgux*)
-	case $cc_basename in
-	  ec++)
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	    ;;
-	  ghcx)
-	    # Green Hills C++ Compiler
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      freebsd*)
-	# FreeBSD uses GNU C++
-	;;
-      hpux9* | hpux10* | hpux11*)
-	case $cc_basename in
-	  CC)
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
-	    if test "$host_cpu" != ia64; then
-	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
-	    fi
-	    ;;
-	  aCC)
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
-	    if test "$host_cpu" != ia64; then
-	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
-	    fi
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      irix5* | irix6* | nonstopux*)
-	case $cc_basename in
-	  CC)
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-	    # CC pic flag -KPIC is the default.
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      linux*)
-	case $cc_basename in
-	  KCC)
-	    # KAI C++ Compiler
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-	    ;;
-	  cxx)
-	    # Compaq C++
-	    # Make sure the PIC flag is empty.  It appears that all Alpha
-	    # Linux and Compaq Tru64 Unix objects are PIC.
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      lynxos*)
-	;;
-      m88k*)
-	;;
-      mvs*)
-	case $cc_basename in
-	  cxx)
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      netbsd*)
-	;;
-      osf3* | osf4* | osf5*)
-	case $cc_basename in
-	  KCC)
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
-	    ;;
-	  RCC)
-	    # Rational C++ 2.4.1
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-	    ;;
-	  cxx)
-	    # Digital/Compaq C++
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    # Make sure the PIC flag is empty.  It appears that all Alpha
-	    # Linux and Compaq Tru64 Unix objects are PIC.
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      psos*)
-	;;
-      sco*)
-	case $cc_basename in
-	  CC)
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      solaris*)
-	case $cc_basename in
-	  CC)
-	    # Sun C++ 4.2, 5.x and Centerline C++
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
-	    ;;
-	  gcx)
-	    # Green Hills C++ Compiler
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      sunos4*)
-	case $cc_basename in
-	  CC)
-	    # Sun C++ 4.x
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	    ;;
-	  lcc)
-	    # Lucid
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      tandem*)
-	case $cc_basename in
-	  NCC)
-	    # NonStop-UX NCC 3.20
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      unixware*)
-	;;
-      vxworks*)
-	;;
-      *)
-	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-	;;
-    esac
-  fi
-],
-[
-  if test "$GCC" = yes; then
-    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
-    case $host_os in
-      aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      fi
-      ;;
-
-    amigaos*)
-      # FIXME: we need at least 68020 code to build shared libraries, but
-      # adding the `-m68020' flag to GCC prevents building anything better,
-      # like `-m68040'.
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
-      ;;
-
-    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
-
-    cygwin* | mingw* | pw32* | os2*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
-      ;;
-
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
-      ;;
-
-    msdosdjgpp*)
-      # Just because we use GCC doesn't mean we suddenly get shared libraries
-      # on systems that don't support them.
-      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-      enable_shared=no
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec; then
-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
-      fi
-      ;;
-
-    hpux*)
-      # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
-      if test "$host_cpu" != ia64; then
-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-      fi
-      ;;
-
-    *)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-      ;;
-    esac
-  else
-    # PORTME Check for flag to pass linker flags through the system compiler.
-    case $host_os in
-    aix*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      else
-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
-      fi
-      ;;
-
-    cygwin* | mingw* | pw32* | os2*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
-      ;;
-
-    hpux9* | hpux10* | hpux11*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      if test "$host_cpu" != ia64; then
-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
-      fi
-      # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
-      ;;
-
-    irix5* | irix6* | nonstopux*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      # PIC (with -KPIC) is the default.
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-      ;;
-
-    newsos6)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    osf3* | osf4* | osf5*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      # All OSF/1 code is PIC.
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-      ;;
-
-    sco3.2v5*)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
-      ;;
-
-    solaris*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    sunos4*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-      if test "x$host_vendor" = xsni; then
-	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-LD'
-      else
-	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      fi
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec ;then
-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      fi
-      ;;
-
-    uts4*)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    *)
-      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-      ;;
-    esac
-  fi
-])
-AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
-  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
-    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
-    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC], [],
-    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
-     "" | " "*) ;;
-     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
-     esac],
-    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
-fi
-case "$host_os" in
-  # For platforms which do not support PIC, -DPIC is meaningless:
-  *djgpp*)
-    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-    ;;
-  *)
-    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC"
-    ;;
-esac
-])
-
-
-# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
-# ------------------------------------
-# See if the linker supports building shared libraries.
-AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
-[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-ifelse([$1],[CXX],[
-  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  case $host_os in
-  aix4* | aix5*)
-    # If we're using GNU nm, then we don't want the "-C" option.
-    # -C means demangle to AIX nm, but means don't demangle with GNU nm
-    if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
-      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
-    else
-      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
-    fi
-    ;;
-  cygwin* | mingw* | pw32*)
-    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
-  ;;
-  *)
-    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  ;;
-  esac
-],[
-  runpath_var=
-  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
-
-  _LT_AC_TAGVAR(archive_cmds, $1)=
-  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=
-  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
-  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
-  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
-  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
-  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
-  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
-  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-  _LT_AC_TAGVAR(hardcode_direct, $1)=no
-  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
-  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
-  _LT_AC_TAGVAR(always_export_symbols, $1)=no
-  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  # include_expsyms should be a list of space-separated symbols to be *always*
-  # included in the symbol list
-  _LT_AC_TAGVAR(include_expsyms, $1)=
-  # exclude_expsyms can be an egrep regular expression of symbols to exclude
-  # it will be wrapped by ` (' and `)$', so one must not match beginning or
-  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-  # as well as any symbol that contains `d'.
-  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
-  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
-  # platforms (ab)use it in PIC code, but their linkers get confused if
-  # the symbol is explicitly referenced.  Since portable code cannot
-  # rely on this symbol name, it's probably fine to never include it in
-  # preloaded symbol tables.
-  extract_expsyms_cmds=
-
-  case $host_os in
-  cygwin* | mingw* | pw32*)
-    # FIXME: the MSVC++ port hasn't been tested in a loooong time
-    # When not using gcc, we currently assume that we are using
-    # Microsoft Visual C++.
-    if test "$GCC" != yes; then
-      with_gnu_ld=no
-    fi
-    ;;
-  openbsd*)
-    with_gnu_ld=no
-    ;;
-  esac
 
-  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
-  if test "$with_gnu_ld" = yes; then
-    # If archive_cmds runs LD, not CC, wlarc should be empty
-    wlarc='${wl}'
-
-    # See if GNU ld supports shared libraries.
-    case $host_os in
-    aix3* | aix4* | aix5*)
-      # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	cat <<EOF 1>&2
+# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
+# ---------------------------------------
+AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
+[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
 
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
+AC_MSG_CHECKING([for $compiler option to produce PIC])
+ ifelse([$1],[CXX],[
+  # C++ specific cases for pic, static, wl, etc.
+  if test "$GXX" = yes; then
+    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
-EOF
+    case $host_os in
+    aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       fi
       ;;
-
     amigaos*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-
-      # Samuel A. Falvo II <kc5tja at dolphin.openprojects.net> reports
-      # that the semantics of dynamic libraries on AmigaOS, at least up
-      # to version 4, is to share data among multiple programs linked
-      # with the same dynamic library.  Since this doesn't match the
-      # behavior of shared libraries on other platforms, we can't use
-      # them.
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
       ;;
-
-    beos*)
-      if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-	# Joseph Beckenbach <jrb3 at best.com> 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'
-      else
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+    mingw* | os2* | pw32*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+      ;;
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
+    *djgpp*)
+      # DJGPP does not support shared libraries at all
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
       fi
       ;;
-
-    cygwin* | mingw* | pw32*)
-      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, as there is
-      # no search path for DLLs.
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
-
-      extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
-	sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
-	test -f $output_objdir/impgen.exe || (cd $output_objdir && \
-	if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
-	else $CC -o impgen impgen.c ; fi)~
-	$output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
-
-      _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
-
-      # cygwin and mingw dlls have different entry points and sets of symbols
-      # to exclude.
-      # FIXME: what about values for MSVC?
-      dll_entry=__cygwin_dll_entry at 12
-      dll_exclude_symbols=DllMain at 12,_cygwin_dll_entry at 12,_cygwin_noncygwin_dll_entry at 12~
-      case $host_os in
-      mingw*)
-	# mingw values
-	dll_entry=_DllMainCRTStartup at 12
-	dll_exclude_symbols=DllMain at 12,DllMainCRTStartup at 12,DllEntryPoint at 12~
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case "$host_cpu" in
+      hppa*64*|ia64*)
+	;;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	;;
+      esac
+      ;;
+    *)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      ;;
+    esac
+  else
+    case $host_os in
+      aix4* | aix5*)
+	# All AIX code is PIC.
+	if test "$host_cpu" = ia64; then
+	  # AIX 5 now supports IA64 processor
+	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	else
+	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+	fi
+	;;
+      chorus*)
+	case $cc_basename in
+	cxch68)
+	  # Green Hills C++ Compiler
+	  # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+	  ;;
+	esac
+	;;
+       darwin*)
+         # PIC is the default on this platform
+         # Common symbols not allowed in MH_DYLIB files
+         case "$cc_basename" in
+           xlc*)
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
+           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           ;;
+         esac
+       ;;
+      dgux*)
+	case $cc_basename in
+	  ec++)
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    ;;
+	  ghcx)
+	    # Green Hills C++ Compiler
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      freebsd* | kfreebsd*-gnu)
+	# FreeBSD uses GNU C++
+	;;
+      hpux9* | hpux10* | hpux11*)
+	case $cc_basename in
+	  CC)
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
+	    if test "$host_cpu" != ia64; then
+	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	    fi
+	    ;;
+	  aCC)
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
+	    case "$host_cpu" in
+	    hppa*64*|ia64*)
+	      # +Z the default
+	      ;;
+	    *)
+	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	      ;;
+	    esac
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      irix5* | irix6* | nonstopux*)
+	case $cc_basename in
+	  CC)
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    # CC pic flag -KPIC is the default.
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      linux*)
+	case $cc_basename in
+	  KCC)
+	    # KAI C++ Compiler
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	    ;;
+	  icpc)
+	    # Intel C++
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+	    ;;
+	  cxx)
+	    # Compaq C++
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      lynxos*)
+	;;
+      m88k*)
+	;;
+      mvs*)
+	case $cc_basename in
+	  cxx)
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      netbsd*)
+	;;
+      osf3* | osf4* | osf5*)
+	case $cc_basename in
+	  KCC)
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+	    ;;
+	  RCC)
+	    # Rational C++ 2.4.1
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  cxx)
+	    # Digital/Compaq C++
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      psos*)
+	;;
+      sco*)
+	case $cc_basename in
+	  CC)
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      solaris*)
+	case $cc_basename in
+	  CC)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+	    ;;
+	  gcx)
+	    # Green Hills C++ Compiler
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sunos4*)
+	case $cc_basename in
+	  CC)
+	    # Sun C++ 4.x
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	  lcc)
+	    # Lucid
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      tandem*)
+	case $cc_basename in
+	  NCC)
+	    # NonStop-UX NCC 3.20
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    ;;
+	  *)
+	    ;;
+	esac
 	;;
-      esac
-
-      # mingw and cygwin differ, and it's simplest to just exclude the union
-      # of the two symbol sets.
-      dll_exclude_symbols=DllMain at 12,_cygwin_dll_entry at 12,_cygwin_noncygwin_dll_entry at 12,DllMainCRTStartup at 12,DllEntryPoint at 12
+      unixware*)
+	;;
+      vxworks*)
+	;;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+	;;
+    esac
+  fi
+],
+[
+  if test "$GCC" = yes; then
+    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
-      # recent cygwin and mingw systems supply a stub DllMain which the user
-      # can override, but on older systems we have to supply one (in ltdll.c)
-      if test "x$lt_cv_need_dllmain" = "xyes"; then
-	ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
-	ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
-  	test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
-      else
-	ltdll_obj=
-	ltdll_cmds=
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       fi
-
-      # Extract the symbol export list from an `--export-all' def file,
-      # then regenerate the def file from the symbol export list, so that
-      # the compiled dll only exports the symbol export list.
-      # Be careful not to strip the DATA tag left by newer dlltools.
-      _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"'
-	$DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
-	sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
-
-      # If the export-symbols file already is a .def file (1st line
-      # is EXPORTS), use it as is.
-      # If DATA tags from a recent dlltool are present, honour them!
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`head -1 $export_symbols`" = xEXPORTS; then
-	  cp $export_symbols $output_objdir/$soname-def;
-	else
-	  echo EXPORTS > $output_objdir/$soname-def;
-	  _lt_hint=1;
-	  cat $export_symbols | while read symbol; do
-	   set dummy \$symbol;
-	   case \[$]# in
-	     2) echo "   \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
-	     *) echo "   \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
-	   esac;
-	   _lt_hint=`expr 1 + \$_lt_hint`;
-	  done;
-	fi~
-	'"$ltdll_cmds"'
-	$CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
-	$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
-	$CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
-	$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
-	$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
       ;;
 
-    netbsd*)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
-	wlarc=
-      else
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      fi
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
       ;;
 
-    solaris* | sysv5*)
-      if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	cat <<EOF 1>&2
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
 
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
+    mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+      ;;
 
-EOF
-      elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /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'
-      else
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-      fi
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
       ;;
 
-    sunos4*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      wlarc=
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      enable_shared=no
       ;;
 
-    *)
-      if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /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'
-      else
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
       fi
       ;;
-    esac
 
-    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
-      runpath_var=LD_RUN_PATH
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-      case $host_os in
-      cygwin* | mingw* | pw32*)
-	# dlltool doesn't understand --whole-archive et. al.
-	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case "$host_cpu" in
+      hppa*64*|ia64*)
+	# +Z the default
 	;;
       *)
-	# ancient GNU ld didn't support --whole-archive et. al.
-	if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
-  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-	else
-  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-	fi
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 	;;
       esac
-    fi
-  else
-    # PORTME fill in a description of your system's linker (not GNU ld)
-    case $host_os in
-    aix3*)
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
-      # Note: this linker hardcodes the directories in LIBPATH if there
-      # are no directories specified by -L.
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      if test "$GCC" = yes && test -z "$link_static_flag"; then
-	# Neither direct hardcoding nor static linking is supported with a
-	# broken collect2.
-	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
-      fi
       ;;
 
-    aix4* | aix5*)
+    *)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
       if test "$host_cpu" = ia64; then
-	# On IA64, the linker does run time linking by default, so we don't
-	# have to do anything special.
-	aix_use_runtimelinking=no
-	exp_sym_flag='-Bexport'
-	no_entry_flag=""
-      else
-	# If we're using GNU nm, then we don't want the "-C" option.
-	# -C means demangle to AIX nm, but means don't demangle with GNU nm
-	if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
-	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
-	else
-	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
-	fi
-
-	# KDE requires run time linking.  Make it the default.
-	aix_use_runtimelinking=yes
-	exp_sym_flag='-bexport'
-	no_entry_flag='-bnoentry'
-      fi
-
-      # When large executables or shared objects are built, AIX ld can
-      # have problems creating the table of contents.  If linking a library
-      # or program results in "error TOC overflow" add -mminimal-toc to
-      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
-      _LT_AC_TAGVAR(archive_cmds, $1)=''
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-
-      if test "$GCC" = yes; then
-	case $host_os in aix4.[012]|aix4.[012].*)
-	# We only want to do this on AIX 4.2 and lower, the check
-	# below for broken collect2 doesn't work under 4.3+
-	  collect2name=`${CC} -print-prog-name=collect2`
-	  if test -f "$collect2name" && \
-  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
-	  then
-  	  # We have reworked collect2
-  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-	  else
-  	  # We have old collect2
-  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
-  	  # It fails to find uninstalled libraries when the uninstalled
-  	  # path is not listed in the libpath.  Setting hardcode_minus_L
-  	  # to unsupported forces relinking
-  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-	  fi
-	esac
-	shared_flag='-shared'
+	# AIX 5 now supports IA64 processor
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       else
-	# not using gcc
-	if test "$host_cpu" = ia64; then
-  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-  	# chokes on -Wl,-G. The following line is correct:
-	  shared_flag='-G'
-	else
-  	if test "$aix_use_runtimelinking" = yes; then
-	    shared_flag='-qmkshrobj ${wl}-G'
-	  else
-	    shared_flag='-qmkshrobj'
-  	fi
-	fi
-      fi
-
-      # Let the compiler handle the export list.
-      _LT_AC_TAGVAR(always_export_symbols, $1)=no
-      if test "$aix_use_runtimelinking" = yes; then
-	# Warning - without using the other runtime loading flags (-brtl),
-	# -berok will link without error, but may produce a broken library.
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
-       # 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:'"$aix_libpath"
-	_LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-       else
-	if test "$host_cpu" = ia64; then
-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
-	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
-	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
-	else
-	 # 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:'"$aix_libpath"
-	  # Warning - without using the other run time loading flags,
-	  # -berok will link without error, but may produce a broken library.
-	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
-	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-	  # -bexpall does not export symbols beginning with underscore (_)
-	  _LT_AC_TAGVAR(always_export_symbols, $1)=yes
-	  # Exported symbols can be pulled into shared objects from archives
-	  _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)="\$CC $shared_flag"' -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'
-	fi
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
       fi
       ;;
+      darwin*)
+        # PIC is the default on this platform
+        # Common symbols not allowed in MH_DYLIB files
+       case "$cc_basename" in
+         xlc*)
+         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
+         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+         ;;
+       esac
+       ;;
 
-    amigaos*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      # see comment about different semantics on the GNU ld section
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
       ;;
 
-    bsdi4*)
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+    hpux9* | hpux10* | hpux11*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case "$host_cpu" in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
       ;;
 
-    cygwin* | mingw* | pw32*)
-      # When not using gcc, we currently assume that we are using
-      # Microsoft Visual C++.
-      # hardcode_libdir_flag_spec is actually meaningless, as there is
-      # no search path for DLLs.
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-      # Tell ltmain to make .lib files, not .a files.
-      libext=lib
-      # FIXME: Setting linknames here is a bad hack.
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | 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.
-      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
-      fix_srcfile_path='`cygpath -w "$srcfile"`'
+    irix5* | irix6* | nonstopux*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # PIC (with -KPIC) is the default.
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
       ;;
 
-    darwin* | rhapsody*)
-      case "$host_os" in
-      rhapsody* | darwin1.[[012]])
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
-	;;
-      *) # Darwin 1.3 on
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
-	;;
-      esac
-
-      # FIXME: Relying on posixy $() will cause problems for
-      #        cross-compilation, but unfortunately the echo tests do not
-      #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
-      #	       `"' quotes if we put them in here... so don't!
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
-      # We need to add '_' to the symbols in $export_symbols first
-      #_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
+    newsos6)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       ;;
 
-    dgux*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    linux*)
+      case $CC in
+      icc* | ecc*)
+	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+        ;;
+      ccc*)
+        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+        # All Alpha code is PIC.
+        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+        ;;
+      esac
       ;;
 
-    freebsd1*)
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    osf3* | osf4* | osf5*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # All OSF/1 code is PIC.
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
       ;;
 
-    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
-    # support.  Future versions do this automatically, but an explicit c++rt0.o
-    # does not break anything, and helps significantly (at the cost of a little
-    # extra space).
-    freebsd2.2*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
-      _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
+    sco3.2v5*)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
       ;;
 
-    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    solaris*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       ;;
 
-    # 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'
-      _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
+    sunos4*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       ;;
 
-    hpux9* | hpux10* | hpux11*)
-      if test "$GCC" = yes; then
-	case $host_os in
-	  hpux9*)
-	    _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'
-	    ;;
-	  *)
-	    if test "$host_cpu" = ia64; then
-	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	    else
-	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-	    fi
-	    ;;
-	esac
-      else
-	case $host_os in
-	  hpux9*)
-	    _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'
-	    ;;
-	  *)
-	    if test "$host_cpu" = ia64; then
-	      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
-	    else
-	      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
-	    fi
-	    ;;
-	esac
-      fi
-      if test "$host_cpu" = ia64; then
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-	_LT_AC_TAGVAR(hardcode_direct, $1)=no
-	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      else
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      fi
-      # hardcode_minus_L: Not really in the search PATH,
-      # but as the default location of the library.
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       ;;
 
-    irix5* | irix6* | nonstopux*)
-      if test "$GCC" = yes; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && 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 "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       fi
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
       ;;
 
-    netbsd*)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
-      else
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
-      fi
-      _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
+    uts4*)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       ;;
 
-    newsos6)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    *)
+      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
       ;;
+    esac
+  fi
+])
+AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
 
-    openbsd*)
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
+  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
+    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
+    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
+    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
+     "" | " "*) ;;
+     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+     esac],
+    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+fi
+case "$host_os" in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+    ;;
+  *)
+    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
+    ;;
+esac
+])
 
-      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-      else
-       case $host_os in
-	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
-	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-	   ;;
-	 *)
-	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
-	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	   ;;
-       esac
-      fi
-      ;;
 
-    os2*)
-      _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 "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
-      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
-      ;;
+# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
+# ------------------------------------
+# See if the linker supports building shared libraries.
+AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
+[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+ifelse([$1],[CXX],[
+  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  case $host_os in
+  aix4* | aix5*)
+    # If we're using GNU nm, then we don't want the "-C" option.
+    # -C means demangle to AIX nm, but means don't demangle with GNU nm
+    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+    else
+      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+    fi
+    ;;
+  pw32*)
+    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+  ;;
+  cygwin* | mingw*)
+    _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 > $export_symbols'
+  ;;
+  *)
+    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  esac
+],[
+  runpath_var=
+  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
+  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+  _LT_AC_TAGVAR(archive_cmds, $1)=
+  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
+  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
+  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+  _LT_AC_TAGVAR(hardcode_direct, $1)=no
+  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
+  _LT_AC_TAGVAR(module_cmds, $1)=
+  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
+  _LT_AC_TAGVAR(always_export_symbols, $1)=no
+  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  _LT_AC_TAGVAR(include_expsyms, $1)=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  extract_expsyms_cmds=
 
-    osf3*)
-      if test "$GCC" = 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 "$verstring" && 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 "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-      fi
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-      ;;
+  case $host_os in
+  cygwin* | mingw* | pw32*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix3* | aix4* | aix5*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	cat <<EOF 1>&2
 
-    osf4* | osf5*)	# as osf3* with the addition of -msym flag
-      if test "$GCC" = 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 "$verstring" && 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 \*'
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
-	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
 
-	# Both c and cxx compiler support -rpath directly
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+EOF
       fi
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
       ;;
 
-    sco3.2v5*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
-      runpath_var=LD_RUN_PATH
-      hardcode_runpath_var=yes
+    amigaos*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+
+      # Samuel A. Falvo II <kc5tja at dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we can't use
+      # them.
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
       ;;
 
-    solaris*)
-      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
-      if test "$GCC" = yes; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+	# Joseph Beckenbach <jrb3 at best.com> 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'
       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 "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
       fi
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      case $host_os in
-      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
-      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
-	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
-      esac
-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
       ;;
 
-    sunos4*)
-      if test "x$host_vendor" = 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'
+    cygwin* | mingw* | pw32*)
+      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+      # as there is no search path for DLLs.
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_AC_TAGVAR(always_export_symbols, $1)=no
+      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      _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 > $export_symbols'
+
+      if $LD --help 2>&1 | grep 'auto-import' > /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'
+	# 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 "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
+	else
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $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'
       else
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+	ld_shlibs=no
       fi
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
       ;;
 
-    sysv4)
-      if test "x$host_vendor" = xsni; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	_LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
       else
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	_LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+	_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'
       fi
-      runpath_var='LD_RUN_PATH'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    sysv4.3*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
       ;;
 
-    sysv4*MP*)
-      if test -d /usr/nec; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-	runpath_var=LD_RUN_PATH
-	hardcode_runpath_var=yes
-	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
-      fi
-      ;;
+    solaris* | sysv5*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	cat <<EOF 1>&2
 
-    sysv4.2uw2*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      hardcode_runpath_var=yes
-      runpath_var=LD_RUN_PATH
-      ;;
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
 
-   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
-      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
-      if test "$GCC" = yes; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+EOF
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /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'
       else
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
       fi
-      runpath_var='LD_RUN_PATH'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    sysv5*)
-      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
-      # $CC -shared without GNU ld will not create a library from C++
-      # object files and a static libstdc++, better avoid it by now
-      _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 "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-  		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      runpath_var='LD_RUN_PATH'
       ;;
 
-    uts4*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+    sunos4*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
       ;;
 
-    *)
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      ;;
-    esac
-  fi
-])
-AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
-  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-#
-# Do we need to explicitly link libc?
-#
-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
-if test "$enable_shared" = yes && test "$GCC" = yes; then
-  case $_LT_AC_TAGVAR(archive_cmds, $1) in
-  *'~'*)
-    # FIXME: we may have to deal with multi-command sequences.
-    ;;
-  '$CC '*)
-    # Test whether the compiler implicitly links with -lc since on some
-    # systems, -lgcc has to come before -lc. If gcc already passes -lc
-    # to ld, don't add -lc before -lgcc.
-    AC_MSG_CHECKING([whether -lc should be explicitly linked in])
-    $rm conftest*
-    echo 'static int dummy;' > conftest.$ac_ext
-
-    if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
-      soname=conftest
-      lib=conftest
-      libobjs=conftest.$ac_objext
-      deplibs=
-      wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
-      compiler_flags=-v
-      linker_flags=-v
-      verstring=
-      output_objdir=.
-      libname=conftest
-      lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=
-      if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
-      then
-	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+  linux*)
+    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds"
+      supports_anon_versioning=no
+      case `$LD -v 2>/dev/null` in
+        *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+        *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+        *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+        *\ 2.11.*) ;; # other 2.11 versions
+        *) supports_anon_versioning=yes ;;
+      esac
+      if test $supports_anon_versioning = yes; then
+        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
+cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+$echo "local: *; };" >> $output_objdir/$libname.ver~
+        $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
       else
-	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds"
       fi
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
     else
-      cat conftest.err 1>&5
-    fi
-    $rm conftest*
-    AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
-    ;;
-  esac
-fi
-])# AC_LIBTOOL_PROG_LD_SHLIBS
-
-
-# _LT_AC_FILE_LTDLL_C
-# -------------------
-# Be careful that the start marker always follows a newline.
-AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
-# /* ltdll.c starts here */
-# #define WIN32_LEAN_AND_MEAN
-# #include <windows.h>
-# #undef WIN32_LEAN_AND_MEAN
-# #include <stdio.h>
-#
-# #ifndef __CYGWIN__
-# #  ifdef __CYGWIN32__
-# #    define __CYGWIN__ __CYGWIN32__
-# #  endif
-# #endif
-#
-# #ifdef __cplusplus
-# extern "C" {
-# #endif
-# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
-# #ifdef __cplusplus
-# }
-# #endif
-#
-# #ifdef __CYGWIN__
-# #include <cygwin/cygwin_dll.h>
-# DECLARE_CYGWIN_DLL( DllMain );
-# #endif
-# HINSTANCE __hDllInstance_base;
-#
-# BOOL APIENTRY
-# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
-# {
-#   __hDllInstance_base = hInst;
-#   return TRUE;
-# }
-# /* ltdll.c ends here */
-])# _LT_AC_FILE_LTDLL_C
-
-
-# _LT_AC_FILE_IMPGEN_C
-# --------------------
-# Be careful that the start marker always follows a newline.
-AC_DEFUN([_LT_AC_FILE_IMPGEN_C], [
-# /* impgen.c starts here */
-# /*   Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
-#
-#  This file is part of GNU libtool.
-#
-#  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
-#  the Free Software Foundation; either version 2 of the License, or
-#  (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  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.
-#  */
-#
-# #include <stdio.h>		/* for printf() */
-# #include <unistd.h>		/* for open(), lseek(), read() */
-# #include <fcntl.h>		/* for O_RDONLY, O_BINARY */
-# #include <string.h>		/* for strdup() */
-#
-# /* O_BINARY isn't required (or even defined sometimes) under Unix */
-# #ifndef O_BINARY
-# #define O_BINARY 0
-# #endif
-#
-# static unsigned int
-# pe_get16 (fd, offset)
-#      int fd;
-#      int offset;
-# {
-#   unsigned char b[2];
-#   lseek (fd, offset, SEEK_SET);
-#   read (fd, b, 2);
-#   return b[0] + (b[1]<<8);
-# }
-#
-# static unsigned int
-# pe_get32 (fd, offset)
-#     int fd;
-#     int offset;
-# {
-#   unsigned char b[4];
-#   lseek (fd, offset, SEEK_SET);
-#   read (fd, b, 4);
-#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
-# }
-#
-# static unsigned int
-# pe_as32 (ptr)
-#      void *ptr;
-# {
-#   unsigned char *b = ptr;
-#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
-# }
-#
-# int
-# main (argc, argv)
-#     int argc;
-#     char *argv[];
-# {
-#     int dll;
-#     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
-#     unsigned long export_rva, export_size, nsections, secptr, expptr;
-#     unsigned long name_rvas, nexp;
-#     unsigned char *expdata, *erva;
-#     char *filename, *dll_name;
-#
-#     filename = argv[1];
-#
-#     dll = open(filename, O_RDONLY|O_BINARY);
-#     if (dll < 1)
-# 	return 1;
-#
-#     dll_name = filename;
-#
-#     for (i=0; filename[i]; i++)
-# 	if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
-# 	    dll_name = filename + i +1;
-#
-#     pe_header_offset = pe_get32 (dll, 0x3c);
-#     opthdr_ofs = pe_header_offset + 4 + 20;
-#     num_entries = pe_get32 (dll, opthdr_ofs + 92);
-#
-#     if (num_entries < 1) /* no exports */
-# 	return 1;
-#
-#     export_rva = pe_get32 (dll, opthdr_ofs + 96);
-#     export_size = pe_get32 (dll, opthdr_ofs + 100);
-#     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
-#     secptr = (pe_header_offset + 4 + 20 +
-# 	      pe_get16 (dll, pe_header_offset + 4 + 16));
-#
-#     expptr = 0;
-#     for (i = 0; i < nsections; i++)
-#     {
-# 	char sname[8];
-# 	unsigned long secptr1 = secptr + 40 * i;
-# 	unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
-# 	unsigned long vsize = pe_get32 (dll, secptr1 + 16);
-# 	unsigned long fptr = pe_get32 (dll, secptr1 + 20);
-# 	lseek(dll, secptr1, SEEK_SET);
-# 	read(dll, sname, 8);
-# 	if (vaddr <= export_rva && vaddr+vsize > export_rva)
-# 	{
-# 	    expptr = fptr + (export_rva - vaddr);
-# 	    if (export_rva + export_size > vaddr + vsize)
-# 		export_size = vsize - (export_rva - vaddr);
-# 	    break;
-# 	}
-#     }
-#
-#     expdata = (unsigned char*)malloc(export_size);
-#     lseek (dll, expptr, SEEK_SET);
-#     read (dll, expdata, export_size);
-#     erva = expdata - export_rva;
-#
-#     nexp = pe_as32 (expdata+24);
-#     name_rvas = pe_as32 (expdata+32);
-#
-#     printf ("EXPORTS\n");
-#     for (i = 0; i<nexp; i++)
-#     {
-# 	unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
-# 	printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
-#     }
-#
-#     return 0;
-# }
-# /* impgen.c ends here */
-])# _LT_AC_FILE_IMPGEN_C
-
-# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
-# ---------------------------------
-AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
-
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    fi
+    ;;
 
-# old names
-AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
-AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
-AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
-AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
-AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
-AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
-AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /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'
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+    esac
 
-# This is just to silence aclocal about the macro not being used
-ifelse([AC_DISABLE_FAST_INSTALL])
+    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
+      runpath_var=LD_RUN_PATH
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+      # ancient GNU ld didn't support --whole-archive et. al.
+      if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+ 	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+      fi
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      if test "$GCC" = yes && test -z "$link_static_flag"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+      fi
+      ;;
 
-AC_DEFUN([LT_AC_PROG_GCJ],
-[AC_CHECK_TOOL(GCJ, gcj, no)
-  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
-  AC_SUBST(GCJFLAGS)
-])
+    aix4* | aix5*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+	else
+	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+	fi
+	aix_use_runtimelinking=no
 
-AC_DEFUN([LT_AC_PROG_RC],
-[AC_CHECK_TOOL(RC, windres, no)
-])
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
+	  for ld_flag in $LDFLAGS; do
+  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+  	    aix_use_runtimelinking=yes
+  	    break
+  	  fi
+	  done
+	esac
 
-# NOTE: This macro has been submitted for inclusion into   #
-#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
-#  a released version of Autoconf we should remove this    #
-#  macro and use it instead.                               #
-# LT_AC_PROG_SED
-# --------------
-# Check for a fully-functional sed program, that truncates
-# as few characters as possible.  Prefer GNU sed if found.
-AC_DEFUN([LT_AC_PROG_SED],
-[AC_MSG_CHECKING([for a sed that does not truncate output])
-AC_CACHE_VAL(lt_cv_path_SED,
-[# Loop through the user's path and test for sed and gsed.
-# Then use that list of sed's as ones to test for truncation.
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_prog in sed gsed; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
-        _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
       fi
-    done
-  done
-done
 
-  # Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
-  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
-  trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
-# Create a (secure) tmp directory for tmp files.
-: ${TMPDIR=/tmp}
-{
-  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
-}  ||
-{
-  tmp=$TMPDIR/sed$$-$RANDOM
-  (umask 077 && mkdir $tmp)
-} ||
-{
-   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
-   { (exit 1); exit 1; }
-}
-  _max=0
-  _count=0
-  # Add /usr/xpg4/bin/sed as it is typically found on Solaris
-  # along with /bin/sed that truncates output.
-  for _sed in $_sed_list /usr/xpg4/bin/sed; do
-    test ! -f ${_sed} && break
-    cat /dev/null > "$tmp/sed.in"
-    _count=0
-    echo $ECHO_N "0123456789$ECHO_C" >"$tmp/sed.in"
-    # Check for GNU sed and select it if it is found.
-    if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
-      lt_cv_path_SED=${_sed}
-      break;
-    fi
-    while true; do
-      cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
-      mv "$tmp/sed.tmp" "$tmp/sed.in"
-      cp "$tmp/sed.in" "$tmp/sed.nl"
-      echo >>"$tmp/sed.nl"
-      ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
-      cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
-      # 10000 chars as input seems more than enough
-      test $_count -gt 10 && break
-      _count=`expr $_count + 1`
-      if test $_count -gt $_max; then
-        _max=$_count
-        lt_cv_path_SED=$_sed
-      fi
-    done
-  done
-  rm -rf "$tmp"
-])
-AC_MSG_RESULT([$SED])
-])
+      _LT_AC_TAGVAR(archive_cmds, $1)=''
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
-# Do all the work for Automake.                            -*- Autoconf -*-
+      if test "$GCC" = yes; then
+	case $host_os in aix4.[012]|aix4.[012].*)
+	# We only want to do this on AIX 4.2 and lower, the check
+	# below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" && \
+  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	  then
+  	  # We have reworked collect2
+  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+	  else
+  	  # We have old collect2
+  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+  	  # It fails to find uninstalled libraries when the uninstalled
+  	  # path is not listed in the libpath.  Setting hardcode_minus_L
+  	  # to unsupported forces relinking
+  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+	  fi
+	esac
+	shared_flag='-shared'
+      else
+	# not using gcc
+	if test "$host_cpu" = ia64; then
+  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+  	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+  	if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+  	fi
+	fi
+      fi
 
-# This macro actually does too much some checks are only needed if
-# your package does certain things.  But this isn't really a big deal.
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+      if test "$aix_use_runtimelinking" = yes; then
+	# Warning - without using the other runtime loading flags (-brtl),
+	# -berok will link without error, but may produce a broken library.
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
+       # 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:'"$aix_libpath"
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+       else
+	if test "$host_cpu" = ia64; then
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # 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:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+	  # -bexpall does not export symbols beginning with underscore (_)
+	  _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+	  # Exported symbols can be pulled into shared objects from archives
+	  _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)="\$CC $shared_flag"' -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'
+	fi
+      fi
+      ;;
 
-# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
-# Free Software Foundation, Inc.
+    amigaos*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      # see comment about different semantics on the GNU ld section
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
 
-# 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
+    bsdi[[45]]*)
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+      ;;
 
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $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.
+      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
+      fix_srcfile_path='`cygpath -w "$srcfile"`'
+      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      ;;
 
-# 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.
+    darwin* | rhapsody*)
+      case "$host_os" in
+        rhapsody* | darwin1.[[012]])
+         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         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_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+    if test "$GCC" = yes ; then
+    	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'
+      # 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 "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $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 "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    else
+      case "$cc_basename" in
+        xlc*)
+         output_verbose_link_cmd='echo'
+         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # 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 "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $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(ld_shlibs, $1)=no
+          ;;
+      esac
+    fi
+      ;;
 
-# serial 8
+    dgux*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
 
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
-# written in clear, in which case automake, when reading aclocal.m4,
-# will think it sees a *use*, and therefore will trigger all it's
-# C support machinery.  Also note that it means that autoscan, seeing
-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+    freebsd1*)
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
 
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      _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
+      ;;
 
-AC_PREREQ([2.54])
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
 
-# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
-# the ones we care about.
-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | kfreebsd*-gnu)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      _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
+      ;;
 
-# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
-# AM_INIT_AUTOMAKE([OPTIONS])
-# -----------------------------------------------
-# The call with PACKAGE and VERSION arguments is the old style
-# call (pre autoconf-2.50), which is being phased out.  PACKAGE
-# and VERSION should now be passed to AC_INIT and removed from
-# the call to AM_INIT_AUTOMAKE.
-# We support both call styles for the transition.  After
-# the next Automake release, Autoconf can make the AC_INIT
-# arguments mandatory, and then we can depend on a new Autoconf
-# release and drop the old call support.
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
- AC_REQUIRE([AC_PROG_INSTALL])dnl
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
-   test -f $srcdir/config.status; then
-  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
+    hpux9*)
+      if test "$GCC" = 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'
+      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
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
-  if (cygpath --version) >/dev/null 2>/dev/null; then
-    CYGPATH_W='cygpath -w'
-  else
-    CYGPATH_W=echo
-  fi
-fi
-AC_SUBST([CYGPATH_W])
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      ;;
 
-# Define the identity of the package.
-dnl Distinguish between old-style and new-style calls.
-m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
- AC_SUBST([PACKAGE], [$1])dnl
- AC_SUBST([VERSION], [$2])],
-[_AM_SET_OPTIONS([$1])dnl
- AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
- AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
+    hpux10* | hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case "$host_cpu" 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 -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case "$host_cpu" in
+	hppa*64*|ia64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  ;;
+	*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	case "$host_cpu" in
+	hppa*64*)
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
+	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+	  ;;
+	ia64*)
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
+	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
-_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+	  ;;
+	*)
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
-# Some tools Automake needs.
-AC_REQUIRE([AM_SANITY_CHECK])dnl
-AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
-AM_MISSING_PROG(AMTAR, tar)
-AM_PROG_INSTALL_SH
-AM_PROG_INSTALL_STRIP
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
-AC_REQUIRE([AC_PROG_AWK])dnl
-AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+	  ;;
+	esac
+      fi
+      ;;
 
-_AM_IF_OPTION([no-dependencies],,
-[AC_PROVIDE_IFELSE([AC_PROG_CC],
-                  [_AM_DEPENDENCIES(CC)],
-                  [define([AC_PROG_CC],
-                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_CXX],
-                  [_AM_DEPENDENCIES(CXX)],
-                  [define([AC_PROG_CXX],
-                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
-])
-])
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && 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 "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
 
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      _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
+      ;;
 
-# When config.status generates a header, we must update the stamp-h file.
-# This file resides in the same directory as the config header
-# that is generated.  The stamp files are numbered to have different names.
+    newsos6)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
 
-# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
-# loop where config.status creates the headers, so we can generate
-# our stamp files there.
-AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
-[_am_stamp_count=`expr ${_am_stamp_count-0} + 1`
-echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+    openbsd*)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      else
+       case $host_os in
+	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	   _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(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	   ;;
+       esac
+      fi
+      ;;
 
-# Copyright 2002  Free Software Foundation, Inc.
+    os2*)
+      _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 "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
 
-# 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
+    osf3*)
+      if test "$GCC" = 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 "$verstring" && 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 "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      ;;
 
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = 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 "$verstring" && 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 \*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
 
-# 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
+	# Both c and cxx compiler support -rpath directly
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      ;;
 
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
+    sco3.2v5*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+      runpath_var=LD_RUN_PATH
+      hardcode_runpath_var=yes
+      ;;
 
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-	 [AM_AUTOMAKE_VERSION([1.7.2])])
+    solaris*)
+      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$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 "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      case $host_os in
+      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
+	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
+      esac
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
 
-# Helper functions for option handling.                    -*- Autoconf -*-
+    sunos4*)
+      if test "x$host_vendor" = 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'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
 
-# Copyright 2001, 2002  Free Software Foundation, Inc.
+    sysv4)
+      case $host_vendor in
+	sni)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
+        ;;
+	motorola)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
 
-# 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
+    sysv4.3*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+      ;;
 
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
+      fi
+      ;;
 
-# 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.
+    sysv4.2uw2*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      hardcode_runpath_var=yes
+      runpath_var=LD_RUN_PATH
+      ;;
 
-# serial 2
+   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
+      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      runpath_var='LD_RUN_PATH'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
 
-# _AM_MANGLE_OPTION(NAME)
-# -----------------------
-AC_DEFUN([_AM_MANGLE_OPTION],
-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+    sysv5*)
+      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
+      # $CC -shared without GNU ld will not create a library from C++
+      # object files and a static libstdc++, better avoid it by now
+      _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 "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+  		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      runpath_var='LD_RUN_PATH'
+      ;;
 
-# _AM_SET_OPTION(NAME)
-# ------------------------------
-# Set option NAME.  Presently that only means defining a flag for this option.
-AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+    uts4*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
 
-# _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
-# OPTIONS is a space-separated list of Automake options.
-AC_DEFUN([_AM_SET_OPTIONS],
-[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+    *)
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+    esac
+  fi
+])
+AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
-# -------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-AC_DEFUN([_AM_IF_OPTION],
-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
 
 #
-# Check to make sure that the build environment is sane.
+# Do we need to explicitly link libc?
 #
+case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+  # Assume -lc should be added
+  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $_LT_AC_TAGVAR(archive_cmds, $1) in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
+      $rm conftest*
+      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
+        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
+        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
+        then
+	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+        else
+	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+        fi
+        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
+      ;;
+    esac
+  fi
+  ;;
+esac
+])# AC_LIBTOOL_PROG_LD_SHLIBS
 
-# Copyright 1996, 1997, 2000, 2001 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
+# _LT_AC_FILE_LTDLL_C
+# -------------------
+# Be careful that the start marker always follows a newline.
+AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
+# /* ltdll.c starts here */
+# #define WIN32_LEAN_AND_MEAN
+# #include <windows.h>
+# #undef WIN32_LEAN_AND_MEAN
+# #include <stdio.h>
+#
+# #ifndef __CYGWIN__
+# #  ifdef __CYGWIN32__
+# #    define __CYGWIN__ __CYGWIN32__
+# #  endif
+# #endif
+#
+# #ifdef __cplusplus
+# extern "C" {
+# #endif
+# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
+# #ifdef __cplusplus
+# }
+# #endif
+#
+# #ifdef __CYGWIN__
+# #include <cygwin/cygwin_dll.h>
+# DECLARE_CYGWIN_DLL( DllMain );
+# #endif
+# HINSTANCE __hDllInstance_base;
+#
+# BOOL APIENTRY
+# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
+# {
+#   __hDllInstance_base = hInst;
+#   return TRUE;
+# }
+# /* ltdll.c ends here */
+])# _LT_AC_FILE_LTDLL_C
 
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
 
-# 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.
+# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
+# ---------------------------------
+AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
 
-# serial 3
 
-# AM_SANITY_CHECK
-# ---------------
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
-   if test "$[*]" = "X"; then
-      # -L didn't work.
-      set X `ls -t $srcdir/configure conftest.file`
-   fi
-   rm -f conftest.file
-   if test "$[*]" != "X $srcdir/configure conftest.file" \
-      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+# old names
+AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
+AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
+AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
+AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
+AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
 
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
-alias in your environment])
-   fi
+# This is just to silence aclocal about the macro not being used
+ifelse([AC_DISABLE_FAST_INSTALL])
 
-   test "$[2]" = conftest.file
-   )
-then
-   # Ok.
-   :
-else
-   AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-AC_MSG_RESULT(yes)])
+AC_DEFUN([LT_AC_PROG_GCJ],
+[AC_CHECK_TOOL(GCJ, gcj, no)
+  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+  AC_SUBST(GCJFLAGS)
+])
 
-#  -*- Autoconf -*-
+AC_DEFUN([LT_AC_PROG_RC],
+[AC_CHECK_TOOL(RC, windres, no)
+])
 
+# NOTE: This macro has been submitted for inclusion into   #
+#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
+#  a released version of Autoconf we should remove this    #
+#  macro and use it instead.                               #
+# LT_AC_PROG_SED
+# --------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible.  Prefer GNU sed if found.
+AC_DEFUN([LT_AC_PROG_SED],
+[AC_MSG_CHECKING([for a sed that does not truncate output])
+AC_CACHE_VAL(lt_cv_path_SED,
+[# Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for lt_ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+      fi
+    done
+  done
+done
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+  test ! -f $lt_ac_sed && break
+  cat /dev/null > conftest.in
+  lt_ac_count=0
+  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+  # Check for GNU sed and select it if it is found.
+  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+    lt_cv_path_SED=$lt_ac_sed
+    break
+  fi
+  while true; do
+    cat conftest.in conftest.in >conftest.tmp
+    mv conftest.tmp conftest.in
+    cp conftest.in conftest.nl
+    echo >>conftest.nl
+    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+    cmp -s conftest.out conftest.nl || break
+    # 10000 chars as input seems more than enough
+    test $lt_ac_count -gt 10 && break
+    lt_ac_count=`expr $lt_ac_count + 1`
+    if test $lt_ac_count -gt $lt_ac_max; then
+      lt_ac_max=$lt_ac_count
+      lt_cv_path_SED=$lt_ac_sed
+    fi
+  done
+done
+])
+SED=$lt_cv_path_SED
+AC_MSG_RESULT([$SED])
+])
 
-# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+#                                                        -*- Autoconf -*-
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
+# Generated from amversion.in; do not edit by hand.
 
 # 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
@@ -11040,40 +6098,26 @@ AC_MSG_RESULT(yes)])
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 
-# 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.
-
-# serial 3
-
-# AM_MISSING_PROG(NAME, PROGRAM)
-# ------------------------------
-AC_DEFUN([AM_MISSING_PROG],
-[AC_REQUIRE([AM_MISSING_HAS_RUN])
-$1=${$1-"${am_missing_run}$2"}
-AC_SUBST($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
 
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
 
-# AM_MISSING_HAS_RUN
-# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
-AC_DEFUN([AM_MISSING_HAS_RUN],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
-else
-  am_missing_run=
-  AC_MSG_WARN([`missing' script is too old or missing])
-fi
-])
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION so it can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+	 [AM_AUTOMAKE_VERSION([1.9.4])])
 
 # AM_AUX_DIR_EXPAND
 
-# Copyright 2001 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003 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
@@ -11128,19 +6172,16 @@ fi
 # absolute PATH.  The drawback is that using absolute paths prevent a
 # configured tree to be moved without reconfiguration.
 
-# Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])
-
-AC_DEFUN([AM_AUX_DIR_EXPAND], [
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
 # expand $ac_aux_dir to an absolute path
 am_aux_dir=`cd $ac_aux_dir && pwd`
 ])
 
-# AM_PROG_INSTALL_SH
-# ------------------
-# Define $install_sh.
+# AM_CONDITIONAL                                              -*- Autoconf -*-
 
-# Copyright 2001 Free Software Foundation, Inc.
+# Copyright (C) 1997, 2000, 2001, 2003, 2004 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
@@ -11157,53 +6198,34 @@ am_aux_dir=`cd $ac_aux_dir && pwd`
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 # 02111-1307, USA.
 
-AC_DEFUN([AM_PROG_INSTALL_SH],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
-AC_SUBST(install_sh)])
-
-# AM_PROG_INSTALL_STRIP
-
-# Copyright 2001 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# 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.
+# serial 6
 
-# One issue with vendor `install' (even GNU) is that you can't
-# specify the program used to strip binaries.  This is especially
-# annoying in cross-compiling environments, where the build's strip
-# is unlikely to handle the host's binaries.
-# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
-# STRIPPROG with the value of the STRIP variable (set by the user).
-AC_DEFUN([AM_PROG_INSTALL_STRIP],
-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
-if test "$cross_compiling" != no; then
-  AC_CHECK_TOOL([STRIP], [strip], :)
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
 fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
-AC_SUBST([INSTALL_STRIP_PROGRAM])])
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
 
-# serial 4						-*- Autoconf -*-
+# serial 7						-*- Autoconf -*-
 
-# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
+# 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
@@ -11264,18 +6286,34 @@ AC_CACHE_CHECK([dependency style of $depcc],
   # using a relative directory.
   cp "$am_depcomp" conftest.dir
   cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
 
   am_cv_$1_dependencies_compiler_type=none
   if test "$am_compiler_list" = ""; then
      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
   fi
   for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
     # We need to recreate these files for each test, as the compiler may
     # overwrite some of them when testing with obscure command lines.
     # This happens at least with the AIX C compiler.
-    echo '#include "conftest.h"' > conftest.c
-    echo 'int i;' > conftest.h
-    echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
     case $depmode in
     nosideeffect)
@@ -11293,13 +6331,25 @@ AC_CACHE_CHECK([dependency style of $depcc],
     # mode.  It turns out that the SunPro C++ compiler does not properly
     # handle `-M -o', and we need to detect this.
     if depmode=$depmode \
-       source=conftest.c object=conftest.o \
-       depfile=conftest.Po tmpdepfile=conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o conftest.o conftest.c >/dev/null 2>&1 &&
-       grep conftest.h conftest.Po > /dev/null 2>&1 &&
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      am_cv_$1_dependencies_compiler_type=$depmode
-      break
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_$1_dependencies_compiler_type=$depmode
+        break
+      fi
     fi
   done
 
@@ -11321,16 +6371,8 @@ AM_CONDITIONAL([am__fastdep$1], [
 # Choose a directory name for dependency files.
 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
 AC_DEFUN([AM_SET_DEPDIR],
-[rm -f .deps 2>/dev/null
-mkdir .deps 2>/dev/null
-if test -d .deps; then
-  DEPDIR=.deps
-else
-  # MS-DOS does not allow filenames that begin with a dot.
-  DEPDIR=_deps
-fi
-rmdir .deps 2>/dev/null
-AC_SUBST([DEPDIR])
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
 ])
 
 
@@ -11338,8 +6380,8 @@ AC_SUBST([DEPDIR])
 # ------------
 AC_DEFUN([AM_DEP_TRACK],
 [AC_ARG_ENABLE(dependency-tracking,
-[  --disable-dependency-tracking Speeds up one-time builds
-  --enable-dependency-tracking  Do not reject slow dependency extractors])
+[  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors])
 if test "x$enable_dependency_tracking" != xno; then
   am_depcomp="$ac_aux_dir/depcomp"
   AMDEPBACKSLASH='\'
@@ -11350,7 +6392,8 @@ AC_SUBST([AMDEPBACKSLASH])
 
 # Generate code to set up dependency tracking.   -*- Autoconf -*-
 
-# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
+#   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
@@ -11386,27 +6429,21 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
   else
     continue
   fi
-  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
-  # Extract the definition of DEP_FILES from the Makefile without
-  # running `make'.
-  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+  # Extract the definition of DEPDIR, am__include, and am__quote
+  # from the Makefile without running `make'.
+  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
   test -z "$DEPDIR" && continue
+  am__include=`sed -n 's/^am__include = //p' < "$mf"`
+  test -z "am__include" && continue
+  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
   # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n -e '/^U = / s///p' < "$mf"`
-  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
-  # We invoke sed twice because it is the simplest approach to
-  # changing $(DEPDIR) to its actual value in the expansion.
-  for file in `sed -n -e '
-    /^DEP_FILES = .*\\\\$/ {
-      s/^DEP_FILES = //
-      :loop
-	s/\\\\$//
-	p
-	n
-	/\\\\$/ b loop
-      p
-    }
-    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+  U=`sed -n 's/^U = //p' < "$mf"`
+  # Find all dependency output files, they are included files with
+  # $(DEPDIR) in their names.  We invoke sed twice because it is the
+  # simplest approach to changing $(DEPDIR) to its actual value in the
+  # expansion.
+  for file in `sed -n "
+    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
     # Make sure the directory exists.
     test -f "$dirpart/$file" && continue
@@ -11419,22 +6456,230 @@ done
 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
 
-# AM_OUTPUT_DEPENDENCY_COMMANDS
-# -----------------------------
-# This macro should only be invoked once -- use via AC_REQUIRE.
-#
-# This code is only required when automatic dependency tracking
-# is enabled.  FIXME.  This creates each `.P' file that we will
-# need in order to bootstrap the dependency handling code.
-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
-[AC_CONFIG_COMMANDS([depfiles],
-     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
-     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# 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.
+
+# serial 7
+
+# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
+AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
+
+# Do all the work for Automake.                            -*- Autoconf -*-
+
+# This macro actually does too much some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+# 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# 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.
+
+# serial 11
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.58])dnl
+dnl Autoconf wants to disallow AM_ names.  We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+   test -f $srcdir/config.status; then
+  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+	      		     [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+                  [_AM_DEPENDENCIES(CC)],
+                  [define([AC_PROG_CC],
+                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+                  [_AM_DEPENDENCIES(CXX)],
+                  [define([AC_PROG_CXX],
+                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
+])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $1 | $1:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+
+# Copyright (C) 2001, 2003 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# 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.
+
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+#                                                          -*- Autoconf -*-
+# Copyright (C) 2003  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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# 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.
+
+# serial 1
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
 
 # Check to see how 'make' treats includes.	-*- Autoconf -*-
 
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003 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
@@ -11459,8 +6704,9 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 AC_DEFUN([AM_MAKE_INCLUDE],
 [am_make=${MAKE-make}
 cat > confinc << 'END'
-doit:
+am__doit:
 	@echo done
+.PHONY: am__doit
 END
 # If we don't find an include directive, just comment out the code.
 AC_MSG_CHECKING([for style of include used by $am_make])
@@ -11488,15 +6734,16 @@ if test "$am__include" = "#"; then
       _am_result=BSD
    fi
 fi
-AC_SUBST(am__include)
-AC_SUBST(am__quote)
-AC_MSG_RESULT($_am_result)
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
 rm -f confinc confmf
 ])
 
-# AM_CONDITIONAL                                              -*- Autoconf -*-
+#  -*- Autoconf -*-
+
 
-# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1999, 2000, 2001, 2003 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
@@ -11513,33 +6760,155 @@ rm -f confinc confmf
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 # 02111-1307, USA.
 
-# serial 5
+# serial 3
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
 
-AC_PREREQ(2.52)
 
-# AM_CONDITIONAL(NAME, SHELL-CONDITION)
-# -------------------------------------
-# Define a conditional.
-AC_DEFUN([AM_CONDITIONAL],
-[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
-        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])
-AC_SUBST([$1_FALSE])
-if $2; then
-  $1_TRUE=
-  $1_FALSE='#'
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
 else
-  $1_TRUE='#'
-  $1_FALSE=
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
 fi
-AC_CONFIG_COMMANDS_PRE(
-[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
-  AC_MSG_ERROR([conditional "$1" was never defined.
-Usually this means the macro was only invoked conditionally.])
-fi])])
+])
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
+
+# Copyright (C) 2003, 2004 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# 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.
+
+# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
+# created by `make install' are always world readable, even if the
+# installer happens to have an overly restrictive umask (e.g. 077).
+# This was a mistake.  There are at least two reasons why we must not
+# use `-m 0755':
+#   - it causes special bits like SGID to be ignored,
+#   - it may be too restrictive (some setups expect 775 directories).
+#
+# Do not use -m 0755 and let people choose whatever they expect by
+# setting umask.
+#
+# We cannot accept any implementation of `mkdir' that recognizes `-p'.
+# Some implementations (such as Solaris 8's) are not thread-safe: if a
+# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
+# concurrently, both version can detect that a/ is missing, but only
+# one can create it and the other will error out.  Consequently we
+# restrict ourselves to GNU make (using the --version option ensures
+# this.)
+AC_DEFUN([AM_PROG_MKDIR_P],
+[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+  # We used to keeping the `.' as first argument, in order to
+  # allow $(mkdir_p) to be used without argument.  As in
+  #   $(mkdir_p) $(somedir)
+  # where $(somedir) is conditionally defined.  However this is wrong
+  # for two reasons:
+  #  1. if the package is installed by a user who cannot write `.'
+  #     make install will fail,
+  #  2. the above comment should most certainly read
+  #     $(mkdir_p) $(DESTDIR)$(somedir)
+  #     so it does not work when $(somedir) is undefined and
+  #     $(DESTDIR) is not.
+  #  To support the latter case, we have to write
+  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+  #  so the `.' trick is pointless.
+  mkdir_p='mkdir -p --'
+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.
+  for d in ./-p ./--version;
+  do
+    test -d $d && rmdir $d
+  done
+  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+  if test -f "$ac_aux_dir/mkinstalldirs"; then
+    mkdir_p='$(mkinstalldirs)'
+  else
+    mkdir_p='$(install_sh) -d'
+  fi
+fi
+AC_SUBST([mkdir_p])])
+
+# Helper functions for option handling.                    -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003  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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# 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.
+
+# serial 2
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
+#
+# Check to make sure that the build environment is sane.
+#
 
-# Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2000, 2001, 2003 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
@@ -11558,22 +6927,50 @@ fi])])
 
 # serial 3
 
-AC_PREREQ(2.50)
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
 
-# AM_PROG_LEX
-# -----------
-# Autoconf leaves LEX=: if lex or flex can't be found.  Change that to a
-# "missing" invocation, for better error output.
-AC_DEFUN([AM_PROG_LEX],
-[AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
-AC_REQUIRE([AC_PROG_LEX])dnl
-if test "$LEX" = :; then
-  LEX=${am_missing_run}flex
-fi])
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
 
-# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# AM_PROG_INSTALL_STRIP
 
-# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003 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
@@ -11590,10 +6987,132 @@ fi])
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 # 02111-1307, USA.
 
-AC_PREREQ([2.52])
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Check how to create a tarball.                            -*- Autoconf -*-
 
-# serial 6
+# Copyright (C) 2004  Free Software Foundation, Inc.
 
-# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
-AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
+# 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# 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.
+
+# serial 1
+
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+#     tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+#     $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+     [m4_case([$1], [ustar],, [pax],,
+              [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+  case $_am_tool in
+  gnutar)
+    for _am_tar in tar gnutar gtar;
+    do
+      AM_RUN_LOG([$_am_tar --version]) && break
+    done
+    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+    am__untar="$_am_tar -xf -"
+    ;;
+  plaintar)
+    # Must skip GNU tar: if it does not support --format= it doesn't create
+    # ustar tarball either.
+    (tar --version) >/dev/null 2>&1 && continue
+    am__tar='tar chf - "$$tardir"'
+    am__tar_='tar chf - "$tardir"'
+    am__untar='tar xf -'
+    ;;
+  pax)
+    am__tar='pax -L -x $1 -w "$$tardir"'
+    am__tar_='pax -L -x $1 -w "$tardir"'
+    am__untar='pax -r'
+    ;;
+  cpio)
+    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+    am__untar='cpio -i -H $1 -d'
+    ;;
+  none)
+    am__tar=false
+    am__tar_=false
+    am__untar=false
+    ;;
+  esac
+
+  # If the value was cached, stop now.  We just wanted to have am__tar
+  # and am__untar set.
+  test -n "${am_cv_prog_tar_$1}" && break
+
+  # tar/untar a dummy directory, and stop if the command works
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  echo GrepMe > conftest.dir/file
+  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  rm -rf conftest.dir
+  if test -s conftest.tar; then
+    AM_RUN_LOG([$am__untar <conftest.tar])
+    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+  fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
 
+m4_include([acinclude.m4])
diff --git a/admin/ChangeLog b/admin/ChangeLog
deleted file mode 100644
index 2599e43..0000000
--- a/admin/ChangeLog
+++ /dev/null
@@ -1,761 +0,0 @@
-2002-10-03  Stephan Kulow  <coolo at kde.org>
-	
-	* made config.h.bot obsolete
-
-2002-04-26  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in removed bogus message
-
-2001-11-07  Walter Tasin <tasin at kdevelop.org>
-
-	* now #MIN_CONFIG tag takes parameters for KDE_USE_QT, too.
-          e.g. #MIN_CONFIG(2.2) for qt 2.2 usage
-
-2000-11-30  David Faure  <faure at kde.org>
-
-	* acinclude.m4.in: Added kde_moduledir which points to $prefix/lib/kde2/
-
-2000-07-24  Alex Zepeda  <jazepeda at pacbell.net>
-
-	* acinclude.m4.in: Remove the test for malloc.h
-
-2000-04-05  Michael Matz  <matz at ifh.de>
-
-        * config.pl : added kludge for compiling regexp's even if
-	perl < 5.005 is installed
-	* conf.change.pl : added support for autoconf 2.14.1
-
-2000-03-27  David Faure  <faure at kde.org>
-
-	* acinclude.m4.in, Makefile.common: changed inst-apps semantics
-	If present, only the subdirs it lists will be configured and compiled.
-	If absent, then subdirs is used (and inst-apps isn't generated anymore)
-
-2000-03-22  David Faure  <faure at kde.org>
-
-	* am_edit: Added support for KDE_ICON = AUTO
-
-2000-03-18  David Faure  <faure at kde.org>
-
-	* Makefile.common: Rewrote the list-of-Makefiles generation to make it
-	simpler and nicer, using create_makefiles' way of doing it.
-	Added support for COMPILE_LAST and COMPILE_FIRST in toplevel Makefile.am
-
-2000-01-05  David Faure  <faure at kde.org>
-
-	* Makefile.common: hacked around autoconf bug (setting INSTALL to ".."
-	when calling a subconfigure and INSTALL is already set).
-
-1999-12-15  Waldo Bastian  <bastian at kde.org>
-
-        * acinclude.m4.in: Test whether Qt compiles AND LINKS without flags.
-
-1999-06-24  Stephan Kulow  <coolo at kde.org>
-
-	* am_edit: generate correct Makefile entries for kde-i18n toplevel directories
-	* am_edit:
-
-1999-06-14  Stephan Kulow  <coolo at kde.org>
-
-	* am_edit: remove idl generated files on make clean
-
-1999-06-09  Stephan Kulow  <coolo at kde.org>
-
-	* am_edit: skipping programs with variables in sources for final
-
-1999-06-07  Stephan Kulow  <coolo at kde.org>
-
-	* am_edit: added support for idl files
-
-1999-06-02  Stephan Kulow  <coolo at kde.org>
-
-	* Makefile.common: preserve comments in .pot files to make it
-		possible for programmers and translators to comment them
-
-1999-06-02  Simon Hausmann <hausmann at kde.org>
-
-        * acinclude.m4.in: added kde_servicetypesdir
-
-1999-06-02  David Faure  <faure at kde.org>
-
-	* acinclude.m4.in: removed LIB_KFM and LIB_KDEUTIL aliases
-
-1999-05-28  Simon Hausmann <hausmann at kde.org>
-
-	* acinclude.m4.in: added kde_servicesdir
-
-1999-05-27  Stephan Kulow  <coolo at kde.org>
-
-	* am_edit: lots of changes for better support of --enable-final
-
-1999-05-22  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: added support for --with-dmalloc
-
-1999-05-19  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: added support for --enable-final
-
-	* am_edit: added support for --enable-final
-	
-1999-05-06  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: change the meaning of --disable-debug
-
-1999-05-04  Helge Deller <deller at gmx.de>
-
-	* acinclude.m4.in: the test for the X-includes/directories failed,
-	when compile & link work without special directories (as on HP-UX).
-
-1999-04-20  Stephan Kulow  <coolo at kde.org>
-
-	* am_edit: adding DESTDIR replacement for rm and uninstall-local
-	too. Seems very useless, but makes testing for uninstall easier
-
-1999-04-01  David Faure  <faure at kde.org>
-
-	* acinclude.m4.in: Added -lkfile to $(LIB_KIO)
-
-1999-03-30  David Faure  <faure at kde.org>
-
-	* acinclude.m4.in: Added AC_CHECK_KDEMAXPATHLEN, which defines KDEMAXPATHLEN.
-
-1999-03-29  David Faure  <faure at kde.org>
-
-	* acinclude.m4.in: added LIB_X11 to XPMLIB and GLLIB, because
-	on SCO, they need it _after_ themselves.
-
-1999-03-28  David Faure  <faure at kde.org>
-
-	* acinclude.m4.in: added LIB_KFM to LIB_KAB alias
-
-1999-03-26  David Faure  <faure at kde.org>
-
-	* acinclude.m4.in: made LIB_KFILE use LIB_KIO instead of LIB_KFM
-	added LIB_KFORMULA
-
-1999-03-20  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: check for libXext - for Russel :)
-
-1999-03-16  Stephan Kulow  <coolo at kde.org>
-
-	* acinclud3.m4.in: extend the MICO test with a list of possible
-	places where to find CORBA.h
-
-1999-03-15  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: move $QTINC and $QTLIB in search path
-
-1999-03-14  Stephan Kulow  <coolo at kde.org>
-
-	* am_edit: install-root is obsolute. Use DESTDIR always
-
-1999-03-03  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: fixing a bug, that $QTDIR was taken before --with-qt*
-	* acinclude.m4.in: added KDE_USE_QT, that you can choose if to
-	use QT 2.0 or KDE 1.0
-	
-	* Makefile.common: added target package-merge
-
-	* am_edit: many fixes to the POFILES handeling of am_edit
-
-1999-03-02  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: first look at libjpeg6b (from kdesupport) then
-	for libjpeg
-
-	* config.*, libtool.*: update to the latest FSF tools
-
-1999-02-23  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: error when Sparc CC is used. Better use it in
-	configure and tell him the story then letting him find it while
-	compiling
-
-	* acinclude.m4.in: adding KDE_CHECK_EXTRA_LIBS to all possible tests,
-	so that --with-extra-includes is used when needed.
-
-	* acinclude.m4.in: configure looks for giflib30, so it should say so
-
-	* acinclude.m4.in: don't overwrite x include parameters. Patch by
-	Ari Lemmke <ari.lemmke at regex.fi> (bug report 741)
-	
-1999-02-20  Stephan Kulow <coolo at kde.org>
-
-	* acinclude.m4.in: fixing KDE_CHECK_PATHS for rechecking. In case
-	of defaults (kdelibs) configure didn't cache the results
-
-1999-02-18  David Faure  <faure at kde.org>
-
-	* acinclude.m4.in: added AC_CHECK_S_ISSOCK, to fix #706.
-
-1999-02-17  David Faure  <faure at kde.org>
-
-	* acinclude.m4.in: added AC_CHECK_RANDOM, just like
-	AC_CHECK_USLEEP, to enable the fake if necessary.
-
-1999-02-13  Kurt Granroth <granroth at kde.org>
-
-        * acinclude.m4.in: look for QT-2.0
-
-1999-02-05  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: in macro KDE_FIND_PATH treat user given dirs
-	and $PATH dirs the same. Added seperate test for to find binary
-	($5) to replace findperl
-
-1999-01-28  Stephan Kulow  <coolo at kde.org>
-
-	* automoc: added patch by jbb to be a little bit more precise about
-	the number of sourcefiles that include the moc file if it's != 1.
-	Besides that automoc will fail with exit code, so the Makefile.cvs
-	process does stop in case a problem accoured.
-
-	* automoc: don't hardcode header suffix, but allow *.h, *.hh and *.H
-	
-1999-01-27  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: try qobjcoll.h and qapplication.h before saying
-	OK to qt headers. (I could kill SuSE for splitting into qt-dev
-	and qt-compat)
-
-1991-01-23  Stephan Kulow  <coolo at kde.org>
-
-	* automoc: added fixes by JB <jb.nz at writeme.com>
-
-1999-01-21  Stephan Kulow  <coolo at kde.org>
-
-	* automoc: added --help and --path (for use in dist-hook)
-
-1999-01-20  Alex Zepeda  <garbanzo at hooked.net>
-	
-	* ltconfig: added entries for FreeBSD 4.x
-
-1999-01-19  Stephan Kulow  <coolo at kde.org>
-
-	* automoc: added a distclean-metasources target which deletes all
-	moc files and let distclean depend on it
-
-1999-01-18  Stephan Kulow  <coolo at kde.org>
-
-        * automoc: several fixes (ignore comment lines + join lines
-         with \ )
-	
-	* automoc: support META_INCLUDES in case the header files are
-	not in the same dir as the sources.
-
-1999-01-17  Stephan Kulow  <coolo at kde.org>
-
-	* automoc: several fixes.
-
-1999-01-16  Stephan Kulow  <coolo at kde.org>
-
-	* automoc: added support for included MOC files.
-
-	* acinclude.m4.in: use srcdir for the subdirs stuff as well
-
-	* automoc: added better command line parsing and some preparation
-	for handling "normal" moc files
-
-	* acinclude.m4.in: added aliases for libkio and libkdeutil
-
-1999-01-15  Harri Porten  <porten at kde.org>
-
-	* automoc: Carved in stone syntax for Makefile.in:
-	{program}_METASOURCES = USE_AUTOMOC [{suffix}]
-
-1999-01-15  Stephan Kulow  <coolo at kde.org>
-
-	* Makefile.common: set top_srcdir to .
-
-1999-01-14  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: don't use config.h.bot any longer
-
-1999-01-08  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: added KDE_CHECK_NEWLIBS
-
-	* acinclude.m4.in: test for Qt even if both --with-qt-headers and
-	--with-qt-libraries are given. They may be wrong.
-	
-1999-01-06  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: change the MOC test so it can be used for other
-	tools as well
-
-1998-12-28  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: look for QT-1.42 since kpanel needs it
-
-1998-12-27  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: added /usr/lib for libpython test
-	
-	* acinclude.m4.in: take my email address out of it and added a
-	reference to www.kde.org/faq
-
-	* acinclude.m4.in: use Qt >= 1.4
-
-	* acinclude.m4.in: added KDE_CHECK_NAMESPACES
-	
-1998-12-18  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: test for directories to exist before saying yes
-	to compilation :)
-
-1998-12-14  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: added CPLUSPLUS for the kimgio test. It's
-	only important for shaman right now, but at least there it is :)
-
-1998-12-12  Stephan Kulow  <coolo at kde.org>
-
-	* Makefile.cvs: added common Makefile.cvs
-
-	* acinclude.m4.in: Thomas.Schwarz at pro-sieben.de reported a very ugly
-	bug in AC_PROG_CXXCPP, so I added my own version
-	
-	* acinclude.m4.in: added KDE_CREATE_SUBDIRS_LIST to simplify
-	most toplevel configures
-
-1998-12-11  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: added call to AC_PROG_CXXCPP. Not really sure why
-	it never caused problems
-
-	* acinclude.m4.in: moved LIBTIFF alias
-
-	* acinclude.m4.in: only test for the existance of libkimgio if the
-	user wants to. For 99% of the applications it doesn't matter if
-	configure can find libkimgio :)
-	
-1998-12-10  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: some changes to the python check to handle $LIBDL
-
-1998-12-09  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: make Alex's tiff test a real one
-	
-	* acinclude.m4.in: fix the LIB_TIFF alias to really expand
-
-1998-12-08  Alex Zepeda  <garbanzo at hooked.net>
-
-	* acinclude.m4.in: Fix tiff test to use libtiff34 if it exists.
-	This is what the FreeBSD port installs to for whatever reason.
-
-	* acinclude.m4.in: s/kde/KDE/ (at least in some of the
-	descriptions, obviously no variable names were touched.
-
-1998-12-08  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: moved the LIB_QT alias to the Qt check
-	
-	* acinclude.m4.in: unset KDEDIR before running conftest
-	
-	* acinclude.m4.in: fixed mean typo
-	
-	* acinclude.m4.in: added the copyright header for the gettext
-	tests, so that people know we're legal ;)
-
-	* acinclude.m4.in: set language to C++ before testing QIMGIO	
-
-1998-12-07  Alex Zepeda  <garbanzo at hooked.net>
-
-	* acinclude.m4.in: Fix PNG test to use correct ANSI C code, and
-	not trip up gcc.
-
-1998-12-07  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: don't hardcode -ldl
-	
-	* acinclude.m4.in: move the LIB_X11 alias to the X test to make it
-	useful for kdesupport as well
-	
-	* acinclude.m4.in: give the word CHECK_KIMGIO a meaning in really
-	checking for it
-
-	* acinclude.m4.in: simple fix to prevent kimgio test from compiling
-	KDE application in kdelibs
-
-1998-12-05  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: let KDE_CHECK_KIMGIO depend on AC_PATH_KDE,
-	otherwise most tests fail. It didn't mean anything to 90% of the
-	packages since they test for KDE before kimgio, but for shaman
-	it does
-
-	* ltconfig: the real fix for the Solaris && gcc problem.
-	Thanks Kurt for reporting it and Alexandre for fixing it :)
-
-1998-12-04  Stephan Kulow  <coolo at kde.org>
-
-	* libtool.*: update again
-
-	* acinclude.m4.in: changed the function to test for libnsl to
-	inet_ntoa since UnixWare 7's version did not have gethostbyname,
-	but needs libnsl
-
-1998-12-02  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: fixed the MOC test (again) to use the PATH variable
-	correctly (with the correct seperator)
-
-	* config.guess: update from the soon to be released autoconf-2.13
-
-1998-12-01  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: fixes for the MOC test. Use PATH now when found
-
-1998-11-30  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: extended the MOC test. It checks now for the
-	first line of the output of "moc --help" and looks for Qt in it.
-
-1998-11-27  Stephan Kulow  <coolo at kde.org>
-
-	* ltconfig: another libtool update. Fixes an ugly bug on Solaris,
-	when GNU ld is in path before Solaris ld, but gcc uses the later
-
-1998-11-26  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: made the Qt test more advance to check for qt
-	1.41 - I still need to make it better, but there shouldn't be too
-	many qt releases in a row, would there? ;)
-
-	* ltconfig: libtool update with better BSD/OS support
-
-1998-11-22  Stephan Kulow  <coolo at kde.org>
-
-	* ltconfig: cool - libtool uses g++ now to link libraries on Solaris.
-	This means, static objects become usuable on that plattforms (some
-	others as well).
-
-1998-11-20  Stephan Kulow  <coolo at kde.org>
-
-	* ltmain.sh: updated libtool from their CVS - fixes bugs we haven't
-	found and adds some more features, that we do not need ;-)
-
-1998-11-19  David Faure  <faure at kde.org>
-
-	* acinclude.m4.in: added AC_CHECK_UTMP_FILE, taken from kdebase
-
-1998-11-16  Harri Porten  <porten at kde.org>
-
-	* automoc: take care of "ar" object files, too.
-
-1998-11-16  Stephan Kulow  <coolo at kde.org>
-
-	* libtool.m4.in: revised my --silent patch. The solution
-	Alexandre suggested is much better.
-
-1998-11-15  Stephan Kulow  <coolo at kde.org>
-
-	* ltconfig.in: done some tweakings to support -export-dynamic
-	with egcs
-
-	* config.sub: wow - BeOS support :)
-
-1998-11-14  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: don't use rpath for test program, if rpath is
-	disabled for applications
-
-	* ltconfig: patched libtool to make it silent without making
-	ltconfig silent
-
-	* acinclude.m4.in: make libtool silent again
-
-	* libtool.m4.in: update to libtool-981114 (untested stuff, but
-	we have to test it to make it tested - sounds that logical? :-)
-
-	* libtool.m4.in: moved the self stricked libtool tests to "our"
-	file.
-
-	* acinclude.m4.in: moved ChangeLog of kdebase which I used to
-	maintain acinclude.m4.in logs to kde-common/admin. Hopefully I
-	will maintain it more often from now on :)
-
-1998-07-27  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: fixed some things in the MOC test
-
-	* acinclude.m4.in: fixed this damn msgfmt test
-
-1998-06-02  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: ignore msgfmt, if not GNU gettext
-
-1998-05-28  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: fixed KDE_CHECK_STL. Checks for HP and SGI type
-
-	* acinclude.m4.in: embraced every variable with "" to make
-	it consistent
-
-	* acinclude.m4.in: various fixes for the koffice checks
-	(mico, ministl and python)
-
-1998-05-16  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: don't use KDE_CHECK_QT_DIRECT, when
-	--with-qt-libs are given
-
-1998-04-21  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: cool, I found the trick to suppress the ls
-	errors
-
-1998-04-20  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: rewrote the qt checking test, since it
-	didn't work under FreeBSD, since it relied on the .so link.
-	The new version is a little bit buggy, but I need some testing
-	to make it perfect
-
-	* acinclude.m4.in: fixed the side effects of the PAM test
-
-1998-04-18  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: hopefully fixed the PAM test (I rewrote it)
-
-1998-04-16  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: extended the getsockname test inspired
-	by a patch by Martin Baulig
-
-	* configure.in: added test for utmp file
-
-	* acinclude.m4.in: made --without-pam default
-	
-
-1998-04-06  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: don't test compiling, linking, running in
-	one step. This proved to be too dangerous for my mail box.
-	
-1998-03-21  Stephan Kulow  <coolo at kde.org>
-
-	* libtool.m4.in: created some new macros to work around this
-	ugly (because long) help of configure --enable-shared/static
-
-1998-03-05  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: set language to C++ before trying the ksize_t
-	test
-
-	* configure.in: sorted the Makefile entries alphabeticly (and all
-	together: we love xemacs! we love xemacs! ;)
-	
-	* configure.in: added sk
-
-	* acinclude.m4.in: substitute x_libraries to fix the empty -rpath
-	
-1998-03-03  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: add a rpath for every shared library, that is
-	linked too (especially X11 libraries)
-	
-Tue Feb 24 22:04:59 1998  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: added kde_sounddir and set kde_minidir to
-	kde_icondir/mini to break not too much
-
-Sun Feb 15 18:25:50 1998  Stephan Kulow  <coolo at kde.org>
-
-	* configure.in: added bugfix by Bob Miller <kbob at engr.sgi.com>
-	(correct reset of IFS)
-	
-Wed Feb 11 00:53:11 1998  Stephan Kulow  <coolo at kde.org>
-
-	* configure.in: made shadow under Linux default, since the
-	binaries will work also under non-shadow systems. The only problem
-	left is PAM, so I disabled shadow in case, PAM is present
-
-Tue Feb 10 16:46:32 1998  Stephan Kulow  <coolo at kde.org>
-
-	* configure.in: added test for nice to find out, if the option
-	-nice works for the screensavers
-
-	* acinclude.m4.in: port to LynxOS. For this I moved all library
-	search routines in KDE_MISC_TESTS, so I don't need to write this
-	in every package
-
-	* README: some grammar fixes
-
-	* acinclude.m4.in: search for the libs in the exec_prefix, when
-	it's present
-	
-Sun Feb  8 14:07:23 1998  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: updated all packages
-
-	* libtool.m4.in: applied patch for libtool.m4.in to show the
-	correct default for shared and static
-	
-
-Sat Feb  7 10:56:00 1998  Stephan Kulow  <coolo at kde.org>
-
-	* configure.in: good news - KDE is relocatable again.
-
-	* libtool.m4.in: updated to latest libtool 1.0i
-
-Fri Feb  6 21:26:51 1998  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: added a AC_PROVIDE for AC_PROG_CC and
-	AC_PROG_CPP to KDE_CHECK_COMPILERS
-
-Thu Feb  5 16:27:47 1998  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: put $QTDIR/bin before /usr/bin in the path to
-	look for moc. I don't know why, but I got a report, that configure
-	found /usr/bin/moc under Solaris
-
-Fri Jan 30 15:47:50 1998  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: export LIBRARY_PATH after reset to the saved
-	value
-	
-	* acinclude.m4.in: unset the LIBRARY_PATH to get a relieable
-	result when trying to find, if Qt compiles without -L
-
-Sat Jan 24 00:45:52 1998  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: fixed another bug in AC_PATH_KDE
-
-Thu Jan 22 14:46:15 1998  Stephan Kulow  <coolo at kde.org>
-
-	* configure.in: fixed an ugly bug in AC_BASE_PATH_KDE
-
-	* kappfinder/kappfinder.in: let kappfinder create by configure to
-	allow the use of the kde_ paths
-
-Wed Jan 21 22:19:35 1998  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in: - added a install_root prefix to all paths, if
-	set, to enable package managers to move the whole installation at once
-	- added --with-install-root to set the install_root prefix
-
-Tue Jan 20 22:41:04 1998  Stephan Kulow  <coolo at kde.org>
-
-	* configure.in: added NOOPT_CXXFLAGS to allow kioslave to be
-	compiled without -O2
-
-Mon Jan 19 21:55:21 1998  Stephan Kulow  <coolo at kde.org>
-
-	* configure.in: some little fixes for the Makefiles
-
-	* acinclude.m4.in: --prefix will no longer override the search for
-	libraries. If they are present somewhere, they are used (through
-	the methodes in KApplication)
-
-Mon Jan 12 00:30:36 1998  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in fixed an ugly bug, that accoured, when
-	qt_libraries is not set (empty/equals X11/not necessary)
-	
-	* acinclude.m4.in moved the remove of the files after the error
-	detection
-	
-
-Sun Jan 11 17:27:53 1998  Stephan Kulow  <coolo at kde.org>
-
-	* acinclude.m4.in added a new macro KDE_CHECK_QT_DIRECT to unset
-	the Qt library path, if a Qt program compiles without them
-		
-	* acinclude.m4.in added a return value in the CREATE_KFSSTND
-	macro. Perhaps this has caused the problems
-
-Sat Jan 10 17:40:44 1998  Stephan Kulow  <coolo at kde.org>
-
-	* ChangeLog started to maintain a ChangeLog file again
-	* acinclude.m4.in the AC_CREATE_KFSSTND to get better debug output
-	to find the problem
-	
-
-Old logs, Stephan Kulow made:
-	
-0.1 : first steps with libkde
-0.2 : first release with libkde, khtmlw, kdehelp, acli, kwm, kpanel
-0.3 : added kfm and bugfixes
-0.4 : updated khtmlw, kdehelp, kwm, changed install in all subdirs
-0.5 : support libtool (chooseable shared libs)
-0.6 : split libkde in kdecore and kdeui
-0.6.1 : Bugfixes
-0.7 : added code from Janos Farkas (configure)
-    : added @{kde,qt}_{includes,libraries}@
-0.7.1: Bugfixes
-0.7.2: Bugfixes
-0.7.3: added @all_includes@ and @all_libraries@
-       replaced all incompatible flags like $(CC) and -DHAVE_UNISTD_H
-0.7.4: changed support for libkde (back in it's own)
-       added kpat
-       updated kpanel, kwm, kghostview
-0.8: removed a bug in kghostview
-	lifted installation process of several apps
-	splitt kdebase into kdelibs and kdeapps	
-	updated khtmlw, kfm and kdehelp
-	added kcalc and kpaint
-	updated kdisplay
-	added kscreensaver
-	added --enable-kscreensaver
-	added --enable-debug (and @CXXFLAGS@ to all Makefile.ins)
-	updated kwm to 0.4.7
-	added make uninstall to every app
-	added kvt
-	added khexdit
-	added .kdelnk for kmines, kedit, ktetris
-	put kwm, kfind's .kdelnk in the right directories
-	replaced --enable-kscreensaver by --disable-kscreensaver
-	updated kpanel to 0.15
-	some bugfixes (thanks Marco)
-	some bugfixes (thanks Martin)
-	changed acinclude.m4, because aclocal won't
-	updated kwm to 0.4.8 (patched it again for Qt-1.2)
-	updated kvt to 0.13 (patch from Matthias)
-	patched kvt and kwm
-	updated kwm to 0.5.0
-	updated kvt for 0.14 (again and again :-)
-	updated kview to 0.10
-	updated kfm to 0.6.3
- 	patched kscreensaver for FreeBSD (thanks Marc)
-0.9: updated kdisplay to 0.5.3
-	added klogout
-	patches from Matthias
-	updated kfm to 0.6.4
-	updated kghostview to 0.4
-	added QTINC and QTLIB
-	updated kdehelp to 0.4.11
-	patched kfm to support ktoolbar
-	updated kedit to kedit+
-	added kfontmanager 0.2.1
-0.9.1: changed kpaint's make style
-	bugfixing
-	updated kmines to 0.6.5
-	updated ktetris to 0.2.4
-	changed to Makefiles to depend on Makefile.in
-	changed the Makefiles to let install depend on all
-	added kjots-0.2.2
-	updated kjots-0.2.3
-	updated kfm to 0.6.6
-	updated kjots-0.2.4
-	updated kpaint-0.2
-	updated kedit to 0.5
-	updated kfontmanager to 0.2.2
-	updated kfm to 0.6.7
-	updated ktetris to 0.2.5
-	updated kjots to 0.2.5
-0.10: added HAVE_SQRTL
-	added HAVE_CRYPT_H
-	updated kfind
-	updated kfm to kfm-0.8.1
-	re-introduced automake to kdebase
-	bugfixes for the configure.in
-	added XPM, GL and PAM tests to configure
-	added morph3d to kscreensavers
-	updated kfind to 0.3.2
-	added some patches for SGI
-... lost the time to maintain a Changelog ;)
diff --git a/admin/Doxyfile.am b/admin/Doxyfile.am
deleted file mode 100644
index 4697887..0000000
--- a/admin/Doxyfile.am
+++ /dev/null
@@ -1,163 +0,0 @@
-## generate API documentation with doxygen
-apidox-am-yes:
-	@if test "$(subdir)" != "."; 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 && 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 "PROJECT_NAME           = \"$(subdir) Library\"" >> Doxyfile; \
-		echo "PROJECT_NUMBER         = \"Version $(VERSION)\"" >> Doxyfile; \
-		echo "INPUT                  = $(srcdir)" >> Doxyfile; \
-		echo "IMAGE_PATH             = $(top_srcdir)/doc/api" >> Doxyfile ;\
-		echo "OUTPUT_DIRECTORY       = $(top_builddir)/apidocs" >> Doxyfile; \
-		echo "HTML_OUTPUT            = $(subdir)/html" >> Doxyfile; \
-		echo "LATEX_OUTPUT           = $(subdir)/latex" >> Doxyfile; \
-		echo "RTF_OUTPUT             = $(subdir)/rtf" >> Doxyfile; \
-		echo "MAN_OUTPUT             = $(subdir)/man" >> Doxyfile; \
-		echo "GENERATE_HTML          = $(GENERATE_FLAG)" >> Doxyfile ;\
-		echo "GENERATE_MAN          = $(GENERATE_FLAG)" >> Doxyfile ;\
-		echo "GENERATE_LATEX          = $(GENERATE_FLAG)" >> Doxyfile ;\
-		if test -n "$(DOXYGEN_EXCLUDE)"; then \
-			echo "EXCLUDE_PATTERNS      += $(DOXYGEN_EXCLUDE)" >> Doxyfile; \
-		fi ;\
-		echo "TAGFILES = \\" >> Doxyfile; \
-		tags='$(DOXYGEN_REFERENCES) qt'; for tag in $$tags; do \
-			tagpath= ;\
-			path="../../$$tag" ;\
-			if test -f $(top_builddir)/apidocs/$$tag/$$tag.tag; then \
-				tagpath="$(top_builddir)/apidocs/$$tag/$$tag.tag" ;\
-			else \
-				tagpath=`ls -1 $(kde_htmldir)/en/*-apidocs/$$tag/$$tag.tag 2> /dev/null` ;\
-				if test -n "$$tagpath"; then \
-					path=`echo $$tagpath | sed -e "s,.*/\([^/]*-apidocs\)/$$tag/$$tag.tag,../../../\1/$$tag,"` ;\
-				fi ;\
-			fi ;\
-			if test "$$tag" = qt; then \
-				echo $$tagpath=$(QTDOCDIR) >> Doxyfile ;\
-			else if test -n "$$tagpath"; then \
-				echo "$$tagpath=$$path/html \\" >> Doxyfile ;\
-			    fi ;\
-			fi ;\
-		done ;\
-		echo "GENERATE_TAGFILE       = $(top_builddir)/apidocs/$(subdir)/$(subdir).tag" >> Doxyfile ;\
-		echo "IGNORE_PREFIX          = K" >> Doxyfile ;\
-		echo "HAVE_DOT = $(KDE_HAVE_DOT)" >> Doxyfile ;\
-		$(DOXYGEN) Doxyfile ;\
-	fi
-
-apidox-am-no:
-
-install-data-local: install-apidox
-
-## install API documentation
-install-apidox:
-	@if test "$(subdir)" != "."; then \
-		$(mkinstalldirs) $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir)/html ; \
-		if test -f $(top_builddir)/apidocs/$(subdir)/$(subdir).tag; then \
-		echo $(INSTALL_DATA) $(top_builddir)/apidocs/$(subdir)/$(subdir).tag $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir); \
-		$(INSTALL_DATA) $(top_builddir)/apidocs/$(subdir)/$(subdir).tag $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir); \
-		fi; \
-		if test -d $(top_builddir)/apidocs/$(subdir)/html; then \
-			list=`ls $(top_builddir)/apidocs/$(subdir)/html`; \
-			for file in $$list; do \
-				echo $(INSTALL_DATA) $(top_builddir)/apidocs/$(subdir)/html/$$file $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir)/html; \
-					$(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 && ls -1`; \
-		for file in $$list; do \
-			if test -f $(top_builddir)/apidocs/$$file; then \
-				echo $(INSTALL_DATA) $(top_builddir)/apidocs/$$file $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs; \
-				$(INSTALL_DATA) $(top_builddir)/apidocs/$$file $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs; \
-			fi; \
-		done ; fi; \
-	fi
-
-uninstall-local: uninstall-apidox
-
-## uninstall API documentation
-uninstall-apidox:
-	@if test "$(subdir)" != "."; then \
-		if test -d $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir); then \
-			rm -rfv $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir); \
-		fi\
-	else\
-		if test -d $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs; then \
-			rm -rfv $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs; \
-		fi\
-	fi
-
-apidox:
-	@if test "$(subdir)" != "."; then \
-		$(MAKE) apidox-am- at KDE_HAS_DOXYGEN@ ;\
-	else \
-		$(MAKE) apidox-am-toplevel- at KDE_HAS_DOXYGEN@ ;\
-	fi
-	@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 "Making apidox in $$subdir"; \
-		if test "$$subdir" != "."; then \
-			(cd $$subdir && $(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 "Making apidox in $$subdir"; \
-		if test "$$subdir" != "."; then \
-			(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) GENERATE_FLAG=yes apidox) || exit 1; \
-		fi ; fi ;\
-	    done; \
-	fi
-
-apidox-am-toplevel-no:
-apidox-am-toplevel-yes:
-	@echo "*** Creating API documentation main page"; \
-	cp $(top_srcdir)/admin/Doxyfile.global Doxyfile; \
-	echo "PROJECT_NAME           = $(DOXYGEN_PROJECT_NAME)" >> Doxyfile ; \
-	echo "PROJECT_NUMBER         = $(DOXYGEN_PROJECT_NUMBER)" >> Doxyfile ; \
-	echo "INPUT                  = $(top_srcdir)" >> Doxyfile ; \
-	echo "OUTPUT_DIRECTORY       = $(top_builddir)/apidocs" >> Doxyfile ; \
-	echo "FILE_PATTERNS          = *.dox" >> Doxyfile ; \
-	echo "RECURSIVE              = NO" >> Doxyfile ; \
-	echo "SOURCE_BROWSER         = NO" >> Doxyfile ; \
-	echo "ALPHABETICAL_INDEX     = NO" >> Doxyfile ; \
-	echo "HTML_OUTPUT            = ." >> Doxyfile ; \
-	echo "HTML_HEADER            = apidocs/common/mainheader.html" >> Doxyfile ; \
-	echo "HTML_FOOTER            = apidocs/common/mainfooter.html" >> Doxyfile ; \
-	echo "HTML_STYLESHEET        = apidocs/common/doxygen.css" >> Doxyfile ; \
-	echo "GENERATE_LATEX         = NO" >> Doxyfile ; \
-	echo "GENERATE_RTF           = NO" >> Doxyfile ; \
-	echo "GENERATE_MAN           = NO" >> Doxyfile ; \
-	echo "GENERATE_XML           = NO" >> Doxyfile ; \
-	echo "GENERATE_AUTOGEN_DEF   = NO" >> Doxyfile ; \
-	echo "ENABLE_PREPROCESSING   = NO" >> Doxyfile ; \
-	echo "CLASS_DIAGRAMS         = NO" >> Doxyfile ; \
-	echo "HAVE_DOT               = NO" >> Doxyfile ; \
-	echo "GENERATE_HTML          = YES" >> 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 && pwd` ;\
-	else \
-	   common_dir=$(kde_libs_htmldir)/en/common ;\
-	fi ;\
-	$(LN_S) $$common_dir $(top_builddir)/apidocs/common ;\
-	doxygen Doxyfile; \
-	rm -f Doxyfile
-
-# Local Variables:
-# mode: makefile
-# End:
diff --git a/admin/Doxyfile.global b/admin/Doxyfile.global
deleted file mode 100644
index 2ecb694..0000000
--- a/admin/Doxyfile.global
+++ /dev/null
@@ -1,950 +0,0 @@
-# Doxyfile 1.2.15
-
-# 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 (" ")
-
-#---------------------------------------------------------------------------
-# General 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         = "Version 3.0"
-
-# 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, Chinese, Croatian, Czech, Danish, Dutch, Finnish, French, 
-# German, Greek, Hungarian, Italian, Japanese, Korean, Norwegian, Polish, 
-# Portuguese, Romanian, Russian, Slovak, Slovene, Spanish and Swedish.
-
-OUTPUT_LANGUAGE        = English
-
-# 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 class will be included in the various 
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES     = YES
-
-# 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      = YES
-
-# 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
-
-# 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.
-
-STRIP_FROM_PATH        = 
-
-# 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
-
-# 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 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 adviced to set this option to NO.
-
-CASE_SENSE_NAMES       = YES
-
-# 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 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 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
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
-# will put list of the files that are included by a file in the documentation 
-# of that file.
-
-SHOW_INCLUDE_FILES     = YES
-
-# 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 
-# explict @brief command for a brief description.
-
-JAVADOC_AUTOBRIEF      = YES
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
-# member inherits the documentation from any documented member that it 
-# reimplements.
-
-INHERIT_DOCS           = 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 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
-
-# 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
-
-# This tag can be used to specify a number of aliases that acts 
-# as commands in the documentation. An alias has the form "name=value". 
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
-# put the command \sideeffect (or @sideeffect) in the documentation, which 
-# will result in a user defined paragraph with heading "Side Effects:". 
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES                = libdoc=@mainpage \
-                         sect=<p><b> \
-                         reimplemented= \
-                         "deprecated=<b>This class or method is obsolete, it is provided for compatibility only.</b>" \
-                         obsolete=@deprecated
-
-# 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 consist 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 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 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               = YES
-
-# 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
-
-# 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 "myfile.cpp" or 
-# directories like "/usr/src/myproject". 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
-
-FILE_PATTERNS          = *.h \
-                         *.cpp \
-                         *.cc \
-                         *.hpp
-
-# 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).
-
-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 <filter> <input-file>, where <filter> 
-# is the value of the INPUT_FILTER tag, and <input-file> 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.
-
-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.
-
-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
-
-# 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
-
-#---------------------------------------------------------------------------
-# 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
-
-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 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 and frames is required (for instance Mozilla, Netscape 4.0+, 
-# or Internet explorer 4.0+). Note that for large projects the tree generation 
-# can take a very long time. In such cases it is better to disable this feature. 
-# 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
-
-#---------------------------------------------------------------------------
-# 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 optimised 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 assigments. 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. Note that this 
-# feature is still experimental and incomplete at the 
-# moment.
-
-GENERATE_XML           = 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 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=305
-
-# If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY 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 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::addtions related to external references   
-#---------------------------------------------------------------------------
-
-# The TAGFILES tag can be used to specify one or more tagfiles.
-
-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 superceded by the HAVE_DOT option below. This is only a fallback. It is 
-# recommended to install and use dot, since it yield more powerful graphs.
-
-CLASS_DIAGRAMS         = YES
-
-# 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&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 set to YES, the inheritance and collaboration graphs will show the 
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS     = 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 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 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    = NO
-
-# 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
-
-# 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
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
-# remove the intermedate dot files that are used to generate 
-# the various graphs.
-
-DOT_CLEANUP            = YES
-
-#---------------------------------------------------------------------------
-# Configuration::addtions 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.
-
-SEARCHENGINE           = NO
-
-# The CGI_NAME tag should be the name of the CGI script that 
-# starts the search engine (doxysearch) with the correct parameters. 
-# A script with this name will be generated by doxygen.
-
-CGI_NAME               = 
-
-# The CGI_URL tag should be the absolute URL to the directory where the 
-# cgi binaries are located. See the documentation of your http daemon for 
-# details.
-
-CGI_URL                = 
-
-# The DOC_URL tag should be the absolute URL to the directory where the 
-# documentation is located. If left blank the absolute path to the 
-# documentation, with file:// prepended to it, will be used.
-
-DOC_URL                = 
-
-# The DOC_ABSPATH tag should be the absolute path to the directory where the 
-# documentation is located. If left blank the directory on the local machine 
-# will be used.
-
-DOC_ABSPATH            = 
-
-# The BIN_ABSPATH tag must point to the directory where the doxysearch binary 
-# is installed.
-
-BIN_ABSPATH            = 
-
-# The EXT_DOC_PATHS tag can be used to specify one or more paths to 
-# documentation generated for other projects. This allows doxysearch to search 
-# the documentation for these projects as well.
-
-EXT_DOC_PATHS          = 
diff --git a/admin/Makefile.common b/admin/Makefile.common
deleted file mode 100644
index d5c4d85..0000000
--- a/admin/Makefile.common
+++ /dev/null
@@ -1,34 +0,0 @@
-### Makefile.common
-###
-### Copyright (C) 2002 by the KDE developers
-
-### All the real work is done by the shellscript cvs.sh
-
-SHELL=/bin/sh
-
-cvs dist cvs-clean configure.in configure.files subdirs package-messages package-merge:
-	@admindir=$(admindir); \
-	if test "x$$admindir" = x; then \
-	  admindir=.; until test -f $$admindir/admin/cvs.sh; do \
-	    admindir=$$admindir/..; \
-	    if test `cd $$admindir && pwd` = / ; then break; fi; \
-	  done; \
-	  admindir=$$admindir/admin; \
-	  if test -f $$admindir/cvs.sh; then :; else \
-	    echo "Can't find the admin/ directory in any parent of the"; \
-	    echo "current directory.  Please set it with admindir=..."; \
-	    exit 1; \
-	  fi; \
-	fi; \
-	if test "$@" = "package-merge"; then \
-		MAKE=$(MAKE) POFILES="$(POFILES)" PACKAGE="$(PACKAGE)" \
-	  	$(SHELL) $$admindir/cvs.sh package-merge ;\
-	else MAKE=$(MAKE) $(SHELL) $$admindir/cvs.sh $@ ;\
-	fi
-
-configure.in: configure.files $(shell test -f configure.files && cat configure.files) subdirs
-configure.files: subdirs
-
-.SILENT:
-
-.PHONY: cvs dist cvs-clean package-merge package-messages
diff --git a/admin/acinclude.m4.in b/admin/acinclude.m4.in
deleted file mode 100644
index 41d6fcf..0000000
--- a/admin/acinclude.m4.in
+++ /dev/null
@@ -1,5392 +0,0 @@
-##   -*- autoconf -*-
-
-dnl    This file is part of the KDE libraries/packages
-dnl    Copyright (C) 1997 Janos Farkas (chexum at shadow.banki.hu)
-dnl              (C) 1997,98,99 Stephan Kulow (coolo at kde.org)
-
-dnl    This file is free software; you can redistribute it and/or
-dnl    modify it under the terms of the GNU Library General Public
-dnl    License as published by the Free Software Foundation; either
-dnl    version 2 of the License, or (at your option) any later version.
-
-dnl    This library is distributed in the hope that it will be useful,
-dnl    but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-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 IMPORTANT NOTE:
-dnl Please do not modify this file unless you expect your modifications to be
-dnl carried into every other module in the repository. 
-dnl
-dnl Single-module modifications are best placed in configure.in for kdelibs
-dnl and kdebase or configure.in.in if present.
-
-dnl ------------------------------------------------------------------------
-dnl Forward compatibility macros (make autoconf 2.13 look like 2.50),
-dnl thanks to Raja R Harinath.
-dnl ------------------------------------------------------------------------
-dnl
-ifdef([_AC_PATH_X_XMKMF],[],
-   [AC_DEFUN([_AC_PATH_X_XMKMF],[AC_PATH_X_XMKMF])])
-ifdef([AC_OUTPUT_SUBDIRS],[],
-   [AC_DEFUN([AC_OUTPUT_SUBDIRS],[subdirs=$1; _AC_OUTPUT_SUBDIRS])])
-
-# KDE_PATH_X_DIRECT
-dnl Internal subroutine of AC_PATH_X.
-dnl Set ac_x_includes and/or ac_x_libraries.
-AC_DEFUN(KDE_PATH_X_DIRECT,
-[
-AC_REQUIRE([KDE_CHECK_LIB64])
-
-if test "$ac_x_includes" = NO; then
-  # Guess where to find include files, by looking for this one X11 .h file.
-  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
-
-  # First, try using that file with no special directory specified.
-AC_TRY_CPP([#include <$x_direct_test_include>],
-[# We can compile using X headers with no special include directory.
-ac_x_includes=],
-[# Look for the header file in a standard set of common directories.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-  for ac_dir in               \
-    /usr/X11/include          \
-    /usr/X11R6/include        \
-    /usr/X11R5/include        \
-    /usr/X11R4/include        \
-                              \
-    /usr/include/X11          \
-    /usr/include/X11R6        \
-    /usr/include/X11R5        \
-    /usr/include/X11R4        \
-                              \
-    /usr/local/X11/include    \
-    /usr/local/X11R6/include  \
-    /usr/local/X11R5/include  \
-    /usr/local/X11R4/include  \
-                              \
-    /usr/local/include/X11    \
-    /usr/local/include/X11R6  \
-    /usr/local/include/X11R5  \
-    /usr/local/include/X11R4  \
-                              \
-    /usr/X386/include         \
-    /usr/x386/include         \
-    /usr/XFree86/include/X11  \
-                              \
-    /usr/include              \
-    /usr/local/include        \
-    /usr/unsupported/include  \
-    /usr/athena/include       \
-    /usr/local/x11r5/include  \
-    /usr/lpp/Xamples/include  \
-                              \
-    /usr/openwin/include      \
-    /usr/openwin/share/include \
-    ; \
-  do
-    if test -r "$ac_dir/$x_direct_test_include"; then
-      ac_x_includes=$ac_dir
-      break
-    fi
-  done])
-fi # $ac_x_includes = NO
-
-if test "$ac_x_libraries" = NO; then
-  # Check for the libraries.
-
-  test -z "$x_direct_test_library" && x_direct_test_library=Xt
-  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
-
-  # See if we find them without any special options.
-  # Don't add to $LIBS permanently.
-  ac_save_LIBS="$LIBS"
-  LIBS="-l$x_direct_test_library $LIBS"
-AC_TRY_LINK(, [${x_direct_test_function}()],
-[LIBS="$ac_save_LIBS"
-# We can link X programs with no special library path.
-ac_x_libraries=],
-[LIBS="$ac_save_LIBS"
-# First see if replacing the include by lib works.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-for ac_dir in `echo "$ac_x_includes" | sed s/include/lib${kdelibsuff}/` \
-    /usr/X11/lib${kdelibsuff}           \
-    /usr/X11R6/lib${kdelibsuff}         \
-    /usr/X11R5/lib${kdelibsuff}         \
-    /usr/X11R4/lib${kdelibsuff}         \
-                                        \
-    /usr/lib${kdelibsuff}/X11           \
-    /usr/lib${kdelibsuff}/X11R6         \
-    /usr/lib${kdelibsuff}/X11R5         \
-    /usr/lib${kdelibsuff}/X11R4         \
-                                        \
-    /usr/local/X11/lib${kdelibsuff}     \
-    /usr/local/X11R6/lib${kdelibsuff}   \
-    /usr/local/X11R5/lib${kdelibsuff}   \
-    /usr/local/X11R4/lib${kdelibsuff}   \
-                                        \
-    /usr/local/lib${kdelibsuff}/X11     \
-    /usr/local/lib${kdelibsuff}/X11R6   \
-    /usr/local/lib${kdelibsuff}/X11R5   \
-    /usr/local/lib${kdelibsuff}/X11R4   \
-                                        \
-    /usr/X386/lib${kdelibsuff}          \
-    /usr/x386/lib${kdelibsuff}          \
-    /usr/XFree86/lib${kdelibsuff}/X11   \
-                                        \
-    /usr/lib${kdelibsuff}               \
-    /usr/local/lib${kdelibsuff}         \
-    /usr/unsupported/lib${kdelibsuff}   \
-    /usr/athena/lib${kdelibsuff}        \
-    /usr/local/x11r5/lib${kdelibsuff}   \
-    /usr/lpp/Xamples/lib${kdelibsuff}   \
-    /lib/usr/lib${kdelibsuff}/X11       \
-                                        \
-    /usr/openwin/lib${kdelibsuff}       \
-    /usr/openwin/share/lib${kdelibsuff} \
-    ; \
-do
-dnl Don't even attempt the hair of trying to link an X program!
-  for ac_extension in a so sl; do
-    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
-      ac_x_libraries=$ac_dir
-      break 2
-    fi
-  done
-done])
-fi # $ac_x_libraries = NO
-])
-
-
-dnl ------------------------------------------------------------------------
-dnl Find a file (or one of more files in a list of dirs)
-dnl ------------------------------------------------------------------------
-dnl
-AC_DEFUN(AC_FIND_FILE,
-[
-$3=NO
-for i in $2;
-do
-  for j in $1;
-  do
-    echo "configure: __oline__: $i/$j" >&AC_FD_CC
-    if test -r "$i/$j"; then
-      echo "taking that" >&AC_FD_CC
-      $3=$i
-      break 2
-    fi
-  done
-done
-])
-
-dnl KDE_FIND_PATH(programm-name, variable-name, list of directories,
-dnl	if-not-found, test-parameter)
-AC_DEFUN(KDE_FIND_PATH,
-[
-   AC_MSG_CHECKING([for $1])
-   if test -n "$$2"; then
-        kde_cv_path="$$2";
-   else
-        kde_cache=`echo $1 | sed 'y%./+-%__p_%'`
-
-        AC_CACHE_VAL(kde_cv_path_$kde_cache,
-        [
-        kde_cv_path="NONE"
-	dirs="$3"
-	kde_save_IFS=$IFS
-	IFS=':'
-	for dir in $PATH; do
-	  dirs="$dirs $dir"
-        done
-	IFS=$kde_save_IFS
-
-        for dir in $dirs; do
-	  if test -x "$dir/$1"; then
-	    if test -n "$5"
-	    then
-              evalstr="$dir/$1 $5 2>&1 "
-	      if eval $evalstr; then
-                kde_cv_path="$dir/$1"
-                break
-	      fi
-            else
-		kde_cv_path="$dir/$1"
-                break
-	    fi
-          fi
-        done
-
-        eval "kde_cv_path_$kde_cache=$kde_cv_path"
-
-        ])
-
-      eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
-
-   fi
-
-   if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
-      AC_MSG_RESULT(not found)
-      $4
-   else
-      AC_MSG_RESULT($kde_cv_path)
-      $2=$kde_cv_path
-
-   fi
-])
-
-AC_DEFUN(KDE_MOC_ERROR_MESSAGE,
-[
-    AC_MSG_ERROR([No Qt meta object compiler (moc) found!
-Please check whether you installed Qt correctly.
-You need to have a running moc binary.
-configure tried to run $ac_cv_path_moc and the test didn't
-succeed. If configure shouldn't have tried this one, set
-the environment variable MOC to the right one before running
-configure.
-])
-])
-
-AC_DEFUN(KDE_UIC_ERROR_MESSAGE,
-[
-    AC_MSG_WARN([No Qt ui compiler (uic) found!
-Please check whether you installed Qt correctly.
-You need to have a running uic binary.
-configure tried to run $ac_cv_path_uic and the test didn't
-succeed. If configure shouldn't have tried this one, set
-the environment variable UIC to the right one before running
-configure.
-])
-])
-
-
-AC_DEFUN(KDE_CHECK_UIC_FLAG,
-[
-    AC_MSG_CHECKING([whether uic supports -$1 ])
-    kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
-    AC_CACHE_VAL(kde_cv_prog_uic_$kde_cache,
-    [
-        cat >conftest.ui <<EOT
-        <!DOCTYPE UI><UI version="3" stdsetdef="1"></UI>
-EOT
-        ac_uic_testrun="$UIC_PATH -$1 $2 conftest.ui >/dev/null"
-        if AC_TRY_EVAL(ac_uic_testrun); then
-            eval "kde_cv_prog_uic_$kde_cache=yes"
-        else
-            eval "kde_cv_prog_uic_$kde_cache=no"
-        fi
-        rm -f conftest*
-    ])
-
-    if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then
-        AC_MSG_RESULT([yes])
-        :
-        $3
-    else
-        AC_MSG_RESULT([no])
-        :
-        $4
-    fi
-])
-
-
-dnl ------------------------------------------------------------------------
-dnl Find the meta object compiler and the ui compiler in the PATH,
-dnl in $QTDIR/bin, and some more usual places
-dnl ------------------------------------------------------------------------
-dnl
-AC_DEFUN(AC_PATH_QT_MOC_UIC,
-[
-   qt_bindirs=""
-   for dir in $kde_qt_dirs; do
-      qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc"
-   done
-   qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin"
-   if test ! "$ac_qt_bindir" = "NO"; then
-      qt_bindirs="$ac_qt_bindir $qt_bindirs"
-   fi
-
-   KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE])
-   if test -z "$UIC_NOT_NEEDED"; then
-     KDE_FIND_PATH(uic, UIC_PATH, [$qt_bindirs], [UIC_PATH=""])
-     if test -z "$UIC_PATH" ; then
-       KDE_UIC_ERROR_MESSAGE
-       exit 1
-     elif test $kde_qtver = 3; then
-       KDE_CHECK_UIC_FLAG(L,[/nonexistant],ac_uic_supports_libpath=yes,ac_uic_supports_libpath=no)
-       KDE_CHECK_UIC_FLAG(nounload,,ac_uic_supports_nounload=yes,ac_uic_supports_nounload=no)
-
-       UIC=$UIC_PATH
-       if test x$ac_uic_supports_libpath = xyes; then
-           UIC="$UIC -L \$(kde_widgetdir)"
-       fi
-       if test x$ac_uic_supports_nounload = xyes; then
-           UIC="$UIC -nounload"
-       fi
-     fi
-   else
-     UIC="echo uic not available: "
-   fi
-
-   AC_SUBST(MOC)
-   AC_SUBST(UIC)
-
-   UIC_TR="i18n"
-   if test $kde_qtver = 3; then
-     UIC_TR="tr2i18n"
-   fi
-
-   AC_SUBST(UIC_TR)
-])
-
-AC_DEFUN(KDE_1_CHECK_PATHS,
-[
-  KDE_1_CHECK_PATH_HEADERS
-
-  KDE_TEST_RPATH=
-
-  if test -n "$USE_RPATH"; then
-
-     if test -n "$kde_libraries"; then
-       KDE_TEST_RPATH="-R $kde_libraries"
-     fi
-
-     if test -n "$qt_libraries"; then
-       KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries"
-     fi
-
-     if test -n "$x_libraries"; then
-       KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries"
-     fi
-
-     KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH"
-  fi
-
-AC_MSG_CHECKING([for KDE libraries installed])
-ac_link='$LIBTOOL_SHELL --silent --mode=link ${CXX-g++} -o conftest $CXXFLAGS $all_includes $CPPFLAGS $LDFLAGS $all_libraries conftest.$ac_ext $LIBS -lkdecore $LIBQT $KDE_TEST_RPATH 1>&5'
-
-if AC_TRY_EVAL(ac_link) && test -s conftest; then
-  AC_MSG_RESULT(yes)
-else
-  AC_MSG_ERROR([your system fails at linking a small KDE application!
-Check, if your compiler is installed correctly and if you have used the
-same compiler to compile Qt and kdelibs as you did use now.
-For more details about this problem, look at the end of config.log.])
-fi
-
-if eval `KDEDIR= ./conftest 2>&5`; then
-  kde_result=done
-else
-  kde_result=problems
-fi
-
-KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
-kde_have_all_paths=yes
-
-KDE_SET_PATHS($kde_result)
-
-])
-
-AC_DEFUN(KDE_SET_PATHS,
-[
-  kde_cv_all_paths="kde_have_all_paths=\"yes\" \
-	kde_htmldir=\"$kde_htmldir\" \
-	kde_appsdir=\"$kde_appsdir\" \
-	kde_icondir=\"$kde_icondir\" \
-	kde_sounddir=\"$kde_sounddir\" \
-	kde_datadir=\"$kde_datadir\" \
-	kde_locale=\"$kde_locale\" \
-	kde_cgidir=\"$kde_cgidir\" \
-	kde_confdir=\"$kde_confdir\" \
-	kde_mimedir=\"$kde_mimedir\" \
-	kde_toolbardir=\"$kde_toolbardir\" \
-	kde_wallpaperdir=\"$kde_wallpaperdir\" \
-	kde_templatesdir=\"$kde_templatesdir\" \
-	kde_bindir=\"$kde_bindir\" \
-	kde_servicesdir=\"$kde_servicesdir\" \
-	kde_servicetypesdir=\"$kde_servicetypesdir\" \
-	kde_moduledir=\"$kde_moduledir\" \
-   kde_styledir=\"$kde_styledir\" \
-	kde_widgetdir=\"$kde_widgetdir\" \
-	kde_result=$1"
-])
-
-AC_DEFUN(KDE_SET_DEFAULT_PATHS,
-[
-if test "$1" = "default"; then
-
-  if test -z "$kde_htmldir"; then
-    kde_htmldir='\${prefix}/share/doc/HTML'
-  fi
-  if test -z "$kde_appsdir"; then
-    kde_appsdir='\${prefix}/share/applnk'
-  fi
-  if test -z "$kde_icondir"; then
-    kde_icondir='\${prefix}/share/icons'
-  fi
-  if test -z "$kde_sounddir"; then
-    kde_sounddir='\${prefix}/share/sounds'
-  fi
-  if test -z "$kde_datadir"; then
-    kde_datadir='\${prefix}/share/apps'
-  fi
-  if test -z "$kde_locale"; then
-    kde_locale='\${prefix}/share/locale'
-  fi
-  if test -z "$kde_cgidir"; then
-    kde_cgidir='\${exec_prefix}/cgi-bin'
-  fi
-  if test -z "$kde_confdir"; then
-    kde_confdir='\${prefix}/share/config'
-  fi
-  if test -z "$kde_mimedir"; then
-    kde_mimedir='\${prefix}/share/mimelnk'
-  fi
-  if test -z "$kde_toolbardir"; then
-    kde_toolbardir='\${prefix}/share/toolbar'
-  fi
-  if test -z "$kde_wallpaperdir"; then
-    kde_wallpaperdir='\${prefix}/share/wallpapers'
-  fi
-  if test -z "$kde_templatesdir"; then
-    kde_templatesdir='\${prefix}/share/templates'
-  fi
-  if test -z "$kde_bindir"; then
-    kde_bindir='\${exec_prefix}/bin'
-  fi
-  if test -z "$kde_servicesdir"; then
-    kde_servicesdir='\${prefix}/share/services'
-  fi
-  if test -z "$kde_servicetypesdir"; then
-    kde_servicetypesdir='\${prefix}/share/servicetypes'
-  fi
-  if test -z "$kde_moduledir"; then
-    if test "$kde_qtver" = "2"; then
-      kde_moduledir='\${libdir}/kde2'
-    else
-      kde_moduledir='\${libdir}/kde3'
-    fi
-  fi
-  if test -z "$kde_styledir"; then
-    kde_styledir='\${libdir}/kde3/plugins/styles'
-  fi
-  if test -z "$kde_widgetdir"; then
-    kde_widgetdir='\${libdir}/kde3/plugins/designer'
-  fi
-
-  KDE_SET_PATHS(defaults)
-
-else
-
-  if test $kde_qtver = 1; then
-     AC_MSG_RESULT([compiling])
-     KDE_1_CHECK_PATHS
-  else
-     AC_MSG_ERROR([path checking not yet supported for KDE 2])
-  fi
-
-fi
-])
-
-AC_DEFUN(KDE_CHECK_PATHS_FOR_COMPLETENESS,
-[ if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
-   test -z "$kde_icondir" || test -z "$kde_sounddir" ||
-   test -z "$kde_datadir" || test -z "$kde_locale"  ||
-   test -z "$kde_cgidir"  || test -z "$kde_confdir" ||
-   test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
-   test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
-   test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
-   test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
-   test -z "$kde_styledir" || test -z "kde_widgetdir" 
-   test "x$kde_have_all_paths" != "xyes"; then
-     kde_have_all_paths=no
-  fi
-])
-
-AC_DEFUN(KDE_MISSING_PROG_ERROR,
-[
-    AC_MSG_ERROR([The important program $1 was not found!
-Please check whether you installed KDE correctly.
-])
-])
-
-AC_DEFUN(KDE_MISSING_ARTS_ERROR,
-[
-    AC_MSG_ERROR([The important program $1 was not found!
-Please check whether you installed aRts correctly.
-])
-])
-
-AC_DEFUN(KDE_SUBST_PROGRAMS,
-[
-
-        kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde3/bin /usr/kde/bin /usr/local/kde/bin"
-        test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs"
-        if test -n "$KDEDIRS"; then
-           kde_save_IFS=$IFS
-           IFS=:
-           for dir in $KDEDIRS; do
-                kde_default_bindirs="$dir/bin $kde_default_bindirs "
-           done
-           IFS=$kde_save_IFS
-        fi
-        kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_default_bindirs"
-        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)])
-        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)])
-        KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs])
-        KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
-      
-        if test -n "$MEINPROC" && test ! "$MEINPROC" = "compiled"; then  
- 	    kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
-            test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
-            AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
-	    if test "$KDE_XSL_STYLESHEET" = "NO"; then
-		KDE_XSL_STYLESHEET=""
-	    else
-                KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl"
-	    fi
-        fi
-
-        DCOP_DEPENDENCIES='$(DCOPIDL)'
-        AC_SUBST(DCOPIDL)
-        AC_SUBST(DCOPIDL2CPP)
-        AC_SUBST(DCOP_DEPENDENCIES)
-        AC_SUBST(MCOPIDL)
-        AC_SUBST(ARTSCCONFIG)
-        AC_SUBST(KDECONFIG)
-	AC_SUBST(MEINPROC)
- 	AC_SUBST(KDE_XSL_STYLESHEET)
-
-        if test -x "$KDECONFIG"; then # it can be "compiled"
-          kde_libs_prefix=`$KDECONFIG --prefix`
-          if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
-               AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
-                          This means it has been moved since you installed it.
-                          This won't work. Please recompile kdelibs for the new prefix.
-                          ])
-           fi
-           kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
-        else
-           kde_libs_prefix='$(prefix)'
-           kde_libs_htmldir='$(kde_htmldir)'
-        fi
-        AC_SUBST(kde_libs_prefix)
-        AC_SUBST(kde_libs_htmldir)
-])dnl
-
-AC_DEFUN(AC_CREATE_KFSSTND,
-[
-AC_REQUIRE([AC_CHECK_RPATH])
-
-AC_MSG_CHECKING([for KDE paths])
-kde_result=""
-kde_cached_paths=yes
-AC_CACHE_VAL(kde_cv_all_paths,
-[
-  KDE_SET_DEFAULT_PATHS($1)
-  kde_cached_paths=no
-])
-eval "$kde_cv_all_paths"
-KDE_CHECK_PATHS_FOR_COMPLETENESS
-if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then
-  # wrong values were cached, may be, we can set better ones
-  kde_result=
-  kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
-  kde_datadir= kde_locale=  kde_cgidir=  kde_confdir=
-  kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
-  kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
-  kde_have_all_paths=
-  kde_styledir=
-  kde_widgetdir=
-  KDE_SET_DEFAULT_PATHS($1)
-  eval "$kde_cv_all_paths"
-  KDE_CHECK_PATHS_FOR_COMPLETENESS
-  kde_result="$kde_result (cache overridden)"
-fi
-if test "$kde_have_all_paths" = "no"; then
-  AC_MSG_ERROR([configure could not run a little KDE program to test the environment.
-Since it had compiled and linked before, it must be a strange problem on your system.
-Look at config.log for details. If you are not able to fix this, look at
-http://www.kde.org/faq/installation.html or any www.kde.org mirror.
-(If you're using an egcs version on Linux, you may update binutils!)
-])
-else
-  rm -f conftest*
-  AC_MSG_RESULT($kde_result)
-fi
-
-bindir=$kde_bindir
-
-KDE_SUBST_PROGRAMS
-
-])
-
-AC_DEFUN(AC_SUBST_KFSSTND,
-[
-AC_SUBST(kde_htmldir)
-AC_SUBST(kde_appsdir)
-AC_SUBST(kde_icondir)
-AC_SUBST(kde_sounddir)
-AC_SUBST(kde_datadir)
-AC_SUBST(kde_locale)
-AC_SUBST(kde_confdir)
-AC_SUBST(kde_mimedir)
-AC_SUBST(kde_wallpaperdir)
-AC_SUBST(kde_bindir)
-dnl for KDE 2
-AC_SUBST(kde_templatesdir)
-AC_SUBST(kde_servicesdir)
-AC_SUBST(kde_servicetypesdir)
-AC_SUBST(kde_moduledir)
-AC_SUBST(kde_styledir)
-AC_SUBST(kde_widgetdir)
-if test "$kde_qtver" = 1; then
-  kde_minidir="$kde_icondir/mini"
-else
-# for KDE 1 - this breaks KDE2 apps using minidir, but
-# that's the plan ;-/
-  kde_minidir="/dev/null"
-fi
-dnl AC_SUBST(kde_minidir)
-dnl AC_SUBST(kde_cgidir)
-dnl AC_SUBST(kde_toolbardir)
-])
-
-AC_DEFUN(KDE_MISC_TESTS,
-[
-   AC_LANG_C
-   dnl Checks for libraries.
-   AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD 
-   AC_SUBST(LIBUTIL)
-   AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD
-   AC_SUBST(LIBCOMPAT)
-   kde_have_crypt=
-   AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes],
-      AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [
-        AC_MSG_WARN([you have no crypt in either libcrypt or libc.
-You should install libcrypt from another source or configure with PAM
-support])
-	kde_have_crypt=no
-      ]))
-   AC_SUBST(LIBCRYPT)
-   if test $kde_have_crypt = yes; then
-      AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
-   fi
-   AC_CHECK_SOCKLEN_T
-   AC_LANG_C
-   AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
-   if test $ac_cv_lib_dnet_dnet_ntoa = no; then
-      AC_CHECK_LIB(dnet_stub, dnet_ntoa,
-        [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
-   fi
-   AC_CHECK_FUNC(inet_ntoa)
-   if test $ac_cv_func_inet_ntoa = no; then
-     AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
-   fi
-   AC_CHECK_FUNC(connect)
-   if test $ac_cv_func_connect = no; then
-      AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
-        $X_EXTRA_LIBS)
-   fi
-
-   AC_CHECK_FUNC(remove)
-   if test $ac_cv_func_remove = no; then
-      AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix")
-   fi
-
-   # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
-   AC_CHECK_FUNC(shmat, ,
-     AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
-   
-   # darwin needs this to initialize the environment
-   AC_CHECK_HEADERS(crt_externs.h)
-   AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define if your system needs _NSGetEnviron to set up the environment])])
- 
-   # more headers that need to be explicitly included on darwin
-   AC_CHECK_HEADERS(sys/types.h stdint.h)
-
-   # darwin requires a poll emulation library
-   AC_CHECK_LIB(poll, poll, LIB_POLL="-lpoll")
-
-   # CoreAudio framework
-   AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [
-     AC_DEFINE(HAVE_COREAUDIO, 1, [Define if you have the CoreAudio API])
-     FRAMEWORK_COREAUDIO="-framework CoreAudio"
-   ])
-
-   AC_CHECK_RES_INIT
-   AC_SUBST(LIB_POLL)
-   AC_SUBST(FRAMEWORK_COREAUDIO)
-   LIBSOCKET="$X_EXTRA_LIBS"
-   AC_SUBST(LIBSOCKET)
-   AC_SUBST(X_EXTRA_LIBS)
-   AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
-   AC_SUBST(LIBUCB)
-
-   case $host in  dnl this *is* LynxOS specific
-   *-*-lynxos* )
-        AC_MSG_CHECKING([LynxOS header file wrappers])
-        [CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"]
-        AC_MSG_RESULT(disabled)
-        AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS
-         ;;
-    esac
-
-   KDE_CHECK_TYPES
-   KDE_CHECK_LIBDL
-
-AH_VERBATIM(_AIX_STRINGS_H_BZERO,
-[
-/*
- * AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
- * that defines bzero.
- */
-
-#if defined(_AIX)
-#include <strings.h>
-#endif
-])
-
-AC_CHECK_FUNCS([vsnprintf snprintf])
-
-AH_VERBATIM(_TRU64,[
-/*
- * On HP-UX, the declaration of vsnprintf() is needed every time !
- */
-
-#if !defined(HAVE_VSNPRINTF) || defined(hpux)
-#if __STDC__
-#include <stdarg.h>
-#include <stdlib.h>
-#else
-#include <varargs.h>
-#endif
-#ifdef __cplusplus
-extern "C"
-#endif
-int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
-#ifdef __cplusplus
-extern "C"
-#endif
-int snprintf(char *str, size_t n, char const *fmt, ...);
-#endif
-])
-
-])
-
-dnl ------------------------------------------------------------------------
-dnl Find the header files and libraries for X-Windows. Extended the
-dnl macro AC_PATH_X
-dnl ------------------------------------------------------------------------
-dnl
-AC_DEFUN(K_PATH_X,
-[
-AC_REQUIRE([KDE_MISC_TESTS])dnl
-AC_REQUIRE([KDE_CHECK_LIB64])
-
-AC_ARG_ENABLE(
-  embedded,
-  [  --enable-embedded       link to Qt-embedded, don't use X],
-  kde_use_qt_emb=$enableval,
-  kde_use_qt_emb=no
-)
-
-AC_ARG_ENABLE(
-  qtopia,
-  [  --enable-qtopia         link to Qt-embedded, link to the Qtopia Environment],
-  kde_use_qt_emb_palm=$enableval,
-  kde_use_qt_emb_palm=no
-)
-
-if test "$kde_use_qt_emb" = "no"; then
-
-AC_MSG_CHECKING(for X)
-AC_LANG_SAVE
-AC_LANG_C
-AC_CACHE_VAL(kde_cv_have_x,
-[# One or both of the vars are not set, and there is no cached value.
-if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
-   kde_x_includes=NO
-else
-   kde_x_includes=$x_includes
-fi
-if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then
-   kde_x_libraries=NO
-else
-   kde_x_libraries=$x_libraries
-fi
-
-# below we use the standard autoconf calls
-ac_x_libraries=$kde_x_libraries
-ac_x_includes=$kde_x_includes
-
-KDE_PATH_X_DIRECT
-dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
-dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
-dnl location. The correct location is /usr/lib32 or an undefined value
-dnl (the linker is smart enough to pick the correct default library).
-dnl Things work just fine if you use just AC_PATH_X_DIRECT.
-dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to
-dnl /usr/openwin/include, which doesn't work. /usr/include does work, so
-dnl x_includes should be left alone.
-case "$host" in
-mips-sgi-irix6*)
-  ;;
-*-*-solaris*)
-  ;;
-*)
-  _AC_PATH_X_XMKMF
-  if test -z "$ac_x_includes"; then
-    ac_x_includes="."
-  fi
-  if test -z "$ac_x_libraries"; then
-    ac_x_libraries="/usr/lib${kdelibsuff}"
-  fi
-esac
-#from now on we use our own again
-
-# when the user already gave --x-includes, we ignore
-# what the standard autoconf macros told us.
-if test "$kde_x_includes" = NO; then
-  kde_x_includes=$ac_x_includes
-fi
-
-# for --x-libraries too
-if test "$kde_x_libraries" = NO; then
-  kde_x_libraries=$ac_x_libraries
-fi
-
-if test "$kde_x_includes" = NO; then
-  AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!])
-fi
-
-if test "$kde_x_libraries" = NO; then
-  AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!])
-fi
-
-# Record where we found X for the cache.
-kde_cv_have_x="have_x=yes \
-         kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
-])dnl
-
-eval "$kde_cv_have_x"
-
-if test "$have_x" != yes; then
-  AC_MSG_RESULT($have_x)
-  no_x=yes
-else
-  AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes])
-fi
-
-if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
-  X_INCLUDES=""
-  x_includes="."; dnl better than nothing :-
- else
-  x_includes=$kde_x_includes
-  X_INCLUDES="-I$x_includes"
-fi
-
-if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then
-  X_LDFLAGS=""
-  x_libraries="/usr/lib"; dnl better than nothing :-
- else
-  x_libraries=$kde_x_libraries
-  X_LDFLAGS="-L$x_libraries"
-fi
-all_includes="$X_INCLUDES"
-all_libraries="$X_LDFLAGS"
-
-AC_SUBST(X_INCLUDES)
-AC_SUBST(X_LDFLAGS)
-AC_SUBST(x_libraries)
-AC_SUBST(x_includes)
-
-# Check for libraries that X11R6 Xt/Xaw programs need.
-ac_save_LDFLAGS="$LDFLAGS"
-LDFLAGS="$LDFLAGS $X_LDFLAGS"
-# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
-# check for ICE first), but we must link in the order -lSM -lICE or
-# we get undefined symbols.  So assume we have SM if we have ICE.
-# These have to be linked with before -lX11, unlike the other
-# libraries we check for below, so use a different variable.
-#  --interran at uluru.Stanford.EDU, kb at cs.umb.edu.
-AC_CHECK_LIB(ICE, IceConnectionNumber,
-  [LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS)
-AC_SUBST(LIBSM)
-LDFLAGS="$ac_save_LDFLAGS"
-
-AC_SUBST(X_PRE_LIBS)
-
-LIB_X11='-lX11 $(LIBSOCKET)'
-AC_SUBST(LIB_X11)
-
-AC_MSG_CHECKING(for libXext)
-AC_CACHE_VAL(kde_cv_have_libXext,
-[
-kde_ldflags_safe="$LDFLAGS"
-kde_libs_safe="$LIBS"
-
-LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
-LIBS="-lXext -lX11 $LIBSOCKET"
-
-AC_TRY_LINK([
-#include <stdio.h>
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-#endif
-],
-[
-printf("hello Xext\n");
-],
-kde_cv_have_libXext=yes,
-kde_cv_have_libXext=no
-   )
-
-LDFLAGS=$kde_ldflags_safe
-LIBS=$kde_libs_safe
- ])
-
-AC_MSG_RESULT($kde_cv_have_libXext)
-
-if test "$kde_cv_have_libXext" = "no"; then
-  AC_MSG_ERROR([We need a working libXext to proceed. Since configure
-can't find it itself, we stop here assuming that make wouldn't find
-them either.])
-fi
-
-AC_MSG_CHECKING(for Xinerama)
-
- AC_ARG_WITH(xinerama,
-  [  --with-xinerama         enable support for Xinerama ],
-  [
-    no_xinerama=no
-  ], [
-    no_xinerama=yes
-  ]
-)
-
-kde_save_LDFLAGS="$LDFLAGS"
-kde_save_CFLAGS="$CFLAGS"
-kde_save_LIBS="$LIBS"
-LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
-CFLAGS="$CFLAGS -I$x_includes"
-LIBS="-lXinerama -lXext"
-
-if test "x$no_xinerama" = "xno"; then
-
-  AC_CACHE_VAL(ac_cv_have_xinerama,
-  [
-	  AC_TRY_LINK([#include <X11/Xlib.h>
-  			#include <X11/extensions/Xinerama.h>],
-	  	  [XineramaIsActive(NULL);],
-		  [ac_cv_have_xinerama="yes"],
-		  [ac_cv_have_xinerama="no"])
-  ])
-else
-  ac_cv_have_xinerama=no;
-fi
-
-AC_MSG_RESULT($ac_cv_have_xinerama)
-
-LIBXINERAMA=""
-
-if test "$ac_cv_have_xinerama" = "yes"; then
-  AC_DEFINE(HAVE_XINERAMA, 1, [Define if you want Xinerama support])
-  LIBXINERAMA="-lXinerama"
-fi
-
-AC_SUBST(LIBXINERAMA)
-
-LDFLAGS="$kde_save_LDFLAGS"
-CFLAGS="$kde_save_CFLAGS"
-LIBS="$kde_save_LIBS"
-
-LIB_XEXT="-lXext"
-QTE_NORTTI=""
-
-else
-  dnl We're using QT Embedded
-  CPPFLAGS=-DQWS
-  CXXFLAGS="$CXXFLAGS -fno-rtti"
-  QTE_NORTTI="-fno-rtti -DQWS"
-  X_PRE_LIBS=""
-  LIB_X11=""
-  LIB_XEXT=""
-  LIBSM=""
-  X_INCLUDES=""
-  X_LDFLAGS=""
-  x_includes=""
-  x_libraries=""
-  AC_SUBST(X_PRE_LIBS)
-  AC_SUBST(LIB_X11)
-  AC_SUBST(LIBSM)
-  AC_SUBST(X_INCLUDES)
-  AC_SUBST(X_LDFLAGS)
-  AC_SUBST(x_includes)
-  AC_SUBST(x_libraries)
-fi
-AC_SUBST(QTE_NORTTI)
-AC_SUBST(LIB_XEXT)
-
-
-AC_LANG_RESTORE
-
-])
-
-AC_DEFUN(KDE_PRINT_QT_PROGRAM,
-[
-AC_REQUIRE([KDE_USE_QT])
-cat > conftest.$ac_ext <<EOF
-#include "confdefs.h"
-#include <qglobal.h>
-#include <qapplication.h>
-EOF
-if test "$kde_qtver" = "2"; then
-cat >> conftest.$ac_ext <<EOF
-#include <qevent.h>
-#include <qstring.h>
-#include <qstyle.h>
-EOF
-
-if test $kde_qtsubver -gt 0; then
-cat >> conftest.$ac_ext <<EOF
-#if QT_VERSION < 210
-#error 1
-#endif
-EOF
-fi
-fi
-
-if test "$kde_qtver" = "3"; then
-cat >> conftest.$ac_ext <<EOF
-#include <qcursor.h>
-#include <qstylefactory.h>
-#include <private/qucomextra_p.h>
-EOF
-fi
-
-echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
-cat >> conftest.$ac_ext <<EOF
-#error 1
-#endif
-
-int main() {
-EOF
-if test "$kde_qtver" = "2"; then
-cat >> conftest.$ac_ext <<EOF
-    QStringList *t = new QStringList();
-    Q_UNUSED(t);
-EOF
-if test $kde_qtsubver -gt 0; then
-cat >> conftest.$ac_ext <<EOF
-    QString s;
-    s.setLatin1("Elvis is alive", 14);
-EOF
-fi
-fi
-if test "$kde_qtver" = "3"; then
-cat >> conftest.$ac_ext <<EOF
-    (void)QStyleFactory::create(QString::null);
-    QCursor c(Qt::WhatsThisCursor);
-EOF
-fi
-cat >> conftest.$ac_ext <<EOF
-    return 0;
-}
-EOF
-])
-
-AC_DEFUN(KDE_USE_QT,
-[
-if test -z "$1"; then
-  # Current default Qt version: 3.1
-  kde_qtver=3
-  kde_qtsubver=1
-else
-  kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
-  # following is the check if subversion isnt found in passed argument
-  if test "$kde_qtsubver" = "$1"; then
-    kde_qtsubver=1
-  fi
-  kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
-  if test "$kde_qtver" = "1"; then
-    kde_qtsubver=42
-  fi
-fi
-
-if test -z "$2"; then
-  if test "$kde_qtver" = "2"; then
-    if test $kde_qtsubver -gt 0; then
-      kde_qt_minversion=">= Qt 2.2.2"
-    else
-      kde_qt_minversion=">= Qt 2.0.2"
-    fi
-  fi
-  if test "$kde_qtver" = "3"; then
-    if test $kde_qtsubver -gt 0; then
-      kde_qt_minversion=">= Qt 3.1.0"
-    else
-      kde_qt_minversion=">= Qt 3.0"
-    fi
-  fi
-  if test "$kde_qtver" = "1"; then
-    kde_qt_minversion=">= 1.42 and < 2.0"
-  fi
-else
-   kde_qt_minversion=$2
-fi
-
-if test -z "$3"; then
-   if test $kde_qtver = 3; then
-     if test $kde_qtsubver -gt 0; then
-       kde_qt_verstring="QT_VERSION >= 0x030100"
-     else
-       kde_qt_verstring="QT_VERSION >= 300"
-     fi
-   fi
-   if test $kde_qtver = 2; then
-     if test $kde_qtsubver -gt 0; then
-       kde_qt_verstring="QT_VERSION >= 222"
-     else
-       kde_qt_verstring="QT_VERSION >= 200"
-     fi
-   fi
-   if test $kde_qtver = 1; then
-    kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
-   fi
-else
-   kde_qt_verstring=$3
-fi
-
-if test $kde_qtver = 3; then
-  kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt /usr/share/qt3"
-fi
-if test $kde_qtver = 2; then
-   kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
-fi
-if test $kde_qtver = 1; then
-   kde_qt_dirs="$QTDIR /usr/lib/qt"
-fi
-])
-
-AC_DEFUN(KDE_CHECK_QT_DIRECT,
-[
-AC_REQUIRE([KDE_USE_QT])
-AC_MSG_CHECKING([if Qt compiles without flags])
-AC_CACHE_VAL(kde_cv_qt_direct,
-[
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH
-ac_LIBRARY_PATH="$LIBRARY_PATH"
-ac_cxxflags_safe="$CXXFLAGS"
-ac_ldflags_safe="$LDFLAGS"
-ac_libs_safe="$LIBS"
-
-CXXFLAGS="$CXXFLAGS -I$qt_includes"
-LDFLAGS="$LDFLAGS $X_LDFLAGS"
-if test "x$kde_use_qt_emb" != "xyes"; then
-LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
-else
-LIBS="$LIBQT $LIBSOCKET"
-fi
-LD_LIBRARY_PATH=
-export LD_LIBRARY_PATH
-LIBRARY_PATH=
-export LIBRARY_PATH
-
-KDE_PRINT_QT_PROGRAM
-
-if AC_TRY_EVAL(ac_link) && test -s conftest; then
-  kde_cv_qt_direct="yes"
-else
-  kde_cv_qt_direct="no"
-  echo "configure: failed program was:" >&AC_FD_CC
-  cat conftest.$ac_ext >&AC_FD_CC
-fi
-
-rm -f conftest*
-CXXFLAGS="$ac_cxxflags_safe"
-LDFLAGS="$ac_ldflags_safe"
-LIBS="$ac_libs_safe"
-
-LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"
-export LD_LIBRARY_PATH
-LIBRARY_PATH="$ac_LIBRARY_PATH"
-export LIBRARY_PATH
-AC_LANG_RESTORE
-])
-
-if test "$kde_cv_qt_direct" = "yes"; then
-  AC_MSG_RESULT(yes)
-  $1
-else
-  AC_MSG_RESULT(no)
-  $2
-fi
-])
-
-dnl ------------------------------------------------------------------------
-dnl Try to find the Qt headers and libraries.
-dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed)
-dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed)
-dnl ------------------------------------------------------------------------
-dnl
-AC_DEFUN(AC_PATH_QT_1_3,
-[
-AC_REQUIRE([K_PATH_X])
-AC_REQUIRE([KDE_USE_QT])
-AC_REQUIRE([KDE_CHECK_LIB64])
-
-dnl ------------------------------------------------------------------------
-dnl Add configure flag to enable linking to MT version of Qt library.
-dnl ------------------------------------------------------------------------
-
-AC_ARG_ENABLE(
-  mt,
-  [  --disable-mt            link to non-threaded Qt (deprecated)],
-  kde_use_qt_mt=$enableval,
-  [
-    if test $kde_qtver = 3; then
-      kde_use_qt_mt=yes
-    else
-      kde_use_qt_mt=no
-    fi
-  ]
-)
-
-USING_QT_MT=""
-
-dnl ------------------------------------------------------------------------
-dnl If we not get --disable-qt-mt then adjust some vars for the host.
-dnl ------------------------------------------------------------------------
-
-KDE_MT_LDFLAGS=
-KDE_MT_LIBS=
-if test "x$kde_use_qt_mt" = "xyes"; then
-  KDE_CHECK_THREADING
-  if test "x$kde_use_threading" = "xyes"; then
-    CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
-    KDE_MT_LDFLAGS="$USE_THREADS"
-    KDE_MT_LIBS="$LIBPTHREAD"
-  else
-    kde_use_qt_mt=no
-  fi
-fi
-AC_SUBST(KDE_MT_LDFLAGS)
-AC_SUBST(KDE_MT_LIBS)
-
-kde_qt_was_given=yes
-
-dnl ------------------------------------------------------------------------
-dnl If we haven't been told how to link to Qt, we work it out for ourselves.
-dnl ------------------------------------------------------------------------
-if test -z "$LIBQT_GLOB"; then
-  if test "x$kde_use_qt_emb" = "xyes"; then
-    LIBQT_GLOB="libqte.*"
-  else
-    LIBQT_GLOB="libqt.*"
-  fi
-fi
-
-if test -z "$LIBQT"; then
-dnl ------------------------------------------------------------
-dnl If we got --enable-embedded then adjust the Qt library name.
-dnl ------------------------------------------------------------
-  if test "x$kde_use_qt_emb" = "xyes"; then
-    qtlib="qte"
-  else
-    qtlib="qt"
-  fi
-
-  kde_int_qt="-l$qtlib"
-else
-  kde_int_qt="$LIBQT"
-  kde_lib_qt_set=yes
-fi
-
-if test -z "$LIBQPE"; then
-dnl ------------------------------------------------------------
-dnl If we got --enable-palmtop then add -lqpe to the link line
-dnl ------------------------------------------------------------
-  if test "x$kde_use_qt_emb" = "xyes"; then
-    if test "x$kde_use_qt_emb_palm" = "xyes"; then
-      LIB_QPE="-lqpe"
-    else
-      LIB_QPE=""
-    fi
-  else
-    LIB_QPE=""
-  fi
-fi
-
-dnl ------------------------------------------------------------------------
-dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
-dnl ------------------------------------------------------------------------
-
-if test "x$kde_use_qt_mt" = "xyes"; then
-  if test -z "$LIBQT"; then
-    LIBQT="-l$qtlib-mt"
-    kde_int_qt="-l$qtlib-mt"
-  else
-    LIBQT="$qtlib-mt"
-    kde_int_qt="$qtlib-mt"
-  fi
-  LIBQT_GLOB="lib$qtlib-mt.*"
-  USING_QT_MT="using -mt"
-else
-  LIBQT="-l$qtlib"
-fi
-
-if test $kde_qtver != 1; then
-
-  AC_REQUIRE([AC_FIND_PNG])
-  AC_REQUIRE([AC_FIND_JPEG])
-  LIBQT="$LIBQT $LIBPNG $LIBJPEG"
-fi
-
-if test $kde_qtver = 3; then
-  AC_REQUIRE([KDE_CHECK_LIBDL])
-  LIBQT="$LIBQT $LIBDL"
-fi
-
-AC_MSG_CHECKING([for Qt])
-
-if test "x$kde_use_qt_emb" != "xyes"; then
-LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
-fi
-ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
-qt_libraries=""
-qt_includes=""
-AC_ARG_WITH(qt-dir,
-    [  --with-qt-dir=DIR       where the root of Qt is installed ],
-    [  ac_qt_includes="$withval"/include
-       ac_qt_libraries="$withval"/lib${kdelibsuff}
-       ac_qt_bindir="$withval"/bin
-    ])
-
-AC_ARG_WITH(qt-includes,
-    [  --with-qt-includes=DIR  where the Qt includes are. ],
-    [
-       ac_qt_includes="$withval"
-    ])
-
-kde_qt_libs_given=no
-
-AC_ARG_WITH(qt-libraries,
-    [  --with-qt-libraries=DIR where the Qt library is installed.],
-    [  ac_qt_libraries="$withval"
-       kde_qt_libs_given=yes
-    ])
-
-AC_CACHE_VAL(ac_cv_have_qt,
-[#try to guess Qt locations
-
-qt_incdirs=""
-for dir in $kde_qt_dirs; do
-   qt_incdirs="$qt_incdirs $dir/include $dir"
-done
-qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/X11R6/include/qt2 $x_includes"
-if test ! "$ac_qt_includes" = "NO"; then
-   qt_incdirs="$ac_qt_includes $qt_incdirs"
-fi
-
-if test "$kde_qtver" != "1"; then
-  kde_qt_header=qstyle.h
-else
-  kde_qt_header=qglobal.h
-fi
-
-AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
-ac_qt_includes="$qt_incdir"
-
-qt_libdirs=""
-for dir in $kde_qt_dirs; do
-   qt_libdirs="$qt_libdirs $dir/lib${kdelibsuff} $dir"
-done
-qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
-if test ! "$ac_qt_libraries" = "NO"; then
-  qt_libdir=$ac_qt_libraries
-else
-  qt_libdirs="$ac_qt_libraries $qt_libdirs"
-  # if the Qt was given, the chance is too big that libqt.* doesn't exist
-  qt_libdir=NONE
-  for dir in $qt_libdirs; do
-    try="ls -1 $dir/${LIBQT_GLOB}"
-    if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
-  done
-fi
-
-ac_qt_libraries="$qt_libdir"
-
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-
-ac_cxxflags_safe="$CXXFLAGS"
-ac_ldflags_safe="$LDFLAGS"
-ac_libs_safe="$LIBS"
-
-CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
-LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
-LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
-
-KDE_PRINT_QT_PROGRAM
-
-if AC_TRY_EVAL(ac_link) && test -s conftest; then
-  rm -f conftest*
-else
-  echo "configure: failed program was:" >&AC_FD_CC
-  cat conftest.$ac_ext >&AC_FD_CC
-  ac_qt_libraries="NO"
-fi
-rm -f conftest*
-CXXFLAGS="$ac_cxxflags_safe"
-LDFLAGS="$ac_ldflags_safe"
-LIBS="$ac_libs_safe"
-
-AC_LANG_RESTORE
-if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
-  ac_cv_have_qt="have_qt=no"
-  ac_qt_notfound=""
-  missing_qt_mt=""
-  if test "$ac_qt_includes" = NO; then
-    if test "$ac_qt_libraries" = NO; then
-      ac_qt_notfound="(headers and libraries)";
-    else
-      ac_qt_notfound="(headers)";
-    fi
-  else
-    if test "x$kde_use_qt_mt" = "xyes"; then
-       missing_qt_mt="
-Make sure that you have compiled Qt with thread support!"
-       ac_qt_notfound="(library $qtlib-mt)";
-    else
-       ac_qt_notfound="(library $qtlib)";
-    fi
-  fi
-
-  AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
-For more details about this problem, look at the end of config.log.$missing_qt_mt])
-else
-  have_qt="yes"
-fi
-])
-
-eval "$ac_cv_have_qt"
-
-if test "$have_qt" != yes; then
-  AC_MSG_RESULT([$have_qt]);
-else
-  ac_cv_have_qt="have_qt=yes \
-    ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
-  AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT])
-
-  qt_libraries="$ac_qt_libraries"
-  qt_includes="$ac_qt_includes"
-fi
-
-if test ! "$kde_qt_libs_given" = "yes"; then
-KDE_CHECK_QT_DIRECT(qt_libraries= ,[])
-fi
-
-AC_SUBST(qt_libraries)
-AC_SUBST(qt_includes)
-
-if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
- QT_INCLUDES=""
-else
- QT_INCLUDES="-I$qt_includes"
- all_includes="$QT_INCLUDES $all_includes"
-fi
-
-if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then
- QT_LDFLAGS=""
-else
- QT_LDFLAGS="-L$qt_libraries"
- all_libraries="$all_libraries $QT_LDFLAGS"
-fi
-test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
-
-AC_SUBST(QT_INCLUDES)
-AC_SUBST(QT_LDFLAGS)
-AC_PATH_QT_MOC_UIC
-
-KDE_CHECK_QT_JPEG
-
-if test "x$kde_use_qt_emb" != "xyes"; then
-LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
-else
-LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBPNG)'
-fi
-test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
-
-AC_SUBST(LIB_QT)
-AC_SUBST(LIB_QPE)
-
-AC_SUBST(kde_qtver)
-])
-
-AC_DEFUN(AC_PATH_QT,
-[
-AC_PATH_QT_1_3
-])
-
-AC_DEFUN(KDE_CHECK_UIC_PLUGINS,
-[
-AC_REQUIRE([AC_PATH_QT_MOC_UIC])
-
-if test x$ac_uic_supports_libpath = xyes; then
-
-AC_MSG_CHECKING([if UIC has KDE plugins available])
-AC_CACHE_VAL(kde_cv_uic_plugins,
-[
-cat > actest.ui << EOF
-<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
-<class>NewConnectionDialog</class>
-<widget class="QDialog">
-   <widget class="KLineEdit">
-        <property name="name">
-           <cstring>testInput</cstring>
-        </property>
-   </widget>
-</widget>
-</UI>
-EOF
-       
-
-
-kde_cv_uic_plugins=no
-kde_line="$UIC_PATH -L $kde_widgetdir"
-if test x$ac_uic_supports_nounload = xyes; then
-   kde_line="$kde_line -nounload"
-fi
-kde_line="$kde_line -impl actest.h actest.ui > actest.cpp"
-if AC_TRY_EVAL(kde_line); then
-	if test -f actest.cpp && grep klineedit actest.cpp > /dev/null; then
-		kde_cv_uic_plugins=yes
-	fi
-fi
-rm -f actest.ui actest.cpp
-])
-
-if test "$kde_cv_uic_plugins" = yes; then
-	AC_MSG_RESULT([yes])
-else
-	AC_MSG_ERROR([not found - you need to install kdelibs first.])
-fi
-fi
-])
-
-AC_DEFUN(KDE_CHECK_FINAL,
-[
-  AC_ARG_ENABLE(final, [  --enable-final          build size optimized apps (experimental - needs lots of memory)],
-	kde_use_final=$enableval, kde_use_final=no)
-
-  KDE_COMPILER_REPO
-  if test "x$kde_use_final" = "xyes"; then
-      KDE_USE_FINAL_TRUE=""
-      KDE_USE_FINAL_FALSE="#"
-   else
-      KDE_USE_FINAL_TRUE="#"
-      KDE_USE_FINAL_FALSE=""
-  fi
-  AC_SUBST(KDE_USE_FINAL_TRUE)
-  AC_SUBST(KDE_USE_FINAL_FALSE)
-
-  AC_ARG_ENABLE(closure, [  --disable-closure       don't delay template instantiation],
-  	kde_use_closure=$enableval, kde_use_closure=yes)
-
-  if test "x$kde_use_closure" = "xyes"; then
-       KDE_USE_CLOSURE_TRUE=""
-       KDE_USE_CLOSURE_FALSE="#"
-#       CXXFLAGS="$CXXFLAGS $REPO"
-  else
-       KDE_USE_CLOSURE_TRUE="#"
-       KDE_USE_CLOSURE_FALSE=""
-  fi
-  AC_SUBST(KDE_USE_CLOSURE_TRUE)
-  AC_SUBST(KDE_USE_CLOSURE_FALSE)
-])
-
-dnl ------------------------------------------------------------------------
-dnl Now, the same with KDE
-dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed)
-dnl and $(kde_includes) will be the kdehdrlocation (if needed)
-dnl ------------------------------------------------------------------------
-dnl
-AC_DEFUN(AC_BASE_PATH_KDE,
-[
-AC_PREREQ([2.13])
-AC_REQUIRE([AC_PATH_QT])dnl
-AC_REQUIRE([KDE_CHECK_LIB64])
-
-AC_CHECK_RPATH
-AC_MSG_CHECKING([for KDE])
-
-if test "${prefix}" != NONE; then
-  kde_includes=${prefix}/include
-  ac_kde_includes=$prefix/include
-
-  if test "${exec_prefix}" != NONE; then
-     kde_libraries=${libdir}
-     ac_kde_libraries=$libdir
-     if test "$ac_kde_libraries" = '${exec_prefix}/lib'${kdelibsuff}; then
-	ac_kde_libraries=$exec_prefix/lib${kdelibsuff}
-     fi
-  else
-     kde_libraries=${prefix}/lib${kdelibsuff}
-     ac_kde_libraries=$prefix/lib${kdelibsuff}
-  fi
-else
-  ac_kde_includes=
-  ac_kde_libraries=
-  kde_libraries=""
-  kde_includes=""
-fi
-
-AC_CACHE_VAL(ac_cv_have_kde,
-[#try to guess kde locations
-
-if test "$kde_qtver" = 1; then
-  kde_check_header="ksock.h"
-  kde_check_lib="libkdecore.la"
-else
-  kde_check_header="ksharedptr.h"
-  kde_check_lib="libkio.la"
-fi
-
-if test -z "$1"; then
-
-kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes"
-test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
-kde_incdirs="$ac_kde_includes $kde_incdirs"
-AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
-ac_kde_includes="$kde_incdir"
-
-if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
-  AC_MSG_ERROR([
-in the prefix, you've chosen, are no KDE headers installed. This will fail.
-So, check this please and use another prefix!])
-fi
-
-kde_libdirs="/usr/lib/kde/lib${kdelibsuff} /usr/local/kde/lib${kdelibsuff} /usr/kde/lib${kdelibsuff} /usr/lib${kdelibsuff}/kde /usr/lib${kdelibsuff}/kde3 /usr/lib${kdelibsuff} /usr/X11R6/lib${kdelibsuff} /usr/local/lib${kdelibsuff} /opt/kde3/lib${kdelibsuff} /opt/kde/lib${kdelibsuff} /usr/X11R6/kde/lib${kdelibsuff}"
-test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib${kdelibsuff} $KDEDIR $kde_libdirs"
-kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs"
-AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
-ac_kde_libraries="$kde_libdir"
-
-kde_widgetdir=NO
-dnl this might be somewhere else
-AC_FIND_FILE("kde3/plugins/designer/kdewidgets.la", $kde_libdirs, kde_widgetdir)
-
-if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
-AC_MSG_ERROR([
-in the prefix, you've chosen, are no KDE libraries installed. This will fail.
-So, check this please and use another prefix!])
-fi
-
-if test -n "$kde_widgetdir" && test ! -r "$kde_widgetdir/kde3/plugins/designer/kdewidgets.la"; then
-AC_MSG_ERROR([
-I can't find the designer plugins. These are required and should have been installed
-by kdelibs])
-fi
-
-if test -n "$kde_widgetdir"; then
-    kde_widgetdir="$kde_widgetdir/kde3/plugins/designer"
-fi
-
-
-if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO || test "$kde_widgetdir" = NO; then
-  ac_cv_have_kde="have_kde=no"
-else
-  ac_cv_have_kde="have_kde=yes \
-    ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
-fi
-
-else dnl test -z $1
-
-  ac_cv_have_kde="have_kde=no"
-
-fi
-])dnl
-
-eval "$ac_cv_have_kde"
-
-if test "$have_kde" != "yes"; then
- if test "${prefix}" = NONE; then
-  ac_kde_prefix="$ac_default_prefix"
- else
-  ac_kde_prefix="$prefix"
- fi
- if test "$exec_prefix" = NONE; then
-  ac_kde_exec_prefix="$ac_kde_prefix"
-  AC_MSG_RESULT([will be installed in $ac_kde_prefix])
- else
-  ac_kde_exec_prefix="$exec_prefix"
-  AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix])
- fi
-
- kde_libraries="${libdir}"
- kde_includes=${ac_kde_prefix}/include
-
-else
-  ac_cv_have_kde="have_kde=yes \
-    ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
-  AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes])
-
-  kde_libraries="$ac_kde_libraries"
-  kde_includes="$ac_kde_includes"
-fi
-AC_SUBST(kde_libraries)
-AC_SUBST(kde_includes)
-
-if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes"  || test "$kde_includes" = "/usr/include"; then
- KDE_INCLUDES=""
-else
- KDE_INCLUDES="-I$kde_includes"
- all_includes="$KDE_INCLUDES $all_includes"
-fi
- 
-KDE_LDFLAGS="-L$kde_libraries"
-if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then 
- all_libraries="$all_libraries $KDE_LDFLAGS"
-fi
-
-AC_SUBST(KDE_LDFLAGS)
-AC_SUBST(KDE_INCLUDES)
-
-AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
-
-all_libraries="$all_libraries $USER_LDFLAGS"
-all_includes="$all_includes $USER_INCLUDES"
-AC_SUBST(all_includes)
-AC_SUBST(all_libraries)
-
-if test -z "$1"; then
-KDE_CHECK_UIC_PLUGINS
-fi
-
-ac_kde_libraries="$kde_libdir"
-
-AC_SUBST(AUTODIRS)
-
-
-])
-
-AC_DEFUN(KDE_CHECK_EXTRA_LIBS,
-[
-AC_MSG_CHECKING(for extra includes)
-AC_ARG_WITH(extra-includes, [  --with-extra-includes=DIR
-                          adds non standard include paths],
-  kde_use_extra_includes="$withval",
-  kde_use_extra_includes=NONE
-)
-kde_extra_includes=
-if test -n "$kde_use_extra_includes" && \
-   test "$kde_use_extra_includes" != "NONE"; then
-
-   ac_save_ifs=$IFS
-   IFS=':'
-   for dir in $kde_use_extra_includes; do
-     kde_extra_includes="$kde_extra_includes $dir"
-     USER_INCLUDES="$USER_INCLUDES -I$dir"
-   done
-   IFS=$ac_save_ifs
-   kde_use_extra_includes="added"
-else
-   kde_use_extra_includes="no"
-fi
-AC_SUBST(USER_INCLUDES)
-
-AC_MSG_RESULT($kde_use_extra_includes)
-
-kde_extra_libs=
-AC_MSG_CHECKING(for extra libs)
-AC_ARG_WITH(extra-libs, [  --with-extra-libs=DIR   adds non standard library paths],
-  kde_use_extra_libs=$withval,
-  kde_use_extra_libs=NONE
-)
-if test -n "$kde_use_extra_libs" && \
-   test "$kde_use_extra_libs" != "NONE"; then
-
-   ac_save_ifs=$IFS
-   IFS=':'
-   for dir in $kde_use_extra_libs; do
-     kde_extra_libs="$kde_extra_libs $dir"
-     KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
-     USER_LDFLAGS="$USER_LDFLAGS -L$dir"
-   done
-   IFS=$ac_save_ifs
-   kde_use_extra_libs="added"
-else
-   kde_use_extra_libs="no"
-fi
-
-AC_SUBST(USER_LDFLAGS)
-
-AC_MSG_RESULT($kde_use_extra_libs)
-
-])
-
-AC_DEFUN(KDE_1_CHECK_PATH_HEADERS,
-[
-    AC_MSG_CHECKING([for KDE headers installed])
-    AC_LANG_SAVE
-    AC_LANG_CPLUSPLUS
-cat > conftest.$ac_ext <<EOF
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-#endif
-#include <stdio.h>
-#include "confdefs.h"
-#include <kapp.h>
-
-int main() {
-    printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
-    printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
-    printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
-    printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
-    printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
-    printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
-    printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
-    printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
-    printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
-    printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
-    printf("kde_wallpaperdir=\\"%s\\"\n",
-	KApplication::kde_wallpaperdir().data());
-    printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
-    printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
-    printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
-    printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
-    printf("kde_moduledir=\\"/tmp/dummy\\"\n");
-    printf("kde_styledir=\\"/tmp/dummy\\"\n");
-    printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
-    return 0;
-    }
-EOF
-
- ac_compile='${CXX-g++} -c $CXXFLAGS $all_includes $CPPFLAGS conftest.$ac_ext'
- if AC_TRY_EVAL(ac_compile); then
-   AC_MSG_RESULT(yes)
- else
-   AC_MSG_ERROR([your system is not able to compile a small KDE application!
-Check, if you installed the KDE header files correctly.
-For more details about this problem, look at the end of config.log.])
-  fi
-
-  AC_LANG_RESTORE
-])
-
-AC_DEFUN(KDE_CHECK_KDEQTADDON,
-[
-AC_MSG_CHECKING(for kde-qt-addon)
-AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
-[
- kde_ldflags_safe="$LDFLAGS"
- kde_libs_safe="$LIBS"
- kde_cxxflags_safe="$CXXFLAGS"
-
- LIBS="-lkde-qt-addon $LIBQT $LIBS"
- CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes"
- LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
-
- AC_TRY_LINK([
-   #include <qdom.h>
- ],
- [
-   QDomDocument doc;
- ],
-  kde_cv_have_kdeqtaddon=yes,
-  kde_cv_have_kdeqtaddon=no
- )
-
- LDFLAGS=$kde_ldflags_safe
- LIBS=$kde_libs_safe
- CXXFLAGS=$kde_cxxflags_safe
-])
-
-AC_MSG_RESULT($kde_cv_have_kdeqtaddon)
-
-if test "$kde_cv_have_kdeqtaddon" = "no"; then
-  AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first.
-It is a separate package (and CVS module) named kde-qt-addon.])
-fi
-])
-
-AC_DEFUN(KDE_CHECK_KIMGIO,
-[
-   AC_REQUIRE([AC_BASE_PATH_KDE])
-   AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
-   AC_REQUIRE([AC_FIND_TIFF])
-   AC_REQUIRE([AC_FIND_JPEG])
-   AC_REQUIRE([AC_FIND_PNG])
-   AC_REQUIRE([KDE_CREATE_LIBS_ALIASES])
-
-   if test "$1" = "existance"; then
-     AC_LANG_SAVE
-     AC_LANG_CPLUSPLUS
-     kde_save_LIBS="$LIBS"
-     LIBS="$LIBS $all_libraries $LIBJPEG $LIBTIFF $LIBPNG $LIBQT -lm"
-     AC_CHECK_LIB(kimgio, kimgioRegister, [
-      LIBKIMGIO_EXISTS=yes],LIBKIMGIO_EXISTS=no)
-     LIBS="$kde_save_LIBS"
-     AC_LANG_RESTORE
-   else
-     LIBKIMGIO_EXISTS=yes
-   fi
-
-   if test "$LIBKIMGIO_EXISTS" = "yes"; then
-     LIB_KIMGIO='-lkimgio'
-   else
-     LIB_KIMGIO=''
-   fi
-   AC_SUBST(LIB_KIMGIO)
-])
-
-AC_DEFUN(KDE_CREATE_LIBS_ALIASES,
-[
-   AC_REQUIRE([KDE_MISC_TESTS])
-   AC_REQUIRE([KDE_CHECK_LIBDL])
-   AC_REQUIRE([K_PATH_X])
-
-if test $kde_qtver = 3; then
-   AC_SUBST(LIB_KDECORE, "-lkdecore")
-   AC_SUBST(LIB_KDEUI, "-lkdeui")
-   AC_SUBST(LIB_KIO, "-lkio")
-   AC_SUBST(LIB_SMB, "-lsmb")
-   AC_SUBST(LIB_KAB, "-lkab")
-   AC_SUBST(LIB_KABC, "-lkabc")
-   AC_SUBST(LIB_KHTML, "-lkhtml")
-   AC_SUBST(LIB_KSPELL, "-lkspell")
-   AC_SUBST(LIB_KPARTS, "-lkparts")
-   AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
-# these are for backward compatibility
-   AC_SUBST(LIB_KSYCOCA, "-lkio")
-   AC_SUBST(LIB_KFILE, "-lkio")
-elif test $kde_qtver = 2; then
-   AC_SUBST(LIB_KDECORE, "-lkdecore")
-   AC_SUBST(LIB_KDEUI, "-lkdeui")
-   AC_SUBST(LIB_KIO, "-lkio")
-   AC_SUBST(LIB_KSYCOCA, "-lksycoca")
-   AC_SUBST(LIB_SMB, "-lsmb")
-   AC_SUBST(LIB_KFILE, "-lkfile")
-   AC_SUBST(LIB_KAB, "-lkab")
-   AC_SUBST(LIB_KHTML, "-lkhtml")
-   AC_SUBST(LIB_KSPELL, "-lkspell")
-   AC_SUBST(LIB_KPARTS, "-lkparts")
-   AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
-else
-   AC_SUBST(LIB_KDECORE, "-lkdecore -lXext $(LIB_QT)")
-   AC_SUBST(LIB_KDEUI, "-lkdeui $(LIB_KDECORE)")
-   AC_SUBST(LIB_KFM, "-lkfm $(LIB_KDECORE)")
-   AC_SUBST(LIB_KFILE, "-lkfile $(LIB_KFM) $(LIB_KDEUI)")
-   AC_SUBST(LIB_KAB, "-lkab $(LIB_KIMGIO) $(LIB_KDECORE)")
-fi
-])
-
-AC_DEFUN(AC_PATH_KDE,
-[
-  AC_BASE_PATH_KDE
-  AC_ARG_ENABLE(path-check, [  --disable-path-check    don't try to find out, where to install],
-  [
-  if test "$enableval" = "no";
-    then ac_use_path_checking="default"
-    else ac_use_path_checking=""
-  fi
-  ],
-  [
-  if test "$kde_qtver" = 1;
-    then ac_use_path_checking=""
-    else ac_use_path_checking="default"
-  fi
-  ]
-  )
-
-  AC_CREATE_KFSSTND($ac_use_path_checking)
-
-  AC_SUBST_KFSSTND
-  KDE_CREATE_LIBS_ALIASES
-])
-
-dnl KDE_CHECK_FUNC_EXT(<func>, [headers], [sample-use], [C prototype], [autoheader define], [call if found])
-AC_DEFUN(KDE_CHECK_FUNC_EXT,
-[
-AC_MSG_CHECKING(for $1)
-AC_CACHE_VAL(kde_cv_func_$1,
-[
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-save_CXXFLAGS="$CXXFLAGS"
-kde_safe_LIBS="$LIBS"
-LIBS="$LIBS $X_EXTRA_LIBS"
-if test "$GXX" = "yes"; then
-  CXXFLAGS="$CXXFLAGS -pedantic-errors"
-fi
-AC_TRY_COMPILE([
-$2
-],
-[
-$3
-],
-kde_cv_func_$1=yes,
-kde_cv_func_$1=no)
-CXXFLAGS="$save_CXXFLAGS"
-LIBS=$kde_safe_LIBS
-AC_LANG_RESTORE
-])
-
-AC_MSG_RESULT($kde_cv_func_$1)
-
-AC_MSG_CHECKING([if $1 needs custom prototype])
-AC_CACHE_VAL(kde_cv_proto_$1,
-[
-if test "x$kde_cv_func_$1" = xyes; then
-  kde_cv_proto_$1=no
-else
-  case "$1" in
-	setenv|unsetenv|usleep|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat)
-		kde_cv_proto_$1="yes - in libkdefakes"
-		;;
-	*)
-		kde_cv_proto_$1=unknown
-		;;
-  esac
-fi
-
-if test "x$kde_cv_proto_$1" = xunknown; then
-
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-  kde_safe_libs=$LIBS
-  LIBS="$LIBS $X_EXTRA_LIBS"
-  AC_TRY_LINK([
-$2
-
-extern "C" $4;
-],
-[
-$3
-],
-[ kde_cv_func_$1=yes
-  kde_cv_proto_$1=yes ],
-  [kde_cv_proto_$1="$1 unavailable"]
-)
-LIBS=$kde_safe_libs
-AC_LANG_RESTORE
-fi
-])
-AC_MSG_RESULT($kde_cv_proto_$1)
-
-if test "x$kde_cv_func_$1" = xyes; then
-  AC_DEFINE(HAVE_$5, 1, [Define if you have $1])
-  $6
-fi
-if test "x$kde_cv_proto_$1" = xno; then
-  AC_DEFINE(HAVE_$5_PROTO, 1,
-  [Define if you have the $1 prototype])
-fi
-
-AH_VERBATIM([_HAVE_$5_PROTO],
-[
-#if !defined(HAVE_$5_PROTO)
-#ifdef __cplusplus
-extern "C"
-#endif
-$4;
-#endif
-])
-])
-
-AC_DEFUN(AC_CHECK_SETENV,
-[
-	KDE_CHECK_FUNC_EXT(setenv, [
-#include <stdlib.h>
-], 
-		[setenv("VAR", "VALUE", 1);],
-	        [int setenv (const char *, const char *, int)],
-		[SETENV])
-])
-
-AC_DEFUN(AC_CHECK_UNSETENV,
-[
-	KDE_CHECK_FUNC_EXT(unsetenv, [
-#include <stdlib.h>
-], 
-		[unsetenv("VAR");],
-	        [void unsetenv (const char *)],
-		[UNSETENV])
-])
-
-AC_DEFUN(AC_CHECK_GETDOMAINNAME,
-[
-	KDE_CHECK_FUNC_EXT(getdomainname, [
-#include <stdlib.h>
-#include <unistd.h>
-], 
-		[
-char buffer[200];
-getdomainname(buffer, 200);
-], 	
-	        [int getdomainname (char *, unsigned int)],
-		[GETDOMAINNAME])
-])
-
-AC_DEFUN(AC_CHECK_GETHOSTNAME,
-[
-	KDE_CHECK_FUNC_EXT(gethostname, [
-#include <stdlib.h>
-#include <unistd.h>
-], 
-		[
-char buffer[200];
-gethostname(buffer, 200);
-], 	
-	        [int gethostname (char *, unsigned int)],
-		[GETHOSTNAME])
-])
-
-AC_DEFUN(AC_CHECK_USLEEP,
-[
-	KDE_CHECK_FUNC_EXT(usleep, [
-#include <unistd.h>
-], 
-		[
-usleep(200);
-], 	
-	        [int usleep (unsigned int)],
-		[USLEEP])
-])
-
-
-AC_DEFUN(AC_CHECK_RANDOM,
-[
-	KDE_CHECK_FUNC_EXT(random, [
-#include <stdlib.h>
-], 
-		[
-random();
-], 	
-	        [long int random(void)],
-		[RANDOM])
-
-	KDE_CHECK_FUNC_EXT(srandom, [
-#include <stdlib.h>
-], 
-		[
-srandom(27);
-], 	
-	        [void srandom(unsigned int)],
-		[SRANDOM])
-
-])
-
-AC_DEFUN(AC_CHECK_INITGROUPS,
-[
-	KDE_CHECK_FUNC_EXT(initgroups, [
-#include <sys/types.h>
-#include <unistd.h>
-#include <grp.h>
-],
-	[
-char buffer[200];
-initgroups(buffer, 27);
-],
-	[int initgroups(const char *, gid_t)],
-	[INITGROUPS])
-])
-
-AC_DEFUN(AC_CHECK_MKSTEMP,
-[
-	KDE_CHECK_FUNC_EXT(mkstemp, [
-#include <stdlib.h>
-],
-	[
-mkstemp("/tmp/aaaXXXXXX");
-],
-	[int mkstemp(char *)],
-	[MKSTEMP])
-])
-
-AC_DEFUN(AC_CHECK_MKSTEMPS,
-[
-	KDE_CHECK_FUNC_EXT(mkstemps, [
-#include <stdlib.h>
-#include <unistd.h>
-],
-	[
-mkstemps("/tmp/aaaXXXXXX", 6);
-],
-	[int mkstemps(char *, int)],
-	[MKSTEMPS])
-])
-
-AC_DEFUN(AC_CHECK_RES_INIT,
-[
-  AC_MSG_CHECKING([if res_init needs -lresolv])
-  kde_libs_safe="$LIBS"
-  LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
-  AC_TRY_LINK(
-    [
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#include <resolv.h>
-    ],
-    [
-      res_init(); 
-    ],
-    [
-      LIBRESOLV="-lresolv"
-      AC_MSG_RESULT(yes)
-      AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
-    ],
-    [ AC_MSG_RESULT(no) ]
-  )
-  LIBS="$kde_libs_safe"
-  AC_SUBST(LIBRESOLV)
-
-  AC_MSG_CHECKING([if res_init is available])
-  AC_TRY_COMPILE(
-    [
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#include <resolv.h>
-    ],
-    [
-      res_init();
-    ],
-    [
-      AC_MSG_RESULT(yes)
-      AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
-    ],
-    [ AC_MSG_RESULT(no) ]
-  )
-])
-
-AC_DEFUN(AC_CHECK_STRLCPY,
-[
-	KDE_CHECK_FUNC_EXT(strlcpy, [
-#include <string.h>
-],
-[ char buf[20];
-  strlcpy(buf, "KDE function test", sizeof(buf));
-],
- 	[unsigned long strlcpy(char*, const char*, unsigned long)],
-	[STRLCPY])
-])
-
-AC_DEFUN(AC_CHECK_STRLCAT,
-[
-	KDE_CHECK_FUNC_EXT(strlcat, [
-#include <string.h>
-],
-[ char buf[20];
-  buf[0]='\0';
-  strlcat(buf, "KDE function test", sizeof(buf));
-],
- 	[unsigned long strlcat(char*, const char*, unsigned long)],
-	[STRLCAT])
-])
-
-AC_DEFUN(AC_FIND_GIF,
-   [AC_MSG_CHECKING([for giflib])
-AC_CACHE_VAL(ac_cv_lib_gif,
-[ac_save_LIBS="$LIBS"
-if test "x$kde_use_qt_emb" != "xyes"; then
-LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
-else
-LIBS="$all_libraries -lgif"
-fi
-AC_TRY_LINK(dnl
-[
-#ifdef __cplusplus
-extern "C" {
-#endif
-int GifLastError(void);
-#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.  */
-],
-            [return GifLastError();],
-            eval "ac_cv_lib_gif=yes",
-            eval "ac_cv_lib_gif=no")
-LIBS="$ac_save_LIBS"
-])dnl
-if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then
-  AC_MSG_RESULT(yes)
-  AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif])
-else
-  AC_MSG_ERROR(You need giflib30. Please install the kdesupport package)
-fi
-])
-
-AC_DEFUN(KDE_FIND_JPEG_HELPER,
-[
-AC_MSG_CHECKING([for libjpeg$2])
-AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
-[
-AC_LANG_C
-ac_save_LIBS="$LIBS"
-LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
-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 "C" {
-#endif
-    void jpeg_CreateDecompress(j_decompress_ptr cinfo,
-                                    int version, size_t structsize);
-#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);],
-            eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
-            eval "ac_cv_lib_jpeg_$1=no")
-LIBS="$ac_save_LIBS"
-CFLAGS="$ac_save_CFLAGS"
-])
-
-if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
-  LIBJPEG="$ac_cv_lib_jpeg_$1"
-  AC_MSG_RESULT($ac_cv_lib_jpeg_$1)
-else
-  AC_MSG_RESULT(no)
-  $3
-fi
-
-])
-
-AC_DEFUN(AC_FIND_JPEG,
-[
-dnl first look for libraries
-KDE_FIND_JPEG_HELPER(6b, 6b,
-   KDE_FIND_JPEG_HELPER(normal, [],
-    [
-       LIBJPEG=
-    ]
-   )
-)
-
-dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
-dnl requires system dependent includes loaded before it)
-jpeg_incdirs="$includedir /usr/include /usr/local/include $kde_extra_includes"
-AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
-test "x$jpeg_incdir" = xNO && jpeg_incdir=
-
-dnl if headers _and_ libraries are missing, this is no error, and we
-dnl continue with a warning (the user will get no jpeg support in khtml)
-dnl if only one is missing, it means a configuration error, but we still
-dnl only warn
-if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
-  AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg])
-else
-  if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
-    AC_MSG_WARN([
-There is an installation error in jpeg support. You seem to have only one
-of either the headers _or_ the libraries installed. You may need to either
-provide correct --with-extra-... options, or the development package of
-libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
-Disabling JPEG support.
-])
-  else
-    AC_MSG_WARN([libjpeg not found. disable JPEG support.])
-  fi
-  jpeg_incdir=
-  LIBJPEG=
-fi
-
-AC_SUBST(LIBJPEG)
-AH_VERBATIM(_AC_CHECK_JPEG,
-[/*
- * jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
- * headers and I'm too lazy to write a configure test as long as only
- * unixware is related
- */
-#ifdef _UNIXWARE
-#define HAVE_BOOLEAN
-#endif
-])
-])
-
-AC_DEFUN(KDE_CHECK_QT_JPEG,
-[
-AC_MSG_CHECKING([if Qt needs $LIBJPEG])
-AC_CACHE_VAL(kde_cv_qt_jpeg,
-[
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-ac_save_LIBS="$LIBS"
-LIBS="$all_libraries $USER_LDFLAGS $LIBQT"
-LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
-ac_save_CXXFLAGS="$CXXFLAGS"
-CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
-AC_TRY_LINK(
-[#include <qapplication.h>],
-            [
-            int argc;
-            char** argv;
-            QApplication app(argc, argv);],
-            eval "kde_cv_qt_jpeg=no",
-            eval "kde_cv_qt_jpeg=yes")
-LIBS="$ac_save_LIBS"
-CXXFLAGS="$ac_save_CXXFLAGS"
-AC_LANG_RESTORE
-])
-
-if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then
-  AC_MSG_RESULT(yes)
-  LIBJPEG_QT='$(LIBJPEG)'
-else
-  AC_MSG_RESULT(no)
-  LIBJPEG_QT=
-fi
-
-])
-
-AC_DEFUN(AC_FIND_ZLIB,
-[
-AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
-AC_MSG_CHECKING([for libz])
-AC_CACHE_VAL(ac_cv_lib_z,
-[
-AC_LANG_C
-kde_save_LIBS="$LIBS"
-LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
-kde_save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
-AC_TRY_LINK(dnl
-[
-#include<zlib.h>
-],
-            [return (zlibVersion() == ZLIB_VERSION); ],
-            eval "ac_cv_lib_z='-lz'",
-            eval "ac_cv_lib_z=no")
-LIBS="$kde_save_LIBS"
-CFLAGS="$kde_save_CFLAGS"
-])dnl
-if test ! "$ac_cv_lib_z" = no; then
-  AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
-  LIBZ="$ac_cv_lib_z"
-  AC_SUBST(LIBZ)
-  AC_MSG_RESULT($ac_cv_lib_z)
-else
-  AC_MSG_ERROR(not found. Check your installation and look into config.log)
-  LIBZ=""
-  AC_SUBST(LIBZ)
-fi
-])
-
-AC_DEFUN(KDE_TRY_TIFFLIB,
-[
-AC_MSG_CHECKING([for libtiff $1])
-
-AC_CACHE_VAL(kde_cv_libtiff_$1,
-[
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-kde_save_LIBS="$LIBS"
-if test "x$kde_use_qt_emb" != "xyes"; then
-LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
-else
-LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
-fi
-kde_save_CXXFLAGS="$CXXFLAGS"
-CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
-
-AC_TRY_LINK(dnl
-[
-#include<tiffio.h>
-],
-    [return (TIFFOpen( "", "r") == 0); ],
-[
-    kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ"
-], [
-    kde_cv_libtiff_$1=no
-])
-
-LIBS="$kde_save_LIBS"
-CXXFLAGS="$kde_save_CXXFLAGS"
-AC_LANG_RESTORE
-])
-
-if test "$kde_cv_libtiff_$1" = "no"; then
-    AC_MSG_RESULT(no)
-    LIBTIFF=""
-    $3
-else
-    LIBTIFF="$kde_cv_libtiff_$1"
-    AC_MSG_RESULT(yes)
-    AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff])
-    $2
-fi
-
-])
-
-AC_DEFUN(AC_FIND_TIFF,
-[
-AC_REQUIRE([K_PATH_X])
-AC_REQUIRE([AC_FIND_ZLIB])
-AC_REQUIRE([AC_FIND_JPEG])
-AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
-
-KDE_TRY_TIFFLIB(tiff, [],
-   KDE_TRY_TIFFLIB(tiff34))
-
-AC_SUBST(LIBTIFF)
-])
-
-
-AC_DEFUN(AC_FIND_PNG,
-[
-AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
-AC_REQUIRE([AC_FIND_ZLIB])
-AC_MSG_CHECKING([for libpng])
-AC_CACHE_VAL(ac_cv_lib_png,
-[
-kde_save_LIBS="$LIBS"
-if test "x$kde_use_qt_emb" != "xyes"; then
-LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
-else
-LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
-fi
-kde_save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
-AC_LANG_C
-AC_TRY_LINK(dnl
-    [
-    #include<png.h>
-    ],
-    [
-    png_structp png_ptr = png_create_read_struct(  /* image ptr */
-		PNG_LIBPNG_VER_STRING, 0, 0, 0 );
-    return( png_ptr != 0 );
-    ],
-    eval "ac_cv_lib_png='-lpng $LIBZ -lm'",
-    eval "ac_cv_lib_png=no"
-)
-LIBS="$kde_save_LIBS"
-CFLAGS="$kde_save_CFLAGS"
-])dnl
-if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
-  AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng])
-  LIBPNG="$ac_cv_lib_png"
-  AC_SUBST(LIBPNG)
-  AC_MSG_RESULT($ac_cv_lib_png)
-else
-  AC_MSG_RESULT(no)
-  LIBPNG=""
-  AC_SUBST(LIBPNG)
-fi
-])
-
-AC_DEFUN(AC_CHECK_BOOL,
-[
-  AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
-])
-
-AC_DEFUN(AC_CHECK_GNU_EXTENSIONS,
-[
-AC_MSG_CHECKING(if you need GNU extensions)
-AC_CACHE_VAL(ac_cv_gnu_extensions,
-[
-cat > conftest.c << EOF
-#include <features.h>
-
-#ifdef __GNU_LIBRARY__
-yes
-#endif
-EOF
-
-if (eval "$ac_cpp conftest.c") 2>&5 |
-  egrep "yes" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_gnu_extensions=yes
-else
-  ac_cv_gnu_extensions=no
-fi
-])
-
-AC_MSG_RESULT($ac_cv_gnu_extensions)
-if test "$ac_cv_gnu_extensions" = "yes"; then
-  AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions])
-fi
-])
-
-AC_DEFUN(KDE_CHECK_COMPILER_FLAG,
-[
-AC_MSG_CHECKING(whether $CXX supports -$1)
-kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
-AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
-[
-  AC_LANG_SAVE
-  AC_LANG_CPLUSPLUS
-  save_CXXFLAGS="$CXXFLAGS"
-  CXXFLAGS="$CXXFLAGS -$1"
-  AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
-  CXXFLAGS="$save_CXXFLAGS"
-  AC_LANG_RESTORE
-])
-if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
- AC_MSG_RESULT(yes)
- :
- $2
-else
- AC_MSG_RESULT(no)
- :
- $3
-fi
-])
-
-dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
-dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
-dnl it's all white-space separated
-AC_DEFUN(AC_REMOVE_FORBIDDEN,
-[ __val=$$1
-  __forbid=" $2 "
-  if test -n "$__val"; then
-    __new=""
-    ac_save_IFS=$IFS
-    IFS=" 	"
-    for i in $__val; do
-      case "$__forbid" in
-        *" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;;
-	*) # Careful to not add spaces, where there were none, because otherwise
-	   # libtool gets confused, if we change e.g. CXX
-	   if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
-      esac
-    done
-    IFS=$ac_save_IFS
-    $1=$__new
-  fi
-])
-
-dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
-AC_DEFUN(AC_VALIDIFY_CXXFLAGS,
-[dnl
-if test "x$kde_use_qt_emb" != "xyes"; then
- AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
- AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
-else
- AC_REMOVE_FORBIDDEN(CXX, [-rpath])
- AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
-fi
-])
-
-AC_DEFUN(AC_CHECK_COMPILERS,
-[
-  AC_ARG_ENABLE(debug,[  --enable-debug[=ARG]    enables debug symbols (yes|no|full) [default=no]],
-  [
-    case $enableval in
-      yes)
-        kde_use_debug_code="yes"
-        kde_use_debug_define=no
-        ;;
-      full)
-        kde_use_debug_code="full"
-        kde_use_debug_define=no
-        ;;
-      *)
-        kde_use_debug_code="no"
-        kde_use_debug_define=yes
-        ;;
-    esac
-  ], 
-    [kde_use_debug_code="no"
-      kde_use_debug_define=no
-  ])
-
-  dnl Just for configure --help
-  AC_ARG_ENABLE(dummyoption,[  --disable-debug         disables debug output and debug symbols [default=no]],[],[])
-
-  AC_ARG_ENABLE(strict,[  --enable-strict         compiles with strict compiler options (may not work!)],
-   [
-    if test $enableval = "no"; then
-         kde_use_strict_options="no"
-       else
-         kde_use_strict_options="yes"
-    fi
-   ], [kde_use_strict_options="no"])
-
-  AC_ARG_ENABLE(warnings,[  --disable-warnings      disables compilation with -Wall and similiar],
-   [
-    if test $enableval = "no"; then
-         kde_use_warnings="no"
-       else
-         kde_use_warnings="yes"
-    fi
-   ], [kde_use_warnings="yes"])
-
-  dnl enable warnings for debug build
-  if test "$kde_use_debug_code" != "no"; then
-    kde_use_warnings=yes
-  fi
-
-  AC_ARG_ENABLE(profile,[  --enable-profile        creates profiling infos [default=no]],
-    [kde_use_profiling=$enableval],
-    [kde_use_profiling="no"]
-  )
-
-  AC_ARG_ENABLE(gcov,[  --enable-gcov           enables gcov test coverage support [default=no]],
-    [kde_use_gcov=$enableval],
-    [kde_use_gcov=no]
-  )
-
-  dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
-  CFLAGS=" $CFLAGS"
-
-  AC_PROG_CC 
-
-  AC_PROG_CPP
-
-  if test "$GCC" = "yes"; then
-    if test "$kde_use_debug_code" != "no"; then
-      if test $kde_use_debug_code = "full" || test $kde_use_gcov = "yes"; then
-        CFLAGS="-g3 $CFLAGS"
-      else
-        CFLAGS="-g -O2 $CFLAGS"
-      fi
-    else
-      CFLAGS="-O2 $CFLAGS"
-    fi
-  fi
-
-  if test "$kde_use_debug_define" = "yes"; then
-    CFLAGS="-DNDEBUG $CFLAGS"
-  fi
-
-
-  case "$host" in
-  *-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
-  *-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
-  esac
-
-  if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
-     LDFLAGS=""
-  fi
-
-  CXXFLAGS=" $CXXFLAGS"
-
-  AC_PROG_CXX
-
-  if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
-    if test "$kde_use_debug_code" != "no"; then
-      if test "$CXX" = "KCC"; then
-        CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
-      else
-        if test "$kde_use_debug_code" = "full"; then
-          CXXFLAGS="-g3 $CXXFLAGS"
-        else
-          CXXFLAGS="-g -O2 $CXXFLAGS"
-        fi
-      fi
-      KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
-
-      dnl convenience compiler flags
-      KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
-      AC_SUBST(WOVERLOADED_VIRTUAL)
-    else
-      if test "$CXX" = "KCC"; then
-        CXXFLAGS="+K3 $CXXFLAGS"
-      else
-        CXXFLAGS="-O2 $CXXFLAGS"
-      fi  
-    fi
-  fi
-
-  if test "$kde_use_debug_define" = "yes"; then
-    CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
-  fi  
-
-  if test "$kde_use_profiling" = "yes"; then
-    KDE_CHECK_COMPILER_FLAG(pg,
-    [
-      CFLAGS="-pg $CFLAGS"
-      CXXFLAGS="-pg $CXXFLAGS"
-    ])
-  fi
-
-  if test "$kde_use_gcov" = "yes"; then
-    KDE_CHECK_COMPILER_FLAG(fprofile-arcs,
-    [
-      CFLAGS="-fprofile-arcs -ftest-coverage $CFLAGS"
-      CXXFLAGS="-fprofile-arcs -ftest-coverage $CXXFLAGS"
-    ])
-  fi
-
-  if test "$kde_use_warnings" = "yes"; then
-      if test "$GCC" = "yes"; then
-        case $host in
-          *-*-linux-gnu)	
-            CFLAGS="-ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
-            CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion $CXXFLAGS"
-          ;;
-        esac
-        CXXFLAGS="-Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
-        KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
-        KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
-        KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"])
-     fi
-  fi
-
-  if test "$GCC" = "yes" && test "$kde_use_strict_options" = "yes"; then
-    CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
-  fi
-    
-  if test "$GXX" = "yes"; then
-    KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
-    KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
-    KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS=	)
-  fi
-  if test "$CXX" = "KCC"; 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="$CXXFLAGS --no_exceptions"])
-    dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS=	)
-
-    AC_ARG_ENABLE(pch,[  --enable-pch            enables precompiled header support (currently only KCC) [default=no]],
-    [
-      kde_use_pch=$enableval
-    ],[kde_use_pch=no])
- 
-    if test "$kde_use_pch" = "yes"; then
-      dnl TODO: support --pch-dir!
-      KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
-      dnl the below works (but the dir must exist), but it's
-      dnl useless for a whole package.
-      dnl The are precompiled headers for each source file, so when compiling
-      dnl from scratch, it doesn't make a difference, and they take up
-      dnl around ~5Mb _per_ sourcefile.
-      dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
-      dnl   [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
-    fi
-    dnl this flag controls inlining. by default KCC inlines in optimisation mode
-    dnl all implementations that are defined inside the class {} declaration. 
-    dnl because of templates-compatibility with broken gcc compilers, this
-    dnl can cause excessive inlining. This flag limits it to a sane level
-    KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
-    KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
-    KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
-    KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
-    dnl Some source files are shared between multiple executables
-    dnl (or libraries) and some of those need template instantiations.
-    dnl In that case KCC needs to compile those sources with
-    dnl --one_instantiation_per_object.  To make it easy for us we compile
-    dnl _all_ objects with that flag (--one_per is a shorthand).
-    KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
-  fi
-  AC_SUBST(USE_EXCEPTIONS)
-  dnl obsolete macro - provided to keep things going
-  USE_RTTI=
-  AC_SUBST(USE_RTTI)
-
-  case "$host" in
-      *-*-irix*)  test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
-      *-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
-      *-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
-      *-*-solaris*) 
-        if test "$GXX" = yes; then
-          libstdcpp=`$CXX -print-file-name=libstdc++.so`
-          if test ! -f $libstdcpp; then
-             AC_MSG_ERROR([You've compiled gcc without --enable-shared. This doesn't work with KDE. Please recompile gcc with --enable-shared to receive a libstdc++.so])
-          fi
-        fi
-        ;;
-  esac
-
-  AC_VALIDIFY_CXXFLAGS
-
-  AC_PROG_CXXCPP
-
-  if test "$GCC" = yes; then
-     NOOPT_CXXFLAGS=-O0
-     NOOPT_CFLAGS=-O0
-  fi
-
-  AC_SUBST(NOOPT_CXXFLAGS)
-  AC_SUBST(NOOPT_CFLAGS)
-
-  KDE_CHECK_FINAL
-
-  ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
-])
-
-AC_DEFUN(KDE_ADD_DEPENDENCIES,
-[
-   [A]M_DEPENDENCIES(CC)
-   [A]M_DEPENDENCIES(CXX)
-])
-
-dnl just a wrapper to clean up configure.in
-AC_DEFUN(KDE_PROG_LIBTOOL,
-[
-AC_REQUIRE([AC_CHECK_COMPILERS])
-AC_REQUIRE([AC_ENABLE_SHARED])
-AC_REQUIRE([AC_ENABLE_STATIC])
-
-AC_REQUIRE([AC_LIBTOOL_DLOPEN])
-AC_REQUIRE([KDE_CHECK_LIB64])
-
-AC_LANG_SAVE
-AC_LANG_C
-AC_OBJEXT
-AC_EXEEXT
-AC_LANG_RESTORE
-
-AM_PROG_LIBTOOL
-AC_LIBTOOL_CXX
-
-LIBTOOL_SHELL="/bin/sh ./libtool"
-#  LIBTOOL="$LIBTOOL --silent"
-KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
-AC_SUBST(KDE_PLUGIN)
-
-AC_ARG_ENABLE(objprelink, [  --enable-objprelink     prelink apps using objprelink (obsolete)],
-       kde_use_objprelink=$enableval, kde_use_objprelink=no)
-  if test "x$kde_use_objprelink" = "xyes"; then 
-        AC_MSG_WARN([
-------------------------------------------------------------
-Configuration option --enable-objprelink is no longer useful.
-See http:://objprelink.sourceforge.net for details:
-1- Recent binutils are fast enough to do without objprelink.
-2- Newer versions of objprelink do not need this option.
-------------------------------------------------------------
-])
-  fi
-])
-
-AC_DEFUN(KDE_CHECK_LIB64,
-[
-    kdelibsuff=none
-    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 "$kdelibsuff" = "none"; then
-       kdelibsuff=
-    fi
-    if test -z "$kdelibsuff"; then
-        AC_MSG_RESULT([not using lib directory suffix])
-        AC_DEFINE(KDELIBSUFF, [""], Suffix for lib directories)
-    else
-        if test "$libdir" = '${exec_prefix}/lib'; then
-            libdir="$libdir${kdelibsuff}"
-            AC_SUBST([libdir], ["$libdir"])  dnl ugly hack for lib64 platforms
-        fi
-        AC_DEFINE_UNQUOTED(KDELIBSUFF, ["\"${kdelibsuff}\""], Suffix for lib directories)
-        AC_MSG_RESULT([using lib directory suffix $kdelibsuff])
-    fi
-])
-
-AC_DEFUN(KDE_CHECK_TYPES,
-[  AC_CHECK_SIZEOF(int, 4)dnl
-  AC_CHECK_SIZEOF(long, 4)dnl
-  AC_CHECK_SIZEOF(char *, 4)dnl
-  AC_CHECK_SIZEOF(char, 1)dnl
-])dnl
-
-AC_DEFUN(KDE_DO_IT_ALL,
-[
-AC_CANONICAL_SYSTEM
-AC_ARG_PROGRAM
-AM_INIT_AUTOMAKE($1, $2)
-AM_DISABLE_LIBRARIES
-AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
-AC_CHECK_COMPILERS
-KDE_PROG_LIBTOOL
-AM_KDE_WITH_NLS
-AC_PATH_KDE
-])
-
-AC_DEFUN(AC_CHECK_RPATH,
-[
-AC_MSG_CHECKING(for rpath)
-AC_ARG_ENABLE(rpath,
-      [  --disable-rpath         do not use the rpath feature of ld],
-      USE_RPATH=$enableval, USE_RPATH=yes)
-
-if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
-
-  KDE_RPATH="-R \$(kde_libraries)"
-
-  if test -n "$qt_libraries"; then
-    KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
-  fi
-  dnl $x_libraries is set to /usr/lib in case
-  if test -n "$X_LDFLAGS"; then
-    KDE_RPATH="$KDE_RPATH -R \$(x_libraries)"
-  fi
-  if test -n "$KDE_EXTRA_RPATH"; then
-    KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
-  fi
-fi
-AC_SUBST(KDE_EXTRA_RPATH)
-AC_SUBST(KDE_RPATH)
-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 <sys/types.h>
-#include <sys/socket.h>
-      ],[
-socklen_t a=0;
-getsockname(0,(struct sockaddr*)0, &a);
-      ],
-      ac_cv_socklen_t=socklen_t,
-      AC_TRY_COMPILE([
-#include <sys/types.h>
-#include <sys/socket.h>
-        ],[
-int a=0;
-getsockname(0,(struct sockaddr*)0, &a);
-        ],
-        ac_cv_socklen_t=int,
-        ac_cv_socklen_t=size_t
-      )
-    )
-    AC_LANG_RESTORE
-  ])
-
-  AC_MSG_RESULT($ac_cv_socklen_t)
-  if test "$ac_cv_socklen_t" != "socklen_t"; 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])
-
-])
-
-dnl This is a merge of some macros out of the gettext aclocal.m4
-dnl since we don't need anything, I took the things we need
-dnl the copyright for them is:
-dnl >
-dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
-dnl This Makefile.in is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-dnl >
-dnl for this file it is relicensed under LGPL
-
-AC_DEFUN(AM_KDE_WITH_NLS,
-  [
-    dnl If we use NLS figure out what method
-
-    AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt,
-        [test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt)
-    AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
-
-     if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then
-        AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it])
-        GMSGFMT=":"
-      fi
-      MSGFMT=$GMSGFMT
-      AC_SUBST(GMSGFMT)
-      AC_SUBST(MSGFMT)
-
-      AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext,
-	[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
-
-      dnl Test whether we really found GNU xgettext.
-      if test "$XGETTEXT" != ":"; then
-	dnl If it is no GNU xgettext we define it as : so that the
-	dnl Makefiles still can work.
-	if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
-	  : ;
-	else
-	  AC_MSG_RESULT(
-	    [found xgettext programs is not GNU xgettext; ignore it])
-	  XGETTEXT=":"
-	fi
-      fi
-     AC_SUBST(XGETTEXT)
-
-  ])
-
-# Search path for a program which passes the given test.
-# Ulrich Drepper <drepper at cygnus.com>, 1996.
-
-# serial 1
-# Stephan Kulow: I appended a _KDE against name conflicts
-
-dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR,
-dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
-AC_DEFUN(AM_PATH_PROG_WITH_TEST_KDE,
-[# Extract the first word of "$2", so it can be a program name with args.
-set dummy $2; ac_word=[$]2
-AC_MSG_CHECKING([for $ac_word])
-AC_CACHE_VAL(ac_cv_path_$1,
-[case "[$]$1" in
-  /*)
-  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in ifelse([$5], , $PATH, [$5]); do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if [$3]; then
-	ac_cv_path_$1="$ac_dir/$ac_word"
-	break
-      fi
-    fi
-  done
-  IFS="$ac_save_ifs"
-dnl If no 4th arg is given, leave the cache variable unset,
-dnl so AC_PATH_PROGS will keep looking.
-ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
-])dnl
-  ;;
-esac])dnl
-$1="$ac_cv_path_$1"
-if test -n "[$]$1"; then
-  AC_MSG_RESULT([$]$1)
-else
-  AC_MSG_RESULT(no)
-fi
-AC_SUBST($1)dnl
-])
-
-
-# Check whether LC_MESSAGES is available in <locale.h>.
-# Ulrich Drepper <drepper at cygnus.com>, 1995.
-
-# serial 1
-
-AC_DEFUN(AM_LC_MESSAGES,
-  [if test $ac_cv_header_locale_h = yes; then
-    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
-      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
-       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
-    if test $am_cv_val_LC_MESSAGES = yes; then
-      AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES])
-    fi
-  fi])
-
-dnl From Jim Meyering.
-dnl FIXME: migrate into libit.
-
-AC_DEFUN([AM_FUNC_OBSTACK],
-[AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
- [AC_TRY_LINK([#include "obstack.h"],
-	      [struct obstack *mem;obstack_free(mem,(char *) 0)],
-	      am_cv_func_obstack=yes,
-	      am_cv_func_obstack=no)])
- if test $am_cv_func_obstack = yes; then
-   AC_DEFINE(HAVE_OBSTACK)
- else
-   LIBOBJS="$LIBOBJS obstack.o"
- fi
-])
-
-dnl From Jim Meyering.  Use this if you use the GNU error.[ch].
-dnl FIXME: Migrate into libit
-
-AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
-[AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
- [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
-              am_cv_lib_error_at_line=yes,
-	      am_cv_lib_error_at_line=no)])
- if test $am_cv_lib_error_at_line = no; then
-   LIBOBJS="$LIBOBJS error.o"
- fi
- AC_SUBST(LIBOBJS)dnl
-])
-
-# Macro to add for using GNU gettext.
-# Ulrich Drepper <drepper at cygnus.com>, 1995.
-
-# serial 1
-# Stephan Kulow: I put a KDE in it to avoid name conflicts
-
-AC_DEFUN(AM_KDE_GNU_GETTEXT,
-  [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-   AC_REQUIRE([AC_PROG_RANLIB])dnl
-   AC_REQUIRE([AC_HEADER_STDC])dnl
-   AC_REQUIRE([AC_TYPE_OFF_T])dnl
-   AC_REQUIRE([AC_TYPE_SIZE_T])dnl
-   AC_REQUIRE([AC_FUNC_ALLOCA])dnl
-   AC_REQUIRE([AC_FUNC_MMAP])dnl
-   AC_REQUIRE([AM_KDE_WITH_NLS])dnl
-   AC_CHECK_HEADERS([limits.h locale.h nl_types.h string.h values.h alloca.h])
-   AC_CHECK_FUNCS([getcwd munmap putenv setlocale strchr strcasecmp \
-__argz_count __argz_stringify __argz_next])
-
-   AC_MSG_CHECKING(for stpcpy)
-   AC_CACHE_VAL(kde_cv_func_stpcpy,
-   [
-   kde_safe_cxxflags=$CXXFLAGS
-   CXXFLAGS="-Wmissing-prototypes -Werror"
-   AC_LANG_SAVE
-   AC_LANG_CPLUSPLUS
-   AC_TRY_COMPILE([
-   #include <string.h>
-   ],
-   [
-   char buffer[200];
-   stpcpy(buffer, buffer);
-   ],
-   kde_cv_func_stpcpy=yes,
-   kde_cv_func_stpcpy=no)
-   AC_LANG_RESTORE
-   CXXFLAGS=$kde_safe_cxxflags
-   ])
-   AC_MSG_RESULT($kde_cv_func_stpcpy)
-   if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then
-     AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy])
-   fi
-
-   AM_LC_MESSAGES
-
-   if test "x$CATOBJEXT" != "x"; then
-     if test "x$ALL_LINGUAS" = "x"; then
-       LINGUAS=
-     else
-       AC_MSG_CHECKING(for catalogs to be installed)
-       NEW_LINGUAS=
-       for lang in ${LINGUAS=$ALL_LINGUAS}; do
-         case "$ALL_LINGUAS" in
-          *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
-         esac
-       done
-       LINGUAS=$NEW_LINGUAS
-       AC_MSG_RESULT($LINGUAS)
-     fi
-
-     dnl Construct list of names of catalog files to be constructed.
-     if test -n "$LINGUAS"; then
-       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
-     fi
-   fi
-
-  ])
-
-AC_DEFUN(AC_HAVE_XPM,
- [AC_REQUIRE_CPP()dnl
-  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
-
- test -z "$XPM_LDFLAGS" && XPM_LDFLAGS=
- test -z "$XPM_INCLUDE" && XPM_INCLUDE=
-
- AC_ARG_WITH(xpm, [  --without-xpm           disable color pixmap XPM tests],
-	xpm_test=$withval, xpm_test="yes")
- if test "x$xpm_test" = xno; then
-   ac_cv_have_xpm=no
- else
-   AC_MSG_CHECKING(for XPM)
-   AC_CACHE_VAL(ac_cv_have_xpm,
-   [
-    AC_LANG_C
-    ac_save_ldflags="$LDFLAGS"
-    ac_save_cflags="$CFLAGS"
-    if test "x$kde_use_qt_emb" != "xyes"; then
-      LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
-    else
-      LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
-    fi
-    CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
-    test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
-    AC_TRY_LINK([#include <X11/xpm.h>],[],
-	ac_cv_have_xpm="yes",ac_cv_have_xpm="no")
-    LDFLAGS="$ac_save_ldflags"
-    CFLAGS="$ac_save_cflags"
-   ])dnl
-
-  if test "$ac_cv_have_xpm" = no; then
-    AC_MSG_RESULT(no)
-    XPM_LDFLAGS=""
-    XPMINC=""
-    $2
-  else
-    AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support])
-    if test "$XPM_LDFLAGS" = ""; then
-       XPMLIB='-lXpm $(LIB_X11)'
-    else
-       XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)'
-    fi
-    if test "$XPM_INCLUDE" = ""; then
-       XPMINC=""
-    else
-       XPMINC="-I$XPM_INCLUDE"
-    fi
-    AC_MSG_RESULT(yes)
-    $1
-  fi
- fi
- AC_SUBST(XPMINC)
- AC_SUBST(XPMLIB)
-])
-
-AC_DEFUN(AC_HAVE_DPMS,
- [AC_REQUIRE_CPP()dnl
-  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
-
- test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS=
- test -z "$DPMS_INCLUDE" && DPMS_INCLUDE=
- DPMS_LIB=
-
- AC_ARG_WITH(dpms, [  --without-dpms          disable DPMS power saving],
-	dpms_test=$withval, dpms_test="yes")
- if test "x$dpms_test" = xno; then
-   ac_cv_have_dpms=no
- else
-   AC_MSG_CHECKING(for DPMS)
-   dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms.
-   dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
-   AC_CACHE_VAL(ac_cv_have_dpms,
-   [
-    if test "x$kde_use_qt_emb" = "xyes"; then
-      AC_MSG_RESULT(no)
-      ac_cv_have_dpms="no"
-    else
-      AC_LANG_C
-      ac_save_ldflags="$LDFLAGS"
-      ac_save_cflags="$CFLAGS"
-      ac_save_libs="$LIBS"
-      LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
-      CFLAGS="$CFLAGS $X_INCLUDES"
-      test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
-      AC_TRY_LINK([
-	  #include <X11/Xproto.h>
-	  #include <X11/X.h>
-	  #include <X11/Xlib.h>
-	  #include <X11/extensions/dpms.h>
-	  int foo_test_dpms()
-	  { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
-	  ac_cv_have_dpms="yes", [
-              LDFLAGS="$ac_save_ldflags"
-              CFLAGS="$ac_save_cflags"
-              LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
-              LIBS="$LIBS -lXdpms"
-              CFLAGS="$CFLAGS $X_INCLUDES"
-              test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
-              AC_TRY_LINK([
-	          #include <X11/Xproto.h>
-        	  #include <X11/X.h>
-        	  #include <X11/Xlib.h>
-        	  #include <X11/extensions/dpms.h>
-        	  int foo_test_dpms()
-        	  { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
-        	  [
-                  ac_cv_have_dpms="-lXdpms"
-                  ],ac_cv_have_dpms="no")
-              ])
-      LDFLAGS="$ac_save_ldflags"
-      CFLAGS="$ac_save_cflags"
-      LIBS="$ac_save_libs"
-    fi
-   ])dnl
-
-  if test "$ac_cv_have_dpms" = no; then
-    AC_MSG_RESULT(no)
-    DPMS_LDFLAGS=""
-    DPMSINC=""
-    $2
-  else
-    AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support])
-    if test "$ac_cv_have_dpms" = "-lXdpms"; then
-       DPMS_LIB="-lXdpms"
-    fi
-    if test "$DPMS_LDFLAGS" = ""; then
-       DPMSLIB="$DPMS_LIB "'$(LIB_X11)'
-    else
-       DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)'
-    fi
-    if test "$DPMS_INCLUDE" = ""; then
-       DPMSINC=""
-    else
-       DPMSINC="-I$DPMS_INCLUDE"
-    fi
-    AC_MSG_RESULT(yes)
-    $1
-  fi
- fi
- AC_SUBST(DPMSINC)
- AC_SUBST(DPMSLIB)
-])
-
-AC_DEFUN(AC_HAVE_GL,
- [AC_REQUIRE_CPP()dnl
-  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
-
- test -z "$GL_LDFLAGS" && GL_LDFLAGS=
- test -z "$GL_INCLUDE" && GL_INCLUDE=
-
- AC_ARG_WITH(gl, [  --without-gl            disable 3D GL modes],
-	gl_test=$withval, gl_test="yes")
- if test "x$kde_use_qt_emb" = "xyes"; then
-   # GL and Qt Embedded is a no-go for now.
-   ac_cv_have_gl=no
- elif test "x$gl_test" = xno; then
-   ac_cv_have_gl=no
- else
-   AC_MSG_CHECKING(for GL)
-   AC_CACHE_VAL(ac_cv_have_gl,
-   [
-    AC_LANG_SAVE
-    AC_LANG_CPLUSPLUS
-    ac_save_ldflags="$LDFLAGS"
-    ac_save_cxxflags="$CXXFLAGS"
-    LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU"
-    test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
-    LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
-    CXXFLAGS="$CFLAGS $X_INCLUDES"
-    test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
-    AC_TRY_LINK([#include <GL/gl.h>
-#include <GL/glu.h>
-], [],
-	ac_cv_have_gl="mesa", ac_cv_have_gl="no")
-    if test "x$ac_cv_have_gl" = "xno"; then
-      LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGLU -lGL"
-      test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
-      LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
-      CXXFLAGS="$ac_save_cflags $X_INCLUDES"
-      test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
-      AC_TRY_LINK([#include <GL/gl.h>
-#include <GL/glu.h>
-], [],
-	  ac_cv_have_gl="yes", ac_cv_have_gl="no")
-    fi
-    AC_LANG_RESTORE
-    LDFLAGS="$ac_save_ldflags"
-    CXXFLAGS="$ac_save_cxxflags"
-   ])dnl
-
-  if test "$ac_cv_have_gl" = "no"; then
-    AC_MSG_RESULT(no)
-    GL_LDFLAGS=""
-    GLINC=""
-    $2
-  else
-    AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
-    if test "$GL_LDFLAGS" = ""; then
-       if test "$ac_cv_have_gl" = "mesa"; then
-          GLLIB='-lMesaGLU -lMesaGL $(LIB_X11)'
-       else
-          GLLIB='-lGLU -lGL $(LIB_X11)'
-       fi
-    else
-       if test "$ac_cv_have_gl" = "mesa"; then
-          GLLIB="$GL_LDFLAGS -lMesaGLU -lMesaGL "'$(LIB_X11)'
-       else
-          GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)'
-       fi
-    fi
-    if test "$GL_INCLUDE" = ""; then
-       GLINC=""
-    else
-       GLINC="-I$GL_INCLUDE"
-    fi
-    AC_MSG_RESULT($ac_cv_have_gl)
-    $1
-  fi
- fi
- AC_SUBST(GLINC)
- AC_SUBST(GLLIB)
-])
-
-
- dnl shadow password and PAM magic - maintained by ossi at kde.org
-
-AC_DEFUN(KDE_PAM, [
-  AC_REQUIRE([KDE_CHECK_LIBDL])
-
-  AC_ARG_WITH(pam,
-    [  --with-pam[=ARG]        enable support for PAM: ARG=[yes|no|service name]],
-    [ if test "x$withval" = "xyes"; then
-        use_pam=yes
-        pam_service=kde
-      elif test "x$withval" = "xno"; then
-        use_pam=no
-      else
-        use_pam=yes
-        pam_service=$withval
-      fi
-      ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
-    ], [
-      AC_CACHE_VAL(ac_cv_path_pam,
-        [ use_pam=no
-          AC_CHECK_LIB(pam, pam_start,
-            [ AC_CHECK_HEADER(security/pam_appl.h,
-                [ use_pam=yes
-                  pam_service=kde ]) 
-            ], , $LIBDL)
-          ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
-        ])
-    ])
-  eval "$ac_cv_path_pam"
-
-  AC_MSG_CHECKING(for PAM)
-  if test "x$use_pam" = xno; then
-    AC_MSG_RESULT(no)
-    PAMLIBS=""
-  else
-    AC_MSG_RESULT(yes)
-    AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
-    PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
-
-    dnl test whether struct pam_message is const (Linux) or not (Sun)
-    AC_MSG_CHECKING(for const pam_message)
-    AC_EGREP_HEADER([struct pam_message], security/pam_appl.h,
-      [ AC_EGREP_HEADER([const struct pam_message], security/pam_appl.h,
-                        [AC_MSG_RESULT([const: Linux-type PAM])],
-                        [AC_MSG_RESULT([nonconst: Sun-type PAM])
-                        AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
-                        )],
-      [AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
-  fi
-
-  AC_SUBST(PAMLIBS)
-])
-
-dnl DEF_PAM_SERVICE(arg name, full name, define name)
-AC_DEFUN(DEF_PAM_SERVICE, [
-  AC_ARG_WITH($1-pam,
-    [  --with-$1-pam=[val]    override PAM service from --with-pam for $2],
-    [ if test "x$use_pam" = xyes; then
-        $3_PAM_SERVICE="$withval"
-      else
-        AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
-You may want to enforce it by using --with-pam.])
-      fi
-    ], 
-    [ if test "x$use_pam" = xyes; then
-        $3_PAM_SERVICE="$pam_service"
-      fi
-    ])
-    if test -n "$$3_PAM_SERVICE"; then
-      AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
-      AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
-    fi
-    AC_SUBST($3_PAM_SERVICE)
-])
-
-AC_DEFUN(KDE_SHADOWPASSWD, [
-  AC_REQUIRE([KDE_PAM])
-
-  AC_CHECK_LIB(shadow, getspent,
-    [ LIBSHADOW="-lshadow"
-      ac_use_shadow=yes
-    ],
-    [ dnl for UnixWare
-      AC_CHECK_LIB(gen, getspent, 
-        [ LIBGEN="-lgen"
-          ac_use_shadow=yes
-        ], 
-        [ AC_CHECK_FUNC(getspent, 
-            [ ac_use_shadow=yes ],
-            [ ac_use_shadow=no ])
-	])
-    ])
-  AC_SUBST(LIBSHADOW)
-  AC_SUBST(LIBGEN)
-  
-  AC_MSG_CHECKING([for shadow passwords])
-
-  AC_ARG_WITH(shadow,
-    [  --with-shadow		  If you want shadow password support ],
-    [ if test "x$withval" != "xno"; then
-        use_shadow=yes
-      else
-        use_shadow=no
-      fi
-    ], [
-      use_shadow="$ac_use_shadow"
-    ])
-
-  if test "x$use_shadow" = xyes; then
-    AC_MSG_RESULT(yes)
-    AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
-  else
-    AC_MSG_RESULT(no)
-    LIBSHADOW=
-    LIBGEN=
-  fi
-
-  dnl finally make the relevant binaries setuid root, if we have shadow passwds.
-  dnl this still applies, if we could use it indirectly through pam.
-  if test "x$use_shadow" = xyes || 
-     ( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
-      case $host in
-      *-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
-	SETUIDFLAGS="-m 4755 -o root";;
-      *)
-	SETUIDFLAGS="-m 4755";;
-      esac
-  fi
-  AC_SUBST(SETUIDFLAGS)
-
-])
-
-AC_DEFUN(KDE_PASSWDLIBS, [
-  AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
-  AC_REQUIRE([KDE_PAM])
-  AC_REQUIRE([KDE_SHADOWPASSWD])
-
-  if test "x$use_pam" = "xyes"; then 
-    PASSWDLIBS="$PAMLIBS"
-  else
-    PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
-  fi
-
-  dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
-  dnl /etc/master.passwd holds the actual passwords.  /etc/master.passwd requires
-  dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
-  dnl may need to read /etc/master.passwd).
-  case $host in
-  *-*-freebsd*)
-    SETUIDFLAGS="-m 4755 -o root"
-    ;;
-  *)
-    ;;
-  esac
-
-  AC_SUBST(PASSWDLIBS)
-])
-
-AC_DEFUN(KDE_CHECK_LIBDL,
-[
-AC_CHECK_LIB(dl, dlopen, [
-LIBDL="-ldl"
-ac_cv_have_dlfcn=yes
-])
-
-AC_CHECK_LIB(dld, shl_unload, [
-LIBDL="-ldld"
-ac_cv_have_shload=yes
-])
-
-AC_SUBST(LIBDL)
-])
-
-AC_DEFUN(KDE_CHECK_DLOPEN,
-[
-KDE_CHECK_LIBDL
-AC_CHECK_HEADERS(dlfcn.h dl.h)
-if test "$ac_cv_header_dlfcn_h" = "no"; then
-  ac_cv_have_dlfcn=no
-fi
-
-if test "$ac_cv_header_dl_h" = "no"; then
-  ac_cv_have_shload=no
-fi
-
-dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
-dnl (MM)
-AC_ARG_ENABLE(dlopen,
-[  --disable-dlopen        link statically [default=no]] ,
-enable_dlopen=$enableval,
-enable_dlopen=yes)
-
-# override the user's opinion, if we know it better ;)
-if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then
-  enable_dlopen=no
-fi
-
-if test "$ac_cv_have_dlfcn" = "yes"; then
-  AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn])
-fi
-
-if test "$ac_cv_have_shload" = "yes"; then
-  AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload])
-fi
-
-if test "$enable_dlopen" = no ; then
-  test -n "$1" && eval $1
-else
-  test -n "$2" && eval $2
-fi
-
-])
-
-AC_DEFUN(KDE_CHECK_DYNAMIC_LOADING,
-[
-KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no)
-KDE_PROG_LIBTOOL
-AC_MSG_CHECKING([dynamic loading])
-eval "`egrep '^build_libtool_libs=' libtool`"
-if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then
-  dynamic_loading=yes
-  AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING)
-else
-  dynamic_loading=no
-fi
-AC_MSG_RESULT($dynamic_loading)
-if test "$dynamic_loading" = "yes"; then
-  $1
-else
-  $2
-fi
-])
-
-AC_DEFUN(KDE_ADD_INCLUDES,
-[
-if test -z "$1"; then
-  test_include="Pix.h"
-else
-  test_include="$1"
-fi
-
-AC_MSG_CHECKING([for libg++ ($test_include)])
-
-AC_CACHE_VAL(kde_cv_libgpp_includes,
-[
-kde_cv_libgpp_includes=no
-
-   for ac_dir in               \
-                               \
-     /usr/include/g++          \
-     /usr/include              \
-     /usr/unsupported/include  \
-     /opt/include              \
-     $extra_include            \
-     ; \
-   do
-     if test -r "$ac_dir/$test_include"; then
-       kde_cv_libgpp_includes=$ac_dir
-       break
-     fi
-   done
-])
-
-AC_MSG_RESULT($kde_cv_libgpp_includes)
-if test "$kde_cv_libgpp_includes" != "no"; then
-  all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES"
-fi
-])
-])
-
-
-AC_DEFUN(KDE_CHECK_MICO,
-[
-AC_REQUIRE([KDE_CHECK_LIBDL])
-AC_REQUIRE([KDE_MISC_TESTS])
-AC_MSG_CHECKING(for MICO)
-
-if test -z "$MICODIR"; then
-    kde_micodir=/usr/local
- else
-    kde_micodir="$MICODIR"
-fi
-
-AC_ARG_WITH(micodir,
-  [  --with-micodir=micodir  where mico is installed ],
-  kde_micodir=$withval,
-  kde_micodir=$kde_micodir
-)
-
-AC_CACHE_VAL(kde_cv_mico_incdir,
-[
-  mico_incdirs="$kde_micodir/include /usr/include /usr/local/include /usr/local/include /opt/local/include $kde_extra_includes"
-AC_FIND_FILE(CORBA.h, $mico_incdirs, kde_cv_mico_incdir)
-
-])
-kde_micodir=`echo $kde_cv_mico_incdir | sed -e 's#/include##'`
-
-if test ! -r  $kde_micodir/include/CORBA.h; then
-  AC_MSG_ERROR([No CORBA.h found, specify another micodir])
-fi
-
-AC_MSG_RESULT($kde_micodir)
-
-MICO_INCLUDES=-I$kde_micodir/include
-AC_SUBST(MICO_INCLUDES)
-MICO_LDFLAGS=-L$kde_micodir/lib
-AC_SUBST(MICO_LDFLAGS)
-micodir=$kde_micodir
-AC_SUBST(micodir)
-
-AC_MSG_CHECKING([for MICO version])
-AC_CACHE_VAL(kde_cv_mico_version,
-[
-AC_LANG_C
-cat >conftest.$ac_ext <<EOF
-#include <stdio.h>
-#include <mico/version.h>
-int main() {
-
-   printf("MICO_VERSION=%s\n",MICO_VERSION);
-   return (0);
-}
-EOF
-ac_compile='${CC-gcc} $CFLAGS $MICO_INCLUDES conftest.$ac_ext -o conftest'
-if AC_TRY_EVAL(ac_compile); then
-  if eval `./conftest 2>&5`; then
-    kde_cv_mico_version=$MICO_VERSION
-  else
-    AC_MSG_ERROR([your system is not able to execute a small application to
-    find MICO version! Check $kde_micodir/include/mico/version.h])
-  fi
-else
-  AC_MSG_ERROR([your system is not able to compile a small application to
-  find MICO version! Check $kde_micodir/include/mico/version.h])
-fi
-])
-
-dnl installed MICO version
-mico_v_maj=`echo $kde_cv_mico_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
-mico_v_mid=`echo $kde_cv_mico_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
-mico_v_min=`echo $kde_cv_mico_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
-
-if test "x$1" = "x"; then
- req_version="2.3.0"
-else
- req_version=$1
-fi
-
-dnl required MICO version
-req_v_maj=`echo $req_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
-req_v_mid=`echo $req_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
-req_v_min=`echo $req_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
-
-if test "$mico_v_maj" -lt "$req_v_maj" || \
-   ( test "$mico_v_maj" -eq "$req_v_maj" && \
-        test "$mico_v_mid" -lt "$req_v_mid" ) || \
-   ( test "$mico_v_mid" -eq "$req_v_mid" && \
-        test "$mico_v_min" -lt "$req_v_min" )
-
-then
-  AC_MSG_ERROR([found MICO version $kde_cv_mico_version but version $req_version \
-at least is required. You should upgrade MICO.])
-else
-  AC_MSG_RESULT([$kde_cv_mico_version (minimum version $req_version, ok)])
-fi
-
-LIBMICO="-lmico$kde_cv_mico_version $LIBCRYPT $LIBSOCKET $LIBDL"
-AC_SUBST(LIBMICO)
-if test -z "$IDL"; then
-  IDL='$(kde_bindir)/cuteidl'
-fi
-AC_SUBST(IDL)
-IDL_DEPENDENCIES='$(kde_includes)/CUTE.h'
-AC_SUBST(IDL_DEPENDENCIES)
-
-idldir="\$(includedir)/idl"
-AC_SUBST(idldir)
-
-])
-
-AC_DEFUN(KDE_CHECK_MINI_STL,
-[
-AC_REQUIRE([KDE_CHECK_MICO])
-
-AC_MSG_CHECKING(if we use mico's mini-STL)
-AC_CACHE_VAL(kde_cv_have_mini_stl,
-[
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-kde_save_cxxflags="$CXXFLAGS"
-CXXFLAGS="$CXXFLAGS $MICO_INCLUDES"
-AC_TRY_COMPILE(
-[
-#include <mico/config.h>
-],
-[
-#ifdef HAVE_MINI_STL
-#error "nothing"
-#endif
-],
-kde_cv_have_mini_stl=no,
-kde_cv_have_mini_stl=yes)
-CXXFLAGS="$kde_save_cxxflags"
-AC_LANG_RESTORE
-])
-
-if test "x$kde_cv_have_mini_stl" = "xyes"; then
-   AC_MSG_RESULT(yes)
-   $1
-else
-   AC_MSG_RESULT(no)
-   $2
-fi
-])
-
-])
-
-
-AC_DEFUN(KDE_CHECK_LIBPTHREAD,
-[
-AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"] )
-AC_SUBST(LIBPTHREAD)
-])
-
-AC_DEFUN(KDE_CHECK_PTHREAD_OPTION,
-[
-    AC_ARG_ENABLE(kernel-threads, [  --enable-kernel-threads Enable the use of the LinuxThreads port on FreeBSD/i386 only.],
-	kde_use_kernthreads=$enableval, kde_use_kernthreads=no)
-
-    if test "$kde_use_kernthreads" = "yes"; then
-      ac_save_CXXFLAGS="$CXXFLAGS"
-      ac_save_CFLAGS="$CFLAGS"
-      CXXFLAGS="-I/usr/local/include/pthread/linuxthreads $CXXFLAGS"
-      CFLAGS="-I/usr/local/include/pthread/linuxthreads $CFLAGS"
-      AC_CHECK_HEADERS(pthread/linuxthreads/pthread.h)
-      CXXFLAGS="$ac_save_CXXFLAGS"
-      CFLAGS="$ac_save_CFLAGS"
-      if test "$ac_cv_header_pthread_linuxthreads_pthread_h" = "no"; then
-        kde_use_kernthreads=no
-      else
-        dnl Add proper -I and -l statements
-        AC_CHECK_LIB(lthread, pthread_join, [LIBPTHREAD="-llthread -llgcc_r"]) dnl for FreeBSD
-        if test "x$LIBPTHREAD" = "x"; then
-          kde_use_kernthreads=no
-        else
-          USE_THREADS="-D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads"
-        fi
-      fi
-    else 
-      USE_THREADS=""
-      if test -z "$LIBPTHREAD"; then
-        KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-pthread"] )
-      fi
-    fi
-
-    AH_VERBATIM(__svr_define, [
-#if defined(__SVR4) && !defined(__svr4__)
-#define __svr4__ 1
-#endif
-])
-    case $host_os in
- 	solaris*)
-		KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
-                CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
-    		;;
-        freebsd*)
-                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
-                ;;
-        aix*)
-                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
-                LIBPTHREAD="$LIBPTHREAD -lc_r"
-                ;;
-        linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
-                if test "$CXX" = "KCC"; then
-                  CXXFLAGS="$CXXFLAGS --thread_safe"
-		  NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
-                fi
-                ;;
-	*)
-		;;
-    esac
-    AC_SUBST(USE_THREADS)
-    AC_SUBST(LIBPTHREAD)
-])
-
-AC_DEFUN(KDE_CHECK_THREADING,
-[
-  AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
-  AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
-  dnl default is yes if libpthread is found and no if no libpthread is available
-  if test -z "$LIBPTHREAD"; then
-    if test -z "$USE_THREADS"; then
-      kde_check_threading_default=no
-    else
-      kde_check_threading_default=yes
-    fi
-  else
-    kde_check_threading_default=yes
-  fi
-  AC_ARG_ENABLE(threading, [  --disable-threading     disables threading even if libpthread found ],
-   kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
-  if test "x$kde_use_threading" = "xyes"; then
-    AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
-  fi
-])
-
-AC_DEFUN(KDE_TRY_LINK_PYTHON,
-[
-if test "$kde_python_link_found" = no; then
-
-if test "$1" = normal; then
-  AC_MSG_CHECKING(if a Python application links)
-else
-  AC_MSG_CHECKING(if Python depends on $2)
-fi
-
-AC_CACHE_VAL(kde_cv_try_link_python_$1,
-[
-AC_LANG_SAVE
-AC_LANG_C
-kde_save_cflags="$CFLAGS"
-CFLAGS="$CFLAGS $PYTHONINC"
-kde_save_libs="$LIBS"
-LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET"
-kde_save_ldflags="$LDFLAGS"
-LDFLAGS="$LDFLAGS $PYTHONLIB"
-
-AC_TRY_LINK(
-[
-#include <Python.h>
-],[
-	PySys_SetArgv(1, 0);
-],
-	[kde_cv_try_link_python_$1=yes],
-	[kde_cv_try_link_python_$1=no]
-)
-CFLAGS="$kde_save_cflags"
-LIBS="$kde_save_libs"
-LDFLAGS="$kde_save_ldflags"
-])
-
-if test "$kde_cv_try_link_python_$1" = "yes"; then
-  AC_MSG_RESULT(yes)
-  kde_python_link_found=yes
-  if test ! "$1" = normal; then
-    LIBPYTHON="$LIBPYTHON $2"
-  fi
-  $3
-else
-  AC_MSG_RESULT(no)
-  $4
-fi
-AC_LANG_RESTORE
-
-fi
-
-])
-
-AC_DEFUN(KDE_CHECK_PYTHON_DIR,
-[
-AC_MSG_CHECKING([for Python directory])
- 
-AC_CACHE_VAL(kde_cv_pythondir,
-[
-  if test -z "$PYTHONDIR"; then
-    kde_cv_pythondir=/usr/local
-  else
-    kde_cv_pythondir="$PYTHONDIR"
-  fi
-])
- 
-AC_ARG_WITH(pythondir,
-[  --with-pythondir=pythondir   use python installed in pythondir ],
-[
-  ac_python_dir=$withval
-], ac_python_dir=$kde_cv_pythondir
-)
- 
-AC_MSG_RESULT($ac_python_dir)
-])
-
-AC_DEFUN(KDE_CHECK_PYTHON_INTERN,
-[
-AC_REQUIRE([KDE_CHECK_LIBDL])
-AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
-AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
-
-if test -z "$1"; then
-  version="1.5"
-else
-  version="$1"
-fi
-
-AC_MSG_CHECKING([for Python$version])
-
-python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes"
-AC_FIND_FILE(Python.h, $python_incdirs, python_incdir)
-if test ! -r $python_incdir/Python.h; then
-  AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
-  python_incdir=$python_incdir/python$version
-  if test ! -r $python_incdir/Python.h; then
-    python_incdir=no
-  fi
-fi
-
-PYTHONINC=-I$python_incdir
-
-python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
-AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
-if test ! -r $python_libdir/libpython$version.a; then
-  AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
-  python_libdir=$python_libdir/python$version/config
-  if test ! -r $python_libdir/libpython$version.a; then
-    python_libdir=no
-  fi
-fi
-
-PYTHONLIB=-L$python_libdir
-kde_orig_LIBPYTHON=$LIBPYTHON
-if test -z "$LIBPYTHON"; then
-  LIBPYTHON=-lpython$version
-fi
-
-python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
-AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
-python_moddir=$python_moddir/python$version
-if test ! -r $python_moddir/copy.py; then
-  python_moddir=no
-fi
-
-PYTHONMODDIR=$python_moddir
-
-AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
-
-if test x$python_incdir = xno ||  test x$python_libdir = xno ||  test x$python_moddir = xno; then
-   LIBPYTHON=$kde_orig_LIBPYTHON
-   test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
-   test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
-   $2
-else 
-  dnl Note: this test is very weak
-  kde_python_link_found=no
-  KDE_TRY_LINK_PYTHON(normal)
-  KDE_TRY_LINK_PYTHON(m, -lm)
-  KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
-  KDE_TRY_LINK_PYTHON(tcl, -ltcl)
-  KDE_TRY_LINK_PYTHON(db2, -ldb2)
-  KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
-  KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
-  KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
-  KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
-  KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
-  KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
-  KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
-	[AC_MSG_WARN([it seems, Python depends on another library.
-    Pleae set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
-    and contact the authors to let them know about this problem])
-	])
-
-  LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
-  AC_SUBST(PYTHONINC)
-  AC_SUBST(PYTHONLIB)
-  AC_SUBST(LIBPYTHON)
-  AC_SUBST(PYTHONMODDIR)
-  AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
-fi
-
-])
-
-
-AC_DEFUN(KDE_CHECK_PYTHON,
-[
-  KDE_CHECK_PYTHON_INTERN("2.2", 
-    [KDE_CHECK_PYTHON_INTERN("2.1", 
-      [KDE_CHECK_PYTHON_INTERN("2.0", [ KDE_CHECK_PYTHON_INTERN($1, $2) ])
-  ])])
-])
-
-AC_DEFUN(KDE_CHECK_STL_SGI,
-[
-    AC_MSG_CHECKING([if STL implementation is SGI like])
-    AC_CACHE_VAL(kde_cv_stl_type_sgi,
-    [
-      AC_TRY_COMPILE([
-#include <string>
-using namespace std;
-],[
-  string astring="Hallo Welt.";
-  astring.erase(0, 6); // now astring is "Welt"
-  return 0;
-], kde_cv_stl_type_sgi=yes,
-   kde_cv_stl_type_sgi=no)
-])
-
-   AC_MSG_RESULT($kde_cv_stl_type_sgi)
-
-   if test "$kde_cv_stl_type_sgi" = "yes"; then
-	AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
-   fi
-])
-
-AC_DEFUN(KDE_CHECK_STL_HP,
-[
-    AC_MSG_CHECKING([if STL implementation is HP like])
-    AC_CACHE_VAL(kde_cv_stl_type_hp,
-    [
-      AC_TRY_COMPILE([
-#include <string>
-using namespace std;
-],[
-  string astring="Hello World";
-  astring.remove(0, 6); // now astring is "World"
-  return 0;
-], kde_cv_stl_type_hp=yes,
-   kde_cv_stl_type_hp=no)
-])
-   AC_MSG_RESULT($kde_cv_stl_type_hp)
-
-   if test "$kde_cv_stl_type_hp" = "yes"; then
-	AC_DEFINE_UNQUOTED(HAVE_HP_STL, 1, [Define if you have a STL implementation by HP])
-   fi
-])
-
-AC_DEFUN(KDE_CHECK_STL,
-[
-    AC_LANG_SAVE
-    AC_LANG_CPLUSPLUS
-    ac_save_CXXFLAGS="$CXXFLAGS"
-    CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
-    KDE_CHECK_STL_SGI
-
-    if test "$kde_cv_stl_type_sgi" = "no"; then
-       KDE_CHECK_STL_HP
-
-       if test "$kde_cv_stl_type_hp" = "no"; then
-         AC_MSG_ERROR("no known STL type found - did you forget to install libstdc++[-devel] ?")
-       fi
-    fi
-
-    CXXFLAGS="$ac_save_CXXFLAGS"
-    AC_LANG_RESTORE
-])
-
-AC_DEFUN(AC_FIND_QIMGIO,
-   [AC_REQUIRE([AC_FIND_JPEG])
-AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
-AC_MSG_CHECKING([for qimgio])
-AC_CACHE_VAL(ac_cv_lib_qimgio,
-[
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-ac_save_LIBS="$LIBS"
-ac_save_CXXFLAGS="$CXXFLAGS"
-LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT"
-CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
-AC_TRY_RUN(dnl
-[
-#include <qimageio.h>
-#include <qstring.h>
-int main() {
-		QString t = "hallo";
-		t.fill('t');
-		qInitImageIO();
-}
-],
-            ac_cv_lib_qimgio=yes,
-            ac_cv_lib_qimgio=no,
-	    ac_cv_lib_qimgio=no)
-LIBS="$ac_save_LIBS"
-CXXFLAGS="$ac_save_CXXFLAGS"
-AC_LANG_RESTORE
-])dnl
-if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then
-  LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG"
-  AC_MSG_RESULT(yes)
-  AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available])
-  AC_SUBST(LIBQIMGIO)
-else
-  AC_MSG_RESULT(not found)
-fi
-])
-
-AC_DEFUN(KDE_CHECK_ANSI,
-[
-])
-
-AC_DEFUN(KDE_CHECK_INSURE,
-[
-  AC_ARG_ENABLE(insure, [  --enable-insure             use insure++ for debugging [default=no]],
-  [
-  if test $enableval = "no"; dnl
-	then ac_use_insure="no"
-	else ac_use_insure="yes"
-   fi
-  ], [ac_use_insure="no"])
-
-  AC_MSG_CHECKING(if we will use Insure++ to debug)
-  AC_MSG_RESULT($ac_use_insure)
-  if test "$ac_use_insure" = "yes"; dnl
-       then CC="insure"; CXX="insure"; dnl CFLAGS="$CLAGS -fno-rtti -fno-exceptions "????
-   fi
-])
-
-AC_DEFUN(AM_DISABLE_LIBRARIES,
-[
-    AC_PROVIDE([AM_ENABLE_STATIC])
-    AC_PROVIDE([AM_ENABLE_SHARED])
-    enable_static=no
-    enable_shared=yes
-])
-
-
-AC_DEFUN(AC_CHECK_UTMP_FILE,
-[
-    AC_MSG_CHECKING([for utmp file])
-
-    AC_CACHE_VAL(kde_cv_utmp_file,
-    [
-    kde_cv_utmp_file=no
-
-    for ac_file in    \
-                      \
-	/var/run/utmp \
-	/var/adm/utmp \
-	/etc/utmp     \
-     ; \
-    do
-     if test -r "$ac_file"; then
-       kde_cv_utmp_file=$ac_file
-       break
-     fi
-    done
-    ])
-
-    if test "$kde_cv_utmp_file" != "no"; then
-	AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries])
-	$1
-	AC_MSG_RESULT($kde_cv_utmp_file)
-    else
-    	$2
-	AC_MSG_RESULT([non found])
-    fi
-])
-
-
-AC_DEFUN(KDE_CREATE_SUBDIRSLIST,
-[
-
-DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
-
-if test ! -s $srcdir/subdirs; then
-  dnl Note: Makefile.common creates subdirs, so this is just a fallback
-  TOPSUBDIRS=""
-  files=`cd $srcdir && ls -1`
-  dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
-  for i in $dirs; do
-    echo $i >> $srcdir/subdirs
-  done
-fi
-
-if test -s $srcdir/inst-apps; then
-  ac_topsubdirs="`cat $srcdir/inst-apps`"
-else
-  ac_topsubdirs="`cat $srcdir/subdirs`"
-fi
-
-for i in $ac_topsubdirs; do
-  AC_MSG_CHECKING([if $i should be compiled])
-  if test -d $srcdir/$i; then
-    install_it="yes"
-    for j in $DO_NOT_COMPILE; do
-      if test $i = $j; then
-        install_it="no"
-      fi
-    done
-  else
-    install_it="no"
-  fi
-  AC_MSG_RESULT($install_it)
-  vari=`echo $i | sed -e 's,[[-+.]],_,g'`
-  if test $install_it = "yes"; then
-    TOPSUBDIRS="$TOPSUBDIRS $i"
-    eval "$vari""_SUBDIR_included=yes"
-  else
-    eval "$vari""_SUBDIR_included=no"
-  fi
-done
-
-AC_SUBST(TOPSUBDIRS)
-])
-
-AC_DEFUN(KDE_CHECK_NAMESPACES,
-[
-AC_MSG_CHECKING(whether C++ compiler supports namespaces)
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-AC_TRY_COMPILE([
-],
-[
-namespace Foo {
-  extern int i;
-  namespace Bar {
-    extern int i;
-  }
-}
-
-int Foo::i = 0;
-int Foo::Bar::i = 1;
-],[
-  AC_MSG_RESULT(yes)
-  AC_DEFINE(HAVE_NAMESPACES)
-], [
-AC_MSG_RESULT(no)
-])
-AC_LANG_RESTORE
-])
-
-AC_DEFUN(KDE_CHECK_NEWLIBS,
-[
-
-])
-
-dnl ------------------------------------------------------------------------
-dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure at kde.org
-dnl ------------------------------------------------------------------------
-dnl
-AC_DEFUN(AC_CHECK_S_ISSOCK,
-[
-AC_MSG_CHECKING(for S_ISSOCK)
-AC_CACHE_VAL(ac_cv_have_s_issock,
-[
-AC_LANG_SAVE
-AC_LANG_C
-AC_TRY_LINK(
-[
-#include <sys/stat.h>
-],
-[
-struct stat buff;
-int b = S_ISSOCK( buff.st_mode );
-],
-ac_cv_have_s_issock=yes,
-ac_cv_have_s_issock=no)
-AC_LANG_RESTORE
-])
-AC_MSG_RESULT($ac_cv_have_s_issock)
-if test "$ac_cv_have_s_issock" = "yes"; then
-  AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.])
-fi
-
-AH_VERBATIM(_ISSOCK,
-[
-#ifndef HAVE_S_ISSOCK
-#define HAVE_S_ISSOCK
-#define S_ISSOCK(mode) (1==0)
-#endif
-])
-
-])
-
-dnl ------------------------------------------------------------------------
-dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure at kde.org
-dnl ------------------------------------------------------------------------
-dnl
-AC_DEFUN(AC_CHECK_KDEMAXPATHLEN,
-[
-AC_MSG_CHECKING(for MAXPATHLEN)
-AC_CACHE_VAL(ac_cv_maxpathlen,
-[
-AC_LANG_C
-cat > conftest.$ac_ext <<EOF
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-#endif
-#include <stdio.h>
-#include <sys/param.h>
-#ifndef MAXPATHLEN
-#define MAXPATHLEN 1024
-#endif
-
-KDE_HELLO MAXPATHLEN
-
-EOF
-
-ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out"
-
-if AC_TRY_EVAL(ac_try) && test -s conftest.out; then
-    ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out`
-else
-    ac_cv_maxpathlen=1024
-fi
-
-rm conftest.*
-
-])
-AC_MSG_RESULT($ac_cv_maxpathlen)
-AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] )
-])
-
-dnl -------------------------------------------------------------------------
-dnl See if the compiler supports a template repository         bero at redhat.de
-dnl -------------------------------------------------------------------------
-AC_DEFUN(KDE_COMPILER_REPO,
-[
-  REPO=""
-  NOREPO=""
-
-  KDE_CHECK_COMPILER_FLAG(frepo,
-   [
-     REPO="-frepo"
-     NOREPO="-fno-repo"
-   ])
-
-  if test -z "$REPO"; then
-  KDE_CHECK_COMPILER_FLAG(instances=explicit,
-  [
-     REPO="-instances=explicit"
-     NOREPO="-instances=extern"
-  ])
-  fi
-
-  if test -n "$REPO"; then
-     AC_DEFINE_UNQUOTED(HAVE_TEMPLATE_REPOSITORY, 1,
-		[C++ compiler supports template repository])
-     $1
-  fi
-
-  AC_SUBST(REPO)
-  AC_SUBST(NOREPO)
-])
-
-AC_DEFUN(KDE_CHECK_HEADER,
-[
-   AC_LANG_SAVE
-   kde_safe_cppflags=$CPPFLAGS
-   CPPFLAGS="$CPPFLAGS $all_includes"
-   AC_LANG_CPLUSPLUS
-   AC_CHECK_HEADER($1, $2, $3, $4)
-   CPPFLAGS=$kde_safe_cppflags
-   AC_LANG_RESTORE
-])
-
-AC_DEFUN(KDE_CHECK_HEADERS,
-[
-   AH_CHECK_HEADERS([$1])
-   AC_LANG_SAVE
-   kde_safe_cppflags=$CPPFLAGS
-   CPPFLAGS="$CPPFLAGS $all_includes"
-   AC_LANG_CPLUSPLUS
-   AC_CHECK_HEADERS([$1], [$2], [$3], [$4])
-   CPPFLAGS=$kde_safe_cppflags
-   AC_LANG_RESTORE
-])
-
-AC_DEFUN(KDE_FAST_CONFIGURE,
-[
-  dnl makes configure fast (needs perl)
-  AC_ARG_ENABLE(fast-perl, [  --disable-fast-perl     disable fast Makefile generation (needs perl)],
-      with_fast_perl=$enableval, with_fast_perl=yes)
-])
-
-AC_DEFUN(KDE_CONF_FILES,
-[
-  val=
-  if test -f $srcdir/configure.files ; then
-    val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files`
-  fi
-  CONF_FILES=
-  if test -n "$val" ; then
-    for i in $val ; do
-      CONF_FILES="$CONF_FILES $i"
-    done
-  fi
-  AC_SUBST(CONF_FILES)
-])dnl
-
-AC_DEFUN(KDE_SET_PREFIX,
-[
-  unset CDPATH
-  dnl make $KDEDIR the default for the installation
-  AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
-
-  if test "x$prefix" = "xNONE"; then
-    prefix=$ac_default_prefix
-    ac_configure_args="$ac_configure_args --prefix=$prefix"
-  fi
-  # And delete superflous '/' to make compares easier
-  prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
-  exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
-  KDE_FAST_CONFIGURE
-  KDE_CONF_FILES
-])
-
-pushdef([AC_PROG_INSTALL],
-[
-  dnl our own version, testing for a -p flag
-  popdef([AC_PROG_INSTALL])
-  dnl as AC_PROG_INSTALL works as it works we first have
-  dnl to save if the user didn't specify INSTALL, as the
-  dnl autoconf one overwrites INSTALL and we have no chance to find
-  dnl out afterwards
-  test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
-  test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
-  test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
-  AC_PROG_INSTALL
-
-  if test -z "$kde_save_INSTALL_given" ; then
-    # OK, user hasn't given any INSTALL, autoconf found one for us
-    # now we test, if it supports the -p flag
-    AC_MSG_CHECKING(for -p flag to install)
-    rm -f confinst.$$.* > /dev/null 2>&1
-    echo "Testtest" > confinst.$$.orig
-    ac_res=no
-    if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
-      if test -f confinst.$$.new ; then
-        # OK, -p seems to do no harm to install
-	INSTALL="${INSTALL} -p"
-	ac_res=yes
-      fi
-    fi
-    rm -f confinst.$$.*
-    AC_MSG_RESULT($ac_res)
-  fi
-  dnl the following tries to resolve some signs and wonders coming up
-  dnl with different autoconf/automake versions
-  dnl e.g.:
-  dnl  *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s
-  dnl   and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS)
-  dnl   it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s
-  dnl  *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has
-  dnl   INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the
-  dnl   install- at DIR@PROGRAMS targets to explicitly use that flag
-  dnl  *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as
-  dnl   INSTALL_SCRIPT, which breaks with automake <= 1.4
-  dnl  *autoconf >2.13 (since 10.Apr 1999) has not that failure
-  dnl  *sometimes KDE does not use the install- at DIR@PROGRAM targets from
-  dnl   automake (due to broken Makefile.am or whatever) to install programs,
-  dnl   and so does not see the -s flag in automake > 1.4
-  dnl to clean up that mess we:
-  dnl  +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG
-  dnl   which cleans KDE's program with automake > 1.4;
-  dnl  +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems
-  dnl   with automake<=1.4
-  dnl  note that dues to this sometimes two '-s' flags are used (if KDE
-  dnl   properly uses install- at DIR@PROGRAMS, but I don't care
-  dnl
-  dnl And to all this comes, that I even can't write in comments variable
-  dnl  names used by automake, because it is so stupid to think I wanted to
-  dnl  _use_ them, therefor I have written A_M_... instead of AM_
-  dnl hmm, I wanted to say something ... ahh yes: Arghhh.
-
-  if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
-    INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
-  fi
-  if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
-    INSTALL_SCRIPT='${INSTALL}'
-  fi
-])dnl
-
-AC_DEFUN(KDE_LANG_CPLUSPLUS,
-[AC_LANG_CPLUSPLUS
-ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
-pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS])
-])
-
-pushdef([AC_LANG_CPLUSPLUS],
-[popdef([AC_LANG_CPLUSPLUS])
-KDE_LANG_CPLUSPLUS
-])
-
-AC_DEFUN(KDE_CHECK_LONG_LONG,
-[
-AC_MSG_CHECKING(for long long)
-AC_CACHE_VAL(kde_cv_c_long_long,
-[
-  AC_LANG_SAVE
-  AC_LANG_CPLUSPLUS
-  AC_TRY_LINK([], [
-  long long foo = 0;
-  foo = foo+1;
-  ],
-  kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
-  AC_LANG_RESTORE
-])
-AC_MSG_RESULT($kde_cv_c_long_long)
-if test "$kde_cv_c_long_long" = yes; then
-   AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype])
-fi
-])
-
-AC_DEFUN(KDE_CHECK_LIB,
-[
-     kde_save_LDFLAGS="$LDFLAGS"
-     dnl AC_CHECK_LIB modifies LIBS, so save it here
-     kde_save_LIBS="$LIBS"
-     LDFLAGS="$LDFLAGS $all_libraries"
-     case $host_os in
-      aix*) LDFLAGS="-brtl $LDFLAGS"
-	test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS"
-	;;
-     esac
-     AC_CHECK_LIB($1, $2, $3, $4, $5)
-     LDFLAGS="$kde_save_LDFLAGS"
-     LIBS="$kde_save_LIBS"
-])
-
-AC_DEFUN(KDE_JAVA_PREFIX,
-[
-	dir=`dirname "$1"`
-	base=`basename "$1"`
-	list=`ls -1 $dir 2> /dev/null`
-	for entry in $list; do 
-		if test -d $dir/$entry/bin; then
-			case $entry in
-			   $base)
-				javadirs="$javadirs $dir/$entry/bin"
-				;;
-			esac
-		elif test -d $dir/$entry/jre/bin; then
-			case $entry in
-			   $base)
-				javadirs="$javadirs $dir/$entry/jre/bin"
-				;;
-			esac
-		fi
-	done
-])
-
-dnl KDE_CHEC_JAVA_DIR(onlyjre)
-AC_DEFUN(KDE_CHECK_JAVA_DIR,
-[
-
-AC_ARG_WITH(java,
-[  --with-java=javadir     use java installed in javadir, --without-java disables ],
-[  ac_java_dir=$withval
-], ac_java_dir=""
-)
-
-AC_MSG_CHECKING([for Java])
-
-dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
-if test "x$ac_java_dir" = "xno"; then
-   kde_java_bindir=no
-   kde_java_includedir=no
-   kde_java_libjvmdir=no
-   kde_java_libhpidir=no
-else
-  if test "x$ac_java_dir" = "x"; then
-     
-     
-      dnl No option set -> look in $PATH
-      KDE_JAVA_PREFIX(/usr/j2se)
-      KDE_JAVA_PREFIX(/usr/j*dk*)
-      KDE_JAVA_PREFIX(/usr/lib/j*dk*)
-      KDE_JAVA_PREFIX(/opt/j*sdk*)
-      KDE_JAVA_PREFIX(/usr/lib/java*)
-      KDE_JAVA_PREFIX(/usr/java*)
-      KDE_JAVA_PREFIX(/usr/java/j*dk*)
-      KDE_JAVA_PREFIX(/usr/java/j*re*)
-      KDE_JAVA_PREFIX(/usr/lib/SunJava2*)
-      KDE_JAVA_PREFIX(/usr/lib/SunJava*)
-      KDE_JAVA_PREFIX(/usr/lib/IBMJava2*)
-      KDE_JAVA_PREFIX(/usr/lib/IBMJava*)
-      KDE_JAVA_PREFIX(/opt/java*)
-    
-      kde_cv_path="NONE"
-      kde_save_IFS=$IFS
-      IFS=':'
-      for dir in $PATH; do
-	  javadirs="$javadirs $dir"
-      done
-      IFS=$kde_save_IFS
-      jredirs=
-
-      for dir in $javadirs; do
-	  if test ! -d $dir; then break; fi
-          if test -x "$dir/java"; then
-                libjvmdir=`find $dir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
-		if test ! -f $libjvmdir/libjvm.so; then continue; fi
-		jredirs="$jredirs $dir"
-	  fi
-      done
-
-      JAVAC=
-      JAVA=
-      kde_java_bindir=no
-      for dir in $jredirs; do
-	  JAVA="$dir/java"
-	  kde_java_bindir=$dir
-	  if test -x "$dir/javac"; then
-		JAVAC="$dir/javac"
-                break
-	  fi
-      done
-
-      if test -n "$JAVAC"; then
-          dnl this substitution might not work - well, we test for jni.h below
-          kde_java_includedir=`echo $JAVAC | sed -e 's,bin/javac$,include/,'`
-      else
-          kde_java_includedir=no
-      fi
-  else
-    dnl config option set
-    kde_java_bindir=$ac_java_dir/bin
-    if test -x $ac_java_dir/bin/java && test ! -x $ac_java_dir/bin/javac; then
-	kde_java_includedir=no
-    else
-        kde_java_includedir=$ac_java_dir/include
-    fi
-  fi
-fi
-
-dnl At this point kde_java_bindir and kde_java_includedir are either set or "no"
-if test "x$kde_java_bindir" != "xno"; then
-
-  dnl Look for libjvm.so
-  kde_java_libjvmdir=`find $kde_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
-  dnl Look for libhpi.so and avoid green threads
-  kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,' | head -n 1`
-
-  dnl Now check everything's fine under there
-  dnl the include dir is our flag for having the JDK
-  if test -d "$kde_java_includedir"; then
-    if test ! -x "$kde_java_bindir/javac"; then
-      AC_MSG_ERROR([javac not found under $kde_java_bindir - it seems you passed a wrong --with-java.])
-    fi
-    if test ! -x "$kde_java_bindir/javah"; then
-      AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
-    fi
-    if test ! -x "$kde_java_bindir/jar"; then
-      AC_MSG_ERROR([jar not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
-    fi
-    if test ! -r "$kde_java_includedir/jni.h"; then
-      AC_MSG_ERROR([jni.h not found under $kde_java_includedir. Use --with-java or --without-java.])
-    fi
-
-    jni_includes="-I$kde_java_includedir"
-    dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
-    dnl and under linux here..
-    test -d "$kde_java_includedir/linux" && jni_includes="$jni_includes -I$kde_java_includedir/linux"
-    test -d "$kde_java_includedir/solaris" && jni_includes="$jni_includes -I$kde_java_includedir/solaris"
-    test -d "$kde_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_java_includedir/genunix"
-
-  else
-    JAVAC=
-    jni_includes=
-  fi
-
-  if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
-     AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
-  fi 
-
-  if test ! -x "$kde_java_bindir/java"; then
-      AC_MSG_ERROR([java not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
-  fi
-
-  if test ! -r "$kde_java_libhpidir/libhpi.so"; then
-    AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
-  fi
-
-  if test -n "$jni_includes"; then
-    dnl Check for JNI version
-    AC_LANG_SAVE
-    AC_LANG_CPLUSPLUS
-    ac_cxxflags_safe="$CXXFLAGS"
-    CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
-
-    AC_TRY_COMPILE([
-  #include <jni.h>
-	      ],
-	      [
-  #ifndef JNI_VERSION_1_2
-  Syntax Error
-  #endif
-	      ],[ kde_jni_works=yes ],
-	      [ kde_jni_works=no ])
-
-    if test $kde_jni_works = no; then
-      AC_MSG_ERROR([Incorrect version of $kde_java_includedir/jni.h.
-		    You need to have Java Development Kit (JDK) version 1.2. 
-
-		    Use --with-java to specify another location.
-		    Use --without-java to configure without java support.
-		    Or download a newer JDK and try again. 
-		    See e.g. http://java.sun.com/products/jdk/1.2 ])
-    fi
-
-    CXXFLAGS="$ac_cxxflags_safe"    
-    AC_LANG_RESTORE
-
-    dnl All tests ok, inform and subst the variables
-
-    JAVAC=$kde_java_bindir/javac
-    JAVAH=$kde_java_bindir/javah
-    JAR=$kde_java_bindir/jar
-    AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
-    JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
-    AC_MSG_RESULT([java JDK in $kde_java_bindir])
-
-  else
-      AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
-      AC_MSG_RESULT([java JRE in $kde_java_bindir])
-  fi
-else # no
-  AC_MSG_RESULT([none found])
-fi
-
-AC_SUBST(JAVAC)
-AC_SUBST(JAVAH)
-AC_SUBST(JAR)
-AC_SUBST(JVMLIBS)
-AC_SUBST(jni_includes)
-
-# for backward compat
-kde_cv_java_includedir=$kde_java_includedir
-kde_cv_java_bindir=$kde_java_bindir
-])
-
-dnl this is a redefinition of autoconf 2.5x's AC_FOREACH.
-dnl When the argument list becomes big, as in KDE for AC_OUTPUT in
-dnl big packages, m4_foreach is dog-slow.  So use our own version of
-dnl it.  (matz at kde.org)
-m4_define([mm_foreach],
-[m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])])
-m4_define([mm_car], [[$1]])
-m4_define([mm_car2], [[$@]])
-m4_define([_mm_foreach],
-[m4_if(m4_quote($2), [], [],
-       [m4_define([$1], [mm_car($2)])$3[]_mm_foreach([$1],
-                                                     mm_car2(m4_shift($2)),
-                                                     [$3])])])
-m4_define([AC_FOREACH],
-[mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
-
-AC_DEFUN(KDE_NEED_FLEX,
-[
-kde_libs_safe=$LIBS
-LIBS="$LIBS $USER_LDFLAGS"
-AM_PROG_LEX
-LIBS=$kde_libs_safe
-if test -z "$LEXLIB"; then
-    AC_MSG_ERROR([You need to have flex installed.])
-fi
-AC_SUBST(LEXLIB)
-])
-
-AC_DEFUN(AC_PATH_QTOPIA,
-[
-  dnl TODO: use AC_CACHE_VAL
-
-  if test -z "$1"; then
-    qtopia_minver_maj=1
-    qtopia_minver_min=5
-    qtopia_minver_pat=0
-  else
-    qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
-    qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
-    qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
-  fi
-
-  qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
-  qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
-
-  AC_REQUIRE([AC_PATH_QT])
-
-  AC_MSG_CHECKING([for Qtopia])
-
-  LIB_QTOPIA="-lqpe"
-  AC_SUBST(LIB_QTOPIA)
-
-  kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
-
-  ac_qtopia_incdir=NO
-
-  AC_ARG_WITH(qtopia-dir,
-              [  --with-qtopia-dir=DIR   where the root of Qtopia is installed ],
-              [  ac_qtopia_incdir="$withval"/include] ) 
-  
-  qtopia_incdirs=""
-  for dir in $kde_qtopia_dirs; do
-    qtopia_incdirs="$qtopia_incdirs $dir/include"
-  done
-
-  if test ! "$ac_qtopia_incdir" = "NO"; then
-    qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
-  fi
-
-  qtopia_incdir=""
-  AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
-  ac_qtopia_incdir="$qtopia_incdir"
-
-  if test -z "$qtopia_incdir"; then
-    AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
-  fi
-
-  qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
-  qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
-  qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
-
-  qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
-  qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
-  if test "$qtopia_ver" -lt "$qtopia_minver"; then
-    AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
-is required.])
-  fi
-
-  AC_LANG_SAVE
-  AC_LANG_CPLUSPLUS
-
-  ac_cxxflags_safe="$CXXFLAGS"
-  ac_ldflags_safe="$LDFLAGS"
-  ac_libs_safe="$LIBS"
-
-  CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
-  LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
-  LIBS="$LIBS $LIB_QTOPIA $LIBQT"
-
-  cat > conftest.$ac_ext <<EOF
-#include "confdefs.h"
-#include <qpe/qpeapplication.h>
-#include <qpe/version.h>
-
-int main( int argc, char **argv )
-{
-    QPEApplication app( argc, argv );
-    return 0;
-}
-EOF
-
-  if AC_TRY_EVAL(ac_link) && test -s conftest; then
-    rm -f conftest*
-  else
-    rm -f conftest*
-    AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
-the end of config.log])
-  fi
-
-  CXXFLAGS="$ac_cxxflags_safe"
-  LDFLAGS="$ac_ldflags_safe"
-  LIBS="$ac_libs_safe"
-
-  AC_LANG_RESTORE
-
-  QTOPIA_INCLUDES="-I$qtopia_incdir"
-  AC_SUBST(QTOPIA_INCLUDES)
-
-  AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
-])
-
-
-AC_DEFUN(KDE_INIT_DOXYGEN,
-[
-AC_MSG_CHECKING([for Qt docs])
-kde_qtdir=
-if test "${with_qt_dir+set}" = set; then
-  kde_qtdir="$with_qt_dir"
-fi
-
-AC_FIND_FILE(qsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html ], QTDOCDIR)
-AC_MSG_RESULT($QTDOCDIR)
-
-AC_SUBST(QTDOCDIR)
-
-KDE_FIND_PATH(dot, DOT, [], [])
-if test -n "$DOT"; then
-  KDE_HAVE_DOT="YES"
-else
-  KDE_HAVE_DOT="NO"
-fi
-AC_SUBST(KDE_HAVE_DOT)
-KDE_FIND_PATH(doxygen, DOXYGEN, [], [])
-AC_SUBST(DOXYGEN)
-
-DOXYGEN_PROJECT_NAME="$1"
-DOXYGEN_PROJECT_NUMBER="$2"
-AC_SUBST(DOXYGEN_PROJECT_NAME)
-AC_SUBST(DOXYGEN_PROJECT_NUMBER)
-
-KDE_HAS_DOXYGEN=no
-if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
-  KDE_HAS_DOXYGEN=yes
-fi
-AC_SUBST(KDE_HAS_DOXYGEN)
-
-])
-
-
-AC_DEFUN(AC_FIND_BZIP2,
-[
-AC_MSG_CHECKING([for bzDecompress in libbz2])
-AC_CACHE_VAL(ac_cv_lib_bzip2,
-[
-AC_LANG_C
-kde_save_LIBS="$LIBS"
-LIBS="$all_libraries $USER_LDFLAGS -lbz2 $LIBSOCKET"
-kde_save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
-AC_TRY_LINK(dnl
-[
-#define BZ_NO_STDIO
-#include<bzlib.h>
-],
-            [ bz_stream s; (void) bzDecompress(&s); ],
-            eval "ac_cv_lib_bzip2='-lbz2'",
-            eval "ac_cv_lib_bzip2=no")
-LIBS="$kde_save_LIBS"
-CFLAGS="$kde_save_CFLAGS"
-])dnl
-AC_MSG_RESULT($ac_cv_lib_bzip2)
-
-if test ! "$ac_cv_lib_bzip2" = no; then
-  BZIP2DIR=bzip2
-
-  LIBBZ2="$ac_cv_lib_bzip2"
-  AC_SUBST(LIBBZ2)
-
-else
-
-   cxx_shared_flag=
-   ld_shared_flag=
-   KDE_CHECK_COMPILER_FLAG(shared, [
-	ld_shared_flag="-shared"
-   ])
-   KDE_CHECK_COMPILER_FLAG(fPIC, [
-        cxx_shared_flag="-fPIC"
-   ])
-
-   AC_MSG_CHECKING([for BZ2_bzDecompress in (shared) libbz2])
-   AC_CACHE_VAL(ac_cv_lib_bzip2_prefix,
-   [
-   AC_LANG_CPLUSPLUS
-   kde_save_LIBS="$LIBS"
-   LIBS="$all_libraries $USER_LDFLAGS $ld_shared_flag -lbz2 $LIBSOCKET"
-   kde_save_CXXFLAGS="$CXXFLAGS"
-   CXXFLAGS="$CFLAGS $cxx_shared_flag $all_includes $USER_INCLUDES"
-
-   AC_TRY_LINK(dnl
-   [
-   #define BZ_NO_STDIO
-   #include<bzlib.h>
-   ],
-               [ bz_stream s; (void) BZ2_bzDecompress(&s); ],
-               eval "ac_cv_lib_bzip2_prefix='-lbz2'",
-               eval "ac_cv_lib_bzip2_prefix=no")
-   LIBS="$kde_save_LIBS"
-   CXXFLAGS="$kde_save_CXXFLAGS"
-   ])dnl
-
-   AC_MSG_RESULT($ac_cv_lib_bzip2_prefix)
-   
-
-
-   if test ! "$ac_cv_lib_bzip2_prefix" = no; then
-     BZIP2DIR=bzip2
-    
-     LIBBZ2="$ac_cv_lib_bzip2_prefix"
-     AC_SUBST(LIBBZ2)
-
-     AC_DEFINE(NEED_BZ2_PREFIX, 1, [Define if the libbz2 functions need the BZ2_ prefix])
-   dnl else, we just ignore this
-   fi
-
-fi
-AM_CONDITIONAL(include_BZIP2, test -n "$BZIP2DIR")
-])
-
-dnl ------------------------------------------------------------------------
-dnl Try to find the SSL headers and libraries.
-dnl $(SSL_LDFLAGS) will be -Lsslliblocation (if needed)
-dnl and $(SSL_INCLUDES) will be -Isslhdrlocation (if needed)
-dnl ------------------------------------------------------------------------
-dnl
-AC_DEFUN(KDE_CHECK_SSL,
-[
-LIBSSL="-lssl -lcrypto"
-AC_REQUIRE([KDE_CHECK_LIB64])
-
-ac_ssl_includes=NO ac_ssl_libraries=NO
-ssl_libraries=""
-ssl_includes=""
-AC_ARG_WITH(ssl-dir,
-    [  --with-ssl-dir=DIR      where the root of OpenSSL is installed],
-    [  ac_ssl_includes="$withval"/include
-       ac_ssl_libraries="$withval"/lib$kdelibsuff
-    ])
-
-want_ssl=yes
-AC_ARG_WITH(ssl,
-    [  --without-ssl           disable SSL checks],
-    [want_ssl=$withval])
-
-if test $want_ssl = yes; then
-
-AC_MSG_CHECKING(for OpenSSL)
-
-AC_CACHE_VAL(ac_cv_have_ssl,
-[#try to guess OpenSSL locations
-  
-  ssl_incdirs="/usr/include /usr/local/include /usr/ssl/include /usr/local/ssl/include $prefix/include $kde_extra_includes"
-  ssl_incdirs="$ac_ssl_includes $ssl_incdirs"
-  AC_FIND_FILE(openssl/ssl.h, $ssl_incdirs, ssl_incdir)
-  ac_ssl_includes="$ssl_incdir"
-
-  ssl_libdirs="/usr/lib$kdelibsuff /usr/local/lib$kdelibsuff /usr/ssl/lib$kdelibsuff /usr/local/ssl/lib$kdelibsuff $libdir $prefix/lib$kdelibsuff $exec_prefix/lib$kdelibsuff $kde_extra_libs"
-  if test ! "$ac_ssl_libraries" = "NO"; then
-    ssl_libdirs="$ac_ssl_libraries $ssl_libdirs"
-  fi
-
-  test=NONE
-  ssl_libdir=NONE
-  for dir in $ssl_libdirs; do
-    try="ls -1 $dir/libssl*"
-    if test=`eval $try 2> /dev/null`; then ssl_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
-  done
-
-  ac_ssl_libraries="$ssl_libdir"
-
-  AC_LANG_SAVE
-  AC_LANG_C
-
-  ac_cflags_safe="$CFLAGS"
-  ac_ldflags_safe="$LDFLAGS"
-  ac_libs_safe="$LIBS"
-
-  CFLAGS="$CFLAGS -I$ssl_incdir $all_includes"
-  LDFLAGS="$LDFLAGS -L$ssl_libdir $all_libraries"
-  LIBS="$LIBS $LIBSSL -lRSAglue -lrsaref"
-
-  AC_TRY_LINK(,void RSAPrivateEncrypt(void);RSAPrivateEncrypt();,
-  ac_ssl_rsaref="yes"
-  ,
-  ac_ssl_rsaref="no"
-  )
-
-  CFLAGS="$ac_cflags_safe"
-  LDFLAGS="$ac_ldflags_safe"
-  LIBS="$ac_libs_safe"
-
-  AC_LANG_RESTORE
-
-  if test "$ac_ssl_includes" = NO || test "$ac_ssl_libraries" = NO; then
-    have_ssl=no
-  else
-    have_ssl=yes;
-  fi
-
-  ])
-
-  eval "$ac_cv_have_ssl"
-
-  AC_MSG_RESULT([libraries $ac_ssl_libraries, headers $ac_ssl_includes])
-
-  AC_MSG_CHECKING([whether OpenSSL uses rsaref])
-  AC_MSG_RESULT($ac_ssl_rsaref)
-
-  AC_MSG_CHECKING([for easter eggs])
-  AC_MSG_RESULT([none found])
-
-else
-  have_ssl=no
-fi
-
-if test "$have_ssl" = yes; then
-  AC_MSG_CHECKING(for OpenSSL version)
-  dnl Check for SSL version
-  AC_CACHE_VAL(ac_cv_ssl_version,
-  [
-    AC_LANG_SAVE
-    AC_LANG_C 
-
-    cat >conftest.$ac_ext <<EOF
-#include <openssl/opensslv.h>
-#include <stdio.h>
-    int main() {
- 
-#ifndef OPENSSL_VERSION_NUMBER
-      printf("ssl_version=\\"error\\"\n");
-#else
-      if (OPENSSL_VERSION_NUMBER < 0x00906000)
-        printf("ssl_version=\\"old\\"\n");
-      else
-        printf("ssl_version=\\"ok\\"\n");
-#endif
-     return (0);
-    }
-EOF
-
-    ac_compile='${CC-gcc} $CFLAGS -I$ac_ssl_includes conftest.$ac_ext -o conftest'
-    if AC_TRY_EVAL(ac_compile); then 
-
-      if eval `./conftest 2>&5`; then
-        if test $ssl_version = error; then
-          AC_MSG_ERROR([$ssl_incdir/openssl/opensslv.h doesn't define OPENSSL_VERSION_NUMBER !])
-        else
-          if test $ssl_version = old; then
-            AC_MSG_WARN([OpenSSL version too old. Upgrade to 0.9.6 at least, see http://www.openssl.org. SSL support disabled.])
-            have_ssl=no
-          fi
-        fi
-        ac_cv_ssl_version="ssl_version=$ssl_version"
-      else
-        AC_MSG_ERROR([Your system couldn't run a small SSL test program.
-        Check config.log, and if you can't figure it out, send a mail to 
-        David Faure <faure at kde.org>, attaching your config.log])
-      fi
-
-    else
-      AC_MSG_ERROR([Your system couldn't link a small SSL test program.
-      Check config.log, and if you can't figure it out, send a mail to 
-      David Faure <faure at kde.org>, attaching your config.log])
-    fi 
-
-    AC_LANG_RESTORE
-
-  ])
-
-  eval "$ac_cv_ssl_version"
-  AC_MSG_RESULT($ssl_version)
-fi
-
-if test "$have_ssl" != yes; then
-  LIBSSL="";
-else
-  AC_DEFINE(HAVE_SSL, 1, [If we are going to use OpenSSL])
-  ac_cv_have_ssl="have_ssl=yes \
-    ac_ssl_includes=$ac_ssl_includes ac_ssl_libraries=$ac_ssl_libraries ac_ssl_rsaref=$ac_ssl_rsaref"
-  
-  
-  ssl_libraries="$ac_ssl_libraries"
-  ssl_includes="$ac_ssl_includes"
-
-  if test "$ac_ssl_rsaref" = yes; then
-    LIBSSL="-lssl -lcrypto -lRSAglue -lrsaref" 
-  fi
-
-  if test $ssl_version = "old"; then
-    AC_DEFINE(HAVE_OLD_SSL_API, 1, [Define if you have OpenSSL < 0.9.6])
-  fi
-fi
-
-if test "$ssl_includes" = "/usr/include" || test  "$ssl_includes" = "/usr/local/include" || test -z "$ssl_includes"; then
- SSL_INCLUDES="";
-else
- SSL_INCLUDES="-I$ssl_includes"
-fi
-
-if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries"; then
- SSL_LDFLAGS=""
-else
- SSL_LDFLAGS="-L$ssl_libraries -R$ssl_libraries"
-fi
-
-AC_SUBST(SSL_INCLUDES)
-AC_SUBST(SSL_LDFLAGS)
-AC_SUBST(LIBSSL)
-])
-
-AC_DEFUN(KDE_CHECK_STRLCPY,
-[
-  AC_CHECK_STRLCPY
-  AC_CHECK_STRLCAT
-  AC_CHECK_SIZEOF(size_t)
-  AC_CHECK_SIZEOF(unsigned long)
-
-  AC_MSG_CHECKING([sizeof(size_t) == sizeof(unsigned long)])
-  AC_TRY_COMPILE(,[
-    #if SIZEOF_SIZE_T != SIZEOF_UNSIGNED_LONG
-       choke me
-    #endif
-    ],[AC_MSG_RESULT([yes])],[
-      AC_MSG_RESULT([no])
-      AC_MSG_ERROR([
-       Apparently on your system our assumption sizeof(size_t) == sizeof(unsigned long)
-       does not apply. Please mail kde-devel at kde.org with a description of your system!
-      ])
-  ])
-])
-
diff --git a/admin/am_edit b/admin/am_edit
deleted file mode 100644
index de83a2a..0000000
--- a/admin/am_edit
+++ /dev/null
@@ -1,2028 +0,0 @@
-#!/usr/bin/perl -w
-
-# Expands the specialised KDE tags in Makefile.in to (hopefully) valid
-# make syntax.
-# When called without file parameters, we work recursively on all Makefile.in
-# in and below the current subdirectory. When called with file parameters,
-# only those Makefile.in are changed.
-# The currently supported tags are
-#
-# {program}_METASOURCES
-# where you have a choice of two styles
-#   {program}_METASOURCES = name1.moc name2.moc ... [\]
-#   {program}_METASOURCES = AUTO
-#       The second style requires other tags as well.
-#
-# To install icons :
-#    KDE_ICON = iconname iconname2 ...
-#    KDE_ICON = AUTO
-#
-# For documentation :
-#    http://developer.kde.org/documentation/other/developer-faq.html
-#
-# and more new tags TBD!
-#
-# The concept (and base code) for this program came from automoc,
-# supplied by the following
-#
-# Matthias Ettrich <ettrich at kde.org>      (The originator)
-# Kalle Dalheimer <kalle at kde.org>      (The original implementator)
-# Harri Porten  <porten at tu-harburg.de>
-# Alex Zepeda  <jazepeda at pacbell.net>
-# David Faure <faure at kde.org>
-# Stephan Kulow <coolo at kde.org>
-
-use Cwd;
-use File::Find;
-use File::Basename;
-
-# Prototype the functions
-sub initialise ();
-sub processMakefile ($);
-sub updateMakefile ();
-sub restoreMakefile ();
-
-sub removeLine ($$);
-sub appendLines ($);
-sub substituteLine ($$);
-
-sub findMocCandidates ();
-sub pruneMocCandidates ($);
-sub checkMocCandidates ();
-sub addMocRules ();
-
-sub tag_AUTOMAKE ();
-sub tag_META_INCLUDES ();
-sub tag_METASOURCES ();
-sub tag_POFILES ();
-sub tag_DOCFILES ();
-sub tag_LOCALINSTALL();
-sub tag_IDLFILES();
-sub tag_UIFILES();
-sub tag_SUBDIRS();
-sub tag_ICON();
-sub tag_CLOSURE();
-sub tag_DIST();
-
-# Some global globals...
-$verbose    = 0;        # a debug flag
-$thisProg   = "$0";     # This programs name
-$topdir     = cwd();    # The current directory
- at makefiles  = ();       # Contains all the files we'll process
- at foreignfiles = ();
-$start      = (times)[0]; # some stats for testing - comment out for release
-$version    = "v0.2";
-$errorflag  = 0;
-$cppExt     = "(cpp|cc|cxx|C|c\\+\\+)";
-$hExt       = "(h|H|hh|hxx|hpp|h\\+\\+)";
-$progId     = "KDE tags expanded automatically by " . basename($thisProg);
-$automkCall = "\n";
-$printname  = "";  # used to display the directory the Makefile is in
-$use_final  = 1;        # create code for --enable-final
-$cleantarget = "clean";
-$dryrun     = 0;
-$pathoption = 0;
-$foreign_libtool = 0;
-
-while (defined ($ARGV[0]))
-{
-    $_ = shift;
-    if (/^--version$/)
-    {
-        print STDOUT "\n";
-        print STDOUT basename($thisProg), " $version\n",
-                "This is really free software, unencumbered by the GPL.\n",
-                "You can do anything you like with it except sueing me.\n",
-                "Copyright 1998 Kalle Dalheimer <kalle\@kde.org>\n",
-                "Concept, design and unnecessary questions about perl\n",
-                "       by Matthias Ettrich <ettrich\@kde.org>\n\n",
-                "Making it useful by Stephan Kulow <coolo\@kde.org> and\n",
-                "Harri Porten <porten\@kde.org>\n",
-                "Updated (Feb-1999), John Birch <jb.nz\@writeme.com>\n",
-	        "Current Maintainer Stephan Kulow\n\n";
-        exit 0;
-    }
-    elsif (/^--verbose$|^-v$/)
-    {
-        $verbose = 1;       # Oh is there a problem...?
-    }
-    elsif (/^-p(.+)$|^--path=(.+)$/)
-    {
-        $thisProg = "$1/".basename($thisProg) if($1);
-        $thisProg = "$2/".basename($thisProg) if($2);
-        warn ("$thisProg doesn't exist\n")      if (!(-f $thisProg));
-        $pathoption=1;
-    }
-    elsif (/^--help$|^-h$/)
-    {
-        print STDOUT "Usage $thisProg [OPTION] ... [dir/Makefile.in]...\n",
-                "\n",
-                "Patches dir/Makefile.in generated by automake\n",
-                "(where dir can be an absolute or relative directory name)\n",
-                "\n",
-                "  -v, --verbose      verbosely list files processed\n",
-                "  -h, --help         print this help, then exit\n",
-                "  --version          print version number, then exit\n",
-                "  -p, --path=        use the path to am_edit if the path\n",
-                "                     called from is not the one to be used\n",
-	        "  --no-final         don't patch for --enable-final\n";
-	
-        exit 0;
-    }
-    elsif (/^--no-final$/)
-    {
-	$use_final = 0;
-        $thisProg .= " --no-final";
-    }
-    elsif (/^--foreign-libtool$/)
-    {
-        $foreign_libtool = 1;
-        $thisProg .= " --foreign-libtool";
-    }
-    elsif (/^-n$/)
-    {
-    	$dryrun = 1;
-    }
-    else
-    {
-        # user selects what input files to check
-        # add full path if relative path is given
-        $_ = cwd()."/".$_   if (! /^\//);
-        print "User wants $_\n" if ($verbose);
-        push (@makefiles, $_);
-    }
-}
-
-if ($thisProg =~ /^\// && !$pathoption )
-{
-  print STDERR "Illegal full pathname call performed...\n",
-      "The call to \"$thisProg\"\nwould be inserted in some Makefile.in.\n",
-      "Please use option --path.\n";
-  exit 1;
-}
-
-# Only scan for files when the user hasn't entered data
-if (!@makefiles)
-{
-    print STDOUT "Scanning for Makefile.in\n"       if ($verbose);
-    find (\&add_makefile, cwd());
-    #chdir('$topdir');
-} else {
-    print STDOUT "Using input files specified by user\n"   if ($verbose);
-}
-
-foreach $makefile (sort(@makefiles))
-{
-    processMakefile ($makefile);
-    last            if ($errorflag);
-}
-
-# Just some debug statistics - comment out for release as it uses printf.
-printf STDOUT "Time %.2f CPU sec\n", (times)[0] - $start     if ($verbose);
-
-exit $errorflag;        # causes make to fail if erroflag is set
-
-#-----------------------------------------------------------------------------
-
-# In conjunction with the "find" call, this builds the list of input files
-sub add_makefile ()
-{
-  push (@makefiles, $File::Find::name) if (/Makefile.in$/);
-}
-
-#-----------------------------------------------------------------------------
-
-# Processes a single make file
-# The parameter contains the full path name of the Makefile.in to use
-sub processMakefile ($)
-{
-    # some useful globals for the subroutines called here
-    local ($makefile)       = @_;
-    local @headerdirs       = ('.');
-    local $haveAutomocTag   = 0;
-    local $MakefileData     = "";
-
-    local $cxxsuffix  = "KKK";
-
-    local @programs = ();  # lists the names of programs and libraries
-    local $program = "";
-
-    local %realObjs = ();  # lists the objects compiled into $program
-    local %sources = ();   # lists the sources used for $program
-    local %finalObjs = (); # lists the objects compiled when final
-    local %realname = ();  # the binary name of program variable
-    local %idlfiles = ();  # lists the idl files used for $program
-    local %globalmocs = ();# list of all mocfiles (in %mocFiles format)
-    local %important = (); # list of files to be generated asap
-    local %uiFiles = ();
-
-    local $allidls = "";
-    local $idl_output = "";# lists all idl generated files for cleantarget
-    local $ui_output = "";# lists all uic generated files for cleantarget
-
-    local %depedmocs = ();
-    
-    local $metasourceTags = 0;
-    local $dep_files      = "";
-    local $dep_finals     = "";
-    local %target_adds    = (); # the targets to add
-    local $kdelang        = "";
-    local @cleanfiles     = ();
-    local $cleanMoc       = "";
-    local $closure_output = "";
-
-    local %varcontent     = ();
-
-    $makefileDir = dirname($makefile);
-    chdir ($makefileDir);
-    $printname = $makefile;
-    $printname =~ s/^\Q$topdir\E\///;
-    $makefile = basename($makefile);
-
-    print STDOUT "Processing makefile $printname\n"   if ($verbose);
-    
-    # Setup and see if we need to do this.
-    return      if (!initialise());
-    
-    tag_AUTOMAKE ();            # Allows a "make" to redo the Makefile.in
-    tag_META_INCLUDES ();       # Supplies directories for src locations
-    
-    foreach $program (@programs) {
-        $sources_changed{$program} = 0;
-        $depedmocs{$program} = "";
-        $important{$program} = "";
-	tag_IDLFILES();             # Sorts out idl rules
-	tag_CLOSURE();
-	tag_UIFILES();             # Sorts out ui rules
-        tag_METASOURCES ();         # Sorts out the moc rules
-        if ($sources_changed{$program}) {
-            my $lookup = "$program" . '_SOURCES\s*=\s*(.*)';
-            substituteLine($lookup, "$program\_SOURCES=" . $sources{$program});
-        }
-        if ($important{$program}) {
-            local %source_dict = ();
-            for $source (split(/[\034\s]+/, $sources{$program})) {
-                $source_dict{$source} = 1;
-            }
-            for $source (@cleanfiles) {
-                $source_dict{$source} = 0;
-            }
-            for $source (keys %source_dict) {
-                next if (!$source);
-                if ($source_dict{$source}) {
-                    # sanity check
-                    if (! -f $source) {
-                        print STDERR "Error: $source is listed in a _SOURCE line in $printname, but doesn't exist yet. Put it in DISTCLEANFILES!\n";
-                    } else {
-                        $target_adds{"\$(srcdir)/$source"} .= $important{$program};
-                    }
-                }
-            }
-        }
-    }
-    if ($cleanMoc) {
-        # Always add dist clean tag
-        # Add extra *.moc.cpp files created for USE_AUTOMOC because they
-        # aren't included in the normal *.moc clean rules.
-        appendLines ("$cleantarget-metasources:\n\t-rm -f $cleanMoc\n");
-        $target_adds{"$cleantarget-am"} .= "$cleantarget-metasources ";
-    }
-    
-    tag_DIST() unless ($kdeopts{"noautodist"});
-
-    if ($idl_output) {
-        appendLines ("$cleantarget-idl:\n\t-rm -f $idl_output\n");
-        $target_adds{"$cleantarget-am"} .= "$cleantarget-idl ";
-    }
-
-    if ($ui_output) {
-        appendLines ("$cleantarget-ui:\n\t-rm -f $ui_output\n");
-        $target_adds{"$cleantarget-am"} .= "$cleantarget-ui ";
-    }
-
-    if ($closure_output) {
-        appendLines ("$cleantarget-closures:\n\t-rm -f $closure_output\n");
-        $target_adds{"$cleantarget-am"} .= "$cleantarget-closures ";
-    }
-
-    if ($MakefileData =~ /\nKDE_LANG\s*=\s*(\S*)\s*\n/) {
-        $kdelang = '$(KDE_LANG)'
-    } else {
-        $kdelang = '';
-    }
-
-    tag_POFILES ();             # language rules for po directory
-    tag_DOCFILES ();            # language rules for doc directories
-    tag_LOCALINSTALL();         # add $(DESTDIR) before all kde_ dirs
-    tag_ICON();
-    tag_SUBDIRS();
-
-    my $tmp = "force-reedit:\n";
-    $tmp   .= "\t$automkCall\n\tcd \$(top_srcdir) && perl $thisProg $printname\n\n";
-    appendLines($tmp);
-    
-    make_meta_classes();
-    tag_COMPILE_FIRST();
-    tag_FINAL() if (!$kdeopts{"nofinal"});
-
-    my $final_lines = "final:\n\t\$(MAKE) ";
-    my $final_install_lines = "final-install:\n\t\$(MAKE) ";
-    my $nofinal_lines = "no-final:\n\t\$(MAKE) ";
-    my $nofinal_install_lines = "no-final-install:\n\t\$(MAKE) ";
-
-    foreach $program (@programs) {
-        
-        my $lookup = "$program\_OBJECTS.*=[^\n]*";
-        
-        my $new = "";
-        
-        my @list = split(/[\034\s]+/, $realObjs{$program});
-        
-        if (!$kdeopts{"nofinal"} && @list > 1 && $finalObjs{$program}) {
-            
-            $new .= "$program\_final\_OBJECTS = " . $finalObjs{$program};
-            $new .= "\n$program\_nofinal\_OBJECTS = " . $realObjs{$program};
-            $new .= "\n\@KDE_USE_FINAL_FALSE\@$program\_OBJECTS = \$($program\_nofinal\_OBJECTS)";
-            $new .= "\n\@KDE_USE_FINAL_TRUE\@$program\_OBJECTS = \$($program\_final\_OBJECTS)";
-            
-            $final_lines .= "$program\_OBJECTS=\"\$($program\_final_OBJECTS)\" ";
-            $final_install_lines .= "$program\_OBJECTS=\"\$($program\_final_OBJECTS)\" ";
-            $nofinal_lines .= "$program\_OBJECTS=\"\$($program\_nofinal\_OBJECTS)\" ";
-            $nofinal_install_lines .= "$program\_OBJECTS=\"\$($program\_nofinal_OBJECTS)\" ";
-        } else {
-            $new = "$program\_OBJECTS = " . $realObjs{$program};
-        }
-        substituteLine ($lookup, $new);
-    }
-    appendLines($final_lines . "all-am");
-    appendLines($final_install_lines . "install-am");
-    appendLines($nofinal_lines . "all-am");
-    appendLines($nofinal_install_lines . "install-am");
-
-    my $lookup = '(\@\S+\@)?DEP_FILES\s*=([^\n]*)';
-    if ($MakefileData =~ /\n$lookup\n/o) {
-        my $condition = $1;
-        my $depfiles = $2;
-        my $workfiles;
-
-        if ($dep_finals) {
-            # Add the conditions on every line, since
-            # there may be line continuations in the list.
-            $workfiles = "$dep_files $dep_finals $depfiles";
-            $workfiles =~ s/\034/\034$condition\@KDE_USE_FINAL_TRUE\@\t/g;
-            $lines  = "$condition\@KDE_USE_FINAL_TRUE\@DEP_FILES = $workfiles\n";
-            $workfiles = "$dep_files $depfiles";
-            $workfiles =~ s/\034/\034$condition\@KDE_USE_FINAL_FALSE\@\t/g;
-            $lines .= "$condition\@KDE_USE_FINAL_FALSE\@DEP_FILES = $workfiles\n";
-        } else {
-            $workfiles = "$dep_files $depfiles";
-            $workfiles =~ s/\034/\034$condition\t/g;
-            $lines = $condition . "DEP_FILES = $workfiles\n";
-        }
-        substituteLine($lookup, $lines);
-    }
-
-    my $cvs_lines = "cvs-clean:\n";
-    $cvs_lines .= "\t\$(MAKE) admindir=\$(top_srcdir)/admin -f \$(top_srcdir)/admin/Makefile.common cvs-clean\n";
-    appendLines($cvs_lines);
-
-    $cvs_lines  = "kde-rpo-clean:\n";
-    $cvs_lines .= "\t-rm -f *.rpo\n";
-    appendLines($cvs_lines);
-    $target_adds{"clean"} .= "kde-rpo-clean ";
-
-    my %target_dels = ("install-data-am" => "");
-
-    # some strange people like to do a install-exec, and expect that also
-    # all modules are installed.  automake doesn't know this, so we need to move
-    # this here from install-data to install-exec.
-    if ($MakefileData =~ m/\nkde_module_LTLIBRARIES\s*=/) {
-#      $target_adds{"install-exec-am"} .= "install-kde_moduleLTLIBRARIES ";
-#      don't use $target_adds here because we need to append the dependency, not
-#      prepend it. Fixes #44342 , when a module depends on a lib in the same dir
-#      and libtool needs it during relinking upon install (Simon)
-      my $lookup = "install-exec-am:([^\n]*)";
-      if($MakefileData =~ /\n$lookup\n/) {
-        substituteLine("$lookup", "install-exec-am: $1 install-kde_moduleLTLIBRARIES");
-      }
-      $target_dels{"install-data-am"} .= "install-kde_moduleLTLIBRARIES ";
-      $target_adds{"install-data-am"} .= " ";
-    }
-
-    my $lines = "";
-
-    foreach $add (keys %target_adds) {
-	my $lookup = quotemeta($add) . ':([^\n]*)';
-        if ($MakefileData =~ /\n$lookup\n/) {
-	  my $newlines = $1;
-	  my $oldlines = $lookup;
-	  if (defined $target_dels{$add}) {
-	    foreach $del (split(' ', $target_dels{$add})) {
-	      $newlines =~ s/\s*$del\s*/ /g;
-	    }
-	  }
-	  substituteLine($oldlines, "$add: " . $target_adds{$add} . $newlines);
-        } else {
-	  $lines .= "$add: " . $target_adds{$add} . "\n";
-        }
-    }
-    if ($lines) {
-        appendLines($lines);
-    }
-
-    my $found = 1;
-
-    while ($found) {
-        if ($MakefileData =~ m/\n(.*)\$\(CXXFLAGS\)(.*)\n/) {
-            my $vor = $1;   # "vor" means before in German
-            my $nach = $2; # "nach" means after in German
-            my $lookup = quotemeta("$1\$(CXXFLAGS)$2");
-            my $replacement = "$1\$(KCXXFLAGS)$2";
-            $MakefileData =~ s/$lookup/$replacement/;
-            $lookup =~ s/\\\$\\\(CXXFLAGS\\\)/\\\$\\\(KCXXFLAGS\\\)/;
-            $replacement = "$vor\$(KCXXFLAGS) \$(KDE_CXXFLAGS)$nach";
-            substituteLine($lookup, $replacement);
-        } else {
-            $found = 0;
-        }
-    }
-
-    if($foreign_libtool == 0) {
-        $lookup = '(\n[^#].*\$\(LIBTOOL\) --mode=link) (\$\(CXXLD\).*\$\(KCXXFLAGS\))';
-
-        if ($MakefileData =~ m/$lookup/ ) {
-            $MakefileData =~ s/$lookup/$1 --tag=CXX $2/;
-        }
-
-        $lookup = '(\n[^#].*\$\(LIBTOOL\) --mode=compile)\s+(\$\(CXX\)\s+)';
-        if ($MakefileData =~ m/$lookup/ ) {
-            $MakefileData =~ s/$lookup/$1 --tag=CXX $2/;
-        }
-    }
-
-    $MakefileData =~ s/\$\(KCXXFLAGS\)/\$\(CXXFLAGS\)/g;
-
-    $lookup = '(.*)cp -pr \$\$/\$\$file \$\(distdir\)/\$\$file(.*)';
-    if ($MakefileData =~ m/\n$lookup\n/) {
-        substituteLine($lookup, "$1cp -pr \$\$d/\$\$file \$(distdir)/\$\$file$2");
-    }
-
-    # Always update the Makefile.in
-    updateMakefile ();
-    return;
-}
-
-#-----------------------------------------------------------------------------
-
-# Beware: This procedure is not complete.  E.g. it also parses lines
-# containing a '=' in rules (for instance setting shell vars).  For our
-# usage this us enough, though.
-sub read_variables ()
-{
-    while ($MakefileData =~ /\n\s*(\S+)\s*=([^\n]*)/g) {
-        $varcontent{$1} = $2;
-    }
-}
-
-# Check to see whether we should process this make file.
-# This is where we look for tags that we need to process.
-# A small amount of initialising on the tags is also done here.
-# And of course we open and/or create the needed make files.
-sub initialise ()
-{
-    if (! -r "Makefile.am") {
-	print STDOUT "found Makefile.in without Makefile.am\n" if ($verbose);
-	return 0;
-    }
-
-    # Checking for files to process...
-    open (FILEIN, $makefile)
-      || die "Could not open $makefileDir/$makefile: $!\n";
-    # Read the file
-    # stat(FILEIN)[7] might look more elegant, but is slower as it 
-    # requires stat'ing the file
-    seek(FILEIN, 0, 2);
-    my $fsize = tell(FILEIN);
-    seek(FILEIN, 0, 0);
-    read FILEIN, $MakefileData, $fsize;
-    close FILEIN;
-    print "DOS CRLF within $makefileDir/$makefile!\n" if($MakefileData =~ y/\r//d);
-
-    # Remove the line continuations, but keep them marked
-    # Note: we lose the trailing spaces but that's ok.
-    # Don't mangle line-leading spaces (usually tabs)
-    # since they're important.
-    $MakefileData =~ s/\\\s*\n/\034/g;
-
-    # If we've processed the file before...
-    restoreMakefile ()      if ($MakefileData =~ /$progId/);
-
-    foreach $dir (@foreignfiles) {
-      if (substr($makefileDir,0,length($dir)) eq $dir) {
-	return 0;
-      }
-    }
-
-    %kdeopts = ();
-    $kdeopts{"foreign"} = 0;
-    $kdeopts{"qtonly"} = 1;
-    $kdeopts{"noautodist"} = 0;
-    $kdeopts{"foreign-libtool"} = $foreign_libtool;
-    $kdeopts{"nofinal"} = !$use_final; # default
-
-    read_variables();
-
-    if ($MakefileData =~ /\nKDE_OPTIONS\s*=\s*([^\n]*)\n/) {
-        local @kde_options = split(/[\s\034]/, $1);
-        if (grep(/^foreign$/, @kde_options)) {
-            push(@foreignfiles, $makefileDir . "/");
-            return 0; # don't touch me
-        }
-        for $opt (@kde_options) {
-            if (!defined $kdeopts{$opt}) {
-                print STDERR "Warning: unknown option $opt in $printname\n";
-            } else {
-                $kdeopts{$opt} = 1;
-            }
-        }
-    }
-
-    # Look for the tags that mean we should process this file.
-    $metasourceTags = 0;
-    $metasourceTags++    while ($MakefileData =~ /\n[^=\#]*METASOURCES\s*=/g);
-
-    my $pofileTag = 0;
-    $pofileTag++    while ($MakefileData =~ /\nPOFILES\s*=/g);
-    if ($pofileTag > 1)
-      {
-          print STDERR "Error: Only one POFILES tag allowed\n";
-          $errorflag = 1;
-      }
-
-    while ($MakefileData =~ /\n\.SUFFIXES:([^\n]+)\n/g) {
-	my @list=split(' ', $1);
-	foreach $ext (@list) {
-	    if ($ext =~ /^\.$cppExt$/) {
-		$cxxsuffix = $ext;
-		$cxxsuffix =~ s/\.//g;
-		print STDOUT "will use suffix $cxxsuffix\n" if ($verbose);
-		last;
-	    }
-	}
-    }
-
-    while ($MakefileData =~ /\n(\S*)_OBJECTS\s*=[ \t\034]*([^\n]*)\n/g) {
-
-        my $program = $1;
-        my $objs = $2; # safe them
-
-        my $ocv = 0;
-
-        my @objlist = split(/[\s\034]+/, $objs);
-        foreach $obj (@objlist) {
-            if ($obj =~ /(\S*)\$\((\S+)\)/ ) {
-		my $pre = $1;
-                my $variable = $2;
-		if ($pre eq '' && exists($varcontent{$variable})) {
-		    my @addlist = split(/[\s\034]+/, $varcontent{$variable});
-		    push(@objlist, @addlist);
-                } elsif ($variable !~ 'OBJEXT') {
-                    $ocv = 1;
-		}
-            }
-        }
-
-        next if ($ocv);
-
-        $program =~ s/^am_// if ($program =~ /^am_/);
-
-        my $sourceprogram = $program;
-        $sourceprogram =~ s/\@am_/\@/ if($sourceprogram =~ /^.*\@am_.+/);
-
-        print STDOUT "found program $program\n" if ($verbose);
-        push(@programs, $program);
-
-        $realObjs{$program} = $objs;
-
-        if ($MakefileData =~ /\n$sourceprogram\_SOURCES\s*=\s*(.*)\n/) {
-            $sources{$program} = $1;
-        } 
-        else {
-            $sources{$program} = "";
-            print STDERR "found program with no _SOURCES: $program\n";
-        }
-        
-        my $realprogram = $program;
-        $realprogram =~ s/_/./g; # unmask to regexp
-        if ($MakefileData =~ /\n($realprogram)(\$\(EXEEXT\)?)?:.*\$\($program\_OBJECTS\)/) {
-            $realname{$program} = $1;
-        } else {
-            # not standard Makefile - nothing to worry about
-            $realname{$program} = "";
-        }
-    }
-    
-    my $lookup = '\nDEPDIR\s*=.*';
-    if ($MakefileData !~ /($lookup)\n/o) {
-        $lookup = '\nbindir\s*=.*';
-        if ($MakefileData =~ /($lookup)\n/) {
-            substituteLine ($lookup, "DEPDIR = .deps\n$1");
-        }
-    } 
-
-    my @marks = ('MAINTAINERCLEANFILES', 'CLEANFILES', 'DISTCLEANFILES');
-    foreach $mark (@marks) {
-        while ($MakefileData =~ /\n($mark)\s*=\s*([^\n]*)/g) {
-            foreach $file (split('[\034\s]', $2)) {
-                $file =~ s/\.\///;
-                push(@cleanfiles, $file);
-            }
-        }
-    }
-
-    my $localTag = 0;
-    $localTag++ if ($MakefileData =~ /\ninstall-\S+-local:/);
-    
-    return (!$errorflag);
-}
-
-#-----------------------------------------------------------------------------
-
-# Gets the list of user defined directories - relative to $srcdir - where
-# header files could be located.
-sub tag_META_INCLUDES ()
-{
-    my $lookup = '[^=\n]*META_INCLUDES\s*=\s*(.*)';
-    return 1    if ($MakefileData !~ /($lookup)\n/o);
-    print STDOUT "META_INCLUDE processing <$1>\n"       if ($verbose);
-
-    my $headerStr = $2;
-    removeLine ($lookup, $1);
-
-    $headerStr =~ tr/\034/ /;
-    my @headerlist = split(' ', $headerStr);
-
-    foreach $dir (@headerlist)
-    {
-        $dir =~ s#\$\(srcdir\)#.#;
-        if (! -d $dir)
-        {
-            print STDERR "Warning: $dir can't be found. ",
-                            "Must be a relative path to \$(srcdir)\n";
-        }
-        else
-        {
-            push (@headerdirs, $dir);
-        }
-    }
-
-    return 0;
-}
-
-#-----------------------------------------------------------------------------
-
-sub tag_FINAL()
-{
-    my @final_names = ();
-    
-    foreach $program (@programs) {
-        
-        if ($sources{$program} =~ /\(/) {
-            print STDOUT "found ( in $program\_SOURCES. skipping\n" if ($verbose);
-            next;
-        }
-
-        my $mocs = "";       # Moc files (in this program)
-	my $moc_cpp_added = 0;  # If we added some .moc.cpp files, due to
-				# no other .cpp file including the .moc one.
-        
-        my @progsources = split(/[\s\034]+/, $sources{$program});
-        my %shash = ();
-        @shash{@progsources} = 1;  # we are only interested in the existence
-        my %sourcelist = ();
-        
-        foreach $source (@progsources) {
-            my $suffix = $source;
-            $suffix =~ s/^.*\.([^\.]+)$/$1/;
-            
-            $sourcelist{$suffix} .= "$source ";
-        }
-        foreach my $mocFile (keys (%globalmocs))
-        {
-            my ($dir, $hFile, $cppFile) = split ("\035", $globalmocs{$mocFile}, 3);
-            if (defined ($cppFile)) {
-                $mocs .= " $mocFile.moc" if exists $shash{$cppFile};
-            } else {
-		$sourcelist{$cxxsuffix} .= "$mocFile.moc.$cxxsuffix ";
-		$moc_cpp_added = 1;
-	    }
-        }
-        foreach $suffix (keys %sourcelist) {
-            
-            # See if this file contains c++ code. (i.e., just check the file's suffix against c++ extensions)
-            my $suffix_is_cxx = 0;
-            if($suffix =~ /($cppExt)$/) {
-              $cxxsuffix = $1;
-              $suffix_is_cxx = 1;
-            }
-            
-            my $mocfiles_in = ($suffix eq $cxxsuffix) && $moc_cpp_added;
-            
-            my @sourcelist = split(/[\s\034]+/, $sourcelist{$suffix});
-            
-            if ((@sourcelist == 1 && !$mocfiles_in) || $suffix_is_cxx != 1 ) {
-                
-                # we support IDL on our own
-                if ($suffix eq "skel" || $suffix =~ /^stub/ || $suffix =~ /^signals/ 
-                    || $suffix eq "h" || $suffix eq "ui" ) {
-                    next;
-                }
-                
-                foreach $file (@sourcelist) {
-                    $file =~ s/\Q$suffix\E$//;
-                    
-                    $finalObjs{$program} .= $file;
-                    if ($program =~ /_la$/) {
-                        $finalObjs{$program} .= "lo ";
-                    } else {
-                        $finalObjs{$program} .= "o ";
-                    }
-                }
-                next; # suffix
-            }
-            
-            my $source_deps = "";
-            foreach $source (@sourcelist) {
-                if (-f $source) {
-                    $source_deps .= " \$(srcdir)/$source";
-                } else {
-                    $source_deps .= " $source";
-                }
-            }
-
-            $handling = "$program.all_$suffix.$suffix: \$(srcdir)/Makefile.in" . $source_deps . " " . join(' ', $mocs)  . "\n";
-            $handling .= "\t\@echo 'creating $program.all_$suffix.$suffix ...'; \\\n";
-            $handling .= "\trm -f $program.all_$suffix.files $program.all_$suffix.final; \\\n";
-            $handling .= "\techo \"#define KDE_USE_FINAL 1\" >> $program.all_$suffix.final; \\\n";
-            $handling .= "\tfor file in " . $sourcelist{$suffix} . "; do \\\n";
-            $handling .= "\t  echo \"#include \\\"\$\$file\\\"\" >> $program.all_$suffix.files; \\\n";
-            $handling .= "\t  test ! -f \$\(srcdir\)/\$\$file || egrep '^#pragma +implementation' \$\(srcdir\)/\$\$file >> $program.all_$suffix.final; \\\n";
-            $handling .= "\tdone; \\\n";
-            $handling .= "\tcat $program.all_$suffix.final $program.all_$suffix.files > $program.all_$suffix.$suffix; \\\n";
-            $handling .= "\trm -f $program.all_$suffix.final $program.all_$suffix.files\n";
-
-            appendLines($handling);
-
-            push(@final_names, "$program.all_$suffix.$suffix");
-            my $finalObj = "$program.all_$suffix.";
-            if ($program =~ /_la$/) {
-                $finalObj .= "lo";
-            } else {
-                $finalObj .= "o";
-            }
-	    $finalObjs{$program} .= $finalObj . " ";
-        }
-    }
-    
-    if (!$kdeopts{"nofinal"} && @final_names >= 1) {
-        # add clean-final target
-        my $lines = "$cleantarget-final:\n";
-        $lines .= "\t-rm -f " . join(' ', @final_names) . "\n" if (@final_names);
-        appendLines($lines);
-        $target_adds{"$cleantarget-am"} .= "$cleantarget-final ";
-        
-        foreach $finalfile (@final_names) {
-            $finalfile =~ s/\.[^.]*$/.P/;
-            $dep_finals .= " \$(DEPDIR)/$finalfile";
-        }
-    }
-}
-
-#-----------------------------------------------------------------------------
-
-sub tag_COMPILE_FIRST()
-{
-  foreach $program (@programs) {
-    my $lookup = "$program" . '_COMPILE_FIRST\s*=\s*(.*)';
-    if ($MakefileData =~ m/\n$lookup\n/) {
-      my @compilefirst = split(/[\s\034]+/, $1);
-      my @progsources = split(/[\s\034]+/, $sources{$program});
-      my %donesources = ();
-      $handling = "";
-      foreach $source (@progsources) {
-        my @deps  = ();
-        my $sdeps = "";
-        if (-f $source) {
-          $sdeps = "\$(srcdir)/$source";
-        } else {
-          $sdeps = "$source";
-        }
-        foreach $depend (@compilefirst) {
-          next if ($source eq $depend);
-          # avoid cyclic dependencies
-          next if defined($donesources{$depend});
-          push @deps, $depend;
-        }
-        $handling .= "$sdeps: " . join(' ', @deps) . "\n" if (@deps);
-        $donesources{$source} = 1;
-      }
-      appendLines($handling) if (length($handling));
-    }
-  }
-}
-
-#-----------------------------------------------------------------------------
-
-
-# Organises the list of headers that we'll use to produce moc files
-# from.
-sub tag_METASOURCES ()
-{
-    local @newObs           = ();  # here we add to create object files
-    local @deped            = ();  # here we add to create moc files
-    local $mocExt           = ".moc";
-    local %mocFiles         = ();
-
-    my $line = "";
-    my $postEqual = "";
-
-    my $lookup;
-    my $found = "";
-#print "$program: tag_METASOURCES\n";
-    if ($metasourceTags > 1) {
-	$lookup = $program . '_METASOURCES\s*=\s*(.*)';
-	return 1    if ($MakefileData !~ /\n($lookup)\n/);
-	$found = $1;
-    } else {
-	$lookup = $program . '_METASOURCES\s*=\s*(.*)';
-	if ($MakefileData !~ /\n($lookup)\n/) {
-	    $lookup = 'METASOURCES\s*=\s*(.*)';
-	    return 1    if ($MakefileData !~ /\n($lookup)\n/o);
-	    $found = $1;
-	    $metasourceTags = 0; # we can use the general target only once
-	} else {
-            $found = $1;
-        }
-    }
-    print STDOUT "METASOURCE processing <$found>)\n"      if ($verbose);
-    
-    $postEqual = $found;
-    $postEqual =~ s/[^=]*=//;
-    
-    removeLine ($lookup, $found);
-    
-    # Always find the header files that could be used to "moc"
-    return 1    if (findMocCandidates ());
-    
-    if ($postEqual =~ /AUTO\s*(\S*)|USE_AUTOMOC\s*(\S*)/)
-    {
-	print STDERR "$printname: the argument for AUTO|USE_AUTOMOC is obsolete" if ($+);
-	$mocExt = ".moc.$cxxsuffix";
-	$haveAutomocTag = 1;
-    }
-    else
-    {
-        # Not automoc so read the list of files supplied which
-        # should be .moc files.
-
-        $postEqual =~ tr/\034/ /;
-
-        # prune out extra headers - This also checks to make sure that
-        # the list is valid.
-        pruneMocCandidates ($postEqual);
-    }
-
-    checkMocCandidates ();
-    
-    if (@newObs) {
-        my $ext =  ($program =~ /_la$/) ? ".moc.lo " : ".moc.o ";
-        $realObjs{$program} .= "\034" . join ($ext, @newObs) . $ext;
-        $depedmocs{$program} = join (".moc.$cxxsuffix " , @newObs) . ".moc.$cxxsuffix";
-        foreach $file (@newObs) {
-            $dep_files .= " \$(DEPDIR)/$file.moc.P" if($dep_files !~/$file.moc.P/);
-        }
-    }
-    if (@deped) {
-        $depedmocs{$program} .= " ";
-        $depedmocs{$program} .= join('.moc ', @deped) . ".moc";
-        $depedmocs{$program} .= " ";
-    }
-    addMocRules ();
-    @globalmocs{keys %mocFiles}=values %mocFiles;
-}
-
-#-----------------------------------------------------------------------------
-
-# Returns 0 if the line was processed - 1 otherwise.
-# Errors are logged in the global $errorflags
-sub tag_AUTOMAKE ()
-{
-    my $lookup = '.*cd \$\(top_srcdir\)\s+&&[\s\034]+\$\(AUTOMAKE\)(.*)';
-    return 1    if ($MakefileData !~ /\n($lookup)\n/);
-    print STDOUT "AUTOMAKE processing <$1>\n"        if ($verbose);
-
-    my $newLine = $1."\n\tcd \$(top_srcdir) && perl $thisProg $printname";
-    substituteLine ($lookup, $newLine);
-    $automkCall = $1;
-    return 0;
-}
-
-#-----------------------------------------------------------------------------
-
-sub handle_TOPLEVEL()
-{
-    my $pofiles = "";
-    my @restfiles = ();
-    opendir (THISDIR, ".");
-    foreach $entry (readdir(THISDIR)) {
-        next if (-d $entry);
-        
-        next if ($entry eq "CVS" || $entry =~ /^\./  || $entry =~ /^Makefile/ || $entry =~ /~$/ || $entry =~ /^\#.*\#$/ || $entry =~ /.gmo$/);
-                 
-        if ($entry =~ /\.po$/) {
-             next;
-        }
-        push(@restfiles, $entry);
-    }
-    closedir (THISDIR);
-            
-    if (@restfiles) {
-        $target_adds{"install-data-am"} .= "install-nls-files ";
-        $lines = "install-nls-files:\n";
-        $lines .= "\t\$(mkinstalldirs) \$(DESTDIR)\$(kde_locale)/$kdelang\n";
-        for $file (@restfiles) {
-            $lines .= "\t\$(INSTALL_DATA) \$\(srcdir\)/$file \$(DESTDIR)\$(kde_locale)/$kdelang/$file\n";
-        }
-	$target_adds{"uninstall"} .= "uninstall-nls-files ";
-        $lines .= "uninstall-nls-files:\n";
-        for $file (@restfiles) {
-            $lines .= "\t-rm -f \$(DESTDIR)\$(kde_locale)/$kdelang/$file\n";
-        }
-        appendLines($lines);
-    }
-    
-    return 0;
-}
-
-#-----------------------------------------------------------------------------
-
-sub tag_SUBDIRS ()
-{
-  if ($MakefileData !~ /\nSUBDIRS\s*=\s*\$\(AUTODIRS\)\s*\n/) {
-    return 1;
-  }
-
-  my $subdirs = ".";
-
-  opendir (THISDIR, ".");
-  foreach $entry (readdir(THISDIR)) {
-    next if ($entry eq "CVS" || $entry =~ /^\./);
-    if (-d $entry && -f $entry . "/Makefile.am") {
-      $subdirs .= " $entry";
-      next;
-    }
-  }
-  closedir (THISDIR);
-
-  my $lines = "SUBDIRS =$subdirs\n";
-  substituteLine('SUBDIRS\s*=.*', $lines);
-  return 0;
-}
-
-sub tag_IDLFILES ()
-{
-    my @psources = split(/[\034\s]+/, $sources{$program});
-    my $dep_lines = "";
-    my @cppFiles = ();
-    
-    foreach $source (@psources) {
-        
-        my $skel = ($source =~ m/\.skel$/);
-        my $stub = ($source =~ m/\.stub$/);
-        my $signals = ($source =~ m/\.signals$/);
-        
-        if ($stub || $skel || $signals) {
-            
-            my $qs = quotemeta($source);
-            $sources{$program} =~ s/$qs//;
-            $sources_changed{$program} = 1;
-            
-            print STDOUT "adding IDL file $source\n" if ($verbose);
-            
-            $source =~ s/\.(stub|skel|signals)$//;
-            
-            my $sourcename;
-            
-            if ($skel) {
-                $sourcename = "$source\_skel";
-            } elsif ($stub) {
-                $sourcename = "$source\_stub";
-            } else {
-                $sourcename = "$source\_signals";
-            }
-            
-            my $sourcedir = '';
-            if (-f "$makefileDir/$source.h") {
-                $sourcedir = '$(srcdir)/';
-            } else {
-                if ($MakefileData =~ /\n$source\_DIR\s*=\s*(\S+)\n/) {
-                    $sourcedir = $1;
-                    $sourcedir .= "/" if ($sourcedir !~ /\/$/);
-                }
-            }
-            
-            if ($allidls !~ /$source\_kidl/) {
-                
-                $dep_lines .= "$source.kidl: $sourcedir$source.h \$(DCOP_DEPENDENCIES)\n";
-                $dep_lines .= "\t\$(DCOPIDL) $sourcedir$source.h > $source.kidl || ( rm -f $source.kidl ; /bin/false )\n";
-                
-                $allidls .= $source . "_kidl ";
-            }
-            
-            if ($allidls !~ /$sourcename/) {
-                
-                $dep_lines_tmp = "";
-
-                if ($skel) {
-                    $dep_lines .= "$sourcename.$cxxsuffix: $source.kidl\n";
-                    $dep_lines .= "\t\$(DCOPIDL2CPP) --c++-suffix $cxxsuffix --no-signals --no-stub $source.kidl\n";
-                } elsif ($stub) {
-                    $dep_lines_tmp = "\t\$(DCOPIDL2CPP) --c++-suffix $cxxsuffix --no-signals --no-skel $source.kidl\n";
-                } else { # signals
-                    $dep_lines_tmp = "\t\$(DCOPIDL2CPP) --c++-suffix $cxxsuffix --no-stub --no-skel $source.kidl\n";
-                }
-
-                if ($stub || $signals) {
-                    $target_adds{"$sourcename.$cxxsuffix"} .= "$sourcename.h ";
-                    $dep_lines .= "$sourcename.h: $source.kidl\n";
-                    $dep_lines .= $dep_lines_tmp;
-                }
-                
-                $allidls .= $sourcename . " ";
-            }
-            
-            $idlfiles{$program} .= $sourcename . " ";
-            
-            if ($program =~ /_la$/) {
-                $realObjs{$program} .= " $sourcename.lo";
-            } else {
-                $realObjs{$program} .= " $sourcename.\$(OBJEXT)";
-            }
-            $sources{$program} .= " $sourcename.$cxxsuffix";
-            $sources_changed{$program} = 1;
-            $important{$program} .= "$sourcename.h " if (!$skel);
-            $idl_output .= "\\\n\t$sourcename.$cxxsuffix $sourcename.h $source.kidl ";
-            push(@cleanfiles, "$sourcename.$cxxsuffix");
-            push(@cleanfiles, "$sourcename.h");
-            push(@cleanfiles, "$sourcename.kidl");
-            $dep_files .= " \$(DEPDIR)/$sourcename.P" if ($dep_files !~/$sourcename.P/);
-        }
-    }
-    if ($dep_lines) {
-        appendLines($dep_lines);
-    }
-    
-    if (0) {
-        my $lookup = "($program)";
-        $lookup .= '(|\$\(EXEEXT\))';
-        $lookup =~ s/\_/./g;
-        $lookup .= ":(.*..$program\_OBJECTS..*)";
-        #    $lookup = quotemeta($lookup);
-        if ($MakefileData =~ /\n$lookup\n/) {
-            
-            my $line = "$1$2: ";
-            foreach $file (split(' ', $idlfiles{$program})) {
-                $line .= "$file.$cxxsuffix ";
-            }
-            $line .= $3;
-            substituteLine($lookup, $line);
-        } else {
-            print STDERR "no built dependency found $lookup\n";
-        }
-    }
-}
-
-sub tag_UIFILES ()
-{
-    my @psources = split(/[\034\s]+/, $sources{$program});
-    my $dep_lines = "";
-    my @depFiles = ();
-    
-    foreach $source (@psources) {
-
-        if ($source =~ m/\.ui$/) {
-
-            print STDERR "adding UI file $source\n" if ($verbose);
-
-            my $qs = quotemeta($source);
-            $sources{$program} =~ s/$qs//;
-            $sources_changed{$program} = 1;
-      
-            $source =~ s/\.ui$//;
-
-            my $sourcedir = '';
-            if (-f "$makefileDir/$source.ui") {
-                $sourcedir = '$(srcdir)/';
-            }
-
-            if (!$uiFiles{$source}) {
-
-                $dep_lines .= "$source.$cxxsuffix: $sourcedir$source.ui $source.h $source.moc\n";
-                $dep_lines .= "\trm -f $source.$cxxsuffix\n";
-                if (!$kdeopts{"qtonly"}) {
-                    $dep_lines .= "\techo '#include <klocale.h>' > $source.$cxxsuffix\n";
-                    my ($mangled_source) = $source;
-                    $mangled_source =~ s/[^A-Za-z0-9]/_/g;  # get rid of garbage
-                    $dep_lines .= "\t\$(UIC) -tr \${UIC_TR} -i $source.h $sourcedir$source.ui > $source.$cxxsuffix.temp ; ret=\$\$?; \\\n";
-                    $dep_lines .= "\tsed -e \"s,\${UIC_TR}( \\\"\\\" ),QString::null,g\" $source.$cxxsuffix.temp | sed -e \"s,\${UIC_TR}( \\\"\\\"\\, \\\"\\\" ),QString::null,g\" | sed -e \"s,image\\([0-9][0-9]*\\)_data,img\\1_" . $mangled_source . ",g\" >> $source.$cxxsuffix ;\\\n";
-		    $dep_lines .= "\trm -f $source.$cxxsuffix.temp ;\\\n";
-                } else {
-                    $dep_lines .= "\t\$(UIC) -i $source.h $sourcedir$source.ui > $source.$cxxsuffix; ret=\$\$?; \\\n";
-                }
-		$dep_lines .= "\tif test \"\$\$ret\" = 0; then echo '#include \"$source.moc\"' >> $source.$cxxsuffix; else rm -f $source.$cxxsuffix ; exit \$\$ret ; fi\n\n";
-                $dep_lines .= "$source.h: $sourcedir$source.ui\n";
-                $dep_lines .= "\t\$(UIC) -o $source.h $sourcedir$source.ui\n\n";
-                $dep_lines .= "$source.moc: $source.h\n";
-                $dep_lines .= "\t\$(MOC) $source.h -o $source.moc\n";
-
-		$uiFiles{$source} = 1;
-                $depedmocs{$program} .= " $source.moc";
-                $globalmocs{$source} = "\035$source.h\035$source.cpp";
-            }
-            
-            if ($program =~ /_la$/) {
-                $realObjs{$program} .= " $source.lo";
-            } else {
-                $realObjs{$program} .= " $source.\$(OBJEXT)";
-            }
-            $sources{$program} .= " $source.$cxxsuffix";
-            $sources_changed{$program} = 1;
-            $important{$program} .= "$source.h ";
-            $ui_output .= "\\\n\t$source.$cxxsuffix $source.h $source.moc ";
-            push(@cleanfiles, "$source.$cxxsuffix");
-            push(@cleanfiles, "source.h");
-            push(@cleanfiles, "$source.moc");
-            $dep_files .= " \$(DEPDIR)/$source.P" if($dep_files !~/$source.P/ );
-        }
-    }
-    if ($dep_lines) {
-        appendLines($dep_lines);
-    }
-}
-
-sub tag_ICON()
-{
-    my $lookup = '([^\s]*)_ICON\s*=\s*([^\n]*)';
-    my $install = "";
-    my $uninstall = "";
-
-    while ($MakefileData =~ /\n$lookup/og) {
-        my $destdir;
-        if ($1 eq "KDE") {
-            $destdir = "kde_icondir";
-        } else {
-            $destdir = $1 . "dir";
-        }
-        my $iconauto = ($2 =~ /AUTO\s*$/);
-        my @appnames = ();
-        if ( ! $iconauto ) {
-            my @_appnames = split(" ", $2);
-            print STDOUT "KDE_ICON processing <@_appnames>\n"   if ($verbose);
-            foreach $appname (@_appnames) {
-                push(@appnames, quotemeta($appname));
-            }
-        } else {
-            print STDOUT "KDE_ICON processing <AUTO>\n"   if ($verbose);
-        }
-
-        my @files = ();
-        opendir (THISDIR, ".");
-        foreach $entry (readdir(THISDIR)) {
-            next if ($entry eq "CVS" || $entry =~ /^\./  || $entry =~ /^Makefile/ || $entry =~ /~$/ || $entry =~ /^\#.*\#$/);
-            next if (! -f $entry);
-            if ( $iconauto )
-              {
-                  push(@files, $entry)
-                    if ($entry =~ /\.xpm/ || $entry =~ /\.png/ || $entry =~ /\.mng/ || $entry =~ /\.svg/);
-              } else {
-                  foreach $appname (@appnames) {
-                      push(@files, $entry)
-                        if ($entry =~ /-$appname\.xpm/ || $entry =~ /-$appname\.png/ || $entry =~ /-$appname\.mng/ || $entry =~ /-$appname\.svg/);
-                  }
-              }
-        }
-        closedir (THISDIR);
-        
-        my %directories = ();
-        
-        foreach $file (@files) {
-            my $newfile = $file;
-            my $prefix = $file;
-            $prefix =~ s/\.(png|xpm|mng|svg|svgz)$//;
-            my $appname = $prefix;
-            $appname =~ s/^[^-]+-// if ($appname =~ /-/) ;
-            $appname =~ s/^[^-]+-// if ($appname =~ /-/) ;
-            $appname = quotemeta($appname);
-            $prefix =~ s/$appname$//;
-            $prefix =~ s/-$//;
-            
-            $prefix = 'lo16-app' if ($prefix eq 'mini');
-            $prefix = 'lo32-app' if ($prefix eq 'lo');
-            $prefix = 'hi48-app' if ($prefix eq 'large');
-            $prefix .= '-app' if ($prefix =~ m/^...$/);
-            
-            my $type = $prefix;
-            $type =~ s/^.*-([^-]+)$/$1/;
-            $prefix =~ s/^(.*)-[^-]+$/$1/;
-            
-            my %type_hash =
-              (
-               'action' => 'actions',
-               'app' => 'apps',
-               'device' => 'devices',
-               'filesys' => 'filesystems',
-               'mime' => 'mimetypes'
-              );
-
-            if (! defined $type_hash{$type} ) {
-                print STDERR "unknown icon type $type in $printname ($file)\n";
-                next;
-            }
-
-            my %dir_hash =
-              (
-               'los' => 'locolor/16x16',
-               'lom' => 'locolor/32x32',
-               'him' => 'hicolor/32x32',
-               'hil' => 'hicolor/48x48',
-               'lo16' => 'locolor/16x16',
-               'lo22' => 'locolor/22x22',
-               'lo32' => 'locolor/32x32',
-               'hi16' => 'hicolor/16x16',
-               'hi22' => 'hicolor/22x22',
-               'hi32' => 'hicolor/32x32',
-               'hi48' => 'hicolor/48x48',
-               'hi64' => 'hicolor/64x64',
-               'hi128' => 'hicolor/128x128',
-               'hisc' => 'hicolor/scalable',
- 	       'cr16' => 'crystalsvg/16x16',
-               'cr22' => 'crystalsvg/22x22',
-               'cr32' => 'crystalsvg/32x32',
-               'cr48' => 'crystalsvg/48x48',
-               'cr64' => 'crystalsvg/64x64',
-               'cr128' => 'crystalsvg/128x128',
-               'crsc' => 'crystalsvg/scalable'
-              );
-            
-            $newfile =~ s at .*-($appname\.(png|xpm|mng|svgz|svg?))@$1@;
-            
-            if (! defined $dir_hash{$prefix}) {
-                print STDERR "unknown icon prefix $prefix in $printname\n";
-                next;
-            }
-            
-            my $dir = $dir_hash{$prefix} . "/" . $type_hash{$type};
-            if ($newfile =~ /-[^\.]/) {
-                my $tmp = $newfile;
-                $tmp =~ s/^([^-]+)-.*$/$1/;
-                $dir = $dir . "/" . $tmp;
-                $newfile =~ s/^[^-]+-//;
-            }
-            
-            if (!defined $directories{$dir}) {
-                $install .= "\t\$(mkinstalldirs) \$(DESTDIR)\$($destdir)/$dir\n";
-                $directories{$dir} = 1;
-            }
-            
-            $install .= "\t\$(INSTALL_DATA) \$(srcdir)/$file \$(DESTDIR)\$($destdir)/$dir/$newfile\n";
-            $uninstall .= "\t-rm -f \$(DESTDIR)\$($destdir)/$dir/$newfile\n";
-            
-        }
-    }
-
-    if (length($install)) {
-        $target_adds{"install-data-am"} .= "install-kde-icons ";
-        $target_adds{"uninstall-am"} .= "uninstall-kde-icons ";
-        appendLines("install-kde-icons:\n" . $install . "\nuninstall-kde-icons:\n" . $uninstall);
-    }
-}
-
-sub handle_POFILES($$)
-{
-  my @pofiles = split(" ", $_[0]);
-  my $lang = $_[1];
-
-  # Build rules for creating the gmo files
-  my $tmp = "";
-  my $allgmofiles     = "";
-  my $pofileLine   = "POFILES =";
-  foreach $pofile (@pofiles)
-    {
-        $pofile =~ /(.*)\.[^\.]*$/;          # Find name minus extension
-        $tmp .= "$1.gmo: $pofile\n";
-        $tmp .= "\trm -f $1.gmo; \$(GMSGFMT) -o $1.gmo \$(srcdir)/$pofile\n";
-        $tmp .= "\ttest ! -f $1.gmo || touch $1.gmo\n";
-        $allgmofiles .= " $1.gmo";
-        $pofileLine  .= " $1.po";
-    }
-  appendLines ($tmp);
-  my $lookup = 'POFILES\s*=([^\n]*)';
-  if ($MakefileData !~ /\n$lookup/o) {
-    appendLines("$pofileLine\nGMOFILES =$allgmofiles");
-  } else {
-    substituteLine ($lookup, "$pofileLine\nGMOFILES =$allgmofiles");
-  }
-
-    if ($allgmofiles) {
-
-        # Add the "clean" rule so that the maintainer-clean does something
-        appendLines ("clean-nls:\n\t-rm -f $allgmofiles\n");
-
-	$target_adds{"maintainer-clean"} .= "clean-nls ";
-
-	$lookup = 'DISTFILES\s*=\s*(.*)';
-	if ($MakefileData =~ /\n$lookup\n/o) {
-	  $tmp = "DISTFILES = \$(GMOFILES) \$(POFILES) $1";
-	  substituteLine ($lookup, $tmp);
-	}
-    }
-
-  $target_adds{"install-data-am"} .= "install-nls ";
-
-  $tmp = "install-nls:\n";
-  if ($lang) {
-    $tmp  .= "\t\$(mkinstalldirs) \$(DESTDIR)\$(kde_locale)/$lang/LC_MESSAGES\n";
-  }
-  $tmp .= "\t\@for base in ";
-  foreach $pofile (@pofiles)
-    {
-      $pofile =~ /(.*)\.[^\.]*$/;          # Find name minus extension
-      $tmp .= "$1 ";
-    }
-
-  $tmp .= "; do \\\n";
-  if ($lang) {
-    $tmp .= "\t  echo \$(INSTALL_DATA) \$\$base.gmo \$(DESTDIR)\$(kde_locale)/$lang/LC_MESSAGES/\$\$base.mo ;\\\n";
-    $tmp .= "\t  if test -f \$\$base.gmo; then \$(INSTALL_DATA) \$\$base.gmo \$(DESTDIR)\$(kde_locale)/$lang/LC_MESSAGES/\$\$base.mo ;\\\n";
-    $tmp .= "\t  elif test -f \$(srcdir)/\$\$base.gmo; then \$(INSTALL_DATA) \$(srcdir)/\$\$base.gmo \$(DESTDIR)\$(kde_locale)/$lang/LC_MESSAGES/\$\$base.mo ;\\\n";
-    $tmp .= "\t  fi ;\\\n";
-  } else {
-    $tmp .= "\t  echo \$(INSTALL_DATA) \$\$base.gmo \$(DESTDIR)\$(kde_locale)/\$\$base/LC_MESSAGES/\$(PACKAGE).mo ;\\\n";
-    $tmp .= "\t  \$(mkinstalldirs) \$(DESTDIR)\$(kde_locale)/\$\$base/LC_MESSAGES ; \\\n";
-    $tmp .= "\t  if test -f \$\$base.gmo; then \$(INSTALL_DATA) \$\$base.gmo \$(DESTDIR)\$(kde_locale)/\$\$base/LC_MESSAGES/\$(PACKAGE).mo ;\\\n";
-    $tmp .= "\t  elif test -f \$(srcdir)/\$\$base.gmo; then \$(INSTALL_DATA) \$(srcdir)/\$\$base.gmo \$(DESTDIR)\$(kde_locale)/\$\$base/LC_MESSAGES/\$(PACKAGE).mo ;\\\n";
-    $tmp .= "\t  fi ;\\\n";
-  }
-  $tmp .= "\tdone\n\n";
-  appendLines ($tmp);
-
-  $target_adds{"uninstall"} .= "uninstall-nls ";
-
-  $tmp = "uninstall-nls:\n";
-  foreach $pofile (@pofiles)
-    {
-      $pofile =~ /(.*)\.[^\.]*$/;          # Find name minus extension
-      if ($lang) {
-	$tmp .= "\trm -f \$(DESTDIR)\$(kde_locale)/$lang/LC_MESSAGES/$1.mo\n";
-      } else {
-	$tmp .= "\trm -f \$(DESTDIR)\$(kde_locale)/$1/LC_MESSAGES/\$(PACKAGE).mo\n";
-      }
-    }
-  appendLines($tmp);
-
-  $target_adds{"all"} .= "all-nls ";
-
-  $tmp = "all-nls: \$(GMOFILES)\n";
-
-  appendLines($tmp);
-
-  $target_adds{"distdir"} .= "distdir-nls ";
-
-  $tmp = "distdir-nls:\$(GMOFILES)\n";
-  $tmp .= "\tfor file in \$(POFILES); do \\\n";
-  $tmp .= "\t  cp \$(srcdir)/\$\$file \$(distdir); \\\n";
-  $tmp .= "\tdone\n";
-  $tmp .= "\tfor file in \$(GMOFILES); do \\\n";
-  $tmp .= "\t  cp \$(srcdir)/\$\$file \$(distdir); \\\n";
-  $tmp .= "\tdone\n";
-
-  appendLines ($tmp);
-
-  if (!$lang) {
-    appendLines("merge:\n\t\$(MAKE) -f \$(top_srcdir)/admin/Makefile.common package-merge POFILES=\"\${POFILES}\" PACKAGE=\${PACKAGE}\n\n");
-  }
- 
-}
-
-#-----------------------------------------------------------------------------
-
-# Returns 0 if the line was processed - 1 otherwise.
-# Errors are logged in the global $errorflags
-sub tag_POFILES ()
-{
-    my $lookup = 'POFILES\s*=([^\n]*)';
-    return 1    if ($MakefileData !~ /\n$lookup/o);
-    print STDOUT "POFILES processing <$1>\n"   if ($verbose);
-
-    my $tmp = $1;
-
-    # make sure these are all gone.
-    if ($MakefileData =~ /\n\.po\.gmo:\n/)
-    {
-        print STDERR "Warning: Found old .po.gmo rules in $printname. New po rules not added\n";
-        return 1;
-    }
-
-    # Either find the pofiles in the directory (AUTO) or use
-    # only the specified po files.
-    my $pofiles = "";
-    if ($tmp =~ /^\s*AUTO\s*$/)
-    {
-        opendir (THISDIR, ".");
-	$pofiles =  join(" ", grep(/\.po$/, readdir(THISDIR)));
-        closedir (THISDIR);
-        print STDOUT "pofiles found = $pofiles\n"   if ($verbose);
-	if (-f "charset" && -f "kdelibs.po") {
-	    handle_TOPLEVEL();
-	}
-    }
-    else
-    {
-        $tmp =~ s/\034/ /g;
-        $pofiles = $tmp;
-    }
-    return 1    if (!$pofiles);        # Nothing to do
-
-    handle_POFILES($pofiles, $kdelang);
-
-    return 0;
-}
-
-sub helper_LOCALINSTALL($)
-{
-  my $lookup = "\035" . $_[0] . " *:[^\035]*\035\t";
-  my $copy = $MakefileData;
-  $copy =~ s/\n/\035/g;
-  if ($copy =~ /($lookup.*)$/) {
-
-    $install = $1;
-    $install =~ s/\035$_[0] *:[^\035]*\035//;
-    my $emptyline = 0;
-    while (! $emptyline ) {
-      if ($install =~ /([^\035]*)\035(.*)/) {
-	local $line = $1;
-	$install = $2;
-	if ($line !~ /^\s*$/ && $line !~ /^(\@.*\@)*\t/) {
-	  $emptyline = 1;
-	} else {
-	  replaceDestDir($line);
-	}
-      } else {
-	$emptyline = 1;
-      }
-    }
-  }
-
-}
-
-sub tag_LOCALINSTALL ()
-{
-  helper_LOCALINSTALL('install-exec-local');
-  helper_LOCALINSTALL('install-data-local');
-  helper_LOCALINSTALL('uninstall-local');
-
-  return 0;
-}
-
-sub replaceDestDir($) {
-  local $line = $_[0];
-
-  if (   $line =~ /^\s*(\@.*\@)*\s*\$\(mkinstalldirs\)/
-      || $line =~ /^\s*(\@.*\@)*\s*\$\(INSTALL\S*\)/
-      || $line =~ /^\s*(\@.*\@)*\s*(-?rm.*) \S*$/)
-  {
-    $line =~ s/^(.*) ([^\s]+)\s*$/$1 \$(DESTDIR)$2/ if ($line !~ /\$\(DESTDIR\)/);
-  }
-
-  if ($line ne $_[0]) {
-    $_[0] = quotemeta $_[0];
-    substituteLine($_[0], $line);
-  }
-}
-
-#---------------------------------------------------------------------------
-sub tag_CLOSURE () {
-    return if ($program !~ /_la$/);
-
-    my $lookup = quotemeta($realname{$program}) . ":.*?\n\t.*?\\((.*?)\\) .*\n";
-    $MakefileData =~ m/$lookup/;
-    return if ($1 !~ /CXXLINK/);
-
-    if ($MakefileData !~ /\n$program\_LDFLAGS\s*=.*-no-undefined/ &&
-        $MakefileData !~ /\n$program\_LDFLAGS\s*=.*KDE_PLUGIN/ ) {
-        print STDERR "Report: $program contains undefined in $printname\n" if ($program =~ /^lib/ && $dryrun);
-        return;
-    }
-
-    my $closure = $realname{$program} . ".closure";
-    my $lines = "$closure: \$($program\_OBJECTS) \$($program\_DEPENDENCIES)\n";
-    $lines .= "\t\@echo \"int main() {return 0;}\" > $program\_closure.$cxxsuffix\n";
-    $lines .= "\t\@\$\(LTCXXCOMPILE\) -c $program\_closure.$cxxsuffix\n";
-    $lines .= "\t\$\(CXXLINK\) $program\_closure.lo \$($program\_LDFLAGS) \$($program\_OBJECTS) \$($program\_LIBADD) \$(LIBS)\n";
-    $lines .= "\t\@rm -f $program\_closure.* $closure\n";
-    $lines .= "\t\@echo \"timestamp\" > $closure\n";
-    $lines .= "\n";
-    appendLines($lines);
-    $lookup = $realname{$program} . ": (.*)";
-    if ($MakefileData =~ /\n$lookup\n/) {
-        $lines  = "\@KDE_USE_CLOSURE_TRUE@". $realname{$program} . ": $closure $1";
-        $lines .= "\n\@KDE_USE_CLOSURE_FALSE@" . $realname{$program} . ": $1";
-        substituteLine($lookup, $lines);
-    }
-    $closure_output .= " $closure";
-}
-
-sub tag_DIST () {
-    my %foundfiles = ();
-    opendir (THISDIR, ".");
-    foreach $entry (readdir(THISDIR)) {
-        next if ($entry eq "CVS" || $entry =~ /^\./  || $entry eq "Makefile" || $entry =~ /~$/ || $entry =~ /^\#.*\#$/);
-        next if (! -f $entry);
-        next if ($entry =~ /\.moc/ || $entry =~ /\.moc.$cppExt$/ || $entry =~ /\.lo$/ || $entry =~ /\.la$/ || $entry =~ /\.o/);
-        next if ($entry =~ /\.all_$cppExt\.$cppExt$/);
-        $foundfiles{$entry} = 1;
-    }
-    closedir (THISDIR);
-
-    # doing this for MAINTAINERCLEANFILES would be wrong
-    my @marks = ("EXTRA_DIST", "DIST_COMMON", '\S*_SOURCES', '\S*_HEADERS', 'CLEANFILES', 'DISTCLEANFILES', '\S*_OBJECTS');
-    foreach $mark (@marks) {
-        while ($MakefileData =~ /\n($mark)\s*=\s*([^\n]*)/g) {
-            foreach $file (split('[\034\s]', $2)) {
-                $file =~ s/\.\///;
-                $foundfiles{$file} = 0 if (defined $foundfiles{$file});
-            }
-        }
-    }
-    my @files = ("Makefile", "config.cache", "config.log", "stamp-h",
-                 "stamp-h1", "stamp-h1", "config.h", "Makefile", 
-                 "config.status", "config.h", "libtool", "core" );
-    foreach $file (@files) {
-        $foundfiles{$file} = 0 if (defined $foundfiles{$file});
-    }
-
-    my $KDE_DIST = "";
-    foreach $file (keys %foundfiles) {
-        if ($foundfiles{$file} == 1) {
-            $KDE_DIST .= "$file ";
-        }
-    }
-    if ($KDE_DIST) {
-        print "KDE_DIST $printname $KDE_DIST\n" if ($verbose);
-
-        my $lookup = "DISTFILES *=(.*)";
-        if ($MakefileData =~ /\n$lookup\n/o) {
-            substituteLine($lookup, "KDE_DIST=$KDE_DIST\n\nDISTFILES=$1 \$(KDE_DIST)\n");
-        }
-    }
-}
-
-#-----------------------------------------------------------------------------
-# Returns 0 if the line was processed - 1 otherwise.
-# Errors are logged in the global $errorflags
-sub tag_DOCFILES ()
-{
-    $target_adds{"all"} .= "docs-am ";
-
-    my $lookup = 'KDE_DOCS\s*=\s*([^\n]*)';
-    goto nodocs    if ($MakefileData !~ /\n$lookup/o);
-    print STDOUT "KDE_DOCS processing <$1>\n"   if ($verbose);
-
-    my $tmp = $1;
-
-    # Either find the files in the directory (AUTO) or use
-    # only the specified po files.
-    my $files = "";
-    my $appname = $tmp;
-    $appname =~ s/^(\S*)\s*.*$/$1/;
-    if ($appname =~ /AUTO/) {
-      $appname = basename($makefileDir);
-      if ("$appname" eq "en") {
-      	  print STDERR "Error: KDE_DOCS = AUTO relies on the directory name. Yours is 'en' - you most likely want something else, e.g. KDE_DOCS = myapp\n";
-          exit(1);
-      }
-    }
-
-    if ($tmp !~ / - /)
-    {
-        opendir (THISDIR, ".");
-	foreach $entry (readdir(THISDIR)) {
-	  next if ($entry eq "CVS" || $entry =~ /^\./  || $entry =~ /^Makefile/ || $entry =~ /~$/ || $entry =~ /^\#.*\#$/ || $entry eq "core" || $entry eq "index.cache.bz2");
-	  next if (! -f $entry);
-	  $files .= "$entry ";
-	}
-        closedir (THISDIR);
-        print STDOUT "docfiles found = $files\n"   if ($verbose);
-    }
-    else
-    {
-        $tmp =~ s/\034/ /g;
-	$tmp =~ s/^\S*\s*-\s*//;
-        $files = $tmp;
-    }
-    goto nodocs if (!$files);        # Nothing to do
-
-    if ($files =~ /(^| )index\.docbook($| )/) {
-
-      my $lines = "";
-      my $lookup = 'MEINPROC\s*=';
-      if ($MakefileData !~ /\n($lookup)/) {
-	$lines = "MEINPROC=/\$(kde_bindir)/meinproc\n";
-      }
-      $lookup = 'KDE_XSL_STYLESHEET\s*=';
-      if ($MakefileData !~ /\n($lookup)/) {
-        $lines .= "KDE_XSL_STYLESHEET=/\$(kde_datadir)/ksgmltools2/customization/kde-chunk.xsl\n";
-      }
-      $lookup = '\nindex.cache.bz2:';
-      if ($MakefileData !~ /\n($lookup)/) {
-         $lines .= "index.cache.bz2: \$(srcdir)/index.docbook \$(KDE_XSL_STYLESHEET) $files\n";
-         $lines .= "\t\@if test -n \"\$(MEINPROC)\"; then echo \$(MEINPROC) --check --cache index.cache.bz2 \$(srcdir)/index.docbook; \$(MEINPROC) --check --cache index.cache.bz2 \$(srcdir)/index.docbook; fi\n";
-         $lines .= "\n";
-      }
-
-      $lines .= "docs-am: index.cache.bz2\n";
-      $lines .= "\n";
-      $lines .= "install-docs: docs-am install-nls\n";
-      $lines .= "\t\$(mkinstalldirs) \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname\n";
-      $lines .= "\t\@if test -f index.cache.bz2; then \\\n";
-      $lines .= "\techo \$(INSTALL_DATA) index.cache.bz2 \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/; \\\n";
-      $lines .= "\t\$(INSTALL_DATA) index.cache.bz2 \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/; \\\n";
-      $lines .= "\telif test -f  \$(srcdir)/index.cache.bz2; then \\\n";
-      $lines .= "\techo \$(INSTALL_DATA) \$(srcdir)/index.cache.bz2 \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/; \\\n";
-      $lines .= "\t\$(INSTALL_DATA) \$(srcdir)/index.cache.bz2 \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/; \\\n";
-      $lines .= "\tfi\n";
-      $lines .= "\t-rm -f \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/common\n";
-      $lines .= "\t\$(LN_S) \$(kde_libs_htmldir)/$kdelang/common \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/common\n";
-
-      $lines .= "\n";
-      $lines .= "uninstall-docs:\n";
-      $lines .= "\t-rm -rf \$(kde_htmldir)/$kdelang/$appname\n";
-      $lines .= "\n";
-      $lines .= "clean-docs:\n";
-      $lines .= "\t-rm -f index.cache.bz2\n";
-      $lines .= "\n";
-      $target_adds{"install-data-am"} .= "install-docs ";
-      $target_adds{"uninstall"} .= "uninstall-docs ";
-      $target_adds{"clean-am"} .= "clean-docs ";
-      appendLines ($lines);
-    } else {
-      appendLines("docs-am: $files\n");
-    }
-
-    $target_adds{"install-data-am"} .= "install-nls ";
-    $target_adds{"uninstall"} .= "uninstall-nls ";
-
-    $tmp = "install-nls:\n";
-    $tmp .= "\t\$(mkinstalldirs) \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname\n";
-    $tmp .= "\t\@for base in $files; do \\\n";
-    $tmp .= "\t  echo \$(INSTALL_DATA) \$\$base \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/\$\$base ;\\\n";
-    $tmp .= "\t  \$(INSTALL_DATA) \$(srcdir)/\$\$base \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/\$\$base ;\\\n";
-    $tmp .= "\tdone\n";
-    if ($appname eq 'common') {
-      $tmp .= "\t\@echo \"merging common and language specific dir\" ;\\\n";
-      $tmp .= "\tif test ! -f \$(kde_htmldir)/en/common/kde-common.css; then echo 'no english docs found in \$(kde_htmldir)/en/common/'; exit 1; fi \n";
-      $tmp .= "\t\@com_files=`cd \$(kde_htmldir)/en/common && echo *` ;\\\n";
-      $tmp .= "\tcd \$(DESTDIR)\$(kde_htmldir)/$kdelang/common ;\\\n";
-      $tmp .= "\tif test -n \"\$\$com_files\"; then for p in \$\$com_files ; do \\\n";
-      $tmp .= "\t  case \" $files \" in \\\n";
-      $tmp .= "\t    *\" \$\$p \"*) ;; \\\n";
-      $tmp .= "\t    *) test ! -f \$\$p && echo \$(LN_S) ../../en/common/\$\$p \$(DESTDIR)\$(kde_htmldir)/$kdelang/common/\$\$p && \$(LN_S) ../../en/common/\$\$p \$\$p ;; \\\n";
-      $tmp .= "\t  esac ; \\\n";
-      $tmp .= "\tdone ; fi ; true\n";
-    }
-    $tmp .= "\n";
-    $tmp .= "uninstall-nls:\n";
-    $tmp .= "\tfor base in $files; do \\\n";
-    $tmp .= "\t  rm -f \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/\$\$base ;\\\n";
-    $tmp .= "\tdone\n\n";
-    appendLines ($tmp);
-
-    $target_adds{"distdir"} .= "distdir-nls ";
-
-    $tmp = "distdir-nls:\n";
-    $tmp .= "\tfor file in $files; do \\\n";
-    $tmp .= "\t  cp \$(srcdir)/\$\$file \$(distdir); \\\n";
-    $tmp .= "\tdone\n";
-
-    appendLines ($tmp);
-
-    return 0;
-
-  nodocs:
-    appendLines("docs-am:\n");
-    return 1;
-}
-
-#-----------------------------------------------------------------------------
-# Find headers in any of the source directories specified previously, that
-# are candidates for "moc-ing".
-sub findMocCandidates ()
-{
-    foreach $dir (@headerdirs)
-    {
-        my @list = ();
-        opendir (SRCDIR, "$dir");
-        @hFiles = grep { /.+\.$hExt$/o && !/^\./ } readdir(SRCDIR);
-        closedir SRCDIR;
-        foreach $hf (@hFiles)
-        {
-            next if ($hf =~ /^\.\#/);
-	    $hf =~ /(.*)\.[^\.]*$/;          # Find name minus extension
-	    next if ($uiFiles{$1});
-            open (HFIN, "$dir/$hf") || die "Could not open $dir/$hf: $!\n";
-            my $hfsize = 0;
-            seek(HFIN, 0, 2);
-            $hfsize = tell(HFIN);
-            seek(HFIN, 0, 0);
-            read HFIN, $hfData, $hfsize;
-            close HFIN;
-            # push (@list, $hf) if(index($hfData, "Q_OBJECT") >= 0); ### fast but doesn't handle //Q_OBJECT
-            if ( $hfData =~ /{([^}]*)Q_OBJECT/s ) {              ## handle " { friend class blah; Q_OBJECT "
-                push (@list, $hf) unless $1 =~ m://[^\n]*Q_OBJECT[^\n]*$:s;  ## handle "// Q_OBJECT"
-            }
-        }
-        # The assoc array of root of headerfile and header filename
-        foreach $hFile (@list)
-        {
-            $hFile =~ /(.*)\.[^\.]*$/;          # Find name minus extension
-            if ($mocFiles{$1})
-            {
-              print STDERR "Warning: Multiple header files found for $1\n";
-              next;                           # Use the first one
-            }
-            $mocFiles{$1} = "$dir\035$hFile";   # Add relative dir
-        }
-    }
-
-    return 0;
-}
-
-#-----------------------------------------------------------------------------
-
-# The programmer has specified a moc list. Prune out the moc candidates
-# list that we found based on looking at the header files. This generates
-# a warning if the programmer gets the list wrong, but this doesn't have
-# to be fatal here.
-sub pruneMocCandidates ($)
-{
-    my %prunedMoc = ();
-    local @mocList = split(' ', $_[0]);
-
-    foreach $mocname (@mocList)
-    {
-        $mocname =~ s/\.moc$//;
-        if ($mocFiles{$mocname})
-        {
-            $prunedMoc{$mocname} = $mocFiles{$mocname};
-        }
-        else
-        {
-            my $print = $makefileDir;
-            $print =~ s/^\Q$topdir\E\\//;
-            # They specified a moc file but we can't find a header that
-            # will generate this moc file. That's possible fatal!
-            print STDERR "Warning: No moc-able header file for $print/$mocname\n";
-        }
-    }
-
-    undef %mocFiles;
-    %mocFiles = %prunedMoc;
-}
-
-#-----------------------------------------------------------------------------
-
-# Finds the cpp files (If they exist).
-# The cpp files get appended to the header file separated by \035
-sub checkMocCandidates ()
-{
-    my @cppFiles;
-    my $cpp2moc;  # which c++ file includes which .moc files
-    my $moc2cpp;  # which moc file is included by which c++ files
-
-    return unless (keys %mocFiles);
-    opendir(THISDIR, ".") || return;
-    @cppFiles = grep { /.+\.$cppExt$/o  && !/.+\.moc\.$cppExt$/o
-                         && !/.+\.all_$cppExt\.$cppExt$/o
-			 && !/^\./  } readdir(THISDIR);
-    closedir THISDIR;
-    return unless (@cppFiles);
-    my $files = join (" ", @cppFiles);
-    $cpp2moc = {};
-    $moc2cpp = {};
-    foreach $cxxf (@cppFiles)
-    {
-      open (CXXFIN, $cxxf) || die "Could not open $cxxf: $!\n";
-      seek(CXXFIN, 0, 2);
-      my $cxxfsize = tell(CXXFIN);
-      seek(CXXFIN, 0, 0);
-      read CXXFIN, $cxxfData, $cxxfsize;
-      close CXXFIN;
-      while(($cxxfData =~ m/^[ \t]*\#include\s*[<\"](.*\.moc)[>\"]/gm)) {
-	$cpp2moc->{$cxxf}->{$1} = 1;
-	$moc2cpp->{$1}->{$cxxf} = 1;
-      }
-    }
-    foreach my $mocFile (keys (%mocFiles))
-    {
-	@cppFiles = keys %{$moc2cpp->{"$mocFile.moc"}};
-        if (@cppFiles == 1) {
-            $mocFiles{$mocFile} .= "\035" . $cppFiles[0];
-	    push(@deped, $mocFile);
-        } elsif (@cppFiles == 0) {
-            push (@newObs, $mocFile);           # Produce new object file
-            next    if ($haveAutomocTag);       # This is expected...
-            # But this is an error we can deal with - let them know
-            print STDERR
-                "Warning: No c++ file that includes $mocFile.moc\n";
-        } else {
-            # We can't decide which file to use, so it's fatal. Although as a
-            # guess we could use the mocFile.cpp file if it's in the list???
-            print STDERR
-                "Error: Multiple c++ files that include $mocFile.moc\n";
-            print STDERR "\t",join ("\t", @cppFiles),"\n";
-            $errorflag = 1;
-            delete $mocFiles{$mocFile};
-            # Let's continue and see what happens - They have been told!
-        }
-    }
-}
-
-#-----------------------------------------------------------------------------
-
-# Add the rules for generating moc source from header files
-# For Automoc output *.moc.cpp but normally we'll output *.moc
-# (We must compile *.moc.cpp separately. *.moc files are included
-# in the appropriate *.cpp file by the programmer)
-sub addMocRules ()
-{
-    my $cppFile;
-    my $hFile;
-
-    foreach $mocFile (keys (%mocFiles))
-    {
-        undef $cppFile;
-        ($dir, $hFile, $cppFile) =  split ("\035", $mocFiles{$mocFile}, 3);
-        $dir =~ s#^\.#\$(srcdir)#;
-        if (defined ($cppFile))
-        {
-	  $cppFile =~ s,\.[^.]*$,,;
-	  $target_adds{"$cppFile.o"} .= "$mocFile.moc ";
-	  $target_adds{"$cppFile.lo"} .= "$mocFile.moc ";
-	  appendLines ("$mocFile.moc: $dir/$hFile\n\t\$(MOC) $dir/$hFile -o $mocFile.moc\n");
-	  $cleanMoc .= " $mocFile.moc";
-        }
-        else
-        {
-            appendLines ("$mocFile$mocExt: $dir/$hFile\n\t\$(MOC) $dir/$hFile -o $mocFile$mocExt\n");
-            $cleanMoc .= " $mocFile$mocExt";
-        }
-    }
-}
-
-sub make_meta_classes ()
-{
-    return if ($kdeopts{"qtonly"});
-
-    my $cppFile;
-    my $hFile;
-    my $moc_class_headers = "";
-    foreach $program (@programs) {
-	my $mocs = "";
-	my @progsources = split(/[\s\034]+/, $sources{$program});
-	my @depmocs = split(' ', $depedmocs{$program});
-	my %shash = (), %mhash = ();
-	@shash{@progsources} = 1;  # we are only interested in the existence
-	@mhash{@depmocs} = 1;
-
-	print STDOUT "program=$program\n" if ($verbose);
-	print STDOUT "psources=[".join(' ', keys %shash)."]\n" if ($verbose);
-	print STDOUT "depmocs=[".join(' ', keys %mhash)."]\n" if ($verbose);
-	print STDOUT "globalmocs=[".join(' ', keys(%globalmocs))."]\n" if ($verbose);
-	foreach my $mocFile (keys (%globalmocs))
-	{
-	    my ($dir, $hFile, $cppFile) = split ("\035", $globalmocs{$mocFile}, 3);
-	    if (defined ($cppFile))
-	    {
-		$mocs .= " $mocFile.moc" if exists $shash{$cppFile};
-	    }
-	    else
-	    {
-		# Bah. This is the case, if no C++ file includes the .moc
-		# file. We make a .moc.cpp file for that. Unfortunately this
-		# is not included in the %sources hash, but rather is mentioned
-		# in %depedmocs. If the user wants to use AUTO he can't just
-		# use an unspecific METAINCLUDES. Instead he must use
-		# program_METAINCLUDES. Anyway, it's not working real nicely.
-		# E.g. Its not clear what happens if user specifies two
-		# METAINCLUDES=AUTO in the same Makefile.am.
-		$mocs .= " $mocFile.moc.$cxxsuffix"
-		    if exists $mhash{$mocFile.".moc.$cxxsuffix"};
-	    }
-	}
-	if ($mocs) {
-	    print STDOUT "==> mocs=[".$mocs."]\n" if ($verbose);
-	}
-	print STDOUT "\n" if $verbose;
-    }
-    if ($moc_class_headers) {
-        appendLines ("$cleantarget-moc-classes:\n\t-rm -f $moc_class_headers\n");
-        $target_adds{"$cleantarget-am"} .= "$cleantarget-moc-classes ";
-    }
-}
-
-#-----------------------------------------------------------------------------
-
-sub updateMakefile ()
-{
-    return if ($dryrun);
-
-    open (FILEOUT, "> $makefile")
-                        || die "Could not create $makefile: $!\n";
-
-    $MakefileData =~ s/\034/\\\n/g;    # Restore continuation lines
-    # Append our $progId line, _below_ the "generated by automake" line
-    # because automake-1.6 relies on the first line to be his own.
-    my $progIdLine = "\# $progId - " . '$Revision: 1.349.2.2 $ '."\n";
-    if ( !( $MakefileData =~ s/^(.*generated .*by automake.*\n)/$1$progIdLine/ ) ) {
-        warn "automake line not found in $makefile\n";
-	# Fallback: first line
-        print FILEOUT $progIdLine;
-    };
-    print FILEOUT $MakefileData;
-    close FILEOUT;
-}
-
-#-----------------------------------------------------------------------------
-
-# The given line needs to be removed from the makefile
-# Do this by adding the special "removed line" comment at the line start.
-sub removeLine ($$)
-{
-    my ($lookup, $old) = @_;
-
-    $old =~ s/\034/\\\n#>- /g;          # Fix continuation lines
-    $MakefileData =~ s/\n$lookup/\n#>\- $old/;
-}
-
-#-----------------------------------------------------------------------------
-
-# Replaces the old line with the new line
-# old line(s) are retained but tagged as removed. The new line(s) have the
-# "added" tag placed before it.
-sub substituteLine ($$)
-{
-    my ($lookup, $new) = @_;
-
-    if ($MakefileData =~ /\n($lookup)/) {
-      $old = $1;
-      $old =~ s/\034/\\\n#>\- /g;         # Fix continuation lines
-      $new =~ s/\034/\\\n/g;
-      my $newCount = ($new =~ tr/\n//) + 1;
-      $MakefileData =~ s/\n$lookup/\n#>- $old\n#>\+ $newCount\n$new/;
-    } else {
-      print STDERR "Warning: substitution of \"$lookup\" in $printname failed\n";
-    }
-}
-
-#-----------------------------------------------------------------------------
-
-# Slap new lines on the back of the file.
-sub appendLines ($)
-{
-  my ($new) = @_;
-  $new =~ s/\034/\\\n/g;        # Fix continuation lines
-  my $newCount = ($new =~ tr/\n//) + 1;
-  $MakefileData .= "\n#>\+ $newCount\n$new";
-}
-
-#-----------------------------------------------------------------------------
-
-# Restore the Makefile.in to the state it was before we fiddled with it
-sub restoreMakefile ()
-{
-    $MakefileData =~ s/# $progId[^\n\034]*[\n\034]*//g;
-    # Restore removed lines
-    $MakefileData =~ s/([\n\034])#>\- /$1/g;
-    # Remove added lines
-    while ($MakefileData =~ /[\n\034]#>\+ ([^\n\034]*)/)
-    {
-        my $newCount = $1;
-        my $removeLines = "";
-        while ($newCount--) {
-            $removeLines .= "[^\n\034]*([\n\034]|)";
-        }
-        $MakefileData =~ s/[\n\034]#>\+.*[\n\034]$removeLines/\n/;
-    }
-}
-
-#-----------------------------------------------------------------------------
diff --git a/admin/compile b/admin/compile
deleted file mode 100755
index 9bb997a..0000000
--- a/admin/compile
+++ /dev/null
@@ -1,99 +0,0 @@
-#! /bin/sh
-
-# Wrapper for compilers which do not understand `-c -o'.
-
-# Copyright 1999, 2000 Free Software Foundation, Inc.
-# Written by Tom Tromey <tromey at cygnus.com>.
-#
-# 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# 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.
-
-# 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.
-
-prog=$1
-shift
-
-ofile=
-cfile=
-args=
-while test $# -gt 0; do
-   case "$1" 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 "$ofile" in
-	*.o | *.obj)
-	   ;;
-	*)
-	   args="$args -o $ofile"
-	   ofile=
-	   ;;
-       esac
-       ;;
-    *.c)
-       cfile=$1
-       args="$args $1"
-       ;;
-    *)
-       args="$args $1"
-       ;;
-   esac
-   shift
-done
-
-if test -z "$ofile" || test -z "$cfile"; 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 "$prog" $args
-fi
-
-# Name of file we expect compiler to create.
-cofile=`echo $cfile | 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
-while true; do
-   if mkdir $lockdir > /dev/null 2>&1; then
-      break
-   fi
-   sleep 1
-done
-# FIXME: race condition here if user kills between mkdir and trap.
-trap "rmdir $lockdir; exit 1" 1 2 15
-
-# Run the compile.
-"$prog" $args
-status=$?
-
-if test -f "$cofile"; then
-   mv "$cofile" "$ofile"
-fi
-
-rmdir $lockdir
-exit $status
diff --git a/admin/conf.change.pl b/admin/conf.change.pl
deleted file mode 100644
index bb7dcc1..0000000
--- a/admin/conf.change.pl
+++ /dev/null
@@ -1,177 +0,0 @@
-#!/usr/bin/perl -w
-
-# this script patches a config.status file, to use our own perl script
-# in the main loop
-# we do it this way to circumvent hacking (and thereby including)
-# autoconf function (which are GPL) into our LGPL acinclude.m4.in
-# written by Michael Matz <matz at kde.org>
-# adapted by Dirk Mueller <mueller at kde.org>
-#
-#   This file is free software; you can redistribute it and/or
-#   modify it under the terms of the GNU Library General Public
-#   License as published by the Free Software Foundation; either
-#   version 2 of the License, or (at your option) any later version.
-
-#   This library is distributed in the hope that it will be useful,
-#   but WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#   Library General Public License for more details.
-
-#   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.
-
-# we have to change two places
-# 1. the splitting of the substitutions into chunks of 90 (or even 48 in
-#    later autoconf's
-# 2. the big main loop which patches all Makefile.in's
-
-use File::Basename;
-
-my $ac_aux_dir = dirname($0);
-my ($flag);
-local $ac_version = 0;
-my $vpath_seen = 0;
-$flag = 0;
-
-while (<>) {
-# usage of $flag: 0 -- we have seen nothing yet
-#   1 -- we are in (1)
-#   2 -- we have ended (1)
-#   3 -- we are in (2)
-#   4 -- we ended (2)
-
-    if ($flag == 4) {
-        print;
-    } elsif ($flag == 0) {
-# 1. begins with (including): "ac_max_sed_\S+\s*=\s*[0-9]+..."
-#    ends with (excluding) "CONFIG_FILE=..."
-#    in later autoconf (2.14.1) there is no CONFIG_FILES= line,
-#    but instead the (2) directly follow (1)
-        if (/^\s*ac_max_sed_([a-z]+).*=\s*([0-9]+)/ ) {
-	    $flag = 1;
-	    if ($1 eq 'lines') {
-                # lets hope its different with 2141, 
-                # wasn't able to verify that
-              if ($2 eq '48') {
-                $ac_version = 250;
-              }
-              else {
-	        $ac_version = 2141;
-              }
-	    } elsif ($1 eq 'cmds') {
-	        $ac_version = 213;
-	    }
-	    # hmm, we don't know the autoconf version, but we try anyway
-	} else {
-	    print;
-	}
-    } elsif ($flag == 1) {
-        if (/^\s*CONFIG_FILES=/ && ($ac_version != 250)) {
-	     print;
-	     $flag = 2;
-	} elsif (/^\s*for\s+ac_file\s+in\s+.*CONFIG_FILES/ ) {
-	     $flag = 3;
-	}
-    } elsif ($flag == 2) {
-# 2. begins with: "for ac_file in.*CONFIG_FILES"  (the next 'for' after (1))
-#    end with: "rm -f conftest.s\*"
-# on autoconf 250, it ends with '# CONFIG_HEADER section'
-	if (/^\s*for\s+ac_file\s+in\s+.*CONFIG_FILES/ ) {
-	    $flag = 3;
-	} else {
-	    print;
-	}
-    } elsif ($flag == 3) {
-        if (/^\s*rm\s+-f\s+conftest/ ) {
-	    $flag = 4;
-	    &insert_main_loop();
-	} elsif (/^\s*rm\s+-f\s+.*ac_cs_root/ ) {
-	    $flag = 4;
-	    &insert_main_loop();
-	    #die "hhhhhhh";
-	    if ($ac_version != 2141) {
-	        print STDERR "hmm, don't know autoconf version\n";
-	    }
-        } elsif (/^\#\s*CONFIG_HEADER section.*/) {
-          $flag = 4;
-          &insert_main_loop();
-          if($ac_version != 250) {
-            print STDERR "hmm, something went wrong :-(\n";
-          }
-	} elsif (/VPATH/ ) {
-	    $vpath_seen = 1;
-	}
-    }
-}
-
-die "wrong input (flag != 4)" unless $flag == 4;
-print STDERR "hmm, don't know autoconf version\n" unless $ac_version;
-
-sub insert_main_loop {
-
-  if ($ac_version == 250) {
-    &insert_main_loop_250();
-  }
-  else {
-    &insert_main_loop_213();
-  }
-}
-
-sub insert_main_loop_250 {
-
-  print <<EOF;
-  #echo Doing the fast build of Makefiles -- autoconf $ac_version
-EOF
-    if ($vpath_seen) {
-        print <<EOF;
-        # VPATH subst was seen in original config.status main loop
-  echo '/^[ 	]*VPATH[ 	]*=[^:]*\$/d' >>\$tmp/subs.sed
-EOF
-      }
-  print <<EOF;
-  rm -f \$tmp/subs.files
-  for ac_file in .. \$CONFIG_FILES ; do
-      if test "x\$ac_file" != x..; then
-          echo \$ac_file >> \$tmp/subs.files
-      fi
-  done
-  if test -f \$tmp/subs.files ; then
-      perl $ac_aux_dir/config.pl "\$tmp/subs.sed" "\$tmp/subs.files" "\$srcdir" "\$INSTALL"
-  fi
-  rm -f \$tmp/subs.files
-
-fi
-EOF
-  return;
-}
-
-sub insert_main_loop_213 {
-    print <<EOF;
-#echo Doing the fast build of Makefiles -- autoconf $ac_version
-if test "x\$ac_cs_root" = "x" ; then
-    ac_cs_root=conftest
-fi
-EOF
-    if ($vpath_seen) {
-      print <<EOF;
-# VPATH subst was seen in original config.status main loop
-echo '/^[ 	]*VPATH[ 	]*=[^:]*\$/d' >> \$ac_cs_root.subs
-EOF
-    }
-    print <<EOF;
-rm -f \$ac_cs_root.sacfiles
-for ac_file in .. \$CONFIG_FILES ; do
-    if test "x\$ac_file" != x..; then
-        echo \$ac_file >> \$ac_cs_root.sacfiles
-    fi
-done
-if test -f \$ac_cs_root.sacfiles ; then
-    perl $ac_aux_dir/config.pl "\$ac_cs_root.subs" "\$ac_cs_root.sacfiles" "\$ac_given_srcdir" "\$ac_given_INSTALL"
-fi
-rm -f \$ac_cs_root.s*
-
-EOF
-    return;
-}
diff --git a/admin/config.pl b/admin/config.pl
deleted file mode 100644
index 1af1cf2..0000000
--- a/admin/config.pl
+++ /dev/null
@@ -1,235 +0,0 @@
-#!/usr/bin/perl
-# a script for use by autoconf to make the Makefiles
-# from the Makefile.in's
-#
-# the original autoconf mechanism first splits all substitutions into groups
-# of ca. 90, and than invokes sed for _every_ Makefile.in and every group
-# (so around 2-3 times per Makefile.in). So this takes forever, as sed
-# has to recompile the regexps every time.
-#
-# this script does better. It changes all Makefile.ins in one process.
-# in kdelibs the time for building Makefile went down from 2:59 min to 13 sec!
-#
-# written by Michael Matz <matz at kde.org>
-# adapted by Dirk Mueller <mueller at kde.org>
-
-#   This file is free software; you can redistribute it and/or
-#   modify it under the terms of the GNU Library General Public
-#   License as published by the Free Software Foundation; either
-#   version 2 of the License, or (at your option) any later version.
-
-#   This library is distributed in the hope that it will be useful,
-#   but WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#   Library General Public License for more details.
-
-#   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.
-
-my $ac_subs=$ARGV[0];
-my $ac_sacfiles = $ARGV[1];
-my $ac_given_srcdir=$ARGV[2];
-my $ac_given_INSTALL=$ARGV[3];
-
-#print "ac_subs=$ac_subs\n";
-#print "ac_sacfiles=$ac_sacfiles\n";
-#print "ac_given_srcdir=$ac_given_srcdir\n";
-#print "ac_given_INSTALL=$ac_given_INSTALL\n";
-
-my ($srcdir, $top_srcdir);
-my $INSTALL;
-my $bad_perl = ($] < 5.005);
-
-open(CF, "< $ac_subs") || die "can't open $ac_subs: $!";
-my @subs = <CF>;
-close(CF);
-chomp @subs;
- at comp_match=();
- at comp_subs=();
-
-if ($bad_perl) {
-    print "Using perl older than version 5.005\n";
-    foreach my $pat (@subs) {
-	if (  ($pat =~ m/s%([^%]*)%([^%]*)%g/ )
-	   || ($pat =~ m/s%([^%]*)%([^%]*)%;t/ )
-           || ($pat =~ m/s,([^,]*),(.*),;t/)
-	   || ($pat =~ m%s/([^/]*)/([^/]*)/g% )
-	   || ($pat =~ m%s/([^/]*)/([^/]*)/;t% )
-	   ) {
-            # form : s%bla%blubb%g
-            # or     s%bla%blubb%;t t   (autoconf > 2.13 and < 2.52 ?)
-            # or     s,bla,blubb,;t t   (autoconf 2.52)
-            my $srch = $1;
-            my $repl = $2;
-            $repl =~ s/\\(.)/$1/g;
-	    push @comp_subs, make_closure($srch, $repl);
-
-	} elsif ( ($pat =~ /%([^%]*)%d/ )
-	   || ($pat =~ m%/([^/]*)/d% )
-	   ) {
-	    push @comp_subs, make_closure($1, "");
-	} else {
-	    die "Uhh. Malformed pattern in $ac_subs ($pat)"
-		unless ( $pat =~ /^\s*$/ );   # ignore white lines
-	}
-    }
-} else {
-    foreach my $pat (@subs) {
-       if ( ($pat =~ /s%([^%]*)%([^%]*)%g/ ) ||
-            ($pat =~ /s%([^%]*)%([^%]*)%;t/ ) ||
-            ($pat =~ /s,([^,]*),(.*),;t/) ) {
-         # form : s%bla%blubb%g
-         # or     s%bla%blubb%;t t   (autoconf > 2.13 and < 2.52 ?)
-         # or     s,bla,blubb,;t t   (autoconf 2.52)
-         my $srch = $1;
-         my $repl = $2;
-         push @comp_match, eval "qr/\Q$srch\E/";  # compile match pattern
-         $repl =~ s/\\(.)/$1/g;
-         push @comp_subs, $repl;
-      } elsif ( ($pat =~ /%([^%]*)%d/ )
-                || ($pat =~ m%/([^/]*)/d% )
-              ) {
-        push @comp_match, eval "qr/\Q$1\E/";
-        push @comp_subs, "";
-      } else {
-          die "Uhh. Malformed pattern in $ac_cs_root.subs ($pat)"
-          unless ( $pat =~ /^\s*$/ );   # ignore white lines
-      }
-    }
-}
-undef @subs;
-
-# read the list of files to be patched, form:
-# ./Makefile arts/Makefile arts/examples/Makefile arts/flow/Makefile
-
-open(CF, "< $ac_sacfiles") || die "can't open $ac_sacfiles: $!";
-my @ac_files = <CF>;
-close(CF);
-chomp @ac_files;
-
-
-my $ac_file;
-foreach $ac_file (@ac_files) {
-    next if $ac_file =~ /\.\./;
-    next if $ac_file =~ /^\s*$/;
-    my $ac_file_in;
-    my ($ac_dir, $ac_dots, $ac_dir_suffix);
-
-    if ($ac_file =~ /.*:.*/ ) {
-	($ac_file_in = $ac_file) =~ s%[^:]*:%%;
-	$ac_file =~ s%:.*%%;
-    } else {
-	$ac_file_in = $ac_file.".in";
-    }
-
-# Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
-# Remove last slash and all that follows it.  Not all systems have dirname.
-    ($ac_dir = $ac_file) =~ s%/[^/][^/]*$%%;
-    if ( ($ac_dir ne $ac_file) && ($ac_dir ne ".")) {
-# The file is in a subdirectory.
-	if (! -d "$ac_dir") { mkdir "$ac_dir", 0777; }
-	($ac_dir_suffix = $ac_dir) =~ s%^./%%;
-	$ac_dir_suffix="/".$ac_dir_suffix;
-# A "../" for each directory in $ac_dir_suffix.
-	($ac_dots = $ac_dir_suffix) =~ s%/[^/]*%../%g;
-    } else {
-	$ac_dir_suffix="";
-	$ac_dots="";
-    }
-
-    if ($ac_given_srcdir eq ".") {
-	$srcdir=".";
-	if ($ac_dots) {
-	    ( $top_srcdir = $ac_dots) =~ s%/$%%;
-	} else { $top_srcdir="."; }
-    } elsif ($ac_given_srcdir =~ m%^/%) {
-	$srcdir=$ac_given_srcdir.$ac_dir_suffix;
-	$top_srcdir = $ac_given_srcdir;
-    } else {
-	$srcdir = $ac_dots.$ac_given_srcdir.$ac_dir_suffix;
-	$top_srcdir = $ac_dots.$ac_given_srcdir;
-    }
-
-    if ($ac_given_INSTALL) {
-	if ($ac_given_INSTALL =~ m%^/% ) {
-	    $INSTALL = $ac_given_INSTALL;
-	} else {
-	    $INSTALL = $ac_dots.$ac_given_INSTALL;
-	}
-    }
-
-    print "fast creating $ac_file\n";
-    unlink $ac_file;
-    my $ac_comsub="";
-    my $fname=$ac_file_in;
-    $fname =~ s%.*/%%;
-    my $configure_input="Generated automatically from $fname by config.pl.";
-    if ($ac_file =~ /.*[Mm]akefile.*/) {
-	$ac_comsub="# ".$configure_input."\n";  # for the first line in $ac_file
-    }
-
-    my $ac_file_inputs;
-    ($ac_file_inputs = $ac_file_in) =~ s%^%$ac_given_srcdir/%;
-    $ac_file_inputs =~ s%:% $ac_given_srcdir/%g;
-
-    patch_file($ac_file, $ac_file_inputs, $ac_comsub);
-}
-
-sub patch_file {
-    my ($outf, $infiles, $identline) = @_;
-    my $filedata;
-    my @infiles=split(' ', $infiles);
-    my $i=0;
-
-    foreach my $name (@infiles) {
-	if (open(CF, "< $name")) {
-	    while (<CF>) {
-		$filedata .= $_;
-	    }
-	    close(CF);
-	} else {
-	    print STDERR "can't open $name: $!"."\n";
-	}
-    }
-    if ($identline) {
-	# Put the ident in the second line.  For shitty automake 1.6x.
-	$filedata =~ s%\n%\n$identline%;
-    }
-
-    $filedata =~ s%\@configure_input\@%$configure_input%g;
-    $filedata =~ s%\@srcdir\@%$srcdir%g;
-    $filedata =~ s%\@top_srcdir\@%$top_srcdir%g;
-    $filedata =~ s%\@INSTALL\@%$INSTALL%g;
-
-    if ($bad_perl) {
-	while ($i <= $#comp_subs) {
-	    my $ref = $comp_subs[$i];
-	    &$ref(\$filedata);
-	    $i++;
-	}
-    } else {
-	while ($i <= $#comp_match) {
-	    $filedata =~ s/$comp_match[$i]/$comp_subs[$i]/g;
-	    $i++;
-	}
-    }
-    open(CF, "> $outf") || die "can't create $outf: $!";
-    print CF $filedata;
-    close(CF);
-}
-
-sub make_closure {
-    my ($pat, $sub) = @_;
-    $pat =~ s/\@/\\@/g;   # @bla@ -> \@bla\@
-    $pat =~ s/\$/\\\$/g;  # $bla -> \$bla
-    $sub =~ s/\@/\\@/g;
-    $sub =~ s/\$/\\\$/g;
-    my $ret = eval "return sub { my \$ref=shift; \$\$ref =~ s%$pat%$sub%g; }";
-    if ($@) {
-        print "can't create CODE: $@\n";
-    }
-    return $ret;
-}
diff --git a/admin/configure.in.bot.end b/admin/configure.in.bot.end
deleted file mode 100644
index fb483b6..0000000
--- a/admin/configure.in.bot.end
+++ /dev/null
@@ -1,12 +0,0 @@
-if test "$all_tests" = "bad"; then
-  if test ! "$cache_file" = "/dev/null"; then
-    echo ""    
-    echo "Please remove the file $cache_file after changing your setup"
-    echo "so that configure will find the changes next time."
-    echo ""
-  fi
-else
-  echo ""
-  echo "Good - your configure finished. Start make now"
-  echo ""
-fi
diff --git a/admin/configure.in.min b/admin/configure.in.min
deleted file mode 100644
index 7c7e25a..0000000
--- a/admin/configure.in.min
+++ /dev/null
@@ -1,57 +0,0 @@
-dnl    This file is part of the KDE libraries/packages
-dnl    Copyright (C) 2001 Stephan Kulow (coolo at kde.org)
- 
-dnl    This file is free software; you can redistribute it and/or
-dnl    modify it under the terms of the GNU Library General Public
-dnl    License as published by the Free Software Foundation; either
-dnl    version 2 of the License, or (at your option) any later version.
- 
-dnl    This library is distributed in the hope that it will be useful,
-dnl    but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-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.
-
-# Original Author was Kalle at kde.org
-# I lifted it in some mater. (Stephan Kulow)
-# I used much code from Janos Farkas
-
-dnl Process this file with autoconf to produce a configure script.
-
-AC_INIT(acinclude.m4) dnl a source file from your sub dir
-
-dnl This is so we can use kde-common
-AC_CONFIG_AUX_DIR(admin)
-
-dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
-unset CDPATH
-
-dnl Checking host/target/build systems, for make, install etc.
-AC_CANONICAL_SYSTEM 
-dnl Perform program name transformation
-AC_ARG_PROGRAM
-
-dnl Automake doc recommends to do this only here. (Janos)
-AM_INIT_AUTOMAKE(@MODULENAME@, @VERSION@) dnl searches for some needed programs
-
-KDE_SET_PREFIX
-
-dnl generate the config header
-AM_CONFIG_HEADER(config.h) dnl at the distribution this done
-
-dnl Checks for programs.
-AC_CHECK_COMPILERS
-AC_ENABLE_SHARED(yes)
-AC_ENABLE_STATIC(no)
-KDE_PROG_LIBTOOL
-
-dnl for NLS support. Call them in this order!
-dnl WITH_NLS is for the po files
-AM_KDE_WITH_NLS
-
-dnl KDE_USE_QT
-AC_PATH_KDE
diff --git a/admin/cvs-clean.pl b/admin/cvs-clean.pl
deleted file mode 100644
index 669dbdc..0000000
--- a/admin/cvs-clean.pl
+++ /dev/null
@@ -1,87 +0,0 @@
-#! /usr/bin/perl
-
-#
-# This script recursively (beginning with the current directory)
-# wipes out everything not registered in CVS.
-#
-# written by Oswald Buddenhagen <ossi at kde.org>
-#  inspired by the "old" cvs-clean target from Makefile.common
-#
-# This file is free software in terms of the BSD licence. That means
-# that you can do anything with it except removing this license or
-# the above copyright notice. There is NO WARRANTY of any kind.
-#
-
-sub rmrf()
-{
-  my $fn = shift;
-  lstat ($fn);
-  if (-d _) {
-    if (opendir (DIR, $fn)) {
-      for my $efn (grep (!/^\.\.?$/, readdir (DIR))) {
-	&rmrf ($fn."/".$efn);
-      }
-      closedir (DIR);
-      rmdir ($fn);
-    }
-  } else {
-    unlink ($fn);
-  }
-}
-
-sub newfiles()
-{
-  my ($indir, $incvs) = @_;
-  for my $n (keys (%$incvs)) { delete $$indir{$n} }
-  return sort (keys (%$indir));
-}
-
-sub cvsclean()
-{
-  my $dir = shift;
-  my (%dirsdir, %filesdir, %dirscvs, %filescvs);
-  my $dnam = $dir ? $dir : ".";
-  if (!opendir (DIR, $dnam)) {
-    print STDERR "Cannot enter \"".$dnam."\".\n";
-    return;
-  }
-  for my $fn (grep (!/^\.\.?$/, readdir (DIR))) {
-    if (-d $dir.$fn) {
-      $fn eq "CVS" or $dirsdir{$fn} = 1;
-    } else {
-      $filesdir{$fn} = 1;
-    }
-  }
-  closedir (DIR);
-  if (!open (FILE, "<".$dir."CVS/Entries")) {
-    print STDERR "No CVS information in \"".$dnam."\".\n";
-    return;
-  }
-  while (<FILE>) {
-    m%^D/([^/]+)/.*$% and $dirscvs{$1} = 1;
-    m%^/([^/]+)/.*$% and $filescvs{$1} = 1;
-  }
-  close (FILE);
-  if (open (FILE, "<".$dir."CVS/Entries.Log")) {
-    while (<FILE>) {
-      m%^A D/([^/]+)/.*$% and $dirscvs{$1} = 1;
-      m%^A /([^/]+)/.*$% and $filescvs{$1} = 1;
-      m%^R D/([^/]+)/.*$% and delete $dirscvs{$1};
-      m%^R /([^/]+)/.*$% and delete $filescvs{$1};
-    }
-    close (FILE);
-  }
-  for my $fn (&newfiles (\%filesdir, \%filescvs)) {
-    print ("F ".$dir.$fn."\n");
-    &rmrf ($dir.$fn);
-  }
-  for my $fn (&newfiles (\%dirsdir, \%dirscvs)) {
-    print ("D ".$dir.$fn."\n");
-    &rmrf ($dir.$fn);
-  }
-  for my $fn (sort (keys (%dirscvs))) {
-    &cvsclean ($dir.$fn."/");
-  }
-}
-
-&cvsclean ("");
diff --git a/admin/cvs.sh b/admin/cvs.sh
deleted file mode 100644
index 99569f4..0000000
--- a/admin/cvs.sh
+++ /dev/null
@@ -1,499 +0,0 @@
-#! /bin/sh
-#
-# cvs.sh
-#
-# This file contains support code from Makefile.common
-# It defines a shell function for each known target
-# and then does a case to call the correct function.
-
-call_and_fix_autoconf()
-{
-  $AUTOCONF || exit 1
-  if test -r configure.in.in ; then
-    perl -pi -e "print \"if test \\\"x\\\$with_fast_perl\\\" = \\\"xyes\\\"; then\
-    \\n  perl -i.bak \\\$ac_aux_dir/conf.change.pl \\\$CONFIG_STATUS\
-    \\\\\\n    || mv \\\$CONFIG_STATUS.bak \\\$CONFIG_STATUS\
-    \\n  rm -f \\\$CONFIG_STATUS.bak\\nfi\
-    \\n\" if /^\\s*chmod\\s+.*\\+x\\s+.*CONFIG_STATUS/;" configure
-  fi
-}
-
-strip_makefile()
-{
-  if test -f $makefile_wo; then :; else
-    perl -e '$in=0; while ( <> ) { $in = 1 if ($_=~ m/^if /); print $_ unless ($in); $in = 0 if ($_ =~ m/^endif/); }' < Makefile.am.in > $makefile_wo
-  fi
-}
-
-check_autotool_versions()
-{
-AUTOCONF_VERSION=`$AUTOCONF --version | head -1`
-case $AUTOCONF_VERSION in
-  Autoconf*2.5* | autoconf*2.5* ) : ;;
-  "" )
-    echo "*** AUTOCONF NOT FOUND!."
-    echo "*** KDE requires autoconf 2.52, 2.53 or 2.54"
-    exit 1
-    ;;
-  * )
-    echo "*** YOU'RE USING $AUTOCONF_VERSION."
-    echo "*** KDE requires autoconf 2.52, 2.53 or 2.54"
-    exit 1
-    ;;
-esac
- 
-AUTOHEADER_VERSION=`$AUTOHEADER --version | head -1`
-case $AUTOHEADER_VERSION in
-  Autoconf*2.5* | autoheader*2.5* ) : ;;
-  "" )
-    echo "*** AUTOHEADER NOT FOUND!."
-    echo "*** KDE requires autoheader 2.52 or 2.53 (part of autoconf)"
-    exit 1
-    ;;
-  * )
-    echo "*** YOU'RE USING $AUTOHEADER_VERSION."
-    echo "*** KDE requires autoheader 2.52 or 2.53 (part of autoconf)"
-    exit 1
-    ;;
-esac
-
-AUTOMAKE_STRING=`$AUTOMAKE --version | head -1`
-case $AUTOMAKE_STRING in
-  automake*1.5d* )
-    echo "*** YOU'RE USING $AUTOMAKE_STRING."
-    echo "*** KDE requires automake 1.5"
-    exit 1
-    ;;
-  automake*1.5* | automake*1.5-* | automake*1.6.* | automake*1.7* ) : ;;
-  "" )
-    echo "*** AUTOMAKE NOT FOUND!."
-    echo "*** KDE requires automake 1.5"
-    exit 1
-    ;;
-  unsermake* ) :
-    echo "*** YOU'RE USING UNSERMAKE."
-    echo "*** GOOD LUCK!! :)"
-    ;;
-  * )
-    echo "*** YOU'RE USING $AUTOMAKE_STRING."
-    echo "*** KDE requires automake 1.5"
-    exit 1
-    ;;
-esac
-}
-
-cvs()
-{
-check_autotool_versions
- 
-### Produce acinclude.m4
-if grep '\$(top_srcdir)/acinclude.m4:' $makefile_am >/dev/null; then
-  echo "*** Creating acinclude.m4"
-  rm -f acinclude.m4 configure.files
-  
-  strip_makefile
-  $MAKE -f $makefile_wo top_srcdir=. ./acinclude.m4
-fi
-
-### Make new subdirs and configure.in.
-### The make calls could be optimized away here,
-### with a little thought.
-if test -r configure.in.in; then
-  rm -f subdirs configure.in
-  echo "*** Creating list of subdirectories"
-  subdirs
-  echo "*** Creating configure.in"
-  configure_files
-  strip_makefile
-  $MAKE -f $makefile_wo top_srcdir=. ./configure.in || exit 1
-fi
-
-echo "*** Creating aclocal.m4"
-$ACLOCAL || exit 1
-echo "*** Creating configure"
-call_and_fix_autoconf
-
-if egrep "^AM_CONFIG_HEADER" configure.in >/dev/null 2>&1; then
-  echo "*** Creating config.h template"
-  $AUTOHEADER || exit 1
-fi
-
-echo "*** Creating Makefile templates"
-$AUTOMAKE || exit 1
-if test -z "$UNSERMAKE"; then
-  echo "*** Postprocessing Makefile templates"
-  perl -w admin/am_edit || exit 1
-fi
-
-if egrep "^cvs-local:" $makefile_am >/dev/null; then \
-  strip_makefile
-  $MAKE -f $makefile_wo cvs-local top_srcdir=. || exit 1
-fi
-
-echo "*** Creating date/time stamp"
-touch stamp-h.in
-
-echo "*** Finished"
-echo "    Don't forget to run ./configure"
-echo "    If you haven't done so in a while, run ./configure --help"
-}
-
-dist()
-{
-check_autotool_versions
-
-###
-### First build all of the files necessary to do just "make"
-###
-if grep '\$(top_srcdir)/acinclude.m4:' $makefile_am >/dev/null; then
-  strip_makefile
-  $MAKE -f $makefile_wo top_srcdir=. ./acinclude.m4
-fi
-if test -r configure.in.in; then
-  subdirs
-  configure_files
-  strip_makefile
-  $MAKE -f $makefile_wo top_srcdir=. ./configure.in
-fi
-$ACLOCAL
-$AUTOHEADER
-$AUTOMAKE --foreign --include-deps
-perl -w admin/am_edit
-call_and_fix_autoconf
-touch stamp-h.in
-if grep "^cvs-local:" $makefile_am >/dev/null; then
-  strip_makefile
-  $MAKE -f $makefile_wo cvs-local top_srcdir=.
-fi
-
-###
-### Then make messages
-###
-if test -d po; then
- LIST=`find ./po -name "*.po"`
- for i in $LIST; do
-  file2=`echo $i | sed -e "s#\.po#\.gmo#"`
-  msgfmt -o $file2 $i || touch $file2
- done
-fi
-if grep "^cvs-dist-local:" $makefile_am >/dev/null; then
-  strip_makefile
-  $MAKE -f $makefile_wo cvs-dist-local top_srcdir=.
-fi
-}
-
-subdir_dist()
-{
-$ACLOCAL
-$AUTOHEADER
-$AUTOMAKE --foreign --include-deps
-perl -w ../admin/am_edit
-call_and_fix_autoconf
-}
-
-configure_in()
-{
-rm -f configure.in configure.in.new
-kde_use_qt_param=
-test -f configure.files || { echo "need configure.files for configure.in"; exit 1; }
-cat `egrep -v "configure.in.bot" < configure.files` > configure.in.new
-echo "KDE_CREATE_SUBDIRSLIST" >> configure.in.new
-if test -f Makefile.am.in; then
-  subdirs=`cat subdirs`
-  for dir in $subdirs; do
-    dir=`echo $dir | sed -e "s,[-+.],_,g"`
-    echo "AM_CONDITIONAL($dir""_SUBDIR_included, test \"x\$$dir""_SUBDIR_included\" = xyes)" >> configure.in.new
-  done
-fi
-# echo "AC_OUTPUT( \\" >> configure.in.new
-mfs=`find . -type d -print | fgrep -v "/." | \
-     sed -e "s#\./##" -e "/^debian/d" | sort`
-for i in $mfs; do
-  topleveldir=`echo $i| sed -e "s#/.*##"`
-  if test -f $topleveldir/configure.in; then
-	continue
-  fi
-  if test -f $i/Makefile.am; then :; else
-	continue
-  fi
-  if test -s inst-apps; then
-    if grep "\"^$topleveldir\"" inst-apps > /dev/null 2>&1; then
-	continue
-    fi
-  fi
-  if test "$i" = "."; then
-     echo "AC_CONFIG_FILES([ Makefile ])" >> configure.in.new
-  else
-     echo "AC_CONFIG_FILES([ $i/Makefile ])" >> configure.in.new
-  fi
-  if test -n "$UNSERMAKE"; then
-      if test "$i" = "."; then
-        echo "AC_CONFIG_FILES([ Makefile.rules ])" >> configure.in.new
-      else
-        echo "AC_CONFIG_FILES([ $i/Makefile.rules ])" >> configure.in.new
-      fi
-  fi
-done
-
-files=`cat configure.files`
-list=`egrep '^dnl AC_OUTPUT\(.*\)' $files | sed -e "s#^.*dnl AC_OUTPUT(\(.*\))#\1#"`
-for file in $list; do 
-    echo "AC_CONFIG_FILES([ $file ])" >>  configure.in.new
-done
-
-if test -n "$UNSERMAKE"; then
-  echo "AC_CONFIG_FILES([ MakeVars ])" >> configure.in.new
-fi
-echo "AC_OUTPUT" >> configure.in.new
-modulename=
-if test -f configure.in.in; then
-   if head -2 configure.in.in | egrep "^#MIN_CONFIG\(.*\)$" > /dev/null; then
-      kde_use_qt_param=`cat configure.in.in | sed -n -e "s/#MIN_CONFIG(\(.*\))/\1/p"`
-   fi
-   if head -2 configure.in.in | egrep "^#MIN_CONFIG" > /dev/null; then
-      line=`grep "^AM_INIT_AUTOMAKE(" configure.in.in`
-      if test -n "$line"; then
-	  modulename=`echo $line | sed -e "s#AM_INIT_AUTOMAKE(\([^,]*\),.*#\1#"`
-	  VERSION=`echo $line | sed -e "s#AM_INIT_AUTOMAKE([^,]*, *\([^)]*\)).*#\1#"`
-      fi
-      sed -e "s#AM_INIT_AUTOMAKE([^@].*#dnl PACKAGE set before#" \
-          configure.in.new > configure.in && mv configure.in configure.in.new
-   fi
-fi
-if test -z "$VERSION" || test "$VERSION" = "@VERSION@"; then
-     VERSION="\"3.1.1\""
-fi
-if test -z "$modulename" || test "$modulename" = "@MODULENAME@"; then
-   modulename=`pwd`; 
-   modulename=`basename $modulename`
-   esc_VERSION=`echo $VERSION | sed -e "s#[^.0-9a-zA-Z]##g"`
-   modulename=`echo $modulename | sed -e "s#-$esc_VERSION##"`   
-
-fi
-if test -n "$kde_use_qt_param"; then
-      sed -e "s#^dnl KDE_USE_QT#KDE_USE_QT($kde_use_qt_param)#" \
-      	configure.in.new > configure.in && mv configure.in configure.in.new
-fi
-sed -e "s#@MODULENAME@#$modulename#" configure.in.new |
-	sed -e "s#@VERSION@#$VERSION#" > configure.in
-botfiles=`cat configure.files | egrep "configure.in.bot"`
-test -n "$botfiles" && cat $botfiles >> configure.in
-cat $admindir/configure.in.bot.end >> configure.in
-rm -f configure.in.new
-}
-
-configure_files()
-{
-admindir=NO
-for i in . .. ../.. ../../..; do
-  if test -x $i/admin; then admindir=$i/admin; break; fi
-done
-rm -f configure.files
-touch configure.files
-if test -f configure.in.in && head -2 configure.in.in | grep "^#MIN_CONFIG" > /dev/null; then
-	echo $admindir/configure.in.min >> configure.files
-fi
-test -f configure.in.in && echo configure.in.in >> configure.files
-list=`find . -name "configure.in.in" -o -name "configure.in.bot" | sort`
-for i in $list; do if test -f $i && test `dirname $i` != "." ; then
-  echo $i >> configure.files
-fi; done
-test -f configure.in.mid && echo configure.in.mid >> configure.files
-test -f configure.in.bot && echo configure.in.bot >> configure.files
-}
-
-subdirs()
-{
-dirs=
-compilefirst=`sed -ne 's#^COMPILE_FIRST[ ]*=[ ]*##p' $makefile_am | head -1`
-compilelast=`sed -ne 's#^COMPILE_LAST[ ]*=[ ]*##p' $makefile_am | head -1`
-for i in `ls -1`; do
-    if test -f $i/Makefile.am; then
-       case " $compilefirst $compilelast " in
-         *" $i "*) ;;
-         *) dirs="$dirs $i"
-       esac
-    fi
-done
-
-: > ./_SUBDIRS
-
-for d in $compilefirst; do
-   echo $d >> ./_SUBDIRS
-done
-
-(for d in $dirs; do 
-   list=`sed -ne "s#^COMPILE_BEFORE_$d""[ ]*=[ ]*##p" $makefile_am | head -1`
-   for s in $list; do
-      echo $s $d
-   done
-   list=`sed -ne "s#^COMPILE_AFTER_$d""[ ]*=[ ]*##p" $makefile_am | head -1`
-   for s in $list; do
-      echo $d $s
-   done
-   echo $d $d
-done ) | tsort >> ./_SUBDIRS
-
-for d in $compilelast; do
-   echo $d >> ./_SUBDIRS
-done
-
-if test -f Makefile.am.in; then
-  cp Makefile.am.in Makefile.am
-  if test -n "$UNSERMAKE"; then
-    topsubdirs=
-    for i in $compilefirst $dirs $compilelast; do
-       vari=`echo $i | sed -e "s,[-+],_,g"`
-       echo "if $vari""_SUBDIR_included" >> Makefile.am
-       echo "$vari""_SUBDIR=$i" >> Makefile.am
-       echo "endif" >> Makefile.am
-       topsubdirs="$topsubdirs \$($vari""_SUBDIR)"
-    done
-    echo "SUBDIRS=$topsubdirs" >> Makefile.am
-  else
-    echo "SUBDIRS="'$(TOPSUBDIRS)' >> Makefile.am
-  fi
-fi
-if test -r subdirs && diff subdirs _SUBDIRS > /dev/null; then
-  rm -f _SUBDIRS
-fi
-test -r _SUBDIRS && mv _SUBDIRS subdirs || true
-}
-
-cvs_clean()
-{
-if test -d CVS; then :; else
-  echo "You don't have a toplevel CVS directory."
-  echo "You most certainly didn't use cvs to get these sources."
-  echo "But this function depends on cvs's information."
-  exit 1
-fi
-perl $admindir/cvs-clean.pl
-}
-
-package_merge()
-{
-catalogs=$POFILES
-for cat in $catalogs; do
-  msgmerge -o $cat.new $cat $PACKAGE.pot
-  if test -s $cat.new; then
-    grep -v "\"POT-Creation" $cat.new > $cat.new.2
-    grep -v "\"POT-Creation" $cat >> $cat.new.1
-    if diff $cat.new.1 $cat.new.2; then
-	rm $cat.new
-    else
-	mv $cat.new $cat
-    fi
-    rm -f $cat.new.1 $cat.new.2
-  fi
-done
-}
-
-package_messages()
-{
-rm -rf po.backup
-mkdir po.backup
-
-for i in `ls -1 po/*.pot 2>/dev/null | sed -e "s#po/##"`; do
-  egrep -v '^#([^:]|$)' po/$i | egrep '^.*[^ ]+.*$' | grep -v "\"POT-Creation" > po.backup/$i
-  cp po/$i 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`
-tmpname="$PWD/messages.log"
-if test -z "$EXTRACTRC"; then EXTRACTRC=extractrc ; fi
-if test -z "$PREPARETIPS"; then PREPARETIPS=preparetips ; fi
-export EXTRACTRC PREPARETIPS
-
-for subdir in $dirs; do
-  test -z "$VERBOSE" || echo "Making messages in $subdir"
-  (cd $subdir
-   if test -n "`grep -e '^messages:.*rc.cpp' Makefile.am`"; then
-	$EXTRACTRC *.rc *.ui > rc.cpp
-   else
-	candidates=`ls -1 *.rc *.ui 2>/dev/null`
-	if test -n "$candidates"; then
-	    echo "$subdir has *.rc or *.ui files, but not correct messages line"
-	fi
-   fi
-   if test -n "`grep -r KAboutData *.c* *.C* 2>/dev/null`"; then
-	echo -e 'i18n("_: NAME OF TRANSLATORS\\n"\n"Your names")\ni18n("_: EMAIL OF TRANSLATORS\\n"\n"Your emails")' > _translatorinfo.cpp
-   else echo " " > _translatorinfo.cpp
-   fi
-   perl -e '$mes=0; while (<STDIN>) { next if (/^(if|else|endif)\s/); if (/^messages:/) { $mes=1; print $_; next; } if ($mes) { if (/$\\(XGETTEXT\)/ && / -o/) { s/ -o \$\(podir\)/ _translatorinfo.cpp -o \$\(podir\)/ } print $_; } else { print $_; } }' < Makefile.am | egrep -v '^include ' > _transMakefile
-
-   $MAKE -s -f _transMakefile podir=$podir EXTRACTRC="$EXTRACTRC" PREPARETIPS="$PREPARETIPS" \
-	XGETTEXT="${XGETTEXT:-xgettext} -C -ki18n -ktr2i18n -kI18N_NOOP -ktranslate -kaliasLocale -x ${includedir:-$KDEDIR/include}/kde.pot" \
-	messages 
-   ) 2>&1 | grep -v '^make\[1\]' > $tmpname
-   test -s $tmpname && { echo $subdir ; cat "$tmpname"; }
-   test -f $subdir/rc.cpp && rm -f $subdir/rc.cpp
-   rm -f $subdir/_translatorinfo.cpp
-   rm -f $subdir/_transMakefile
-done
-rm -f $tmpname
-for i in `ls -1 po.backup/*.pot 2>/dev/null | sed -e "s#po.backup/##" | egrep -v '^backup_'`; do
-  test -f po/$i || echo "disappeared: $i"
-done
-for i in `ls -1 po/*.pot 2>/dev/null | sed -e "s#po/##"`; do
-   msgmerge -q -o po/$i po/$i po/$i
-   egrep -v '^#([^:]|$)' po/$i | egrep '^.*[^ ]+.*$' | grep -v "\"POT-Creation" > temp.pot
-  if test -f po.backup/$i && test -n "`diff temp.pot po.backup/$i`"; then
-	echo "will update $i"
-	msgmerge -q po.backup/backup_$i po/$i > temp.pot
-	mv temp.pot po/$i
-  else
-    if test -f po.backup/backup_$i; then
-      test -z "$VERBOSE" || echo "I'm restoring $i"
-      mv po.backup/backup_$i po/$i
-      rm po.backup/$i
-    else
-      echo "will add $i"
-    fi
-  fi
-done
-rm -f temp.pot
-rm -rf po.backup
-}
-
-admindir=`echo "$0" | sed 's%[\\/][^\\/][^\\/]*$%%'`
-test "x$admindir" = "x$0" && admindir=.
-
-test "x$MAKE" = x && MAKE=make
-makefile_am=Makefile.am
-makefile_wo=Makefile.am
-if test -f Makefile.am.in; then
-  makefile_am=Makefile.am.in
-  makefile_wo=Makefile.am.in.wo
-fi
-
-# Suck in the AUTOCONF detection code
-. $admindir/detect-autoconf.sh
-
-###
-### Main
-###
-
-arg=`echo $1 | tr '\-.' __`
-case $arg in
-  cvs | dist | subdir_dist | configure_in | configure_files | subdirs | \
-  cvs_clean | package_merge | package_messages ) $arg ;;
-  * ) echo "Usage: cvs.sh <target>"
-      echo "Target can be one of:"
-      echo "    cvs cvs-clean dist"
-      echo "    configure.in configure.files"
-      echo "    package-merge package-messages"
-      echo ""
-      echo "Usage: anything but $1"
-      exit 1 ;;
-esac
-
-if test -f Makefile.am.in.wo; then
-  rm Makefile.am.in.wo
-fi
-
-exit 0
diff --git a/admin/debianrules b/admin/debianrules
deleted file mode 100755
index 5e9a846..0000000
--- a/admin/debianrules
+++ /dev/null
@@ -1,114 +0,0 @@
-#!/usr/bin/perl -w
-
-use Shell qw(mv cp mkdir rm) ;
-use File::Find;
-use Cwd;
-
-$origPwd = `pwd`;
-chomp $origPwd;
-
-$kde_confdir		=	"/etc/kde3";
-$kde_prefix		=	"/usr";
-$kde_bindir		=	"$kde_prefix/bin";
-$kde_includedir		=	"$kde_prefix/include/kde";
-$kde_libdir		=	"$kde_prefix/lib";
-$kde_cgidir		=	"$kde_prefix/lib/cgi-bin";
-$kde_moduledir		=	"$kde_prefix/lib/kde3";
-$kde_appsdir		=	"$kde_prefix/share/applnk";
-$kde_datadir		=	"$kde_prefix/share/apps";
-$kde_htmldir		=	"$kde_prefix/share/doc/kde/HTML";
-$kde_icondir		=	"$kde_prefix/share/icons";
-$kde_locale		=	"$kde_prefix/share/locale";
-$kde_mimedir		=	"$kde_prefix/share/mimelnk";
-$kde_servicesdir	=	"$kde_prefix/share/services";
-$kde_servicetypesdir	=	"$kde_prefix/share/servicetypes";
-$kde_sounddir		=	"$kde_prefix/share/sounds";
-$kde_templatesdir	=	"$kde_prefix/share/templates";
-$kde_wallpaperdir	=	"$kde_prefix/share/wallpapers";
-
-$mandir			=	"$kde_prefix/share/man";
-$infodir		=	"$kde_prefix/share/info";
-$sysconfdir		=	"/etc";
-
-$QTDIR			=	"/usr/share/qt3";
-$IDL			=	"$kde_bindir/cuteidl";
-$DCOPIDL		=	"$kde_bindir/dcopidl";
-$DCOPIDL2CPP		=	"$kde_bindir/dcopidl2cpp";
-$KDB2HTML		=	"$kde_bindir/kdb2html";
-$MCOPIDL		=	"$kde_bindir/mcopidl";
-$ARTSCCONFIG		=	"$kde_bindir/artsc-config";
-
-if (defined $ENV{DEB_BUILD_OPTIONS} &&
-    $ENV{DEB_BUILD_OPTIONS} =~ /\bdebug\b/) {
-  $enable_debug="--enable-debug";
-  $enable_final="";
-}
-else {
-  $enable_debug="--disable-debug";
-  $enable_final="--enable-final";
-}
-
-if (@ARGV && $ARGV[0] eq 'echodirs') {
-  print STDOUT "export kde_confdir=$kde_confdir\n";
-  print STDOUT "export kde_prefix=$kde_prefix\n";
-  print STDOUT "export kde_bindir=$kde_bindir\n";
-  print STDOUT "export kde_includedir=$kde_includedir\n";
-  print STDOUT "export kde_libdir=$kde_libdir\n";
-  print STDOUT "export kde_cgidir=$kde_cgidir\n";
-  print STDOUT "export kde_moduledir=$kde_moduledir\n";
-  print STDOUT "export kde_appsdir=$kde_appsdir\n";
-  print STDOUT "export kde_datadir=$kde_datadir\n";
-  print STDOUT "export kde_htmldir=$kde_htmldir\n";
-  print STDOUT "export kde_icondir=$kde_icondir\n";
-  print STDOUT "export kde_locale=$kde_locale\n";
-  print STDOUT "export kde_mimedir=$kde_mimedir\n";
-  print STDOUT "export kde_servicesdir=$kde_servicesdir\n";
-  print STDOUT "export kde_servicetypesdir=$kde_servicetypesdir\n";
-  print STDOUT "export kde_sounddir=$kde_sounddir\n";
-  print STDOUT "export kde_templatesdir=$kde_templatesdir\n";
-  print STDOUT "export kde_wallpaperdir=$kde_wallpaperdir\n";
-
-  print STDOUT "export mandir=$mandir\n";
-  print STDOUT "export infodir=$infodir\n";
-  print STDOUT "export sysconfdir=$sysconfdir\n";
-
-  print STDOUT "export QTDIR=$QTDIR\n";
-  print STDOUT "export IDL=$IDL\n";
-  print STDOUT "export DCOPIDL=$DCOPIDL\n";
-  print STDOUT "export DCOPIDL2CPP=$DCOPIDL2CPP\n";
-  print STDOUT "export KDB2HTML=$KDB2HTML\n";
-  print STDOUT "export MCOPIDL=$MCOPIDL\n";
-  print STDOUT "export ARTSCCONFIG=$ARTSCCONFIG\n";
-  print STDOUT "export INSTALL_DATA=install -p -c -m 644\n";
-
-  print STDOUT "configkde=$enable_debug $enable_final --disable-rpath --prefix=\$(kde_prefix) --libexecdir=\$(kde_bindir) --sysconfdir=\$(sysconfdir) --libdir=\$(kde_libdir) --includedir=\$(kde_includedir) --with-qt-includes=/usr/include/qt3 --mandir=\$(mandir) --infodir=\$(infodir)\n";
-  print STDOUT "configkdevelop=$enable_debug $enable_final --disable-rpath --enable-docbase --enable-kdoc2 --libdir=\$(kde_libdir) --includedir=\$(kde_includedir) --with-qt-includes=/usr/include/qt3 --mandir=\$(mandir) --with-kdelibsdoc-dir=/usr/share/doc/kdelibs3-doc/html\n";
-  print STDOUT "configkdepim=$enable_debug $enable_final --disable-rpath --with-extra-includes=/usr/include/libpisock --enable-shared --prefix=\$(kde_prefix) --libexecdir=\$(kde_bindir) --with-qt-includes=/usr/include/qt3 --mandir=\$(mandir) --infodir=\$(infodir)\n";
-
-  exit
-}
-
-if (@ARGV && $ARGV[0] eq 'echoglobals') {
-	print STDOUT "[Directories]\n";
-	print STDOUT "dir_config=$kde_confdir\n";
-	print STDOUT "dir_tmp=/tmp\n";
-	print STDOUT "dir_socket=/tmp\n";
-	print STDOUT "dir_exe=$kde_bindir\n";
-	print STDOUT "dir_lib=$kde_libdir\n";
-	print STDOUT "dir_cgi=$kde_cgidir\n";
-	print STDOUT "dir_module=$kde_moduledir\n";
-	print STDOUT "dir_apps=$kde_appsdir\n";
-	print STDOUT "dir_data=$kde_datadir\n";
-	print STDOUT "dir_html=$kde_htmldir\n";
-	print STDOUT "dir_icon=$kde_icondir\n";
-	print STDOUT "dir_locale=$kde_locale\n";
-	print STDOUT "dir_mime=$kde_mimedir\n";
-	print STDOUT "dir_services=$kde_servicesdir\n";
-	print STDOUT "dir_servicetypes=$kde_servicetypesdir\n";
-	print STDOUT "dir_sound=$kde_sounddir\n";
-	print STDOUT "dir_templates=$kde_templatesdir\n";
-	print STDOUT "dir_wallpaper=$kde_wallpaperdir\n";
-	print STDOUT "[General]\n";
-	print STDOUT "TerminalApplication=x-terminal-emulator\n";
-	exit
-}
diff --git a/admin/detect-autoconf.sh b/admin/detect-autoconf.sh
deleted file mode 100644
index b9b7250..0000000
--- a/admin/detect-autoconf.sh
+++ /dev/null
@@ -1,81 +0,0 @@
-#! /bin/sh
-
-# Global variables...
-AUTOCONF="autoconf"
-AUTOHEADER="autoheader"
-AUTOM4TE="autom4te"
-AUTOMAKE="automake"
-ACLOCAL="aclocal"
-
-
-# We don't use variable here for remembering the type ... strings.
-# local variables are not that portable, but we fear namespace issues with
-# our includer.  The repeated type calls are not that expensive.
-checkAutoconf()
-{
-  if test -x "`$WHICH autoconf-2.5x`" ; then	
-    AUTOCONF="`$WHICH autoconf-2.5x`"
-  elif test -x "`$WHICH autoconf-2.54`" ; then
-    AUTOCONF="`$WHICH autoconf-2.54`"
-  elif test -x "`$WHICH autoconf-2.53`" ; then
-    AUTOCONF="`$WHICH autoconf-2.53`"
-  elif test -x "`$WHICH autoconf-2.53a`" ; then
-    AUTOCONF="`$WHICH autoconf-2.53a`"
-  elif test -x "`$WHICH autoconf-2.52`" ; then
-    AUTOCONF="`$WHICH autoconf-2.52`"
-  elif test -x "`$WHICH autoconf2.50`" ; then
-    AUTOCONF="`$WHICH autoconf2.50`"
-  fi
-}
-
-checkAutoheader()
-{
-  if test -x "`$WHICH autoheader-2.5x`" ; then
-    AUTOHEADER="`$WHICH autoheader-2.5x`"
-    AUTOM4TE="`$WHICH autom4te-2.5x`"
-  elif test -x "`$WHICH autoheader-2.54`" ; then
-    AUTOHEADER="`$WHICH autoheader-2.54`"
-    AUTOM4TE="`$WHICH autom4te-2.54`"
-  elif test -x "`$WHICH autoheader-2.53`" ; then
-    AUTOHEADER="`$WHICH autoheader-2.53`"
-    AUTOM4TE="`$WHICH autom4te-2.53`"
-  elif test -x "`$WHICH autoheader-2.53a`" ; then
-    AUTOHEADER="`$WHICH autoheader-2.53a`"
-    AUTOM4TE="`$WHICH autom4te-2.53a`"
-  elif test -x "`$WHICH autoheader-2.52`" ; then
-    AUTOHEADER="`$WHICH autoheader-2.52`"
-  elif test -x "`$WHICH autoheader2.50`" ; then
-    AUTOHEADER="`$WHICH autoheader2.50`"
-  fi
-}
-
-checkAutomakeAclocal ()
-{
-  if test -z "$UNSERMAKE"; then
-    if test -x "`$WHICH automake-1.5`" ; then
-      AUTOMAKE="`$WHICH automake-1.5`"
-      ACLOCAL="`$WHICH aclocal-1.5`"
-    elif test -x "`$WHICH automake-1.6`" ; then
-      AUTOMAKE="`$WHICH automake-1.6`"
-      ACLOCAL="`$WHICH aclocal-1.6`"
-    fi
-  else
-     AUTOMAKE="$UNSERMAKE"
-  fi
-}
-
-checkWhich ()
-{
-  WHICH=""
-  for i in "type -p" "which" "type" ; do
-    T=`$i sh 2> /dev/null`
-    test -x "$T" && WHICH="$i" && break
-  done
-}
-
-checkWhich
-checkAutoconf
-checkAutoheader
-checkAutomakeAclocal
-
-export WHICH AUTOHEADER AUTOCONF AUTOM4TE AUTOMAKE ACLOCAL
diff --git a/admin/libtool.m4.in b/admin/libtool.m4.in
deleted file mode 100644
index aff56b2..0000000
--- a/admin/libtool.m4.in
+++ /dev/null
@@ -1,5399 +0,0 @@
-# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
-## Copyright 1996, 1997, 1998, 1999, 2000, 2001
-## Free Software Foundation, Inc.
-## Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
-##
-## 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
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## 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.
-##
-## 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.
-
-# serial 47 AC_PROG_LIBTOOL
-
-# AC_PROG_LIBTOOL
-# ---------------
-AC_DEFUN([AC_PROG_LIBTOOL],
-[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
-dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
-dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
-  AC_PROVIDE_IFELSE([AC_PROG_CXX],
-    [AC_LIBTOOL_CXX],
-    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
-  ])])
-
-dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
-dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
-dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
-  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
-    [AC_LIBTOOL_GCJ],
-    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
-      [AC_LIBTOOL_GCJ],
-      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
-	[AC_LIBTOOL_GCJ],
-      [ifdef([AC_PROG_GCJ],
-	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
-       ifdef([A][M_PROG_GCJ],
-	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
-       ifdef([LT_AC_PROG_GCJ],
-	     [define([LT_AC_PROG_GCJ],
-		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
-])])# AC_PROG_LIBTOOL
-
-
-# _AC_PROG_LIBTOOL
-# ----------------
-AC_DEFUN([_AC_PROG_LIBTOOL],
-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent'
-AC_SUBST(LIBTOOL)dnl
-
-# Prevent multiple expansion
-define([AC_PROG_LIBTOOL], [])
-])# _AC_PROG_LIBTOOL
-
-
-# AC_LIBTOOL_SETUP
-# ----------------
-AC_DEFUN([AC_LIBTOOL_SETUP],
-[AC_PREREQ(2.50)dnl
-AC_REQUIRE([AC_ENABLE_SHARED])dnl
-AC_REQUIRE([AC_ENABLE_STATIC])dnl
-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_LD])dnl
-AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
-AC_REQUIRE([AC_PROG_NM])dnl
-AC_REQUIRE([LT_AC_PROG_SED])dnl
-
-AC_REQUIRE([AC_PROG_LN_S])dnl
-AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-AC_REQUIRE([AC_OBJEXT])dnl
-AC_REQUIRE([AC_EXEEXT])dnl
-dnl
-
-AC_LIBTOOL_SYS_MAX_CMD_LEN
-AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-AC_LIBTOOL_OBJDIR
-
-AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
-_LT_AC_PROG_ECHO_BACKSLASH
-
-case $host_os in
-aix3*)
-  # AIX sometimes has problems with the GCC collect2 program.  For some
-  # reason, if we set the COLLECT_NAMES environment variable, the problems
-  # vanish in a puff of smoke.
-  if test "X${COLLECT_NAMES+set}" != Xset; then
-    COLLECT_NAMES=
-    export COLLECT_NAMES
-  fi
-  ;;
-esac
-
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e s/^X//'
-[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
-
-# Same as above, but do not quote variable references.
-[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-
-# Constants:
-rm="rm -f"
-
-# Global variables:
-default_ofile=libtool
-can_build_shared=yes
-
-# All known linkers require a `.a' archive for static linking (except M$VC,
-# which needs '.lib').
-libext=a
-ltmain="$ac_aux_dir/ltmain.sh"
-ofile="$default_ofile"
-with_gnu_ld="$lt_cv_prog_gnu_ld"
-
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-AC_CHECK_TOOL(STRIP, strip, :)
-
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-
-# Set sane defaults for various variables
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-test -z "$AS" && AS=as
-test -z "$CC" && CC=cc
-test -z "$LTCC" && LTCC=$CC
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-test -z "$LD" && LD=ld
-test -z "$LN_S" && LN_S="ln -s"
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-test -z "$NM" && NM=nm
-test -z "$SED" && SED=sed
-test -z "$OBJDUMP" && OBJDUMP=objdump
-test -z "$RANLIB" && RANLIB=:
-test -z "$STRIP" && STRIP=:
-test -z "$ac_objext" && ac_objext=o
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
-  case $host_os in
-  openbsd*)
-    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
-    ;;
-  *)
-    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
-    ;;
-  esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-fi
-
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
-  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
-    AC_PATH_MAGIC
-  fi
-  ;;
-esac
-
-ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-enable_win32_dll=yes, enable_win32_dll=no)
-
-AC_ARG_ENABLE([libtool-lock],
-    [AC_HELP_STRING([--disable-libtool-lock],
-	[avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-AC_ARG_WITH([pic],
-    [AC_HELP_STRING([--with-pic],
-	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
-    [pic_mode="$withval"],
-    [pic_mode=default])
-test -z "$pic_mode" && pic_mode=default
-
-# Use C for the default configuration in the libtool script
-tagname=
-AC_LIBTOOL_LANG_C_CONFIG
-_LT_AC_TAGCONFIG
-])# AC_LIBTOOL_SETUP
-
-
-# _LT_AC_SYS_COMPILER
-# -------------------
-AC_DEFUN([_LT_AC_SYS_COMPILER],
-[AC_REQUIRE([AC_PROG_CC])dnl
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# Allow CC to be a program name with arguments.
-set dummy $CC
-compiler="[$]2"
-])# _LT_AC_SYS_COMPILER
-
-
-# _LT_AC_SYS_LIBPATH_AIX
-# ----------------------
-# Links a minimal program and checks the executable
-# for the system default hardcoded library path. In most cases,
-# this is /usr/lib:/lib, but when the MPI compilers are used
-# the location of the communication and MPI libs are included too.
-# If we don't find anything, use the default library path according
-# to the aix ld manual.
-AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
-[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`; fi],[])
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-])# _LT_AC_SYS_LIBPATH_AIX
-
-
-# _LT_AC_PROG_ECHO_BACKSLASH
-# --------------------------
-# Add some code to the start of the generated configure script which
-# will find an echo command which doesn't interpret backslashes.
-AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
-[ifdef([AC_DIVERSION_NOTICE],
-	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
-	 [AC_DIVERT_PUSH(NOTICE)])
-
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-case X$ECHO in
-X*--fallback-echo)
-  # Remove one level of quotation (which was required for Make).
-  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
-  ;;
-esac
-
-echo=${ECHO-echo}
-if test "X[$]1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X[$]1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
-  # Yippee, $echo works!
-  :
-else
-  # Restart under the correct shell.
-  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
-fi
-
-if test "X[$]1" = X--fallback-echo; then
-  # used as fallback echo
-  shift
-  cat <<EOF
-[$]*
-EOF
-  exit 0
-fi
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
-
-if test -z "$ECHO"; then
-if test "X${echo_test_string+set}" != Xset; then
-# find a string as large as possible, as long as the shell can cope with it
-  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
-    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
-    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
-       echo_test_string="`eval $cmd`" &&
-       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
-    then
-      break
-    fi
-  done
-fi
-
-if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
-   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
-   test "X$echo_testing_string" = "X$echo_test_string"; then
-  :
-else
-  # The Solaris, AIX, and Digital Unix default echo programs unquote
-  # backslashes.  This makes it impossible to quote backslashes using
-  #   echo "$something" | sed 's/\\/\\\\/g'
-  #
-  # So, first we look for a working echo in the user's PATH.
-
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for dir in $PATH /usr/ucb; do
-    IFS="$lt_save_ifs"
-    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
-       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
-       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
-       test "X$echo_testing_string" = "X$echo_test_string"; then
-      echo="$dir/echo"
-      break
-    fi
-  done
-  IFS="$lt_save_ifs"
-
-  if test "X$echo" = Xecho; then
-    # We didn't find a better echo, so look for alternatives.
-    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
-       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
-       test "X$echo_testing_string" = "X$echo_test_string"; then
-      # This shell has a builtin print -r that does the trick.
-      echo='print -r'
-    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
-	 test "X$CONFIG_SHELL" != X/bin/ksh; then
-      # If we have ksh, try running configure again with it.
-      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-      export ORIGINAL_CONFIG_SHELL
-      CONFIG_SHELL=/bin/ksh
-      export CONFIG_SHELL
-      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
-    else
-      # Try using printf.
-      echo='printf %s\n'
-      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
-	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
-	 test "X$echo_testing_string" = "X$echo_test_string"; then
-	# Cool, printf works
-	:
-      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
-	   test "X$echo_testing_string" = 'X\t' &&
-	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-	   test "X$echo_testing_string" = "X$echo_test_string"; then
-	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
-	export CONFIG_SHELL
-	SHELL="$CONFIG_SHELL"
-	export SHELL
-	echo="$CONFIG_SHELL [$]0 --fallback-echo"
-      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
-	   test "X$echo_testing_string" = 'X\t' &&
-	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-	   test "X$echo_testing_string" = "X$echo_test_string"; then
-	echo="$CONFIG_SHELL [$]0 --fallback-echo"
-      else
-	# maybe with a smaller string...
-	prev=:
-
-	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
-	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
-	  then
-	    break
-	  fi
-	  prev="$cmd"
-	done
-
-	if test "$prev" != 'sed 50q "[$]0"'; then
-	  echo_test_string=`eval $prev`
-	  export echo_test_string
-	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
-	else
-	  # Oops.  We lost completely, so just stick with echo.
-	  echo=echo
-	fi
-      fi
-    fi
-  fi
-fi
-fi
-
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-ECHO=$echo
-if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
-   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
-fi
-
-AC_SUBST(ECHO)
-AC_DIVERT_POP
-])# _LT_AC_PROG_ECHO_BACKSLASH
-
-
-# _LT_AC_LOCK
-# -----------
-AC_DEFUN([_LT_AC_LOCK],
-[AC_ARG_ENABLE([libtool-lock],
-    [AC_HELP_STRING([--disable-libtool-lock],
-	[avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-ia64-*-hpux*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.$ac_objext` in
-    *ELF-32*)
-      HPUX_IA64_MODE="32"
-      ;;
-    *ELF-64*)
-      HPUX_IA64_MODE="64"
-      ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-*-*-irix6*)
-  # Find out which ABI we are using.
-  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.$ac_objext` in
-    *32-bit*)
-      LD="${LD-ld} -32"
-      ;;
-    *N32*)
-      LD="${LD-ld} -n32"
-      ;;
-    *64-bit*)
-      LD="${LD-ld} -64"
-      ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-
-*-*-linux*)
-  # Test if the compiler is 64bit
-  echo 'int i;' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.$ac_objext` in
-    *"ELF 32"*)
-      LINUX_64_MODE="32"
-      ;;
-    *"ELF 64"*)
-      LINUX_64_MODE="64"
-      ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-  
-*-*-sco3.2v5*)
-  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
-  SAVE_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -belf"
-  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
-    [AC_LANG_PUSH(C)
-     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
-     AC_LANG_POP])
-  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
-    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
-    CFLAGS="$SAVE_CFLAGS"
-  fi
-  ;;
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
-  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
-  AC_CHECK_TOOL(AS, as, false)
-  AC_CHECK_TOOL(OBJDUMP, objdump, false)
-
-  # recent cygwin and mingw systems supply a stub DllMain which the user
-  # can override, but on older systems we have to supply one
-  AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
-    [AC_TRY_LINK([],
-      [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
-      DllMain (0, 0, 0);],
-      [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
-
-  case $host/$CC in
-  *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
-    # old mingw systems require "-dll" to link a DLL, while more recent ones
-    # require "-mdll"
-    SAVE_CFLAGS="$CFLAGS"
-    CFLAGS="$CFLAGS -mdll"
-    AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
-      [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
-    CFLAGS="$SAVE_CFLAGS" ;;
-  *-*-cygwin* | *-*-pw32*)
-    # cygwin systems need to pass --dll to the linker, and not link
-    # crt.o which will require a WinMain at 16 definition.
-    lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
-  esac
-  ;;
-  ])
-esac
-
-need_locks="$enable_libtool_lock"
-
-])# _LT_AC_LOCK
-
-
-# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
-# ----------------------------------------------------------------
-# Check whether the given compiler option works
-AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
-[AC_CACHE_CHECK([$1], [$2],
-  [$2=no
-  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
-   save_CFLAGS="$CFLAGS"
-   CFLAGS="$CFLAGS $3"
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   if (eval $ac_compile 2>conftest.err) && test -s $ac_outfile; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     if test -s conftest.err; then
-       # Append any errors to the config.log.
-       cat conftest.err 1>&AS_MESSAGE_LOG_FD
-     else
-       $2=yes
-     fi
-   fi
-   $rm conftest*
-   CFLAGS="$save_CFLAGS"
-])
-
-if test x"[$]$2" = xyes; then
-    ifelse([$5], , :, [$5])
-else
-    ifelse([$6], , :, [$6])
-fi
-])# AC_LIBTOOL_COMPILER_OPTION
-
-
-# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-#                          [ACTION-SUCCESS], [ACTION-FAILURE])
-# ------------------------------------------------------------
-# Check whether the given compiler option works
-AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
-[AC_CACHE_CHECK([$1], [$2],
-  [$2=no
-   save_LDFLAGS="$LDFLAGS"
-   LDFLAGS="$LDFLAGS $3"
-   echo "$lt_simple_link_test_code" > conftest.$ac_ext
-   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     if test -s conftest.err; then
-       # Append any errors to the config.log.
-       cat conftest.err 1>&AS_MESSAGE_LOG_FD
-     else
-       $2=yes
-     fi
-   fi
-   $rm conftest*
-   LDFLAGS="$save_LDFLAGS"
-])
-
-if test x"[$]$2" = xyes; then
-    ifelse([$4], , :, [$4])
-else
-    ifelse([$5], , :, [$5])
-fi
-])# AC_LIBTOOL_LINKER_OPTION
-
-
-# AC_LIBTOOL_SYS_MAX_CMD_LEN
-# --------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
-[# find the maximum length of command line arguments
-AC_MSG_CHECKING([the maximum length of command line arguments])
-AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
-  i=0
-  testring="ABCD"
-
-  case $host_os in
-  msdosdjgpp*)
-    # On DJGPP, this test can blow up pretty badly due to problems in libc
-    # (any single argument exceeding 2000 bytes causes a buffer overrun
-    # during glob expansion).  Even if it were fixed, the result of this
-    # check would be larger than it should be.
-    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
-    ;;
-
-  gnu*)
-    # Under GNU Hurd, this test is not required because there is
-    # no limit to the length of command line arguments.
-    # Libtool will interpret -1 as no limit whatsoever
-    lt_cv_sys_max_cmd_len=-1;
-    ;;
-
-  *)
-    # If test is not a shell built-in, we'll probably end up computing a
-    # maximum length that is only half of the actual maximum length, but
-    # we can't tell.
-    while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
-	       = "XX$testring") >/dev/null 2>&1 &&
-	    new_result=`expr "X$testring" : ".*" 2>&1` &&
-	    lt_cv_sys_max_cmd_len=$new_result &&
-	    test $i != 17 # 1/2 MB should be enough
-    do
-      i=`expr $i + 1`
-      testring=$testring$testring
-    done
-    testring=
-    # Add a significant safety factor because C++ compilers can tack on massive
-    # amounts of additional arguments before passing them to the linker.
-    # It appears as though 1/2 is a usable value.
-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
-    ;;
-  esac
-])
-if test -n $lt_cv_sys_max_cmd_len ; then
-  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
-else
-  AC_MSG_RESULT(none)
-fi
-])# AC_LIBTOOL_SYS_MAX_CMD_LEN
-
-
-# _LT_AC_CHECK_DLFCN
-# --------------------
-AC_DEFUN([_LT_AC_CHECK_DLFCN],
-[AC_CHECK_HEADERS(dlfcn.h)dnl
-])# _LT_AC_CHECK_DLFCN
-
-
-# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
-#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
-# ------------------------------------------------------------------
-AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
-[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
-if test "$cross_compiling" = yes; then :
-  [$4]
-else
-  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-  lt_status=$lt_dlunknown
-  cat > conftest.$ac_ext <<EOF
-[#line __oline__ "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-#  define LT_DLGLOBAL		RTLD_GLOBAL
-#else
-#  ifdef DL_GLOBAL
-#    define LT_DLGLOBAL		DL_GLOBAL
-#  else
-#    define LT_DLGLOBAL		0
-#  endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
-   find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-#  ifdef RTLD_LAZY
-#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
-#  else
-#    ifdef DL_LAZY
-#      define LT_DLLAZY_OR_NOW		DL_LAZY
-#    else
-#      ifdef RTLD_NOW
-#        define LT_DLLAZY_OR_NOW	RTLD_NOW
-#      else
-#        ifdef DL_NOW
-#          define LT_DLLAZY_OR_NOW	DL_NOW
-#        else
-#          define LT_DLLAZY_OR_NOW	0
-#        endif
-#      endif
-#    endif
-#  endif
-#endif
-
-#ifdef __cplusplus
-extern "C" void exit (int);
-#endif
-
-void fnord() { int i=42;}
-int main ()
-{
-  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-  int status = $lt_dlunknown;
-
-  if (self)
-    {
-      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
-      /* dlclose (self); */
-    }
-
-    exit (status);
-}]
-EOF
-  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
-    (./conftest; exit; ) 2>/dev/null
-    lt_status=$?
-    case x$lt_status in
-      x$lt_dlno_uscore) $1 ;;
-      x$lt_dlneed_uscore) $2 ;;
-      x$lt_unknown|x*) $3 ;;
-    esac
-  else :
-    # compilation failed
-    $3
-  fi
-fi
-rm -fr conftest*
-])# _LT_AC_TRY_DLOPEN_SELF
-
-
-# AC_LIBTOOL_DLOPEN_SELF
-# -------------------
-AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
-[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
-if test "x$enable_dlopen" != xyes; then
-  enable_dlopen=unknown
-  enable_dlopen_self=unknown
-  enable_dlopen_self_static=unknown
-else
-  lt_cv_dlopen=no
-  lt_cv_dlopen_libs=
-
-  case $host_os in
-  beos*)
-    lt_cv_dlopen="load_add_on"
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=yes
-    ;;
-
-  cygwin* | mingw* | pw32*)
-    lt_cv_dlopen="LoadLibrary"
-    lt_cv_dlopen_libs=
-   ;;
-
-  *)
-    AC_CHECK_FUNC([shl_load],
-	  [lt_cv_dlopen="shl_load"],
-      [AC_CHECK_LIB([dld], [shl_load],
-	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
-	[AC_CHECK_FUNC([dlopen],
-	      [lt_cv_dlopen="dlopen"],
-	  [AC_CHECK_LIB([dl], [dlopen],
-		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
-	    [AC_CHECK_LIB([svld], [dlopen],
-		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
-	      [AC_CHECK_LIB([dld], [dld_link],
-		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
-	      ])
-	    ])
-	  ])
-	])
-      ])
-    ;;
-  esac
-
-  if test "x$lt_cv_dlopen" != xno; then
-    enable_dlopen=yes
-  else
-    enable_dlopen=no
-  fi
-
-  case $lt_cv_dlopen in
-  dlopen)
-    save_CPPFLAGS="$CPPFLAGS"
-    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-
-    save_LDFLAGS="$LDFLAGS"
-    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-
-    save_LIBS="$LIBS"
-    LIBS="$lt_cv_dlopen_libs $LIBS"
-
-    AC_CACHE_CHECK([whether a program can dlopen itself],
-	  lt_cv_dlopen_self, [dnl
-	  _LT_AC_TRY_DLOPEN_SELF(
-	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
-	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
-    ])
-
-    if test "x$lt_cv_dlopen_self" = xyes; then
-      LDFLAGS="$LDFLAGS $link_static_flag"
-      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
-    	  lt_cv_dlopen_self_static, [dnl
-	  _LT_AC_TRY_DLOPEN_SELF(
-	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
-	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
-      ])
-    fi
-
-    CPPFLAGS="$save_CPPFLAGS"
-    LDFLAGS="$save_LDFLAGS"
-    LIBS="$save_LIBS"
-    ;;
-  esac
-
-  case $lt_cv_dlopen_self in
-  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
-  *) enable_dlopen_self=unknown ;;
-  esac
-
-  case $lt_cv_dlopen_self_static in
-  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
-  *) enable_dlopen_self_static=unknown ;;
-  esac
-fi
-])# AC_LIBTOOL_DLOPEN_SELF
-
-
-# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
-# ---------------------------------
-# Check to see if options -c and -o are simultaneously supported by compiler
-AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
-AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
-  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
-  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
-   $rm -r conftest 2>/dev/null
-   mkdir conftest
-   cd conftest
-   mkdir out
-   ifelse([$1],[],[save_CFLAGS="$CFLAGS"
-		   CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"],
-	  [$1],[CXX],[save_CXXFLAGS="$CXXFLAGS"
-		   CXXFLAGS="$CXXFLAGS -o out/conftest2.$ac_objext"],
-	  [$1],[GCJ],[save_GCJFLAGS="$GCJFLAGS"
-		   GCJFLAGS="$GCJFLAGS -o out/conftest2.$ac_objext"])
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-   # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
-   # that will create temporary files in the current directory regardless of
-   # the output directory.  Thus, making CWD read-only will cause this test
-   # to fail, enabling locking or at least warning the user not to do parallel
-   # builds.
-   chmod -w .
-
-   if (eval $ac_compile 2>out/conftest.err) && test -s out/conftest2.$ac_objext
-   then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     if test -s out/conftest.err; then
-       # Append any errors to the config.log.
-       cat out/conftest.err 1>&AS_MESSAGE_LOG_FD
-     else
-       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
-     fi
-   fi
-   ifelse([$1],[],[CFLAGS="$save_CFLAGS"],
-	  [$1],[CXX],[CXXFLAGS="$save_CXXFLAGS"],
-	  [$1],[GCJ],[GCJFLAGS="$save_GCJFLAGS"])
-   chmod u+w .
-   $rm conftest* out/*
-   rmdir out
-   cd ..
-   rmdir conftest
-   $rm conftest*
-])
-])# AC_LIBTOOL_PROG_CC_C_O
-
-
-# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
-# -----------------------------------------
-# Check to see if we can do hard links to lock some files if needed
-AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
-[AC_REQUIRE([_LT_AC_LOCK])dnl
-
-hard_links="nottested"
-if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
-  # do not overwrite the value of need_locks provided by the user
-  AC_MSG_CHECKING([if we can lock with hard links])
-  hard_links=yes
-  $rm conftest*
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  touch conftest.a
-  ln conftest.a conftest.b 2>&5 || hard_links=no
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  AC_MSG_RESULT([$hard_links])
-  if test "$hard_links" = no; then
-    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
-    need_locks=warn
-  fi
-else
-  need_locks=no
-fi
-])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
-
-
-# AC_LIBTOOL_OBJDIR
-# -----------------
-AC_DEFUN([AC_LIBTOOL_OBJDIR],
-[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
-[rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
-  lt_cv_objdir=.libs
-else
-  # MS-DOS does not allow filenames that begin with a dot.
-  lt_cv_objdir=_libs
-fi
-rmdir .libs 2>/dev/null])
-objdir=$lt_cv_objdir
-])# AC_LIBTOOL_OBJDIR
-
-
-# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
-# ----------------------------------------------
-# Check hardcoding attributes.
-AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
-[AC_MSG_CHECKING([how to hardcode library paths into programs])
-_LT_AC_TAGVAR(hardcode_action, $1)=
-if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
-   test -n "$_LT_AC_TAGVAR(runpath_var $1)"; then
-
-  # We can hardcode non-existant directories.
-  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
-     # If the only mechanism to avoid hardcoding is shlibpath_var, we
-     # have to relink, otherwise we might link with an installed library
-     # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
-     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
-    # Linking always hardcodes the temporary library directory.
-    _LT_AC_TAGVAR(hardcode_action, $1)=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
-  fi
-else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
-fi
-AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
-
-if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
-  # Fast installation is not supported
-  enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
-  # Fast installation is not necessary
-  enable_fast_install=needless
-fi
-])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
-
-
-# AC_LIBTOOL_SYS_LIB_STRIP
-# ------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
-[striplib=
-old_striplib=
-AC_MSG_CHECKING([whether stripping libraries is possible])
-if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
-  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
-  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
-  AC_MSG_RESULT([yes])
-else
-  AC_MSG_RESULT([no])
-fi
-])# AC_LIBTOOL_SYS_LIB_STRIP
-
-
-# AC_LIBTOOL_SYS_DYNAMIC_LINKER
-# -----------------------------
-# PORTME Fill in your ld.so characteristics
-AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
-[AC_MSG_CHECKING([dynamic linker characteristics])
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
-  version_type=linux
-  library_names_spec='${libname}${release}.so$versuffix $libname.a'
-  shlibpath_var=LIBPATH
-
-  # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}.so$major'
-  ;;
-
-aix4* | aix5*)
-  version_type=linux
-  if test "$host_cpu" = ia64; then
-    # AIX 5 supports IA64
-    library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
-    shlibpath_var=LD_LIBRARY_PATH
-  else
-    # With GCC up to 2.95.x, collect2 would create an import file
-    # for dependence libraries.  The import file would start with
-    # the line `#! .'.  This would cause the generated library to
-    # depend on `.', always an invalid library.  This was fixed in
-    # development snapshots of GCC prior to 3.0.
-    case $host_os in
-      aix4 | aix4.[[01]] | aix4.[[01]].*)
-      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
-	   echo ' yes '
-	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
-	:
-      else
-	can_build_shared=no
-      fi
-      ;;
-    esac
-    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
-    # soname into executable. Probably we can add versioning support to
-    # collect2, so additional links can be useful in future.
-    if test "$aix_use_runtimelinking" = yes; then
-      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
-      # instead of lib<name>.a to let people know that these are not
-      # typical AIX shared libraries.
-      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-    else
-      # We preserve .a as extension for shared libraries through AIX4.2
-      # and later when we are not doing run time linking.
-      library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}.so$major'
-    fi
-    shlibpath_var=LIBPATH
-  fi
-  ;;
-
-amigaos*)
-  library_names_spec='$libname.ixlibrary $libname.a'
-  # Create ${libname}_ixlibrary.a entries in /sys/libs.
-  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
-  ;;
-
-beos*)
-  library_names_spec='${libname}.so'
-  dynamic_linker="$host_os ld.so"
-  shlibpath_var=LIBRARY_PATH
-  ;;
-
-bsdi4*)
-  version_type=linux
-  need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
-  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
-  # the default ld.so.conf also contains /usr/contrib/lib and
-  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
-  # libtool to hard-code these into programs
-  ;;
-
-cygwin* | mingw* | pw32*)
-  version_type=windows
-  need_version=no
-  need_lib_prefix=no
-  case $GCC,$host_os in
-  yes,cygwin*)
-    library_names_spec='$libname.dll.a'
-    sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
-    soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
-    postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
-      dldir=$destdir/`dirname \$dlpath`~
-      test -d \$dldir || mkdir -p \$dldir~
-      $install_prog .libs/$dlname \$dldir/$dlname'
-    postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
-      dlpath=$dir/\$dldll~
-       $rm \$dlpath'
-    ;;
-  yes,mingw*)
-    library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
-    sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://"`
-    if echo "$sys_lib_search_path_spec" | [egrep ';[C-Z]:/' >/dev/null]; then
-      # It is most probably a Windows format PATH printed by
-      # mingw gcc, but we are running on Cygwin. Gcc prints its search
-      # path with ; separators, and with drive letters. We can handle the
-      # drive letters (cygwin fileutils understands them), so leave them,
-      # especially as we might pass files found there to a mingw objdump,
-      # which wouldn't understand a cygwinified path. Ahh.
-      sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'`
-    else
-      sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed  -e "s/$PATH_SEPARATOR/ /g"`
-    fi
-    ;;
-  yes,pw32*)
-    library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
-    ;;
-  *)
-    library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
-    ;;
-  esac
-  dynamic_linker='Win32 ld.exe'
-  # FIXME: first we should search . and the directory the executable is in
-  shlibpath_var=PATH
-  ;;
-
-darwin* | rhapsody*)
-  dynamic_linker="$host_os dyld"
-  version_type=darwin
-  need_lib_prefix=no
-  need_version=no
-  # FIXME: Relying on posixy $() will cause problems for
-  #        cross-compilation, but unfortunately the echo tests do not
-  #        yet detect zsh echo's removal of \ escapes.
-  library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
-  soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
-  shlibpath_overrides_runpath=yes
-  shlibpath_var=DYLD_LIBRARY_PATH
-  ;;
-
-dgux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-freebsd1*)
-  dynamic_linker=no
-  ;;
-
-freebsd*)
-  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
-  version_type=freebsd-$objformat
-  case $version_type in
-    freebsd-elf*)
-      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
-      need_version=no
-      need_lib_prefix=no
-      ;;
-    freebsd-*)
-      library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
-      need_version=yes
-      ;;
-  esac
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_os in
-  freebsd2*)
-    shlibpath_overrides_runpath=yes
-    ;;
-  freebsd3.[01]* | freebsdelf3.[01]*)
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  *) # from 3.2 on
-    shlibpath_overrides_runpath=no
-    hardcode_into_libs=yes
-    ;;
-  esac
-  ;;
-
-gnu*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
-  soname_spec='${libname}${release}.so$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  hardcode_into_libs=yes
-  ;;
-
-hpux9* | hpux10* | hpux11*)
-  # Give a soname corresponding to the major version so that dld.sl refuses to
-  # link against other versions.
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  if test "$host_cpu" = ia64; then
-    hardcode_into_libs=yes
-    dynamic_linker="$host_os dld.so"
-    shlibpath_var=LD_LIBRARY_PATH
-    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-    soname_spec='${libname}${release}.so$major'
-    if test "X$HPUX_IA64_MODE" = X32; then
-      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
-    else
-      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
-    fi
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-  else
-    dynamic_linker="$host_os dld.sl"
-    shlibpath_var=SHLIB_PATH
-    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
-    soname_spec='${libname}${release}.sl$major'
-  fi
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
-  postinstall_cmds='chmod 555 $lib'
-  ;;
-
-irix5* | irix6* | nonstopux*)
-  case $host_os in
-    nonstopux*) version_type=nonstopux ;;
-    *)          version_type=irix ;;
-  esac
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}.so$major'
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
-  case $host_os in
-  irix5* | nonstopux*)
-    libsuff= shlibsuff=
-    ;;
-  *)
-    case $LD in # libtool.m4 will add one of these switches to LD
-    *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
-    *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
-    *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
-    *) libsuff= shlibsuff= libmagic=never-match;;
-    esac
-    ;;
-  esac
-  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
-  shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
-  ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
-  dynamic_linker=no
-  ;;
-
-# This must be Linux ELF.
-linux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
-  libsuff=
-  if test "x$LINUX_64_MODE" = x64; then
-    # Some platforms are per default 64-bit, so there's no /lib64
-    if test -d /lib64; then
-      libsuff=64
-    fi
-  fi
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
-  sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
-  # This implies no fast_install, which is unacceptable.
-  # Some rework will be needed to allow for fast_install
-  # before this can be enabled.
-  hardcode_into_libs=yes
-
-  # We used to test for /lib/ld.so.1 and disable shared libraries on
-  # powerpc, because MkLinux only supported shared libraries with the
-  # GNU dynamic linker.  Since this was broken with cross compilers,
-  # most powerpc-linux boxes support dynamic linking these days and
-  # people can always --disable-shared, the test was removed, and we
-  # assume the GNU/Linux dynamic linker is in use.
-  dynamic_linker='GNU/Linux ld.so'
-  ;;
-
-netbsd*)
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
-    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-    dynamic_linker='NetBSD (a.out) ld.so'
-  else
-    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
-    soname_spec='${libname}${release}.so$major'
-    dynamic_linker='NetBSD ld.elf_so'
-  fi
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  ;;
-
-newsos6)
-  version_type=linux
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
-
-nto-qnx)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
-
-openbsd*)
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    case $host_os in
-      openbsd2.[[89]] | openbsd2.[[89]].*)
-	shlibpath_overrides_runpath=no
-	;;
-      *)
-	shlibpath_overrides_runpath=yes
-	;;
-      esac
-  else
-    shlibpath_overrides_runpath=yes
-  fi
-  ;;
-
-os2*)
-  libname_spec='$name'
-  need_lib_prefix=no
-  library_names_spec='$libname.dll $libname.a'
-  dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
-  ;;
-
-osf3* | osf4* | osf5*)
-  version_type=osf
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}.so'
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
-  ;;
-
-sco3.2v5*)
-  version_type=osf
-  soname_spec='${libname}${release}.so$major'
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-solaris*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  # ldd complains unless libraries are executable
-  postinstall_cmds='chmod +x $lib'
-  ;;
-
-sunos4*)
-  version_type=sunos
-  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
-  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
-    need_lib_prefix=no
-  fi
-  need_version=yes
-  ;;
-
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-  version_type=linux
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_vendor in
-    sni)
-      shlibpath_overrides_runpath=no
-      ;;
-    motorola)
-      need_lib_prefix=no
-      need_version=no
-      shlibpath_overrides_runpath=no
-      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
-      ;;
-  esac
-  ;;
-
-sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux
-    library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
-    soname_spec='$libname.so.$major'
-    shlibpath_var=LD_LIBRARY_PATH
-  fi
-  ;;
-
-uts4*)
-  version_type=linux
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-*)
-  dynamic_linker=no
-  ;;
-esac
-AC_MSG_RESULT([$dynamic_linker])
-test "$dynamic_linker" = no && can_build_shared=no
-])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
-
-
-# _LT_AC_TAGCONFIG
-# ----------------
-AC_DEFUN([_LT_AC_TAGCONFIG],
-[AC_ARG_WITH([tags],
-    [AC_HELP_STRING([--with-tags=TAGS],
-	[include additional configurations @<:@CXX,GCJ@:>@])],
-    [tagnames="$withval"],
-    [tagnames="CXX,GCJ"
-    case $host_os in
-      mingw*|cygwin*) tagnames="$tagnames,RC" ;;
-    esac])
-
-if test -f "$ltmain" && test -n "$tagnames"; then
-  if test ! -f "${ofile}"; then
-    AC_MSG_WARN([output file `$ofile' does not exist])
-  fi
-
-  if test -z "$LTCC"; then
-    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
-    if test -z "$LTCC"; then
-      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
-    else
-      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
-    fi
-  fi
-
-  # Extract list of available tagged configurations in $ofile.
-  # Note that this assumes the entire list is on one line.
-  available_tags=`grep "^available_tags=" "${ofile}" | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
-
-  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-  for tagname in $tagnames; do
-    IFS="$lt_save_ifs"
-    # Check whether tagname contains only valid characters
-    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
-    "") ;;
-    *)  AC_MSG_ERROR([invalid tag name: $tagname])
-	;;
-    esac
-
-    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
-    then
-      AC_MSG_ERROR([tag name \"$tagname\" already exists])
-    fi
-
-    # Update the list of available tags.
-    if test -n "$tagname"; then
-      echo appending configuration tag \"$tagname\" to $ofile
-
-      case $tagname in
-      CXX)
-	AC_LIBTOOL_LANG_CXX_CONFIG
-	;;
-
-      GCJ)
-	AC_LIBTOOL_LANG_GCJ_CONFIG
-	;;
-
-      RC)
-	AC_LIBTOOL_LANG_RC_CONFIG
-	;;
-
-      *)
-	AC_MSG_ERROR([Unsupported tag name: $tagname])
-	;;
-      esac
-
-      # Append the new tag name to the list of available tags.
-      available_tags="$available_tags $tagname"
-    fi
-  done
-  IFS="$lt_save_ifs"
-
-  # Now substitute the updated list of available tags.
-  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
-    mv "${ofile}T" "$ofile"
-    chmod +x "$ofile"
-  else
-    rm -f "${ofile}T"
-    AC_MSG_ERROR([unable to update list of available tagged configurations.])
-  fi
-fi
-])# _LT_AC_TAGCONFIG
-
-
-# AC_LIBTOOL_DLOPEN
-# -----------------
-# enable checks for dlopen support
-AC_DEFUN([AC_LIBTOOL_DLOPEN],
- [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
-])# AC_LIBTOOL_DLOPEN
-
-
-# AC_LIBTOOL_WIN32_DLL
-# --------------------
-# declare package support for building win32 dll's
-AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
-[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
-])# AC_LIBTOOL_WIN32_DLL
-
-
-# AC_ENABLE_SHARED([DEFAULT])
-# ---------------------------
-# implement the --enable-shared flag
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
-AC_DEFUN([AC_ENABLE_SHARED],
-[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE([shared],
-    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
-	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
-    [p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_shared=yes ;;
-    no) enable_shared=no ;;
-    *)
-      enable_shared=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-	IFS="$lt_save_ifs"
-	if test "X$pkg" = "X$p"; then
-	  enable_shared=yes
-	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac],
-    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
-])# AC_ENABLE_SHARED
-
-
-# AC_DISABLE_SHARED
-# -----------------
-#- set the default shared flag to --disable-shared
-AC_DEFUN([AC_DISABLE_SHARED],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_SHARED(no)
-])# AC_DISABLE_SHARED
-
-
-# AC_ENABLE_STATIC([DEFAULT])
-# ---------------------------
-# implement the --enable-static flag
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
-AC_DEFUN([AC_ENABLE_STATIC],
-[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE([static],
-    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
-	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
-    [p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_static=yes ;;
-    no) enable_static=no ;;
-    *)
-     enable_static=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-	IFS="$lt_save_ifs"
-	if test "X$pkg" = "X$p"; then
-	  enable_static=yes
-	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac],
-    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
-])# AC_ENABLE_STATIC
-
-
-# AC_DISABLE_STATIC
-# -----------------
-# set the default static flag to --disable-static
-AC_DEFUN([AC_DISABLE_STATIC],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_STATIC(no)
-])# AC_DISABLE_STATIC
-
-
-# AC_ENABLE_FAST_INSTALL([DEFAULT])
-# ---------------------------------
-# implement the --enable-fast-install flag
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
-AC_DEFUN([AC_ENABLE_FAST_INSTALL],
-[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE([fast-install],
-    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
-    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
-    [p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_fast_install=yes ;;
-    no) enable_fast_install=no ;;
-    *)
-      enable_fast_install=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-	IFS="$lt_save_ifs"
-	if test "X$pkg" = "X$p"; then
-	  enable_fast_install=yes
-	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac],
-    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
-])# AC_ENABLE_FAST_INSTALL
-
-
-# AC_DISABLE_FAST_INSTALL
-# -----------------------
-# set the default to --disable-fast-install
-AC_DEFUN([AC_DISABLE_FAST_INSTALL],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_FAST_INSTALL(no)
-])# AC_DISABLE_FAST_INSTALL
-
-
-# AC_LIBTOOL_PICMODE([MODE])
-# --------------------------
-# implement the --with-pic flag
-# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
-AC_DEFUN([AC_LIBTOOL_PICMODE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-pic_mode=ifelse($#,1,$1,default)
-])# AC_LIBTOOL_PICMODE
-
-
-# AC_PATH_TOOL_PREFIX
-# -------------------
-# find a file program which can recognise shared library
-AC_DEFUN([AC_PATH_TOOL_PREFIX],
-[AC_MSG_CHECKING([for $1])
-AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
-[case $MAGIC_CMD in
-[[\\/*] |  ?:[\\/]*])
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
-  ;;
-*)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-dnl $ac_dummy forces splitting on constant user-supplied paths.
-dnl POSIX.2 word splitting is done only on the output of word expansions,
-dnl not every word.  This closes a longstanding sh security hole.
-  ac_dummy="ifelse([$2], , $PATH, [$2])"
-  for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$1; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
-      if test -n "$file_magic_test_file"; then
-	case $deplibs_check_method in
-	"file_magic "*)
-	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
-	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
-	    egrep "$file_magic_regex" > /dev/null; then
-	    :
-	  else
-	    cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such.  This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem.  Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool at gnu.org
-
-EOF
-	  fi ;;
-	esac
-      fi
-      break
-    fi
-  done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
-  ;;
-esac])
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
-  AC_MSG_RESULT($MAGIC_CMD)
-else
-  AC_MSG_RESULT(no)
-fi
-])# AC_PATH_TOOL_PREFIX
-
-
-# AC_PATH_MAGIC
-# -------------
-# find a file program which can recognise a shared library
-AC_DEFUN([AC_PATH_MAGIC],
-[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
-if test -z "$lt_cv_path_MAGIC_CMD"; then
-  if test -n "$ac_tool_prefix"; then
-    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
-  else
-    MAGIC_CMD=:
-  fi
-fi
-])# AC_PATH_MAGIC
-
-
-# AC_PROG_LD
-# ----------
-# find the path to the GNU or non-GNU linker
-AC_DEFUN([AC_PROG_LD],
-[AC_ARG_WITH([gnu-ld],
-    [AC_HELP_STRING([--with-gnu-ld],
-	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
-    [test "$withval" = no || with_gnu_ld=yes],
-    [with_gnu_ld=no])
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-ac_prog=ld
-if test "$GCC" = yes; then
-  # Check if gcc -print-prog-name=ld gives a path.
-  AC_MSG_CHECKING([for ld used by GCC])
-  case $host in
-  *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
-    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
-  *)
-    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
-  esac
-  case $ac_prog in
-    # Accept absolute paths.
-    [[\\/]]* | ?:[[\\/]]*)
-      re_direlt='/[[^/]][[^/]]*/\.\./'
-      # Canonicalize the path of ld
-      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
-      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
-	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
-      done
-      test -z "$LD" && LD="$ac_prog"
-      ;;
-  "")
-    # If it fails, then pretend we aren't using GCC.
-    ac_prog=ld
-    ;;
-  *)
-    # If it is relative, then search for the first ld in PATH.
-    with_gnu_ld=unknown
-    ;;
-  esac
-elif test "$with_gnu_ld" = yes; then
-  AC_MSG_CHECKING([for GNU ld])
-else
-  AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(lt_cv_path_LD,
-[if test -z "$LD"; then
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for ac_dir in $PATH; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      lt_cv_path_LD="$ac_dir/$ac_prog"
-      # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some GNU ld's only accept -v.
-      # Break only if it was the GNU/non-GNU ld that we prefer.
-      if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
-	test "$with_gnu_ld" != no && break
-      else
-	test "$with_gnu_ld" != yes && break
-      fi
-    fi
-  done
-  IFS="$lt_save_ifs"
-else
-  lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
-  AC_MSG_RESULT($LD)
-else
-  AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_PROG_LD_GNU
-])# AC_PROG_LD
-
-
-# AC_PROG_LD_GNU
-# --------------
-AC_DEFUN([AC_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
-  lt_cv_prog_gnu_ld=yes
-else
-  lt_cv_prog_gnu_ld=no
-fi])
-with_gnu_ld=$lt_cv_prog_gnu_ld
-])# AC_PROG_LD_GNU
-
-
-# AC_PROG_LD_RELOAD_FLAG
-# ----------------------
-# find reload flag for linker
-#   -- PORTME Some linkers may need a different reload flag.
-AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
-[AC_CACHE_CHECK([for $LD option to reload object files],
-  lt_cv_ld_reload_flag,
-  [lt_cv_ld_reload_flag='-r'])
-reload_flag=$lt_cv_ld_reload_flag
-case $reload_flag in
-"" | " "*) ;;
-*) reload_flag=" $reload_flag" ;;
-esac
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-])# AC_PROG_LD_RELOAD_FLAG
-
-
-# AC_DEPLIBS_CHECK_METHOD
-# -----------------------
-# how to check for library dependencies
-#  -- PORTME fill in with the dynamic library characteristics
-AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
-[AC_CACHE_CHECK([how to recognise dependant libraries],
-lt_cv_deplibs_check_method,
-[lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given egrep regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix4* | aix5*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-beos*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-bsdi4*)
-  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
-  lt_cv_file_magic_cmd='/usr/bin/file -L'
-  lt_cv_file_magic_test_file=/shlib/libc.so
-  ;;
-
-cygwin* | mingw* | pw32*)
-  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
-  lt_cv_file_magic_cmd='$OBJDUMP -f'
-  ;;
-
-darwin* | rhapsody*)
-  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
-  lt_cv_file_magic_cmd='/usr/bin/file -L'
-  case "$host_os" in
-  rhapsody* | darwin1.[[012]])
-    lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
-    ;;
-  *) # Darwin 1.3 on
-    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
-    ;;
-  esac
-  ;;
-
-freebsd*)
-  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
-    case $host_cpu in
-    i*86 )
-      # Not sure whether the presence of OpenBSD here was a mistake.
-      # Let's accept both of them until this is cleared up.
-      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
-      lt_cv_file_magic_cmd=/usr/bin/file
-      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
-      ;;
-    esac
-  else
-    lt_cv_deplibs_check_method=pass_all
-  fi
-  ;;
-
-gnu*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-hpux10.20* | hpux11*)
-  lt_cv_file_magic_cmd=/usr/bin/file
-  if test "$host_cpu" = ia64; then
-    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
-    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
-  else
-    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
-    lt_cv_file_magic_test_file=/usr/lib/libc.sl
-  fi
-  ;;
-
-irix5* | irix6* | nonstopux*)
-  case $host_os in
-  irix5* | nonstopux*)
-    # this will be overridden with pass_all, but let us keep it just in case
-    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
-    ;;
-  *)
-    case $LD in
-    *-32|*"-32 ") libmagic=32-bit;;
-    *-n32|*"-n32 ") libmagic=N32;;
-    *-64|*"-64 ") libmagic=64-bit;;
-    *) libmagic=never-match;;
-    esac
-    # this will be overridden with pass_all, but let us keep it just in case
-    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
-    ;;
-  esac
-  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-# This must be Linux ELF.
-linux*)
-  case $host_cpu in
-  alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh* | x86_64* )
-    lt_cv_deplibs_check_method=pass_all ;;
-  *)
-    # glibc up to 2.1.1 does not perform some relocations on ARM
-    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
-  esac
-  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
-  ;;
-
-netbsd*)
-  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
-  else
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
-  fi
-  ;;
-
-newos6*)
-  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
-  lt_cv_file_magic_cmd=/usr/bin/file
-  lt_cv_file_magic_test_file=/usr/lib/libnls.so
-  ;;
-
-nto-qnx)
-  lt_cv_deplibs_check_method=unknown
-  ;;
-
-openbsd*)
-  lt_cv_file_magic_cmd=/usr/bin/file
-  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
-  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
-  else
-    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
-  fi
-  ;;
-
-osf3* | osf4* | osf5*)
-  # this will be overridden with pass_all, but let us keep it just in case
-  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
-  lt_cv_file_magic_test_file=/shlib/libc.so
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-sco3.2v5*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-solaris*)
-  lt_cv_deplibs_check_method=pass_all
-  lt_cv_file_magic_test_file=/lib/libc.so
-  ;;
-
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-  case $host_vendor in
-  motorola)
-    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
-    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
-    ;;
-  ncr)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  sequent)
-    lt_cv_file_magic_cmd='/bin/file'
-    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
-    ;;
-  sni)
-    lt_cv_file_magic_cmd='/bin/file'
-    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
-    lt_cv_file_magic_test_file=/lib/libc.so
-    ;;
-  esac
-  ;;
-
-sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-esac
-])
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
-])# AC_DEPLIBS_CHECK_METHOD
-
-
-# AC_PROG_NM
-# ----------
-# find the path to a BSD-compatible name lister
-AC_DEFUN([AC_PROG_NM],
-[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
-[if test -n "$NM"; then
-  # Let the user override the test.
-  lt_cv_path_NM="$NM"
-else
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
-    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
-      # Check to see if the nm accepts a BSD-compat flag.
-      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
-      #   nm: unknown option "B" ignored
-      # Tru64's nm complains that /dev/null is an invalid object file
-      if ("$tmp_nm" -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
-	lt_cv_path_NM="$tmp_nm -B"
-	break
-      elif ("$tmp_nm" -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
-	lt_cv_path_NM="$tmp_nm -p"
-	break
-      else
-	lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
-	continue # so that we can try to find one that supports BSD flags
-      fi
-    fi
-  done
-  IFS="$lt_save_ifs"
-  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
-fi])
-NM="$lt_cv_path_NM"
-])# AC_PROG_NM
-
-
-# AC_CHECK_LIBM
-# -------------
-# check for math library
-AC_DEFUN([AC_CHECK_LIBM],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32*)
-  # These system don't have libm
-  ;;
-*-ncr-sysv4.3*)
-  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
-  AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
-  ;;
-*)
-  AC_CHECK_LIB(m, main, LIBM="-lm")
-  ;;
-esac
-])# AC_CHECK_LIBM
-
-
-# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
-# -----------------------------------
-# sets LIBLTDL to the link flags for the libltdl convenience library and
-# LTDLINCL to the include flags for the libltdl header and adds
-# --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
-# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
-# DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
-# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
-# '${top_srcdir}/' (note the single quotes!).  If your package is not
-# flat and you're not using automake, define top_builddir and
-# top_srcdir appropriately in the Makefiles.
-AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-  case $enable_ltdl_convenience in
-  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
-  "") enable_ltdl_convenience=yes
-      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
-  esac
-  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
-  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
-  # For backwards non-gettext consistent compatibility...
-  INCLTDL="$LTDLINCL"
-])# AC_LIBLTDL_CONVENIENCE
-
-
-# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
-# -----------------------------------
-# sets LIBLTDL to the link flags for the libltdl installable library and
-# LTDLINCL to the include flags for the libltdl header and adds
-# --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
-# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
-# DIRECTORY is not provided and an installed libltdl is not found, it is
-# assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
-# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
-# quotes!).  If your package is not flat and you're not using automake,
-# define top_builddir and top_srcdir appropriately in the Makefiles.
-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
-AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-  AC_CHECK_LIB(ltdl, main,
-  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
-  [if test x"$enable_ltdl_install" = xno; then
-     AC_MSG_WARN([libltdl not installed, but installation disabled])
-   else
-     enable_ltdl_install=yes
-   fi
-  ])
-  if test x"$enable_ltdl_install" = x"yes"; then
-    ac_configure_args="$ac_configure_args --enable-ltdl-install"
-    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
-    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
-  else
-    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
-    LIBLTDL="-lltdl"
-    LTDLINCL=
-  fi
-  # For backwards non-gettext consistent compatibility...
-  INCLTDL="$LTDLINCL"
-])# AC_LIBLTDL_INSTALLABLE
-
-
-# If this macro is not defined by Autoconf, define it here.
-ifdef([AC_PROVIDE_IFELSE],
-      [],
-      [define([AC_PROVIDE_IFELSE],
-	      [ifdef([AC_PROVIDE_$1],
-		     [$2], [$3])])])
-
-
-# AC_LIBTOOL_CXX
-# --------------
-# enable support for C++ libraries
-AC_DEFUN([AC_LIBTOOL_CXX],
-[AC_REQUIRE([_LT_AC_LANG_CXX])
-])# AC_LIBTOOL_CXX
-
-
-# _LT_AC_LANG_CXX
-# ---------------
-AC_DEFUN([_LT_AC_LANG_CXX],
-[AC_REQUIRE([AC_PROG_CXX])
-AC_REQUIRE([AC_PROG_CXXCPP])
-])# _LT_AC_LANG_CXX
-
-
-# AC_LIBTOOL_GCJ
-# --------------
-# enable support for GCJ libraries
-AC_DEFUN([AC_LIBTOOL_GCJ],
-[AC_REQUIRE([_LT_AC_LANG_GCJ])
-])# AC_LIBTOOL_GCJ
-
-
-# _LT_AC_LANG_GCJ
-# ---------------
-AC_DEFUN([_LT_AC_LANG_GCJ],
-[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
-  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
-    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
-      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
-	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
-	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
-])# _LT_AC_LANG_GCJ
-
-
-# AC_LIBTOOL_RC
-# --------------
-# enable support for Windows resource files
-AC_DEFUN([AC_LIBTOOL_RC],
-[AC_REQUIRE([AC_PROG_RC])
-])# AC_LIBTOOL_RC
-
-
-# AC_LIBTOOL_LANG_C_CONFIG
-# ------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined.  Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
-AC_DEFUN([_LT_AC_LANG_C_CONFIG],
-[lt_save_CC="$CC"
-AC_LANG_PUSH(C)
-
-# Source file extension for C test sources.
-ac_ext=c
-
-# Object file extension for compiled C test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='main(){return(0);}'
-
-_LT_AC_SYS_COMPILER
-
-#
-# Check for any special shared library compilation flags.
-#
-_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
-if test "$GCC" = no; then
-  case $host_os in
-  sco3.2v5*)
-    _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
-    ;;
-  esac
-fi
-if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
-  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
-  if echo "$old_CC $old_CFLAGS " | egrep -e "[[ 	]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ 	]]" >/dev/null; then :
-  else
-    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
-    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
-  fi
-fi
-
-
-#
-# Check to make sure the static flag actually works.
-#
-AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
-  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
-  $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
-  [],
-  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
-
-
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
-AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-AC_LIBTOOL_SYS_LIB_STRIP
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_DLOPEN_SELF($1)
-
-# Report which librarie types wil actually be built
-AC_MSG_CHECKING([if libtool supports shared libraries])
-AC_MSG_RESULT([$can_build_shared])
-
-AC_MSG_CHECKING([whether to build shared libraries])
-test "$can_build_shared" = "no" && enable_shared=no
-
-# On AIX, shared libraries and static libraries use the same namespace, and
-# are all built from PIC.
-case "$host_os" in
-aix3*)
-  test "$enable_shared" = yes && enable_static=no
-  if test -n "$RANLIB"; then
-    archive_cmds="$archive_cmds~\$RANLIB \$lib"
-    postinstall_cmds='$RANLIB $lib'
-  fi
-  ;;
-
-aix4*)
-  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-    test "$enable_shared" = yes && enable_static=no
-  fi
-  ;;
-esac
-AC_MSG_RESULT([$enable_shared])
-
-AC_MSG_CHECKING([whether to build static libraries])
-# Make sure either enable_shared or enable_static is yes.
-test "$enable_shared" = yes || enable_static=yes
-AC_MSG_RESULT([$enable_static])
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_POP
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_C_CONFIG
-
-
-# AC_LIBTOOL_LANG_CXX_CONFIG
-# --------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined.  Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
-AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
-[AC_LANG_PUSH(C++)
-AC_REQUIRE([AC_PROG_CXX])
-AC_REQUIRE([AC_PROG_CXXCPP])
-
-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_AC_TAGVAR(allow_undefined_flag, $1)=
-_LT_AC_TAGVAR(always_export_symbols, $1)=no
-_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
-_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_AC_TAGVAR(hardcode_direct, $1)=no
-_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
-_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_AC_TAGVAR(no_undefined_flag, $1)=
-_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-
-# Dependencies to place before and after the object being linked:
-_LT_AC_TAGVAR(predep_objects, $1)=
-_LT_AC_TAGVAR(postdep_objects, $1)=
-_LT_AC_TAGVAR(predeps, $1)=
-_LT_AC_TAGVAR(postdeps, $1)=
-_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
-
-# Source file extension for C test sources.
-ac_ext=cc
-
-# Object file extension for compiled C test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(int char *[]) { return(0); }'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${CXX-"c++"}
-set dummy $CC
-compiler="[$]2"
-_LT_AC_TAGVAR(compiler, $1)=$CC
-cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
-
-# We don't want -fno-exception wen compiling C++ code, so set the
-# no_builtin_flag separately
-if test "$GXX" = yes; then
-  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
-else
-  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-fi
-
-if test "$GXX" = yes; then
-  # Set up default GNU C++ configuration
-
-  # Check if GNU C++ uses GNU ld as the underlying linker, since the
-  # archiving commands below assume that GNU ld is being used.
-  if eval "`$CC -print-prog-name=ld` --version 2>&1" | \
-      egrep 'GNU ld' > /dev/null; then
-    with_gnu_ld=yes
-
-    _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(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
-    # If archive_cmds runs LD, not CC, wlarc should be empty
-    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
-    #     investigate it a little bit more. (MM)
-    wlarc='${wl}'
-
-    # ancient GNU ld didn't support --whole-archive et. al.
-    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
-	egrep 'no-whole-archive' > /dev/null; then
-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-    else
-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-    fi
-  else
-    with_gnu_ld=no
-    wlarc=
-
-    # A generic and very simple default shared library creation
-    # command for GNU C++ for the case where it uses the native
-    # 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 $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-  fi
-
-  # Commands to make compiler produce verbose output that lists
-  # what "hidden" libraries, object files and flags are used when
-  # linking a shared library.
-  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
-
-else
-  GXX=no
-  with_gnu_ld=no
-  wlarc=
-fi
-
-# PORTME: fill in a description of your system's C++ link characteristics
-AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-_LT_AC_TAGVAR(ld_shlibs, $1)=yes
-case $host_os in
-  aix3*)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  aix4* | aix5*)
-    if test "$host_cpu" = ia64; then
-      # On IA64, the linker does run time linking by default, so we don't
-      # have to do anything special.
-      aix_use_runtimelinking=no
-      exp_sym_flag='-Bexport'
-      no_entry_flag=""
-    else
-      # KDE requires run time linking.  Make it the default.
-      aix_use_runtimelinking=yes
-      exp_sym_flag='-bexport'
-      no_entry_flag='-bnoentry'
-    fi
-
-    # When large executables or shared objects are built, AIX ld can
-    # have problems creating the table of contents.  If linking a library
-    # or program results in "error TOC overflow" add -mminimal-toc to
-    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
-    _LT_AC_TAGVAR(archive_cmds, $1)=''
-    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
-    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-
-    if test "$GXX" = yes; then
-      case $host_os in aix4.[012]|aix4.[012].*)
-      # We only want to do this on AIX 4.2 and lower, the check
-      # below for broken collect2 doesn't work under 4.3+
-	collect2name=`${CC} -print-prog-name=collect2`
-	if test -f "$collect2name" && \
-	   strings "$collect2name" | grep resolve_lib_name >/dev/null
-	then
-	  # We have reworked collect2
-	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-	else
-	  # We have old collect2
-	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
-	  # It fails to find uninstalled libraries when the uninstalled
-	  # path is not listed in the libpath.  Setting hardcode_minus_L
-	  # to unsupported forces relinking
-	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-	fi
-      esac
-      shared_flag='-shared'
-    else
-      # not using gcc
-      if test "$host_cpu" = ia64; then
-	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-	# chokes on -Wl,-G. The following line is correct:
-	shared_flag='-G'
-      else
-	if test "$aix_use_runtimelinking" = yes; then
-	  shared_flag='-qmkshrobj ${wl}-G'
-	else
-	  shared_flag='-qmkshrobj'
-	fi
-      fi
-    fi
-
-    # Let the compiler handle the export list.
-    _LT_AC_TAGVAR(always_export_symbols, $1)=no
-    if test "$aix_use_runtimelinking" = yes; then
-      # Warning - without using the other runtime loading flags (-brtl),
-      # -berok will link without error, but may produce a broken library.
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
-      # 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:'"$aix_libpath"
-
-      _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-     else
-      if test "$host_cpu" = ia64; then
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
-      else
-	# 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:'"$aix_libpath"
-	# Warning - without using the other run time loading flags,
-	# -berok will link without error, but may produce a broken library.
-	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-	# -bexpall does not export symbols beginning with underscore (_)
-	_LT_AC_TAGVAR(always_export_symbols, $1)=yes
-	# Exported symbols can be pulled into shared objects from archives
-	_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)="\$CC $shared_flag"' -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'
-      fi
-    fi
-    ;;
-  chorus*)
-    case $cc_basename in
-      *)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-    esac
-    ;;
-  dgux*)
-    case $cc_basename in
-      ec++)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      ghcx)
-	# Green Hills C++ Compiler
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      *)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-    esac
-    ;;
-  freebsd[12]*)
-    # C++ shared libraries reported to be fairly broken before switch to ELF
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  freebsd-elf*)
-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-    ;;
-  freebsd*)
-    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
-    # conventions
-    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
-    ;;
-  gnu*)
-    ;;
-  hpux*)
-    if test $with_gnu_ld = no; then
-      if test "$host_cpu" = ia64; then
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      else
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-      fi
-    fi
-    if test "$host_cpu" = ia64; then
-      _LT_AC_TAGVAR(hardcode_direct, $1)=no
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-    else
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-    fi
-    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
-					    # but as the default
-					    # location of the library.
-
-    case $cc_basename in
-      CC)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      aCC)
-	case $host_os in
-	hpux9*)
-	  _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'
-	  ;;
-	*)
-	  if test "$host_cpu" = ia64; then
-	    _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
-	  else
-	    _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'
-	  fi
-	  ;;
-	esac
-	# Commands to make compiler produce verbose output that lists
-	# what "hidden" libraries, object files and flags are used when
-	# linking a shared library.
-	#
-	# There doesn't appear to be a way to prevent this compiler from
-	# explicitly linking system object files so we need to strip them
-	# from the output so that they don't get included in the library
-	# dependencies.
-	output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-	;;
-      *)
-	if test "$GXX" = yes; then
-	  if test $with_gnu_ld = no; then
-	    case $host_os in
-	    hpux9*)
-	      _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'
-	      ;;
-	    *)
-	      if test "$host_cpu" = ia64; then
-		_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
-	      else
-		_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'
-	      fi
-	      ;;
-	    esac
-	  fi
-	else
-	  # FIXME: insert proper C++ library support
-	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
-	fi
-	;;
-    esac
-    ;;
-  irix5* | irix6*)
-    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 "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
-
-	# Archives containing C++ object files must be created using
-	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
-	# necessary to make sure instantiated templates are included
-	# in the archive.
-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
-	;;
-      *)
-	if test "$GXX" = yes; then
-	  if test "$with_gnu_ld" = 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 "$verstring" && 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 $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
-	  fi
-	fi
-	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-	;;
-    esac
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-    ;;
-  linux*)
-    case $cc_basename in
-      KCC)
-	# Kuck and Associates, Inc. (KAI) C++ Compiler
-
-	# KCC will only create a shared library if the output file
-	# ends with ".so" (or ".sl" for HP-UX), so rename the library
-	# to its proper name (with version) after linking.
-	_LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
-
-	# Commands to make compiler produce verbose output that lists
-	# what "hidden" libraries, object files and flags are used when
-	# linking a shared library.
-	#
-	# There doesn't appear to be a way to prevent this compiler from
-	# explicitly linking system object files so we need to strip them
-	# from the output so that they don't get included in the library
-	# dependencies.
-	output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
-	# Archives containing C++ object files must be created using
-	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
-	;;
-      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'
-
-	runpath_var=LD_RUN_PATH
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-	# Commands to make compiler produce verbose output that lists
-	# what "hidden" libraries, object files and flags are used when
-	# linking a shared library.
-	#
-	# There doesn't appear to be a way to prevent this compiler from
-	# explicitly linking system object files so we need to strip them
-	# from the output so that they don't get included in the library
-	# dependencies.
-	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-	;;
-    esac
-    ;;
-  lynxos*)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  m88k*)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  mvs*)
-    case $cc_basename in
-      cxx)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      *)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-    esac
-    ;;
-  netbsd*)
-    # NetBSD uses g++ - do we need to do anything?
-    ;;
-  osf3*)
-    case $cc_basename in
-      KCC)
-	# Kuck and Associates, Inc. (KAI) C++ Compiler
-
-	# KCC will only create a shared library if the output file
-	# ends with ".so" (or ".sl" for HP-UX), so rename the library
-	# to its proper name (with version) after linking.
-	_LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --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)=:
-
-	# Archives containing C++ object files must be created using
-	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
-
-	;;
-      RCC)
-	# Rational C++ 2.4.1
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      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 "$verstring" && 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)=:
-
-	# Commands to make compiler produce verbose output that lists
-	# what "hidden" libraries, object files and flags are used when
-	# linking a shared library.
-	#
-	# There doesn't appear to be a way to prevent this compiler from
-	# explicitly linking system object files so we need to strip them
-	# from the output so that they don't get included in the library
-	# dependencies.
-	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-	;;
-      *)
-	if test "$GXX" = yes && test "$with_gnu_ld" = 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 "$verstring" && 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)=:
-
-	  # Commands to make compiler produce verbose output that lists
-	  # what "hidden" libraries, object files and flags are used when
-	  # linking a shared library.
-	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
-
-	else
-	  # FIXME: insert proper C++ library support
-	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
-	fi
-	;;
-    esac
-    ;;
-  osf4* | osf5*)
-    case $cc_basename in
-      KCC)
-	# Kuck and Associates, Inc. (KAI) C++ Compiler
-
-	# KCC will only create a shared library if the output file
-	# ends with ".so" (or ".sl" for HP-UX), so rename the library
-	# to its proper name (with version) after linking.
-	_LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --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)=:
-
-	# Archives containing C++ object files must be created using
-	# the KAI C++ compiler.
-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
-	;;
-      RCC)
-	# Rational C++ 2.4.1
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      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 "$verstring" && 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 "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done~
-	  echo "-hidden">> $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 "$verstring" && echo -set_version	$verstring` -update_registry $objdir/so_locations -o $lib~
-	  $rm $lib.exp'
-
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-	# Commands to make compiler produce verbose output that lists
-	# what "hidden" libraries, object files and flags are used when
-	# linking a shared library.
-	#
-	# There doesn't appear to be a way to prevent this compiler from
-	# explicitly linking system object files so we need to strip them
-	# from the output so that they don't get included in the library
-	# dependencies.
-	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-	;;
-      *)
-	if test "$GXX" = yes && test "$with_gnu_ld" = 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 "$verstring" && 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)=:
-
-	  # Commands to make compiler produce verbose output that lists
-	  # what "hidden" libraries, object files and flags are used when
-	  # linking a shared library.
-	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
-
-	else
-	  # FIXME: insert proper C++ library support
-	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
-	fi
-	;;
-    esac
-    ;;
-  psos*)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  sco*)
-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-    case $cc_basename in
-      CC)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      *)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-    esac
-    ;;
-  sunos4*)
-    case $cc_basename in
-      CC)
-	# Sun C++ 4.x
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      lcc)
-	# Lucid
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      *)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-    esac
-    ;;
-  solaris*)
-    case $cc_basename 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_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $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'
-
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-	case $host_os in
-	  solaris2.[0-5] | solaris2.[0-5].*) ;;
-	  *)
-	    # The C++ compiler is used as linker so we must use $wl
-	    # flag to pass the commands to the underlying system
-	    # linker.
-	    # Supported since Solaris 2.6 (maybe 2.5.1?)
-	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
-	    ;;
-	esac
-	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-
-	# Commands to make compiler produce verbose output that lists
-	# what "hidden" libraries, object files and flags are used when
-	# linking a shared library.
-	#
-	# There doesn't appear to be a way to prevent this compiler from
-	# explicitly linking system object files so we need to strip them
-	# from the output so that they don't get included in the library
-	# dependencies.
-	output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-
-	# Archives containing C++ object files must be created using
-	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
-	# necessary to make sure instantiated templates are included
-	# in the archive.
-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
-	;;
-      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'
-
-	# The C++ compiler must be used to create the archive.
-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
-	;;
-      *)
-	# GNU C++ compiler with Solaris linker
-	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
-	  if $CC --version | egrep -v '^2\.7' > /dev/null; then
-	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
-	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
-
-	    # Commands to make compiler produce verbose output that lists
-	    # what "hidden" libraries, object files and flags are used when
-	    # linking a shared library.
-	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
-	  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 $linker_flags ${wl}-h $wl$soname -o $lib'
-	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
-
-	    # Commands to make compiler produce verbose output that lists
-	    # what "hidden" libraries, object files and flags are used when
-	    # linking a shared library.
-	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
-	  fi
-
-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
-	fi
-	;;
-    esac
-    ;;
-  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-    ;;
-  tandem*)
-    case $cc_basename in
-      NCC)
-	# NonStop-UX NCC 3.20
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      *)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-    esac
-    ;;
-  vxworks*)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  *)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-esac
-AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
-# Figure out "hidden" C++ library dependencies from verbose
-# compiler output whening linking a shared library.
-cat > conftest.$ac_ext <<EOF
-class Foo
-{
-public:
-  Foo (void) { a = 0; }
-private:
-  int a;
-};
-EOF
-
-
-if AC_TRY_EVAL(ac_compile); then
-  # Parse the compiler output and extract the necessary
-  # objects, libraries and library flags.
-
-  # Sentinel used to keep track of whether or not we are before
-  # the conftest object file.
-  pre_test_object_deps_done=no
-
-  # The `*' in the case matches for architectures that use `case' in
-  # $output_verbose_cmd can trigger glob expansion during the loop
-  # eval without this substitution.
-  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
-
-  for p in `eval $output_verbose_link_cmd`; do
-    case $p in
-
-    -L* | -R* | -l*)
-       # Some compilers place space between "-{L,R}" and the path.
-       # Remove the space.
-       if test $p = "-L" \
-	  || test $p = "-R"; then
-	 prev=$p
-	 continue
-       else
-	 prev=
-       fi
-
-       if test "$pre_test_object_deps_done" = no; then
-	 case $p in
-	 -L* | -R*)
-	   # Internal compiler library paths should come after those
-	   # provided the user.  The postdeps already come after the
-	   # user supplied libs so there is no need to process them.
-	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
-	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
-	   else
-	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
-	   fi
-	   ;;
-	 # The "-l" case would never come before the object being
-	 # linked, so don't bother handling this case.
-	 esac
-       else
-	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
-	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
-	 else
-	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
-	 fi
-       fi
-       ;;
-
-    *.$objext|*.$libext)
-       # This assumes that the test object file only shows up
-       # once in the compiler output.
-       if test "$p" = "conftest.$objext"; then
-	 pre_test_object_deps_done=yes
-	 continue
-       fi
-
-       if test "$pre_test_object_deps_done" = no; then
-	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
-	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
-	 else
-	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
-	 fi
-       else
-	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
-	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
-	 else
-	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
-	 fi
-       fi
-       ;;
-
-    *) ;; # Ignore the rest.
-
-    esac
-  done
-
-  # Clean up.
-  rm -f a.out
-else
-  echo "libtool.m4: error: problem compiling C++ test program"
-fi
-
-$rm -f confest.$objext
-
-case " $_LT_AC_TAGVAR(postdeps, $1) " in
-*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
-*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ;;
-esac
-
-_LT_AC_TAGVAR(GCC, $1)="$GXX"
-_LT_AC_TAGVAR(LD, $1)="$LD"
-
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-AC_LIBTOOL_SYS_LIB_STRIP
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_DLOPEN_SELF($1)
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_POP
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_CXX_CONFIG
-
-
-# AC_LIBTOOL_LANG_GCJ_CONFIG
-# --------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined.  Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
-AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
-[AC_LANG_SAVE
-
-# Source file extension for C test sources.
-ac_ext=java
-
-# Object file extension for compiled C test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${GCJ-"gcj"}
-set dummy $CC
-compiler="[$]2"
-_LT_AC_TAGVAR(compiler, $1)=$CC
-
-# GCJ did not exist at the time GCC didn't implicitly link libc in.
-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
-AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-AC_LIBTOOL_SYS_LIB_STRIP
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_DLOPEN_SELF($1)
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_RESTORE
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_GCJ_CONFIG
-
-
-# AC_LIBTOOL_LANG_RC_CONFIG
-# --------------------------
-# Ensure that the configuration vars for the Windows resource compiler are
-# suitably defined.  Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
-AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
-[AC_LANG_SAVE
-
-# Source file extension for RC test sources.
-ac_ext=rc
-
-# Object file extension for compiled RC test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
-
-# Code to be used in simple link tests
-lt_simple_link_test_code="$lt_simple_compile_test_code"
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${RC-"windres"}
-set dummy $CC
-compiler="[$]2"
-_LT_AC_TAGVAR(compiler, $1)=$CC
-_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_RESTORE
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_RC_CONFIG
-
-
-# AC_LIBTOOL_CONFIG([TAGNAME])
-# ----------------------------
-# If TAGNAME is not passed, then create an initial libtool script
-# with a default configuration from the untagged config vars.  Otherwise
-# add code to config.status for appending the configuration named by
-# TAGNAME from the matching tagged config vars.
-AC_DEFUN([AC_LIBTOOL_CONFIG],
-[# The else clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
-  # Now quote all the things that may contain metacharacters while being
-  # careful not to overquote the AC_SUBSTed values.  We take copies of the
-  # variables and quote the copies for generation of the libtool script.
-  for var in echo old_CC old_CFLAGS AR AR_FLAGS RANLIB LN_S LTCC NM SED SHELL \
-    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
-    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
-    deplibs_check_method reload_flag reload_cmds need_locks \
-    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
-    lt_cv_sys_global_symbol_to_c_name_address \
-    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
-    old_postinstall_cmds old_postuninstall_cmds \
-    _LT_AC_TAGVAR(compiler, $1) \
-    _LT_AC_TAGVAR(CC, $1) \
-    _LT_AC_TAGVAR(LD, $1) \
-    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
-    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
-    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
-    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
-    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
-    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
-    _LT_AC_TAGVAR(old_archive_cmds, $1) \
-    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
-    _LT_AC_TAGVAR(predep_objects, $1) \
-    _LT_AC_TAGVAR(postdep_objects, $1) \
-    _LT_AC_TAGVAR(predeps, $1) \
-    _LT_AC_TAGVAR(postdeps, $1) \
-    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
-    _LT_AC_TAGVAR(archive_cmds, $1) \
-    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
-    _LT_AC_TAGVAR(postinstall_cmds, $1) \
-    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
-    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
-    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
-    _LT_AC_TAGVAR(no_undefined_flag, $1) \
-    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
-    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
-    _LT_AC_TAGVAR(exclude_expsyms, $1) \
-    _LT_AC_TAGVAR(include_expsyms, $1); do
-
-    case $var in
-    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
-    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
-    _LT_AC_TAGVAR(archive_cmds, $1) | \
-    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
-    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
-    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
-    extract_expsyms_cmds | reload_cmds | finish_cmds | \
-    postinstall_cmds | postuninstall_cmds | \
-    old_postinstall_cmds | old_postuninstall_cmds | \
-    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
-      # Double-quote double-evaled strings.
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
-      ;;
-    *)
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
-      ;;
-    esac
-  done
-
-  case $lt_echo in
-  *'\[$]0 --fallback-echo"')
-    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
-    ;;
-  esac
-
-ifelse([$1], [],
-  [cfgfile="${ofile}T"
-  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
-  $rm -f "$cfgfile"
-  AC_MSG_NOTICE([creating $ofile])],
-  [cfgfile="$ofile"])
-
-  cat <<__EOF__ >> "$cfgfile"
-ifelse([$1], [],
-[#! $SHELL
-
-# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
-# Free Software Foundation, Inc.
-#
-# This file is part of GNU Libtool:
-# Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
-#
-# 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
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# 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.
-#
-# 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.
-
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="sed -e s/^X//"
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
-
-# The names of the tagged configurations supported by this script.
-available_tags=
-
-# ### BEGIN LIBTOOL CONFIG],
-[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
-
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
-
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
-
-# The host system.
-host_alias=$host_alias
-host=$host
-
-# An echo program that does not interpret backslashes.
-echo=$lt_echo
-
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
-
-# A C compiler.
-LTCC=$lt_LTCC
-
-# A language-specific compiler.
-CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
-
-# Is the compiler the GNU C compiler?
-with_gcc=$_LT_AC_TAGVAR(GCC, $1)
-
-# The linker used to build libraries.
-LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
-
-# Whether we need hard or soft links.
-LN_S=$lt_LN_S
-
-# A BSD-compatible nm program.
-NM=$lt_NM
-
-# A sed program that does not truncate output.
-SED=$lt_SED
-
-# A symbol stripping program
-STRIP=$STRIP
-
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
-
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
-
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
-
-# Used on cygwin: assembler.
-AS="$AS"
-
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
-
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
-
-# How to pass a linker flag through the compiler.
-wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
-
-# Object file suffix (normally "o").
-objext="$ac_objext"
-
-# Old archive suffix (normally "a").
-libext="$libext"
-
-# Executable file suffix (normally "").
-exeext="$exeext"
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
-pic_mode=$pic_mode
-
-# What is the maximum length of a command?
-max_cmd_len=$lt_cv_sys_max_cmd_len
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
-
-# Must we lock files when doing compilation ?
-need_locks=$lt_need_locks
-
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
-
-# Do we need a version for libraries?
-need_version=$need_version
-
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
-
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
-
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
-
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
-
-# Library versioning type.
-version_type=$version_type
-
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
-
-# List of archive names.  First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=$lt_library_names_spec
-
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
-
-# Commands used to build and install an old-style archive.
-RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
-
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
-archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
-postinstall_cmds=$lt_postinstall_cmds
-postuninstall_cmds=$lt_postuninstall_cmds
-
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
-
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
-
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd=$lt_file_magic_cmd
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
-
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
-
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$lt_finish_eval
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
-
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
-
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
-
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
-
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
-
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
-
-# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
-
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
-
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
-
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
-
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
-
-# Set to yes if exported symbols are required.
-always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
-
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
-
-# Symbols that must always be exported.
-include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
-
-ifelse([$1],[],
-[# ### END LIBTOOL CONFIG],
-[# ### END LIBTOOL TAG CONFIG: $tagname])
-
-__EOF__
-
-ifelse([$1],[], [
-  case $host_os in
-  aix3*)
-    cat <<\EOF >> "$cfgfile"
-
-# AIX sometimes has problems with the GCC collect2 program.  For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
-  COLLECT_NAMES=
-  export COLLECT_NAMES
-fi
-EOF
-    ;;
-
-  cygwin* | mingw* | pw32* | os2*)
-    cat <<'EOF' >> "$cfgfile"
-    # This is a source program that is used to create dlls on Windows
-    # Don't remove nor modify the starting and closing comments
-    _LT_AC_FILE_LTDLL_C
-    # This is a source program that is used to create import libraries
-    # on Windows for dlls which lack them. Don't remove nor modify the
-    # starting and closing comments
-    _LT_AC_FILE_IMPGEN_C
-EOF
-    ;;
-  esac
-
-  # We use sed instead of cat because bash on DJGPP gets confused if
-  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
-  # text mode, it properly converts lines to CR/LF.  This bash problem
-  # is reportedly fixed, but why not run on old versions too?
-  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
-
-  mv -f "$cfgfile" "$ofile" || \
-    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
-  chmod +x "$ofile"
-])
-else
-  # If there is no Makefile yet, we rely on a make rule to execute
-  # `config.status --recheck' to rerun these tests and create the
-  # libtool script then.
-  test -f Makefile && make "$ltmain"
-fi
-])# AC_LIBTOOL_CONFIG
-
-
-# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
-# -------------------------------------------
-AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
-
-_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-
-if test "$GCC" = yes; then
-  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
-
-  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
-    lt_cv_prog_compiler_rtti_exceptions,
-    [-fno-rtti -fno-exceptions -c conftest.$ac_ext], [],
-    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
-fi
-])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
-
-
-# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-# ---------------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
-[AC_REQUIRE([AC_CANONICAL_HOST])
-AC_REQUIRE([AC_PROG_NM])
-AC_REQUIRE([AC_OBJEXT])
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-AC_MSG_CHECKING([command to parse $NM output from $compiler object])
-AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
-[
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
-
-# Character class describing NM global symbol codes.
-symcode='[[BCDEGRST]]'
-
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
-
-# Transform the above into a raw symbol and a C symbol.
-symxfrm='\1 \2\3 \3'
-
-# Transform an extracted symbol line into a proper C declaration
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
-
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
-
-# Define system-specific variables.
-case $host_os in
-aix*)
-  symcode='[[BCDT]]'
-  ;;
-cygwin* | mingw* | pw32*)
-  symcode='[[ABCDGISTW]]'
-  ;;
-hpux*) # Its linker distinguishes data from code symbols
-  if test "$host_cpu" = ia64; then
-    symcode='[[ABCDEGRST]]'
-  fi
-  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
-  ;;
-irix* | nonstopux*)
-  symcode='[[BCDEGRST]]'
-  ;;
-solaris* | sysv5*)
-  symcode='[[BDT]]'
-  ;;
-sysv4)
-  symcode='[[DFNSTU]]'
-  ;;
-esac
-
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $host_os in
-mingw*)
-  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
-  ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
-  symcode='[[ABCDGISTW]]'
-fi
-
-# Try without a prefix undercore, then with it.
-for ac_symprfx in "" "_"; do
-
-  # Write the raw and C identifiers.
-  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
-
-  # Check to see that the pipe works correctly.
-  pipe_works=no
-
-  rm -f conftest*
-  cat > conftest.$ac_ext <<EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-EOF
-
-  if AC_TRY_EVAL(ac_compile); then
-    # Now try to grab the symbols.
-    nlist=conftest.nm
-    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
-      # Try sorting and uniquifying the output.
-      if sort "$nlist" | uniq > "$nlist"T; then
-	mv -f "$nlist"T "$nlist"
-      else
-	rm -f "$nlist"T
-      fi
-
-      # Make sure that we snagged all the symbols we need.
-      if egrep ' nm_test_var$' "$nlist" >/dev/null; then
-	if egrep ' nm_test_func$' "$nlist" >/dev/null; then
-	  cat <<EOF > conftest.$ac_ext
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-EOF
-	  # Now generate the symbol file.
-	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
-
-	  cat <<EOF >> conftest.$ac_ext
-#if defined (__STDC__) && __STDC__
-# define lt_ptr_t void *
-#else
-# define lt_ptr_t char *
-# define const
-#endif
-
-/* The mapping between symbol names and symbols. */
-const struct {
-  const char *name;
-  lt_ptr_t address;
-}
-lt_preloaded_symbols[[]] =
-{
-EOF
-	  sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
-	  cat <<\EOF >> conftest.$ac_ext
-  {0, (lt_ptr_t) 0}
-};
-
-#ifdef __cplusplus
-}
-#endif
-EOF
-	  # Now try linking the two files.
-	  mv conftest.$ac_objext conftstm.$ac_objext
-	  lt_save_LIBS="$LIBS"
-	  lt_save_CFLAGS="$CFLAGS"
-	  LIBS="conftstm.$ac_objext"
-	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
-	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
-	    pipe_works=yes
-	  fi
-	  LIBS="$lt_save_LIBS"
-	  CFLAGS="$lt_save_CFLAGS"
-	else
-	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
-	fi
-      else
-	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
-      fi
-    else
-      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
-    fi
-  else
-    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
-    cat conftest.$ac_ext >&5
-  fi
-  rm -f conftest* conftst*
-
-  # Do not use the global_symbol_pipe unless it works.
-  if test "$pipe_works" = yes; then
-    break
-  else
-    lt_cv_sys_global_symbol_pipe=
-  fi
-done
-])
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
-  lt_cv_sys_global_symbol_to_cdecl=
-fi
-if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
-  AC_MSG_RESULT(failed)
-else
-  AC_MSG_RESULT(ok)
-fi
-]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-
-
-# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
-# ---------------------------------------
-AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
-[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
-_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
-
-AC_MSG_CHECKING([for $compiler option to produce PIC])
- ifelse([$1],[CXX],[
-  # C++ specific cases for pic, static, wl, etc.
-  if test "$GXX" = yes; then
-    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
-    case $host_os in
-    aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      fi
-      ;;
-    amigaos*)
-      # FIXME: we need at least 68020 code to build shared libraries, but
-      # adding the `-m68020' flag to GCC prevents building anything better,
-      # like `-m68040'.
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
-      ;;
-    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
-    cygwin* | mingw* | os2*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
-      ;;
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
-      ;;
-    *djgpp*)
-      # DJGPP does not support shared libraries at all
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-      ;;
-    sysv4*MP*)
-      if test -d /usr/nec; then
-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
-      fi
-      ;;
-    hpux*)
-      # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
-      if test "$host_cpu" != ia64; then
-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-      fi
-      ;;
-    *)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-      ;;
-    esac
-  else
-    case $host_os in
-      aix4* | aix5*)
-	# All AIX code is PIC.
-	if test "$host_cpu" = ia64; then
-	  # AIX 5 now supports IA64 processor
-	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	else
-	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
-	fi
-	;;
-      chorus*)
-	case $cc_basename in
-	cxch68)
-	  # Green Hills C++ Compiler
-	  # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
-	  ;;
-	esac
-	;;
-      dgux*)
-	case $cc_basename in
-	  ec++)
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	    ;;
-	  ghcx)
-	    # Green Hills C++ Compiler
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      freebsd*)
-	# FreeBSD uses GNU C++
-	;;
-      hpux9* | hpux10* | hpux11*)
-	case $cc_basename in
-	  CC)
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
-	    if test "$host_cpu" != ia64; then
-	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
-	    fi
-	    ;;
-	  aCC)
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
-	    if test "$host_cpu" != ia64; then
-	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
-	    fi
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      irix5* | irix6* | nonstopux*)
-	case $cc_basename in
-	  CC)
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-	    # CC pic flag -KPIC is the default.
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      linux*)
-	case $cc_basename in
-	  KCC)
-	    # KAI C++ Compiler
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-	    ;;
-	  cxx)
-	    # Compaq C++
-	    # Make sure the PIC flag is empty.  It appears that all Alpha
-	    # Linux and Compaq Tru64 Unix objects are PIC.
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      lynxos*)
-	;;
-      m88k*)
-	;;
-      mvs*)
-	case $cc_basename in
-	  cxx)
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      netbsd*)
-	;;
-      osf3* | osf4* | osf5*)
-	case $cc_basename in
-	  KCC)
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
-	    ;;
-	  RCC)
-	    # Rational C++ 2.4.1
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-	    ;;
-	  cxx)
-	    # Digital/Compaq C++
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    # Make sure the PIC flag is empty.  It appears that all Alpha
-	    # Linux and Compaq Tru64 Unix objects are PIC.
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      psos*)
-	;;
-      sco*)
-	case $cc_basename in
-	  CC)
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      solaris*)
-	case $cc_basename in
-	  CC)
-	    # Sun C++ 4.2, 5.x and Centerline C++
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
-	    ;;
-	  gcx)
-	    # Green Hills C++ Compiler
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      sunos4*)
-	case $cc_basename in
-	  CC)
-	    # Sun C++ 4.x
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	    ;;
-	  lcc)
-	    # Lucid
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      tandem*)
-	case $cc_basename in
-	  NCC)
-	    # NonStop-UX NCC 3.20
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      unixware*)
-	;;
-      vxworks*)
-	;;
-      *)
-	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-	;;
-    esac
-  fi
-],
-[
-  if test "$GCC" = yes; then
-    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
-    case $host_os in
-      aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      fi
-      ;;
-
-    amigaos*)
-      # FIXME: we need at least 68020 code to build shared libraries, but
-      # adding the `-m68020' flag to GCC prevents building anything better,
-      # like `-m68040'.
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
-      ;;
-
-    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
-
-    cygwin* | mingw* | pw32* | os2*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
-      ;;
-
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
-      ;;
-
-    msdosdjgpp*)
-      # Just because we use GCC doesn't mean we suddenly get shared libraries
-      # on systems that don't support them.
-      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-      enable_shared=no
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec; then
-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
-      fi
-      ;;
-
-    hpux*)
-      # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
-      if test "$host_cpu" != ia64; then
-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-      fi
-      ;;
-
-    *)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-      ;;
-    esac
-  else
-    # PORTME Check for flag to pass linker flags through the system compiler.
-    case $host_os in
-    aix*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      else
-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
-      fi
-      ;;
-
-    cygwin* | mingw* | pw32* | os2*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
-      ;;
-
-    hpux9* | hpux10* | hpux11*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      if test "$host_cpu" != ia64; then
-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
-      fi
-      # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
-      ;;
-
-    irix5* | irix6* | nonstopux*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      # PIC (with -KPIC) is the default.
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-      ;;
-
-    newsos6)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    osf3* | osf4* | osf5*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      # All OSF/1 code is PIC.
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-      ;;
-
-    sco3.2v5*)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
-      ;;
-
-    solaris*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    sunos4*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-      if test "x$host_vendor" = xsni; then
-	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-LD'
-      else
-	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      fi
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec ;then
-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      fi
-      ;;
-
-    uts4*)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    *)
-      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-      ;;
-    esac
-  fi
-])
-AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
-  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
-    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
-    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC], [],
-    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
-     "" | " "*) ;;
-     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
-     esac],
-    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
-fi
-case "$host_os" in
-  # For platforms which do not support PIC, -DPIC is meaningless:
-  *djgpp*)
-    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-    ;;
-  *)
-    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC"
-    ;;
-esac
-])
-
-
-# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
-# ------------------------------------
-# See if the linker supports building shared libraries.
-AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
-[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-ifelse([$1],[CXX],[
-  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  case $host_os in
-  aix4* | aix5*)
-    # If we're using GNU nm, then we don't want the "-C" option.
-    # -C means demangle to AIX nm, but means don't demangle with GNU nm
-    if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
-      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
-    else
-      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
-    fi
-    ;;
-  cygwin* | mingw* | pw32*)
-    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
-  ;;
-  *)
-    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  ;;
-  esac
-],[
-  runpath_var=
-  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
-
-  _LT_AC_TAGVAR(archive_cmds, $1)=
-  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=
-  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
-  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
-  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
-  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
-  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
-  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
-  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-  _LT_AC_TAGVAR(hardcode_direct, $1)=no
-  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
-  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
-  _LT_AC_TAGVAR(always_export_symbols, $1)=no
-  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  # include_expsyms should be a list of space-separated symbols to be *always*
-  # included in the symbol list
-  _LT_AC_TAGVAR(include_expsyms, $1)=
-  # exclude_expsyms can be an egrep regular expression of symbols to exclude
-  # it will be wrapped by ` (' and `)$', so one must not match beginning or
-  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-  # as well as any symbol that contains `d'.
-  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
-  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
-  # platforms (ab)use it in PIC code, but their linkers get confused if
-  # the symbol is explicitly referenced.  Since portable code cannot
-  # rely on this symbol name, it's probably fine to never include it in
-  # preloaded symbol tables.
-  extract_expsyms_cmds=
-
-  case $host_os in
-  cygwin* | mingw* | pw32*)
-    # FIXME: the MSVC++ port hasn't been tested in a loooong time
-    # When not using gcc, we currently assume that we are using
-    # Microsoft Visual C++.
-    if test "$GCC" != yes; then
-      with_gnu_ld=no
-    fi
-    ;;
-  openbsd*)
-    with_gnu_ld=no
-    ;;
-  esac
-
-  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
-  if test "$with_gnu_ld" = yes; then
-    # If archive_cmds runs LD, not CC, wlarc should be empty
-    wlarc='${wl}'
-
-    # See if GNU ld supports shared libraries.
-    case $host_os in
-    aix3* | aix4* | aix5*)
-      # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	cat <<EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
-
-EOF
-      fi
-      ;;
-
-    amigaos*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-
-      # Samuel A. Falvo II <kc5tja at dolphin.openprojects.net> reports
-      # that the semantics of dynamic libraries on AmigaOS, at least up
-      # to version 4, is to share data among multiple programs linked
-      # with the same dynamic library.  Since this doesn't match the
-      # behavior of shared libraries on other platforms, we can't use
-      # them.
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      ;;
-
-    beos*)
-      if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-	# Joseph Beckenbach <jrb3 at best.com> 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'
-      else
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    cygwin* | mingw* | pw32*)
-      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, as there is
-      # no search path for DLLs.
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
-
-      extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
-	sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
-	test -f $output_objdir/impgen.exe || (cd $output_objdir && \
-	if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
-	else $CC -o impgen impgen.c ; fi)~
-	$output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
-
-      _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
-
-      # cygwin and mingw dlls have different entry points and sets of symbols
-      # to exclude.
-      # FIXME: what about values for MSVC?
-      dll_entry=__cygwin_dll_entry at 12
-      dll_exclude_symbols=DllMain at 12,_cygwin_dll_entry at 12,_cygwin_noncygwin_dll_entry at 12~
-      case $host_os in
-      mingw*)
-	# mingw values
-	dll_entry=_DllMainCRTStartup at 12
-	dll_exclude_symbols=DllMain at 12,DllMainCRTStartup at 12,DllEntryPoint at 12~
-	;;
-      esac
-
-      # mingw and cygwin differ, and it's simplest to just exclude the union
-      # of the two symbol sets.
-      dll_exclude_symbols=DllMain at 12,_cygwin_dll_entry at 12,_cygwin_noncygwin_dll_entry at 12,DllMainCRTStartup at 12,DllEntryPoint at 12
-
-      # recent cygwin and mingw systems supply a stub DllMain which the user
-      # can override, but on older systems we have to supply one (in ltdll.c)
-      if test "x$lt_cv_need_dllmain" = "xyes"; then
-	ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
-	ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
-  	test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
-      else
-	ltdll_obj=
-	ltdll_cmds=
-      fi
-
-      # Extract the symbol export list from an `--export-all' def file,
-      # then regenerate the def file from the symbol export list, so that
-      # the compiled dll only exports the symbol export list.
-      # Be careful not to strip the DATA tag left by newer dlltools.
-      _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"'
-	$DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
-	sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
-
-      # If the export-symbols file already is a .def file (1st line
-      # is EXPORTS), use it as is.
-      # If DATA tags from a recent dlltool are present, honour them!
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`head -1 $export_symbols`" = xEXPORTS; then
-	  cp $export_symbols $output_objdir/$soname-def;
-	else
-	  echo EXPORTS > $output_objdir/$soname-def;
-	  _lt_hint=1;
-	  cat $export_symbols | while read symbol; do
-	   set dummy \$symbol;
-	   case \[$]# in
-	     2) echo "   \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
-	     *) echo "   \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
-	   esac;
-	   _lt_hint=`expr 1 + \$_lt_hint`;
-	  done;
-	fi~
-	'"$ltdll_cmds"'
-	$CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
-	$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
-	$CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
-	$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
-	$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
-      ;;
-
-    netbsd*)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
-	wlarc=
-      else
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      fi
-      ;;
-
-    solaris* | sysv5*)
-      if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	cat <<EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-EOF
-      elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /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'
-      else
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    sunos4*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      wlarc=
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    *)
-      if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /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'
-      else
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-    esac
-
-    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
-      runpath_var=LD_RUN_PATH
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-      case $host_os in
-      cygwin* | mingw* | pw32*)
-	# dlltool doesn't understand --whole-archive et. al.
-	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-	;;
-      *)
-	# ancient GNU ld didn't support --whole-archive et. al.
-	if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
-  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-	else
-  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-	fi
-	;;
-      esac
-    fi
-  else
-    # PORTME fill in a description of your system's linker (not GNU ld)
-    case $host_os in
-    aix3*)
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
-      # Note: this linker hardcodes the directories in LIBPATH if there
-      # are no directories specified by -L.
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      if test "$GCC" = yes && test -z "$link_static_flag"; then
-	# Neither direct hardcoding nor static linking is supported with a
-	# broken collect2.
-	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
-      fi
-      ;;
-
-    aix4* | aix5*)
-      if test "$host_cpu" = ia64; then
-	# On IA64, the linker does run time linking by default, so we don't
-	# have to do anything special.
-	aix_use_runtimelinking=no
-	exp_sym_flag='-Bexport'
-	no_entry_flag=""
-      else
-	# If we're using GNU nm, then we don't want the "-C" option.
-	# -C means demangle to AIX nm, but means don't demangle with GNU nm
-	if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
-	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
-	else
-	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
-	fi
-
-	# KDE requires run time linking.  Make it the default.
-	aix_use_runtimelinking=yes
-	exp_sym_flag='-bexport'
-	no_entry_flag='-bnoentry'
-      fi
-
-      # When large executables or shared objects are built, AIX ld can
-      # have problems creating the table of contents.  If linking a library
-      # or program results in "error TOC overflow" add -mminimal-toc to
-      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
-      _LT_AC_TAGVAR(archive_cmds, $1)=''
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-
-      if test "$GCC" = yes; then
-	case $host_os in aix4.[012]|aix4.[012].*)
-	# We only want to do this on AIX 4.2 and lower, the check
-	# below for broken collect2 doesn't work under 4.3+
-	  collect2name=`${CC} -print-prog-name=collect2`
-	  if test -f "$collect2name" && \
-  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
-	  then
-  	  # We have reworked collect2
-  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-	  else
-  	  # We have old collect2
-  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
-  	  # It fails to find uninstalled libraries when the uninstalled
-  	  # path is not listed in the libpath.  Setting hardcode_minus_L
-  	  # to unsupported forces relinking
-  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-	  fi
-	esac
-	shared_flag='-shared'
-      else
-	# not using gcc
-	if test "$host_cpu" = ia64; then
-  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-  	# chokes on -Wl,-G. The following line is correct:
-	  shared_flag='-G'
-	else
-  	if test "$aix_use_runtimelinking" = yes; then
-	    shared_flag='-qmkshrobj ${wl}-G'
-	  else
-	    shared_flag='-qmkshrobj'
-  	fi
-	fi
-      fi
-
-      # Let the compiler handle the export list.
-      _LT_AC_TAGVAR(always_export_symbols, $1)=no
-      if test "$aix_use_runtimelinking" = yes; then
-	# Warning - without using the other runtime loading flags (-brtl),
-	# -berok will link without error, but may produce a broken library.
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
-       # 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:'"$aix_libpath"
-	_LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-       else
-	if test "$host_cpu" = ia64; then
-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
-	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
-	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
-	else
-	 # 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:'"$aix_libpath"
-	  # Warning - without using the other run time loading flags,
-	  # -berok will link without error, but may produce a broken library.
-	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
-	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-	  # -bexpall does not export symbols beginning with underscore (_)
-	  _LT_AC_TAGVAR(always_export_symbols, $1)=yes
-	  # Exported symbols can be pulled into shared objects from archives
-	  _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)="\$CC $shared_flag"' -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'
-	fi
-      fi
-      ;;
-
-    amigaos*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      # see comment about different semantics on the GNU ld section
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      ;;
-
-    bsdi4*)
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
-      ;;
-
-    cygwin* | mingw* | pw32*)
-      # When not using gcc, we currently assume that we are using
-      # Microsoft Visual C++.
-      # hardcode_libdir_flag_spec is actually meaningless, as there is
-      # no search path for DLLs.
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-      # Tell ltmain to make .lib files, not .a files.
-      libext=lib
-      # FIXME: Setting linknames here is a bad hack.
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | 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.
-      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
-      fix_srcfile_path='`cygpath -w "$srcfile"`'
-      ;;
-
-    darwin* | rhapsody*)
-      case "$host_os" in
-      rhapsody* | darwin1.[[012]])
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
-	;;
-      *) # Darwin 1.3 on
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
-	;;
-      esac
-
-      # FIXME: Relying on posixy $() will cause problems for
-      #        cross-compilation, but unfortunately the echo tests do not
-      #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
-      #	       `"' quotes if we put them in here... so don't!
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
-      # We need to add '_' to the symbols in $export_symbols first
-      #_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
-      ;;
-
-    dgux*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    freebsd1*)
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      ;;
-
-    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
-    # support.  Future versions do this automatically, but an explicit c++rt0.o
-    # does not break anything, and helps significantly (at the cost of a little
-    # extra space).
-    freebsd2.2*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
-      _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
-      ;;
-
-    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    # 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'
-      _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
-      ;;
-
-    hpux9* | hpux10* | hpux11*)
-      if test "$GCC" = yes; then
-	case $host_os in
-	  hpux9*)
-	    _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'
-	    ;;
-	  *)
-	    if test "$host_cpu" = ia64; then
-	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	    else
-	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-	    fi
-	    ;;
-	esac
-      else
-	case $host_os in
-	  hpux9*)
-	    _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'
-	    ;;
-	  *)
-	    if test "$host_cpu" = ia64; then
-	      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
-	    else
-	      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
-	    fi
-	    ;;
-	esac
-      fi
-      if test "$host_cpu" = ia64; then
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-	_LT_AC_TAGVAR(hardcode_direct, $1)=no
-	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      else
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      fi
-      # hardcode_minus_L: Not really in the search PATH,
-      # but as the default location of the library.
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-      ;;
-
-    irix5* | irix6* | nonstopux*)
-      if test "$GCC" = yes; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && 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 "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-      fi
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-      ;;
-
-    netbsd*)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
-      else
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
-      fi
-      _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
-      ;;
-
-    newsos6)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    openbsd*)
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-
-      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-      else
-       case $host_os in
-	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
-	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-	   ;;
-	 *)
-	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
-	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	   ;;
-       esac
-      fi
-      ;;
-
-    os2*)
-      _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 "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $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 "$GCC" = 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 "$verstring" && 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 "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-      fi
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-      ;;
-
-    osf4* | osf5*)	# as osf3* with the addition of -msym flag
-      if test "$GCC" = 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 "$verstring" && 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 \*'
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
-	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
-
-	# Both c and cxx compiler support -rpath directly
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
-      fi
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-      ;;
-
-    sco3.2v5*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
-      runpath_var=LD_RUN_PATH
-      hardcode_runpath_var=yes
-      ;;
-
-    solaris*)
-      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
-      if test "$GCC" = yes; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$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 "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
-      fi
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      case $host_os in
-      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
-      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
-	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
-      esac
-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-      ;;
-
-    sunos4*)
-      if test "x$host_vendor" = 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'
-      else
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    sysv4)
-      if test "x$host_vendor" = xsni; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	_LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
-      else
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	_LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
-      fi
-      runpath_var='LD_RUN_PATH'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    sysv4.3*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-	runpath_var=LD_RUN_PATH
-	hardcode_runpath_var=yes
-	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
-      fi
-      ;;
-
-    sysv4.2uw2*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      hardcode_runpath_var=yes
-      runpath_var=LD_RUN_PATH
-      ;;
-
-   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
-      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
-      if test "$GCC" = yes; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      runpath_var='LD_RUN_PATH'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    sysv5*)
-      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
-      # $CC -shared without GNU ld will not create a library from C++
-      # object files and a static libstdc++, better avoid it by now
-      _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 "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-  		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      runpath_var='LD_RUN_PATH'
-      ;;
-
-    uts4*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    *)
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      ;;
-    esac
-  fi
-])
-AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
-  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-#
-# Do we need to explicitly link libc?
-#
-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
-if test "$enable_shared" = yes && test "$GCC" = yes; then
-  case $_LT_AC_TAGVAR(archive_cmds, $1) in
-  *'~'*)
-    # FIXME: we may have to deal with multi-command sequences.
-    ;;
-  '$CC '*)
-    # Test whether the compiler implicitly links with -lc since on some
-    # systems, -lgcc has to come before -lc. If gcc already passes -lc
-    # to ld, don't add -lc before -lgcc.
-    AC_MSG_CHECKING([whether -lc should be explicitly linked in])
-    $rm conftest*
-    echo 'static int dummy;' > conftest.$ac_ext
-
-    if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
-      soname=conftest
-      lib=conftest
-      libobjs=conftest.$ac_objext
-      deplibs=
-      wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
-      compiler_flags=-v
-      linker_flags=-v
-      verstring=
-      output_objdir=.
-      libname=conftest
-      lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=
-      if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
-      then
-	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-      else
-	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
-      fi
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
-    else
-      cat conftest.err 1>&5
-    fi
-    $rm conftest*
-    AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
-    ;;
-  esac
-fi
-])# AC_LIBTOOL_PROG_LD_SHLIBS
-
-
-# _LT_AC_FILE_LTDLL_C
-# -------------------
-# Be careful that the start marker always follows a newline.
-AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
-# /* ltdll.c starts here */
-# #define WIN32_LEAN_AND_MEAN
-# #include <windows.h>
-# #undef WIN32_LEAN_AND_MEAN
-# #include <stdio.h>
-#
-# #ifndef __CYGWIN__
-# #  ifdef __CYGWIN32__
-# #    define __CYGWIN__ __CYGWIN32__
-# #  endif
-# #endif
-#
-# #ifdef __cplusplus
-# extern "C" {
-# #endif
-# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
-# #ifdef __cplusplus
-# }
-# #endif
-#
-# #ifdef __CYGWIN__
-# #include <cygwin/cygwin_dll.h>
-# DECLARE_CYGWIN_DLL( DllMain );
-# #endif
-# HINSTANCE __hDllInstance_base;
-#
-# BOOL APIENTRY
-# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
-# {
-#   __hDllInstance_base = hInst;
-#   return TRUE;
-# }
-# /* ltdll.c ends here */
-])# _LT_AC_FILE_LTDLL_C
-
-
-# _LT_AC_FILE_IMPGEN_C
-# --------------------
-# Be careful that the start marker always follows a newline.
-AC_DEFUN([_LT_AC_FILE_IMPGEN_C], [
-# /* impgen.c starts here */
-# /*   Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
-#
-#  This file is part of GNU libtool.
-#
-#  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
-#  the Free Software Foundation; either version 2 of the License, or
-#  (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  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.
-#  */
-#
-# #include <stdio.h>		/* for printf() */
-# #include <unistd.h>		/* for open(), lseek(), read() */
-# #include <fcntl.h>		/* for O_RDONLY, O_BINARY */
-# #include <string.h>		/* for strdup() */
-#
-# /* O_BINARY isn't required (or even defined sometimes) under Unix */
-# #ifndef O_BINARY
-# #define O_BINARY 0
-# #endif
-#
-# static unsigned int
-# pe_get16 (fd, offset)
-#      int fd;
-#      int offset;
-# {
-#   unsigned char b[2];
-#   lseek (fd, offset, SEEK_SET);
-#   read (fd, b, 2);
-#   return b[0] + (b[1]<<8);
-# }
-#
-# static unsigned int
-# pe_get32 (fd, offset)
-#     int fd;
-#     int offset;
-# {
-#   unsigned char b[4];
-#   lseek (fd, offset, SEEK_SET);
-#   read (fd, b, 4);
-#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
-# }
-#
-# static unsigned int
-# pe_as32 (ptr)
-#      void *ptr;
-# {
-#   unsigned char *b = ptr;
-#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
-# }
-#
-# int
-# main (argc, argv)
-#     int argc;
-#     char *argv[];
-# {
-#     int dll;
-#     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
-#     unsigned long export_rva, export_size, nsections, secptr, expptr;
-#     unsigned long name_rvas, nexp;
-#     unsigned char *expdata, *erva;
-#     char *filename, *dll_name;
-#
-#     filename = argv[1];
-#
-#     dll = open(filename, O_RDONLY|O_BINARY);
-#     if (dll < 1)
-# 	return 1;
-#
-#     dll_name = filename;
-#
-#     for (i=0; filename[i]; i++)
-# 	if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
-# 	    dll_name = filename + i +1;
-#
-#     pe_header_offset = pe_get32 (dll, 0x3c);
-#     opthdr_ofs = pe_header_offset + 4 + 20;
-#     num_entries = pe_get32 (dll, opthdr_ofs + 92);
-#
-#     if (num_entries < 1) /* no exports */
-# 	return 1;
-#
-#     export_rva = pe_get32 (dll, opthdr_ofs + 96);
-#     export_size = pe_get32 (dll, opthdr_ofs + 100);
-#     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
-#     secptr = (pe_header_offset + 4 + 20 +
-# 	      pe_get16 (dll, pe_header_offset + 4 + 16));
-#
-#     expptr = 0;
-#     for (i = 0; i < nsections; i++)
-#     {
-# 	char sname[8];
-# 	unsigned long secptr1 = secptr + 40 * i;
-# 	unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
-# 	unsigned long vsize = pe_get32 (dll, secptr1 + 16);
-# 	unsigned long fptr = pe_get32 (dll, secptr1 + 20);
-# 	lseek(dll, secptr1, SEEK_SET);
-# 	read(dll, sname, 8);
-# 	if (vaddr <= export_rva && vaddr+vsize > export_rva)
-# 	{
-# 	    expptr = fptr + (export_rva - vaddr);
-# 	    if (export_rva + export_size > vaddr + vsize)
-# 		export_size = vsize - (export_rva - vaddr);
-# 	    break;
-# 	}
-#     }
-#
-#     expdata = (unsigned char*)malloc(export_size);
-#     lseek (dll, expptr, SEEK_SET);
-#     read (dll, expdata, export_size);
-#     erva = expdata - export_rva;
-#
-#     nexp = pe_as32 (expdata+24);
-#     name_rvas = pe_as32 (expdata+32);
-#
-#     printf ("EXPORTS\n");
-#     for (i = 0; i<nexp; i++)
-#     {
-# 	unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
-# 	printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
-#     }
-#
-#     return 0;
-# }
-# /* impgen.c ends here */
-])# _LT_AC_FILE_IMPGEN_C
-
-# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
-# ---------------------------------
-AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
-
-
-# old names
-AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
-AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
-AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
-AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
-AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
-AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
-AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
-
-# This is just to silence aclocal about the macro not being used
-ifelse([AC_DISABLE_FAST_INSTALL])
-
-AC_DEFUN([LT_AC_PROG_GCJ],
-[AC_CHECK_TOOL(GCJ, gcj, no)
-  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
-  AC_SUBST(GCJFLAGS)
-])
-
-AC_DEFUN([LT_AC_PROG_RC],
-[AC_CHECK_TOOL(RC, windres, no)
-])
-
-############################################################
-# NOTE: This macro has been submitted for inclusion into   #
-#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
-#  a released version of Autoconf we should remove this    #
-#  macro and use it instead.                               #
-############################################################
-# LT_AC_PROG_SED
-# --------------
-# Check for a fully-functional sed program, that truncates
-# as few characters as possible.  Prefer GNU sed if found.
-AC_DEFUN([LT_AC_PROG_SED],
-[AC_MSG_CHECKING([for a sed that does not truncate output])
-AC_CACHE_VAL(lt_cv_path_SED,
-[# Loop through the user's path and test for sed and gsed.
-# Then use that list of sed's as ones to test for truncation.
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_prog in sed gsed; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
-        _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
-      fi
-    done
-  done
-done
-
-  # Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
-  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
-  trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-
-# Create a (secure) tmp directory for tmp files.
-: ${TMPDIR=/tmp}
-{
-  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
-}  ||
-{
-  tmp=$TMPDIR/sed$$-$RANDOM
-  (umask 077 && mkdir $tmp)
-} ||
-{
-   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
-   { (exit 1); exit 1; }
-}
-  _max=0
-  _count=0
-  # Add /usr/xpg4/bin/sed as it is typically found on Solaris
-  # along with /bin/sed that truncates output.
-  for _sed in $_sed_list /usr/xpg4/bin/sed; do
-    test ! -f ${_sed} && break
-    cat /dev/null > "$tmp/sed.in"
-    _count=0
-    echo $ECHO_N "0123456789$ECHO_C" >"$tmp/sed.in"
-    # Check for GNU sed and select it if it is found.
-    if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
-      lt_cv_path_SED=${_sed}
-      break;
-    fi
-    while true; do
-      cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
-      mv "$tmp/sed.tmp" "$tmp/sed.in"
-      cp "$tmp/sed.in" "$tmp/sed.nl"
-      echo >>"$tmp/sed.nl"
-      ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
-      cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
-      # 10000 chars as input seems more than enough
-      test $_count -gt 10 && break
-      _count=`expr $_count + 1`
-      if test $_count -gt $_max; then
-        _max=$_count
-        lt_cv_path_SED=$_sed
-      fi
-    done
-  done
-  rm -rf "$tmp"
-])
-AC_MSG_RESULT([$SED])
-])
diff --git a/admin/ylwrap b/admin/ylwrap
deleted file mode 100755
index 5ea68e4..0000000
--- a/admin/ylwrap
+++ /dev/null
@@ -1,143 +0,0 @@
-#! /bin/sh
-# ylwrap - wrapper for lex/yacc invocations.
-# Copyright 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
-# Written by Tom Tromey <tromey at cygnus.com>.
-#
-# 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# 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.
-
-# 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.
-
-# The input.
-input="$1"
-shift
-case "$input" in
- [\\/]* | ?:[\\/]*)
-    # Absolute path; do nothing.
-    ;;
- *)
-    # Relative path.  Make it absolute.
-    input="`pwd`/$input"
-    ;;
-esac
-
-# The directory holding the input.
-input_dir=`echo "$input" | 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 "$input_dir" | sed -e 's,\\\\,\\\\\\\\,g' -e 's,\\.,\\\\.,g'`
-
-echo "got $input_rx"
-
-pairlist=
-while test "$#" -ne 0; do
-   if test "$1" = "--"; then
-      shift
-      break
-   fi
-   pairlist="$pairlist $1"
-   shift
-done
-
-# The program to run.
-prog="$1"
-shift
-# Make any relative path in $prog absolute.
-case "$prog" in
- [\\/]* | ?:[\\/]*) ;;
- *[\\/]*) prog="`pwd`/$prog" ;;
-esac
-
-# FIXME: add hostname here for parallel makes that run commands on
-# other machines.  But that might take us over the 14-char limit.
-dirname=ylwrap$$
-trap "cd `pwd`; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15
-mkdir $dirname || exit 1
-
-cd $dirname
-
-$prog ${1+"$@"} "$input"
-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="no"
-   if test -f y_tab.c || test -f y_tab.h; then
-      y_tab_nodot="yes"
-   fi
-
-   while test "$#" -ne 0; do
-      from="$1"
-      # Handle y_tab.c and y_tab.h output by DOS
-      if test $y_tab_nodot = "yes"; then
-	 if test $from = "y.tab.c"; then
-	    from="y_tab.c"
-	 else
-	    if test $from = "y.tab.h"; then
-	       from="y_tab.h"
-	    fi
-	 fi
-      fi
-      if test -f "$from"; then
-         # If $2 is an absolute path name, then just use that,
-         # otherwise prepend `../'.
-         case "$2" in
-	   [\\/]* | ?:[\\/]*) target="$2";;
-	   *) target="../$2";;
-	 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 "/^#/ s,$input_rx,," "$from" > "$target" || status=$?
-      else
-	 # A missing file is only an error for the first file.  This
-	 # is a blatant hack to let us support using "yacc -d".  If -d
-	 # is not specified, we don't want an error when the header
-	 # file is "missing".
-	 if test $first = yes; then
-	    status=1
-	 fi
-      fi
-      shift
-      shift
-      first=no
-   done
-else
-   status=$?
-fi
-
-# Remove the directory.
-cd ..
-rm -rf $dirname
-
-exit $status
diff --git a/admin/config.guess b/config.guess
similarity index 85%
rename from admin/config.guess
rename to config.guess
index 5145e35..51fab47 100755
--- a/admin/config.guess
+++ b/config.guess
@@ -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 Free Software Foundation, Inc.
 
-timestamp='2002-10-21'
+timestamp='2004-03-12'
 
 # 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
@@ -98,14 +98,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` && umask 077 && mkdir $tmpdir && umask $old && unset old)
-   || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ;
-dummy=$tmpdir/dummy ;
-files="$dummy.c $dummy.o $dummy.rel $dummy" ;
-trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ;
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
 case $CC_FOR_BUILD,$HOST_CC,$CC in
  ,,)    echo "int x;" > $dummy.c ;
 	for c in cc gcc c89 c99 ; do
@@ -113,15 +117,13 @@ case $CC_FOR_BUILD,$HOST_CC,$CC in
 	     CC_FOR_BUILD="$c"; break ;
 	  fi ;
 	done ;
-	rm -f $files ;
 	if test x"$CC_FOR_BUILD" = 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 at noc.rutgers.edu 1994-08-24)
@@ -178,18 +180,35 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 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 "${UNAME_VERSION}" 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 "${machine}-${os}${release}"
 	exit 0 ;;
+    amd64:OpenBSD:*:*)
+	echo x86_64-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
     amiga:OpenBSD:*:*)
 	echo m68k-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
     arc:OpenBSD:*:*)
 	echo mipsel-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
+    cats:OpenBSD:*:*)
+	echo arm-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
     hp300:OpenBSD:*:*)
 	echo m68k-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
@@ -208,6 +227,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     mvmeppc:OpenBSD:*:*)
 	echo powerpc-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
+    pegasos:OpenBSD:*:*)
+	echo powerpc-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
     pmax:OpenBSD:*:*)
 	echo mipsel-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
@@ -223,71 +245,70 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     *:OpenBSD:*:*)
 	echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
+    *:ekkoBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+	exit 0 ;;
+    macppc:MirBSD:*:*)
+	echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+	exit 0 ;;
+    *:MirBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+	exit 0 ;;
     alpha:OSF1:*:*)
-	if test $UNAME_RELEASE = "V4.0"; 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 "$ALPHA_CPU_TYPE" in
+	    "EV4 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV4.5 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "LCA4 (21066/21068)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV5 (21164)")
+		UNAME_MACHINE="alphaev5" ;;
+	    "EV5.6 (21164A)")
+		UNAME_MACHINE="alphaev56" ;;
+	    "EV5.6 (21164PC)")
+		UNAME_MACHINE="alphapca56" ;;
+	    "EV5.7 (21164PC)")
+		UNAME_MACHINE="alphapca57" ;;
+	    "EV6 (21264)")
+		UNAME_MACHINE="alphaev6" ;;
+	    "EV6.7 (21264A)")
+		UNAME_MACHINE="alphaev67" ;;
+	    "EV6.8CB (21264C)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8AL (21264B)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8CX (21264D)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.9A (21264/EV69A)")
+		UNAME_MACHINE="alphaev69" ;;
+	    "EV7 (21364)")
+		UNAME_MACHINE="alphaev7" ;;
+	    "EV7.9 (21364A)")
+		UNAME_MACHINE="alphaev79" ;;
+	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 "1.2" for uname -r.
-	eval $set_cc_for_build
-	cat <<EOF >$dummy.s
-	.data
-\$Lformat:
-	.byte 37,100,45,37,120,10,0	# "%d-%x\n"
-
-	.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>/dev/null
-	if test "$?" = 0 ; then
-		case `$dummy` in
-			0-0)
-				UNAME_MACHINE="alpha"
-				;;
-			1-0)
-				UNAME_MACHINE="alphaev5"
-				;;
-			1-1)
-				UNAME_MACHINE="alphaev56"
-				;;
-			1-101)
-				UNAME_MACHINE="alphapca56"
-				;;
-			2-303)
-				UNAME_MACHINE="alphaev6"
-				;;
-			2-307)
-				UNAME_MACHINE="alphaev67"
-				;;
-			2-1307)
-				UNAME_MACHINE="alphaev68"
-				;;
-			3-1307)
-				UNAME_MACHINE="alphaev7"
-				;;
-		esac
-	fi
-	rm -f $dummy.s $dummy && rmdir $tmpdir
-	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	exit 0 ;;
+    Alpha*:OpenVMS:*:*)
+	echo alpha-hp-vms
 	exit 0 ;;
     Alpha\ *:Windows_NT*:*)
 	# How do we know it's Interix rather than the generic POSIX subsystem?
@@ -310,6 +331,9 @@ EOF
     *:OS/390:*:*)
 	echo i370-ibm-openedition
 	exit 0 ;;
+    *:OS400:*:*)
+        echo powerpc-ibm-os400
+	exit 0 ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
 	echo arm-acorn-riscix${UNAME_RELEASE}
 	exit 0;;
@@ -327,6 +351,9 @@ EOF
     NILE*:*:*:dcosx)
 	echo pyramid-pyramid-svr4
 	exit 0 ;;
+    DRS?6000:unix:4.0:6*)
+	echo sparc-icl-nx6
+	exit 0 ;;
     DRS?6000:UNIX_SV:4.2*:7*)
 	case `/usr/bin/uname -p` in
 	    sparc) echo sparc-icl-nx7 && exit 0 ;;
@@ -399,6 +426,9 @@ EOF
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
         echo m68k-unknown-mint${UNAME_RELEASE}
         exit 0 ;;
+    m68k:machten:*:*)
+	echo m68k-apple-machten${UNAME_RELEASE}
+	exit 0 ;;
     powerpc:machten:*:*)
 	echo powerpc-apple-machten${UNAME_RELEASE}
 	exit 0 ;;
@@ -439,8 +469,7 @@ EOF
 EOF
 	$CC_FOR_BUILD -o $dummy $dummy.c \
 	  && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
-	  && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
-	rm -f $dummy.c $dummy && rmdir $tmpdir
+	  && exit 0
 	echo mips-mips-riscos${UNAME_RELEASE}
 	exit 0 ;;
     Motorola:PowerMAX_OS:*:*)
@@ -449,7 +478,7 @@ EOF
     Motorola:*:4.3:PL8-*)
 	echo powerpc-harris-powermax
 	exit 0 ;;
-    Night_Hawk:*:*:PowerMAX_OS)
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
 	echo powerpc-harris-powermax
 	exit 0 ;;
     Night_Hawk:Power_UNIX:*:*)
@@ -524,8 +553,7 @@ EOF
 			exit(0);
 			}
 EOF
-		$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
-		rm -f $dummy.c $dummy && rmdir $tmpdir
+		$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
 		echo rs6000-ibm-aix3.2.5
 	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
 		echo rs6000-ibm-aix3.2.4
@@ -624,10 +652,20 @@ EOF
               }
 EOF
 		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
-		    if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
-		    rm -f $dummy.c $dummy && rmdir $tmpdir
+		    test -z "$HP_ARCH" && HP_ARCH=hppa
 		fi ;;
 	esac
+	if [ ${HP_ARCH} = "hppa2.0w" ]
+	then
+	    # avoid double evaluation of $set_cc_for_build
+	    test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
+	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
+	    then
+		HP_ARCH="hppa2.0w"
+	    else
+		HP_ARCH="hppa64"
+	    fi
+	fi
 	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
 	exit 0 ;;
     ia64:HP-UX:*:*)
@@ -661,8 +699,7 @@ EOF
 	  exit (0);
 	}
 EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
-	rm -f $dummy.c $dummy && rmdir $tmpdir
+	$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
 	echo unknown-hitachi-hiuxwe2
 	exit 0 ;;
     9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
@@ -720,21 +757,26 @@ EOF
     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 ;;
     CRAY*T3E:*:*:*)
 	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 	exit 0 ;;
     CRAY*SV1:*:*:*)
 	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 	exit 0 ;;
+    *:UNICOS/mp:*:*)
+	echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
     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 "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
         exit 0 ;;
+    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 "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	exit 0 ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
 	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
 	exit 0 ;;
@@ -756,8 +798,10 @@ EOF
 	#endif
 EOF
 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
-	rm -f $dummy.c && rmdir $tmpdir
-	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
+	# GNU/KFreeBSD systems have a "k" prefix to indicate we are using
+	# FreeBSD's kernel, but not the complete OS.
+	case ${LIBC} in gnu) kernel_only='k' ;; esac
+	echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
 	exit 0 ;;
     i*:CYGWIN*:*)
 	echo ${UNAME_MACHINE}-pc-cygwin
@@ -768,14 +812,17 @@ EOF
     i*:PW*:*)
 	echo ${UNAME_MACHINE}-pc-pw32
 	exit 0 ;;
-    x86:Interix*:3*)
-	echo i386-pc-interix3
+    x86:Interix*:[34]*)
+	echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
+	exit 0 ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+	echo i${UNAME_MACHINE}-pc-mks
 	exit 0 ;;
     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&T UWIN. Should we
 	# UNAME_MACHINE based on the output of uname instead of i386?
-	echo i386-pc-interix
+	echo i586-pc-interix
 	exit 0 ;;
     i*:UWIN*:*)
 	echo ${UNAME_MACHINE}-pc-uwin
@@ -787,17 +834,28 @@ EOF
 	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 	exit 0 ;;
     *:GNU:*:*)
+	# the GNU system
 	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
 	exit 0 ;;
+    *: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 0 ;;
     i*86:Minix:*:*)
 	echo ${UNAME_MACHINE}-pc-minix
 	exit 0 ;;
     arm*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit 0 ;;
+    cris:Linux:*:*)
+	echo cris-axis-linux-gnu
+	exit 0 ;;
     ia64:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit 0 ;;
+    m32r*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
     m68*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit 0 ;;
@@ -818,8 +876,26 @@ EOF
 	#endif
 EOF
 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
-	rm -f $dummy.c && rmdir $tmpdir
-	test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
+	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+	;;
+    mips64:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$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>/dev/null | grep ^CPU=`
+	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
 	;;
     ppc:Linux:*:*)
 	echo powerpc-unknown-linux-gnu
@@ -855,6 +931,9 @@ EOF
     s390:Linux:*:* | s390x:Linux:*:*)
 	echo ${UNAME_MACHINE}-ibm-linux
 	exit 0 ;;
+    sh64*:Linux:*:*)
+    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
     sh*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit 0 ;;
@@ -912,9 +991,11 @@ EOF
 	LIBC=gnuaout
 	#endif
 	#endif
+	#ifdef __dietlibc__
+	LIBC=dietlibc
+	#endif
 EOF
 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
-	rm -f $dummy.c && rmdir $tmpdir
 	test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
 	test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
 	;;
@@ -932,6 +1013,26 @@ EOF
         # Use sysv4.2uw... so that sysv4* matches it.
 	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
 	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 ;;
+    i*86:XTS-300:*:STOP)
+	echo ${UNAME_MACHINE}-unknown-stop
+	exit 0 ;;
+    i*86:atheos:*:*)
+	echo ${UNAME_MACHINE}-unknown-atheos
+	exit 0 ;;
+	i*86:syllable:*:*)
+	echo ${UNAME_MACHINE}-pc-syllable
+	exit 0 ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+	echo i386-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    i*86:*DOS:*:*)
+	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+	exit 0 ;;
     i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
 	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
 	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
@@ -966,9 +1067,6 @@ EOF
 		echo ${UNAME_MACHINE}-pc-sysv32
 	fi
 	exit 0 ;;
-    i*86:*DOS:*:*)
-	echo ${UNAME_MACHINE}-pc-msdosdjgpp
-	exit 0 ;;
     pc:*:*:*)
 	# Left here for compatibility:
         # uname -m prints for DJGPP always 'pc', but it prints nothing about
@@ -995,9 +1093,12 @@ EOF
     mc68k:UNIX:SYSTEM5:3.51m)
 	echo m68k-convergent-sysv
 	exit 0 ;;
+    M680?0:D-NIX:5.3:*)
+	echo m68k-diab-dnix
+	exit 0 ;;
     M68*:*:R3V[567]*:*)
 	test -r /sysV68 && echo 'm68k-motorola-sysv' && 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)
+    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)
 	OS_REL=''
 	test -r /etc/.relid \
 	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -1014,9 +1115,6 @@ EOF
     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 ;;
     TSUNAMI:LynxOS:2.*:*)
 	echo sparc-unknown-lynxos${UNAME_RELEASE}
 	exit 0 ;;
@@ -1098,7 +1196,11 @@ EOF
 	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
 	exit 0 ;;
     *:Darwin:*:*)
-	echo `uname -p`-apple-darwin${UNAME_RELEASE}
+	case `uname -p` in
+	    *86) UNAME_PROCESSOR=i686 ;;
+	    powerpc) UNAME_PROCESSOR=powerpc ;;
+	esac
+	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
 	exit 0 ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
 	UNAME_PROCESSOR=`uname -p`
@@ -1111,7 +1213,7 @@ EOF
     *:QNX:*:4*)
 	echo i386-pc-qnx
 	exit 0 ;;
-    NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
+    NSR-?:NONSTOP_KERNEL:*:*)
 	echo nsr-tandem-nsk${UNAME_RELEASE}
 	exit 0 ;;
     *:NonStop-UX:*:*)
@@ -1134,11 +1236,6 @@ EOF
 	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 ;;
     *:TOPS-10:*:*)
 	echo pdp10-unknown-tops10
 	exit 0 ;;
@@ -1157,11 +1254,11 @@ EOF
     *:ITS:*:*)
 	echo pdp10-unknown-its
 	exit 0 ;;
-    i*86:XTS-300:*:STOP)
-	echo ${UNAME_MACHINE}-unknown-stop
+    SEI:*:*:SEIUX)
+        echo mips-sei-seiux${UNAME_RELEASE}
 	exit 0 ;;
-    i*86:atheos:*:*)
-	echo ${UNAME_MACHINE}-unknown-atheos
+    *:DragonFly:*:*)
+	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
 	exit 0 ;;
 esac
 
@@ -1283,8 +1380,7 @@ main ()
 }
 EOF
 
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
-rm -f $dummy.c $dummy && rmdir $tmpdir
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
 
 # Apollos put the system type in the environment.
 
diff --git a/config.h.in b/config.h.in
index 16dc24f..340feb7 100644
--- a/config.h.in
+++ b/config.h.in
@@ -1,48 +1,14 @@
 /* config.h.in.  Generated from configure.in by autoheader.  */
 
-/* Define if you have the CoreAudio API */
-#undef HAVE_COREAUDIO
-
-/* Define to 1 if you have the <crt_externs.h> header file. */
-#undef HAVE_CRT_EXTERNS_H
-
-/* Defines if your system has the crypt function */
-#undef HAVE_CRYPT
-
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
-/* Define if you have libjpeg */
-#undef HAVE_LIBJPEG
-
-/* Define if you have libpng */
-#undef HAVE_LIBPNG
-
-/* Define if you have a working libpthread (will enable threaded code) */
-#undef HAVE_LIBPTHREAD
-
-/* Define if you have libz */
-#undef HAVE_LIBZ
-
 /* Define to 1 if you have the <memory.h> header file. */
 #undef HAVE_MEMORY_H
 
-/* Define if your system needs _NSGetEnviron to set up the environment */
-#undef HAVE_NSGETENVIRON
-
-/* Define to 1 if you have the <pthread/linuxthreads/pthread.h> header file.
-   */
-#undef HAVE_PTHREAD_LINUXTHREADS_PTHREAD_H
-
-/* Define if you have the res_init function */
-#undef HAVE_RES_INIT
-
-/* Define to 1 if you have the `snprintf' function. */
-#undef HAVE_SNPRINTF
-
 /* Define to 1 if you have the <stdint.h> header file. */
 #undef HAVE_STDINT_H
 
@@ -61,21 +27,9 @@
 /* Define to 1 if you have the <sys/types.h> header file. */
 #undef HAVE_SYS_TYPES_H
 
-/* C++ compiler supports template repository */
-#undef HAVE_TEMPLATE_REPOSITORY
-
 /* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
-/* Define to 1 if you have the `vsnprintf' function. */
-#undef HAVE_VSNPRINTF
-
-/* Define if you want Xinerama support */
-#undef HAVE_XINERAMA
-
-/* Suffix for lib directories */
-#undef KDELIBSUFF
-
 /* Name of package */
 #undef PACKAGE
 
@@ -94,76 +48,11 @@
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
 
-/* The size of a `char', as computed by sizeof. */
-#undef SIZEOF_CHAR
-
-/* The size of a `char *', as computed by sizeof. */
-#undef SIZEOF_CHAR_P
-
-/* The size of a `int', as computed by sizeof. */
-#undef SIZEOF_INT
-
-/* The size of a `long', as computed by sizeof. */
-#undef SIZEOF_LONG
-
 /* Define to 1 if you have the ANSI C header files. */
 #undef STDC_HEADERS
 
 /* Version number of package */
 #undef VERSION
 
-/*
- * jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
- * headers and I'm too lazy to write a configure test as long as only
- * unixware is related
- */
-#ifdef _UNIXWARE
-#define HAVE_BOOLEAN
-#endif
-
-
-
-/*
- * AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
- * that defines bzero.
- */
-
-#if defined(_AIX)
-#include <strings.h>
-#endif
-
-
-
-/*
- * On HP-UX, the declaration of vsnprintf() is needed every time !
- */
-
-#if !defined(HAVE_VSNPRINTF) || defined(hpux)
-#if __STDC__
-#include <stdarg.h>
-#include <stdlib.h>
-#else
-#include <varargs.h>
-#endif
-#ifdef __cplusplus
-extern "C"
-#endif
-int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
-#ifdef __cplusplus
-extern "C"
-#endif
-int snprintf(char *str, size_t n, char const *fmt, ...);
-#endif
-
-
-
-#if defined(__SVR4) && !defined(__svr4__)
-#define __svr4__ 1
-#endif
-
-
-/* Compatibility define */
-#undef ksize_t
-
-/* Define the real type of socklen_t */
-#undef socklen_t
+/* Defined if on Win32 platform */
+#undef WIN32
diff --git a/admin/config.sub b/config.sub
similarity index 90%
rename from admin/config.sub
rename to config.sub
index 1dea9b7..ba33103 100755
--- a/admin/config.sub
+++ b/config.sub
@@ -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 Free Software Foundation, Inc.
 
-timestamp='2002-09-05'
+timestamp='2004-03-12'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -118,7 +118,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/'`
     ;;
@@ -228,14 +229,15 @@ 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 \
+	| 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 | mcore \
 	| mips | mipsbe | mipseb | mipsel | mipsle \
 	| mips16 \
 	| mips64 | mips64el \
@@ -245,21 +247,24 @@ case $basic_machine in
 	| mips64vr4300 | mips64vr4300el \
 	| mips64vr5000 | mips64vr5000el \
 	| mipsisa32 | mipsisa32el \
+	| mipsisa32r2 | mipsisa32r2el \
 	| mipsisa64 | mipsisa64el \
+	| mipsisa64r2 | mipsisa64r2el \
 	| mipsisa64sb1 | mipsisa64sb1el \
 	| mipsisa64sr71k | mipsisa64sr71kel \
 	| mipstx39 | mipstx39el \
 	| mn10200 | mn10300 \
+	| msp430 \
 	| ns16k | ns32k \
 	| openrisc | 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 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
 	| strongarm \
-	| tahoe | thumb | tic80 | tron \
+	| tahoe | thumb | tic4x | tic80 | tron \
 	| v850 | v850e \
 	| we32k \
 	| x86 | xscale | xstormy16 | xtensa \
@@ -294,7 +299,7 @@ case $basic_machine in
 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
 	| avr-* \
 	| bs2000-* \
-	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
 	| clipper-* | cydra-* \
 	| d10v-* | d30v-* | dlx-* \
 	| elxsi-* \
@@ -302,8 +307,8 @@ case $basic_machine in
 	| 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-* \
 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
@@ -315,21 +320,26 @@ case $basic_machine in
 	| mips64vr4300-* | mips64vr4300el-* \
 	| mips64vr5000-* | mips64vr5000el-* \
 	| mipsisa32-* | mipsisa32el-* \
+	| mipsisa32r2-* | mipsisa32r2el-* \
 	| mipsisa64-* | mipsisa64el-* \
+	| mipsisa64r2-* | mipsisa64r2el-* \
 	| mipsisa64sb1-* | mipsisa64sb1el-* \
 	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
-	| mipstx39 | mipstx39el \
-	| none-* | np1-* | ns16k-* | ns32k-* \
+	| mipstx39-* | mipstx39el-* \
+	| msp430-* \
+	| none-* | np1-* | nv1-* | 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-* \
+	| 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-* \
@@ -353,6 +363,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 +380,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 +445,20 @@ case $basic_machine in
 		basic_machine=j90-cray
 		os=-unicos
 		;;
+	cr16c)
+		basic_machine=cr16c-unknown
+		os=-elf
+		;;
 	crds | unos)
 		basic_machine=m68k-crds
 		;;
 	cris | cris-* | etrax*)
 		basic_machine=cris-axis
 		;;
+	crx)
+		basic_machine=crx-unknown
+		os=-elf
+		;;
 	da30 | da30-*)
 		basic_machine=m68k-da30
 		;;
@@ -716,6 +743,10 @@ case $basic_machine in
 	np1)
 		basic_machine=np1-gould
 		;;
+	nv1)
+		basic_machine=nv1-cray
+		os=-unicosmp
+		;;
 	nsr-tandem)
 		basic_machine=nsr-tandem
 		;;
@@ -727,6 +758,10 @@ case $basic_machine in
 		basic_machine=or32-unknown
 		os=-coff
 		;;
+	os400)
+		basic_machine=powerpc-ibm
+		os=-os400
+		;;
 	OSE68000 | ose68000)
 		basic_machine=m68000-ericsson
 		os=-ose
@@ -758,18 +793,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 +869,10 @@ case $basic_machine in
 	sb1el)
 		basic_machine=mipsisa64sb1el-unknown
 		;;
+	sei)
+		basic_machine=mips-sei
+		os=-seiux
+		;;
 	sequent)
 		basic_machine=i386-sequent
 		;;
@@ -835,6 +880,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 +949,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 +957,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 +982,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,10 +1029,6 @@ case $basic_machine in
 		basic_machine=hppa1.1-winbond
 		os=-proelf
 		;;
-	windows32)
-		basic_machine=i386-pc
-		os=-windows32-msvcrt
-		;;
 	xps | xps100)
 		basic_machine=xps100-honeywell
 		;;
@@ -1027,13 +1075,13 @@ 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 +1154,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*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-qnx*)
@@ -1129,8 +1179,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 +1191,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 +1206,9 @@ case $os in
 	-opened*)
 		os=-openedition
 		;;
+        -os400*)
+		os=-os400
+		;;
 	-wince*)
 		os=-wince
 		;;
@@ -1172,6 +1230,9 @@ case $os in
 	-atheos*)
 		os=-atheos
 		;;
+	-syllable*)
+		os=-syllable
+		;;
 	-386bsd)
 		os=-bsd
 		;;
@@ -1194,6 +1255,9 @@ case $os in
 	-sinix*)
 		os=-sysv4
 		;;
+        -tpf*)
+		os=-tpf
+		;;
 	-triton*)
 		os=-sysv3
 		;;
@@ -1224,6 +1288,12 @@ case $os in
 	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
 		os=-mint
 		;;
+	-aros*)
+		os=-aros
+		;;
+	-kaos*)
+		os=-kaos
+		;;
 	-none)
 		;;
 	*)
@@ -1255,6 +1325,9 @@ case $basic_machine in
 	arm*-semi)
 		os=-aout
 		;;
+    c4x-* | tic4x-*)
+        os=-coff
+        ;;
 	# This must come before the *-dec entry.
 	pdp10-*)
 		os=-tops20
@@ -1433,9 +1506,15 @@ case $basic_machine in
 			-mvs* | -opened*)
 				vendor=ibm
 				;;
+			-os400*)
+				vendor=ibm
+				;;
 			-ptx*)
 				vendor=sequent
 				;;
+			-tpf*)
+				vendor=ibm
+				;;
 			-vxsim* | -vxworks* | -windiss*)
 				vendor=wrs
 				;;
diff --git a/configure b/configure
index ee4954f..0297b72 100755
--- a/configure
+++ b/configure
@@ -1,9 +1,8 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.57.
+# Generated by GNU Autoconf 2.59.
 #
-# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
-# Free Software Foundation, Inc.
+# Copyright (C) 2003 Free Software Foundation, Inc.
 # This configure script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
 ## --------------------- ##
@@ -20,9 +19,10 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
   set -o posix
 fi
+DUALCASE=1; export DUALCASE # for MKS sh
 
 # Support unset when possible.
-if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
   as_unset=unset
 else
   as_unset=false
@@ -41,7 +41,7 @@ for as_var in \
   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
   LC_TELEPHONE LC_TIME
 do
-  if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
     eval $as_var=C; export $as_var
   else
     $as_unset $as_var
@@ -218,16 +218,17 @@ rm -f conf$$ conf$$.exe conf$$.file
 if mkdir -p . 2>/dev/null; then
   as_mkdir_p=:
 else
+  test -d ./-p && rmdir ./-p
   as_mkdir_p=false
 fi
 
 as_executable_p="test -f"
 
 # Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 
 # Sed expression to map a string onto a valid variable name.
-as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
 # IFS
@@ -258,7 +259,7 @@ if test "X$1" = X--no-reexec; then
 elif test "X$1" = X--fallback-echo; then
   # Avoid inline document here, it may be left over
   :
-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
   # Yippee, $echo works!
   :
 else
@@ -277,7 +278,7 @@ fi
 
 # The HP-UX ksh and POSIX shell print the target directory to stdout
 # if CDPATH is set.
-if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
 if test -z "$ECHO"; then
 if test "X${echo_test_string+set}" != Xset; then
@@ -389,6 +390,11 @@ fi
 
 
 
+
+tagnames=${tagnames+${tagnames},}CXX
+
+tagnames=${tagnames+${tagnames},}F77
+
 # Name of the host.
 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
 # so uname gets run too.
@@ -419,8 +425,7 @@ PACKAGE_VERSION=
 PACKAGE_STRING=
 PACKAGE_BUGREPORT=
 
-ac_unique_file="acinclude.m4"
-ac_default_prefix=/usr/local
+ac_unique_file="configure.in"
 # Factoring default headers for most tests.
 ac_includes_default="\
 #include <stdio.h>
@@ -458,7 +463,7 @@ ac_includes_default="\
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INS [...]
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INS [...]
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -817,7 +822,7 @@ done
 
 # Be sure to have absolute paths.
 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
-              localstatedir libdir includedir oldincludedir infodir mandir
+	      localstatedir libdir includedir oldincludedir infodir mandir
 do
   eval ac_val=$`echo $ac_var`
   case $ac_val in
@@ -857,10 +862,10 @@ if test -z "$srcdir"; then
   # Try the directory containing this script, then its parent.
   ac_confdir=`(dirname "$0") 2>/dev/null ||
 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-         X"$0" : 'X\(//\)[^/]' \| \
-         X"$0" : 'X\(//\)$' \| \
-         X"$0" : 'X\(/\)' \| \
-         .     : '\(.\)' 2>/dev/null ||
+	 X"$0" : 'X\(//\)[^/]' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
 echo X"$0" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
   	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
@@ -899,14 +904,14 @@ ac_env_target_alias_set=${target_alias+set}
 ac_env_target_alias_value=$target_alias
 ac_cv_env_target_alias_set=${target_alias+set}
 ac_cv_env_target_alias_value=$target_alias
-ac_env_CC_set=${CC+set}
-ac_env_CC_value=$CC
-ac_cv_env_CC_set=${CC+set}
-ac_cv_env_CC_value=$CC
-ac_env_CFLAGS_set=${CFLAGS+set}
-ac_env_CFLAGS_value=$CFLAGS
-ac_cv_env_CFLAGS_set=${CFLAGS+set}
-ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_CXX_set=${CXX+set}
+ac_env_CXX_value=$CXX
+ac_cv_env_CXX_set=${CXX+set}
+ac_cv_env_CXX_value=$CXX
+ac_env_CXXFLAGS_set=${CXXFLAGS+set}
+ac_env_CXXFLAGS_value=$CXXFLAGS
+ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
+ac_cv_env_CXXFLAGS_value=$CXXFLAGS
 ac_env_LDFLAGS_set=${LDFLAGS+set}
 ac_env_LDFLAGS_value=$LDFLAGS
 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
@@ -915,22 +920,30 @@ ac_env_CPPFLAGS_set=${CPPFLAGS+set}
 ac_env_CPPFLAGS_value=$CPPFLAGS
 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
 ac_env_CPP_set=${CPP+set}
 ac_env_CPP_value=$CPP
 ac_cv_env_CPP_set=${CPP+set}
 ac_cv_env_CPP_value=$CPP
-ac_env_CXX_set=${CXX+set}
-ac_env_CXX_value=$CXX
-ac_cv_env_CXX_set=${CXX+set}
-ac_cv_env_CXX_value=$CXX
-ac_env_CXXFLAGS_set=${CXXFLAGS+set}
-ac_env_CXXFLAGS_value=$CXXFLAGS
-ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
-ac_cv_env_CXXFLAGS_value=$CXXFLAGS
 ac_env_CXXCPP_set=${CXXCPP+set}
 ac_env_CXXCPP_value=$CXXCPP
 ac_cv_env_CXXCPP_set=${CXXCPP+set}
 ac_cv_env_CXXCPP_value=$CXXCPP
+ac_env_F77_set=${F77+set}
+ac_env_F77_value=$F77
+ac_cv_env_F77_set=${F77+set}
+ac_cv_env_F77_value=$F77
+ac_env_FFLAGS_set=${FFLAGS+set}
+ac_env_FFLAGS_value=$FFLAGS
+ac_cv_env_FFLAGS_set=${FFLAGS+set}
+ac_cv_env_FFLAGS_value=$FFLAGS
 
 #
 # Report the --help message.
@@ -964,9 +977,9 @@ _ACEOF
   cat <<_ACEOF
 Installation directories:
   --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
+			  [$ac_default_prefix]
   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [PREFIX]
+			  [PREFIX]
 
 By default, \`make install' will install all the files in
 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
@@ -997,10 +1010,13 @@ Program names:
   --program-suffix=SUFFIX            append SUFFIX to installed program names
   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
 
+X features:
+  --x-includes=DIR    X include files are in DIR
+  --x-libraries=DIR   X library files are in DIR
+
 System types:
   --build=BUILD     configure for building on BUILD [guessed]
   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
-  --target=TARGET   configure for building compilers for TARGET [HOST]
 _ACEOF
 fi
 
@@ -1011,58 +1027,41 @@ if test -n "$ac_init_help"; then
 Optional Features:
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --enable-debug=ARG    enables debug symbols (yes|no|full) default=no
-  --disable-debug         disables debug output and debug symbols default=no
-  --enable-strict         compiles with strict compiler options (may not work!)
-  --disable-warnings      disables compilation with -Wall and similiar
-  --enable-profile        creates profiling infos default=no
-  --enable-gcov           enables gcov test coverage support default=no
-  --disable-dependency-tracking Speeds up one-time builds
-  --enable-dependency-tracking  Do not reject slow dependency extractors
-  --enable-pch            enables precompiled header support (currently only KCC) default=no
-  --enable-final          build size optimized apps (experimental - needs lots of memory)
-  --disable-closure       don't delay template instantiation
+  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors
   --enable-shared[=PKGS]
                           build shared libraries [default=yes]
   --enable-static[=PKGS]
-                          build static libraries [default=no]
-  --enable-libsuffix      /lib directory suffix (64,32,none=default)
+                          build static libraries [default=yes]
   --enable-fast-install[=PKGS]
                           optimize for fast installation [default=yes]
   --disable-libtool-lock  avoid locking (might break parallel builds)
-  --enable-objprelink     prelink apps using objprelink (obsolete)
-  --enable-embedded       link to Qt-embedded, don't use X
-  --enable-qtopia         link to Qt-embedded, link to the Qtopia Environment
-  --disable-mt            link to non-threaded Qt (deprecated)
-  --enable-kernel-threads Enable the use of the LinuxThreads port on FreeBSD/i386 only.
-  --disable-threading     disables threading even if libpthread found
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-x                use the X Window System
+  --with-qtdir=DIR        Qt installation directory default=$QTDIR
+  --with-fftw-dir=DIR    Base directory for fftw include and library
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
   --with-pic              try to use only PIC/non-PIC objects [default=use
                           both]
-  --with-tags=TAGS        include additional configurations [CXX,GCJ]
-  --with-xinerama         enable support for Xinerama
-  --with-extra-includes=DIR
-                          adds non standard include paths
-  --with-extra-libs=DIR   adds non standard library paths
-  --with-qt-dir=DIR       where the root of Qt is installed
-  --with-qt-includes=DIR  where the Qt includes are.
-  --with-qt-libraries=DIR where the Qt library is installed.
+  --with-tags[=TAGS]
+                          include additional configurations [automatic]
 
 Some influential environment variables:
-  CC          C compiler command
-  CFLAGS      C compiler flags
+  CXX         C++ compiler command
+  CXXFLAGS    C++ compiler flags
   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
               nonstandard directory <lib dir>
   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
               headers in a nonstandard directory <include dir>
+  CC          C compiler command
+  CFLAGS      C compiler flags
   CPP         C preprocessor
-  CXX         C++ compiler command
-  CXXFLAGS    C++ compiler flags
   CXXCPP      C++ preprocessor
+  F77         Fortran 77 compiler command
+  FFLAGS      Fortran 77 compiler flags
 
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
@@ -1100,12 +1099,45 @@ case $srcdir in
     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
     ac_top_srcdir=$ac_top_builddir$srcdir ;;
 esac
-# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
-# absolute.
-ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
-ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
-ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
-ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
 
     cd $ac_dir
     # Check for guested configure; otherwise get Cygnus style configure.
@@ -1116,7 +1148,7 @@ ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
       echo
       $SHELL $ac_srcdir/configure  --help=recursive
     elif test -f $ac_srcdir/configure.ac ||
-           test -f $ac_srcdir/configure.in; then
+	   test -f $ac_srcdir/configure.in; then
       echo
       $ac_configure --help
     else
@@ -1130,8 +1162,7 @@ test -n "$ac_init_help" && exit 0
 if $ac_init_version; then
   cat <<\_ACEOF
 
-Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
-Free Software Foundation, Inc.
+Copyright (C) 2003 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _ACEOF
@@ -1143,7 +1174,7 @@ This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
 It was created by $as_me, which was
-generated by GNU Autoconf 2.57.  Invocation command line was
+generated by GNU Autoconf 2.59.  Invocation command line was
 
   $ $0 $@
 
@@ -1220,19 +1251,19 @@ do
     2)
       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
       if test $ac_must_keep_next = true; then
-        ac_must_keep_next=false # Got value, back to normal.
+	ac_must_keep_next=false # Got value, back to normal.
       else
-        case $ac_arg in
-          *=* | --config-cache | -C | -disable-* | --disable-* \
-          | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
-          | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
-          | -with-* | --with-* | -without-* | --without-* | --x)
-            case "$ac_configure_args0 " in
-              "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
-            esac
-            ;;
-          -* ) ac_must_keep_next=true ;;
-        esac
+	case $ac_arg in
+	  *=* | --config-cache | -C | -disable-* | --disable-* \
+	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+	  | -with-* | --with-* | -without-* | --without-* | --x)
+	    case "$ac_configure_args0 " in
+	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+	    esac
+	    ;;
+	  -* ) ac_must_keep_next=true ;;
+	esac
       fi
       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
       # Get rid of the leading space.
@@ -1266,12 +1297,12 @@ _ASBOX
     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
     *ac_space=\ *)
       sed -n \
-        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
-    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+	"s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
       ;;
     *)
       sed -n \
-        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
       ;;
     esac;
 }
@@ -1300,7 +1331,7 @@ _ASBOX
       for ac_var in $ac_subst_files
       do
 	eval ac_val=$`echo $ac_var`
-        echo "$ac_var='"'"'$ac_val'"'"'"
+	echo "$ac_var='"'"'$ac_val'"'"'"
       done | sort
       echo
     fi
@@ -1319,7 +1350,7 @@ _ASBOX
       echo "$as_me: caught signal $ac_signal"
     echo "$as_me: exit $exit_status"
   } >&5
-  rm -f core core.* *.core &&
+  rm -f core *.core &&
   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
     exit $exit_status
      ' 0
@@ -1399,7 +1430,7 @@ fi
 # value.
 ac_cache_corrupted=false
 for ac_var in `(set) 2>&1 |
-               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+	       sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
   eval ac_old_set=\$ac_cv_env_${ac_var}_set
   eval ac_new_set=\$ac_env_${ac_var}_set
   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
@@ -1416,13 +1447,13 @@ echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
     ,);;
     *)
       if test "x$ac_old_val" != "x$ac_new_val"; then
-        { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
-        { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
+	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
 echo "$as_me:   former value:  $ac_old_val" >&2;}
-        { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
+	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
 echo "$as_me:   current value: $ac_new_val" >&2;}
-        ac_cache_corrupted=:
+	ac_cache_corrupted=:
       fi;;
   esac
   # Pass precious variables to config.status.
@@ -1470,8 +1501,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
+
+          ac_config_headers="$ac_config_headers config.h"
+
+am__api_version="1.9"
 ac_aux_dir=
-for ac_dir in admin $srcdir/admin; do
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
   if test -f $ac_dir/install-sh; then
     ac_aux_dir=$ac_dir
     ac_install_sh="$ac_aux_dir/install-sh -c"
@@ -1487,105 +1522,15 @@ for ac_dir in admin $srcdir/admin; do
   fi
 done
 if test -z "$ac_aux_dir"; then
-  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in admin $srcdir/admin" >&5
-echo "$as_me: error: cannot find install-sh or install.sh in admin $srcdir/admin" >&2;}
+  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
    { (exit 1); exit 1; }; }
 fi
 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
 
-
-# Make sure we can run config.sub.
-$ac_config_sub sun4 >/dev/null 2>&1 ||
-  { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
-echo "$as_me: error: cannot run $ac_config_sub" >&2;}
-   { (exit 1); exit 1; }; }
-
-echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6
-if test "${ac_cv_build+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_build_alias=$build_alias
-test -z "$ac_cv_build_alias" &&
-  ac_cv_build_alias=`$ac_config_guess`
-test -z "$ac_cv_build_alias" &&
-  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
-   { (exit 1); exit 1; }; }
-ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
-  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6
-build=$ac_cv_build
-build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6
-if test "${ac_cv_host+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_host_alias=$host_alias
-test -z "$ac_cv_host_alias" &&
-  ac_cv_host_alias=$ac_cv_build_alias
-ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
-  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6
-host=$ac_cv_host
-host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-echo "$as_me:$LINENO: checking target system type" >&5
-echo $ECHO_N "checking target system type... $ECHO_C" >&6
-if test "${ac_cv_target+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_target_alias=$target_alias
-test "x$ac_cv_target_alias" = "x" &&
-  ac_cv_target_alias=$ac_cv_host_alias
-ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
-  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_target" >&5
-echo "${ECHO_T}$ac_cv_target" >&6
-target=$ac_cv_target
-target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-test -n "$target_alias" &&
-  test "$program_prefix$program_suffix$program_transform_name" = \
-    NONENONEs,x,x, &&
-  program_prefix=${target_alias}-
-
-am__api_version="1.7"
-
-
-          test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
-  test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
-  test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
-  # Find a good install program.  We prefer a C program (faster),
+# Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
 # incompatible versions:
 # SysV /etc/install, /usr/sbin/install
@@ -1596,6 +1541,7 @@ am__api_version="1.7"
 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
 # ./install, which can be erroneously created by make from ./install.sh.
 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
@@ -1612,6 +1558,7 @@ do
 case $as_dir/ in
   ./ | .// | /cC/* | \
   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
   /usr/ucb/* ) ;;
   *)
     # OSF1 and SCO ODT 3.0 have their own names for install.
@@ -1619,20 +1566,20 @@ case $as_dir/ in
     # by default.
     for ac_prog in ginstall scoinst install; do
       for ac_exec_ext in '' $ac_executable_extensions; do
-        if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
-          if test $ac_prog = install &&
-            grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-            # AIX install.  It has an incompatible calling convention.
-            :
-          elif test $ac_prog = install &&
-            grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-            # program-specific install script used by HP pwplus--don't use.
-            :
-          else
-            ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
-            break 3
-          fi
-        fi
+	if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+	  if test $ac_prog = install &&
+	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # AIX install.  It has an incompatible calling convention.
+	    :
+	  elif test $ac_prog = install &&
+	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # program-specific install script used by HP pwplus--don't use.
+	    :
+	  else
+	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+	    break 3
+	  fi
+	fi
       done
     done
     ;;
@@ -1662,34 +1609,6 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
 
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
-
-  if test -z "$kde_save_INSTALL_given" ; then
-    # OK, user hasn't given any INSTALL, autoconf found one for us
-    # now we test, if it supports the -p flag
-    echo "$as_me:$LINENO: checking for -p flag to install" >&5
-echo $ECHO_N "checking for -p flag to install... $ECHO_C" >&6
-    rm -f confinst.$$.* > /dev/null 2>&1
-    echo "Testtest" > confinst.$$.orig
-    ac_res=no
-    if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
-      if test -f confinst.$$.new ; then
-        # OK, -p seems to do no harm to install
-	INSTALL="${INSTALL} -p"
-	ac_res=yes
-      fi
-    fi
-    rm -f confinst.$$.*
-    echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6
-  fi
-
-  if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
-    INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
-  fi
-  if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
-    INSTALL_SCRIPT='${INSTALL}'
-  fi
-
 echo "$as_me:$LINENO: checking whether build environment is sane" >&5
 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
 # Just in case
@@ -1748,7 +1667,6 @@ _ACEOF
 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
 rm conftest.sed
 
-
 # expand $ac_aux_dir to an absolute path
 am_aux_dir=`cd $ac_aux_dir && pwd`
 
@@ -1762,6 +1680,39 @@ else
 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
 fi
 
+if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+  # We used to keeping the `.' as first argument, in order to
+  # allow $(mkdir_p) to be used without argument.  As in
+  #   $(mkdir_p) $(somedir)
+  # where $(somedir) is conditionally defined.  However this is wrong
+  # for two reasons:
+  #  1. if the package is installed by a user who cannot write `.'
+  #     make install will fail,
+  #  2. the above comment should most certainly read
+  #     $(mkdir_p) $(DESTDIR)$(somedir)
+  #     so it does not work when $(somedir) is undefined and
+  #     $(DESTDIR) is not.
+  #  To support the latter case, we have to write
+  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+  #  so the `.' trick is pointless.
+  mkdir_p='mkdir -p --'
+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.
+  for d in ./-p ./--version;
+  do
+    test -d $d && rmdir $d
+  done
+  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+  if test -f "$ac_aux_dir/mkinstalldirs"; then
+    mkdir_p='$(mkinstalldirs)'
+  else
+    mkdir_p='$(install_sh) -d'
+  fi
+fi
+
 for ac_prog in gawk mawk nawk awk
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -1804,7 +1755,7 @@ done
 
 echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
@@ -1831,7 +1782,16 @@ echo "${ECHO_T}no" >&6
   SET_MAKE="MAKE=${MAKE-make}"
 fi
 
- # test to see if srcdir already configured
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+# test to see if srcdir already configured
 if test "`cd $srcdir && pwd`" != "`pwd`" &&
    test -f $srcdir/config.status; then
   { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
@@ -1851,7 +1811,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE=linpsk
- VERSION=0.7.1
+ VERSION=0.8.1
 
 
 cat >>confdefs.h <<_ACEOF
@@ -1879,9 +1839,6 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
 
 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 
-
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
 install_sh=${install_sh-"$am_aux_dir/install-sh"}
 
 # Installed binaries are usually stripped using `strip' when the user
@@ -1974,37 +1931,26 @@ INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
 
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
+# Always define AMTAR for backward compatibility.
 
+AMTAR=${AMTAR-"${am_missing_run}tar"}
 
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
 
 
 
 
-if test "x$prefix" = "xNONE"; then
-  prefix=$ac_default_prefix
-  ac_configure_args="$ac_configure_args --prefix $prefix"
-fi
-
-          ac_config_headers="$ac_config_headers config.h"
-
-rm -f .deps 2>/dev/null
-mkdir .deps 2>/dev/null
-if test -d .deps; then
-  DEPDIR=.deps
-else
-  # MS-DOS does not allow filenames that begin with a dot.
-  DEPDIR=_deps
-fi
-rmdir .deps 2>/dev/null
 
+DEPDIR="${am__leading_dot}deps"
 
           ac_config_commands="$ac_config_commands depfiles"
 
 
 am_make=${MAKE-make}
 cat > confinc << 'END'
-doit:
+am__doit:
 	@echo done
+.PHONY: am__doit
 END
 # If we don't find an include directive, just comment out the code.
 echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
@@ -2060,106 +2006,23 @@ fi
 
 
 
-
-
-  # Check whether --enable-debug or --disable-debug was given.
-if test "${enable_debug+set}" = set; then
-  enableval="$enable_debug"
-
-    case $enableval in
-      yes)
-        kde_use_debug_code="yes"
-        kde_use_debug_define=no
-        ;;
-      full)
-        kde_use_debug_code="full"
-        kde_use_debug_define=no
-        ;;
-      *)
-        kde_use_debug_code="no"
-        kde_use_debug_define=yes
-        ;;
-    esac
-
-else
-  kde_use_debug_code="no"
-      kde_use_debug_define=no
-
-fi;
-
-    # Check whether --enable-dummyoption or --disable-dummyoption was given.
-if test "${enable_dummyoption+set}" = set; then
-  enableval="$enable_dummyoption"
-
-fi;
-
-  # Check whether --enable-strict or --disable-strict was given.
-if test "${enable_strict+set}" = set; then
-  enableval="$enable_strict"
-
-    if test $enableval = "no"; then
-         kde_use_strict_options="no"
-       else
-         kde_use_strict_options="yes"
-    fi
-
-else
-  kde_use_strict_options="no"
-fi;
-
-  # Check whether --enable-warnings or --disable-warnings was given.
-if test "${enable_warnings+set}" = set; then
-  enableval="$enable_warnings"
-
-    if test $enableval = "no"; then
-         kde_use_warnings="no"
-       else
-         kde_use_warnings="yes"
-    fi
-
-else
-  kde_use_warnings="yes"
-fi;
-
-    if test "$kde_use_debug_code" != "no"; then
-    kde_use_warnings=yes
-  fi
-
-  # Check whether --enable-profile or --disable-profile was given.
-if test "${enable_profile+set}" = set; then
-  enableval="$enable_profile"
-  kde_use_profiling=$enableval
-else
-  kde_use_profiling="no"
-
-fi;
-
-  # Check whether --enable-gcov or --disable-gcov was given.
-if test "${enable_gcov+set}" = set; then
-  enableval="$enable_gcov"
-  kde_use_gcov=$enableval
-else
-  kde_use_gcov=no
-
-fi;
-
-    CFLAGS=" $CFLAGS"
-
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
+  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
 echo "$as_me:$LINENO: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
+if test "${ac_cv_prog_CXX+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -2168,7 +2031,7 @@ do
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -2177,248 +2040,31 @@ done
 
 fi
 fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  echo "$as_me:$LINENO: result: $CXX" >&5
+echo "${ECHO_T}$CXX" >&6
 else
   echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
+    test -n "$CXX" && break
+  done
 fi
-if test -z "$ac_cv_prog_CC"; then
-  ac_ct_CC=$CC
-  # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
 echo "$as_me:$LINENO: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CC="gcc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  CC=$ac_ct_CC
-else
-  CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CC="${ac_tool_prefix}cc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
-  ac_ct_CC=$CC
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CC="cc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  CC=$ac_ct_CC
-else
-  CC="$ac_cv_prog_CC"
-fi
-
-fi
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
-       ac_prog_rejected=yes
-       continue
-     fi
-    ac_cv_prog_CC="cc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# != 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
-  fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-    test -n "$CC" && break
-  done
-fi
-if test -z "$CC"; then
-  ac_ct_CC=$CC
-  for ac_prog in cl
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -2427,7 +2073,7 @@ do
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CC="$ac_prog"
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -2436,33 +2082,26 @@ done
 
 fi
 fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+echo "${ECHO_T}$ac_ct_CXX" >&6
 else
   echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
-  test -n "$ac_ct_CC" && break
+  test -n "$ac_ct_CXX" && break
 done
+test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
 
-  CC=$ac_ct_CC
-fi
-
+  CXX=$ac_ct_CXX
 fi
 
 
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-
 # Provide some information about the compiler.
 echo "$as_me:$LINENO:" \
-     "checking for C compiler version" >&5
+     "checking for C++ compiler version" >&5
 ac_compiler=`set X $ac_compile; echo $2`
 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
   (eval $ac_compiler --version </dev/null >&5) 2>&5
@@ -2481,7 +2120,6 @@ ac_compiler=`set X $ac_compile; echo $2`
   (exit $ac_status); }
 
 cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -2501,8 +2139,8 @@ ac_clean_files="$ac_clean_files a.out a.exe b.out"
 # Try to create an executable without -o first, disregard a.out.
 # It will help us diagnose broken compilers, and finding out an intuition
 # of exeext.
-echo "$as_me:$LINENO: checking for C compiler default output" >&5
-echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking for C++ compiler default output file name" >&5
+echo $ECHO_N "checking for C++ compiler default output file name... $ECHO_C" >&6
 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
   (eval $ac_link_default) 2>&5
@@ -2522,32 +2160,32 @@ do
   test -f "$ac_file" || continue
   case $ac_file in
     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
-        ;;
+	;;
     conftest.$ac_ext )
-        # This is the source file.
-        ;;
+	# This is the source file.
+	;;
     [ab].out )
-        # We found the default executable, but exeext='' is most
-        # certainly right.
-        break;;
+	# We found the default executable, but exeext='' is most
+	# certainly right.
+	break;;
     *.* )
-        ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-        # FIXME: I believe we export ac_cv_exeext for Libtool,
-        # but it would be cool to find out if it's true.  Does anybody
-        # maintain Libtool? --akim.
-        export ac_cv_exeext
-        break;;
+	ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	# FIXME: I believe we export ac_cv_exeext for Libtool,
+	# but it would be cool to find out if it's true.  Does anybody
+	# maintain Libtool? --akim.
+	export ac_cv_exeext
+	break;;
     * )
-        break;;
+	break;;
   esac
 done
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables
 See \`config.log' for more details." >&5
-echo "$as_me: error: C compiler cannot create executables
+echo "$as_me: error: C++ compiler cannot create executables
 See \`config.log' for more details." >&2;}
    { (exit 77); exit 77; }; }
 fi
@@ -2558,8 +2196,8 @@ echo "${ECHO_T}$ac_file" >&6
 
 # Check the compiler produces executables we can run.  If not, either
 # the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
+echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
 # If not cross compiling, check that we can run a simple program.
 if test "$cross_compiling" != yes; then
@@ -2574,10 +2212,10 @@ if test "$cross_compiling" != yes; then
     if test "$cross_compiling" = maybe; then
 	cross_compiling=yes
     else
-	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+	{ { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
 If you meant to cross compile, use \`--host'.
 See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run C compiled programs.
+echo "$as_me: error: cannot run C++ compiled programs.
 If you meant to cross compile, use \`--host'.
 See \`config.log' for more details." >&2;}
    { (exit 1); exit 1; }; }
@@ -2612,8 +2250,8 @@ for ac_file in conftest.exe conftest conftest.*; do
   case $ac_file in
     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-          export ac_cv_exeext
-          break;;
+	  export ac_cv_exeext
+	  break;;
     * ) break;;
   esac
 done
@@ -2638,7 +2276,6 @@ if test "${ac_cv_objext+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -2683,13 +2320,12 @@ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
 echo "${ECHO_T}$ac_cv_objext" >&6
 OBJEXT=$ac_cv_objext
 ac_objext=$OBJEXT
-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -2709,11 +2345,21 @@ main ()
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
+  (eval $ac_compile) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -2726,23 +2372,22 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 ac_compiler_gnu=no
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
 
 fi
-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
-GCC=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-CFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_g+set}" = set; then
+echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
+GXX=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cxx_g+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -2759,162 +2404,54 @@ main ()
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
+  (eval $ac_compile) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_prog_cc_g=yes
+  ac_cv_prog_cxx_g=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_prog_cc_g=no
+ac_cv_prog_cxx_g=no
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
+echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
   else
-    CFLAGS="-g"
+    CXXFLAGS="-g"
   fi
 else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
   else
-    CFLAGS=
+    CXXFLAGS=
   fi
 fi
-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_stdc+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_prog_cc_stdc=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
-     char **p;
-     int i;
-{
-  return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
-  char *s;
-  va_list v;
-  va_start (v,p);
-  s = g (p, va_arg (v,int));
-  va_end (v);
-  return s;
-}
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
-  ;
-  return 0;
-}
-_ACEOF
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX			-qlanglvl=ansi
-# Ultrix and OSF/1	-std1
-# HP-UX 10.20 and later	-Ae
-# HP-UX older versions	-Aa -D_HPUX_SOURCE
-# SVR4			-Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
-  CC="$ac_save_CC $ac_arg"
-  rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_prog_cc_stdc=$ac_arg
-break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.$ac_objext
-done
-rm -f conftest.$ac_ext conftest.$ac_objext
-CC=$ac_save_CC
-
-fi
-
-case "x$ac_cv_prog_cc_stdc" in
-  x|xno)
-    echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6 ;;
-  *)
-    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
-    CC="$CC $ac_cv_prog_cc_stdc" ;;
-esac
-
-# Some people use a C++ compiler to compile C.  Since we use `exit',
-# in C++ we need to declare it.  In case someone uses the same compiler
-# for both compiling C and C++ we need to have the C++ compiler decide
-# the declaration of exit, since it's the most demanding environment.
-cat >conftest.$ac_ext <<_ACEOF
-#ifndef __cplusplus
-  choke me
-#endif
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  for ac_declaration in \
-   ''\
-   '#include <stdlib.h>' \
+for ac_declaration in \
+   '' \
    'extern "C" void std::exit (int) throw (); using std::exit;' \
    'extern "C" void std::exit (int); using std::exit;' \
    'extern "C" void exit (int) throw ();' \
@@ -2922,14 +2459,13 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    'void exit (int);'
 do
   cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <stdlib.h>
 $ac_declaration
+#include <stdlib.h>
 int
 main ()
 {
@@ -2940,11 +2476,21 @@ exit (42);
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
+  (eval $ac_compile) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -2957,9 +2503,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 continue
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
   cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -2976,11 +2521,21 @@ exit (42);
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
+  (eval $ac_compile) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -2992,7 +2547,7 @@ else
 sed 's/^/| /' conftest.$ac_ext >&5
 
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 done
 rm -f conftest*
 if test -n "$ac_declaration"; then
@@ -3001,23 +2556,17 @@ if test -n "$ac_declaration"; then
   echo '#endif'             >>confdefs.h
 fi
 
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-depcc="$CC"   am_compiler_list=
+depcc="$CXX"  am_compiler_list=
 
 echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
@@ -3031,18 +2580,34 @@ else
   # using a relative directory.
   cp "$am_depcomp" conftest.dir
   cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
 
-  am_cv_CC_dependencies_compiler_type=none
+  am_cv_CXX_dependencies_compiler_type=none
   if test "$am_compiler_list" = ""; then
      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
   fi
   for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
     # We need to recreate these files for each test, as the compiler may
     # overwrite some of them when testing with obscure command lines.
     # This happens at least with the AIX C compiler.
-    echo '#include "conftest.h"' > conftest.c
-    echo 'int i;' > conftest.h
-    echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
     case $depmode in
     nosideeffect)
@@ -3060,321 +2625,105 @@ else
     # mode.  It turns out that the SunPro C++ compiler does not properly
     # handle `-M -o', and we need to detect this.
     if depmode=$depmode \
-       source=conftest.c object=conftest.o \
-       depfile=conftest.Po tmpdepfile=conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o conftest.o conftest.c >/dev/null 2>&1 &&
-       grep conftest.h conftest.Po > /dev/null 2>&1 &&
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      am_cv_CC_dependencies_compiler_type=$depmode
-      break
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CXX_dependencies_compiler_type=$depmode
+        break
+      fi
     fi
   done
 
   cd ..
   rm -rf conftest.dir
 else
-  am_cv_CC_dependencies_compiler_type=none
+  am_cv_CXX_dependencies_compiler_type=none
 fi
 
 fi
-echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
-echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
-CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
 
 
 
 if
   test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
-  am__fastdepCC_TRUE=
-  am__fastdepCC_FALSE='#'
+  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+  am__fastdepCXX_TRUE=
+  am__fastdepCXX_FALSE='#'
 else
-  am__fastdepCC_TRUE='#'
-  am__fastdepCC_FALSE=
+  am__fastdepCXX_TRUE='#'
+  am__fastdepCXX_FALSE=
 fi
 
 
-
-  ac_ext=c
+ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-  if test "${ac_cv_prog_CPP+set}" = set; then
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-      # Double quotes because CPP needs to be expanded
-    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-                     Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether non-existent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  # Broken: success on invalid input.
-continue
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  break
-fi
-
-    done
-    ac_cv_prog_CPP=$CPP
-
-fi
-  CPP=$ac_cv_prog_CPP
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
 else
-  ac_cv_prog_CPP=$CPP
-fi
-echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$CPP" >&6
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
 do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-                     Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-  else
-    ac_cpp_err=
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
   fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+done
+done
 
-  # Broken: fails on valid input.
-continue
 fi
-rm -f conftest.err conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether non-existent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
 fi
-if test -z "$ac_cpp_err"; then
-  # Broken: success on invalid input.
-continue
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Passes both tests.
-ac_preproc_ok=:
-break
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
-rm -f conftest.err conftest.$ac_ext
 
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  :
-else
-  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
 fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-  if test "$GCC" = "yes"; then
-    if test "$kde_use_debug_code" != "no"; then
-      if test $kde_use_debug_code = "full" || test $kde_use_gcov = "yes"; then
-        CFLAGS="-g3 $CFLAGS"
-      else
-        CFLAGS="-g -O2 $CFLAGS"
-      fi
-    else
-      CFLAGS="-O2 $CFLAGS"
-    fi
-  fi
-
-  if test "$kde_use_debug_define" = "yes"; then
-    CFLAGS="-DNDEBUG $CFLAGS"
-  fi
-
-
-  case "$host" in
-  *-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
-  *-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
-  esac
-
-  if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
-     LDFLAGS=""
-  fi
-
-  CXXFLAGS=" $CXXFLAGS"
-
-  ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-if test -n "$ac_tool_prefix"; then
-  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
 echo "$as_me:$LINENO: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CXX+set}" = set; then
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  if test -n "$CXX"; then
-  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -3383,7 +2732,7 @@ do
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+    ac_cv_prog_ac_ct_CC="gcc"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -3392,31 +2741,210 @@ done
 
 fi
 fi
-CXX=$ac_cv_prog_CXX
-if test -n "$CXX"; then
-  echo "$as_me:$LINENO: result: $CXX" >&5
-echo "${ECHO_T}$CXX" >&6
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
 else
   echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
-    test -n "$CXX" && break
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$CC" && break
   done
 fi
-if test -z "$CXX"; then
-  ac_ct_CXX=$CXX
-  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo "$as_me:$LINENO: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  if test -n "$ac_ct_CXX"; then
-  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -3425,7 +2953,7 @@ do
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    ac_cv_prog_ac_ct_CC="$ac_prog"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -3434,26 +2962,33 @@ done
 
 fi
 fi
-ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
-if test -n "$ac_ct_CXX"; then
-  echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
-echo "${ECHO_T}$ac_ct_CXX" >&6
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
 else
   echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
-  test -n "$ac_ct_CXX" && break
+  test -n "$ac_ct_CC" && break
 done
-test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
 
-  CXX=$ac_ct_CXX
+  CC=$ac_ct_CC
 fi
 
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
 
 # Provide some information about the compiler.
 echo "$as_me:$LINENO:" \
-     "checking for C++ compiler version" >&5
+     "checking for C compiler version" >&5
 ac_compiler=`set X $ac_compile; echo $2`
 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
   (eval $ac_compiler --version </dev/null >&5) 2>&5
@@ -3471,13 +3006,12 @@ ac_compiler=`set X $ac_compile; echo $2`
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
 
-echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
-if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -3497,11 +3031,21 @@ main ()
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
+  (eval $ac_compile) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -3514,23 +3058,22 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 ac_compiler_gnu=no
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
 
 fi
-echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
-GXX=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CXXFLAGS=${CXXFLAGS+set}
-ac_save_CXXFLAGS=$CXXFLAGS
-CXXFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
-echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
-if test "${ac_cv_prog_cxx_g+set}" = set; then
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -3547,45 +3090,200 @@ main ()
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
+  (eval $ac_compile) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_prog_cxx_g=yes
+  ac_cv_prog_cc_g=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_prog_cxx_g=no
+ac_cv_prog_cc_g=no
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
-if test "$ac_test_CXXFLAGS" = set; then
-  CXXFLAGS=$ac_save_CXXFLAGS
-elif test $ac_cv_prog_cxx_g = yes; then
-  if test "$GXX" = yes; then
-    CXXFLAGS="-g -O2"
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
   else
-    CXXFLAGS="-g"
+    CFLAGS="-g"
   fi
 else
-  if test "$GXX" = yes; then
-    CXXFLAGS="-O2"
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
   else
-    CXXFLAGS=
+    CFLAGS=
   fi
 fi
-for ac_declaration in \
-   ''\
-   '#include <stdlib.h>' \
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std1 is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std1.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX			-qlanglvl=ansi
+# Ultrix and OSF/1	-std1
+# HP-UX 10.20 and later	-Ae
+# HP-UX older versions	-Aa -D_HPUX_SOURCE
+# SVR4			-Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+  x|xno)
+    echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+  *)
+    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+    CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C.  Since we use `exit',
+# in C++ we need to declare it.  In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+  choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  for ac_declaration in \
+   '' \
    'extern "C" void std::exit (int) throw (); using std::exit;' \
    'extern "C" void std::exit (int); using std::exit;' \
    'extern "C" void exit (int) throw ();' \
@@ -3593,14 +3291,13 @@ for ac_declaration in \
    'void exit (int);'
 do
   cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <stdlib.h>
 $ac_declaration
+#include <stdlib.h>
 int
 main ()
 {
@@ -3611,11 +3308,21 @@ exit (42);
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
+  (eval $ac_compile) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -3628,9 +3335,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 continue
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
   cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -3647,11 +3353,21 @@ exit (42);
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
+  (eval $ac_compile) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -3663,7 +3379,7 @@ else
 sed 's/^/| /' conftest.$ac_ext >&5
 
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 done
 rm -f conftest*
 if test -n "$ac_declaration"; then
@@ -3672,17 +3388,23 @@ if test -n "$ac_declaration"; then
   echo '#endif'             >>confdefs.h
 fi
 
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-depcc="$CXX"  am_compiler_list=
+depcc="$CC"   am_compiler_list=
 
 echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
-if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
@@ -3696,18 +3418,34 @@ else
   # using a relative directory.
   cp "$am_depcomp" conftest.dir
   cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
 
-  am_cv_CXX_dependencies_compiler_type=none
+  am_cv_CC_dependencies_compiler_type=none
   if test "$am_compiler_list" = ""; then
      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
   fi
   for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
     # We need to recreate these files for each test, as the compiler may
     # overwrite some of them when testing with obscure command lines.
     # This happens at least with the AIX C compiler.
-    echo '#include "conftest.h"' > conftest.c
-    echo 'int i;' > conftest.h
-    echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
     case $depmode in
     nosideeffect)
@@ -3725,581 +3463,1063 @@ else
     # mode.  It turns out that the SunPro C++ compiler does not properly
     # handle `-M -o', and we need to detect this.
     if depmode=$depmode \
-       source=conftest.c object=conftest.o \
-       depfile=conftest.Po tmpdepfile=conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o conftest.o conftest.c >/dev/null 2>&1 &&
-       grep conftest.h conftest.Po > /dev/null 2>&1 &&
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      am_cv_CXX_dependencies_compiler_type=$depmode
-      break
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
     fi
   done
 
   cd ..
   rm -rf conftest.dir
 else
-  am_cv_CXX_dependencies_compiler_type=none
+  am_cv_CC_dependencies_compiler_type=none
 fi
 
 fi
-echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
-echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6
-CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
 
 
 
 if
   test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
-  am__fastdepCXX_TRUE=
-  am__fastdepCXX_FALSE='#'
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
 else
-  am__fastdepCXX_TRUE='#'
-  am__fastdepCXX_FALSE=
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
 fi
 
 
 
-  if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
-    if test "$kde_use_debug_code" != "no"; then
-      if test "$CXX" = "KCC"; then
-        CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
-      else
-        if test "$kde_use_debug_code" = "full"; then
-          CXXFLAGS="-g3 $CXXFLAGS"
-        else
-          CXXFLAGS="-g -O2 $CXXFLAGS"
-        fi
-      fi
-
-echo "$as_me:$LINENO: checking whether $CXX supports -fno-builtin" >&5
-echo $ECHO_N "checking whether $CXX supports -fno-builtin... $ECHO_C" >&6
-kde_cache=`echo fno-builtin | sed 'y% .=/+-%____p_%'`
-if eval "test \"\${kde_cv_prog_cxx_$kde_cache+set}\" = set"; then
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if test "${ac_cv_prog_CPP+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-
-
-
-
-ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-
-
-
-  save_CXXFLAGS="$CXXFLAGS"
-  CXXFLAGS="$CXXFLAGS -fno-builtin"
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
   cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-int
-main ()
-{
- return 0;
-  ;
-  return 0;
-}
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "kde_cv_prog_cxx_$kde_cache=yes"
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-  CXXFLAGS="$save_CXXFLAGS"
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
+  ac_cpp_err=yes
 fi
-
-if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- :
- CXXFLAGS="-fno-builtin $CXXFLAGS"
+if test -z "$ac_cpp_err"; then
+  :
 else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- :
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+  # Broken: fails on valid input.
+continue
 fi
+rm -f conftest.err conftest.$ac_ext
 
-
-
-echo "$as_me:$LINENO: checking whether $CXX supports -Woverloaded-virtual" >&5
-echo $ECHO_N "checking whether $CXX supports -Woverloaded-virtual... $ECHO_C" >&6
-kde_cache=`echo Woverloaded-virtual | sed 'y% .=/+-%____p_%'`
-if eval "test \"\${kde_cv_prog_cxx_$kde_cache+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-
-
-   ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-
-
-  save_CXXFLAGS="$CXXFLAGS"
-  CXXFLAGS="$CXXFLAGS -Woverloaded-virtual"
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
   cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-int
-main ()
-{
- return 0;
-  ;
-  return 0;
-}
+#include <ac_nonexistent.h>
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "kde_cv_prog_cxx_$kde_cache=yes"
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+  # Passes both tests.
+ac_preproc_ok=:
+break
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-  CXXFLAGS="$save_CXXFLAGS"
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
+rm -f conftest.err conftest.$ac_ext
 
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
 fi
 
-if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- :
- WOVERLOADED_VIRTUAL="-Woverloaded-virtual"
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
 else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- :
- WOVERLOADED_VRITUAL=""
+  ac_cv_prog_CPP=$CPP
 fi
-
-
-    else
-      if test "$CXX" = "KCC"; then
-        CXXFLAGS="+K3 $CXXFLAGS"
-      else
-        CXXFLAGS="-O2 $CXXFLAGS"
-      fi
-    fi
-  fi
-
-  if test "$kde_use_debug_define" = "yes"; then
-    CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
   fi
-
-  if test "$kde_use_profiling" = "yes"; then
-
-echo "$as_me:$LINENO: checking whether $CXX supports -pg" >&5
-echo $ECHO_N "checking whether $CXX supports -pg... $ECHO_C" >&6
-kde_cache=`echo pg | sed 'y% .=/+-%____p_%'`
-if eval "test \"\${kde_cv_prog_cxx_$kde_cache+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
 
-
-   ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-
-
-  save_CXXFLAGS="$CXXFLAGS"
-  CXXFLAGS="$CXXFLAGS -pg"
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
   cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-int
-main ()
-{
- return 0;
-  ;
-  return 0;
-}
+#include <ac_nonexistent.h>
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "kde_cv_prog_cxx_$kde_cache=yes"
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+  # Passes both tests.
+ac_preproc_ok=:
+break
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-  CXXFLAGS="$save_CXXFLAGS"
-  ac_ext=c
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-fi
+echo "$as_me:$LINENO: checking for X" >&5
+echo $ECHO_N "checking for X... $ECHO_C" >&6
 
-if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- :
 
-      CFLAGS="-pg $CFLAGS"
-      CXXFLAGS="-pg $CXXFLAGS"
+# Check whether --with-x or --without-x was given.
+if test "${with_x+set}" = set; then
+  withval="$with_x"
 
+fi;
+# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
+if test "x$with_x" = xno; then
+  # The user explicitly disabled X.
+  have_x=disabled
+else
+  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
+    # Both variables are already set.
+    have_x=yes
+  else
+    if test "${ac_cv_have_x+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- :
-
+  # One or both of the vars are not set, and there is no cached value.
+ac_x_includes=no ac_x_libraries=no
+rm -fr conftest.dir
+if mkdir conftest.dir; then
+  cd conftest.dir
+  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
+  cat >Imakefile <<'_ACEOF'
+acfindx:
+	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
+_ACEOF
+  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
+    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
+    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
+    for ac_extension in a so sl; do
+      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
+	 test -f $ac_im_libdir/libX11.$ac_extension; then
+	ac_im_usrlibdir=$ac_im_libdir; break
+      fi
+    done
+    # Screen out bogus values from the imake configuration.  They are
+    # bogus both because they are the default anyway, and because
+    # using them would break gcc on systems where it needs fixed includes.
+    case $ac_im_incroot in
+	/usr/include) ;;
+	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
+    esac
+    case $ac_im_usrlibdir in
+	/usr/lib | /lib) ;;
+	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
+    esac
+  fi
+  cd ..
+  rm -fr conftest.dir
 fi
 
+# Standard set of common directories for X headers.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+ac_x_header_dirs='
+/usr/X11/include
+/usr/X11R6/include
+/usr/X11R5/include
+/usr/X11R4/include
+
+/usr/include/X11
+/usr/include/X11R6
+/usr/include/X11R5
+/usr/include/X11R4
+
+/usr/local/X11/include
+/usr/local/X11R6/include
+/usr/local/X11R5/include
+/usr/local/X11R4/include
+
+/usr/local/include/X11
+/usr/local/include/X11R6
+/usr/local/include/X11R5
+/usr/local/include/X11R4
+
+/usr/X386/include
+/usr/x386/include
+/usr/XFree86/include/X11
+
+/usr/include
+/usr/local/include
+/usr/unsupported/include
+/usr/athena/include
+/usr/local/x11r5/include
+/usr/lpp/Xamples/include
+
+/usr/openwin/include
+/usr/openwin/share/include'
+
+if test "$ac_x_includes" = no; then
+  # Guess where to find include files, by looking for Intrinsic.h.
+  # First, try using that file with no special directory specified.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <X11/Intrinsic.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
   fi
-
-  if test "$kde_use_gcov" = "yes"; then
-
-echo "$as_me:$LINENO: checking whether $CXX supports -fprofile-arcs" >&5
-echo $ECHO_N "checking whether $CXX supports -fprofile-arcs... $ECHO_C" >&6
-kde_cache=`echo fprofile-arcs | sed 'y% .=/+-%____p_%'`
-if eval "test \"\${kde_cv_prog_cxx_$kde_cache+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # We can compile using X headers with no special include directory.
+ac_x_includes=
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+  for ac_dir in $ac_x_header_dirs; do
+  if test -r "$ac_dir/X11/Intrinsic.h"; then
+    ac_x_includes=$ac_dir
+    break
+  fi
+done
+fi
+rm -f conftest.err conftest.$ac_ext
+fi # $ac_x_includes = no
 
-
-   ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-
-
-  save_CXXFLAGS="$CXXFLAGS"
-  CXXFLAGS="$CXXFLAGS -fprofile-arcs"
+if test "$ac_x_libraries" = no; then
+  # Check for the libraries.
+  # See if we find them without any special options.
+  # Don't add to $LIBS permanently.
+  ac_save_LIBS=$LIBS
+  LIBS="-lXt $LIBS"
   cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
+#include <X11/Intrinsic.h>
 int
 main ()
 {
- return 0;
+XtMalloc (0)
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  eval "kde_cv_prog_cxx_$kde_cache=yes"
+  LIBS=$ac_save_LIBS
+# We can link X programs with no special library path.
+ac_x_libraries=
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+LIBS=$ac_save_LIBS
+for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
+do
+  # Don't even attempt the hair of trying to link an X program!
+  for ac_extension in a so sl; do
+    if test -r $ac_dir/libXt.$ac_extension; then
+      ac_x_libraries=$ac_dir
+      break 2
+    fi
+  done
+done
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi # $ac_x_libraries = no
+
+if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
+  # Didn't find X anywhere.  Cache the known absence of X.
+  ac_cv_have_x="have_x=no"
+else
+  # Record where we found X for the cache.
+  ac_cv_have_x="have_x=yes \
+		ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
+fi
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-  CXXFLAGS="$save_CXXFLAGS"
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
+  fi
+  eval "$ac_cv_have_x"
+fi # $with_x != no
 
+if test "$have_x" != yes; then
+  echo "$as_me:$LINENO: result: $have_x" >&5
+echo "${ECHO_T}$have_x" >&6
+  no_x=yes
+else
+  # If each of the values was on the command line, it overrides each guess.
+  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
+  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
+  # Update the cache value to reflect the command line values.
+  ac_cv_have_x="have_x=yes \
+		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
+  echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
+echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
 fi
 
-if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- :
 
-      CFLAGS="-fprofile-arcs -ftest-coverage $CFLAGS"
-      CXXFLAGS="-fprofile-arcs -ftest-coverage $CXXFLAGS"
 
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- :
 
+
+echo "$as_me:$LINENO: checking QTDIR" >&5
+echo $ECHO_N "checking QTDIR... $ECHO_C" >&6
+
+# Check whether --with-qtdir or --without-qtdir was given.
+if test "${with_qtdir+set}" = set; then
+  withval="$with_qtdir"
+  QTDIR=$withval
+fi;
+# Check that QTDIR is defined or that --with-qtdir given
+if test x"$QTDIR" = x ; then
+    QT_SEARCH="/usr/lib/qt31 /usr/local/qt31 /usr/lib/qt3 /usr/local/qt3 /usr/qt/3 /usr/local/qt2 /usr/lib/qt /usr/local/qt"
+    for i in $QT_SEARCH; do
+        if test -f $i/include/qglobal.h -a x$QTDIR = x; then QTDIR=$i; fi
+    done
+fi
+if test x"$QTDIR" = x ; then
+    { { echo "$as_me:$LINENO: error: *** QTDIR must be defined, or --with-qtdir option given" >&5
+echo "$as_me: error: *** QTDIR must be defined, or --with-qtdir option given" >&2;}
+   { (exit 1); exit 1; }; }
 fi
+echo "$as_me:$LINENO: result: $QTDIR" >&5
+echo "${ECHO_T}$QTDIR" >&6
+
+# Change backslashes in QTDIR to forward slashes to prevent escaping
+# problems later on in the build process, mainly for Cygwin build
+# environment using MSVC as the compiler
+# TODO: Use sed instead of perl
+#QTDIR=`echo $QTDIR | perl -p -e 's/\\\\/\\//g'`
+
+# Figure out which version of Qt we are using
+echo "$as_me:$LINENO: checking Qt version" >&5
+echo $ECHO_N "checking Qt version... $ECHO_C" >&6
+QT_VER=`grep 'define.*QT_VERSION_STR\W' $QTDIR/include/qglobal.h | perl -p -e 's/\D//g'`
+case "${QT_VER}" in
+    2*)
+        QT_MAJOR="2"
+    ;;
+    3*)
+        QT_MAJOR="3"
+    ;;
+    *)
+        { { echo "$as_me:$LINENO: error: *** Don't know how to handle this Qt major version" >&5
+echo "$as_me: error: *** Don't know how to handle this Qt major version" >&2;}
+   { (exit 1); exit 1; }; }
+    ;;
+esac
+echo "$as_me:$LINENO: result: $QT_VER ($QT_MAJOR)" >&5
+echo "${ECHO_T}$QT_VER ($QT_MAJOR)" >&6
 
+# Check that moc is in path
+# Extract the first word of "moc", so it can be a program name with args.
+set dummy moc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_MOC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$MOC"; then
+  ac_cv_prog_MOC="$MOC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $QTDIR/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_MOC="$QTDIR/bin/moc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
   fi
+done
+done
 
-  if test "$kde_use_warnings" = "yes"; then
-      if test "$GCC" = "yes"; then
-        case $host in
-          *-*-linux-gnu)
-            CFLAGS="-ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
-            CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion $CXXFLAGS"
-          ;;
-        esac
-        CXXFLAGS="-Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
+fi
+fi
+MOC=$ac_cv_prog_MOC
+if test -n "$MOC"; then
+  echo "$as_me:$LINENO: result: $MOC" >&5
+echo "${ECHO_T}$MOC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+if test x$MOC = x ; then
+        { { echo "$as_me:$LINENO: error: *** moc not found" >&5
+echo "$as_me: error: *** moc not found" >&2;}
+   { (exit 1); exit 1; }; }
+fi
 
-echo "$as_me:$LINENO: checking whether $CXX supports -Wundef" >&5
-echo $ECHO_N "checking whether $CXX supports -Wundef... $ECHO_C" >&6
-kde_cache=`echo Wundef | sed 'y% .=/+-%____p_%'`
-if eval "test \"\${kde_cv_prog_cxx_$kde_cache+set}\" = set"; then
+# uic is the Qt user interface compiler
+# Extract the first word of "uic", so it can be a program name with args.
+set dummy uic; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_UIC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
+  if test -n "$UIC"; then
+  ac_cv_prog_UIC="$UIC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $QTDIR/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_UIC="$QTDIR/bin/uic"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+UIC=$ac_cv_prog_UIC
+if test -n "$UIC"; then
+  echo "$as_me:$LINENO: result: $UIC" >&5
+echo "${ECHO_T}$UIC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+if test x$UIC = x ; then
+        { { echo "$as_me:$LINENO: error: *** uic not found" >&5
+echo "$as_me: error: *** uic not found" >&2;}
+   { (exit 1); exit 1; }; }
+fi
 
+# qembed is the Qt data embedding utility.
+# It is located in $QTDIR/tools/qembed, and must be compiled and installed
+# manually, we'll let it slide if it isn't present
+#AC_CHECK_PROG(QEMBED, qembed, qembed)
 
 
-   ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+# Calculate Qt include path
+QT_CXXFLAGS="-I$QTDIR/include"
+
+QT_IS_EMBEDDED="no"
+# On unix, figure out if we're doing a static or dynamic link
+case "${host}" in
+    *-cygwin)
 
-ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cat >>confdefs.h <<_ACEOF
+#define WIN32 ""
+_ACEOF
+
+        if test -f "$QTDIR/lib/qt.lib" ; then
+            QT_LIB="qt.lib"
+            QT_IS_STATIC="yes"
+            QT_IS_MT="no"
+        elif test -f "$QTDIR/lib/qt-mt.lib" ; then
+            QT_LIB="qt-mt.lib"
+            QT_IS_STATIC="yes"
+            QT_IS_MT="yes"
+        elif test -f "$QTDIR/lib/qt$QT_VER.lib" ; then
+            QT_LIB="qt$QT_VER.lib"
+            QT_IS_STATIC="no"
+            QT_IS_MT="no"
+        elif test -f "$QTDIR/lib/qt-mt$QT_VER.lib" ; then
+            QT_LIB="qt-mt$QT_VER.lib"
+            QT_IS_STATIC="no"
+            QT_IS_MT="yes"
+        fi
+        ;;
 
+    *)
+        QT_IS_STATIC=`ls $QTDIR/lib/*.a 2> /dev/null`
+        if test "x$QT_IS_STATIC" = x; then
+            QT_IS_STATIC="no"
+        else
+            QT_IS_STATIC="yes"
+        fi
+        if test x$QT_IS_STATIC = xno ; then
+            QT_IS_DYNAMIC=`ls $QTDIR/lib/*.so 2> /dev/null`
+            if test "x$QT_IS_DYNAMIC" = x;  then
+                { { echo "$as_me:$LINENO: error: *** Couldn't find any Qt libraries" >&5
+echo "$as_me: error: *** Couldn't find any Qt libraries" >&2;}
+   { (exit 1); exit 1; }; }
+            fi
+        fi
 
-  save_CXXFLAGS="$CXXFLAGS"
-  CXXFLAGS="$CXXFLAGS -Wundef"
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
+        if test "x`ls $QTDIR/lib/libqt-mt.* 2> /dev/null`" != x ; then
+            QT_LIB="-lqt-mt"
+            QT_IS_MT="yes"
+        elif test "x`ls $QTDIR/lib/libqt.* 2> /dev/null`" != x ; then
+            QT_LIB="-lqt"
+            QT_IS_MT="no"
+        elif test "x`ls $QTDIR/lib/libqte.* 2> /dev/null`" != x ; then
+            QT_LIB="-lqte"
+            QT_IS_MT="no"
+            QT_IS_EMBEDDED="yes"
+        elif test "x`ls $QTDIR/lib/libqte-mt.* 2> /dev/null`" != x ; then
+            QT_LIB="-lqte-mt"
+            QT_IS_MT="yes"
+            QT_IS_EMBEDDED="yes"
+        fi
+        ;;
+esac
+echo "$as_me:$LINENO: checking if Qt is static" >&5
+echo $ECHO_N "checking if Qt is static... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $QT_IS_STATIC" >&5
+echo "${ECHO_T}$QT_IS_STATIC" >&6
+echo "$as_me:$LINENO: checking if Qt is multithreaded" >&5
+echo $ECHO_N "checking if Qt is multithreaded... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $QT_IS_MT" >&5
+echo "${ECHO_T}$QT_IS_MT" >&6
+echo "$as_me:$LINENO: checking if Qt is embedded" >&5
+echo $ECHO_N "checking if Qt is embedded... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $QT_IS_EMBEDDED" >&5
+echo "${ECHO_T}$QT_IS_EMBEDDED" >&6
+
+QT_GUILINK=""
+QASSISTANTCLIENT_LDADD="-lqassistantclient"
+case "${host}" in
+    *irix*)
+        QT_LIBS="$QT_LIB"
+        if test $QT_IS_STATIC = yes ; then
+            QT_LIBS="$QT_LIBS -L$x_libraries -lXext -lX11 -lm -lSM -lICE"
+        fi
+        ;;
+
+    *linux*)
+        QT_LIBS="$QT_LIB"
+        if test $QT_IS_STATIC = yes && test $QT_IS_EMBEDDED = no; then
+            QT_LIBS="$QT_LIBS -L$x_libraries -lXext -lX11 -lm -lSM -lICE -ldl -ljpeg"
+        fi
+        ;;
+
+
+    *osf*)
+        # Digital Unix (aka DGUX aka Tru64)
+        QT_LIBS="$QT_LIB"
+        if test $QT_IS_STATIC = yes ; then
+            QT_LIBS="$QT_LIBS -L$x_libraries -lXext -lX11 -lm -lSM -lICE"
+        fi
+        ;;
+
+    *solaris*)
+        QT_LIBS="$QT_LIB"
+        if test $QT_IS_STATIC = yes ; then
+            QT_LIBS="$QT_LIBS -L$x_libraries -lXext -lX11 -lm -lSM -lICE -lresolv -lsocket -lnsl"
+        fi
+        ;;
+
+
+    *win*)
+        # linker flag to suppress console when linking a GUI app on Win32
+        QT_GUILINK="/subsystem:windows"
+
+	if test $QT_MAJOR = "3" ; then
+	    if test $QT_IS_MT = yes ; then
+        	QT_LIBS="/nodefaultlib:libcmt"
+            else
+            	QT_LIBS="/nodefaultlib:libc"
+            fi
+        fi
+
+        if test $QT_IS_STATIC = yes ; then
+            QT_LIBS="$QT_LIBS $QT_LIB kernel32.lib user32.lib gdi32.lib comdlg32.lib ole32.lib shell32.lib imm32.lib advapi32.lib wsock32.lib winspool.lib winmm.lib netapi32.lib"
+            if test $QT_MAJOR = "3" ; then
+                QT_LIBS="$QT_LIBS qtmain.lib"
+            fi
+        else
+            QT_LIBS="$QT_LIBS $QT_LIB"
+            if test $QT_MAJOR = "3" ; then
+                QT_CXXFLAGS="$QT_CXXFLAGS -DQT_DLL"
+                QT_LIBS="$QT_LIBS qtmain.lib qui.lib user32.lib netapi32.lib"
+            fi
+        fi
+        QASSISTANTCLIENT_LDADD="qassistantclient.lib"
+        ;;
+
+esac
+
+
+if test x"$QT_IS_EMBEDDED" = "xyes" ; then
+        QT_CXXFLAGS="-DQWS $QT_CXXFLAGS"
+fi
+
+QT_LDADD="-L$QTDIR/lib $QT_LIB"
+if test x"$QT_IS_MT" = "xyes" ; then
+        QT_CXXFLAGS="$QT_CXXFLAGS -D_REENTRANT -DQT_THREAD_SUPPORT"
+	QT_LDADD="${QT_LDADD} -lpthread"
+	echo "$as_me:$LINENO: checking QT_LDADD" >&5
+echo $ECHO_N "checking QT_LDADD... $ECHO_C" >&6
+	echo "$as_me:$LINENO: result: $QT_LDADD" >&5
+echo "${ECHO_T}$QT_LDADD" >&6
+
+else
+ if test x$QT_IS_STATIC = xyes ; then
+    OLDLIBS="$LIBS"
+    LIBS="$QT_LDADD"
+    echo "$as_me:$LINENO: checking for XftFontOpen in -lXft" >&5
+echo $ECHO_N "checking for XftFontOpen in -lXft... $ECHO_C" >&6
+if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lXft  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char XftFontOpen ();
 int
 main ()
 {
- return 0;
+XftFontOpen ();
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  eval "kde_cv_prog_cxx_$kde_cache=yes"
+  ac_cv_lib_Xft_XftFontOpen=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+ac_cv_lib_Xft_XftFontOpen=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-  CXXFLAGS="$save_CXXFLAGS"
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_Xft_XftFontOpen" >&5
+echo "${ECHO_T}$ac_cv_lib_Xft_XftFontOpen" >&6
+if test $ac_cv_lib_Xft_XftFontOpen = yes; then
+  QT_LDADD="$QT_LDADD -lXft"
 fi
 
-if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- :
- CXXFLAGS="-Wundef $CXXFLAGS"
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- :
-
+    LIBS="$LIBS"
+ fi
 fi
 
+echo "$as_me:$LINENO: checking QT_CXXFLAGS" >&5
+echo $ECHO_N "checking QT_CXXFLAGS... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $QT_CXXFLAGS" >&5
+echo "${ECHO_T}$QT_CXXFLAGS" >&6
+echo "$as_me:$LINENO: checking QT_LDADD" >&5
+echo $ECHO_N "checking QT_LDADD... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $QT_LDADD" >&5
+echo "${ECHO_T}$QT_LDADD" >&6
+all_libraries="${all_libraries} ${QT_LDADD}"
 
-echo "$as_me:$LINENO: checking whether $CXX supports -Wno-long-long" >&5
-echo $ECHO_N "checking whether $CXX supports -Wno-long-long... $ECHO_C" >&6
-kde_cache=`echo Wno-long-long | sed 'y% .=/+-%____p_%'`
-if eval "test \"\${kde_cv_prog_cxx_$kde_cache+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
 
+echo "$as_me:$LINENO: checking FFTW lib" >&5
+echo $ECHO_N "checking FFTW lib... $ECHO_C" >&6
 
+# Check whether --with-fftw_dir or --without-fftw_dir was given.
+if test "${with_fftw_dir+set}" = set; then
+  withval="$with_fftw_dir"
+  FFTW_BASE_DIR=$withval
+fi;
+if test ${FFTW_BASE_DIR}x = "x" ; then
+    FFTW_SEARCH="/usr /usr/local /usr/lib  /sw /sw/lib "
+    for i in $FFTW_SEARCH; do
+        if test -f $i/include/fftw3.h -a x${FFTW_BASE_DIR} = x; then FFTW_BASE_DIR=$i; fi
+    done
+fi
+if test ${FFTW_BASE_DIR}x = "x" ; then
+    { { echo "$as_me:$LINENO: error: *** FFTW 3 required, but not found. If FFTW is installed use --with-fftw-dir option" >&5
+echo "$as_me: error: *** FFTW 3 required, but not found. If FFTW is installed use --with-fftw-dir option" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+echo "$as_me:$LINENO: result: $FFTW_BASE_DIR" >&5
+echo "${ECHO_T}$FFTW_BASE_DIR" >&6
+
+if test "$FFTW_BASE_DIR" != "/usr"; then
+	all_includes="${all_includes} -I$FFTW_BASE_DIR/include"
+	all_libraries="${all_libraries} -L$FFTW_BASE_DIR/lib"
+fi
+
+all_libraries="${all_libraries} -lfftw3"
+#AC_SUBST(FFTW_BASE_DIR)
 
-   ac_ext=cc
+
+
+ac_ext=cc
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
-ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-
-
-  save_CXXFLAGS="$CXXFLAGS"
-  CXXFLAGS="$CXXFLAGS -Wno-long-long"
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
- return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "kde_cv_prog_cxx_$kde_cache=yes"
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
 
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-  CXXFLAGS="$save_CXXFLAGS"
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
 fi
-
-if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- :
- CXXFLAGS="-Wno-long-long $CXXFLAGS"
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  echo "$as_me:$LINENO: result: $CXX" >&5
+echo "${ECHO_T}$CXX" >&6
 else
- echo "$as_me:$LINENO: result: no" >&5
+  echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
- :
-
 fi
 
-
-echo "$as_me:$LINENO: checking whether $CXX supports -Wnon-virtual-dtor" >&5
-echo $ECHO_N "checking whether $CXX supports -Wnon-virtual-dtor... $ECHO_C" >&6
-kde_cache=`echo Wnon-virtual-dtor | sed 'y% .=/+-%____p_%'`
-if eval "test \"\${kde_cv_prog_cxx_$kde_cache+set}\" = set"; then
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
 
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+echo "${ECHO_T}$ac_ct_CXX" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
 
+  test -n "$ac_ct_CXX" && break
+done
+test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
 
-   ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+  CXX=$ac_ct_CXX
+fi
 
-ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
 
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+     "checking for C++ compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
 
-  save_CXXFLAGS="$CXXFLAGS"
-  CXXFLAGS="$CXXFLAGS -Wnon-virtual-dtor"
+echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
   cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -4309,83 +4529,59 @@ cat >>conftest.$ac_ext <<_ACEOF
 int
 main ()
 {
- return 0;
+#ifndef __GNUC__
+       choke me
+#endif
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  eval "kde_cv_prog_cxx_$kde_cache=yes"
+  ac_compiler_gnu=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+ac_compiler_gnu=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-  CXXFLAGS="$save_CXXFLAGS"
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-fi
-
-if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- :
- CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- :
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
 
 fi
-
-     fi
-  fi
-
-  if test "$GCC" = "yes" && test "$kde_use_strict_options" = "yes"; then
-    CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
-  fi
-
-  if test "$GXX" = "yes"; then
-
-echo "$as_me:$LINENO: checking whether $CXX supports -fno-exceptions" >&5
-echo $ECHO_N "checking whether $CXX supports -fno-exceptions... $ECHO_C" >&6
-kde_cache=`echo fno-exceptions | sed 'y% .=/+-%____p_%'`
-if eval "test \"\${kde_cv_prog_cxx_$kde_cache+set}\" = set"; then
+echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
+GXX=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cxx_g+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-
-
-
-   ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-
-
-  save_CXXFLAGS="$CXXFLAGS"
-  CXXFLAGS="$CXXFLAGS -fno-exceptions"
   cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -4395,636 +4591,1000 @@ cat >>conftest.$ac_ext <<_ACEOF
 int
 main ()
 {
- return 0;
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  eval "kde_cv_prog_cxx_$kde_cache=yes"
+  ac_cv_prog_cxx_g=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+ac_cv_prog_cxx_g=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-  CXXFLAGS="$save_CXXFLAGS"
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-
-if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- :
- CXXFLAGS="$CXXFLAGS -fno-exceptions"
+echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
 else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- :
-
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
 fi
-
-
-echo "$as_me:$LINENO: checking whether $CXX supports -fno-check-new" >&5
-echo $ECHO_N "checking whether $CXX supports -fno-check-new... $ECHO_C" >&6
-kde_cache=`echo fno-check-new | sed 'y% .=/+-%____p_%'`
-if eval "test \"\${kde_cv_prog_cxx_$kde_cache+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-
-
-   ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-
-
-  save_CXXFLAGS="$CXXFLAGS"
-  CXXFLAGS="$CXXFLAGS -fno-check-new"
+for ac_declaration in \
+   '' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
   cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
+$ac_declaration
+#include <stdlib.h>
 int
 main ()
 {
- return 0;
+exit (42);
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  eval "kde_cv_prog_cxx_$kde_cache=yes"
+  :
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+continue
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-  CXXFLAGS="$save_CXXFLAGS"
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-fi
-
-if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- :
- CXXFLAGS="$CXXFLAGS -fno-check-new"
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- :
-
-fi
-
-
-echo "$as_me:$LINENO: checking whether $CXX supports -fexceptions" >&5
-echo $ECHO_N "checking whether $CXX supports -fexceptions... $ECHO_C" >&6
-kde_cache=`echo fexceptions | sed 'y% .=/+-%____p_%'`
-if eval "test \"\${kde_cv_prog_cxx_$kde_cache+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-
-
-   ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-
-
-  save_CXXFLAGS="$CXXFLAGS"
-  CXXFLAGS="$CXXFLAGS -fexceptions"
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
   cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
+$ac_declaration
 int
 main ()
 {
- return 0;
+exit (42);
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  eval "kde_cv_prog_cxx_$kde_cache=yes"
+  break
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-  CXXFLAGS="$save_CXXFLAGS"
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-fi
-
-if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- :
- USE_EXCEPTIONS="-fexceptions"
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- :
- USE_EXCEPTIONS=
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
 fi
 
-  fi
-  if test "$CXX" = "KCC"; then
-
-    # Check whether --enable-pch or --disable-pch was given.
-if test "${enable_pch+set}" = set; then
-  enableval="$enable_pch"
-
-      kde_use_pch=$enableval
-
-else
-  kde_use_pch=no
-fi;
-
-    if test "$kde_use_pch" = "yes"; then
-
-echo "$as_me:$LINENO: checking whether $CXX supports --pch" >&5
-echo $ECHO_N "checking whether $CXX supports --pch... $ECHO_C" >&6
-kde_cache=`echo -pch | sed 'y% .=/+-%____p_%'`
-if eval "test \"\${kde_cv_prog_cxx_$kde_cache+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-
-
-   ac_ext=cc
+ac_ext=cc
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
-ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+depcc="$CXX"  am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
 
+  am_cv_CXX_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
-  save_CXXFLAGS="$CXXFLAGS"
-  CXXFLAGS="$CXXFLAGS --pch"
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CXX_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
 
-int
-main ()
-{
- return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "kde_cv_prog_cxx_$kde_cache=yes"
+  cd ..
+  rm -rf conftest.dir
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  am_cv_CXX_dependencies_compiler_type=none
+fi
 
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-  CXXFLAGS="$save_CXXFLAGS"
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
 
 
-fi
 
-if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- :
- CXXFLAGS="$CXXFLAGS --pch"
+if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+  am__fastdepCXX_TRUE=
+  am__fastdepCXX_FALSE='#'
 else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- :
-
+  am__fastdepCXX_TRUE='#'
+  am__fastdepCXX_FALSE=
 fi
 
-                                              fi
 
-echo "$as_me:$LINENO: checking whether $CXX supports --inline_keyword_space_time=6" >&5
-echo $ECHO_N "checking whether $CXX supports --inline_keyword_space_time=6... $ECHO_C" >&6
-kde_cache=`echo -inline_keyword_space_time=6 | sed 'y% .=/+-%____p_%'`
-if eval "test \"\${kde_cv_prog_cxx_$kde_cache+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+# Check whether --enable-shared or --disable-shared was given.
+if test "${enable_shared+set}" = set; then
+  enableval="$enable_shared"
+  p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_shared=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
 else
+  enable_shared=yes
+fi;
 
+# Check whether --enable-static or --disable-static was given.
+if test "${enable_static+set}" = set; then
+  enableval="$enable_static"
+  p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
+    *)
+     enable_static=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_static=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_static=yes
+fi;
 
+# Check whether --enable-fast-install or --disable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then
+  enableval="$enable_fast_install"
+  p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
+    *)
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_fast_install=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_fast_install=yes
+fi;
 
-   ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-
-
-  save_CXXFLAGS="$CXXFLAGS"
-  CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+  { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+   { (exit 1); exit 1; }; }
 
-int
-main ()
-{
- return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "kde_cv_prog_cxx_$kde_cache=yes"
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+  ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+   { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
 
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-  CXXFLAGS="$save_CXXFLAGS"
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 
-fi
 
-if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- :
- CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- :
+  ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+  ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
 
 fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 
 
-echo "$as_me:$LINENO: checking whether $CXX supports --inline_auto_space_time=2" >&5
-echo $ECHO_N "checking whether $CXX supports --inline_auto_space_time=2... $ECHO_C" >&6
-kde_cache=`echo -inline_auto_space_time=2 | sed 'y% .=/+-%____p_%'`
-if eval "test \"\${kde_cv_prog_cxx_$kde_cache+set}\" = set"; then
+echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
+echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
+if test "${lt_cv_path_SED+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
+  # Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for lt_ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+      fi
+    done
+  done
+done
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+  test ! -f $lt_ac_sed && break
+  cat /dev/null > conftest.in
+  lt_ac_count=0
+  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+  # Check for GNU sed and select it if it is found.
+  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+    lt_cv_path_SED=$lt_ac_sed
+    break
+  fi
+  while true; do
+    cat conftest.in conftest.in >conftest.tmp
+    mv conftest.tmp conftest.in
+    cp conftest.in conftest.nl
+    echo >>conftest.nl
+    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+    cmp -s conftest.out conftest.nl || break
+    # 10000 chars as input seems more than enough
+    test $lt_ac_count -gt 10 && break
+    lt_ac_count=`expr $lt_ac_count + 1`
+    if test $lt_ac_count -gt $lt_ac_max; then
+      lt_ac_max=$lt_ac_count
+      lt_cv_path_SED=$lt_ac_sed
+    fi
+  done
+done
 
+fi
 
+SED=$lt_cv_path_SED
+echo "$as_me:$LINENO: result: $SED" >&5
+echo "${ECHO_T}$SED" >&6
 
-   ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-
-
-  save_CXXFLAGS="$CXXFLAGS"
-  CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
- return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "kde_cv_prog_cxx_$kde_cache=yes"
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
+  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+    then ac_cv_prog_egrep='grep -E'
+    else ac_cv_prog_egrep='egrep'
+    fi
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-  CXXFLAGS="$save_CXXFLAGS"
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
 
 
-fi
 
-if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- :
- CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"
+# Check whether --with-gnu-ld or --without-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+  withval="$with_gnu_ld"
+  test "$withval" = no || with_gnu_ld=yes
 else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- :
-
+  with_gnu_ld=no
+fi;
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | ?:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  echo "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
+else
+  echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
 fi
-
-
-echo "$as_me:$LINENO: checking whether $CXX supports --inline_implicit_space_time=2.0" >&5
-echo $ECHO_N "checking whether $CXX supports --inline_implicit_space_time=2.0... $ECHO_C" >&6
-kde_cache=`echo -inline_implicit_space_time=2.0 | sed 'y% .=/+-%____p_%'`
-if eval "test \"\${kde_cv_prog_cxx_$kde_cache+set}\" = set"; then
+if test "${lt_cv_path_LD+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
+  if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some GNU ld's only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
 
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+   { (exit 1); exit 1; }; }
+echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
+if test "${lt_cv_prog_gnu_ld+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
+with_gnu_ld=$lt_cv_prog_gnu_ld
 
 
-   ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-
-
-  save_CXXFLAGS="$CXXFLAGS"
-  CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
- return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "kde_cv_prog_cxx_$kde_cache=yes"
+echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
+echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
+if test "${lt_cv_ld_reload_flag+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
+  lt_cv_ld_reload_flag='-r'
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-  CXXFLAGS="$save_CXXFLAGS"
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
+echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
+echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+  darwin*)
+    if test "$GCC" = yes; then
+      reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
+    else
+      reload_cmds='$LD$reload_flag -o $output$reload_objs'
+    fi
+    ;;
+esac
 
+echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
+echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
+if test "${lt_cv_path_NM+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$NM"; then
+  # Let the user override the test.
+  lt_cv_path_NM="$NM"
+else
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
+    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+      # Check to see if the nm accepts a BSD-compat flag.
+      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+      #   nm: unknown option "B" ignored
+      # Tru64's nm complains that /dev/null is an invalid object file
+      case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+      */dev/null* | *'Invalid file or object type'*)
+	lt_cv_path_NM="$tmp_nm -B"
+	break
+        ;;
+      *)
+	case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+	*/dev/null*)
+	  lt_cv_path_NM="$tmp_nm -p"
+	  break
+	  ;;
+	*)
+	  lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+	  continue # so that we can try to find one that supports BSD flags
+	  ;;
+	esac
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
 fi
+fi
+echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
+echo "${ECHO_T}$lt_cv_path_NM" >&6
+NM="$lt_cv_path_NM"
 
-if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
+echo "$as_me:$LINENO: checking whether ln -s works" >&5
+echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+  echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6
- :
- CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"
 else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- :
-
+  echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+echo "${ECHO_T}no, using $LN_S" >&6
 fi
 
-
-echo "$as_me:$LINENO: checking whether $CXX supports --inline_generated_space_time=2.0" >&5
-echo $ECHO_N "checking whether $CXX supports --inline_generated_space_time=2.0... $ECHO_C" >&6
-kde_cache=`echo -inline_generated_space_time=2.0 | sed 'y% .=/+-%____p_%'`
-if eval "test \"\${kde_cv_prog_cxx_$kde_cache+set}\" = set"; then
+echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5
+echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6
+if test "${lt_cv_deplibs_check_method+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
+  lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
 
+case $host_os in
+aix4* | aix5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-   ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+bsdi[45]*)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  ;;
 
+cygwin*)
+  # func_win32_libid is a shell function defined in ltmain.sh
+  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+  lt_cv_file_magic_cmd='func_win32_libid'
+  ;;
 
-  save_CXXFLAGS="$CXXFLAGS"
-  CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+mingw* | pw32*)
+  # Base MSYS/MinGW do not provide the 'file' command needed by
+  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
+  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  ;;
 
-int
-main ()
-{
- return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "kde_cv_prog_cxx_$kde_cache=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-  CXXFLAGS="$save_CXXFLAGS"
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+freebsd* | kfreebsd*-gnu)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    case $host_cpu in
+    i*86 )
+      # Not sure whether the presence of OpenBSD here was a mistake.
+      # Let's accept both of them until this is cleared up.
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
+      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+      ;;
+    esac
+  else
+    lt_cv_deplibs_check_method=pass_all
+  fi
+  ;;
 
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-fi
+hpux10.20* | hpux11*)
+  lt_cv_file_magic_cmd=/usr/bin/file
+  case "$host_cpu" in
+  ia64*)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
+    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+    ;;
+  hppa*64*)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
+    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+    ;;
+  *)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+    lt_cv_file_magic_test_file=/usr/lib/libc.sl
+    ;;
+  esac
+  ;;
 
-if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- :
- CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- :
+irix5* | irix6* | nonstopux*)
+  case $LD in
+  *-32|*"-32 ") libmagic=32-bit;;
+  *-n32|*"-n32 ") libmagic=N32;;
+  *-64|*"-64 ") libmagic=64-bit;;
+  *) libmagic=never-match;;
+  esac
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-fi
+# This must be Linux ELF.
+linux*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
+netbsd*)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+  fi
+  ;;
 
-echo "$as_me:$LINENO: checking whether $CXX supports --one_per" >&5
-echo $ECHO_N "checking whether $CXX supports --one_per... $ECHO_C" >&6
-kde_cache=`echo -one_per | sed 'y% .=/+-%____p_%'`
-if eval "test \"\${kde_cv_prog_cxx_$kde_cache+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+newos6*)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
 
+nto-qnx*)
+  lt_cv_deplibs_check_method=unknown
+  ;;
 
+openbsd*)
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+  fi
+  ;;
 
-   ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+sco3.2v5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-  save_CXXFLAGS="$CXXFLAGS"
-  CXXFLAGS="$CXXFLAGS --one_per"
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+  case $host_vendor in
+  motorola)
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+    ;;
+  ncr)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  sequent)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+    ;;
+  sni)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
+    lt_cv_file_magic_test_file=/lib/libc.so
+    ;;
+  siemens)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  esac
+  ;;
+
+sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+esac
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
+echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+  enableval="$enable_libtool_lock"
+
+fi;
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *ELF-32*)
+      HPUX_IA64_MODE="32"
+      ;;
+    *ELF-64*)
+      HPUX_IA64_MODE="64"
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '#line 5473 "configure"' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+   if test "$lt_cv_prog_gnu_ld" = yes; then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -melf32bsmip"
+      ;;
+    *N32*)
+      LD="${LD-ld} -melf32bmipn32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -melf64bmip"
+      ;;
+    esac
+   else
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -32"
+      ;;
+    *N32*)
+      LD="${LD-ld} -n32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -64"
+      ;;
+    esac
+   fi
+  fi
+  rm -rf conftest*
+  ;;
+
+x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    case "`/usr/bin/file conftest.o`" in
+    *32-bit*)
+      case $host in
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_i386"
+          ;;
+        ppc64-*linux*|powerpc64-*linux*)
+          LD="${LD-ld} -m elf32ppclinux"
+          ;;
+        s390x-*linux*)
+          LD="${LD-ld} -m elf_s390"
+          ;;
+        sparc64-*linux*)
+          LD="${LD-ld} -m elf32_sparc"
+          ;;
+      esac
+      ;;
+    *64-bit*)
+      case $host in
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_x86_64"
+          ;;
+        ppc*-*linux*|powerpc*-*linux*)
+          LD="${LD-ld} -m elf64ppc"
+          ;;
+        s390*-*linux*)
+          LD="${LD-ld} -m elf64_s390"
+          ;;
+        sparc*-*linux*)
+          LD="${LD-ld} -m elf64_sparc"
+          ;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-linux*)
+  # Test if the compiler is 64bit
+  echo 'int i;' > conftest.$ac_ext
+  lt_cv_cc_64bit_output=no
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *"ELF 64"*)
+      lt_cv_cc_64bit_output=yes
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
+echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
+if test "${lt_cv_cc_needs_belf+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+     cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -5034,2751 +5594,2200 @@ cat >>conftest.$ac_ext <<_ACEOF
 int
 main ()
 {
- return 0;
+
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  eval "kde_cv_prog_cxx_$kde_cache=yes"
+  lt_cv_cc_needs_belf=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+lt_cv_cc_needs_belf=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-  CXXFLAGS="$save_CXXFLAGS"
-  ac_ext=c
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+     ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-
-fi
-
-if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- :
- CXXFLAGS="$CXXFLAGS --one_per"
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- :
-
 fi
-
-  fi
-
-    USE_RTTI=
-
-
-  case "$host" in
-      *-*-irix*)  test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
-      *-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
-      *-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
-      *-*-solaris*)
-        if test "$GXX" = yes; then
-          libstdcpp=`$CXX -print-file-name=libstdc++.so`
-          if test ! -f $libstdcpp; then
-             { { echo "$as_me:$LINENO: error: You've compiled gcc without --enable-shared. This doesn't work with KDE. Please recompile gcc with --enable-shared to receive a libstdc++.so" >&5
-echo "$as_me: error: You've compiled gcc without --enable-shared. This doesn't work with KDE. Please recompile gcc with --enable-shared to receive a libstdc++.so" >&2;}
-   { (exit 1); exit 1; }; }
-          fi
-        fi
-        ;;
-  esac
-
-  if test "x$kde_use_qt_emb" != "xyes"; then
-  __val=$CXX
-  __forbid=" -fno-rtti -rpath "
-  if test -n "$__val"; then
-    __new=""
-    ac_save_IFS=$IFS
-    IFS=" 	"
-    for i in $__val; do
-      case "$__forbid" in
-        *" $i "*) { echo "$as_me:$LINENO: WARNING: found forbidden $i in CXX, removing it" >&5
-echo "$as_me: WARNING: found forbidden $i in CXX, removing it" >&2;} ;;
-	*) # Careful to not add spaces, where there were none, because otherwise
-	   # libtool gets confused, if we change e.g. CXX
-	   if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
-      esac
-    done
-    IFS=$ac_save_IFS
-    CXX=$__new
-  fi
-
-  __val=$CXXFLAGS
-  __forbid=" -fno-rtti -rpath "
-  if test -n "$__val"; then
-    __new=""
-    ac_save_IFS=$IFS
-    IFS=" 	"
-    for i in $__val; do
-      case "$__forbid" in
-        *" $i "*) { echo "$as_me:$LINENO: WARNING: found forbidden $i in CXXFLAGS, removing it" >&5
-echo "$as_me: WARNING: found forbidden $i in CXXFLAGS, removing it" >&2;} ;;
-	*) # Careful to not add spaces, where there were none, because otherwise
-	   # libtool gets confused, if we change e.g. CXX
-	   if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
-      esac
-    done
-    IFS=$ac_save_IFS
-    CXXFLAGS=$__new
-  fi
-
-else
-  __val=$CXX
-  __forbid=" -rpath "
-  if test -n "$__val"; then
-    __new=""
-    ac_save_IFS=$IFS
-    IFS=" 	"
-    for i in $__val; do
-      case "$__forbid" in
-        *" $i "*) { echo "$as_me:$LINENO: WARNING: found forbidden $i in CXX, removing it" >&5
-echo "$as_me: WARNING: found forbidden $i in CXX, removing it" >&2;} ;;
-	*) # Careful to not add spaces, where there were none, because otherwise
-	   # libtool gets confused, if we change e.g. CXX
-	   if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
-      esac
-    done
-    IFS=$ac_save_IFS
-    CXX=$__new
+echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
+echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
   fi
+  ;;
 
-  __val=$CXXFLAGS
-  __forbid=" -rpath "
-  if test -n "$__val"; then
-    __new=""
-    ac_save_IFS=$IFS
-    IFS=" 	"
-    for i in $__val; do
-      case "$__forbid" in
-        *" $i "*) { echo "$as_me:$LINENO: WARNING: found forbidden $i in CXXFLAGS, removing it" >&5
-echo "$as_me: WARNING: found forbidden $i in CXXFLAGS, removing it" >&2;} ;;
-	*) # Careful to not add spaces, where there were none, because otherwise
-	   # libtool gets confused, if we change e.g. CXX
-	   if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
-      esac
-    done
-    IFS=$ac_save_IFS
-    CXXFLAGS=$__new
-  fi
+esac
 
-fi
+need_locks="$enable_libtool_lock"
 
 
-  ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
-echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
-if test -z "$CXXCPP"; then
-  if test "${ac_cv_prog_CXXCPP+set}" = set; then
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-      # Double quotes because CXXCPP needs to be expanded
-    for CXXCPP in "$CXX -E" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_cxx_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
   cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-                     Syntax error
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
 _ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_cxx_preproc_warn_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  :
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_stdc=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-  # Broken: fails on valid input.
-continue
+ac_cv_header_stdc=no
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
-  # OK, works on sane cases.  Now check whether non-existent headers
-  # can be detected and how.
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
   cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <ac_nonexistent.h>
+#include <string.h>
+
 _ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_cxx_preproc_warn_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  # Broken: success on invalid input.
-continue
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then
+  :
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Passes both tests.
-ac_preproc_ok=:
-break
+  ac_cv_header_stdc=no
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest*
 
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  break
 fi
 
-    done
-    ac_cv_prog_CXXCPP=$CXXCPP
-
-fi
-  CXXCPP=$ac_cv_prog_CXXCPP
-else
-  ac_cv_prog_CXXCPP=$CXXCPP
-fi
-echo "$as_me:$LINENO: result: $CXXCPP" >&5
-echo "${ECHO_T}$CXXCPP" >&6
-ac_preproc_ok=false
-for ac_cxx_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
   cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-                     Syntax error
+#include <stdlib.h>
+
 _ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_cxx_preproc_warn_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then
   :
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
 
-  # Broken: fails on valid input.
-continue
 fi
-rm -f conftest.err conftest.$ac_ext
 
-  # OK, works on sane cases.  Now check whether non-existent headers
-  # can be detected and how.
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then
+  :
+else
   cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <ac_nonexistent.h>
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+		   (('a' <= (c) && (c) <= 'i') \
+		     || ('j' <= (c) && (c) <= 'r') \
+		     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+	|| toupper (i) != TOUPPER (i))
+      exit(2);
+  exit (0);
+}
 _ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_cxx_preproc_warn_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  # Broken: success on invalid input.
-continue
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
 else
-  echo "$as_me: failed program was:" >&5
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-  # Passes both tests.
-ac_preproc_ok=:
-break
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
 fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  :
-else
-  { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
-See \`config.log' for more details." >&5
-echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
 fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
 
+fi
 
-  if test "$GCC" = yes; then
-     NOOPT_CXXFLAGS=-O0
-     NOOPT_CFLAGS=-O0
-  fi
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
 
 
 
 
 
-  # Check whether --enable-final or --disable-final was given.
-if test "${enable_final+set}" = set; then
-  enableval="$enable_final"
-  kde_use_final=$enableval
-else
-  kde_use_final=no
-fi;
 
 
-  REPO=""
-  NOREPO=""
 
 
-echo "$as_me:$LINENO: checking whether $CXX supports -frepo" >&5
-echo $ECHO_N "checking whether $CXX supports -frepo... $ECHO_C" >&6
-kde_cache=`echo frepo | sed 'y% .=/+-%____p_%'`
-if eval "test \"\${kde_cv_prog_cxx_$kde_cache+set}\" = set"; then
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+		  inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-
-
-
-   ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-
-
-  save_CXXFLAGS="$CXXFLAGS"
-  CXXFLAGS="$CXXFLAGS -frepo"
   cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+$ac_includes_default
 
-int
-main ()
-{
- return 0;
-  ;
-  return 0;
-}
+#include <$ac_header>
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  eval "kde_cv_prog_cxx_$kde_cache=yes"
+  eval "$as_ac_Header=yes"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+eval "$as_ac_Header=no"
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-  CXXFLAGS="$save_CXXFLAGS"
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-
-if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- :
-
-     REPO="-frepo"
-     NOREPO="-fno-repo"
-
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- :
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
 fi
 
+done
+
 
-  if test -z "$REPO"; then
 
-echo "$as_me:$LINENO: checking whether $CXX supports -instances=explicit" >&5
-echo $ECHO_N "checking whether $CXX supports -instances=explicit... $ECHO_C" >&6
-kde_cache=`echo instances=explicit | sed 'y% .=/+-%____p_%'`
-if eval "test \"\${kde_cv_prog_cxx_$kde_cache+set}\" = set"; then
+for ac_header in dlfcn.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 else
-
-
-
-   ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-
-
-  save_CXXFLAGS="$CXXFLAGS"
-  CXXFLAGS="$CXXFLAGS -instances=explicit"
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-int
-main ()
-{
- return 0;
-  ;
-  return 0;
-}
+$ac_includes_default
+#include <$ac_header>
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  eval "kde_cv_prog_cxx_$kde_cache=yes"
+  ac_header_compiler=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+ac_header_compiler=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-  CXXFLAGS="$save_CXXFLAGS"
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
 
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
 fi
-
-if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- :
-
-     REPO="-instances=explicit"
-     NOREPO="-instances=extern"
-
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
 else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- :
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+  ac_header_preproc=no
 fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
 
-  fi
-
-  if test -n "$REPO"; then
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_TEMPLATE_REPOSITORY 1
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
+fi
 
-  fi
-
-
-
-
-  if test "x$kde_use_final" = "xyes"; then
-      KDE_USE_FINAL_TRUE=""
-      KDE_USE_FINAL_FALSE="#"
-   else
-      KDE_USE_FINAL_TRUE="#"
-      KDE_USE_FINAL_FALSE=""
-  fi
+done
 
 
 
-  # Check whether --enable-closure or --disable-closure was given.
-if test "${enable_closure+set}" = set; then
-  enableval="$enable_closure"
-  kde_use_closure=$enableval
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+    (test "X$CXX" != "Xg++"))) ; then
+  ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
+echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
+if test -z "$CXXCPP"; then
+  if test "${ac_cv_prog_CXXCPP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  kde_use_closure=yes
-fi;
-
-  if test "x$kde_use_closure" = "xyes"; then
-       KDE_USE_CLOSURE_TRUE=""
-       KDE_USE_CLOSURE_FALSE="#"
-#       CXXFLAGS="$CXXFLAGS $REPO"
+      # Double quotes because CXXCPP needs to be expanded
+    for CXXCPP in "$CXX -E" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
   else
-       KDE_USE_CLOSURE_TRUE="#"
-       KDE_USE_CLOSURE_FALSE=""
+    ac_cpp_err=
   fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
 
-
-
-
-
-
-
-# Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
-  enableval="$enable_shared"
-  p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_shared=yes ;;
-    no) enable_shared=no ;;
-    *)
-      enable_shared=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-	IFS="$lt_save_ifs"
-	if test "X$pkg" = "X$p"; then
-	  enable_shared=yes
-	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
 else
-  enable_shared=yes
-fi;
-
-# Check whether --enable-static or --disable-static was given.
-if test "${enable_static+set}" = set; then
-  enableval="$enable_static"
-  p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_static=yes ;;
-    no) enable_static=no ;;
-    *)
-     enable_static=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-	IFS="$lt_save_ifs"
-	if test "X$pkg" = "X$p"; then
-	  enable_static=yes
-	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
 else
-  enable_static=no
-fi;
-
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
 
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
 
-    kdelibsuff=none
-    # Check whether --enable-libsuffix or --disable-libsuffix was given.
-if test "${enable_libsuffix+set}" = set; then
-  enableval="$enable_libsuffix"
-  kdelibsuff=$enableval
-fi;
-    # TODO: add an auto case that compiles a little C app to check
-    # where the glibc is
-    if test "$kdelibsuff" = "none"; then
-       kdelibsuff=
-    fi
-    if test -z "$kdelibsuff"; then
-        echo "$as_me:$LINENO: result: not using lib directory suffix" >&5
-echo "${ECHO_T}not using lib directory suffix" >&6
+    done
+    ac_cv_prog_CXXCPP=$CXXCPP
 
-cat >>confdefs.h <<\_ACEOF
-#define KDELIBSUFF ""
+fi
+  CXXCPP=$ac_cv_prog_CXXCPP
+else
+  ac_cv_prog_CXXCPP=$CXXCPP
+fi
+echo "$as_me:$LINENO: result: $CXXCPP" >&5
+echo "${ECHO_T}$CXXCPP" >&6
+ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
 _ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-    else
-        if test "$libdir" = '${exec_prefix}/lib'; then
-            libdir="$libdir${kdelibsuff}"
-            libdir="$libdir"
-          fi
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
 
-cat >>confdefs.h <<_ACEOF
-#define KDELIBSUFF "\"${kdelibsuff}\""
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
 _ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-        echo "$as_me:$LINENO: result: using lib directory suffix $kdelibsuff" >&5
-echo "${ECHO_T}using lib directory suffix $kdelibsuff" >&6
-    fi
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
 
-# Check whether --enable-fast-install or --disable-fast-install was given.
-if test "${enable_fast_install+set}" = set; then
-  enableval="$enable_fast_install"
-  p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_fast_install=yes ;;
-    no) enable_fast_install=no ;;
-    *)
-      enable_fast_install=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-	IFS="$lt_save_ifs"
-	if test "X$pkg" = "X$p"; then
-	  enable_fast_install=yes
-	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
 else
-  enable_fast_install=yes
-fi;
+  { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
 
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
-# Check whether --with-gnu-ld or --without-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then
-  withval="$with_gnu_ld"
-  test "$withval" = no || with_gnu_ld=yes
-else
-  with_gnu_ld=no
-fi;
-ac_prog=ld
-if test "$GCC" = yes; then
-  # Check if gcc -print-prog-name=ld gives a path.
-  echo "$as_me:$LINENO: checking for ld used by GCC" >&5
-echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
-  case $host in
-  *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
-    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
-  *)
-    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
-  esac
-  case $ac_prog in
-    # Accept absolute paths.
-    [\\/]* | ?:[\\/]*)
-      re_direlt='/[^/][^/]*/\.\./'
-      # Canonicalize the path of ld
-      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
-      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
-	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
-      done
-      test -z "$LD" && LD="$ac_prog"
-      ;;
-  "")
-    # If it fails, then pretend we aren't using GCC.
-    ac_prog=ld
-    ;;
-  *)
-    # If it is relative, then search for the first ld in PATH.
-    with_gnu_ld=unknown
-    ;;
-  esac
-elif test "$with_gnu_ld" = yes; then
-  echo "$as_me:$LINENO: checking for GNU ld" >&5
-echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
-else
-  echo "$as_me:$LINENO: checking for non-GNU ld" >&5
-echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
 fi
-if test "${lt_cv_path_LD+set}" = set; then
+
+
+ac_ext=f
+ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
+ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_F77+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  if test -z "$LD"; then
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for ac_dir in $PATH; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      lt_cv_path_LD="$ac_dir/$ac_prog"
-      # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some GNU ld's only accept -v.
-      # Break only if it was the GNU/non-GNU ld that we prefer.
-      if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
-	test "$with_gnu_ld" != no && break
-      else
-	test "$with_gnu_ld" != yes && break
-      fi
-    fi
-  done
-  IFS="$lt_save_ifs"
+  if test -n "$F77"; then
+  ac_cv_prog_F77="$F77" # Let the user override the test.
 else
-  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
 fi
 fi
-
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
-  echo "$as_me:$LINENO: result: $LD" >&5
-echo "${ECHO_T}$LD" >&6
+F77=$ac_cv_prog_F77
+if test -n "$F77"; then
+  echo "$as_me:$LINENO: result: $F77" >&5
+echo "${ECHO_T}$F77" >&6
 else
   echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
-test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
-echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
-   { (exit 1); exit 1; }; }
-echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
-echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
-if test "${lt_cv_prog_gnu_ld+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
-  lt_cv_prog_gnu_ld=yes
-else
-  lt_cv_prog_gnu_ld=no
-fi
-fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
-echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
-with_gnu_ld=$lt_cv_prog_gnu_ld
-
-
-echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
-echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
-if test "${lt_cv_ld_reload_flag+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_ld_reload_flag='-r'
-fi
-echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
-echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
-reload_flag=$lt_cv_ld_reload_flag
-case $reload_flag in
-"" | " "*) ;;
-*) reload_flag=" $reload_flag" ;;
-esac
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
 
-echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
-echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
-if test "${lt_cv_path_NM+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$NM"; then
-  # Let the user override the test.
-  lt_cv_path_NM="$NM"
-else
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
-    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
-      # Check to see if the nm accepts a BSD-compat flag.
-      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
-      #   nm: unknown option "B" ignored
-      # Tru64's nm complains that /dev/null is an invalid object file
-      if ("$tmp_nm" -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
-	lt_cv_path_NM="$tmp_nm -B"
-	break
-      elif ("$tmp_nm" -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
-	lt_cv_path_NM="$tmp_nm -p"
-	break
-      else
-	lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
-	continue # so that we can try to find one that supports BSD flags
-      fi
-    fi
+    test -n "$F77" && break
   done
-  IFS="$lt_save_ifs"
-  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
 fi
-fi
-echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
-echo "${ECHO_T}$lt_cv_path_NM" >&6
-NM="$lt_cv_path_NM"
-
-echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
-echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
-if test "${lt_cv_path_SED+set}" = set; then
+if test -z "$F77"; then
+  ac_ct_F77=$F77
+  for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_F77+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  # Loop through the user's path and test for sed and gsed.
-# Then use that list of sed's as ones to test for truncation.
+  if test -n "$ac_ct_F77"; then
+  ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test.
+else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_prog in sed gsed; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
-        _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
-      fi
-    done
-  done
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_F77="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
 done
 
-  # Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
-  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
-  trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
+fi
+fi
+ac_ct_F77=$ac_cv_prog_ac_ct_F77
+if test -n "$ac_ct_F77"; then
+  echo "$as_me:$LINENO: result: $ac_ct_F77" >&5
+echo "${ECHO_T}$ac_ct_F77" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
 
-# Create a (secure) tmp directory for tmp files.
-: ${TMPDIR=/tmp}
-{
-  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
-}  ||
-{
-  tmp=$TMPDIR/sed$$-$RANDOM
-  (umask 077 && mkdir $tmp)
-} ||
-{
-   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
-   { (exit 1); exit 1; }
-}
-  _max=0
-  _count=0
-  # Add /usr/xpg4/bin/sed as it is typically found on Solaris
-  # along with /bin/sed that truncates output.
-  for _sed in $_sed_list /usr/xpg4/bin/sed; do
-    test ! -f ${_sed} && break
-    cat /dev/null > "$tmp/sed.in"
-    _count=0
-    echo $ECHO_N "0123456789$ECHO_C" >"$tmp/sed.in"
-    # Check for GNU sed and select it if it is found.
-    if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
-      lt_cv_path_SED=${_sed}
-      break;
-    fi
-    while true; do
-      cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
-      mv "$tmp/sed.tmp" "$tmp/sed.in"
-      cp "$tmp/sed.in" "$tmp/sed.nl"
-      echo >>"$tmp/sed.nl"
-      ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
-      cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
-      # 10000 chars as input seems more than enough
-      test $_count -gt 10 && break
-      _count=`expr $_count + 1`
-      if test $_count -gt $_max; then
-        _max=$_count
-        lt_cv_path_SED=$_sed
-      fi
-    done
-  done
-  rm -rf "$tmp"
+  test -n "$ac_ct_F77" && break
+done
 
+  F77=$ac_ct_F77
 fi
 
-echo "$as_me:$LINENO: result: $SED" >&5
-echo "${ECHO_T}$SED" >&6
 
-echo "$as_me:$LINENO: checking whether ln -s works" >&5
-echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
-  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+# Provide some information about the compiler.
+echo "$as_me:6371:" \
+     "checking for Fortran 77 compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+rm -f a.out
+
+# If we don't use `.F' as extension, the preprocessor is not run on the
+# input file.  (Note that this only needs to work for GNU compilers.)
+ac_save_ext=$ac_ext
+ac_ext=F
+echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6
+if test "${ac_cv_f77_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  echo "$as_me:$LINENO: result: no, using $LN_S" >&5
-echo "${ECHO_T}no, using $LN_S" >&6
+  cat >conftest.$ac_ext <<_ACEOF
+      program main
+#ifndef __GNUC__
+       choke me
+#endif
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_f77_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
 fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_f77_compiler_gnu=$ac_compiler_gnu
 
-echo "$as_me:$LINENO: checking how to recognise dependant libraries" >&5
-echo $ECHO_N "checking how to recognise dependant libraries... $ECHO_C" >&6
-if test "${lt_cv_deplibs_check_method+set}" = set; then
+fi
+echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6
+ac_ext=$ac_save_ext
+ac_test_FFLAGS=${FFLAGS+set}
+ac_save_FFLAGS=$FFLAGS
+FFLAGS=
+echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5
+echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_f77_g+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given egrep regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix4* | aix5*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
+  FFLAGS=-g
+cat >conftest.$ac_ext <<_ACEOF
+      program main
 
-beos*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
+      end
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_f77_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_f77_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-bsdi4*)
-  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
-  lt_cv_file_magic_cmd='/usr/bin/file -L'
-  lt_cv_file_magic_test_file=/shlib/libc.so
-  ;;
+ac_cv_prog_f77_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
-cygwin* | mingw* | pw32*)
-  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
-  lt_cv_file_magic_cmd='$OBJDUMP -f'
-  ;;
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5
+echo "${ECHO_T}$ac_cv_prog_f77_g" >&6
+if test "$ac_test_FFLAGS" = set; then
+  FFLAGS=$ac_save_FFLAGS
+elif test $ac_cv_prog_f77_g = yes; then
+  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
+    FFLAGS="-g -O2"
+  else
+    FFLAGS="-g"
+  fi
+else
+  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
+    FFLAGS="-O2"
+  else
+    FFLAGS=
+  fi
+fi
 
-darwin* | rhapsody*)
-  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
-  lt_cv_file_magic_cmd='/usr/bin/file -L'
-  case "$host_os" in
-  rhapsody* | darwin1.[012])
-    lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
-    ;;
-  *) # Darwin 1.3 on
-    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
+G77=`test $ac_compiler_gnu = yes && echo yes`
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+
+# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+
+# find the maximum length of command line arguments
+echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
+echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
+if test "${lt_cv_sys_max_cmd_len+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+    i=0
+  teststring="ABCD"
+
+  case $build_os in
+  msdosdjgpp*)
+    # On DJGPP, this test can blow up pretty badly due to problems in libc
+    # (any single argument exceeding 2000 bytes causes a buffer overrun
+    # during glob expansion).  Even if it were fixed, the result of this
+    # check would be larger than it should be.
+    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
     ;;
-  esac
-  ;;
 
-freebsd*)
-  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
-    case $host_cpu in
-    i*86 )
-      # Not sure whether the presence of OpenBSD here was a mistake.
-      # Let's accept both of them until this is cleared up.
-      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
-      lt_cv_file_magic_cmd=/usr/bin/file
-      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
-      ;;
-    esac
-  else
-    lt_cv_deplibs_check_method=pass_all
-  fi
-  ;;
+  gnu*)
+    # Under GNU Hurd, this test is not required because there is
+    # no limit to the length of command line arguments.
+    # Libtool will interpret -1 as no limit whatsoever
+    lt_cv_sys_max_cmd_len=-1;
+    ;;
 
-gnu*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
+  cygwin* | mingw*)
+    # On Win9x/ME, this test blows up -- it succeeds, but takes
+    # about 5 minutes as the teststring grows exponentially.
+    # Worse, since 9x/ME are not pre-emptively multitasking,
+    # you end up with a "frozen" computer, even though with patience
+    # the test eventually succeeds (with a max line length of 256k).
+    # Instead, let's just punt: use the minimum linelength reported by
+    # all of the supported platforms: 8192 (on NT/2K/XP).
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
 
-hpux10.20* | hpux11*)
-  lt_cv_file_magic_cmd=/usr/bin/file
-  if test "$host_cpu" = ia64; then
-    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
-    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
-  else
-    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
-    lt_cv_file_magic_test_file=/usr/lib/libc.sl
-  fi
-  ;;
+  amigaos*)
+    # On AmigaOS with pdksh, this test takes hours, literally.
+    # So we just punt and use a minimum line length of 8192.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
 
-irix5* | irix6* | nonstopux*)
-  case $host_os in
-  irix5* | nonstopux*)
-    # this will be overridden with pass_all, but let us keep it just in case
-    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
+  netbsd* | freebsd* | openbsd* | darwin* )
+    # This has been around since 386BSD, at least.  Likely further.
+    if test -x /sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+    elif test -x /usr/sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+    else
+      lt_cv_sys_max_cmd_len=65536 # usable default for *BSD
+    fi
+    # And add a safety zone
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
     ;;
-  *)
-    case $LD in
-    *-32|*"-32 ") libmagic=32-bit;;
-    *-n32|*"-n32 ") libmagic=N32;;
-    *-64|*"-64 ") libmagic=64-bit;;
-    *) libmagic=never-match;;
-    esac
-    # this will be overridden with pass_all, but let us keep it just in case
-    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
+
+ *)
+    # If test is not a shell built-in, we'll probably end up computing a
+    # maximum length that is only half of the actual maximum length, but
+    # we can't tell.
+    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+    while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
+	       = "XX$teststring") >/dev/null 2>&1 &&
+	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
+	    lt_cv_sys_max_cmd_len=$new_result &&
+	    test $i != 17 # 1/2 MB should be enough
+    do
+      i=`expr $i + 1`
+      teststring=$teststring$teststring
+    done
+    teststring=
+    # Add a significant safety factor because C++ compilers can tack on massive
+    # amounts of additional arguments before passing them to the linker.
+    # It appears as though 1/2 is a usable value.
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
     ;;
   esac
-  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
-  lt_cv_deplibs_check_method=pass_all
-  ;;
 
-# This must be Linux ELF.
-linux*)
-  case $host_cpu in
-  alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh* | x86_64* )
-    lt_cv_deplibs_check_method=pass_all ;;
-  *)
-    # glibc up to 2.1.1 does not perform some relocations on ARM
-    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
-  esac
-  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
-  ;;
+fi
 
-netbsd*)
-  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
-    lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
-  else
-    lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
-  fi
-  ;;
+if test -n $lt_cv_sys_max_cmd_len ; then
+  echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
+echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
+else
+  echo "$as_me:$LINENO: result: none" >&5
+echo "${ECHO_T}none" >&6
+fi
 
-newos6*)
-  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
-  lt_cv_file_magic_cmd=/usr/bin/file
-  lt_cv_file_magic_test_file=/usr/lib/libnls.so
-  ;;
 
-nto-qnx)
-  lt_cv_deplibs_check_method=unknown
-  ;;
 
-openbsd*)
-  lt_cv_file_magic_cmd=/usr/bin/file
-  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
-  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
-  else
-    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
+echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6
+if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Transform the above into a raw symbol and a C symbol.
+symxfrm='\1 \2\3 \3'
+
+# Transform an extracted symbol line into a proper C declaration
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[BCDT]'
+  ;;
+cygwin* | mingw* | pw32*)
+  symcode='[ABCDGISTW]'
+  ;;
+hpux*) # Its linker distinguishes data from code symbols
+  if test "$host_cpu" = ia64; then
+    symcode='[ABCDEGRST]'
   fi
+  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
   ;;
-
-osf3* | osf4* | osf5*)
-  # this will be overridden with pass_all, but let us keep it just in case
-  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
-  lt_cv_file_magic_test_file=/shlib/libc.so
-  lt_cv_deplibs_check_method=pass_all
+linux*)
+  if test "$host_cpu" = ia64; then
+    symcode='[ABCDGIRSTW]'
+    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+  fi
   ;;
-
-sco3.2v5*)
-  lt_cv_deplibs_check_method=pass_all
+irix* | nonstopux*)
+  symcode='[BCDEGRST]'
   ;;
-
-solaris*)
-  lt_cv_deplibs_check_method=pass_all
-  lt_cv_file_magic_test_file=/lib/libc.so
+osf*)
+  symcode='[BCDEGQRST]'
   ;;
-
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-  case $host_vendor in
-  motorola)
-    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
-    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
-    ;;
-  ncr)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  sequent)
-    lt_cv_file_magic_cmd='/bin/file'
-    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
-    ;;
-  sni)
-    lt_cv_file_magic_cmd='/bin/file'
-    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
-    lt_cv_file_magic_test_file=/lib/libc.so
-    ;;
-  esac
+solaris* | sysv5*)
+  symcode='[BDRT]'
   ;;
-
-sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*)
-  lt_cv_deplibs_check_method=pass_all
+sysv4)
+  symcode='[DFNSTU]'
   ;;
 esac
 
-fi
-echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
-echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
-
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+  ;;
+esac
 
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[ABCDGIRSTW]' ;;
+esac
 
-# Allow CC to be a program name with arguments.
-set dummy $CC
-compiler="$2"
+# Try without a prefix undercore, then with it.
+for ac_symprfx in "" "_"; do
 
+  # Write the raw and C identifiers.
+  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ 	]\($symcode$symcode*\)[ 	][ 	]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
 
-# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then
-  enableval="$enable_libtool_lock"
+  # Check to see that the pipe works correctly.
+  pipe_works=no
 
-fi;
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+  rm -f conftest*
+  cat > conftest.$ac_ext <<EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+EOF
 
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-ia64-*-hpux*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; then
-    case `/usr/bin/file conftest.$ac_objext` in
-    *ELF-32*)
-      HPUX_IA64_MODE="32"
-      ;;
-    *ELF-64*)
-      HPUX_IA64_MODE="64"
-      ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-*-*-irix6*)
-  # Find out which ABI we are using.
-  echo '#line 6236 "configure"' > conftest.$ac_ext
-  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
+    # Now try to grab the symbols.
+    nlist=conftest.nm
+    if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
+  (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-    case `/usr/bin/file conftest.$ac_objext` in
-    *32-bit*)
-      LD="${LD-ld} -32"
-      ;;
-    *N32*)
-      LD="${LD-ld} -n32"
-      ;;
-    *64-bit*)
-      LD="${LD-ld} -64"
-      ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
+  (exit $ac_status); } && test -s "$nlist"; then
+      # Try sorting and uniquifying the output.
+      if sort "$nlist" | uniq > "$nlist"T; then
+	mv -f "$nlist"T "$nlist"
+      else
+	rm -f "$nlist"T
+      fi
 
-*-*-linux*)
-  # Test if the compiler is 64bit
-  echo 'int i;' > conftest.$ac_ext
-  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-    case `/usr/bin/file conftest.$ac_objext` in
-    *"ELF 32"*)
-      LINUX_64_MODE="32"
-      ;;
-    *"ELF 64"*)
-      LINUX_64_MODE="64"
-      ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
+      # Make sure that we snagged all the symbols we need.
+      if grep ' nm_test_var$' "$nlist" >/dev/null; then
+	if grep ' nm_test_func$' "$nlist" >/dev/null; then
+	  cat <<EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
 
-*-*-sco3.2v5*)
-  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
-  SAVE_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -belf"
-  echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
-echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
-if test "${lt_cv_cc_needs_belf+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+EOF
+	  # Now generate the symbol file.
+	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
 
-     cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+	  cat <<EOF >> conftest.$ac_ext
+#if defined (__STDC__) && __STDC__
+# define lt_ptr_t void *
+#else
+# define lt_ptr_t char *
+# define const
+#endif
 
-int
-main ()
+/* The mapping between symbol names and symbols. */
+const struct {
+  const char *name;
+  lt_ptr_t address;
+}
+lt_preloaded_symbols[] =
 {
+EOF
+	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
+	  cat <<\EOF >> conftest.$ac_ext
+  {0, (lt_ptr_t) 0}
+};
 
-  ;
-  return 0;
+#ifdef __cplusplus
 }
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+#endif
+EOF
+	  # Now try linking the two files.
+	  mv conftest.$ac_objext conftstm.$ac_objext
+	  lt_save_LIBS="$LIBS"
+	  lt_save_CFLAGS="$CFLAGS"
+	  LIBS="conftstm.$ac_objext"
+	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+	  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  lt_cv_cc_needs_belf=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext}; then
+	    pipe_works=yes
+	  fi
+	  LIBS="$lt_save_LIBS"
+	  CFLAGS="$lt_save_CFLAGS"
+	else
+	  echo "cannot find nm_test_func in $nlist" >&5
+	fi
+      else
+	echo "cannot find nm_test_var in $nlist" >&5
+      fi
+    else
+      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+    fi
+  else
+    echo "$progname: failed program was:" >&5
+    cat conftest.$ac_ext >&5
+  fi
+  rm -f conftest* conftst*
+
+  # Do not use the global_symbol_pipe unless it works.
+  if test "$pipe_works" = yes; then
+    break
+  else
+    lt_cv_sys_global_symbol_pipe=
+  fi
+done
 
-lt_cv_cc_needs_belf=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-     ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+  lt_cv_sys_global_symbol_to_cdecl=
 fi
-echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
-echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
-  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
-    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
-    CFLAGS="$SAVE_CFLAGS"
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+  echo "$as_me:$LINENO: result: failed" >&5
+echo "${ECHO_T}failed" >&6
+else
+  echo "$as_me:$LINENO: result: ok" >&5
+echo "${ECHO_T}ok" >&6
+fi
+
+echo "$as_me:$LINENO: checking for objdir" >&5
+echo $ECHO_N "checking for objdir... $ECHO_C" >&6
+if test "${lt_cv_objdir+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  lt_cv_objdir=.libs
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+fi
+echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
+echo "${ECHO_T}$lt_cv_objdir" >&6
+objdir=$lt_cv_objdir
+
+
+
+
+
+case $host_os in
+aix3*)
+  # AIX sometimes has problems with the GCC collect2 program.  For some
+  # reason, if we set the COLLECT_NAMES environment variable, the problems
+  # vanish in a puff of smoke.
+  if test "X${COLLECT_NAMES+set}" != Xset; then
+    COLLECT_NAMES=
+    export COLLECT_NAMES
   fi
   ;;
-
 esac
 
-need_locks="$enable_libtool_lock"
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e s/^X//'
+sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
 
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
 
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
 
-echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6
-if test "${ac_cv_prog_egrep+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
-    then ac_cv_prog_egrep='grep -E'
-    else ac_cv_prog_egrep='egrep'
-    fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
-echo "${ECHO_T}$ac_cv_prog_egrep" >&6
- EGREP=$ac_cv_prog_egrep
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
 
+# Constants:
+rm="rm -f"
 
-echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
-if test "${ac_cv_header_stdc+set}" = set; then
+# Global variables:
+default_ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except M$VC,
+# which needs '.lib').
+libext=a
+ltmain="$ac_aux_dir/ltmain.sh"
+ofile="$default_ofile"
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AR+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_header_stdc=yes
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_header_stdc=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <string.h>
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AR="${ac_tool_prefix}ar"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then
-  :
-else
-  ac_cv_header_stdc=no
 fi
-rm -f conftest*
-
 fi
-
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then
-  :
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  echo "$as_me:$LINENO: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6
 else
-  ac_cv_header_stdc=no
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
-rm -f conftest*
 
 fi
-
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then
-  :
+if test -z "$ac_cv_prog_AR"; then
+  ac_ct_AR=$AR
+  # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ctype.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-                   (('a' <= (c) && (c) <= 'i') \
-                     || ('j' <= (c) && (c) <= 'r') \
-                     || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-        || toupper (i) != TOUPPER (i))
-      exit(2);
-  exit (0);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_AR="ar"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
 
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+  test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false"
 fi
 fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
+echo "${ECHO_T}$ac_ct_AR" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
-echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
 
+  AR=$ac_ct_AR
+else
+  AR="$ac_cv_prog_AR"
 fi
 
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-
-
-
-
-
-
-
-
-
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-                  inttypes.h stdint.h unistd.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "$as_ac_Header=yes"
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
 
-eval "$as_ac_Header=no"
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
 
-done
-
-
-
-for ac_header in dlfcn.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_header_compiler=yes
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
 
-ac_header_compiler=no
+  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
 
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-  else
-    ac_cpp_err=
-  fi
+  RANLIB=$ac_ct_RANLIB
 else
-  ac_cpp_err=yes
+  RANLIB="$ac_cv_prog_RANLIB"
 fi
-if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
 
-  ac_header_preproc=no
 fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc in
-  yes:no )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf at gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-  no:yes )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf at gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  eval "$as_ac_Header=$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
 
+  test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
 
+  STRIP=$ac_ct_STRIP
+else
+  STRIP="$ac_cv_prog_STRIP"
 fi
 
-done
 
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
 
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+# Set sane defaults for various variables
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+test -z "$AS" && AS=as
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+test -z "$LD" && LD=ld
+test -z "$LN_S" && LN_S="ln -s"
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+test -z "$NM" && NM=nm
+test -z "$SED" && SED=sed
+test -z "$OBJDUMP" && OBJDUMP=objdump
+test -z "$RANLIB" && RANLIB=:
+test -z "$STRIP" && STRIP=:
+test -z "$ac_objext" && ac_objext=o
 
-# find the maximum length of command line arguments
-echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
-echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
-if test "${lt_cv_sys_max_cmd_len+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-    i=0
-  testring="ABCD"
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
 
+if test -n "$RANLIB"; then
   case $host_os in
-  msdosdjgpp*)
-    # On DJGPP, this test can blow up pretty badly due to problems in libc
-    # (any single argument exceeding 2000 bytes causes a buffer overrun
-    # during glob expansion).  Even if it were fixed, the result of this
-    # check would be larger than it should be.
-    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
-    ;;
-
-  gnu*)
-    # Under GNU Hurd, this test is not required because there is
-    # no limit to the length of command line arguments.
-    # Libtool will interpret -1 as no limit whatsoever
-    lt_cv_sys_max_cmd_len=-1;
+  openbsd*)
+    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
     ;;
-
   *)
-    # If test is not a shell built-in, we'll probably end up computing a
-    # maximum length that is only half of the actual maximum length, but
-    # we can't tell.
-    while (test "X"`$CONFIG_SHELL $0 --fallback-echo "X$testring" 2>/dev/null` \
-	       = "XX$testring") >/dev/null 2>&1 &&
-	    new_result=`expr "X$testring" : ".*" 2>&1` &&
-	    lt_cv_sys_max_cmd_len=$new_result &&
-	    test $i != 17 # 1/2 MB should be enough
-    do
-      i=`expr $i + 1`
-      testring=$testring$testring
-    done
-    testring=
-    # Add a significant safety factor because C++ compilers can tack on massive
-    # amounts of additional arguments before passing them to the linker.
-    # It appears as though 1/2 is a usable value.
-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
     ;;
   esac
-
-fi
-
-if test -n $lt_cv_sys_max_cmd_len ; then
-  echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
-echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
-else
-  echo "$as_me:$LINENO: result: none" >&5
-echo "${ECHO_T}none" >&6
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
 fi
 
+cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
 
-
-
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
-echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6
-if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
+# Only perform the check for file, if the check method requires it
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
+echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
+  case $MAGIC_CMD in
+[\\/*] |  ?:[\\/]*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/${ac_tool_prefix}file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<EOF 1>&2
 
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
-
-# Character class describing NM global symbol codes.
-symcode='[BCDEGRST]'
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool at gnu.org
 
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac
+fi
 
-# Transform the above into a raw symbol and a C symbol.
-symxfrm='\1 \2\3 \3'
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
 
-# Transform an extracted symbol line into a proper C declaration
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    echo "$as_me:$LINENO: checking for file" >&5
+echo $ECHO_N "checking for file... $ECHO_C" >&6
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $MAGIC_CMD in
+[\\/*] |  ?:[\\/]*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/file"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<EOF 1>&2
 
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool at gnu.org
 
-# Define system-specific variables.
-case $host_os in
-aix*)
-  symcode='[BCDT]'
-  ;;
-cygwin* | mingw* | pw32*)
-  symcode='[ABCDGISTW]'
-  ;;
-hpux*) # Its linker distinguishes data from code symbols
-  if test "$host_cpu" = ia64; then
-    symcode='[ABCDEGRST]'
-  fi
-  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
-  ;;
-irix* | nonstopux*)
-  symcode='[BCDEGRST]'
-  ;;
-solaris* | sysv5*)
-  symcode='[BDT]'
-  ;;
-sysv4)
-  symcode='[DFNSTU]'
+EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
   ;;
 esac
+fi
 
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $host_os in
-mingw*)
-  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
-  ;;
-esac
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
 
-# If we're using GNU nm, then use its standard symbol codes.
-if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
-  symcode='[ABCDGISTW]'
+  else
+    MAGIC_CMD=:
+  fi
 fi
 
-# Try without a prefix undercore, then with it.
-for ac_symprfx in "" "_"; do
+  fi
+  ;;
+esac
 
-  # Write the raw and C identifiers.
-  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ 	]\($symcode$symcode*\)[ 	][ 	]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
+enable_dlopen=no
+enable_win32_dll=no
 
-  # Check to see that the pipe works correctly.
-  pipe_works=no
+# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+  enableval="$enable_libtool_lock"
 
-  rm -f conftest*
-  cat > conftest.$ac_ext <<EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-EOF
+fi;
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
-  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-    # Now try to grab the symbols.
-    nlist=conftest.nm
-    if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
-  (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && test -s "$nlist"; then
-      # Try sorting and uniquifying the output.
-      if sort "$nlist" | uniq > "$nlist"T; then
-	mv -f "$nlist"T "$nlist"
-      else
-	rm -f "$nlist"T
-      fi
 
-      # Make sure that we snagged all the symbols we need.
-      if egrep ' nm_test_var$' "$nlist" >/dev/null; then
-	if egrep ' nm_test_func$' "$nlist" >/dev/null; then
-	  cat <<EOF > conftest.$ac_ext
-#ifdef __cplusplus
-extern "C" {
-#endif
+# Check whether --with-pic or --without-pic was given.
+if test "${with_pic+set}" = set; then
+  withval="$with_pic"
+  pic_mode="$withval"
+else
+  pic_mode=default
+fi;
+test -z "$pic_mode" && pic_mode=default
 
-EOF
-	  # Now generate the symbol file.
-	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
+# Check if we have a version mismatch between libtool.m4 and ltmain.sh.
+#
+# Note:  This should be in AC_LIBTOOL_SETUP, _after_ $ltmain have been defined.
+#        We also should do it _before_ AC_LIBTOOL_LANG_C_CONFIG that actually
+#        calls AC_LIBTOOL_CONFIG and creates libtool.
+#
+echo "$as_me:$LINENO: checking for correct ltmain.sh version" >&5
+echo $ECHO_N "checking for correct ltmain.sh version... $ECHO_C" >&6
+if test -z "$ltmain"; then
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+  echo
+  echo "*** Gentoo sanity check failed! ***"
+  echo "*** \$ltmain is not defined, please check the patch for consistency! ***"
+  echo
+  exit 1
+fi
+gentoo_lt_version="1.5.10"
+gentoo_ltmain_version=`grep '^[:space:]*VERSION=' $ltmain | sed -e 's|^[:space:]*VERSION=||'`
+if test "$gentoo_lt_version" != "$gentoo_ltmain_version"; then
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+  echo
+  echo "*** Gentoo sanity check failed! ***"
+  echo "*** libtool.m4 and ltmain.sh have a version mismatch! ***"
+  echo "*** (libtool.m4 = $gentoo_lt_version, ltmain.sh = $gentoo_ltmain_version) ***"
+  echo
+  echo "Please run:"
+  echo
+  echo "  libtoolize --copy --force"
+  echo
+  echo "if appropriate, please contact the maintainer of this"
+  echo "package (or your distribution) for help."
+  echo
+  exit 1
+else
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+fi
 
-	  cat <<EOF >> conftest.$ac_ext
-#if defined (__STDC__) && __STDC__
-# define lt_ptr_t void *
-#else
-# define lt_ptr_t char *
-# define const
-#endif
 
-/* The mapping between symbol names and symbols. */
-const struct {
-  const char *name;
-  lt_ptr_t address;
-}
-lt_preloaded_symbols[] =
-{
-EOF
-	  sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
-	  cat <<\EOF >> conftest.$ac_ext
-  {0, (lt_ptr_t) 0}
-};
+# Use C for the default configuration in the libtool script
+tagname=
+lt_save_CC="$CC"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-#ifdef __cplusplus
-}
-#endif
-EOF
-	  # Now try linking the two files.
-	  mv conftest.$ac_objext conftstm.$ac_objext
-	  lt_save_LIBS="$LIBS"
-	  lt_save_CFLAGS="$CFLAGS"
-	  LIBS="conftstm.$ac_objext"
-	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
-	  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && test -s conftest${ac_exeext}; then
-	    pipe_works=yes
-	  fi
-	  LIBS="$lt_save_LIBS"
-	  CFLAGS="$lt_save_CFLAGS"
-	else
-	  echo "cannot find nm_test_func in $nlist" >&5
-	fi
-      else
-	echo "cannot find nm_test_var in $nlist" >&5
-      fi
-    else
-      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
-    fi
-  else
-    echo "$progname: failed program was:" >&5
-    cat conftest.$ac_ext >&5
-  fi
-  rm -f conftest* conftst*
 
-  # Do not use the global_symbol_pipe unless it works.
-  if test "$pipe_works" = yes; then
-    break
-  else
-    lt_cv_sys_global_symbol_pipe=
-  fi
-done
+# Source file extension for C test sources.
+ac_ext=c
 
-fi
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
 
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
-  lt_cv_sys_global_symbol_to_cdecl=
-fi
-if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
-  echo "$as_me:$LINENO: result: failed" >&5
-echo "${ECHO_T}failed" >&6
-else
-  echo "$as_me:$LINENO: result: ok" >&5
-echo "${ECHO_T}ok" >&6
-fi
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;\n"
 
-echo "$as_me:$LINENO: checking for objdir" >&5
-echo $ECHO_N "checking for objdir... $ECHO_C" >&6
-if test "${lt_cv_objdir+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
-  lt_cv_objdir=.libs
-else
-  # MS-DOS does not allow filenames that begin with a dot.
-  lt_cv_objdir=_libs
-fi
-rmdir .libs 2>/dev/null
-fi
-echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
-echo "${ECHO_T}$lt_cv_objdir" >&6
-objdir=$lt_cv_objdir
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}\n'
 
 
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
 
+# Allow CC to be a program name with arguments.
+compiler=$CC
 
 
-case $host_os in
-aix3*)
-  # AIX sometimes has problems with the GCC collect2 program.  For some
-  # reason, if we set the COLLECT_NAMES environment variable, the problems
-  # vanish in a puff of smoke.
-  if test "X${COLLECT_NAMES+set}" != Xset; then
-    COLLECT_NAMES=
-    export COLLECT_NAMES
+#
+# Check for any special shared library compilation flags.
+#
+lt_prog_cc_shlib=
+if test "$GCC" = no; then
+  case $host_os in
+  sco3.2v5*)
+    lt_prog_cc_shlib='-belf'
+    ;;
+  esac
+fi
+if test -n "$lt_prog_cc_shlib"; then
+  { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5
+echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;}
+  if echo "$old_CC $old_CFLAGS " | grep "[ 	]$lt_prog_cc_shlib[ 	]" >/dev/null; then :
+  else
+    { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
+echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;}
+    lt_cv_prog_cc_can_build_shared=no
   fi
-  ;;
-esac
+fi
 
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e s/^X//'
-sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
 
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
+#
+# Check to make sure the static flag actually works.
+#
+echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6
+if test "${lt_prog_compiler_static_works+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_static_works=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_prog_compiler_static"
+   printf "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+     else
+       lt_prog_compiler_static_works=yes
+     fi
+   fi
+   $rm conftest*
+   LDFLAGS="$save_LDFLAGS"
 
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
+echo "${ECHO_T}$lt_prog_compiler_static_works" >&6
 
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
+if test x"$lt_prog_compiler_static_works" = xyes; then
+    :
+else
+    lt_prog_compiler_static=
+fi
 
-# Constants:
-rm="rm -f"
 
-# Global variables:
-default_ofile=libtool
-can_build_shared=yes
 
-# All known linkers require a `.a' archive for static linking (except M$VC,
-# which needs '.lib').
-libext=a
-ltmain="$ac_aux_dir/ltmain.sh"
-ofile="$default_ofile"
-with_gnu_ld="$lt_cv_prog_gnu_ld"
 
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_RANLIB+set}" = set; then
+lt_prog_compiler_no_builtin_flag=
+
+if test "$GCC" = yes; then
+  lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+
+
+echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
+  lt_cv_prog_compiler_rtti_exceptions=no
+  ac_outfile=conftest.$ac_objext
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="-fno-rtti -fno-exceptions"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:7469: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:7473: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test ! -s conftest.err; then
+       lt_cv_prog_compiler_rtti_exceptions=yes
+     fi
+   fi
+   $rm conftest*
 
 fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
-  echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+    :
 fi
 
 fi
-if test -z "$ac_cv_prog_RANLIB"; then
-  ac_ct_RANLIB=$RANLIB
-  # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_RANLIB"; then
-  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_RANLIB="ranlib"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
 
-  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
-  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-echo "${ECHO_T}$ac_ct_RANLIB" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  RANLIB=$ac_ct_RANLIB
-else
-  RANLIB="$ac_cv_prog_RANLIB"
-fi
-
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_STRIP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
-  echo "$as_me:$LINENO: result: $STRIP" >&5
-echo "${ECHO_T}$STRIP" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
+lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
 
-fi
-if test -z "$ac_cv_prog_STRIP"; then
-  ac_ct_STRIP=$STRIP
-  # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_STRIP"; then
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_STRIP="strip"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
+echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
 
-  test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
-  echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-echo "${ECHO_T}$ac_ct_STRIP" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl='-Wl,'
+    lt_prog_compiler_static='-static'
 
-  STRIP=$ac_ct_STRIP
-else
-  STRIP="$ac_cv_prog_STRIP"
-fi
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
 
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+      ;;
 
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
 
-# Set sane defaults for various variables
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-test -z "$AS" && AS=as
-test -z "$CC" && CC=cc
-test -z "$LTCC" && LTCC=$CC
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-test -z "$LD" && LD=ld
-test -z "$LN_S" && LN_S="ln -s"
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-test -z "$NM" && NM=nm
-test -z "$SED" && SED=sed
-test -z "$OBJDUMP" && OBJDUMP=objdump
-test -z "$RANLIB" && RANLIB=:
-test -z "$STRIP" && STRIP=:
-test -z "$ac_objext" && ac_objext=o
+    mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic='-DDLL_EXPORT'
+      ;;
 
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic='-fno-common'
+      ;;
 
-if test -n "$RANLIB"; then
-  case $host_os in
-  openbsd*)
-    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
-    ;;
-  *)
-    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
-    ;;
-  esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-fi
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      lt_prog_compiler_can_build_shared=no
+      enable_shared=no
+      ;;
 
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
-  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
-    echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
-echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $MAGIC_CMD in
-[\\/*] |  ?:[\\/]*)
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
-  ;;
-*)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
-  for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/${ac_tool_prefix}file; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
-      if test -n "$file_magic_test_file"; then
-	case $deplibs_check_method in
-	"file_magic "*)
-	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
-	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
-	    egrep "$file_magic_regex" > /dev/null; then
-	    :
-	  else
-	    cat <<EOF 1>&2
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic=-Kconform_pic
+      fi
+      ;;
 
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such.  This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem.  Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool at gnu.org
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case "$host_cpu" in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic='-fPIC'
+	;;
+      esac
+      ;;
 
-EOF
-	  fi ;;
-	esac
+    *)
+      lt_prog_compiler_pic='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      lt_prog_compiler_wl='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static='-Bstatic'
+      else
+	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
       fi
-      break
-    fi
-  done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
-  ;;
-esac
-fi
+      ;;
+      darwin*)
+        # PIC is the default on this platform
+        # Common symbols not allowed in MH_DYLIB files
+       case "$cc_basename" in
+         xlc*)
+         lt_prog_compiler_pic='-qnocommon'
+         lt_prog_compiler_wl='-Wl,'
+         ;;
+       esac
+       ;;
 
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
-  echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-echo "${ECHO_T}$MAGIC_CMD" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
+    mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic='-DDLL_EXPORT'
+      ;;
 
-if test -z "$lt_cv_path_MAGIC_CMD"; then
-  if test -n "$ac_tool_prefix"; then
-    echo "$as_me:$LINENO: checking for file" >&5
-echo $ECHO_N "checking for file... $ECHO_C" >&6
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $MAGIC_CMD in
-[\\/*] |  ?:[\\/]*)
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
-  ;;
-*)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
-  for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/file; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/file"
-      if test -n "$file_magic_test_file"; then
-	case $deplibs_check_method in
-	"file_magic "*)
-	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
-	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
-	    egrep "$file_magic_regex" > /dev/null; then
-	    :
-	  else
-	    cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such.  This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem.  Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool at gnu.org
-
-EOF
-	  fi ;;
-	esac
-      fi
-      break
-    fi
-  done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
-  ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
-  echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-echo "${ECHO_T}$MAGIC_CMD" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  else
-    MAGIC_CMD=:
-  fi
-fi
-
-  fi
-  ;;
-esac
-
-enable_dlopen=no
-enable_win32_dll=no
-
-# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then
-  enableval="$enable_libtool_lock"
-
-fi;
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-
-# Check whether --with-pic or --without-pic was given.
-if test "${with_pic+set}" = set; then
-  withval="$with_pic"
-  pic_mode="$withval"
-else
-  pic_mode=default
-fi;
-test -z "$pic_mode" && pic_mode=default
+    hpux9* | hpux10* | hpux11*)
+      lt_prog_compiler_wl='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case "$host_cpu" in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static='${wl}-a ${wl}archive'
+      ;;
 
-# Use C for the default configuration in the libtool script
-tagname=
-lt_save_CC="$CC"
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static='-non_shared'
+      ;;
 
+    newsos6)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
 
-# Source file extension for C test sources.
-ac_ext=c
+    linux*)
+      case $CC in
+      icc* | ecc*)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-KPIC'
+	lt_prog_compiler_static='-static'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static='-non_shared'
+        ;;
+      esac
+      ;;
 
-# Object file extension for compiled C test sources.
-objext=o
-objext=$objext
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static='-non_shared'
+      ;;
 
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;"
+    sco3.2v5*)
+      lt_prog_compiler_pic='-Kpic'
+      lt_prog_compiler_static='-dn'
+      ;;
 
-# Code to be used in simple link tests
-lt_simple_link_test_code='main(){return(0);}'
+    solaris*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
 
+    sunos4*)
+      lt_prog_compiler_wl='-Qoption ld '
+      lt_prog_compiler_pic='-PIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
 
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
+    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
 
-# Allow CC to be a program name with arguments.
-set dummy $CC
-compiler="$2"
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	lt_prog_compiler_pic='-Kconform_pic'
+	lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
 
+    uts4*)
+      lt_prog_compiler_pic='-pic'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
 
-#
-# Check for any special shared library compilation flags.
-#
-lt_prog_cc_shlib=
-if test "$GCC" = no; then
-  case $host_os in
-  sco3.2v5*)
-    lt_prog_cc_shlib='-belf'
-    ;;
-  esac
-fi
-if test -n "$lt_prog_cc_shlib"; then
-  { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5
-echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;}
-  if echo "$old_CC $old_CFLAGS " | egrep -e "[ 	]$lt_prog_cc_shlib[ 	]" >/dev/null; then :
-  else
-    { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
-echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;}
-    lt_cv_prog_cc_can_build_shared=no
+    *)
+      lt_prog_compiler_can_build_shared=no
+      ;;
+    esac
   fi
-fi
 
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic" >&6
 
 #
-# Check to make sure the static flag actually works.
+# Check to make sure the PIC flag actually works.
 #
-echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5
-echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6
-if test "${lt_prog_compiler_static_works+set}" = set; then
+if test -n "$lt_prog_compiler_pic"; then
+
+echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6
+if test "${lt_prog_compiler_pic_works+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  lt_prog_compiler_static_works=no
-   save_LDFLAGS="$LDFLAGS"
-   LDFLAGS="$LDFLAGS $lt_prog_compiler_static"
-   echo "$lt_simple_link_test_code" > conftest.$ac_ext
-   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+  lt_prog_compiler_pic_works=no
+  ac_outfile=conftest.$ac_objext
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:7712: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:7716: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
-     if test -s conftest.err; then
-       # Append any errors to the config.log.
-       cat conftest.err 1>&5
-     else
-       lt_prog_compiler_static_works=yes
+     if test ! -s conftest.err; then
+       lt_prog_compiler_pic_works=yes
      fi
    fi
    $rm conftest*
-   LDFLAGS="$save_LDFLAGS"
 
 fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
-echo "${ECHO_T}$lt_prog_compiler_static_works" >&6
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6
 
-if test x"$lt_prog_compiler_static_works" = xyes; then
-    :
+if test x"$lt_prog_compiler_pic_works" = xyes; then
+    case $lt_prog_compiler_pic in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+     esac
 else
-    lt_prog_compiler_static=
+    lt_prog_compiler_pic=
+     lt_prog_compiler_can_build_shared=no
 fi
 
+fi
+case "$host_os" in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic=
+    ;;
+  *)
+    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+    ;;
+esac
 
-
-
-lt_prog_compiler_no_builtin_flag=
-
-if test "$GCC" = yes; then
-  lt_prog_compiler_no_builtin_flag=' -fno-builtin'
-
-  echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
-echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
-if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
+echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  lt_cv_prog_compiler_rtti_exceptions=no
-  ac_outfile=conftest.$ac_objext
-   save_CFLAGS="$CFLAGS"
-   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   if (eval $ac_compile 2>conftest.err) && test -s $ac_outfile; then
+  lt_cv_prog_compiler_c_o=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:7772: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:7776: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
-     if test -s conftest.err; then
-       # Append any errors to the config.log.
-       cat conftest.err 1>&5
-     else
-       lt_cv_prog_compiler_rtti_exceptions=yes
-     fi
-   fi
-   $rm conftest*
-   CFLAGS="$save_CFLAGS"
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
-
-if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
-    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
-else
-    :
-fi
-
-fi
-
-lt_prog_compiler_wl=
-lt_prog_compiler_pic=
-lt_prog_compiler_static=
-
-echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
-
-  if test "$GCC" = yes; then
-    lt_prog_compiler_wl='-Wl,'
-    lt_prog_compiler_static='-static'
-
-    case $host_os in
-      aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	lt_prog_compiler_static='-Bstatic'
-      fi
-      ;;
-
-    amigaos*)
-      # FIXME: we need at least 68020 code to build shared libraries, but
-      # adding the `-m68020' flag to GCC prevents building anything better,
-      # like `-m68040'.
-      lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
-      ;;
-
-    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
-
-    cygwin* | mingw* | pw32* | os2*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      lt_prog_compiler_pic='-DDLL_EXPORT'
-      ;;
-
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      lt_prog_compiler_pic='-fno-common'
-      ;;
-
-    msdosdjgpp*)
-      # Just because we use GCC doesn't mean we suddenly get shared libraries
-      # on systems that don't support them.
-      lt_prog_compiler_can_build_shared=no
-      enable_shared=no
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec; then
-	lt_prog_compiler_pic=-Kconform_pic
-      fi
-      ;;
-
-    hpux*)
-      # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
-      if test "$host_cpu" != ia64; then
-	lt_prog_compiler_pic='-fPIC'
-      fi
-      ;;
-
-    *)
-      lt_prog_compiler_pic='-fPIC'
-      ;;
-    esac
-  else
-    # PORTME Check for flag to pass linker flags through the system compiler.
-    case $host_os in
-    aix*)
-      lt_prog_compiler_wl='-Wl,'
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	lt_prog_compiler_static='-Bstatic'
-      else
-	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
-      fi
-      ;;
-
-    cygwin* | mingw* | pw32* | os2*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      lt_prog_compiler_pic='-DDLL_EXPORT'
-      ;;
-
-    hpux9* | hpux10* | hpux11*)
-      lt_prog_compiler_wl='-Wl,'
-      if test "$host_cpu" != ia64; then
-	lt_prog_compiler_pic='+Z'
-      fi
-      # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      lt_prog_compiler_static='${wl}-a ${wl}archive'
-      ;;
-
-    irix5* | irix6* | nonstopux*)
-      lt_prog_compiler_wl='-Wl,'
-      # PIC (with -KPIC) is the default.
-      lt_prog_compiler_static='-non_shared'
-      ;;
-
-    newsos6)
-      lt_prog_compiler_pic='-KPIC'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
-
-    osf3* | osf4* | osf5*)
-      lt_prog_compiler_wl='-Wl,'
-      # All OSF/1 code is PIC.
-      lt_prog_compiler_static='-non_shared'
-      ;;
-
-    sco3.2v5*)
-      lt_prog_compiler_pic='-Kpic'
-      lt_prog_compiler_static='-dn'
-      ;;
-
-    solaris*)
-      lt_prog_compiler_wl='-Wl,'
-      lt_prog_compiler_pic='-KPIC'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
-
-    sunos4*)
-      lt_prog_compiler_wl='-Qoption ld '
-      lt_prog_compiler_pic='-PIC'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
-
-    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-      if test "x$host_vendor" = xsni; then
-	lt_prog_compiler_wl='-LD'
-      else
-	lt_prog_compiler_wl='-Wl,'
-      fi
-      lt_prog_compiler_pic='-KPIC'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec ;then
-	lt_prog_compiler_pic='-Kconform_pic'
-	lt_prog_compiler_static='-Bstatic'
-      fi
-      ;;
-
-    uts4*)
-      lt_prog_compiler_pic='-pic'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
-
-    *)
-      lt_prog_compiler_can_build_shared=no
-      ;;
-    esac
-  fi
-
-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic" >&6
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$lt_prog_compiler_pic"; then
-  echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6
-if test "${lt_prog_compiler_pic_works+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_prog_compiler_pic_works=no
-  ac_outfile=conftest.$ac_objext
-   save_CFLAGS="$CFLAGS"
-   CFLAGS="$CFLAGS $lt_prog_compiler_pic -DPIC"
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   if (eval $ac_compile 2>conftest.err) && test -s $ac_outfile; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     if test -s conftest.err; then
-       # Append any errors to the config.log.
-       cat conftest.err 1>&5
-     else
-       lt_prog_compiler_pic_works=yes
-     fi
-   fi
-   $rm conftest*
-   CFLAGS="$save_CFLAGS"
-
-fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6
-
-if test x"$lt_prog_compiler_pic_works" = xyes; then
-    case $lt_prog_compiler_pic in
-     "" | " "*) ;;
-     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
-     esac
-else
-    lt_prog_compiler_pic=
-     lt_prog_compiler_can_build_shared=no
-fi
-
-fi
-case "$host_os" in
-  # For platforms which do not support PIC, -DPIC is meaningless:
-  *djgpp*)
-    lt_prog_compiler_pic=
-    ;;
-  *)
-    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
-    ;;
-esac
-
-echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
-if test "${lt_cv_prog_compiler_c_o+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_prog_compiler_c_o=no
-   $rm -r conftest 2>/dev/null
-   mkdir conftest
-   cd conftest
-   mkdir out
-   save_CFLAGS="$CFLAGS"
-		   CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-   # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
-   # that will create temporary files in the current directory regardless of
-   # the output directory.  Thus, making CWD read-only will cause this test
-   # to fail, enabling locking or at least warning the user not to do parallel
-   # builds.
-   chmod -w .
-
-   if (eval $ac_compile 2>out/conftest.err) && test -s out/conftest2.$ac_objext
-   then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     if test -s out/conftest.err; then
-       # Append any errors to the config.log.
-       cat out/conftest.err 1>&5
-     else
+     if test ! -s out/conftest.err; then
        lt_cv_prog_compiler_c_o=yes
      fi
    fi
-   CFLAGS="$save_CFLAGS"
    chmod u+w .
-   $rm conftest* out/*
-   rmdir out
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
    cd ..
    rmdir conftest
    $rm conftest*
@@ -7815,9 +7824,8 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar
 
   runpath_var=
   allow_undefined_flag=
-
+  enable_shared_with_static_runtimes=no
   archive_cmds=
-  archive_cmds_need_lc=
   archive_expsym_cmds=
   old_archive_From_new_cmds=
   old_archive_from_expsyms_cmds=
@@ -7825,17 +7833,21 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar
   whole_archive_flag_spec=
   thread_safe_flag_spec=
   hardcode_libdir_flag_spec=
+  hardcode_libdir_flag_spec_ld=
   hardcode_libdir_separator=
   hardcode_direct=no
   hardcode_minus_L=no
   hardcode_shlibpath_var=unsupported
   link_all_deplibs=unknown
+  hardcode_automatic=no
+  module_cmds=
+  module_expsym_cmds=
   always_export_symbols=no
-  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
   # include_expsyms should be a list of space-separated symbols to be *always*
   # included in the symbol list
   include_expsyms=
-  # exclude_expsyms can be an egrep regular expression of symbols to exclude
+  # exclude_expsyms can be an extended regexp of symbols to exclude
   # it will be wrapped by ` (' and `)$', so one must not match beginning or
   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
   # as well as any symbol that contains `d'.
@@ -7899,7 +7911,7 @@ EOF
       ;;
 
     beos*)
-      if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 	allow_undefined_flag=unsupported
 	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
 	# support --undefined.  This deserves some investigation.  FIXME
@@ -7910,80 +7922,28 @@ EOF
       ;;
 
     cygwin* | mingw* | pw32*)
-      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, as there is
-      # no search path for DLLs.
+      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+      # as there is no search path for DLLs.
       hardcode_libdir_flag_spec='-L$libdir'
       allow_undefined_flag=unsupported
-      always_export_symbols=yes
-
-      extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
-	sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
-	test -f $output_objdir/impgen.exe || (cd $output_objdir && \
-	if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
-	else $CC -o impgen impgen.c ; fi)~
-	$output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
-
-      old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
-
-      # cygwin and mingw dlls have different entry points and sets of symbols
-      # to exclude.
-      # FIXME: what about values for MSVC?
-      dll_entry=__cygwin_dll_entry at 12
-      dll_exclude_symbols=DllMain at 12,_cygwin_dll_entry at 12,_cygwin_noncygwin_dll_entry at 12~
-      case $host_os in
-      mingw*)
-	# mingw values
-	dll_entry=_DllMainCRTStartup at 12
-	dll_exclude_symbols=DllMain at 12,DllMainCRTStartup at 12,DllEntryPoint at 12~
-	;;
-      esac
-
-      # mingw and cygwin differ, and it's simplest to just exclude the union
-      # of the two symbol sets.
-      dll_exclude_symbols=DllMain at 12,_cygwin_dll_entry at 12,_cygwin_noncygwin_dll_entry at 12,DllMainCRTStartup at 12,DllEntryPoint at 12
-
-      # recent cygwin and mingw systems supply a stub DllMain which the user
-      # can override, but on older systems we have to supply one (in ltdll.c)
-      if test "x$lt_cv_need_dllmain" = "xyes"; then
-	ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
-	ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
-  	test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
-      else
-	ltdll_obj=
-	ltdll_cmds=
-      fi
-
-      # Extract the symbol export list from an `--export-all' def file,
-      # then regenerate the def file from the symbol export list, so that
-      # the compiled dll only exports the symbol export list.
-      # Be careful not to strip the DATA tag left by newer dlltools.
-      export_symbols_cmds="$ltdll_cmds"'
-	$DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
-	sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
-
-      # If the export-symbols file already is a .def file (1st line
-      # is EXPORTS), use it as is.
-      # If DATA tags from a recent dlltool are present, honour them!
-      archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
-	  cp $export_symbols $output_objdir/$soname-def;
+      always_export_symbols=no
+      enable_shared_with_static_runtimes=yes
+      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -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...
+	archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
 	else
-	  echo EXPORTS > $output_objdir/$soname-def;
-	  _lt_hint=1;
-	  cat $export_symbols | while read symbol; do
-	   set dummy \$symbol;
-	   case \$# in
-	     2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
-	     *) echo "   \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
-	   esac;
-	   _lt_hint=`expr 1 + \$_lt_hint`;
-	  done;
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $output_objdir/$soname.def;
 	fi~
-	'"$ltdll_cmds"'
-	$CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
-	$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
-	$CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
-	$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
-	$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
+      else
+	ld_shlibs=no
+      fi
       ;;
 
     netbsd*)
@@ -7991,13 +7951,13 @@ EOF
 	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 	wlarc=
       else
-	archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       fi
       ;;
 
     solaris* | sysv5*)
-      if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
 	ld_shlibs=no
 	cat <<EOF 1>&2
 
@@ -8009,7 +7969,7 @@ EOF
 *** used, and then restart.
 
 EOF
-      elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       else
@@ -8024,8 +7984,33 @@ EOF
       hardcode_shlibpath_var=no
       ;;
 
-    *)
-      if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+  linux*)
+    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_cmds="$tmp_archive_cmds"
+      supports_anon_versioning=no
+      case `$LD -v 2>/dev/null` in
+        *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+        *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+        *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+        *\ 2.11.*) ;; # other 2.11 versions
+        *) supports_anon_versioning=yes ;;
+      esac
+      if test $supports_anon_versioning = yes; then
+        archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
+cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+$echo "local: *; };" >> $output_objdir/$libname.ver~
+        $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+      else
+        archive_expsym_cmds="$tmp_archive_cmds"
+      fi
+    else
+      ld_shlibs=no
+    fi
+    ;;
+
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       else
@@ -8038,20 +8023,12 @@ EOF
       runpath_var=LD_RUN_PATH
       hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
       export_dynamic_flag_spec='${wl}--export-dynamic'
-      case $host_os in
-      cygwin* | mingw* | pw32*)
-	# dlltool doesn't understand --whole-archive et. al.
-	whole_archive_flag_spec=
-	;;
-      *)
-	# ancient GNU ld didn't support --whole-archive et. al.
-	if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
-  	whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-	else
+      # ancient GNU ld didn't support --whole-archive et. al.
+      if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+ 	whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
   	whole_archive_flag_spec=
-	fi
-	;;
-      esac
+      fi
     fi
   else
     # PORTME fill in a description of your system's linker (not GNU ld)
@@ -8080,14 +8057,25 @@ EOF
       else
 	# If we're using GNU nm, then we don't want the "-C" option.
 	# -C means demangle to AIX nm, but means don't demangle with GNU nm
-	if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
+	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
 	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
 	else
 	  export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
 	fi
+	aix_use_runtimelinking=no
+
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+	  for ld_flag in $LDFLAGS; do
+  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+  	    aix_use_runtimelinking=yes
+  	    break
+  	  fi
+	  done
+	esac
 
-	# KDE requires run time linking.  Make it the default.
-	aix_use_runtimelinking=yes
 	exp_sym_flag='-bexport'
 	no_entry_flag='-bnoentry'
       fi
@@ -8133,22 +8121,22 @@ EOF
 	  shared_flag='-G'
 	else
   	if test "$aix_use_runtimelinking" = yes; then
-	    shared_flag='-qmkshrobj ${wl}-G'
+	    shared_flag='${wl}-G'
 	  else
-	    shared_flag='-qmkshrobj'
+	    shared_flag='${wl}-bM:SRE'
   	fi
 	fi
       fi
 
-      # Let the compiler handle the export list.
-      always_export_symbols=no
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      always_export_symbols=yes
       if test "$aix_use_runtimelinking" = yes; then
 	# Warning - without using the other runtime loading flags (-brtl),
 	# -berok will link without error, but may produce a broken library.
 	allow_undefined_flag='-berok'
        # Determine the default libpath from the value encoded in an empty executable.
-	cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
+       cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -8165,33 +8153,43 @@ main ()
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 }'`
 # Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 }'`; fi
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
-	hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
-	archive_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
-	archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+	archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
        else
 	if test "$host_cpu" = ia64; then
 	  hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
@@ -8200,7 +8198,6 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	else
 	 # Determine the default libpath from the value encoded in an empty executable.
 	 cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -8217,28 +8214,39 @@ main ()
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 }'`
 # Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 }'`; fi
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
 	 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
@@ -8265,7 +8273,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       ld_shlibs=no
       ;;
 
-    bsdi4*)
+    bsdi[45]*)
       export_dynamic_flag_spec=-rdynamic
       ;;
 
@@ -8278,35 +8286,66 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       allow_undefined_flag=unsupported
       # Tell ltmain to make .lib files, not .a files.
       libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
       # FIXME: Setting linknames here is a bad hack.
-      archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
       # The linker will automatically build a .lib file if we build a DLL.
       old_archive_From_new_cmds='true'
       # FIXME: Should let the user specify the lib program.
       old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
       fix_srcfile_path='`cygpath -w "$srcfile"`'
+      enable_shared_with_static_runtimes=yes
       ;;
 
     darwin* | rhapsody*)
       case "$host_os" in
-      rhapsody* | darwin1.[012])
-	allow_undefined_flag='-undefined suppress'
-	;;
-      *) # Darwin 1.3 on
-	allow_undefined_flag='-flat_namespace -undefined suppress'
-	;;
+        rhapsody* | darwin1.[012])
+         allow_undefined_flag='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[012])
+               allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
       esac
-
-      # FIXME: Relying on posixy $() will cause problems for
-      #        cross-compilation, but unfortunately the echo tests do not
-      #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
-      #	       `"' quotes if we put them in here... so don't!
-      archive_cmds='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
-      # We need to add '_' to the symbols in $export_symbols first
-      #_LT_AC_TAGVAR(archive_expsym_cmds, )="$_LT_AC_TAGVAR(archive_cmds, )"' && strip -s $export_symbols'
-      hardcode_direct=yes
-      hardcode_shlibpath_var=no
-      whole_archive_flag_spec='-all_load $convenience'
+      archive_cmds_need_lc=no
+      hardcode_direct=no
+      hardcode_automatic=yes
+      hardcode_shlibpath_var=unsupported
+      whole_archive_flag_spec=''
+      link_all_deplibs=yes
+    if test "$GCC" = yes ; then
+    	output_verbose_link_cmd='echo'
+        archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+      module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+      archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $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}'
+      module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    else
+      case "$cc_basename" in
+        xlc*)
+         output_verbose_link_cmd='echo'
+         archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+         module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+         archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         ld_shlibs=no
+          ;;
+      esac
+    fi
       ;;
 
     dgux*)
@@ -8339,61 +8378,87 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       ;;
 
     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd*)
+    freebsd* | kfreebsd*-gnu)
       archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
       hardcode_libdir_flag_spec='-R$libdir'
       hardcode_direct=yes
       hardcode_shlibpath_var=no
       ;;
 
-    hpux9* | hpux10* | hpux11*)
+    hpux9*)
       if test "$GCC" = yes; then
-	case $host_os in
-	  hpux9*)
-	    archive_cmds='$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'
-	    ;;
-	  *)
-	    if test "$host_cpu" = ia64; then
-	      archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	    else
-	      archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-	    fi
-	    ;;
-	esac
-      else
-	case $host_os in
-	  hpux9*)
-	    archive_cmds='$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'
-	    ;;
-	  *)
-	    if test "$host_cpu" = ia64; then
-	      archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
-	    else
-	      archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
-	    fi
-	    ;;
-	esac
-      fi
-      if test "$host_cpu" = ia64; then
-	hardcode_libdir_flag_spec='-L$libdir'
-	hardcode_direct=no
-	hardcode_shlibpath_var=no
+	archive_cmds='$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'
       else
-	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-	hardcode_libdir_separator=:
-	hardcode_direct=yes
+	archive_cmds='$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
+      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_direct=yes
+
       # hardcode_minus_L: Not really in the search PATH,
       # but as the default location of the library.
       hardcode_minus_L=yes
       export_dynamic_flag_spec='${wl}-E'
       ;;
 
+    hpux10* | hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case "$host_cpu" in
+	hppa*64*|ia64*)
+	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case "$host_cpu" in
+	hppa*64*|ia64*)
+	  archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  ;;
+	*)
+	  archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	case "$host_cpu" in
+	hppa*64*)
+	  hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+	  hardcode_libdir_flag_spec_ld='+b $libdir'
+	  hardcode_libdir_separator=:
+	  hardcode_direct=no
+	  hardcode_shlibpath_var=no
+	  ;;
+	ia64*)
+	  hardcode_libdir_flag_spec='-L$libdir'
+	  hardcode_direct=no
+	  hardcode_shlibpath_var=no
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L=yes
+	  ;;
+	*)
+	  hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+	  hardcode_libdir_separator=:
+	  hardcode_direct=yes
+	  export_dynamic_flag_spec='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L=yes
+	  ;;
+	esac
+      fi
+      ;;
+
     irix5* | irix6* | nonstopux*)
       if test "$GCC" = yes; then
 	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
       else
 	archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec_ld='-rpath $libdir'
       fi
       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
       hardcode_libdir_separator=:
@@ -8422,9 +8487,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
     openbsd*)
       hardcode_direct=yes
       hardcode_shlibpath_var=no
-
       if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-	archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
+	archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
 	hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
 	export_dynamic_flag_spec='${wl}-E'
       else
@@ -8434,7 +8499,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	   hardcode_libdir_flag_spec='-R$libdir'
 	   ;;
 	 *)
-	   archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
+	   archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 	   hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
 	   ;;
        esac
@@ -8469,7 +8534,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       else
 	allow_undefined_flag=' -expect_unresolved \*'
 	archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-	archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+	archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
 	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
 
 	# Both c and cxx compiler support -rpath directly
@@ -8490,11 +8555,11 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       no_undefined_flag=' -z text'
       if test "$GCC" = yes; then
 	archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+	archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
       else
 	archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+	archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
   	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
       fi
       hardcode_libdir_flag_spec='-R$libdir'
@@ -8522,13 +8587,23 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       ;;
 
     sysv4)
-      if test "x$host_vendor" = xsni; then
-	archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	hardcode_direct=yes # is this really true???
-      else
-	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	hardcode_direct=no #Motorola manual says yes, but my tests say they lie
-      fi
+      case $host_vendor in
+	sni)
+	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  reload_cmds='$CC -r -o $output$reload_objs'
+	  hardcode_direct=no
+        ;;
+	motorola)
+	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
       runpath_var='LD_RUN_PATH'
       hardcode_shlibpath_var=no
       ;;
@@ -8574,7 +8649,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       # $CC -shared without GNU ld will not create a library from C++
       # object files and a static libstdc++, better avoid it by now
       archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+      archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
   		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
       hardcode_libdir_flag_spec=
       hardcode_shlibpath_var=no
@@ -8605,114 +8680,71 @@ fi
 #
 # Do we need to explicitly link libc?
 #
-archive_cmds_need_lc=yes
-if test "$enable_shared" = yes && test "$GCC" = yes; then
-  case $archive_cmds in
-  *'~'*)
-    # FIXME: we may have to deal with multi-command sequences.
-    ;;
-  '$CC '*)
-    # Test whether the compiler implicitly links with -lc since on some
-    # systems, -lgcc has to come before -lc. If gcc already passes -lc
-    # to ld, don't add -lc before -lgcc.
-    echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+case "x$archive_cmds_need_lc" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
-    $rm conftest*
-    echo 'static int dummy;' > conftest.$ac_ext
+      $rm conftest*
+      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
-    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } 2>conftest.err; then
-      soname=conftest
-      lib=conftest
-      libobjs=conftest.$ac_objext
-      deplibs=
-      wl=$lt_prog_compiler_wl
-      compiler_flags=-v
-      linker_flags=-v
-      verstring=
-      output_objdir=.
-      libname=conftest
-      lt_save_allow_undefined_flag=$allow_undefined_flag
-      allow_undefined_flag=
-      if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag
+        allow_undefined_flag=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
   (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
-      then
-	archive_cmds_need_lc=no
+        then
+	  archive_cmds_need_lc=no
+        else
+	  archive_cmds_need_lc=yes
+        fi
+        allow_undefined_flag=$lt_save_allow_undefined_flag
       else
-	archive_cmds_need_lc=yes
+        cat conftest.err 1>&5
       fi
-      allow_undefined_flag=$lt_save_allow_undefined_flag
-    else
-      cat conftest.err 1>&5
-    fi
-    $rm conftest*
-    echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
+      $rm conftest*
+      echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
 echo "${ECHO_T}$archive_cmds_need_lc" >&6
-    ;;
-  esac
-fi
-
-echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
-hardcode_action=
-if test -n "$hardcode_libdir_flag_spec" || \
-   test -n "$runpath_var "; then
-
-  # We can hardcode non-existant directories.
-  if test "$hardcode_direct" != no &&
-     # If the only mechanism to avoid hardcoding is shlibpath_var, we
-     # have to relink, otherwise we might link with an installed library
-     # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
-     test "$hardcode_minus_L" != no; then
-    # Linking always hardcodes the temporary library directory.
-    hardcode_action=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    hardcode_action=immediate
+      ;;
+    esac
   fi
-else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  hardcode_action=unsupported
-fi
-echo "$as_me:$LINENO: result: $hardcode_action" >&5
-echo "${ECHO_T}$hardcode_action" >&6
-
-if test "$hardcode_action" = relink; then
-  # Fast installation is not supported
-  enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
-  # Fast installation is not necessary
-  enable_fast_install=needless
-fi
-
-striplib=
-old_striplib=
-echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
-echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
-if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
-  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
-  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
-  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
+  ;;
+esac
 
 echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
 library_names_spec=
 libname_spec='lib$name'
 soname_spec=
+shrext_cmds=".so"
 postinstall_cmds=
 postuninstall_cmds=
 finish_cmds=
@@ -8722,7 +8754,20 @@ shlibpath_overrides_runpath=unknown
 version_type=none
 dynamic_linker="$host_os ld.so"
 sys_lib_dlsearch_path_spec="/lib /usr/lib"
-sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+if test "$GCC" = yes; then
+  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
 need_lib_prefix=unknown
 hardcode_into_libs=no
 
@@ -8733,18 +8778,21 @@ need_version=unknown
 case $host_os in
 aix3*)
   version_type=linux
-  library_names_spec='${libname}${release}.so$versuffix $libname.a'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
   shlibpath_var=LIBPATH
 
   # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}.so$major'
+  soname_spec='${libname}${release}${shared_ext}$major'
   ;;
 
 aix4* | aix5*)
   version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
   if test "$host_cpu" = ia64; then
     # AIX 5 supports IA64
-    library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
     shlibpath_var=LD_LIBRARY_PATH
   else
     # With GCC up to 2.95.x, collect2 would create an import file
@@ -8770,12 +8818,12 @@ aix4* | aix5*)
       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
       # instead of lib<name>.a to let people know that these are not
       # typical AIX shared libraries.
-      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
     else
       # We preserve .a as extension for shared libraries through AIX4.2
       # and later when we are not doing run time linking.
       library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}.so$major'
+      soname_spec='${libname}${release}${shared_ext}$major'
     fi
     shlibpath_var=LIBPATH
   fi
@@ -8784,20 +8832,20 @@ aix4* | aix5*)
 amigaos*)
   library_names_spec='$libname.ixlibrary $libname.a'
   # Create ${libname}_ixlibrary.a entries in /sys/libs.
-  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
+  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
   ;;
 
 beos*)
-  library_names_spec='${libname}.so'
+  library_names_spec='${libname}${shared_ext}'
   dynamic_linker="$host_os ld.so"
   shlibpath_var=LIBRARY_PATH
   ;;
 
-bsdi4*)
+bsdi[45]*)
   version_type=linux
   need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
@@ -8809,41 +8857,79 @@ bsdi4*)
 
 cygwin* | mingw* | pw32*)
   version_type=windows
+  shrext_cmds=".dll"
   need_version=no
   need_lib_prefix=no
+
   case $GCC,$host_os in
-  yes,cygwin*)
+  yes,cygwin* | yes,mingw* | yes,pw32*)
     library_names_spec='$libname.dll.a'
-    sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
-    soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
-    postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
       dldir=$destdir/`dirname \$dlpath`~
       test -d \$dldir || mkdir -p \$dldir~
-      $install_prog .libs/$dlname \$dldir/$dlname'
-    postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      $install_prog $dir/$dlname \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
       dlpath=$dir/\$dldll~
        $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
     ;;
-  yes,mingw*)
-    library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
-    sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://"`
-    if echo "$sys_lib_search_path_spec" | egrep ';[C-Z]:/' >/dev/null; then
-      # It is most probably a Windows format PATH printed by
-      # mingw gcc, but we are running on Cygwin. Gcc prints its search
-      # path with ; separators, and with drive letters. We can handle the
-      # drive letters (cygwin fileutils understands them), so leave them,
-      # especially as we might pass files found there to a mingw objdump,
-      # which wouldn't understand a cygwinified path. Ahh.
-      sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'`
+
+  linux*)
+    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      supports_anon_versioning=no
+      case `$LD -v 2>/dev/null` in
+        *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+        *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+        *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+        *\ 2.11.*) ;; # other 2.11 versions
+        *) supports_anon_versioning=yes ;;
+      esac
+      if test $supports_anon_versioning = yes; then
+        archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
+cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+$echo "local: *; };" >> $output_objdir/$libname.ver~
+        $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+      else
+        $archive_expsym_cmds="$archive_cmds"
+      fi
     else
-      sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed  -e "s/$PATH_SEPARATOR/ /g"`
+      ld_shlibs=no
     fi
     ;;
-  yes,pw32*)
-    library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
-    ;;
+
   *)
-    library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
     ;;
   esac
   dynamic_linker='Win32 ld.exe'
@@ -8856,21 +8942,26 @@ darwin* | rhapsody*)
   version_type=darwin
   need_lib_prefix=no
   need_version=no
-  # FIXME: Relying on posixy $() will cause problems for
-  #        cross-compilation, but unfortunately the echo tests do not
-  #        yet detect zsh echo's removal of \ escapes.
-  library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
-  soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
+  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+  if test "$GCC" = yes; then
+    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+  else
+    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+  fi
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
   ;;
 
 dgux*)
   version_type=linux
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
@@ -8878,17 +8969,29 @@ freebsd1*)
   dynamic_linker=no
   ;;
 
+kfreebsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
 freebsd*)
   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
   version_type=freebsd-$objformat
   case $version_type in
     freebsd-elf*)
-      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
       need_version=no
       need_lib_prefix=no
       ;;
     freebsd-*)
-      library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
       need_version=yes
       ;;
   esac
@@ -8912,8 +9015,8 @@ gnu*)
   version_type=linux
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
-  soname_spec='${libname}${release}.so$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
   hardcode_into_libs=yes
   ;;
@@ -8924,26 +9027,42 @@ hpux9* | hpux10* | hpux11*)
   version_type=sunos
   need_lib_prefix=no
   need_version=no
-  if test "$host_cpu" = ia64; then
+  case "$host_cpu" in
+  ia64*)
+    shrext_cmds='.so'
     hardcode_into_libs=yes
     dynamic_linker="$host_os dld.so"
     shlibpath_var=LD_LIBRARY_PATH
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-    soname_spec='${libname}${release}.so$major'
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
     if test "X$HPUX_IA64_MODE" = X32; then
       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
     else
       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
     fi
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-  else
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
     dynamic_linker="$host_os dld.sl"
     shlibpath_var=SHLIB_PATH
     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
-    soname_spec='${libname}${release}.sl$major'
-  fi
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
   # HP-UX runs *really* slowly unless shared libraries are mode 555.
   postinstall_cmds='chmod 555 $lib'
   ;;
@@ -8951,21 +9070,29 @@ hpux9* | hpux10* | hpux11*)
 irix5* | irix6* | nonstopux*)
   case $host_os in
     nonstopux*) version_type=nonstopux ;;
-    *)          version_type=irix ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
   esac
   need_lib_prefix=no
   need_version=no
-  soname_spec='${libname}${release}.so$major'
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
   case $host_os in
   irix5* | nonstopux*)
     libsuff= shlibsuff=
     ;;
   *)
     case $LD in # libtool.m4 will add one of these switches to LD
-    *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
-    *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
-    *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
     *) libsuff= shlibsuff= libmagic=never-match;;
     esac
     ;;
@@ -8974,6 +9101,7 @@ irix5* | irix6* | nonstopux*)
   shlibpath_overrides_runpath=no
   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
   ;;
 
 # No shared lib support for Linux oldld, aout, or coff.
@@ -8986,25 +9114,29 @@ linux*)
   version_type=linux
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
-  libsuff=
-  if test "x$LINUX_64_MODE" = x64; then
-    # Some platforms are per default 64-bit, so there's no /lib64
-    if test -d /lib64; then
-      libsuff=64
-    fi
-  fi
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
-  sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
-  sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
   # This implies no fast_install, which is unacceptable.
   # Some rework will be needed to allow for fast_install
   # before this can be enabled.
   hardcode_into_libs=yes
 
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+  fi
+
+  case $host_cpu:$lt_cv_cc_64bit_output in
+  powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
+    sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/X11R6/lib64"
+    sys_lib_search_path_spec="/lib64 /usr/lib64 /usr/local/lib64 /usr/X11R6/lib64"
+    ;;
+  esac
+
   # We used to test for /lib/ld.so.1 and disable shared libraries on
   # powerpc, because MkLinux only supported shared libraries with the
   # GNU dynamic linker.  Since this was broken with cross compilers,
@@ -9012,6 +9144,42 @@ linux*)
   # people can always --disable-shared, the test was removed, and we
   # assume the GNU/Linux dynamic linker is in use.
   dynamic_linker='GNU/Linux ld.so'
+
+  # Find out which ABI we are using (multilib Linux x86_64 hack).
+  libsuff=
+  case "$host_cpu" in
+  x86_64*)
+    echo '#line 9152 "configure"' > conftest.$ac_ext
+    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+      case `/usr/bin/file conftest.$ac_objext` in
+      *64-bit*)
+        libsuff=64
+        ;;
+      esac
+    fi
+    rm -rf conftest*
+    ;;
+  *)
+    ;;
+  esac
+  sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
+  sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+  ;;
+
+knetbsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
   ;;
 
 netbsd*)
@@ -9019,12 +9187,12 @@ netbsd*)
   need_lib_prefix=no
   need_version=no
   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
     dynamic_linker='NetBSD (a.out) ld.so'
   else
-    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
-    soname_spec='${libname}${release}.so$major'
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
     dynamic_linker='NetBSD ld.elf_so'
   fi
   shlibpath_var=LD_LIBRARY_PATH
@@ -9034,17 +9202,17 @@ netbsd*)
 
 newsos6)
   version_type=linux
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   ;;
 
-nto-qnx)
+nto-qnx*)
   version_type=linux
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   ;;
@@ -9053,7 +9221,7 @@ openbsd*)
   version_type=sunos
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
@@ -9072,8 +9240,9 @@ openbsd*)
 
 os2*)
   libname_spec='$name'
+  shrext_cmds=".dll"
   need_lib_prefix=no
-  library_names_spec='$libname.dll $libname.a'
+  library_names_spec='$libname${shared_ext} $libname.a'
   dynamic_linker='OS/2 ld.exe'
   shlibpath_var=LIBPATH
   ;;
@@ -9082,8 +9251,8 @@ osf3* | osf4* | osf5*)
   version_type=osf
   need_lib_prefix=no
   need_version=no
-  soname_spec='${libname}${release}.so'
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
@@ -9091,8 +9260,8 @@ osf3* | osf4* | osf5*)
 
 sco3.2v5*)
   version_type=osf
-  soname_spec='${libname}${release}.so$major'
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
@@ -9100,8 +9269,8 @@ solaris*)
   version_type=linux
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   hardcode_into_libs=yes
@@ -9111,7 +9280,7 @@ solaris*)
 
 sunos4*)
   version_type=sunos
-  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
@@ -9123,12 +9292,18 @@ sunos4*)
 
 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
   version_type=linux
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
   case $host_vendor in
     sni)
       shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
       ;;
     motorola)
       need_lib_prefix=no
@@ -9142,16 +9317,16 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 sysv4*MP*)
   if test -d /usr/nec ;then
     version_type=linux
-    library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
-    soname_spec='$libname.so.$major'
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
     shlibpath_var=LD_LIBRARY_PATH
   fi
   ;;
 
 uts4*)
   version_type=linux
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
@@ -9163,26 +9338,175 @@ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
 echo "${ECHO_T}$dynamic_linker" >&6
 test "$dynamic_linker" = no && can_build_shared=no
 
-if test "x$enable_dlopen" != xyes; then
-  enable_dlopen=unknown
-  enable_dlopen_self=unknown
-  enable_dlopen_self_static=unknown
-else
-  lt_cv_dlopen=no
-  lt_cv_dlopen_libs=
-
-  case $host_os in
-  beos*)
+echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" || \
+   test -n "$runpath_var" || \
+   test "X$hardcode_automatic" = "Xyes" ; then
+
+  # We can hardcode non-existant directories.
+  if test "$hardcode_direct" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
+     test "$hardcode_minus_L" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action=unsupported
+fi
+echo "$as_me:$LINENO: result: $hardcode_action" >&5
+echo "${ECHO_T}$hardcode_action" >&6
+
+if test "$hardcode_action" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+striplib=
+old_striplib=
+echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+   darwin*)
+       if test -n "$STRIP" ; then
+         striplib="$STRIP -x"
+         echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+       else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+       ;;
+   *)
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+    ;;
+  esac
+fi
+
+if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
     lt_cv_dlopen="load_add_on"
     lt_cv_dlopen_libs=
     lt_cv_dlopen_self=yes
     ;;
 
-  cygwin* | mingw* | pw32*)
+  mingw* | pw32*)
     lt_cv_dlopen="LoadLibrary"
     lt_cv_dlopen_libs=
    ;;
 
+  cygwin*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+   ;;
+
+  darwin*)
+  # if libdl is installed we need to link against it
+    echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+
+fi
+
+   ;;
+
   *)
     echo "$as_me:$LINENO: checking for shl_load" >&5
 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
@@ -9190,21 +9514,28 @@ if test "${ac_cv_func_shl_load+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define shl_load innocuous_shl_load
+
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char shl_load (); below.
     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
     <limits.h> exists even on freestanding compilers.  */
+
 #ifdef __STDC__
 # include <limits.h>
 #else
 # include <assert.h>
 #endif
+
+#undef shl_load
+
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
@@ -9235,11 +9566,21 @@ return f != shl_load;
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -9252,7 +9593,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 ac_cv_func_shl_load=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
 fi
 echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
 echo "${ECHO_T}$ac_cv_func_shl_load" >&6
@@ -9267,7 +9609,6 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldld  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -9291,11 +9632,21 @@ shl_load ();
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -9308,7 +9659,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 ac_cv_lib_dld_shl_load=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
@@ -9322,21 +9674,28 @@ if test "${ac_cv_func_dlopen+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define dlopen innocuous_dlopen
+
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dlopen (); below.
     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
     <limits.h> exists even on freestanding compilers.  */
+
 #ifdef __STDC__
 # include <limits.h>
 #else
 # include <assert.h>
 #endif
+
+#undef dlopen
+
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
@@ -9367,11 +9726,21 @@ return f != dlopen;
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -9384,7 +9753,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 ac_cv_func_dlopen=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
 fi
 echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
 echo "${ECHO_T}$ac_cv_func_dlopen" >&6
@@ -9399,7 +9769,6 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldl  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -9423,11 +9792,21 @@ dlopen ();
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -9440,7 +9819,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 ac_cv_lib_dl_dlopen=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
@@ -9456,7 +9836,6 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lsvld  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -9480,11 +9859,21 @@ dlopen ();
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -9497,7 +9886,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 ac_cv_lib_svld_dlopen=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
 echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
@@ -9513,7 +9903,6 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldld  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -9537,11 +9926,21 @@ dld_link ();
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -9554,7 +9953,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 ac_cv_lib_dld_dld_link=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
@@ -9609,7 +10009,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 9612 "configure"
+#line 10012 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -9707,7 +10107,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 9710 "configure"
+#line 10110 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -9832,11 +10232,11 @@ aix3*)
   fi
   ;;
 
-aix4*)
+aix4* | aix5*)
   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
     test "$enable_shared" = yes && enable_static=no
   fi
-  ;;
+    ;;
 esac
 echo "$as_me:$LINENO: result: $enable_shared" >&5
 echo "${ECHO_T}$enable_shared" >&6
@@ -9853,10 +10253,16 @@ echo "${ECHO_T}$enable_static" >&6
 # with your package, and you will get complaints that there are
 # no rules to generate ltmain.sh.
 if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
   # Now quote all the things that may contain metacharacters while being
   # careful not to overquote the AC_SUBSTed values.  We take copies of the
   # variables and quote the copies for generation of the libtool script.
-  for var in echo old_CC old_CFLAGS AR AR_FLAGS RANLIB LN_S LTCC NM SED SHELL \
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
+    SED SHELL STRIP \
     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
     deplibs_check_method reload_flag reload_cmds need_locks \
@@ -9874,6 +10280,7 @@ if test -f "$ltmain"; then
     export_dynamic_flag_spec \
     thread_safe_flag_spec \
     whole_archive_flag_spec \
+    enable_shared_with_static_runtimes \
     old_archive_cmds \
     old_archive_from_new_cmds \
     predep_objects \
@@ -9890,7 +10297,11 @@ if test -f "$ltmain"; then
     no_undefined_flag \
     export_symbols_cmds \
     hardcode_libdir_flag_spec \
+    hardcode_libdir_flag_spec_ld \
     hardcode_libdir_separator \
+    hardcode_automatic \
+    module_cmds \
+    module_expsym_cmds \
     lt_cv_prog_compiler_c_o \
     exclude_expsyms \
     include_expsyms; do
@@ -9900,6 +10311,8 @@ if test -f "$ltmain"; then
     old_archive_from_new_cmds | \
     archive_cmds | \
     archive_expsym_cmds | \
+    module_cmds | \
+    module_expsym_cmds | \
     old_archive_from_expsyms_cmds | \
     export_symbols_cmds | \
     extract_expsyms_cmds | reload_cmds | finish_cmds | \
@@ -9959,12 +10372,15 @@ echo "$as_me: creating $ofile" >&6;}
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 
+# A sed program that does not truncate output.
+SED=$lt_SED
+
 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="sed -e s/^X//"
+Xsed="$SED -e s/^X//"
 
 # The HP-UX ksh and POSIX shell print the target directory to stdout
 # if CDPATH is set.
-if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
 # The names of the tagged configurations supported by this script.
 available_tags=
@@ -9985,6 +10401,9 @@ build_old_libs=$enable_static
 # Whether or not to add -lc for building shared libraries.
 build_libtool_need_lc=$archive_cmds_need_lc
 
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
 # Whether or not to optimize for fast installation.
 fast_install=$enable_fast_install
 
@@ -10008,6 +10427,9 @@ CC=$lt_compiler
 # Is the compiler the GNU C compiler?
 with_gcc=$GCC
 
+# An ERE matcher.
+EGREP=$lt_EGREP
+
 # The linker used to build libraries.
 LD=$lt_LD
 
@@ -10017,11 +10439,8 @@ LN_S=$lt_LN_S
 # A BSD-compatible nm program.
 NM=$lt_NM
 
-# A sed program that does not truncate output.
-SED=$lt_SED
-
 # A symbol stripping program
-STRIP=$STRIP
+STRIP=$lt_STRIP
 
 # Used to examine libraries when file_magic_cmd begins "file"
 MAGIC_CMD=$MAGIC_CMD
@@ -10051,6 +10470,9 @@ objext="$ac_objext"
 # Old archive suffix (normally "a").
 libext="$libext"
 
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
 # Executable file suffix (normally "").
 exeext="$exeext"
 
@@ -10128,6 +10550,10 @@ archive_expsym_cmds=$lt_archive_expsym_cmds
 postinstall_cmds=$lt_postinstall_cmds
 postuninstall_cmds=$lt_postuninstall_cmds
 
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
 # Commands to strip libraries.
 old_striplib=$lt_old_striplib
 striplib=$lt_striplib
@@ -10198,10 +10624,15 @@ hardcode_into_libs=$hardcode_into_libs
 # This must work even if \$libdir does not exist.
 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
 
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
+
 # Whether we need a single -rpath flag with a separated argument.
 hardcode_libdir_separator=$lt_hardcode_libdir_separator
 
-# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
 # resulting binary.
 hardcode_direct=$hardcode_direct
 
@@ -10213,6 +10644,10 @@ hardcode_minus_L=$hardcode_minus_L
 # the resulting binary.
 hardcode_shlibpath_var=$hardcode_shlibpath_var
 
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic
+
 # Variables whose values should be saved in libtool wrapper scripts and
 # restored at relink time.
 variables_saved_for_relink="$variables_saved_for_relink"
@@ -10262,187 +10697,6 @@ if test "X${COLLECT_NAMES+set}" != Xset; then
 fi
 EOF
     ;;
-
-  cygwin* | mingw* | pw32* | os2*)
-    cat <<'EOF' >> "$cfgfile"
-    # This is a source program that is used to create dlls on Windows
-    # Don't remove nor modify the starting and closing comments
-
-# /* ltdll.c starts here */
-# #define WIN32_LEAN_AND_MEAN
-# #include <windows.h>
-# #undef WIN32_LEAN_AND_MEAN
-# #include <stdio.h>
-#
-# #ifndef __CYGWIN__
-# #  ifdef __CYGWIN32__
-# #    define __CYGWIN__ __CYGWIN32__
-# #  endif
-# #endif
-#
-# #ifdef __cplusplus
-# extern "C" {
-# #endif
-# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
-# #ifdef __cplusplus
-# }
-# #endif
-#
-# #ifdef __CYGWIN__
-# #include <cygwin/cygwin_dll.h>
-# DECLARE_CYGWIN_DLL( DllMain );
-# #endif
-# HINSTANCE __hDllInstance_base;
-#
-# BOOL APIENTRY
-# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
-# {
-#   __hDllInstance_base = hInst;
-#   return TRUE;
-# }
-# /* ltdll.c ends here */
-
-    # This is a source program that is used to create import libraries
-    # on Windows for dlls which lack them. Don't remove nor modify the
-    # starting and closing comments
-
-# /* impgen.c starts here */
-# /*   Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
-#
-#  This file is part of GNU libtool.
-#
-#  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
-#  the Free Software Foundation; either version 2 of the License, or
-#  (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  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.
-#  */
-#
-# #include <stdio.h>		/* for printf() */
-# #include <unistd.h>		/* for open(), lseek(), read() */
-# #include <fcntl.h>		/* for O_RDONLY, O_BINARY */
-# #include <string.h>		/* for strdup() */
-#
-# /* O_BINARY isn't required (or even defined sometimes) under Unix */
-# #ifndef O_BINARY
-# #define O_BINARY 0
-# #endif
-#
-# static unsigned int
-# pe_get16 (fd, offset)
-#      int fd;
-#      int offset;
-# {
-#   unsigned char b[2];
-#   lseek (fd, offset, SEEK_SET);
-#   read (fd, b, 2);
-#   return b[0] + (b[1]<<8);
-# }
-#
-# static unsigned int
-# pe_get32 (fd, offset)
-#     int fd;
-#     int offset;
-# {
-#   unsigned char b[4];
-#   lseek (fd, offset, SEEK_SET);
-#   read (fd, b, 4);
-#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
-# }
-#
-# static unsigned int
-# pe_as32 (ptr)
-#      void *ptr;
-# {
-#   unsigned char *b = ptr;
-#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
-# }
-#
-# int
-# main (argc, argv)
-#     int argc;
-#     char *argv[];
-# {
-#     int dll;
-#     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
-#     unsigned long export_rva, export_size, nsections, secptr, expptr;
-#     unsigned long name_rvas, nexp;
-#     unsigned char *expdata, *erva;
-#     char *filename, *dll_name;
-#
-#     filename = argv[1];
-#
-#     dll = open(filename, O_RDONLY|O_BINARY);
-#     if (dll < 1)
-# 	return 1;
-#
-#     dll_name = filename;
-#
-#     for (i=0; filename[i]; i++)
-# 	if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
-# 	    dll_name = filename + i +1;
-#
-#     pe_header_offset = pe_get32 (dll, 0x3c);
-#     opthdr_ofs = pe_header_offset + 4 + 20;
-#     num_entries = pe_get32 (dll, opthdr_ofs + 92);
-#
-#     if (num_entries < 1) /* no exports */
-# 	return 1;
-#
-#     export_rva = pe_get32 (dll, opthdr_ofs + 96);
-#     export_size = pe_get32 (dll, opthdr_ofs + 100);
-#     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
-#     secptr = (pe_header_offset + 4 + 20 +
-# 	      pe_get16 (dll, pe_header_offset + 4 + 16));
-#
-#     expptr = 0;
-#     for (i = 0; i < nsections; i++)
-#     {
-# 	char sname[8];
-# 	unsigned long secptr1 = secptr + 40 * i;
-# 	unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
-# 	unsigned long vsize = pe_get32 (dll, secptr1 + 16);
-# 	unsigned long fptr = pe_get32 (dll, secptr1 + 20);
-# 	lseek(dll, secptr1, SEEK_SET);
-# 	read(dll, sname, 8);
-# 	if (vaddr <= export_rva && vaddr+vsize > export_rva)
-# 	{
-# 	    expptr = fptr + (export_rva - vaddr);
-# 	    if (export_rva + export_size > vaddr + vsize)
-# 		export_size = vsize - (export_rva - vaddr);
-# 	    break;
-# 	}
-#     }
-#
-#     expdata = (unsigned char*)malloc(export_size);
-#     lseek (dll, expptr, SEEK_SET);
-#     read (dll, expdata, export_size);
-#     erva = expdata - export_rva;
-#
-#     nexp = pe_as32 (expdata+24);
-#     name_rvas = pe_as32 (expdata+32);
-#
-#     printf ("EXPORTS\n");
-#     for (i = 0; i<nexp; i++)
-#     {
-# 	unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
-# 	printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
-#     }
-#
-#     return 0;
-# }
-# /* impgen.c ends here */
-
-EOF
-    ;;
   esac
 
   # We use sed instead of cat because bash on DJGPP gets confused if
@@ -10459,15 +10713,18 @@ else
   # If there is no Makefile yet, we rely on a make rule to execute
   # `config.status --recheck' to rerun these tests and create the
   # libtool script then.
-  test -f Makefile && make "$ltmain"
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
 fi
 
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
 CC="$lt_save_CC"
 
@@ -10476,11 +10733,6 @@ CC="$lt_save_CC"
 if test "${with_tags+set}" = set; then
   withval="$with_tags"
   tagnames="$withval"
-else
-  tagnames="CXX,GCJ"
-    case $host_os in
-      mingw*|cygwin*) tagnames="$tagnames,RC" ;;
-    esac
 fi;
 
 if test -f "$ltmain" && test -n "$tagnames"; then
@@ -10502,7 +10754,7 @@ echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
 
   # Extract list of available tagged configurations in $ofile.
   # Note that this assumes the entire list is on one line.
-  available_tags=`grep "^available_tags=" "${ofile}" | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
+  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
 
   lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
   for tagname in $tagnames; do
@@ -10529,7 +10781,10 @@ echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
 
       case $tagname in
       CXX)
-	ac_ext=cc
+	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+	    (test "X$CXX" != "Xg++"))) ; then
+	  ac_ext=cc
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
@@ -10545,12 +10800,17 @@ archive_expsym_cmds_CXX=
 export_dynamic_flag_spec_CXX=
 hardcode_direct_CXX=no
 hardcode_libdir_flag_spec_CXX=
+hardcode_libdir_flag_spec_ld_CXX=
 hardcode_libdir_separator_CXX=
 hardcode_minus_L_CXX=no
+hardcode_automatic_CXX=no
+module_cmds_CXX=
+module_expsym_cmds_CXX=
 link_all_deplibs_CXX=unknown
 old_archive_cmds_CXX=$old_archive_cmds
 no_undefined_flag_CXX=
 whole_archive_flag_spec_CXX=
+enable_shared_with_static_runtimes_CXX=no
 
 # Dependencies to place before and after the object being linked:
 predep_objects_CXX=
@@ -10559,18 +10819,18 @@ predeps_CXX=
 postdeps_CXX=
 compiler_lib_search_path_CXX=
 
-# Source file extension for C test sources.
+# Source file extension for C++ test sources.
 ac_ext=cc
 
-# Object file extension for compiled C test sources.
+# Object file extension for compiled C++ test sources.
 objext=o
 objext_CXX=$objext
 
 # Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;"
+lt_simple_compile_test_code="int some_variable = 0;\n"
 
 # Code to be used in simple link tests
-lt_simple_link_test_code='int main(int char *) { return(0); }'
+lt_simple_link_test_code='int main(int, char *) { return(0); }\n'
 
 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
@@ -10578,15 +10838,29 @@ lt_simple_link_test_code='int main(int char *) { return(0); }'
 LTCC=${LTCC-"$CC"}
 
 # Allow CC to be a program name with arguments.
-set dummy $CC
-compiler="$2"
+compiler=$CC
 
 
 # Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
+lt_save_CC=$CC
+lt_save_LD=$LD
+lt_save_GCC=$GCC
+GCC=$GXX
+lt_save_with_gnu_ld=$with_gnu_ld
+lt_save_path_LD=$lt_cv_path_LD
+if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+else
+  unset lt_cv_prog_gnu_ld
+fi
+if test -n "${lt_cv_path_LDCXX+set}"; then
+  lt_cv_path_LD=$lt_cv_path_LDCXX
+else
+  unset lt_cv_path_LD
+fi
+test -z "${LDCXX+set}" || LD=$LDCXX
 CC=${CXX-"c++"}
-set dummy $CC
-compiler="$2"
+compiler=$CC
 compiler_CXX=$CC
 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
 
@@ -10601,12 +10875,117 @@ fi
 if test "$GXX" = yes; then
   # Set up default GNU C++ configuration
 
+
+# Check whether --with-gnu-ld or --without-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+  withval="$with_gnu_ld"
+  test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi;
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | ?:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  echo "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
+else
+  echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
+fi
+if test "${lt_cv_path_LD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some GNU ld's only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+   { (exit 1); exit 1; }; }
+echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
+if test "${lt_cv_prog_gnu_ld+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
   # Check if GNU C++ uses GNU ld as the underlying linker, since the
   # archiving commands below assume that GNU ld is being used.
-  if eval "`$CC -print-prog-name=ld` --version 2>&1" | \
-      egrep 'GNU ld' > /dev/null; then
-    with_gnu_ld=yes
-
+  if test "$with_gnu_ld" = yes; then
     archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
     archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
@@ -10620,7 +10999,7 @@ if test "$GXX" = yes; then
 
     # ancient GNU ld didn't support --whole-archive et. al.
     if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
-	egrep 'no-whole-archive' > /dev/null; then
+	grep 'no-whole-archive' > /dev/null; then
       whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
     else
       whole_archive_flag_spec_CXX=
@@ -10634,13 +11013,13 @@ if test "$GXX" = 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.
-    archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
   fi
 
   # Commands to make compiler produce verbose output that lists
   # what "hidden" libraries, object files and flags are used when
   # linking a shared library.
-  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
+  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
 
 else
   GXX=no
@@ -10665,8 +11044,22 @@ case $host_os in
       exp_sym_flag='-Bexport'
       no_entry_flag=""
     else
-      # KDE requires run time linking.  Make it the default.
-      aix_use_runtimelinking=yes
+      aix_use_runtimelinking=no
+
+      # Test if we are trying to use run time linking or normal
+      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+      # need to do runtime linking.
+      case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+	for ld_flag in $LDFLAGS; do
+	  case $ld_flag in
+	  *-brtl*)
+	    aix_use_runtimelinking=yes
+	    break
+	    ;;
+	  esac
+	done
+      esac
+
       exp_sym_flag='-bexport'
       no_entry_flag='-bnoentry'
     fi
@@ -10712,22 +11105,22 @@ case $host_os in
 	shared_flag='-G'
       else
 	if test "$aix_use_runtimelinking" = yes; then
-	  shared_flag='-qmkshrobj ${wl}-G'
+	  shared_flag='${wl}-G'
 	else
-	  shared_flag='-qmkshrobj'
+	  shared_flag='${wl}-bM:SRE'
 	fi
       fi
     fi
 
-    # Let the compiler handle the export list.
-    always_export_symbols_CXX=no
+    # It seems that -bexpall does not export symbols beginning with
+    # underscore (_), so it is better to generate a list of symbols to export.
+    always_export_symbols_CXX=yes
     if test "$aix_use_runtimelinking" = yes; then
       # Warning - without using the other runtime loading flags (-brtl),
       # -berok will link without error, but may produce a broken library.
       allow_undefined_flag_CXX='-berok'
       # Determine the default libpath from the value encoded in an empty executable.
       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -10744,34 +11137,44 @@ main ()
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 }'`
 # Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 }'`; fi
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
       hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
 
-      archive_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
-      archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+      archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
      else
       if test "$host_cpu" = ia64; then
 	hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
@@ -10780,7 +11183,6 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       else
 	# Determine the default libpath from the value encoded in an empty executable.
 	cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -10797,28 +11199,39 @@ main ()
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 }'`
 # Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 }'`; fi
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
 	hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
@@ -10844,6 +11257,94 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	;;
     esac
     ;;
+
+
+  cygwin* | mingw* | pw32*)
+    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
+    # as there is no search path for DLLs.
+    hardcode_libdir_flag_spec_CXX='-L$libdir'
+    allow_undefined_flag_CXX=unsupported
+    always_export_symbols_CXX=no
+    enable_shared_with_static_runtimes_CXX=yes
+
+    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+      archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -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...
+      archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	cp $export_symbols $output_objdir/$soname.def;
+      else
+	echo EXPORTS > $output_objdir/$soname.def;
+	cat $export_symbols >> $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'
+    else
+      ld_shlibs_CXX=no
+    fi
+  ;;
+      darwin* | rhapsody*)
+        case "$host_os" in
+        rhapsody* | darwin1.[012])
+         allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[012])
+               allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
+        esac
+      archive_cmds_need_lc_CXX=no
+      hardcode_direct_CXX=no
+      hardcode_automatic_CXX=yes
+      hardcode_shlibpath_var_CXX=unsupported
+      whole_archive_flag_spec_CXX=''
+      link_all_deplibs_CXX=yes
+
+    if test "$GXX" = yes ; then
+      lt_int_apple_cc_single_mod=no
+      output_verbose_link_cmd='echo'
+      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
+       lt_int_apple_cc_single_mod=yes
+      fi
+      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+       archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+      else
+          archive_cmds_CXX='$CC -r -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'
+        fi
+        module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $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}'
+          else
+            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -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}'
+          fi
+            module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      else
+      case "$cc_basename" in
+        xlc*)
+         output_verbose_link_cmd='echo'
+          archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+          module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+          archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         ld_shlibs_CXX=no
+          ;;
+      esac
+      fi
+        ;;
+
   dgux*)
     case $cc_basename in
       ec++)
@@ -10868,32 +11369,86 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
   freebsd-elf*)
     archive_cmds_need_lc_CXX=no
     ;;
-  freebsd*)
+  freebsd* | kfreebsd*-gnu)
     # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
     # conventions
     ld_shlibs_CXX=yes
     ;;
   gnu*)
     ;;
-  hpux*)
+  hpux9*)
+    hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+    hardcode_libdir_separator_CXX=:
+    export_dynamic_flag_spec_CXX='${wl}-E'
+    hardcode_direct_CXX=yes
+    hardcode_minus_L_CXX=yes # Not in the search PATH,
+				# but as the default
+				# location of the library.
+
+    case $cc_basename in
+    CC)
+      # FIXME: insert proper C++ library support
+      ld_shlibs_CXX=no
+      ;;
+    aCC)
+      archive_cmds_CXX='$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'
+      # Commands to make compiler produce verbose output that lists
+      # what "hidden" libraries, object files and flags are used when
+      # linking a shared library.
+      #
+      # There doesn't appear to be a way to prevent this compiler from
+      # explicitly linking system object files so we need to strip them
+      # from the output so that they don't get included in the library
+      # dependencies.
+      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+      ;;
+    *)
+      if test "$GXX" = yes; then
+        archive_cmds_CXX='$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'
+      else
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+      fi
+      ;;
+    esac
+    ;;
+  hpux10*|hpux11*)
     if test $with_gnu_ld = no; then
-      if test "$host_cpu" = ia64; then
+      case "$host_cpu" in
+      hppa*64*)
+	hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+	hardcode_libdir_flag_spec_ld_CXX='+b $libdir'
+	hardcode_libdir_separator_CXX=:
+        ;;
+      ia64*)
 	hardcode_libdir_flag_spec_CXX='-L$libdir'
-      else
+        ;;
+      *)
 	hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
 	hardcode_libdir_separator_CXX=:
 	export_dynamic_flag_spec_CXX='${wl}-E'
-      fi
+        ;;
+      esac
     fi
-    if test "$host_cpu" = ia64; then
+    case "$host_cpu" in
+    hppa*64*)
       hardcode_direct_CXX=no
       hardcode_shlibpath_var_CXX=no
-    else
+      ;;
+    ia64*)
+      hardcode_direct_CXX=no
+      hardcode_shlibpath_var_CXX=no
+      hardcode_minus_L_CXX=yes # Not in the search PATH,
+					      # but as the default
+					      # location of the library.
+      ;;
+    *)
       hardcode_direct_CXX=yes
-    fi
-    hardcode_minus_L_CXX=yes # Not in the search PATH,
-					    # but as the default
-					    # location of the library.
+      hardcode_minus_L_CXX=yes # Not in the search PATH,
+					      # but as the default
+					      # location of the library.
+      ;;
+    esac
 
     case $cc_basename in
       CC)
@@ -10901,16 +11456,12 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	ld_shlibs_CXX=no
 	;;
       aCC)
-	case $host_os in
-	hpux9*)
-	  archive_cmds_CXX='$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'
+	case "$host_cpu" in
+	hppa*64*|ia64*)
+	  archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
 	  ;;
 	*)
-	  if test "$host_cpu" = ia64; then
-	    archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
-	  else
-	    archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	  fi
+	  archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	  ;;
 	esac
 	# Commands to make compiler produce verbose output that lists
@@ -10921,21 +11472,17 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	# explicitly linking system object files so we need to strip them
 	# from the output so that they don't get included in the library
 	# dependencies.
-	output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 	;;
       *)
 	if test "$GXX" = yes; then
 	  if test $with_gnu_ld = no; then
-	    case $host_os in
-	    hpux9*)
-	      archive_cmds_CXX='$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'
+	    case "$host_cpu" in
+	    ia64*|hppa*64*)
+	      archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
 	      ;;
 	    *)
-	      if test "$host_cpu" = ia64; then
-		archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
-	      else
-		archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	      fi
+	      archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	      ;;
 	    esac
 	  fi
@@ -10963,7 +11510,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	  if test "$with_gnu_ld" = no; then
 	    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
 	  else
-	    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
+	    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
 	  fi
 	fi
 	link_all_deplibs_CXX=yes
@@ -10980,9 +11527,8 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	# KCC will only create a shared library if the output file
 	# ends with ".so" (or ".sl" for HP-UX), so rename the library
 	# to its proper name (with version) after linking.
-	archive_cmds_CXX='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-	archive_expsym_cmds_CXX='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
-
+	archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
 	# Commands to make compiler produce verbose output that lists
 	# what "hidden" libraries, object files and flags are used when
 	# linking a shared library.
@@ -10991,7 +11537,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	# explicitly linking system object files so we need to strip them
 	# from the output so that they don't get included in the library
 	# dependencies.
-	output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
 	hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir'
 	export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
@@ -11000,6 +11546,27 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
 	old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
 	;;
+      icpc)
+	# Intel C++
+	with_gnu_ld=yes
+	# version 8.0 and above of icpc choke on multiply defined symbols
+	# if we add $predep_objects and $postdep_objects, however 7.1 and
+	# earlier do not add the objects themselves.
+	case `$CC -V 2>&1` in
+	*"Version 7."*)
+  	  archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+  	  archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  ;;
+	*)  # Version 8.0 or newer
+  	  archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+  	archive_expsym_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  ;;
+	esac
+	archive_cmds_need_lc_CXX=no
+	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+	whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	;;
       cxx)
 	# Compaq C++
 	archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
@@ -11017,7 +11584,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	# explicitly linking system object files so we need to strip them
 	# from the output so that they don't get included in the library
 	# dependencies.
-	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 	;;
     esac
     ;;
@@ -11042,7 +11609,31 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
     esac
     ;;
   netbsd*)
-    # NetBSD uses g++ - do we need to do anything?
+    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+      archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+      wlarc=
+      hardcode_libdir_flag_spec_CXX='-R$libdir'
+      hardcode_direct_CXX=yes
+      hardcode_shlibpath_var_CXX=no
+    fi
+    # Workaround some broken pre-1.5 toolchains
+    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+    ;;
+  openbsd2*)
+    # C++ shared libraries are fairly broken
+    ld_shlibs_CXX=no
+    ;;
+  openbsd*)
+    hardcode_direct_CXX=yes
+    hardcode_shlibpath_var_CXX=no
+    archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+      archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+      export_dynamic_flag_spec_CXX='${wl}-E'
+      whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    fi
+    output_verbose_link_cmd='echo'
     ;;
   osf3*)
     case $cc_basename in
@@ -11052,7 +11643,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	# KCC will only create a shared library if the output file
 	# ends with ".so" (or ".sl" for HP-UX), so rename the library
 	# to its proper name (with version) after linking.
-	archive_cmds_CXX='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
 	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
 	hardcode_libdir_separator_CXX=:
@@ -11082,7 +11673,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	# explicitly linking system object files so we need to strip them
 	# from the output so that they don't get included in the library
 	# dependencies.
-	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 	;;
       *)
 	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
@@ -11095,7 +11686,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	  # Commands to make compiler produce verbose output that lists
 	  # what "hidden" libraries, object files and flags are used when
 	  # linking a shared library.
-	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
+	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
 
 	else
 	  # FIXME: insert proper C++ library support
@@ -11112,7 +11703,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	# KCC will only create a shared library if the output file
 	# ends with ".so" (or ".sl" for HP-UX), so rename the library
 	# to its proper name (with version) after linking.
-	archive_cmds_CXX='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
 	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
 	hardcode_libdir_separator_CXX=:
@@ -11129,7 +11720,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       cxx)
 	allow_undefined_flag_CXX=' -expect_unresolved \*'
 	archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
-	archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done~
+	archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
 	  echo "-hidden">> $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 "$verstring" && echo -set_version	$verstring` -update_registry $objdir/so_locations -o $lib~
 	  $rm $lib.exp'
@@ -11145,7 +11736,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	# explicitly linking system object files so we need to strip them
 	# from the output so that they don't get included in the library
 	# dependencies.
-	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 	;;
       *)
 	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
@@ -11158,7 +11749,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	  # Commands to make compiler produce verbose output that lists
 	  # what "hidden" libraries, object files and flags are used when
 	  # linking a shared library.
-	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
+	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
 
 	else
 	  # FIXME: insert proper C++ library support
@@ -11208,7 +11799,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	# Sun C++ 4.2, 5.x and Centerline C++
 	no_undefined_flag_CXX=' -zdefs'
 	archive_cmds_CXX='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+	archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $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'
 
 	hardcode_libdir_flag_spec_CXX='-R$libdir'
@@ -11233,7 +11824,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	# explicitly linking system object files so we need to strip them
 	# from the output so that they don't get included in the library
 	# dependencies.
-	output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[LR]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
 	# Archives containing C++ object files must be created using
 	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
@@ -11252,26 +11843,26 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	# GNU C++ compiler with Solaris linker
 	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 	  no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
-	  if $CC --version | egrep -v '^2\.7' > /dev/null; then
-	    archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
-	    archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
+	  if $CC --version | grep -v '^2\.7' > /dev/null; then
+	    archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	    archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
 	    # Commands to make compiler produce verbose output that lists
 	    # what "hidden" libraries, object files and flags are used when
 	    # linking a shared library.
-	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
+	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
 	  else
 	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
 	    # platform.
-	    archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
-	    archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
+	    archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	    archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
 	    # Commands to make compiler produce verbose output that lists
 	    # what "hidden" libraries, object files and flags are used when
 	    # linking a shared library.
-	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
+	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
 	  fi
 
 	  hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
@@ -11308,8 +11899,10 @@ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
 echo "${ECHO_T}$ld_shlibs_CXX" >&6
 test "$ld_shlibs_CXX" = no && can_build_shared=no
 
-# Figure out "hidden" C++ library dependencies from verbose
-# compiler output whening linking a shared library.
+GCC_CXX="$GXX"
+LD_CXX="$LD"
+
+
 cat > conftest.$ac_ext <<EOF
 class Foo
 {
@@ -11320,7 +11913,6 @@ private:
 };
 EOF
 
-
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -11376,7 +11968,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
        fi
        ;;
 
-    *.$objext|*.$libext)
+    *.$objext)
        # This assumes that the test object file only shows up
        # once in the compiler output.
        if test "$p" = "conftest.$objext"; then
@@ -11405,21 +11997,17 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   done
 
   # Clean up.
-  rm -f a.out
+  rm -f a.out a.exe
 else
-  echo "libtool.m4: error: problem compiling C++ test program"
+  echo "libtool.m4: error: problem compiling CXX test program"
 fi
 
 $rm -f confest.$objext
 
 case " $postdeps_CXX " in
 *" -lc "*) archive_cmds_need_lc_CXX=no ;;
-*) archive_cmds_need_lc_CXX=yes ;;
 esac
 
-GCC_CXX="$GXX"
-LD_CXX="$LD"
-
 lt_prog_compiler_wl_CXX=
 lt_prog_compiler_pic_CXX=
 lt_prog_compiler_static_CXX=
@@ -11446,10 +12034,10 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
       # like `-m68040'.
       lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
       ;;
-    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
       # PIC is the default for these OSes.
       ;;
-    cygwin* | mingw* | os2*)
+    mingw* | os2* | pw32*)
       # This hack is so that the source file can tell whether it is being
       # built for inclusion in a dll (and should export symbols for example).
       lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
@@ -11469,10 +12057,15 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
       fi
       ;;
     hpux*)
-      # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
-      if test "$host_cpu" != ia64; then
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case "$host_cpu" in
+      hppa*64*|ia64*)
+	;;
+      *)
 	lt_prog_compiler_pic_CXX='-fPIC'
-      fi
+	;;
+      esac
       ;;
     *)
       lt_prog_compiler_pic_CXX='-fPIC'
@@ -11497,6 +12090,16 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
 	  ;;
 	esac
 	;;
+       darwin*)
+         # PIC is the default on this platform
+         # Common symbols not allowed in MH_DYLIB files
+         case "$cc_basename" in
+           xlc*)
+           lt_prog_compiler_pic_CXX='-qnocommon'
+           lt_prog_compiler_wl_CXX='-Wl,'
+           ;;
+         esac
+       ;;
       dgux*)
 	case $cc_basename in
 	  ec++)
@@ -11510,7 +12113,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
 	    ;;
 	esac
 	;;
-      freebsd*)
+      freebsd* | kfreebsd*-gnu)
 	# FreeBSD uses GNU C++
 	;;
       hpux9* | hpux10* | hpux11*)
@@ -11525,9 +12128,14 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
 	  aCC)
 	    lt_prog_compiler_wl_CXX='-Wl,'
 	    lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
-	    if test "$host_cpu" != ia64; then
+	    case "$host_cpu" in
+	    hppa*64*|ia64*)
+	      # +Z the default
+	      ;;
+	    *)
 	      lt_prog_compiler_pic_CXX='+Z'
-	    fi
+	      ;;
+	    esac
 	    ;;
 	  *)
 	    ;;
@@ -11551,6 +12159,12 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
 	    lt_prog_compiler_wl_CXX='--backend -Wl,'
 	    lt_prog_compiler_pic_CXX='-fPIC'
 	    ;;
+	  icpc)
+	    # Intel C++
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-static'
+	    ;;
 	  cxx)
 	    # Compaq C++
 	    # Make sure the PIC flag is empty.  It appears that all Alpha
@@ -11667,28 +12281,38 @@ echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6
 # Check to make sure the PIC flag actually works.
 #
 if test -n "$lt_prog_compiler_pic_CXX"; then
-  echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
+
+echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6
 if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   lt_prog_compiler_pic_works_CXX=no
   ac_outfile=conftest.$ac_objext
-   save_CFLAGS="$CFLAGS"
-   CFLAGS="$CFLAGS $lt_prog_compiler_pic_CXX -DPIC"
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   if (eval $ac_compile 2>conftest.err) && test -s $ac_outfile; then
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:12303: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:12307: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
-     if test -s conftest.err; then
-       # Append any errors to the config.log.
-       cat conftest.err 1>&5
-     else
+     if test ! -s conftest.err; then
        lt_prog_compiler_pic_works_CXX=yes
      fi
    fi
    $rm conftest*
-   CFLAGS="$save_CFLAGS"
 
 fi
 echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5
@@ -11725,32 +12349,36 @@ else
    mkdir conftest
    cd conftest
    mkdir out
-   save_CXXFLAGS="$CXXFLAGS"
-		   CXXFLAGS="$CXXFLAGS -o out/conftest2.$ac_objext"
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-   # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
-   # that will create temporary files in the current directory regardless of
-   # the output directory.  Thus, making CWD read-only will cause this test
-   # to fail, enabling locking or at least warning the user not to do parallel
-   # builds.
-   chmod -w .
-
-   if (eval $ac_compile 2>out/conftest.err) && test -s out/conftest2.$ac_objext
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:12363: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:12367: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
-     if test -s out/conftest.err; then
-       # Append any errors to the config.log.
-       cat out/conftest.err 1>&5
-     else
+     if test ! -s out/conftest.err; then
        lt_cv_prog_compiler_c_o_CXX=yes
      fi
    fi
-   CXXFLAGS="$save_CXXFLAGS"
    chmod u+w .
-   $rm conftest* out/*
-   rmdir out
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
    cd ..
    rmdir conftest
    $rm conftest*
@@ -11785,22 +12413,25 @@ fi
 echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
 
-  export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
   case $host_os in
   aix4* | aix5*)
     # If we're using GNU nm, then we don't want the "-C" option.
     # -C means demangle to AIX nm, but means don't demangle with GNU nm
-    if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
+    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
       export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
     else
       export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
     fi
     ;;
-  cygwin* | mingw* | pw32*)
+  pw32*)
     export_symbols_cmds_CXX="$ltdll_cmds"
   ;;
+  cygwin* | mingw*)
+    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
   *)
-    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
+    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
   ;;
   esac
 
@@ -11816,114 +12447,71 @@ fi
 #
 # Do we need to explicitly link libc?
 #
-archive_cmds_need_lc_CXX=yes
-if test "$enable_shared" = yes && test "$GCC" = yes; then
-  case $archive_cmds_CXX in
-  *'~'*)
-    # FIXME: we may have to deal with multi-command sequences.
-    ;;
-  '$CC '*)
-    # Test whether the compiler implicitly links with -lc since on some
-    # systems, -lgcc has to come before -lc. If gcc already passes -lc
-    # to ld, don't add -lc before -lgcc.
-    echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+case "x$archive_cmds_need_lc_CXX" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc_CXX=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds_CXX in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
-    $rm conftest*
-    echo 'static int dummy;' > conftest.$ac_ext
+      $rm conftest*
+      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
-    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } 2>conftest.err; then
-      soname=conftest
-      lib=conftest
-      libobjs=conftest.$ac_objext
-      deplibs=
-      wl=$lt_prog_compiler_wl_CXX
-      compiler_flags=-v
-      linker_flags=-v
-      verstring=
-      output_objdir=.
-      libname=conftest
-      lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
-      allow_undefined_flag_CXX=
-      if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl_CXX
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
+        allow_undefined_flag_CXX=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
   (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
-      then
-	archive_cmds_need_lc_CXX=no
+        then
+	  archive_cmds_need_lc_CXX=no
+        else
+	  archive_cmds_need_lc_CXX=yes
+        fi
+        allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
       else
-	archive_cmds_need_lc_CXX=yes
+        cat conftest.err 1>&5
       fi
-      allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
-    else
-      cat conftest.err 1>&5
-    fi
-    $rm conftest*
-    echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5
+      $rm conftest*
+      echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5
 echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6
-    ;;
-  esac
-fi
-
-echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
-hardcode_action_CXX=
-if test -n "$hardcode_libdir_flag_spec_CXX" || \
-   test -n "$runpath_var CXX"; then
-
-  # We can hardcode non-existant directories.
-  if test "$hardcode_direct_CXX" != no &&
-     # If the only mechanism to avoid hardcoding is shlibpath_var, we
-     # have to relink, otherwise we might link with an installed library
-     # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
-     test "$hardcode_minus_L_CXX" != no; then
-    # Linking always hardcodes the temporary library directory.
-    hardcode_action_CXX=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    hardcode_action_CXX=immediate
+      ;;
+    esac
   fi
-else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  hardcode_action_CXX=unsupported
-fi
-echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5
-echo "${ECHO_T}$hardcode_action_CXX" >&6
-
-if test "$hardcode_action_CXX" = relink; then
-  # Fast installation is not supported
-  enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
-  # Fast installation is not necessary
-  enable_fast_install=needless
-fi
-
-striplib=
-old_striplib=
-echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
-echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
-if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
-  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
-  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
-  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
+  ;;
+esac
 
 echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
 library_names_spec=
 libname_spec='lib$name'
 soname_spec=
+shrext_cmds=".so"
 postinstall_cmds=
 postuninstall_cmds=
 finish_cmds=
@@ -11933,7 +12521,20 @@ shlibpath_overrides_runpath=unknown
 version_type=none
 dynamic_linker="$host_os ld.so"
 sys_lib_dlsearch_path_spec="/lib /usr/lib"
-sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+if test "$GCC" = yes; then
+  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
 need_lib_prefix=unknown
 hardcode_into_libs=no
 
@@ -11944,18 +12545,21 @@ need_version=unknown
 case $host_os in
 aix3*)
   version_type=linux
-  library_names_spec='${libname}${release}.so$versuffix $libname.a'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
   shlibpath_var=LIBPATH
 
   # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}.so$major'
+  soname_spec='${libname}${release}${shared_ext}$major'
   ;;
 
 aix4* | aix5*)
   version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
   if test "$host_cpu" = ia64; then
     # AIX 5 supports IA64
-    library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
     shlibpath_var=LD_LIBRARY_PATH
   else
     # With GCC up to 2.95.x, collect2 would create an import file
@@ -11981,12 +12585,12 @@ aix4* | aix5*)
       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
       # instead of lib<name>.a to let people know that these are not
       # typical AIX shared libraries.
-      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
     else
       # We preserve .a as extension for shared libraries through AIX4.2
       # and later when we are not doing run time linking.
       library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}.so$major'
+      soname_spec='${libname}${release}${shared_ext}$major'
     fi
     shlibpath_var=LIBPATH
   fi
@@ -11995,20 +12599,20 @@ aix4* | aix5*)
 amigaos*)
   library_names_spec='$libname.ixlibrary $libname.a'
   # Create ${libname}_ixlibrary.a entries in /sys/libs.
-  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
+  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
   ;;
 
 beos*)
-  library_names_spec='${libname}.so'
+  library_names_spec='${libname}${shared_ext}'
   dynamic_linker="$host_os ld.so"
   shlibpath_var=LIBRARY_PATH
   ;;
 
-bsdi4*)
+bsdi[45]*)
   version_type=linux
   need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
@@ -12020,41 +12624,79 @@ bsdi4*)
 
 cygwin* | mingw* | pw32*)
   version_type=windows
+  shrext_cmds=".dll"
   need_version=no
   need_lib_prefix=no
+
   case $GCC,$host_os in
-  yes,cygwin*)
+  yes,cygwin* | yes,mingw* | yes,pw32*)
     library_names_spec='$libname.dll.a'
-    sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
-    soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
-    postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
       dldir=$destdir/`dirname \$dlpath`~
       test -d \$dldir || mkdir -p \$dldir~
-      $install_prog .libs/$dlname \$dldir/$dlname'
-    postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      $install_prog $dir/$dlname \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
       dlpath=$dir/\$dldll~
        $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
     ;;
-  yes,mingw*)
-    library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
-    sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://"`
-    if echo "$sys_lib_search_path_spec" | egrep ';[C-Z]:/' >/dev/null; then
-      # It is most probably a Windows format PATH printed by
-      # mingw gcc, but we are running on Cygwin. Gcc prints its search
-      # path with ; separators, and with drive letters. We can handle the
-      # drive letters (cygwin fileutils understands them), so leave them,
-      # especially as we might pass files found there to a mingw objdump,
-      # which wouldn't understand a cygwinified path. Ahh.
-      sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'`
+
+  linux*)
+    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      supports_anon_versioning=no
+      case `$LD -v 2>/dev/null` in
+        *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+        *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+        *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+        *\ 2.11.*) ;; # other 2.11 versions
+        *) supports_anon_versioning=yes ;;
+      esac
+      if test $supports_anon_versioning = yes; then
+        archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
+cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+$echo "local: *; };" >> $output_objdir/$libname.ver~
+        $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+      else
+        $archive_expsym_cmds="$archive_cmds"
+      fi
     else
-      sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed  -e "s/$PATH_SEPARATOR/ /g"`
+      ld_shlibs=no
     fi
     ;;
-  yes,pw32*)
-    library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
-    ;;
+
   *)
-    library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
     ;;
   esac
   dynamic_linker='Win32 ld.exe'
@@ -12067,21 +12709,26 @@ darwin* | rhapsody*)
   version_type=darwin
   need_lib_prefix=no
   need_version=no
-  # FIXME: Relying on posixy $() will cause problems for
-  #        cross-compilation, but unfortunately the echo tests do not
-  #        yet detect zsh echo's removal of \ escapes.
-  library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
-  soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
+  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+  if test "$GCC" = yes; then
+    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+  else
+    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+  fi
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
   ;;
 
 dgux*)
   version_type=linux
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
@@ -12089,17 +12736,29 @@ freebsd1*)
   dynamic_linker=no
   ;;
 
+kfreebsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
 freebsd*)
   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
   version_type=freebsd-$objformat
   case $version_type in
     freebsd-elf*)
-      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
       need_version=no
       need_lib_prefix=no
       ;;
     freebsd-*)
-      library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
       need_version=yes
       ;;
   esac
@@ -12123,8 +12782,8 @@ gnu*)
   version_type=linux
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
-  soname_spec='${libname}${release}.so$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
   hardcode_into_libs=yes
   ;;
@@ -12135,26 +12794,42 @@ hpux9* | hpux10* | hpux11*)
   version_type=sunos
   need_lib_prefix=no
   need_version=no
-  if test "$host_cpu" = ia64; then
+  case "$host_cpu" in
+  ia64*)
+    shrext_cmds='.so'
     hardcode_into_libs=yes
     dynamic_linker="$host_os dld.so"
     shlibpath_var=LD_LIBRARY_PATH
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-    soname_spec='${libname}${release}.so$major'
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
     if test "X$HPUX_IA64_MODE" = X32; then
       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
     else
       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
     fi
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-  else
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
     dynamic_linker="$host_os dld.sl"
     shlibpath_var=SHLIB_PATH
     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
-    soname_spec='${libname}${release}.sl$major'
-  fi
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
   # HP-UX runs *really* slowly unless shared libraries are mode 555.
   postinstall_cmds='chmod 555 $lib'
   ;;
@@ -12162,21 +12837,29 @@ hpux9* | hpux10* | hpux11*)
 irix5* | irix6* | nonstopux*)
   case $host_os in
     nonstopux*) version_type=nonstopux ;;
-    *)          version_type=irix ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
   esac
   need_lib_prefix=no
   need_version=no
-  soname_spec='${libname}${release}.so$major'
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
   case $host_os in
   irix5* | nonstopux*)
     libsuff= shlibsuff=
     ;;
   *)
     case $LD in # libtool.m4 will add one of these switches to LD
-    *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
-    *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
-    *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
     *) libsuff= shlibsuff= libmagic=never-match;;
     esac
     ;;
@@ -12185,6 +12868,7 @@ irix5* | irix6* | nonstopux*)
   shlibpath_overrides_runpath=no
   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
   ;;
 
 # No shared lib support for Linux oldld, aout, or coff.
@@ -12197,25 +12881,29 @@ linux*)
   version_type=linux
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
-  libsuff=
-  if test "x$LINUX_64_MODE" = x64; then
-    # Some platforms are per default 64-bit, so there's no /lib64
-    if test -d /lib64; then
-      libsuff=64
-    fi
-  fi
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
-  sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
-  sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
   # This implies no fast_install, which is unacceptable.
   # Some rework will be needed to allow for fast_install
   # before this can be enabled.
   hardcode_into_libs=yes
 
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+  fi
+
+  case $host_cpu:$lt_cv_cc_64bit_output in
+  powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
+    sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/X11R6/lib64"
+    sys_lib_search_path_spec="/lib64 /usr/lib64 /usr/local/lib64 /usr/X11R6/lib64"
+    ;;
+  esac
+
   # We used to test for /lib/ld.so.1 and disable shared libraries on
   # powerpc, because MkLinux only supported shared libraries with the
   # GNU dynamic linker.  Since this was broken with cross compilers,
@@ -12223,6 +12911,42 @@ linux*)
   # people can always --disable-shared, the test was removed, and we
   # assume the GNU/Linux dynamic linker is in use.
   dynamic_linker='GNU/Linux ld.so'
+
+  # Find out which ABI we are using (multilib Linux x86_64 hack).
+  libsuff=
+  case "$host_cpu" in
+  x86_64*)
+    echo '#line 12919 "configure"' > conftest.$ac_ext
+    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+      case `/usr/bin/file conftest.$ac_objext` in
+      *64-bit*)
+        libsuff=64
+        ;;
+      esac
+    fi
+    rm -rf conftest*
+    ;;
+  *)
+    ;;
+  esac
+  sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
+  sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+  ;;
+
+knetbsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
   ;;
 
 netbsd*)
@@ -12230,12 +12954,12 @@ netbsd*)
   need_lib_prefix=no
   need_version=no
   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
     dynamic_linker='NetBSD (a.out) ld.so'
   else
-    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
-    soname_spec='${libname}${release}.so$major'
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
     dynamic_linker='NetBSD ld.elf_so'
   fi
   shlibpath_var=LD_LIBRARY_PATH
@@ -12245,17 +12969,17 @@ netbsd*)
 
 newsos6)
   version_type=linux
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   ;;
 
-nto-qnx)
+nto-qnx*)
   version_type=linux
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   ;;
@@ -12264,7 +12988,7 @@ openbsd*)
   version_type=sunos
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
@@ -12283,8 +13007,9 @@ openbsd*)
 
 os2*)
   libname_spec='$name'
+  shrext_cmds=".dll"
   need_lib_prefix=no
-  library_names_spec='$libname.dll $libname.a'
+  library_names_spec='$libname${shared_ext} $libname.a'
   dynamic_linker='OS/2 ld.exe'
   shlibpath_var=LIBPATH
   ;;
@@ -12293,8 +13018,8 @@ osf3* | osf4* | osf5*)
   version_type=osf
   need_lib_prefix=no
   need_version=no
-  soname_spec='${libname}${release}.so'
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
@@ -12302,8 +13027,8 @@ osf3* | osf4* | osf5*)
 
 sco3.2v5*)
   version_type=osf
-  soname_spec='${libname}${release}.so$major'
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
@@ -12311,8 +13036,8 @@ solaris*)
   version_type=linux
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   hardcode_into_libs=yes
@@ -12322,7 +13047,7 @@ solaris*)
 
 sunos4*)
   version_type=sunos
-  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
@@ -12334,12 +13059,18 @@ sunos4*)
 
 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
   version_type=linux
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
   case $host_vendor in
     sni)
       shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
       ;;
     motorola)
       need_lib_prefix=no
@@ -12353,16 +13084,16 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 sysv4*MP*)
   if test -d /usr/nec ;then
     version_type=linux
-    library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
-    soname_spec='$libname.so.$major'
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
     shlibpath_var=LD_LIBRARY_PATH
   fi
   ;;
 
 uts4*)
   version_type=linux
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
@@ -12374,6 +13105,72 @@ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
 echo "${ECHO_T}$dynamic_linker" >&6
 test "$dynamic_linker" = no && can_build_shared=no
 
+echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
+hardcode_action_CXX=
+if test -n "$hardcode_libdir_flag_spec_CXX" || \
+   test -n "$runpath_var_CXX" || \
+   test "X$hardcode_automatic_CXX" = "Xyes" ; then
+
+  # We can hardcode non-existant directories.
+  if test "$hardcode_direct_CXX" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
+     test "$hardcode_minus_L_CXX" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action_CXX=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action_CXX=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action_CXX=unsupported
+fi
+echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5
+echo "${ECHO_T}$hardcode_action_CXX" >&6
+
+if test "$hardcode_action_CXX" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+striplib=
+old_striplib=
+echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+   darwin*)
+       if test -n "$STRIP" ; then
+         striplib="$STRIP -x"
+         echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+       else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+       ;;
+   *)
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+    ;;
+  esac
+fi
+
 if test "x$enable_dlopen" != xyes; then
   enable_dlopen=unknown
   enable_dlopen_self=unknown
@@ -12389,87 +13186,188 @@ else
     lt_cv_dlopen_self=yes
     ;;
 
-  cygwin* | mingw* | pw32*)
+  mingw* | pw32*)
     lt_cv_dlopen="LoadLibrary"
     lt_cv_dlopen_libs=
    ;;
 
-  *)
-    echo "$as_me:$LINENO: checking for shl_load" >&5
-echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
-if test "${ac_cv_func_shl_load+set}" = set; then
+  cygwin*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+   ;;
+
+  darwin*)
+  # if libdl is installed we need to link against it
+    echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char shl_load (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
-{
 #endif
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
-char shl_load ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_shl_load) || defined (__stub___shl_load)
-choke me
-#else
-char (*f) () = shl_load;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
+char dlopen ();
 int
 main ()
 {
-return f != shl_load;
+dlopen ();
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_func_shl_load=yes
+  ac_cv_lib_dl_dlopen=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_func_shl_load=no
+ac_cv_lib_dl_dlopen=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
-echo "${ECHO_T}$ac_cv_func_shl_load" >&6
-if test $ac_cv_func_shl_load = yes; then
-  lt_cv_dlopen="shl_load"
-else
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+
+fi
+
+   ;;
+
+  *)
+    echo "$as_me:$LINENO: checking for shl_load" >&5
+echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
+if test "${ac_cv_func_shl_load+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define shl_load innocuous_shl_load
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char shl_load (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef shl_load
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char shl_load ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_shl_load) || defined (__stub___shl_load)
+choke me
+#else
+char (*f) () = shl_load;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != shl_load;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_shl_load=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_shl_load=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
+echo "${ECHO_T}$ac_cv_func_shl_load" >&6
+if test $ac_cv_func_shl_load = yes; then
+  lt_cv_dlopen="shl_load"
+else
   echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
 if test "${ac_cv_lib_dld_shl_load+set}" = set; then
@@ -12478,7 +13376,6 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldld  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -12502,11 +13399,21 @@ shl_load ();
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -12519,7 +13426,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 ac_cv_lib_dld_shl_load=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
@@ -12533,21 +13441,28 @@ if test "${ac_cv_func_dlopen+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define dlopen innocuous_dlopen
+
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dlopen (); below.
     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
     <limits.h> exists even on freestanding compilers.  */
+
 #ifdef __STDC__
 # include <limits.h>
 #else
 # include <assert.h>
 #endif
+
+#undef dlopen
+
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
@@ -12578,11 +13493,21 @@ return f != dlopen;
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -12595,7 +13520,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 ac_cv_func_dlopen=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
 fi
 echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
 echo "${ECHO_T}$ac_cv_func_dlopen" >&6
@@ -12610,7 +13536,6 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldl  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -12634,11 +13559,21 @@ dlopen ();
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -12651,7 +13586,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 ac_cv_lib_dl_dlopen=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
@@ -12667,7 +13603,6 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lsvld  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -12691,11 +13626,21 @@ dlopen ();
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -12708,7 +13653,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 ac_cv_lib_svld_dlopen=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
 echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
@@ -12724,7 +13670,6 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldld  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -12748,11 +13693,21 @@ dld_link ();
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -12765,7 +13720,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 ac_cv_lib_dld_dld_link=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
@@ -12820,7 +13776,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 12823 "configure"
+#line 13779 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12918,7 +13874,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 12921 "configure"
+#line 13877 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13027,10 +13983,16 @@ fi
 # with your package, and you will get complaints that there are
 # no rules to generate ltmain.sh.
 if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
   # Now quote all the things that may contain metacharacters while being
   # careful not to overquote the AC_SUBSTed values.  We take copies of the
   # variables and quote the copies for generation of the libtool script.
-  for var in echo old_CC old_CFLAGS AR AR_FLAGS RANLIB LN_S LTCC NM SED SHELL \
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
+    SED SHELL STRIP \
     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
     deplibs_check_method reload_flag reload_cmds need_locks \
@@ -13048,6 +14010,7 @@ if test -f "$ltmain"; then
     export_dynamic_flag_spec_CXX \
     thread_safe_flag_spec_CXX \
     whole_archive_flag_spec_CXX \
+    enable_shared_with_static_runtimes_CXX \
     old_archive_cmds_CXX \
     old_archive_from_new_cmds_CXX \
     predep_objects_CXX \
@@ -13064,7 +14027,11 @@ if test -f "$ltmain"; then
     no_undefined_flag_CXX \
     export_symbols_cmds_CXX \
     hardcode_libdir_flag_spec_CXX \
+    hardcode_libdir_flag_spec_ld_CXX \
     hardcode_libdir_separator_CXX \
+    hardcode_automatic_CXX \
+    module_cmds_CXX \
+    module_expsym_cmds_CXX \
     lt_cv_prog_compiler_c_o_CXX \
     exclude_expsyms_CXX \
     include_expsyms_CXX; do
@@ -13074,6 +14041,8 @@ if test -f "$ltmain"; then
     old_archive_from_new_cmds_CXX | \
     archive_cmds_CXX | \
     archive_expsym_cmds_CXX | \
+    module_cmds_CXX | \
+    module_expsym_cmds_CXX | \
     old_archive_from_expsyms_cmds_CXX | \
     export_symbols_cmds_CXX | \
     extract_expsyms_cmds | reload_cmds | finish_cmds | \
@@ -13114,6 +14083,9 @@ build_old_libs=$enable_static
 # Whether or not to add -lc for building shared libraries.
 build_libtool_need_lc=$archive_cmds_need_lc_CXX
 
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
+
 # Whether or not to optimize for fast installation.
 fast_install=$enable_fast_install
 
@@ -13137,6 +14109,9 @@ CC=$lt_compiler_CXX
 # Is the compiler the GNU C compiler?
 with_gcc=$GCC_CXX
 
+# An ERE matcher.
+EGREP=$lt_EGREP
+
 # The linker used to build libraries.
 LD=$lt_LD_CXX
 
@@ -13146,11 +14121,8 @@ LN_S=$lt_LN_S
 # A BSD-compatible nm program.
 NM=$lt_NM
 
-# A sed program that does not truncate output.
-SED=$lt_SED
-
 # A symbol stripping program
-STRIP=$STRIP
+STRIP=$lt_STRIP
 
 # Used to examine libraries when file_magic_cmd begins "file"
 MAGIC_CMD=$MAGIC_CMD
@@ -13180,6 +14152,9 @@ objext="$ac_objext"
 # Old archive suffix (normally "a").
 libext="$libext"
 
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
 # Executable file suffix (normally "").
 exeext="$exeext"
 
@@ -13257,6 +14232,10 @@ archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
 postinstall_cmds=$lt_postinstall_cmds
 postuninstall_cmds=$lt_postuninstall_cmds
 
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds_CXX
+module_expsym_cmds=$lt_module_expsym_cmds_CXX
+
 # Commands to strip libraries.
 old_striplib=$lt_old_striplib
 striplib=$lt_striplib
@@ -13327,10 +14306,15 @@ hardcode_into_libs=$hardcode_into_libs
 # This must work even if \$libdir does not exist.
 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
 
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
+
 # Whether we need a single -rpath flag with a separated argument.
 hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
 
-# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
 # resulting binary.
 hardcode_direct=$hardcode_direct_CXX
 
@@ -13342,6 +14326,10 @@ hardcode_minus_L=$hardcode_minus_L_CXX
 # the resulting binary.
 hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
 
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic_CXX
+
 # Variables whose values should be saved in libtool wrapper scripts and
 # restored at relink time.
 variables_saved_for_relink="$variables_saved_for_relink"
@@ -13382,36 +14370,75 @@ else
   # If there is no Makefile yet, we rely on a make rule to execute
   # `config.status --recheck' to rerun these tests and create the
   # libtool script then.
-  test -f Makefile && make "$ltmain"
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
 fi
 
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
-CC="$lt_save_CC"
+CC=$lt_save_CC
+LDCXX=$LD
+LD=$lt_save_LD
+GCC=$lt_save_GCC
+with_gnu_ldcxx=$with_gnu_ld
+with_gnu_ld=$lt_save_with_gnu_ld
+lt_cv_path_LDCXX=$lt_cv_path_LD
+lt_cv_path_LD=$lt_save_path_LD
+lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
 
+	else
+	  tagname=""
+	fi
 	;;
 
-      GCJ)
-
-
-
-# Source file extension for C test sources.
-ac_ext=java
-
-# Object file extension for compiled C test sources.
+      F77)
+	if test -n "$F77" && test "X$F77" != "Xno"; then
+
+ac_ext=f
+ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
+ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+
+
+archive_cmds_need_lc_F77=no
+allow_undefined_flag_F77=
+always_export_symbols_F77=no
+archive_expsym_cmds_F77=
+export_dynamic_flag_spec_F77=
+hardcode_direct_F77=no
+hardcode_libdir_flag_spec_F77=
+hardcode_libdir_flag_spec_ld_F77=
+hardcode_libdir_separator_F77=
+hardcode_minus_L_F77=no
+hardcode_automatic_F77=no
+module_cmds_F77=
+module_expsym_cmds_F77=
+link_all_deplibs_F77=unknown
+old_archive_cmds_F77=$old_archive_cmds
+no_undefined_flag_F77=
+whole_archive_flag_spec_F77=
+enable_shared_with_static_runtimes_F77=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
 objext=o
-objext_GCJ=$objext
+objext_F77=$objext
 
 # Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}"
+lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
 
 # Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String argv) {}; }'
+lt_simple_link_test_code="      program t\n      end\n"
 
 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
@@ -13419,78 +14446,71 @@ lt_simple_link_test_code='public class conftest { public static void main(String
 LTCC=${LTCC-"$CC"}
 
 # Allow CC to be a program name with arguments.
-set dummy $CC
-compiler="$2"
+compiler=$CC
 
 
 # Allow CC to be a program name with arguments.
 lt_save_CC="$CC"
-CC=${GCJ-"gcj"}
-set dummy $CC
-compiler="$2"
-compiler_GCJ=$CC
-
-# GCJ did not exist at the time GCC didn't implicitly link libc in.
-archive_cmds_need_lc_GCJ=no
-
+CC=${F77-"f77"}
+compiler=$CC
+compiler_F77=$CC
+cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
 
-lt_prog_compiler_no_builtin_flag_GCJ=
+echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
+echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $can_build_shared" >&5
+echo "${ECHO_T}$can_build_shared" >&6
 
-if test "$GCC" = yes; then
-  lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin'
+echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
+echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
+test "$can_build_shared" = "no" && enable_shared=no
 
-  echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
-echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
-if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_prog_compiler_rtti_exceptions=no
-  ac_outfile=conftest.$ac_objext
-   save_CFLAGS="$CFLAGS"
-   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   if (eval $ac_compile 2>conftest.err) && test -s $ac_outfile; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     if test -s conftest.err; then
-       # Append any errors to the config.log.
-       cat conftest.err 1>&5
-     else
-       lt_cv_prog_compiler_rtti_exceptions=yes
-     fi
-   fi
-   $rm conftest*
-   CFLAGS="$save_CFLAGS"
+# On AIX, shared libraries and static libraries use the same namespace, and
+# are all built from PIC.
+case "$host_os" in
+aix3*)
+  test "$enable_shared" = yes && enable_static=no
+  if test -n "$RANLIB"; then
+    archive_cmds="$archive_cmds~\$RANLIB \$lib"
+    postinstall_cmds='$RANLIB $lib'
+  fi
+  ;;
+aix4* | aix5*)
+  test "$enable_shared" = yes && enable_static=no
+  ;;
+esac
+echo "$as_me:$LINENO: result: $enable_shared" >&5
+echo "${ECHO_T}$enable_shared" >&6
 
-fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
+echo "$as_me:$LINENO: checking whether to build static libraries" >&5
+echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+echo "$as_me:$LINENO: result: $enable_static" >&5
+echo "${ECHO_T}$enable_static" >&6
 
-if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
-    lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions"
-else
-    :
-fi
+test "$ld_shlibs_F77" = no && can_build_shared=no
 
-fi
+GCC_F77="$G77"
+LD_F77="$LD"
 
-lt_prog_compiler_wl_GCJ=
-lt_prog_compiler_pic_GCJ=
-lt_prog_compiler_static_GCJ=
+lt_prog_compiler_wl_F77=
+lt_prog_compiler_pic_F77=
+lt_prog_compiler_static_F77=
 
 echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
 
   if test "$GCC" = yes; then
-    lt_prog_compiler_wl_GCJ='-Wl,'
-    lt_prog_compiler_static_GCJ='-static'
+    lt_prog_compiler_wl_F77='-Wl,'
+    lt_prog_compiler_static_F77='-static'
 
     case $host_os in
       aix*)
       # All AIX code is PIC.
       if test "$host_cpu" = ia64; then
 	# AIX 5 now supports IA64 processor
-	lt_prog_compiler_static_GCJ='-Bstatic'
+	lt_prog_compiler_static_F77='-Bstatic'
       fi
       ;;
 
@@ -13498,241 +14518,289 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
       # FIXME: we need at least 68020 code to build shared libraries, but
       # adding the `-m68020' flag to GCC prevents building anything better,
       # like `-m68040'.
-      lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4'
+      lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4'
       ;;
 
-    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
       # PIC is the default for these OSes.
       ;;
 
-    cygwin* | mingw* | pw32* | os2*)
+    mingw* | pw32* | os2*)
       # This hack is so that the source file can tell whether it is being
       # built for inclusion in a dll (and should export symbols for example).
-      lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
+      lt_prog_compiler_pic_F77='-DDLL_EXPORT'
       ;;
 
     darwin* | rhapsody*)
       # PIC is the default on this platform
       # Common symbols not allowed in MH_DYLIB files
-      lt_prog_compiler_pic_GCJ='-fno-common'
+      lt_prog_compiler_pic_F77='-fno-common'
       ;;
 
     msdosdjgpp*)
       # Just because we use GCC doesn't mean we suddenly get shared libraries
       # on systems that don't support them.
-      lt_prog_compiler_can_build_shared_GCJ=no
+      lt_prog_compiler_can_build_shared_F77=no
       enable_shared=no
       ;;
 
     sysv4*MP*)
       if test -d /usr/nec; then
-	lt_prog_compiler_pic_GCJ=-Kconform_pic
+	lt_prog_compiler_pic_F77=-Kconform_pic
       fi
       ;;
 
     hpux*)
-      # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
-      if test "$host_cpu" != ia64; then
-	lt_prog_compiler_pic_GCJ='-fPIC'
-      fi
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case "$host_cpu" in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic_F77='-fPIC'
+	;;
+      esac
       ;;
 
     *)
-      lt_prog_compiler_pic_GCJ='-fPIC'
+      lt_prog_compiler_pic_F77='-fPIC'
       ;;
     esac
   else
     # PORTME Check for flag to pass linker flags through the system compiler.
     case $host_os in
     aix*)
-      lt_prog_compiler_wl_GCJ='-Wl,'
+      lt_prog_compiler_wl_F77='-Wl,'
       if test "$host_cpu" = ia64; then
 	# AIX 5 now supports IA64 processor
-	lt_prog_compiler_static_GCJ='-Bstatic'
+	lt_prog_compiler_static_F77='-Bstatic'
       else
-	lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp'
+	lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp'
       fi
       ;;
+      darwin*)
+        # PIC is the default on this platform
+        # Common symbols not allowed in MH_DYLIB files
+       case "$cc_basename" in
+         xlc*)
+         lt_prog_compiler_pic_F77='-qnocommon'
+         lt_prog_compiler_wl_F77='-Wl,'
+         ;;
+       esac
+       ;;
 
-    cygwin* | mingw* | pw32* | os2*)
+    mingw* | pw32* | os2*)
       # This hack is so that the source file can tell whether it is being
       # built for inclusion in a dll (and should export symbols for example).
-      lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
+      lt_prog_compiler_pic_F77='-DDLL_EXPORT'
       ;;
 
     hpux9* | hpux10* | hpux11*)
-      lt_prog_compiler_wl_GCJ='-Wl,'
-      if test "$host_cpu" != ia64; then
-	lt_prog_compiler_pic_GCJ='+Z'
-      fi
+      lt_prog_compiler_wl_F77='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case "$host_cpu" in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic_F77='+Z'
+	;;
+      esac
       # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive'
+      lt_prog_compiler_static_F77='${wl}-a ${wl}archive'
       ;;
 
     irix5* | irix6* | nonstopux*)
-      lt_prog_compiler_wl_GCJ='-Wl,'
+      lt_prog_compiler_wl_F77='-Wl,'
       # PIC (with -KPIC) is the default.
-      lt_prog_compiler_static_GCJ='-non_shared'
+      lt_prog_compiler_static_F77='-non_shared'
       ;;
 
     newsos6)
-      lt_prog_compiler_pic_GCJ='-KPIC'
-      lt_prog_compiler_static_GCJ='-Bstatic'
+      lt_prog_compiler_pic_F77='-KPIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    linux*)
+      case $CC in
+      icc* | ecc*)
+	lt_prog_compiler_wl_F77='-Wl,'
+	lt_prog_compiler_pic_F77='-KPIC'
+	lt_prog_compiler_static_F77='-static'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl_F77='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static_F77='-non_shared'
+        ;;
+      esac
       ;;
 
     osf3* | osf4* | osf5*)
-      lt_prog_compiler_wl_GCJ='-Wl,'
+      lt_prog_compiler_wl_F77='-Wl,'
       # All OSF/1 code is PIC.
-      lt_prog_compiler_static_GCJ='-non_shared'
+      lt_prog_compiler_static_F77='-non_shared'
       ;;
 
     sco3.2v5*)
-      lt_prog_compiler_pic_GCJ='-Kpic'
-      lt_prog_compiler_static_GCJ='-dn'
+      lt_prog_compiler_pic_F77='-Kpic'
+      lt_prog_compiler_static_F77='-dn'
       ;;
 
     solaris*)
-      lt_prog_compiler_wl_GCJ='-Wl,'
-      lt_prog_compiler_pic_GCJ='-KPIC'
-      lt_prog_compiler_static_GCJ='-Bstatic'
+      lt_prog_compiler_wl_F77='-Wl,'
+      lt_prog_compiler_pic_F77='-KPIC'
+      lt_prog_compiler_static_F77='-Bstatic'
       ;;
 
     sunos4*)
-      lt_prog_compiler_wl_GCJ='-Qoption ld '
-      lt_prog_compiler_pic_GCJ='-PIC'
-      lt_prog_compiler_static_GCJ='-Bstatic'
+      lt_prog_compiler_wl_F77='-Qoption ld '
+      lt_prog_compiler_pic_F77='-PIC'
+      lt_prog_compiler_static_F77='-Bstatic'
       ;;
 
     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-      if test "x$host_vendor" = xsni; then
-	lt_prog_compiler_wl_GCJ='-LD'
-      else
-	lt_prog_compiler_wl_GCJ='-Wl,'
-      fi
-      lt_prog_compiler_pic_GCJ='-KPIC'
-      lt_prog_compiler_static_GCJ='-Bstatic'
+      lt_prog_compiler_wl_F77='-Wl,'
+      lt_prog_compiler_pic_F77='-KPIC'
+      lt_prog_compiler_static_F77='-Bstatic'
       ;;
 
     sysv4*MP*)
       if test -d /usr/nec ;then
-	lt_prog_compiler_pic_GCJ='-Kconform_pic'
-	lt_prog_compiler_static_GCJ='-Bstatic'
+	lt_prog_compiler_pic_F77='-Kconform_pic'
+	lt_prog_compiler_static_F77='-Bstatic'
       fi
       ;;
 
     uts4*)
-      lt_prog_compiler_pic_GCJ='-pic'
-      lt_prog_compiler_static_GCJ='-Bstatic'
+      lt_prog_compiler_pic_F77='-pic'
+      lt_prog_compiler_static_F77='-Bstatic'
       ;;
 
     *)
-      lt_prog_compiler_can_build_shared_GCJ=no
+      lt_prog_compiler_can_build_shared_F77=no
       ;;
     esac
   fi
 
-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6
 
 #
 # Check to make sure the PIC flag actually works.
 #
-if test -n "$lt_prog_compiler_pic_GCJ"; then
-  echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5
-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6
-if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then
+if test -n "$lt_prog_compiler_pic_F77"; then
+
+echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6
+if test "${lt_prog_compiler_pic_works_F77+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  lt_prog_compiler_pic_works_GCJ=no
+  lt_prog_compiler_pic_works_F77=no
   ac_outfile=conftest.$ac_objext
-   save_CFLAGS="$CFLAGS"
-   CFLAGS="$CFLAGS $lt_prog_compiler_pic_GCJ -DPIC"
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   if (eval $ac_compile 2>conftest.err) && test -s $ac_outfile; then
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic_F77"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:14714: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:14718: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
-     if test -s conftest.err; then
-       # Append any errors to the config.log.
-       cat conftest.err 1>&5
-     else
-       lt_prog_compiler_pic_works_GCJ=yes
+     if test ! -s conftest.err; then
+       lt_prog_compiler_pic_works_F77=yes
      fi
    fi
    $rm conftest*
-   CFLAGS="$save_CFLAGS"
 
 fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6
 
-if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then
-    case $lt_prog_compiler_pic_GCJ in
+if test x"$lt_prog_compiler_pic_works_F77" = xyes; then
+    case $lt_prog_compiler_pic_F77 in
      "" | " "*) ;;
-     *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;;
+     *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;;
      esac
 else
-    lt_prog_compiler_pic_GCJ=
-     lt_prog_compiler_can_build_shared_GCJ=no
+    lt_prog_compiler_pic_F77=
+     lt_prog_compiler_can_build_shared_F77=no
 fi
 
 fi
 case "$host_os" in
   # For platforms which do not support PIC, -DPIC is meaningless:
   *djgpp*)
-    lt_prog_compiler_pic_GCJ=
+    lt_prog_compiler_pic_F77=
     ;;
   *)
-    lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ -DPIC"
+    lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77"
     ;;
 esac
 
 echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
-if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then
+if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  lt_cv_prog_compiler_c_o_GCJ=no
+  lt_cv_prog_compiler_c_o_F77=no
    $rm -r conftest 2>/dev/null
    mkdir conftest
    cd conftest
    mkdir out
-   save_GCJFLAGS="$GCJFLAGS"
-		   GCJFLAGS="$GCJFLAGS -o out/conftest2.$ac_objext"
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-   # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
-   # that will create temporary files in the current directory regardless of
-   # the output directory.  Thus, making CWD read-only will cause this test
-   # to fail, enabling locking or at least warning the user not to do parallel
-   # builds.
-   chmod -w .
-
-   if (eval $ac_compile 2>out/conftest.err) && test -s out/conftest2.$ac_objext
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:14774: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:14778: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
-     if test -s out/conftest.err; then
-       # Append any errors to the config.log.
-       cat out/conftest.err 1>&5
-     else
-       lt_cv_prog_compiler_c_o_GCJ=yes
+     if test ! -s out/conftest.err; then
+       lt_cv_prog_compiler_c_o_F77=yes
      fi
    fi
-   GCJFLAGS="$save_GCJFLAGS"
    chmod u+w .
-   $rm conftest* out/*
-   rmdir out
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
    cd ..
    rmdir conftest
    $rm conftest*
 
 fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6
 
 
 hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then
+if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then
   # do not overwrite the value of need_locks provided by the user
   echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
@@ -13757,32 +14825,35 @@ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports share
 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
 
   runpath_var=
-  allow_undefined_flag_GCJ=
-
-  archive_cmds_GCJ=
-  archive_cmds_need_lc_GCJ=
-  archive_expsym_cmds_GCJ=
-  old_archive_From_new_cmds_GCJ=
-  old_archive_from_expsyms_cmds_GCJ=
-  export_dynamic_flag_spec_GCJ=
-  whole_archive_flag_spec_GCJ=
-  thread_safe_flag_spec_GCJ=
-  hardcode_libdir_flag_spec_GCJ=
-  hardcode_libdir_separator_GCJ=
-  hardcode_direct_GCJ=no
-  hardcode_minus_L_GCJ=no
-  hardcode_shlibpath_var_GCJ=unsupported
-  link_all_deplibs_GCJ=unknown
-  always_export_symbols_GCJ=no
-  export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  allow_undefined_flag_F77=
+  enable_shared_with_static_runtimes_F77=no
+  archive_cmds_F77=
+  archive_expsym_cmds_F77=
+  old_archive_From_new_cmds_F77=
+  old_archive_from_expsyms_cmds_F77=
+  export_dynamic_flag_spec_F77=
+  whole_archive_flag_spec_F77=
+  thread_safe_flag_spec_F77=
+  hardcode_libdir_flag_spec_F77=
+  hardcode_libdir_flag_spec_ld_F77=
+  hardcode_libdir_separator_F77=
+  hardcode_direct_F77=no
+  hardcode_minus_L_F77=no
+  hardcode_shlibpath_var_F77=unsupported
+  link_all_deplibs_F77=unknown
+  hardcode_automatic_F77=no
+  module_cmds_F77=
+  module_expsym_cmds_F77=
+  always_export_symbols_F77=no
+  export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
   # include_expsyms should be a list of space-separated symbols to be *always*
   # included in the symbol list
-  include_expsyms_GCJ=
-  # exclude_expsyms can be an egrep regular expression of symbols to exclude
+  include_expsyms_F77=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
   # it will be wrapped by ` (' and `)$', so one must not match beginning or
   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
   # as well as any symbol that contains `d'.
-  exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_"
+  exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_"
   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
   # platforms (ab)use it in PIC code, but their linkers get confused if
   # the symbol is explicitly referenced.  Since portable code cannot
@@ -13804,7 +14875,7 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar
     ;;
   esac
 
-  ld_shlibs_GCJ=yes
+  ld_shlibs_F77=yes
   if test "$with_gnu_ld" = yes; then
     # If archive_cmds runs LD, not CC, wlarc should be empty
     wlarc='${wl}'
@@ -13814,7 +14885,7 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar
     aix3* | aix4* | aix5*)
       # On AIX/PPC, the GNU linker is very broken
       if test "$host_cpu" != ia64; then
-	ld_shlibs_GCJ=no
+	ld_shlibs_F77=no
 	cat <<EOF 1>&2
 
 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
@@ -13828,9 +14899,9 @@ EOF
       ;;
 
     amigaos*)
-      archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-      hardcode_libdir_flag_spec_GCJ='-L$libdir'
-      hardcode_minus_L_GCJ=yes
+      archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_minus_L_F77=yes
 
       # Samuel A. Falvo II <kc5tja at dolphin.openprojects.net> reports
       # that the semantics of dynamic libraries on AmigaOS, at least up
@@ -13838,110 +14909,58 @@ EOF
       # with the same dynamic library.  Since this doesn't match the
       # behavior of shared libraries on other platforms, we can't use
       # them.
-      ld_shlibs_GCJ=no
+      ld_shlibs_F77=no
       ;;
 
     beos*)
-      if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
-	allow_undefined_flag_GCJ=unsupported
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	allow_undefined_flag_F77=unsupported
 	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
 	# support --undefined.  This deserves some investigation.  FIXME
-	archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
       else
-	ld_shlibs_GCJ=no
+	ld_shlibs_F77=no
       fi
       ;;
 
     cygwin* | mingw* | pw32*)
-      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, as there is
-      # no search path for DLLs.
-      hardcode_libdir_flag_spec_GCJ='-L$libdir'
-      allow_undefined_flag_GCJ=unsupported
-      always_export_symbols_GCJ=yes
-
-      extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
-	sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
-	test -f $output_objdir/impgen.exe || (cd $output_objdir && \
-	if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
-	else $CC -o impgen impgen.c ; fi)~
-	$output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
-
-      old_archive_from_expsyms_cmds_GCJ='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
-
-      # cygwin and mingw dlls have different entry points and sets of symbols
-      # to exclude.
-      # FIXME: what about values for MSVC?
-      dll_entry=__cygwin_dll_entry at 12
-      dll_exclude_symbols=DllMain at 12,_cygwin_dll_entry at 12,_cygwin_noncygwin_dll_entry at 12~
-      case $host_os in
-      mingw*)
-	# mingw values
-	dll_entry=_DllMainCRTStartup at 12
-	dll_exclude_symbols=DllMain at 12,DllMainCRTStartup at 12,DllEntryPoint at 12~
-	;;
-      esac
-
-      # mingw and cygwin differ, and it's simplest to just exclude the union
-      # of the two symbol sets.
-      dll_exclude_symbols=DllMain at 12,_cygwin_dll_entry at 12,_cygwin_noncygwin_dll_entry at 12,DllMainCRTStartup at 12,DllEntryPoint at 12
-
-      # recent cygwin and mingw systems supply a stub DllMain which the user
-      # can override, but on older systems we have to supply one (in ltdll.c)
-      if test "x$lt_cv_need_dllmain" = "xyes"; then
-	ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
-	ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
-  	test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
-      else
-	ltdll_obj=
-	ltdll_cmds=
-      fi
-
-      # Extract the symbol export list from an `--export-all' def file,
-      # then regenerate the def file from the symbol export list, so that
-      # the compiled dll only exports the symbol export list.
-      # Be careful not to strip the DATA tag left by newer dlltools.
-      export_symbols_cmds_GCJ="$ltdll_cmds"'
-	$DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
-	sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
-
-      # If the export-symbols file already is a .def file (1st line
-      # is EXPORTS), use it as is.
-      # If DATA tags from a recent dlltool are present, honour them!
-      archive_expsym_cmds_GCJ='if test "x`head -1 $export_symbols`" = xEXPORTS; then
-	  cp $export_symbols $output_objdir/$soname-def;
+      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless,
+      # as there is no search path for DLLs.
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      allow_undefined_flag_F77=unsupported
+      always_export_symbols_F77=no
+      enable_shared_with_static_runtimes_F77=yes
+      export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -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...
+	archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
 	else
-	  echo EXPORTS > $output_objdir/$soname-def;
-	  _lt_hint=1;
-	  cat $export_symbols | while read symbol; do
-	   set dummy \$symbol;
-	   case \$# in
-	     2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
-	     *) echo "   \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
-	   esac;
-	   _lt_hint=`expr 1 + \$_lt_hint`;
-	  done;
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $output_objdir/$soname.def;
 	fi~
-	'"$ltdll_cmds"'
-	$CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
-	$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
-	$CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
-	$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
-	$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
+      else
+	ld_shlibs=no
+      fi
       ;;
 
     netbsd*)
       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-	archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 	wlarc=
       else
-	archive_cmds_GCJ='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds_GCJ='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       fi
       ;;
 
     solaris* | sysv5*)
-      if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
-	ld_shlibs_GCJ=no
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+	ld_shlibs_F77=no
 	cat <<EOF 1>&2
 
 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
@@ -13952,64 +14971,81 @@ EOF
 *** used, and then restart.
 
 EOF
-      elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
-	archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       else
-	ld_shlibs_GCJ=no
+	ld_shlibs_F77=no
       fi
       ;;
 
     sunos4*)
-      archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
       wlarc=
-      hardcode_direct_GCJ=yes
-      hardcode_shlibpath_var_GCJ=no
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
       ;;
 
+  linux*)
+    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_cmds_F77="$tmp_archive_cmds"
+      supports_anon_versioning=no
+      case `$LD -v 2>/dev/null` in
+        *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+        *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+        *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+        *\ 2.11.*) ;; # other 2.11 versions
+        *) supports_anon_versioning=yes ;;
+      esac
+      if test $supports_anon_versioning = yes; then
+        archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~
+cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+$echo "local: *; };" >> $output_objdir/$libname.ver~
+        $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+      else
+        archive_expsym_cmds_F77="$tmp_archive_cmds"
+      fi
+    else
+      ld_shlibs_F77=no
+    fi
+    ;;
+
     *)
-      if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
-	archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       else
-	ld_shlibs_GCJ=no
+	ld_shlibs_F77=no
       fi
       ;;
     esac
 
-    if test "$ld_shlibs_GCJ" = yes; then
+    if test "$ld_shlibs_F77" = yes; then
       runpath_var=LD_RUN_PATH
-      hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir'
-      export_dynamic_flag_spec_GCJ='${wl}--export-dynamic'
-      case $host_os in
-      cygwin* | mingw* | pw32*)
-	# dlltool doesn't understand --whole-archive et. al.
-	whole_archive_flag_spec_GCJ=
-	;;
-      *)
-	# ancient GNU ld didn't support --whole-archive et. al.
-	if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
-  	whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-	else
-  	whole_archive_flag_spec_GCJ=
-	fi
-	;;
-      esac
+      hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir'
+      export_dynamic_flag_spec_F77='${wl}--export-dynamic'
+      # ancient GNU ld didn't support --whole-archive et. al.
+      if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+ 	whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+  	whole_archive_flag_spec_F77=
+      fi
     fi
   else
     # PORTME fill in a description of your system's linker (not GNU ld)
     case $host_os in
     aix3*)
-      allow_undefined_flag_GCJ=unsupported
-      always_export_symbols_GCJ=yes
-      archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      allow_undefined_flag_F77=unsupported
+      always_export_symbols_F77=yes
+      archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
       # Note: this linker hardcodes the directories in LIBPATH if there
       # are no directories specified by -L.
-      hardcode_minus_L_GCJ=yes
+      hardcode_minus_L_F77=yes
       if test "$GCC" = yes && test -z "$link_static_flag"; then
 	# Neither direct hardcoding nor static linking is supported with a
 	# broken collect2.
-	hardcode_direct_GCJ=unsupported
+	hardcode_direct_F77=unsupported
       fi
       ;;
 
@@ -14023,14 +15059,25 @@ EOF
       else
 	# If we're using GNU nm, then we don't want the "-C" option.
 	# -C means demangle to AIX nm, but means don't demangle with GNU nm
-	if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
-	  export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+	  export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
 	else
-	  export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+	  export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
 	fi
+	aix_use_runtimelinking=no
+
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+	  for ld_flag in $LDFLAGS; do
+  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+  	    aix_use_runtimelinking=yes
+  	    break
+  	  fi
+	  done
+	esac
 
-	# KDE requires run time linking.  Make it the default.
-	aix_use_runtimelinking=yes
 	exp_sym_flag='-bexport'
 	no_entry_flag='-bnoentry'
       fi
@@ -14041,10 +15088,10 @@ EOF
       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
-      archive_cmds_GCJ=''
-      hardcode_direct_GCJ=yes
-      hardcode_libdir_separator_GCJ=':'
-      link_all_deplibs_GCJ=yes
+      archive_cmds_F77=''
+      hardcode_direct_F77=yes
+      hardcode_libdir_separator_F77=':'
+      link_all_deplibs_F77=yes
 
       if test "$GCC" = yes; then
 	case $host_os in aix4.012|aix4.012.*)
@@ -14055,16 +15102,16 @@ EOF
   	   strings "$collect2name" | grep resolve_lib_name >/dev/null
 	  then
   	  # We have reworked collect2
-  	  hardcode_direct_GCJ=yes
+  	  hardcode_direct_F77=yes
 	  else
   	  # We have old collect2
-  	  hardcode_direct_GCJ=unsupported
+  	  hardcode_direct_F77=unsupported
   	  # It fails to find uninstalled libraries when the uninstalled
   	  # path is not listed in the libpath.  Setting hardcode_minus_L
   	  # to unsupported forces relinking
-  	  hardcode_minus_L_GCJ=yes
-  	  hardcode_libdir_flag_spec_GCJ='-L$libdir'
-  	  hardcode_libdir_separator_GCJ=
+  	  hardcode_minus_L_F77=yes
+  	  hardcode_libdir_flag_spec_F77='-L$libdir'
+  	  hardcode_libdir_separator_F77=
 	  fi
 	esac
 	shared_flag='-shared'
@@ -14076,140 +15123,140 @@ EOF
 	  shared_flag='-G'
 	else
   	if test "$aix_use_runtimelinking" = yes; then
-	    shared_flag='-qmkshrobj ${wl}-G'
+	    shared_flag='${wl}-G'
 	  else
-	    shared_flag='-qmkshrobj'
+	    shared_flag='${wl}-bM:SRE'
   	fi
 	fi
       fi
 
-      # Let the compiler handle the export list.
-      always_export_symbols_GCJ=no
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      always_export_symbols_F77=yes
       if test "$aix_use_runtimelinking" = yes; then
 	# Warning - without using the other runtime loading flags (-brtl),
 	# -berok will link without error, but may produce a broken library.
-	allow_undefined_flag_GCJ='-berok'
+	allow_undefined_flag_F77='-berok'
        # Determine the default libpath from the value encoded in an empty executable.
-	cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
+       cat >conftest.$ac_ext <<_ACEOF
+      program main
 
-  ;
-  return 0;
-}
+      end
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+	 { ac_try='test -z "$ac_f77_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 }'`
 # Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 }'`; fi
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
-	hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
-	archive_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
-	archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+       hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
+	archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
        else
 	if test "$host_cpu" = ia64; then
-	  hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib'
-	  allow_undefined_flag_GCJ="-z nodefs"
-	  archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+	  hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib'
+	  allow_undefined_flag_F77="-z nodefs"
+	  archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
 	else
 	 # Determine the default libpath from the value encoded in an empty executable.
 	 cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
+      program main
 
-  ;
-  return 0;
-}
+      end
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+	 { ac_try='test -z "$ac_f77_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 }'`
 # Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 }'`; fi
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
-	 hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
+	 hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
 	  # Warning - without using the other run time loading flags,
 	  # -berok will link without error, but may produce a broken library.
-	  no_undefined_flag_GCJ=' ${wl}-bernotok'
-	  allow_undefined_flag_GCJ=' ${wl}-berok'
+	  no_undefined_flag_F77=' ${wl}-bernotok'
+	  allow_undefined_flag_F77=' ${wl}-berok'
 	  # -bexpall does not export symbols beginning with underscore (_)
-	  always_export_symbols_GCJ=yes
+	  always_export_symbols_F77=yes
 	  # Exported symbols can be pulled into shared objects from archives
-	  whole_archive_flag_spec_GCJ=' '
-	  archive_cmds_need_lc_GCJ=yes
+	  whole_archive_flag_spec_F77=' '
+	  archive_cmds_need_lc_F77=yes
 	  # This is similar to how AIX traditionally builds it's shared libraries.
-	  archive_expsym_cmds_GCJ="\$CC $shared_flag"' -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'
+	  archive_expsym_cmds_F77="\$CC $shared_flag"' -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'
 	fi
       fi
       ;;
 
     amigaos*)
-      archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-      hardcode_libdir_flag_spec_GCJ='-L$libdir'
-      hardcode_minus_L_GCJ=yes
+      archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_minus_L_F77=yes
       # see comment about different semantics on the GNU ld section
-      ld_shlibs_GCJ=no
+      ld_shlibs_F77=no
       ;;
 
-    bsdi4*)
-      export_dynamic_flag_spec_GCJ=-rdynamic
+    bsdi[45]*)
+      export_dynamic_flag_spec_F77=-rdynamic
       ;;
 
     cygwin* | mingw* | pw32*)
@@ -14217,49 +15264,80 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       # Microsoft Visual C++.
       # hardcode_libdir_flag_spec is actually meaningless, as there is
       # no search path for DLLs.
-      hardcode_libdir_flag_spec_GCJ=' '
-      allow_undefined_flag_GCJ=unsupported
+      hardcode_libdir_flag_spec_F77=' '
+      allow_undefined_flag_F77=unsupported
       # Tell ltmain to make .lib files, not .a files.
       libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
       # FIXME: Setting linknames here is a bad hack.
-      archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
       # The linker will automatically build a .lib file if we build a DLL.
-      old_archive_From_new_cmds_GCJ='true'
+      old_archive_From_new_cmds_F77='true'
       # FIXME: Should let the user specify the lib program.
-      old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs'
+      old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs'
       fix_srcfile_path='`cygpath -w "$srcfile"`'
+      enable_shared_with_static_runtimes_F77=yes
       ;;
 
     darwin* | rhapsody*)
       case "$host_os" in
-      rhapsody* | darwin1.[012])
-	allow_undefined_flag_GCJ='-undefined suppress'
-	;;
-      *) # Darwin 1.3 on
-	allow_undefined_flag_GCJ='-flat_namespace -undefined suppress'
-	;;
+        rhapsody* | darwin1.[012])
+         allow_undefined_flag_F77='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[012])
+               allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
       esac
-
-      # FIXME: Relying on posixy $() will cause problems for
-      #        cross-compilation, but unfortunately the echo tests do not
-      #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
-      #	       `"' quotes if we put them in here... so don't!
-      archive_cmds_GCJ='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
-      # We need to add '_' to the symbols in $export_symbols first
-      #_LT_AC_TAGVAR(archive_expsym_cmds, GCJ)="$_LT_AC_TAGVAR(archive_cmds, GCJ)"' && strip -s $export_symbols'
-      hardcode_direct_GCJ=yes
-      hardcode_shlibpath_var_GCJ=no
-      whole_archive_flag_spec_GCJ='-all_load $convenience'
+      archive_cmds_need_lc_F77=no
+      hardcode_direct_F77=no
+      hardcode_automatic_F77=yes
+      hardcode_shlibpath_var_F77=unsupported
+      whole_archive_flag_spec_F77=''
+      link_all_deplibs_F77=yes
+    if test "$GCC" = yes ; then
+    	output_verbose_link_cmd='echo'
+        archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+      module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+      archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $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}'
+      module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    else
+      case "$cc_basename" in
+        xlc*)
+         output_verbose_link_cmd='echo'
+         archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+         module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+         archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         ld_shlibs_F77=no
+          ;;
+      esac
+    fi
       ;;
 
     dgux*)
-      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_libdir_flag_spec_GCJ='-L$libdir'
-      hardcode_shlibpath_var_GCJ=no
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_shlibpath_var_F77=no
       ;;
 
     freebsd1*)
-      ld_shlibs_GCJ=no
+      ld_shlibs_F77=no
       ;;
 
     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
@@ -14267,278 +15345,314 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
     # does not break anything, and helps significantly (at the cost of a little
     # extra space).
     freebsd2.2*)
-      archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
-      hardcode_libdir_flag_spec_GCJ='-R$libdir'
-      hardcode_direct_GCJ=yes
-      hardcode_shlibpath_var_GCJ=no
+      archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec_F77='-R$libdir'
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
       ;;
 
     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
     freebsd2*)
-      archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct_GCJ=yes
-      hardcode_minus_L_GCJ=yes
-      hardcode_shlibpath_var_GCJ=no
+      archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_F77=yes
+      hardcode_minus_L_F77=yes
+      hardcode_shlibpath_var_F77=no
       ;;
 
     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd*)
-      archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
-      hardcode_libdir_flag_spec_GCJ='-R$libdir'
-      hardcode_direct_GCJ=yes
-      hardcode_shlibpath_var_GCJ=no
+    freebsd* | kfreebsd*-gnu)
+      archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      hardcode_libdir_flag_spec_F77='-R$libdir'
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
       ;;
 
-    hpux9* | hpux10* | hpux11*)
+    hpux9*)
       if test "$GCC" = yes; then
-	case $host_os in
-	  hpux9*)
-	    archive_cmds_GCJ='$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'
-	    ;;
-	  *)
-	    if test "$host_cpu" = ia64; then
-	      archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	    else
-	      archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-	    fi
-	    ;;
+	archive_cmds_F77='$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'
+      else
+	archive_cmds_F77='$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
+      hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator_F77=:
+      hardcode_direct_F77=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L_F77=yes
+      export_dynamic_flag_spec_F77='${wl}-E'
+      ;;
+
+    hpux10* | hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case "$host_cpu" in
+	hppa*64*|ia64*)
+	  archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
 	esac
       else
-	case $host_os in
-	  hpux9*)
-	    archive_cmds_GCJ='$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'
-	    ;;
-	  *)
-	    if test "$host_cpu" = ia64; then
-	      archive_cmds_GCJ='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
-	    else
-	      archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
-	    fi
-	    ;;
+	case "$host_cpu" in
+	hppa*64*|ia64*)
+	  archive_cmds_F77='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  ;;
+	*)
+	  archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+	  ;;
 	esac
       fi
-      if test "$host_cpu" = ia64; then
-	hardcode_libdir_flag_spec_GCJ='-L$libdir'
-	hardcode_direct_GCJ=no
-	hardcode_shlibpath_var_GCJ=no
-      else
-	hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
-	hardcode_libdir_separator_GCJ=:
-	hardcode_direct_GCJ=yes
+      if test "$with_gnu_ld" = no; then
+	case "$host_cpu" in
+	hppa*64*)
+	  hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
+	  hardcode_libdir_flag_spec_ld_F77='+b $libdir'
+	  hardcode_libdir_separator_F77=:
+	  hardcode_direct_F77=no
+	  hardcode_shlibpath_var_F77=no
+	  ;;
+	ia64*)
+	  hardcode_libdir_flag_spec_F77='-L$libdir'
+	  hardcode_direct_F77=no
+	  hardcode_shlibpath_var_F77=no
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L_F77=yes
+	  ;;
+	*)
+	  hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
+	  hardcode_libdir_separator_F77=:
+	  hardcode_direct_F77=yes
+	  export_dynamic_flag_spec_F77='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L_F77=yes
+	  ;;
+	esac
       fi
-      # hardcode_minus_L: Not really in the search PATH,
-      # but as the default location of the library.
-      hardcode_minus_L_GCJ=yes
-      export_dynamic_flag_spec_GCJ='${wl}-E'
       ;;
 
     irix5* | irix6* | nonstopux*)
       if test "$GCC" = yes; then
-	archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
       else
-	archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec_ld_F77='-rpath $libdir'
       fi
-      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator_GCJ=:
-      link_all_deplibs_GCJ=yes
+      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_F77=:
+      link_all_deplibs_F77=yes
       ;;
 
     netbsd*)
       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-	archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+	archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
       else
-	archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+	archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
       fi
-      hardcode_libdir_flag_spec_GCJ='-R$libdir'
-      hardcode_direct_GCJ=yes
-      hardcode_shlibpath_var_GCJ=no
+      hardcode_libdir_flag_spec_F77='-R$libdir'
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
       ;;
 
     newsos6)
-      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct_GCJ=yes
-      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator_GCJ=:
-      hardcode_shlibpath_var_GCJ=no
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_F77=yes
+      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_F77=:
+      hardcode_shlibpath_var_F77=no
       ;;
 
     openbsd*)
-      hardcode_direct_GCJ=yes
-      hardcode_shlibpath_var_GCJ=no
-
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
       if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-	archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
-	hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
-	export_dynamic_flag_spec_GCJ='${wl}-E'
+	archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+	export_dynamic_flag_spec_F77='${wl}-E'
       else
        case $host_os in
 	 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
-	   archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-	   hardcode_libdir_flag_spec_GCJ='-R$libdir'
+	   archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	   hardcode_libdir_flag_spec_F77='-R$libdir'
 	   ;;
 	 *)
-	   archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
-	   hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
+	   archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	   hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
 	   ;;
        esac
       fi
       ;;
 
     os2*)
-      hardcode_libdir_flag_spec_GCJ='-L$libdir'
-      hardcode_minus_L_GCJ=yes
-      allow_undefined_flag_GCJ=unsupported
-      archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
-      old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_minus_L_F77=yes
+      allow_undefined_flag_F77=unsupported
+      archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
       ;;
 
     osf3*)
       if test "$GCC" = yes; then
-	allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
-	archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
       else
-	allow_undefined_flag_GCJ=' -expect_unresolved \*'
-	archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	allow_undefined_flag_F77=' -expect_unresolved \*'
+	archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
       fi
-      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator_GCJ=:
+      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_F77=:
       ;;
 
     osf4* | osf5*)	# as osf3* with the addition of -msym flag
       if test "$GCC" = yes; then
-	allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
-	archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-	hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+	allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
       else
-	allow_undefined_flag_GCJ=' -expect_unresolved \*'
-	archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-	archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+	allow_undefined_flag_F77=' -expect_unresolved \*'
+	archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
 	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
 
 	# Both c and cxx compiler support -rpath directly
-	hardcode_libdir_flag_spec_GCJ='-rpath $libdir'
+	hardcode_libdir_flag_spec_F77='-rpath $libdir'
       fi
-      hardcode_libdir_separator_GCJ=:
+      hardcode_libdir_separator_F77=:
       ;;
 
     sco3.2v5*)
-      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_shlibpath_var_GCJ=no
-      export_dynamic_flag_spec_GCJ='${wl}-Bexport'
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var_F77=no
+      export_dynamic_flag_spec_F77='${wl}-Bexport'
       runpath_var=LD_RUN_PATH
       hardcode_runpath_var=yes
       ;;
 
     solaris*)
-      no_undefined_flag_GCJ=' -z text'
+      no_undefined_flag_F77=' -z text'
       if test "$GCC" = yes; then
-	archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+	archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
       else
-	archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+	archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
   	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
       fi
-      hardcode_libdir_flag_spec_GCJ='-R$libdir'
-      hardcode_shlibpath_var_GCJ=no
+      hardcode_libdir_flag_spec_F77='-R$libdir'
+      hardcode_shlibpath_var_F77=no
       case $host_os in
       solaris2.[0-5] | solaris2.[0-5].*) ;;
       *) # Supported since Solaris 2.6 (maybe 2.5.1?)
-	whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;;
+	whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;;
       esac
-      link_all_deplibs_GCJ=yes
+      link_all_deplibs_F77=yes
       ;;
 
     sunos4*)
       if test "x$host_vendor" = xsequent; then
 	# Use $CC to link under sequent, because it throws in some extra .o
 	# files that make .init and .fini sections work.
-	archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
       else
-	archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+	archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
       fi
-      hardcode_libdir_flag_spec_GCJ='-L$libdir'
-      hardcode_direct_GCJ=yes
-      hardcode_minus_L_GCJ=yes
-      hardcode_shlibpath_var_GCJ=no
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_direct_F77=yes
+      hardcode_minus_L_F77=yes
+      hardcode_shlibpath_var_F77=no
       ;;
 
     sysv4)
-      if test "x$host_vendor" = xsni; then
-	archive_cmds_GCJ='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	hardcode_direct_GCJ=yes # is this really true???
-      else
-	archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie
-      fi
+      case $host_vendor in
+	sni)
+	  archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct_F77=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  reload_cmds_F77='$CC -r -o $output$reload_objs'
+	  hardcode_direct_F77=no
+        ;;
+	motorola)
+	  archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
       runpath_var='LD_RUN_PATH'
-      hardcode_shlibpath_var_GCJ=no
+      hardcode_shlibpath_var_F77=no
       ;;
 
     sysv4.3*)
-      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_shlibpath_var_GCJ=no
-      export_dynamic_flag_spec_GCJ='-Bexport'
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var_F77=no
+      export_dynamic_flag_spec_F77='-Bexport'
       ;;
 
     sysv4*MP*)
       if test -d /usr/nec; then
-	archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	hardcode_shlibpath_var_GCJ=no
+	archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	hardcode_shlibpath_var_F77=no
 	runpath_var=LD_RUN_PATH
 	hardcode_runpath_var=yes
-	ld_shlibs_GCJ=yes
+	ld_shlibs_F77=yes
       fi
       ;;
 
     sysv4.2uw2*)
-      archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct_GCJ=yes
-      hardcode_minus_L_GCJ=no
-      hardcode_shlibpath_var_GCJ=no
+      archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_F77=yes
+      hardcode_minus_L_F77=no
+      hardcode_shlibpath_var_F77=no
       hardcode_runpath_var=yes
       runpath_var=LD_RUN_PATH
       ;;
 
    sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
-      no_undefined_flag_GCJ='${wl}-z ${wl}text'
+      no_undefined_flag_F77='${wl}-z ${wl}text'
       if test "$GCC" = yes; then
-	archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
       else
-	archive_cmds_GCJ='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_cmds_F77='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
       fi
       runpath_var='LD_RUN_PATH'
-      hardcode_shlibpath_var_GCJ=no
+      hardcode_shlibpath_var_F77=no
       ;;
 
     sysv5*)
-      no_undefined_flag_GCJ=' -z text'
+      no_undefined_flag_F77=' -z text'
       # $CC -shared without GNU ld will not create a library from C++
       # object files and a static libstdc++, better avoid it by now
-      archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+      archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
   		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
-      hardcode_libdir_flag_spec_GCJ=
-      hardcode_shlibpath_var_GCJ=no
+      hardcode_libdir_flag_spec_F77=
+      hardcode_shlibpath_var_F77=no
       runpath_var='LD_RUN_PATH'
       ;;
 
     uts4*)
-      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_libdir_flag_spec_GCJ='-L$libdir'
-      hardcode_shlibpath_var_GCJ=no
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_shlibpath_var_F77=no
       ;;
 
     *)
-      ld_shlibs_GCJ=no
+      ld_shlibs_F77=no
       ;;
     esac
   fi
 
-echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5
-echo "${ECHO_T}$ld_shlibs_GCJ" >&6
-test "$ld_shlibs_GCJ" = no && can_build_shared=no
+echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5
+echo "${ECHO_T}$ld_shlibs_F77" >&6
+test "$ld_shlibs_F77" = no && can_build_shared=no
 
 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
 if test "$GCC" = yes; then
@@ -14548,114 +15662,71 @@ fi
 #
 # Do we need to explicitly link libc?
 #
-archive_cmds_need_lc_GCJ=yes
-if test "$enable_shared" = yes && test "$GCC" = yes; then
-  case $archive_cmds_GCJ in
-  *'~'*)
-    # FIXME: we may have to deal with multi-command sequences.
-    ;;
-  '$CC '*)
-    # Test whether the compiler implicitly links with -lc since on some
-    # systems, -lgcc has to come before -lc. If gcc already passes -lc
-    # to ld, don't add -lc before -lgcc.
-    echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+case "x$archive_cmds_need_lc_F77" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc_F77=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds_F77 in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
-    $rm conftest*
-    echo 'static int dummy;' > conftest.$ac_ext
+      $rm conftest*
+      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
-    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } 2>conftest.err; then
-      soname=conftest
-      lib=conftest
-      libobjs=conftest.$ac_objext
-      deplibs=
-      wl=$lt_prog_compiler_wl_GCJ
-      compiler_flags=-v
-      linker_flags=-v
-      verstring=
-      output_objdir=.
-      libname=conftest
-      lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ
-      allow_undefined_flag_GCJ=
-      if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
-  (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl_F77
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag_F77
+        allow_undefined_flag_F77=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+  (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
-      then
-	archive_cmds_need_lc_GCJ=no
+        then
+	  archive_cmds_need_lc_F77=no
+        else
+	  archive_cmds_need_lc_F77=yes
+        fi
+        allow_undefined_flag_F77=$lt_save_allow_undefined_flag
       else
-	archive_cmds_need_lc_GCJ=yes
+        cat conftest.err 1>&5
       fi
-      allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag
-    else
-      cat conftest.err 1>&5
-    fi
-    $rm conftest*
-    echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5
-echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6
-    ;;
-  esac
-fi
-
-echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
-hardcode_action_GCJ=
-if test -n "$hardcode_libdir_flag_spec_GCJ" || \
-   test -n "$runpath_var GCJ"; then
-
-  # We can hardcode non-existant directories.
-  if test "$hardcode_direct_GCJ" != no &&
-     # If the only mechanism to avoid hardcoding is shlibpath_var, we
-     # have to relink, otherwise we might link with an installed library
-     # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no &&
-     test "$hardcode_minus_L_GCJ" != no; then
-    # Linking always hardcodes the temporary library directory.
-    hardcode_action_GCJ=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    hardcode_action_GCJ=immediate
+      $rm conftest*
+      echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5
+echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6
+      ;;
+    esac
   fi
-else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  hardcode_action_GCJ=unsupported
-fi
-echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5
-echo "${ECHO_T}$hardcode_action_GCJ" >&6
-
-if test "$hardcode_action_GCJ" = relink; then
-  # Fast installation is not supported
-  enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
-  # Fast installation is not necessary
-  enable_fast_install=needless
-fi
-
-striplib=
-old_striplib=
-echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
-echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
-if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
-  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
-  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
-  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
+  ;;
+esac
 
 echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
 library_names_spec=
 libname_spec='lib$name'
 soname_spec=
+shrext_cmds=".so"
 postinstall_cmds=
 postuninstall_cmds=
 finish_cmds=
@@ -14665,7 +15736,20 @@ shlibpath_overrides_runpath=unknown
 version_type=none
 dynamic_linker="$host_os ld.so"
 sys_lib_dlsearch_path_spec="/lib /usr/lib"
-sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+if test "$GCC" = yes; then
+  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
 need_lib_prefix=unknown
 hardcode_into_libs=no
 
@@ -14676,18 +15760,21 @@ need_version=unknown
 case $host_os in
 aix3*)
   version_type=linux
-  library_names_spec='${libname}${release}.so$versuffix $libname.a'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
   shlibpath_var=LIBPATH
 
   # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}.so$major'
+  soname_spec='${libname}${release}${shared_ext}$major'
   ;;
 
 aix4* | aix5*)
   version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
   if test "$host_cpu" = ia64; then
     # AIX 5 supports IA64
-    library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
     shlibpath_var=LD_LIBRARY_PATH
   else
     # With GCC up to 2.95.x, collect2 would create an import file
@@ -14713,12 +15800,12 @@ aix4* | aix5*)
       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
       # instead of lib<name>.a to let people know that these are not
       # typical AIX shared libraries.
-      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
     else
       # We preserve .a as extension for shared libraries through AIX4.2
       # and later when we are not doing run time linking.
       library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}.so$major'
+      soname_spec='${libname}${release}${shared_ext}$major'
     fi
     shlibpath_var=LIBPATH
   fi
@@ -14727,20 +15814,20 @@ aix4* | aix5*)
 amigaos*)
   library_names_spec='$libname.ixlibrary $libname.a'
   # Create ${libname}_ixlibrary.a entries in /sys/libs.
-  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
+  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
   ;;
 
 beos*)
-  library_names_spec='${libname}.so'
+  library_names_spec='${libname}${shared_ext}'
   dynamic_linker="$host_os ld.so"
   shlibpath_var=LIBRARY_PATH
   ;;
 
-bsdi4*)
+bsdi[45]*)
   version_type=linux
   need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
@@ -14752,41 +15839,79 @@ bsdi4*)
 
 cygwin* | mingw* | pw32*)
   version_type=windows
+  shrext_cmds=".dll"
   need_version=no
   need_lib_prefix=no
+
   case $GCC,$host_os in
-  yes,cygwin*)
+  yes,cygwin* | yes,mingw* | yes,pw32*)
     library_names_spec='$libname.dll.a'
-    sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
-    soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
-    postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
       dldir=$destdir/`dirname \$dlpath`~
       test -d \$dldir || mkdir -p \$dldir~
-      $install_prog .libs/$dlname \$dldir/$dlname'
-    postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      $install_prog $dir/$dlname \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
       dlpath=$dir/\$dldll~
        $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
     ;;
-  yes,mingw*)
-    library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
-    sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://"`
-    if echo "$sys_lib_search_path_spec" | egrep ';[C-Z]:/' >/dev/null; then
-      # It is most probably a Windows format PATH printed by
-      # mingw gcc, but we are running on Cygwin. Gcc prints its search
-      # path with ; separators, and with drive letters. We can handle the
-      # drive letters (cygwin fileutils understands them), so leave them,
-      # especially as we might pass files found there to a mingw objdump,
-      # which wouldn't understand a cygwinified path. Ahh.
-      sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'`
+
+  linux*)
+    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      supports_anon_versioning=no
+      case `$LD -v 2>/dev/null` in
+        *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+        *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+        *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+        *\ 2.11.*) ;; # other 2.11 versions
+        *) supports_anon_versioning=yes ;;
+      esac
+      if test $supports_anon_versioning = yes; then
+        archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
+cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+$echo "local: *; };" >> $output_objdir/$libname.ver~
+        $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+      else
+        $archive_expsym_cmds="$archive_cmds"
+      fi
     else
-      sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed  -e "s/$PATH_SEPARATOR/ /g"`
+      ld_shlibs=no
     fi
     ;;
-  yes,pw32*)
-    library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
-    ;;
+
   *)
-    library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
     ;;
   esac
   dynamic_linker='Win32 ld.exe'
@@ -14799,21 +15924,26 @@ darwin* | rhapsody*)
   version_type=darwin
   need_lib_prefix=no
   need_version=no
-  # FIXME: Relying on posixy $() will cause problems for
-  #        cross-compilation, but unfortunately the echo tests do not
-  #        yet detect zsh echo's removal of \ escapes.
-  library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
-  soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
+  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+  if test "$GCC" = yes; then
+    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+  else
+    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+  fi
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
   ;;
 
 dgux*)
   version_type=linux
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
@@ -14821,17 +15951,29 @@ freebsd1*)
   dynamic_linker=no
   ;;
 
+kfreebsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
 freebsd*)
   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
   version_type=freebsd-$objformat
   case $version_type in
     freebsd-elf*)
-      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
       need_version=no
       need_lib_prefix=no
       ;;
     freebsd-*)
-      library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
       need_version=yes
       ;;
   esac
@@ -14855,8 +15997,8 @@ gnu*)
   version_type=linux
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
-  soname_spec='${libname}${release}.so$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
   hardcode_into_libs=yes
   ;;
@@ -14867,26 +16009,42 @@ hpux9* | hpux10* | hpux11*)
   version_type=sunos
   need_lib_prefix=no
   need_version=no
-  if test "$host_cpu" = ia64; then
+  case "$host_cpu" in
+  ia64*)
+    shrext_cmds='.so'
     hardcode_into_libs=yes
     dynamic_linker="$host_os dld.so"
     shlibpath_var=LD_LIBRARY_PATH
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-    soname_spec='${libname}${release}.so$major'
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
     if test "X$HPUX_IA64_MODE" = X32; then
       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
     else
       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
     fi
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-  else
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
     dynamic_linker="$host_os dld.sl"
     shlibpath_var=SHLIB_PATH
     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
-    soname_spec='${libname}${release}.sl$major'
-  fi
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
   # HP-UX runs *really* slowly unless shared libraries are mode 555.
   postinstall_cmds='chmod 555 $lib'
   ;;
@@ -14894,21 +16052,29 @@ hpux9* | hpux10* | hpux11*)
 irix5* | irix6* | nonstopux*)
   case $host_os in
     nonstopux*) version_type=nonstopux ;;
-    *)          version_type=irix ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
   esac
   need_lib_prefix=no
   need_version=no
-  soname_spec='${libname}${release}.so$major'
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
   case $host_os in
   irix5* | nonstopux*)
     libsuff= shlibsuff=
     ;;
   *)
     case $LD in # libtool.m4 will add one of these switches to LD
-    *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
-    *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
-    *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
     *) libsuff= shlibsuff= libmagic=never-match;;
     esac
     ;;
@@ -14917,6 +16083,7 @@ irix5* | irix6* | nonstopux*)
   shlibpath_overrides_runpath=no
   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
   ;;
 
 # No shared lib support for Linux oldld, aout, or coff.
@@ -14929,25 +16096,29 @@ linux*)
   version_type=linux
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
-  libsuff=
-  if test "x$LINUX_64_MODE" = x64; then
-    # Some platforms are per default 64-bit, so there's no /lib64
-    if test -d /lib64; then
-      libsuff=64
-    fi
-  fi
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
-  sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
-  sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
   # This implies no fast_install, which is unacceptable.
   # Some rework will be needed to allow for fast_install
   # before this can be enabled.
   hardcode_into_libs=yes
 
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+  fi
+
+  case $host_cpu:$lt_cv_cc_64bit_output in
+  powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
+    sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/X11R6/lib64"
+    sys_lib_search_path_spec="/lib64 /usr/lib64 /usr/local/lib64 /usr/X11R6/lib64"
+    ;;
+  esac
+
   # We used to test for /lib/ld.so.1 and disable shared libraries on
   # powerpc, because MkLinux only supported shared libraries with the
   # GNU dynamic linker.  Since this was broken with cross compilers,
@@ -14955,19 +16126,55 @@ linux*)
   # people can always --disable-shared, the test was removed, and we
   # assume the GNU/Linux dynamic linker is in use.
   dynamic_linker='GNU/Linux ld.so'
-  ;;
 
-netbsd*)
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
+  # Find out which ABI we are using (multilib Linux x86_64 hack).
+  libsuff=
+  case "$host_cpu" in
+  x86_64*)
+    echo '#line 16134 "configure"' > conftest.$ac_ext
+    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+      case `/usr/bin/file conftest.$ac_objext` in
+      *64-bit*)
+        libsuff=64
+        ;;
+      esac
+    fi
+    rm -rf conftest*
+    ;;
+  *)
+    ;;
+  esac
+  sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
+  sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+  ;;
+
+knetbsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
     dynamic_linker='NetBSD (a.out) ld.so'
   else
-    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
-    soname_spec='${libname}${release}.so$major'
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
     dynamic_linker='NetBSD ld.elf_so'
   fi
   shlibpath_var=LD_LIBRARY_PATH
@@ -14977,17 +16184,17 @@ netbsd*)
 
 newsos6)
   version_type=linux
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   ;;
 
-nto-qnx)
+nto-qnx*)
   version_type=linux
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   ;;
@@ -14996,7 +16203,7 @@ openbsd*)
   version_type=sunos
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
@@ -15015,8 +16222,9 @@ openbsd*)
 
 os2*)
   libname_spec='$name'
+  shrext_cmds=".dll"
   need_lib_prefix=no
-  library_names_spec='$libname.dll $libname.a'
+  library_names_spec='$libname${shared_ext} $libname.a'
   dynamic_linker='OS/2 ld.exe'
   shlibpath_var=LIBPATH
   ;;
@@ -15025,8 +16233,8 @@ osf3* | osf4* | osf5*)
   version_type=osf
   need_lib_prefix=no
   need_version=no
-  soname_spec='${libname}${release}.so'
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
@@ -15034,8 +16242,8 @@ osf3* | osf4* | osf5*)
 
 sco3.2v5*)
   version_type=osf
-  soname_spec='${libname}${release}.so$major'
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
@@ -15043,8 +16251,8 @@ solaris*)
   version_type=linux
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   hardcode_into_libs=yes
@@ -15054,7 +16262,7 @@ solaris*)
 
 sunos4*)
   version_type=sunos
-  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
@@ -15066,12 +16274,18 @@ sunos4*)
 
 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
   version_type=linux
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
   case $host_vendor in
     sni)
       shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
       ;;
     motorola)
       need_lib_prefix=no
@@ -15085,16 +16299,16 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 sysv4*MP*)
   if test -d /usr/nec ;then
     version_type=linux
-    library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
-    soname_spec='$libname.so.$major'
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
     shlibpath_var=LD_LIBRARY_PATH
   fi
   ;;
 
 uts4*)
   version_type=linux
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
@@ -15106,912 +16320,355 @@ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
 echo "${ECHO_T}$dynamic_linker" >&6
 test "$dynamic_linker" = no && can_build_shared=no
 
-if test "x$enable_dlopen" != xyes; then
-  enable_dlopen=unknown
-  enable_dlopen_self=unknown
-  enable_dlopen_self_static=unknown
+echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
+hardcode_action_F77=
+if test -n "$hardcode_libdir_flag_spec_F77" || \
+   test -n "$runpath_var_F77" || \
+   test "X$hardcode_automatic_F77" = "Xyes" ; then
+
+  # We can hardcode non-existant directories.
+  if test "$hardcode_direct_F77" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no &&
+     test "$hardcode_minus_L_F77" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action_F77=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action_F77=immediate
+  fi
 else
-  lt_cv_dlopen=no
-  lt_cv_dlopen_libs=
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action_F77=unsupported
+fi
+echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5
+echo "${ECHO_T}$hardcode_action_F77" >&6
+
+if test "$hardcode_action_F77" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
 
+striplib=
+old_striplib=
+echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+# FIXME - insert some real tests, host_os isn't really good enough
   case $host_os in
-  beos*)
-    lt_cv_dlopen="load_add_on"
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=yes
+   darwin*)
+       if test -n "$STRIP" ; then
+         striplib="$STRIP -x"
+         echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+       else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+       ;;
+   *)
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
     ;;
+  esac
+fi
 
-  cygwin* | mingw* | pw32*)
-    lt_cv_dlopen="LoadLibrary"
-    lt_cv_dlopen_libs=
-   ;;
 
-  *)
-    echo "$as_me:$LINENO: checking for shl_load" >&5
-echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
-if test "${ac_cv_func_shl_load+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char shl_load (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char shl_load ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_shl_load) || defined (__stub___shl_load)
-choke me
-#else
-char (*f) () = shl_load;
-#endif
-#ifdef __cplusplus
-}
-#endif
 
-int
-main ()
-{
-return f != shl_load;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_func_shl_load=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler_F77 \
+    CC_F77 \
+    LD_F77 \
+    lt_prog_compiler_wl_F77 \
+    lt_prog_compiler_pic_F77 \
+    lt_prog_compiler_static_F77 \
+    lt_prog_compiler_no_builtin_flag_F77 \
+    export_dynamic_flag_spec_F77 \
+    thread_safe_flag_spec_F77 \
+    whole_archive_flag_spec_F77 \
+    enable_shared_with_static_runtimes_F77 \
+    old_archive_cmds_F77 \
+    old_archive_from_new_cmds_F77 \
+    predep_objects_F77 \
+    postdep_objects_F77 \
+    predeps_F77 \
+    postdeps_F77 \
+    compiler_lib_search_path_F77 \
+    archive_cmds_F77 \
+    archive_expsym_cmds_F77 \
+    postinstall_cmds_F77 \
+    postuninstall_cmds_F77 \
+    old_archive_from_expsyms_cmds_F77 \
+    allow_undefined_flag_F77 \
+    no_undefined_flag_F77 \
+    export_symbols_cmds_F77 \
+    hardcode_libdir_flag_spec_F77 \
+    hardcode_libdir_flag_spec_ld_F77 \
+    hardcode_libdir_separator_F77 \
+    hardcode_automatic_F77 \
+    module_cmds_F77 \
+    module_expsym_cmds_F77 \
+    lt_cv_prog_compiler_c_o_F77 \
+    exclude_expsyms_F77 \
+    include_expsyms_F77; do
 
-ac_cv_func_shl_load=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
-echo "${ECHO_T}$ac_cv_func_shl_load" >&6
-if test $ac_cv_func_shl_load = yes; then
-  lt_cv_dlopen="shl_load"
-else
-  echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
-echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
-if test "${ac_cv_lib_dld_shl_load+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+    case $var in
+    old_archive_cmds_F77 | \
+    old_archive_from_new_cmds_F77 | \
+    archive_cmds_F77 | \
+    archive_expsym_cmds_F77 | \
+    module_cmds_F77 | \
+    module_expsym_cmds_F77 | \
+    old_archive_from_expsyms_cmds_F77 | \
+    export_symbols_cmds_F77 | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
 
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char shl_load ();
-int
-main ()
-{
-shl_load ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_dld_shl_load=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
 
-ac_cv_lib_dld_shl_load=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
-echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
-if test $ac_cv_lib_dld_shl_load = yes; then
-  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
-else
-  echo "$as_me:$LINENO: checking for dlopen" >&5
-echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
-if test "${ac_cv_func_dlopen+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char dlopen (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char dlopen ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_dlopen) || defined (__stub___dlopen)
-choke me
-#else
-char (*f) () = dlopen;
-#endif
-#ifdef __cplusplus
-}
-#endif
+cfgfile="$ofile"
 
-int
-main ()
-{
-return f != dlopen;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_func_dlopen=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  cat <<__EOF__ >> "$cfgfile"
+# ### BEGIN LIBTOOL TAG CONFIG: $tagname
 
-ac_cv_func_dlopen=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
-echo "${ECHO_T}$ac_cv_func_dlopen" >&6
-if test $ac_cv_func_dlopen = yes; then
-  lt_cv_dlopen="dlopen"
-else
-  echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char dlopen ();
-int
-main ()
-{
-dlopen ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_dl_dlopen=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
 
-ac_cv_lib_dl_dlopen=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
-if test $ac_cv_lib_dl_dlopen = yes; then
-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
-else
-  echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
-echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
-if test "${ac_cv_lib_svld_dlopen+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsvld  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
 
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char dlopen ();
-int
-main ()
-{
-dlopen ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_svld_dlopen=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
 
-ac_cv_lib_svld_dlopen=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
-if test $ac_cv_lib_svld_dlopen = yes; then
-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
-else
-  echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
-echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
-if test "${ac_cv_lib_dld_dld_link+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_F77
 
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char dld_link ();
-int
-main ()
-{
-dld_link ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_dld_dld_link=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77
 
-ac_cv_lib_dld_dld_link=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
-echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
-if test $ac_cv_lib_dld_dld_link = yes; then
-  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
-fi
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
 
+# The host system.
+host_alias=$host_alias
+host=$host
 
-fi
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
 
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
 
-fi
+# A C compiler.
+LTCC=$lt_LTCC
 
+# A language-specific compiler.
+CC=$lt_compiler_F77
 
-fi
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC_F77
 
+# An ERE matcher.
+EGREP=$lt_EGREP
 
-fi
+# The linker used to build libraries.
+LD=$lt_LD_F77
 
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
 
-fi
+# A BSD-compatible nm program.
+NM=$lt_NM
 
-    ;;
-  esac
+# A symbol stripping program
+STRIP=$lt_STRIP
 
-  if test "x$lt_cv_dlopen" != xno; then
-    enable_dlopen=yes
-  else
-    enable_dlopen=no
-  fi
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
 
-  case $lt_cv_dlopen in
-  dlopen)
-    save_CPPFLAGS="$CPPFLAGS"
-    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
 
-    save_LDFLAGS="$LDFLAGS"
-    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
 
-    save_LIBS="$LIBS"
-    LIBS="$lt_cv_dlopen_libs $LIBS"
+# Used on cygwin: assembler.
+AS="$AS"
 
-    echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
-echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
-if test "${lt_cv_dlopen_self+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  	  if test "$cross_compiling" = yes; then :
-  lt_cv_dlopen_self=cross
-else
-  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-  lt_status=$lt_dlunknown
-  cat > conftest.$ac_ext <<EOF
-#line 15555 "configure"
-#include "confdefs.h"
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
 
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
 
-#include <stdio.h>
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_F77
 
-#ifdef RTLD_GLOBAL
-#  define LT_DLGLOBAL		RTLD_GLOBAL
-#else
-#  ifdef DL_GLOBAL
-#    define LT_DLGLOBAL		DL_GLOBAL
-#  else
-#    define LT_DLGLOBAL		0
-#  endif
-#endif
+# Object file suffix (normally "o").
+objext="$ac_objext"
 
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
-   find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-#  ifdef RTLD_LAZY
-#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
-#  else
-#    ifdef DL_LAZY
-#      define LT_DLLAZY_OR_NOW		DL_LAZY
-#    else
-#      ifdef RTLD_NOW
-#        define LT_DLLAZY_OR_NOW	RTLD_NOW
-#      else
-#        ifdef DL_NOW
-#          define LT_DLLAZY_OR_NOW	DL_NOW
-#        else
-#          define LT_DLLAZY_OR_NOW	0
-#        endif
-#      endif
-#    endif
-#  endif
-#endif
+# Old archive suffix (normally "a").
+libext="$libext"
 
-#ifdef __cplusplus
-extern "C" void exit (int);
-#endif
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
 
-void fnord() { int i=42;}
-int main ()
-{
-  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-  int status = $lt_dlunknown;
+# Executable file suffix (normally "").
+exeext="$exeext"
 
-  if (self)
-    {
-      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
-      /* dlclose (self); */
-    }
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_F77
+pic_mode=$pic_mode
 
-    exit (status);
-}
-EOF
-  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
-    (./conftest; exit; ) 2>/dev/null
-    lt_status=$?
-    case x$lt_status in
-      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
-      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
-      x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
-    esac
-  else :
-    # compilation failed
-    lt_cv_dlopen_self=no
-  fi
-fi
-rm -fr conftest*
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
 
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77
 
-fi
-echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
-echo "${ECHO_T}$lt_cv_dlopen_self" >&6
+# Must we lock files when doing compilation ?
+need_locks=$lt_need_locks
 
-    if test "x$lt_cv_dlopen_self" = xyes; then
-      LDFLAGS="$LDFLAGS $link_static_flag"
-      echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
-echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
-if test "${lt_cv_dlopen_self_static+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  	  if test "$cross_compiling" = yes; then :
-  lt_cv_dlopen_self_static=cross
-else
-  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-  lt_status=$lt_dlunknown
-  cat > conftest.$ac_ext <<EOF
-#line 15653 "configure"
-#include "confdefs.h"
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
 
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
+# Do we need a version for libraries?
+need_version=$need_version
 
-#include <stdio.h>
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
 
-#ifdef RTLD_GLOBAL
-#  define LT_DLGLOBAL		RTLD_GLOBAL
-#else
-#  ifdef DL_GLOBAL
-#    define LT_DLGLOBAL		DL_GLOBAL
-#  else
-#    define LT_DLGLOBAL		0
-#  endif
-#endif
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
 
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
-   find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-#  ifdef RTLD_LAZY
-#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
-#  else
-#    ifdef DL_LAZY
-#      define LT_DLLAZY_OR_NOW		DL_LAZY
-#    else
-#      ifdef RTLD_NOW
-#        define LT_DLLAZY_OR_NOW	RTLD_NOW
-#      else
-#        ifdef DL_NOW
-#          define LT_DLLAZY_OR_NOW	DL_NOW
-#        else
-#          define LT_DLLAZY_OR_NOW	0
-#        endif
-#      endif
-#    endif
-#  endif
-#endif
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
 
-#ifdef __cplusplus
-extern "C" void exit (int);
-#endif
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_F77
 
-void fnord() { int i=42;}
-int main ()
-{
-  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-  int status = $lt_dlunknown;
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77
 
-  if (self)
-    {
-      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
-      /* dlclose (self); */
-    }
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77
 
-    exit (status);
-}
-EOF
-  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
-    (./conftest; exit; ) 2>/dev/null
-    lt_status=$?
-    case x$lt_status in
-      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
-      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
-      x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
-    esac
-  else :
-    # compilation failed
-    lt_cv_dlopen_self_static=no
-  fi
-fi
-rm -fr conftest*
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77
 
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77
 
-fi
-echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
-echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
-    fi
+# Library versioning type.
+version_type=$version_type
 
-    CPPFLAGS="$save_CPPFLAGS"
-    LDFLAGS="$save_LDFLAGS"
-    LIBS="$save_LIBS"
-    ;;
-  esac
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
 
-  case $lt_cv_dlopen_self in
-  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
-  *) enable_dlopen_self=unknown ;;
-  esac
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
 
-  case $lt_cv_dlopen_self_static in
-  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
-  *) enable_dlopen_self_static=unknown ;;
-  esac
-fi
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
 
-
-# The else clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
-  # Now quote all the things that may contain metacharacters while being
-  # careful not to overquote the AC_SUBSTed values.  We take copies of the
-  # variables and quote the copies for generation of the libtool script.
-  for var in echo old_CC old_CFLAGS AR AR_FLAGS RANLIB LN_S LTCC NM SED SHELL \
-    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
-    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
-    deplibs_check_method reload_flag reload_cmds need_locks \
-    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
-    lt_cv_sys_global_symbol_to_c_name_address \
-    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
-    old_postinstall_cmds old_postuninstall_cmds \
-    compiler_GCJ \
-    CC_GCJ \
-    LD_GCJ \
-    lt_prog_compiler_wl_GCJ \
-    lt_prog_compiler_pic_GCJ \
-    lt_prog_compiler_static_GCJ \
-    lt_prog_compiler_no_builtin_flag_GCJ \
-    export_dynamic_flag_spec_GCJ \
-    thread_safe_flag_spec_GCJ \
-    whole_archive_flag_spec_GCJ \
-    old_archive_cmds_GCJ \
-    old_archive_from_new_cmds_GCJ \
-    predep_objects_GCJ \
-    postdep_objects_GCJ \
-    predeps_GCJ \
-    postdeps_GCJ \
-    compiler_lib_search_path_GCJ \
-    archive_cmds_GCJ \
-    archive_expsym_cmds_GCJ \
-    postinstall_cmds_GCJ \
-    postuninstall_cmds_GCJ \
-    old_archive_from_expsyms_cmds_GCJ \
-    allow_undefined_flag_GCJ \
-    no_undefined_flag_GCJ \
-    export_symbols_cmds_GCJ \
-    hardcode_libdir_flag_spec_GCJ \
-    hardcode_libdir_separator_GCJ \
-    lt_cv_prog_compiler_c_o_GCJ \
-    exclude_expsyms_GCJ \
-    include_expsyms_GCJ; do
-
-    case $var in
-    old_archive_cmds_GCJ | \
-    old_archive_from_new_cmds_GCJ | \
-    archive_cmds_GCJ | \
-    archive_expsym_cmds_GCJ | \
-    old_archive_from_expsyms_cmds_GCJ | \
-    export_symbols_cmds_GCJ | \
-    extract_expsyms_cmds | reload_cmds | finish_cmds | \
-    postinstall_cmds | postuninstall_cmds | \
-    old_postinstall_cmds | old_postuninstall_cmds | \
-    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
-      # Double-quote double-evaled strings.
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
-      ;;
-    *)
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
-      ;;
-    esac
-  done
-
-  case $lt_echo in
-  *'\$0 --fallback-echo"')
-    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
-    ;;
-  esac
-
-cfgfile="$ofile"
-
-  cat <<__EOF__ >> "$cfgfile"
-# ### BEGIN LIBTOOL TAG CONFIG: $tagname
-
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$archive_cmds_need_lc_GCJ
-
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
-
-# The host system.
-host_alias=$host_alias
-host=$host
-
-# An echo program that does not interpret backslashes.
-echo=$lt_echo
-
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
-
-# A C compiler.
-LTCC=$lt_LTCC
-
-# A language-specific compiler.
-CC=$lt_compiler_GCJ
-
-# Is the compiler the GNU C compiler?
-with_gcc=$GCC_GCJ
-
-# The linker used to build libraries.
-LD=$lt_LD_GCJ
-
-# Whether we need hard or soft links.
-LN_S=$lt_LN_S
-
-# A BSD-compatible nm program.
-NM=$lt_NM
-
-# A sed program that does not truncate output.
-SED=$lt_SED
-
-# A symbol stripping program
-STRIP=$STRIP
-
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
-
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
-
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
-
-# Used on cygwin: assembler.
-AS="$AS"
-
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
-
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
-
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl_GCJ
-
-# Object file suffix (normally "o").
-objext="$ac_objext"
-
-# Old archive suffix (normally "a").
-libext="$libext"
-
-# Executable file suffix (normally "").
-exeext="$exeext"
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_lt_prog_compiler_pic_GCJ
-pic_mode=$pic_mode
-
-# What is the maximum length of a command?
-max_cmd_len=$lt_cv_sys_max_cmd_len
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ
-
-# Must we lock files when doing compilation ?
-need_locks=$lt_need_locks
-
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
-
-# Do we need a version for libraries?
-need_version=$need_version
-
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
-
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
-
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_lt_prog_compiler_static_GCJ
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ
-
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ
-
-# Library versioning type.
-version_type=$version_type
-
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
-
-# List of archive names.  First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=$lt_library_names_spec
-
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
-
-# Commands used to build and install an old-style archive.
-RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_old_archive_cmds_GCJ
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds_F77
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
 
 # Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77
 
 # Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77
 
 # Commands used to build and install a shared archive.
-archive_cmds=$lt_archive_cmds_GCJ
-archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ
+archive_cmds=$lt_archive_cmds_F77
+archive_expsym_cmds=$lt_archive_expsym_cmds_F77
 postinstall_cmds=$lt_postinstall_cmds
 postuninstall_cmds=$lt_postuninstall_cmds
 
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds_F77
+module_expsym_cmds=$lt_module_expsym_cmds_F77
+
 # Commands to strip libraries.
 old_striplib=$lt_old_striplib
 striplib=$lt_striplib
 
 # Dependencies to place before the objects being linked to create a
 # shared library.
-predep_objects=$lt_predep_objects_GCJ
+predep_objects=$lt_predep_objects_F77
 
 # Dependencies to place after the objects being linked to create a
 # shared library.
-postdep_objects=$lt_postdep_objects_GCJ
+postdep_objects=$lt_postdep_objects_F77
 
 # Dependencies to place before the objects being linked to create a
 # shared library.
-predeps=$lt_predeps_GCJ
+predeps=$lt_predeps_F77
 
 # Dependencies to place after the objects being linked to create a
 # shared library.
-postdeps=$lt_postdeps_GCJ
+postdeps=$lt_postdeps_F77
 
 # The library search path used internally by the compiler when linking
 # a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ
+compiler_lib_search_path=$lt_compiler_lib_search_path_F77
 
 # Method to check whether dependent libraries are shared objects.
 deplibs_check_method=$lt_deplibs_check_method
@@ -16020,10 +16677,10 @@ deplibs_check_method=$lt_deplibs_check_method
 file_magic_cmd=$lt_file_magic_cmd
 
 # Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag_GCJ
+allow_undefined_flag=$lt_allow_undefined_flag_F77
 
 # Flag that forces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag_GCJ
+no_undefined_flag=$lt_no_undefined_flag_F77
 
 # Commands used to finish a libtool library installation in a directory.
 finish_cmds=$lt_finish_cmds
@@ -16050,36 +16707,45 @@ shlibpath_var=$shlibpath_var
 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
 
 # How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action_GCJ
+hardcode_action=$hardcode_action_F77
 
 # Whether we should hardcode library paths into libraries.
 hardcode_into_libs=$hardcode_into_libs
 
 # Flag to hardcode \$libdir into a binary during linking.
 # This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77
 
 # Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77
 
-# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
 # resulting binary.
-hardcode_direct=$hardcode_direct_GCJ
+hardcode_direct=$hardcode_direct_F77
 
 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
 # resulting binary.
-hardcode_minus_L=$hardcode_minus_L_GCJ
+hardcode_minus_L=$hardcode_minus_L_F77
 
 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
 # the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ
+hardcode_shlibpath_var=$hardcode_shlibpath_var_F77
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic_F77
 
 # Variables whose values should be saved in libtool wrapper scripts and
 # restored at relink time.
 variables_saved_for_relink="$variables_saved_for_relink"
 
 # Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs_GCJ
+link_all_deplibs=$link_all_deplibs_F77
 
 # Compile-time system search path for libraries
 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
@@ -16088,22 +16754,22 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
 
 # Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path_GCJ"
+fix_srcfile_path="$fix_srcfile_path_F77"
 
 # Set to yes if exported symbols are required.
-always_export_symbols=$always_export_symbols_GCJ
+always_export_symbols=$always_export_symbols_F77
 
 # The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds_GCJ
+export_symbols_cmds=$lt_export_symbols_cmds_F77
 
 # The commands to extract the exported symbol list from a shared archive.
 extract_expsyms_cmds=$lt_extract_expsyms_cmds
 
 # Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms_GCJ
+exclude_expsyms=$lt_exclude_expsyms_F77
 
 # Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms_GCJ
+include_expsyms=$lt_include_expsyms_F77
 
 # ### END LIBTOOL TAG CONFIG: $tagname
 
@@ -16114,36 +16780,43 @@ else
   # If there is no Makefile yet, we rely on a make rule to execute
   # `config.status --recheck' to rerun these tests and create the
   # libtool script then.
-  test -f Makefile && make "$ltmain"
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
 fi
 
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
 CC="$lt_save_CC"
 
+	else
+	  tagname=""
+	fi
 	;;
 
-      RC)
+      GCJ)
+	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
 
 
 
-# Source file extension for RC test sources.
-ac_ext=rc
+# Source file extension for Java test sources.
+ac_ext=java
 
-# Object file extension for compiled RC test sources.
+# Object file extension for compiled Java test sources.
 objext=o
-objext_RC=$objext
+objext_GCJ=$objext
 
 # Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
+lt_simple_compile_test_code="class foo {}\n"
 
 # Code to be used in simple link tests
-lt_simple_link_test_code="$lt_simple_compile_test_code"
+lt_simple_link_test_code='public class conftest { public static void main(String argv) {}; }\n'
 
 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
@@ -16151,4458 +16824,2016 @@ lt_simple_link_test_code="$lt_simple_compile_test_code"
 LTCC=${LTCC-"$CC"}
 
 # Allow CC to be a program name with arguments.
-set dummy $CC
-compiler="$2"
+compiler=$CC
 
 
 # Allow CC to be a program name with arguments.
 lt_save_CC="$CC"
-CC=${RC-"windres"}
-set dummy $CC
-compiler="$2"
-compiler_RC=$CC
-lt_cv_prog_compiler_c_o_RC=yes
-
-# The else clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
-  # Now quote all the things that may contain metacharacters while being
-  # careful not to overquote the AC_SUBSTed values.  We take copies of the
-  # variables and quote the copies for generation of the libtool script.
-  for var in echo old_CC old_CFLAGS AR AR_FLAGS RANLIB LN_S LTCC NM SED SHELL \
-    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
-    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
-    deplibs_check_method reload_flag reload_cmds need_locks \
-    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
-    lt_cv_sys_global_symbol_to_c_name_address \
-    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
-    old_postinstall_cmds old_postuninstall_cmds \
-    compiler_RC \
-    CC_RC \
-    LD_RC \
-    lt_prog_compiler_wl_RC \
-    lt_prog_compiler_pic_RC \
-    lt_prog_compiler_static_RC \
-    lt_prog_compiler_no_builtin_flag_RC \
-    export_dynamic_flag_spec_RC \
-    thread_safe_flag_spec_RC \
-    whole_archive_flag_spec_RC \
-    old_archive_cmds_RC \
-    old_archive_from_new_cmds_RC \
-    predep_objects_RC \
-    postdep_objects_RC \
-    predeps_RC \
-    postdeps_RC \
-    compiler_lib_search_path_RC \
-    archive_cmds_RC \
-    archive_expsym_cmds_RC \
-    postinstall_cmds_RC \
-    postuninstall_cmds_RC \
-    old_archive_from_expsyms_cmds_RC \
-    allow_undefined_flag_RC \
-    no_undefined_flag_RC \
-    export_symbols_cmds_RC \
-    hardcode_libdir_flag_spec_RC \
-    hardcode_libdir_separator_RC \
-    lt_cv_prog_compiler_c_o_RC \
-    exclude_expsyms_RC \
-    include_expsyms_RC; do
+CC=${GCJ-"gcj"}
+compiler=$CC
+compiler_GCJ=$CC
 
-    case $var in
-    old_archive_cmds_RC | \
-    old_archive_from_new_cmds_RC | \
-    archive_cmds_RC | \
-    archive_expsym_cmds_RC | \
-    old_archive_from_expsyms_cmds_RC | \
-    export_symbols_cmds_RC | \
-    extract_expsyms_cmds | reload_cmds | finish_cmds | \
-    postinstall_cmds | postuninstall_cmds | \
-    old_postinstall_cmds | old_postuninstall_cmds | \
-    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
-      # Double-quote double-evaled strings.
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
-      ;;
-    *)
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
-      ;;
-    esac
-  done
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+archive_cmds_need_lc_GCJ=no
 
-  case $lt_echo in
-  *'\$0 --fallback-echo"')
-    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
-    ;;
-  esac
 
-cfgfile="$ofile"
+lt_prog_compiler_no_builtin_flag_GCJ=
 
-  cat <<__EOF__ >> "$cfgfile"
-# ### BEGIN LIBTOOL TAG CONFIG: $tagname
+if test "$GCC" = yes; then
+  lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin'
 
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
+echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_rtti_exceptions=no
+  ac_outfile=conftest.$ac_objext
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="-fno-rtti -fno-exceptions"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:16864: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:16868: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test ! -s conftest.err; then
+       lt_cv_prog_compiler_rtti_exceptions=yes
+     fi
+   fi
+   $rm conftest*
 
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
 
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+    lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions"
+else
+    :
+fi
 
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$archive_cmds_need_lc_RC
+fi
 
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
+lt_prog_compiler_wl_GCJ=
+lt_prog_compiler_pic_GCJ=
+lt_prog_compiler_static_GCJ=
 
-# The host system.
-host_alias=$host_alias
-host=$host
+echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
 
-# An echo program that does not interpret backslashes.
-echo=$lt_echo
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl_GCJ='-Wl,'
+    lt_prog_compiler_static_GCJ='-static'
 
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_GCJ='-Bstatic'
+      fi
+      ;;
 
-# A C compiler.
-LTCC=$lt_LTCC
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4'
+      ;;
 
-# A language-specific compiler.
-CC=$lt_compiler_RC
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
 
-# Is the compiler the GNU C compiler?
-with_gcc=$GCC_RC
+    mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
+      ;;
 
-# The linker used to build libraries.
-LD=$lt_LD_RC
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic_GCJ='-fno-common'
+      ;;
 
-# Whether we need hard or soft links.
-LN_S=$lt_LN_S
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      lt_prog_compiler_can_build_shared_GCJ=no
+      enable_shared=no
+      ;;
 
-# A BSD-compatible nm program.
-NM=$lt_NM
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic_GCJ=-Kconform_pic
+      fi
+      ;;
 
-# A sed program that does not truncate output.
-SED=$lt_SED
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case "$host_cpu" in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic_GCJ='-fPIC'
+	;;
+      esac
+      ;;
 
-# A symbol stripping program
-STRIP=$STRIP
+    *)
+      lt_prog_compiler_pic_GCJ='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_GCJ='-Bstatic'
+      else
+	lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+      darwin*)
+        # PIC is the default on this platform
+        # Common symbols not allowed in MH_DYLIB files
+       case "$cc_basename" in
+         xlc*)
+         lt_prog_compiler_pic_GCJ='-qnocommon'
+         lt_prog_compiler_wl_GCJ='-Wl,'
+         ;;
+       esac
+       ;;
 
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
+    mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
+      ;;
 
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
+    hpux9* | hpux10* | hpux11*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case "$host_cpu" in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic_GCJ='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive'
+      ;;
 
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static_GCJ='-non_shared'
+      ;;
 
-# Used on cygwin: assembler.
-AS="$AS"
+    newsos6)
+      lt_prog_compiler_pic_GCJ='-KPIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
 
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
+    linux*)
+      case $CC in
+      icc* | ecc*)
+	lt_prog_compiler_wl_GCJ='-Wl,'
+	lt_prog_compiler_pic_GCJ='-KPIC'
+	lt_prog_compiler_static_GCJ='-static'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl_GCJ='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static_GCJ='-non_shared'
+        ;;
+      esac
+      ;;
 
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
-
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl_RC
-
-# Object file suffix (normally "o").
-objext="$ac_objext"
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static_GCJ='-non_shared'
+      ;;
 
-# Old archive suffix (normally "a").
-libext="$libext"
+    sco3.2v5*)
+      lt_prog_compiler_pic_GCJ='-Kpic'
+      lt_prog_compiler_static_GCJ='-dn'
+      ;;
 
-# Executable file suffix (normally "").
-exeext="$exeext"
+    solaris*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      lt_prog_compiler_pic_GCJ='-KPIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
 
-# Additional compiler flags for building library objects.
-pic_flag=$lt_lt_prog_compiler_pic_RC
-pic_mode=$pic_mode
+    sunos4*)
+      lt_prog_compiler_wl_GCJ='-Qoption ld '
+      lt_prog_compiler_pic_GCJ='-PIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
 
-# What is the maximum length of a command?
-max_cmd_len=$lt_cv_sys_max_cmd_len
+    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      lt_prog_compiler_pic_GCJ='-KPIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
 
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	lt_prog_compiler_pic_GCJ='-Kconform_pic'
+	lt_prog_compiler_static_GCJ='-Bstatic'
+      fi
+      ;;
 
-# Must we lock files when doing compilation ?
-need_locks=$lt_need_locks
+    uts4*)
+      lt_prog_compiler_pic_GCJ='-pic'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
 
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
+    *)
+      lt_prog_compiler_can_build_shared_GCJ=no
+      ;;
+    esac
+  fi
 
-# Do we need a version for libraries?
-need_version=$need_version
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6
 
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_GCJ"; then
 
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
+echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6
+if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_pic_works_GCJ=no
+  ac_outfile=conftest.$ac_objext
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic_GCJ"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:17107: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:17111: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test ! -s conftest.err; then
+       lt_prog_compiler_pic_works_GCJ=yes
+     fi
+   fi
+   $rm conftest*
 
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6
 
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_lt_prog_compiler_static_RC
+if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then
+    case $lt_prog_compiler_pic_GCJ in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;;
+     esac
+else
+    lt_prog_compiler_pic_GCJ=
+     lt_prog_compiler_can_build_shared_GCJ=no
+fi
 
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
+fi
+case "$host_os" in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic_GCJ=
+    ;;
+  *)
+    lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ"
+    ;;
+esac
 
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
+echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_c_o_GCJ=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:17167: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:17171: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test ! -s out/conftest.err; then
+       lt_cv_prog_compiler_c_o_GCJ=yes
+     fi
+   fi
+   chmod u+w .
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
+   cd ..
+   rmdir conftest
+   $rm conftest*
 
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6
 
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
 
-# Library versioning type.
-version_type=$version_type
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6
+  if test "$hard_links" = no; then
+    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
 
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
+echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
 
-# List of archive names.  First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=$lt_library_names_spec
+  runpath_var=
+  allow_undefined_flag_GCJ=
+  enable_shared_with_static_runtimes_GCJ=no
+  archive_cmds_GCJ=
+  archive_expsym_cmds_GCJ=
+  old_archive_From_new_cmds_GCJ=
+  old_archive_from_expsyms_cmds_GCJ=
+  export_dynamic_flag_spec_GCJ=
+  whole_archive_flag_spec_GCJ=
+  thread_safe_flag_spec_GCJ=
+  hardcode_libdir_flag_spec_GCJ=
+  hardcode_libdir_flag_spec_ld_GCJ=
+  hardcode_libdir_separator_GCJ=
+  hardcode_direct_GCJ=no
+  hardcode_minus_L_GCJ=no
+  hardcode_shlibpath_var_GCJ=unsupported
+  link_all_deplibs_GCJ=unknown
+  hardcode_automatic_GCJ=no
+  module_cmds_GCJ=
+  module_expsym_cmds_GCJ=
+  always_export_symbols_GCJ=no
+  export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  include_expsyms_GCJ=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_"
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  extract_expsyms_cmds=
 
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
+  case $host_os in
+  cygwin* | mingw* | pw32*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
 
-# Commands used to build and install an old-style archive.
-RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_old_archive_cmds_RC
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
+  ld_shlibs_GCJ=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
 
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix3* | aix4* | aix5*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	ld_shlibs_GCJ=no
+	cat <<EOF 1>&2
 
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
 
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_archive_cmds_RC
-archive_expsym_cmds=$lt_archive_expsym_cmds_RC
-postinstall_cmds=$lt_postinstall_cmds
-postuninstall_cmds=$lt_postuninstall_cmds
+EOF
+      fi
+      ;;
 
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
+    amigaos*)
+      archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_minus_L_GCJ=yes
 
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predep_objects=$lt_predep_objects_RC
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=$lt_postdep_objects_RC
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$lt_predeps_RC
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$lt_postdeps_RC
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path_RC
-
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
-
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd=$lt_file_magic_cmd
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag_RC
-
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag_RC
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
-
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$lt_finish_eval
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
-
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
-
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
-
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
-
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action_RC
-
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
-
-# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$hardcode_direct_RC
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$hardcode_minus_L_RC
-
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs_RC
-
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
-
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
-
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path_RC"
+      # Samuel A. Falvo II <kc5tja at dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we can't use
+      # them.
+      ld_shlibs_GCJ=no
+      ;;
 
-# Set to yes if exported symbols are required.
-always_export_symbols=$always_export_symbols_RC
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	allow_undefined_flag_GCJ=unsupported
+	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	ld_shlibs_GCJ=no
+      fi
+      ;;
 
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds_RC
+    cygwin* | mingw* | pw32*)
+      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless,
+      # as there is no search path for DLLs.
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      allow_undefined_flag_GCJ=unsupported
+      always_export_symbols_GCJ=no
+      enable_shared_with_static_runtimes_GCJ=yes
+      export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -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...
+	archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
+	else
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $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'
+      else
+	ld_shlibs=no
+      fi
+      ;;
 
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
 
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms_RC
+    solaris* | sysv5*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+	ld_shlibs_GCJ=no
+	cat <<EOF 1>&2
 
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms_RC
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
 
-# ### END LIBTOOL TAG CONFIG: $tagname
+EOF
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs_GCJ=no
+      fi
+      ;;
 
-__EOF__
+    sunos4*)
+      archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
 
+  linux*)
+    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_cmds_GCJ="$tmp_archive_cmds"
+      supports_anon_versioning=no
+      case `$LD -v 2>/dev/null` in
+        *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+        *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+        *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+        *\ 2.11.*) ;; # other 2.11 versions
+        *) supports_anon_versioning=yes ;;
+      esac
+      if test $supports_anon_versioning = yes; then
+        archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~
+cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+$echo "local: *; };" >> $output_objdir/$libname.ver~
+        $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+      else
+        archive_expsym_cmds_GCJ="$tmp_archive_cmds"
+      fi
+    else
+      ld_shlibs_GCJ=no
+    fi
+    ;;
 
-else
-  # If there is no Makefile yet, we rely on a make rule to execute
-  # `config.status --recheck' to rerun these tests and create the
-  # libtool script then.
-  test -f Makefile && make "$ltmain"
-fi
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs_GCJ=no
+      fi
+      ;;
+    esac
 
+    if test "$ld_shlibs_GCJ" = yes; then
+      runpath_var=LD_RUN_PATH
+      hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir'
+      export_dynamic_flag_spec_GCJ='${wl}--export-dynamic'
+      # ancient GNU ld didn't support --whole-archive et. al.
+      if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+ 	whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+  	whole_archive_flag_spec_GCJ=
+      fi
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      allow_undefined_flag_GCJ=unsupported
+      always_export_symbols_GCJ=yes
+      archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L_GCJ=yes
+      if test "$GCC" = yes && test -z "$link_static_flag"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	hardcode_direct_GCJ=unsupported
+      fi
+      ;;
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+    aix4* | aix5*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+	  export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+	else
+	  export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+	fi
+	aix_use_runtimelinking=no
 
-CC="$lt_save_CC"
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+	  for ld_flag in $LDFLAGS; do
+  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+  	    aix_use_runtimelinking=yes
+  	    break
+  	  fi
+	  done
+	esac
 
-	;;
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
 
-      *)
-	{ { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5
-echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
-   { (exit 1); exit 1; }; }
-	;;
-      esac
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
-      # Append the new tag name to the list of available tags.
-      available_tags="$available_tags $tagname"
-    fi
-  done
-  IFS="$lt_save_ifs"
+      archive_cmds_GCJ=''
+      hardcode_direct_GCJ=yes
+      hardcode_libdir_separator_GCJ=':'
+      link_all_deplibs_GCJ=yes
 
-  # Now substitute the updated list of available tags.
-  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
-    mv "${ofile}T" "$ofile"
-    chmod +x "$ofile"
-  else
-    rm -f "${ofile}T"
-    { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5
-echo "$as_me: error: unable to update list of available tagged configurations." >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-fi
-
-
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent'
-
-# Prevent multiple expansion
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-
-
-
-
-
-
-
-
-
-LIBTOOL_SHELL="/bin/sh ./libtool"
-#  LIBTOOL="$LIBTOOL --silent"
-KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
-
-
-# Check whether --enable-objprelink or --disable-objprelink was given.
-if test "${enable_objprelink+set}" = set; then
-  enableval="$enable_objprelink"
-  kde_use_objprelink=$enableval
-else
-  kde_use_objprelink=no
-fi;
-  if test "x$kde_use_objprelink" = "xyes"; then
-        { echo "$as_me:$LINENO: WARNING:
-------------------------------------------------------------
-Configuration option --enable-objprelink is no longer useful.
-See http:://objprelink.sourceforge.net for details:
-1- Recent binutils are fast enough to do without objprelink.
-2- Newer versions of objprelink do not need this option.
-------------------------------------------------------------
-" >&5
-echo "$as_me: WARNING:
-------------------------------------------------------------
-Configuration option --enable-objprelink is no longer useful.
-See http:://objprelink.sourceforge.net for details:
-1- Recent binutils are fast enough to do without objprelink.
-2- Newer versions of objprelink do not need this option.
-------------------------------------------------------------
-" >&2;}
-  fi
-
-
-all_libraries="$all_libraries $USER_LDFLAGS"
-all_includes="$all_includes $USER_INCLUDES"
-
-
-
-
-
-if test -z "3"; then
-  # Current default Qt version: 3.1
-  kde_qtver=3
-  kde_qtsubver=1
-else
-  kde_qtsubver=`echo "3" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
-  # following is the check if subversion isnt found in passed argument
-  if test "$kde_qtsubver" = "3"; then
-    kde_qtsubver=1
-  fi
-  kde_qtver=`echo "3" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
-  if test "$kde_qtver" = "1"; then
-    kde_qtsubver=42
-  fi
-fi
-
-if test -z ""; then
-  if test "$kde_qtver" = "2"; then
-    if test $kde_qtsubver -gt 0; then
-      kde_qt_minversion=">= Qt 2.2.2"
-    else
-      kde_qt_minversion=">= Qt 2.0.2"
-    fi
-  fi
-  if test "$kde_qtver" = "3"; then
-    if test $kde_qtsubver -gt 0; then
-      kde_qt_minversion=">= Qt 3.1.0"
-    else
-      kde_qt_minversion=">= Qt 3.0"
-    fi
-  fi
-  if test "$kde_qtver" = "1"; then
-    kde_qt_minversion=">= 1.42 and < 2.0"
-  fi
-else
-   kde_qt_minversion=
-fi
-
-if test -z ""; then
-   if test $kde_qtver = 3; then
-     if test $kde_qtsubver -gt 0; then
-       kde_qt_verstring="QT_VERSION >= 0x030100"
-     else
-       kde_qt_verstring="QT_VERSION >= 300"
-     fi
-   fi
-   if test $kde_qtver = 2; then
-     if test $kde_qtsubver -gt 0; then
-       kde_qt_verstring="QT_VERSION >= 222"
-     else
-       kde_qt_verstring="QT_VERSION >= 200"
-     fi
-   fi
-   if test $kde_qtver = 1; then
-    kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
-   fi
-else
-   kde_qt_verstring=
-fi
-
-if test $kde_qtver = 3; then
-  kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt /usr/share/qt3"
-fi
-if test $kde_qtver = 2; then
-   kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
-fi
-if test $kde_qtver = 1; then
-   kde_qt_dirs="$QTDIR /usr/lib/qt"
-fi
-
-
-   ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-      echo "$as_me:$LINENO: checking for main in -lutil" >&5
-echo $ECHO_N "checking for main in -lutil... $ECHO_C" >&6
-if test "${ac_cv_lib_util_main+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lutil  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-
-int
-main ()
-{
-main ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_util_main=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_util_main=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_util_main" >&5
-echo "${ECHO_T}$ac_cv_lib_util_main" >&6
-if test $ac_cv_lib_util_main = yes; then
-  LIBUTIL="-lutil"
-fi
-
-   echo "$as_me:$LINENO: checking for main in -lcompat" >&5
-echo $ECHO_N "checking for main in -lcompat... $ECHO_C" >&6
-if test "${ac_cv_lib_compat_main+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcompat  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-
-int
-main ()
-{
-main ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_compat_main=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_compat_main=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_compat_main" >&5
-echo "${ECHO_T}$ac_cv_lib_compat_main" >&6
-if test $ac_cv_lib_compat_main = yes; then
-  LIBCOMPAT="-lcompat"
-fi
-
-   kde_have_crypt=
-   echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
-echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
-if test "${ac_cv_lib_crypt_crypt+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcrypt  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char crypt ();
-int
-main ()
-{
-crypt ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_crypt_crypt=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_crypt_crypt=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
-echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
-if test $ac_cv_lib_crypt_crypt = yes; then
-  LIBCRYPT="-lcrypt"; kde_have_crypt=yes
-else
-  echo "$as_me:$LINENO: checking for crypt in -lc" >&5
-echo $ECHO_N "checking for crypt in -lc... $ECHO_C" >&6
-if test "${ac_cv_lib_c_crypt+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lc  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char crypt ();
-int
-main ()
-{
-crypt ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_c_crypt=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_c_crypt=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_c_crypt" >&5
-echo "${ECHO_T}$ac_cv_lib_c_crypt" >&6
-if test $ac_cv_lib_c_crypt = yes; then
-  kde_have_crypt=yes
-else
-
-        { echo "$as_me:$LINENO: WARNING: you have no crypt in either libcrypt or libc.
-You should install libcrypt from another source or configure with PAM
-support" >&5
-echo "$as_me: WARNING: you have no crypt in either libcrypt or libc.
-You should install libcrypt from another source or configure with PAM
-support" >&2;}
-	kde_have_crypt=no
-
-fi
-
-fi
-
-
-   if test $kde_have_crypt = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_CRYPT 1
-_ACEOF
-
-   fi
-
-  echo "$as_me:$LINENO: checking for socklen_t" >&5
-echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
-  if test "${ac_cv_socklen_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-
-
-     ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-
-
-    cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-
-int
-main ()
-{
-
-socklen_t a=0;
-getsockname(0,(struct sockaddr*)0, &a);
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_socklen_t=socklen_t
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-
-int
-main ()
-{
-
-int a=0;
-getsockname(0,(struct sockaddr*)0, &a);
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_socklen_t=int
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_socklen_t=size_t
-
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-    ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-fi
-
-
-  echo "$as_me:$LINENO: result: $ac_cv_socklen_t" >&5
-echo "${ECHO_T}$ac_cv_socklen_t" >&6
-  if test "$ac_cv_socklen_t" != "socklen_t"; then
-
-cat >>confdefs.h <<_ACEOF
-#define socklen_t $ac_cv_socklen_t
-_ACEOF
-
-  fi
-
-cat >>confdefs.h <<_ACEOF
-#define ksize_t socklen_t
-_ACEOF
-
-
-
-   ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-   echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
-echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
-if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldnet  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char dnet_ntoa ();
-int
-main ()
-{
-dnet_ntoa ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_dnet_dnet_ntoa=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_dnet_dnet_ntoa=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
-echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
-if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
-  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
-fi
-
-   if test $ac_cv_lib_dnet_dnet_ntoa = no; then
-      echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
-echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
-if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldnet_stub  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char dnet_ntoa ();
-int
-main ()
-{
-dnet_ntoa ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_dnet_stub_dnet_ntoa=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_dnet_stub_dnet_ntoa=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
-echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
-if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
-  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
-fi
-
-   fi
-   echo "$as_me:$LINENO: checking for inet_ntoa" >&5
-echo $ECHO_N "checking for inet_ntoa... $ECHO_C" >&6
-if test "${ac_cv_func_inet_ntoa+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char inet_ntoa (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char inet_ntoa ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_inet_ntoa) || defined (__stub___inet_ntoa)
-choke me
-#else
-char (*f) () = inet_ntoa;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != inet_ntoa;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_func_inet_ntoa=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_inet_ntoa=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_inet_ntoa" >&5
-echo "${ECHO_T}$ac_cv_func_inet_ntoa" >&6
-
-   if test $ac_cv_func_inet_ntoa = no; then
-     echo "$as_me:$LINENO: checking for inet_ntoa in -lnsl" >&5
-echo $ECHO_N "checking for inet_ntoa in -lnsl... $ECHO_C" >&6
-if test "${ac_cv_lib_nsl_inet_ntoa+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnsl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char inet_ntoa ();
-int
-main ()
-{
-inet_ntoa ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_nsl_inet_ntoa=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_nsl_inet_ntoa=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_inet_ntoa" >&5
-echo "${ECHO_T}$ac_cv_lib_nsl_inet_ntoa" >&6
-if test $ac_cv_lib_nsl_inet_ntoa = yes; then
-  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
-fi
-
-   fi
-   echo "$as_me:$LINENO: checking for connect" >&5
-echo $ECHO_N "checking for connect... $ECHO_C" >&6
-if test "${ac_cv_func_connect+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char connect (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char connect ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_connect) || defined (__stub___connect)
-choke me
-#else
-char (*f) () = connect;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != connect;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_func_connect=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_connect=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
-echo "${ECHO_T}$ac_cv_func_connect" >&6
-
-   if test $ac_cv_func_connect = no; then
-      echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
-echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
-if test "${ac_cv_lib_socket_connect+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char connect ();
-int
-main ()
-{
-connect ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_socket_connect=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_socket_connect=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
-echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
-if test $ac_cv_lib_socket_connect = yes; then
-  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
-fi
-
-   fi
-
-   echo "$as_me:$LINENO: checking for remove" >&5
-echo $ECHO_N "checking for remove... $ECHO_C" >&6
-if test "${ac_cv_func_remove+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char remove (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char remove ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_remove) || defined (__stub___remove)
-choke me
-#else
-char (*f) () = remove;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != remove;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_func_remove=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_remove=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
-echo "${ECHO_T}$ac_cv_func_remove" >&6
-
-   if test $ac_cv_func_remove = no; then
-      echo "$as_me:$LINENO: checking for remove in -lposix" >&5
-echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
-if test "${ac_cv_lib_posix_remove+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lposix  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char remove ();
-int
-main ()
-{
-remove ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_posix_remove=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_posix_remove=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
-echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
-if test $ac_cv_lib_posix_remove = yes; then
-  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
-fi
-
-   fi
-
-   # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
-   echo "$as_me:$LINENO: checking for shmat" >&5
-echo $ECHO_N "checking for shmat... $ECHO_C" >&6
-if test "${ac_cv_func_shmat+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char shmat (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char shmat ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_shmat) || defined (__stub___shmat)
-choke me
-#else
-char (*f) () = shmat;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != shmat;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_func_shmat=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_shmat=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
-echo "${ECHO_T}$ac_cv_func_shmat" >&6
-if test $ac_cv_func_shmat = yes; then
-  :
-else
-  echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
-echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
-if test "${ac_cv_lib_ipc_shmat+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lipc  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char shmat ();
-int
-main ()
-{
-shmat ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_ipc_shmat=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_ipc_shmat=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
-echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
-if test $ac_cv_lib_ipc_shmat = yes; then
-  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
-fi
-
-fi
-
-
-   # darwin needs this to initialize the environment
-
-for ac_header in crt_externs.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc in
-  yes:no )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf at gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-  no:yes )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf at gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-   echo "$as_me:$LINENO: checking for _NSGetEnviron" >&5
-echo $ECHO_N "checking for _NSGetEnviron... $ECHO_C" >&6
-if test "${ac_cv_func__NSGetEnviron+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char _NSGetEnviron (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char _NSGetEnviron ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub__NSGetEnviron) || defined (__stub____NSGetEnviron)
-choke me
-#else
-char (*f) () = _NSGetEnviron;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != _NSGetEnviron;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_func__NSGetEnviron=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func__NSGetEnviron=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func__NSGetEnviron" >&5
-echo "${ECHO_T}$ac_cv_func__NSGetEnviron" >&6
-if test $ac_cv_func__NSGetEnviron = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_NSGETENVIRON 1
-_ACEOF
-
-fi
-
-
-   # more headers that need to be explicitly included on darwin
-
-
-for ac_header in sys/types.h stdint.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc in
-  yes:no )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf at gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-  no:yes )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf at gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-   # darwin requires a poll emulation library
-   echo "$as_me:$LINENO: checking for poll in -lpoll" >&5
-echo $ECHO_N "checking for poll in -lpoll... $ECHO_C" >&6
-if test "${ac_cv_lib_poll_poll+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpoll  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char poll ();
-int
-main ()
-{
-poll ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_poll_poll=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_poll_poll=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_poll_poll" >&5
-echo "${ECHO_T}$ac_cv_lib_poll_poll" >&6
-if test $ac_cv_lib_poll_poll = yes; then
-  LIB_POLL="-lpoll"
-fi
-
-
-   # CoreAudio framework
-   if test "${ac_cv_header_CoreAudio_CoreAudio_h+set}" = set; then
-  echo "$as_me:$LINENO: checking for CoreAudio/CoreAudio.h" >&5
-echo $ECHO_N "checking for CoreAudio/CoreAudio.h... $ECHO_C" >&6
-if test "${ac_cv_header_CoreAudio_CoreAudio_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_CoreAudio_CoreAudio_h" >&5
-echo "${ECHO_T}$ac_cv_header_CoreAudio_CoreAudio_h" >&6
-else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking CoreAudio/CoreAudio.h usability" >&5
-echo $ECHO_N "checking CoreAudio/CoreAudio.h usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <CoreAudio/CoreAudio.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking CoreAudio/CoreAudio.h presence" >&5
-echo $ECHO_N "checking CoreAudio/CoreAudio.h presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <CoreAudio/CoreAudio.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc in
-  yes:no )
-    { echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: CoreAudio/CoreAudio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: CoreAudio/CoreAudio.h: proceeding with the preprocessor's result" >&2;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf at gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-  no:yes )
-    { echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: CoreAudio/CoreAudio.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: CoreAudio/CoreAudio.h: check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: CoreAudio/CoreAudio.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: CoreAudio/CoreAudio.h: proceeding with the preprocessor's result" >&2;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf at gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-echo "$as_me:$LINENO: checking for CoreAudio/CoreAudio.h" >&5
-echo $ECHO_N "checking for CoreAudio/CoreAudio.h... $ECHO_C" >&6
-if test "${ac_cv_header_CoreAudio_CoreAudio_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_header_CoreAudio_CoreAudio_h=$ac_header_preproc
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_CoreAudio_CoreAudio_h" >&5
-echo "${ECHO_T}$ac_cv_header_CoreAudio_CoreAudio_h" >&6
-
-fi
-if test $ac_cv_header_CoreAudio_CoreAudio_h = yes; then
-
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_COREAUDIO 1
-_ACEOF
-
-     FRAMEWORK_COREAUDIO="-framework CoreAudio"
-
-fi
-
-
-
-
-  echo "$as_me:$LINENO: checking if res_init needs -lresolv" >&5
-echo $ECHO_N "checking if res_init needs -lresolv... $ECHO_C" >&6
-  kde_libs_safe="$LIBS"
-  LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#include <resolv.h>
-
-int
-main ()
-{
-
-      res_init();
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-
-      LIBRESOLV="-lresolv"
-      echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_RES_INIT 1
-_ACEOF
-
-
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-  LIBS="$kde_libs_safe"
-
-
-  echo "$as_me:$LINENO: checking if res_init is available" >&5
-echo $ECHO_N "checking if res_init is available... $ECHO_C" >&6
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#include <resolv.h>
-
-int
-main ()
-{
-
-      res_init();
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-
-      echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_RES_INIT 1
-_ACEOF
-
-
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-
-
-
-   LIBSOCKET="$X_EXTRA_LIBS"
-
-
-   echo "$as_me:$LINENO: checking for killpg in -lucb" >&5
-echo $ECHO_N "checking for killpg in -lucb... $ECHO_C" >&6
-if test "${ac_cv_lib_ucb_killpg+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lucb  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char killpg ();
-int
-main ()
-{
-killpg ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_ucb_killpg=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_ucb_killpg=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_ucb_killpg" >&5
-echo "${ECHO_T}$ac_cv_lib_ucb_killpg" >&6
-if test $ac_cv_lib_ucb_killpg = yes; then
-  LIBUCB="-lucb"
-fi
-
-
-   case $host in     *-*-lynxos* )
-        echo "$as_me:$LINENO: checking LynxOS header file wrappers" >&5
-echo $ECHO_N "checking LynxOS header file wrappers... $ECHO_C" >&6
-        CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"
-        echo "$as_me:$LINENO: result: disabled" >&5
-echo "${ECHO_T}disabled" >&6
-        echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
-echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
-if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lbsd  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char gethostbyname ();
-int
-main ()
-{
-gethostbyname ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_bsd_gethostbyname=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_bsd_gethostbyname=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
-echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
-if test $ac_cv_lib_bsd_gethostbyname = yes; then
-  LIBSOCKET="-lbsd"
-fi
-          ;;
-    esac
-
-     echo "$as_me:$LINENO: checking for int" >&5
-echo $ECHO_N "checking for int... $ECHO_C" >&6
-if test "${ac_cv_type_int+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-if ((int *) 0)
-  return 0;
-if (sizeof (int))
-  return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_type_int=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_int=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
-echo "${ECHO_T}$ac_cv_type_int" >&6
-
-echo "$as_me:$LINENO: checking size of int" >&5
-echo $ECHO_N "checking size of int... $ECHO_C" >&6
-if test "${ac_cv_sizeof_int+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "$ac_cv_type_int" = yes; then
-  # The cast to unsigned long works around a bug in the HP C Compiler
-  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-  # This bug is HP SR number 8606223364.
-  if test "$cross_compiling" = yes; then
-  # Depending upon the size, compute the lo and hi bounds.
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_lo=0 ac_mid=0
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_hi=$ac_mid; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo=`expr $ac_mid + 1`
-                    if test $ac_lo -le $ac_mid; then
-                      ac_lo= ac_hi=
-                      break
-                    fi
-                    ac_mid=`expr 2 '*' $ac_mid + 1`
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_hi=-1 ac_mid=-1
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_lo=$ac_mid; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_hi=`expr '(' $ac_mid ')' - 1`
-                       if test $ac_mid -le $ac_hi; then
-                         ac_lo= ac_hi=
-                         break
-                       fi
-                       ac_mid=`expr 2 '*' $ac_mid`
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo= ac_hi=
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
-  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_hi=$ac_mid
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo=`expr '(' $ac_mid ')' + 1`
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_int=$ac_lo;;
-'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (int), 77
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; } ;;
-esac
-else
-  if test "$cross_compiling" = yes; then
-  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-long longval () { return (long) (sizeof (int)); }
-unsigned long ulongval () { return (long) (sizeof (int)); }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
-  FILE *f = fopen ("conftest.val", "w");
-  if (! f)
-    exit (1);
-  if (((long) (sizeof (int))) < 0)
-    {
-      long i = longval ();
-      if (i != ((long) (sizeof (int))))
-	exit (1);
-      fprintf (f, "%ld\n", i);
-    }
-  else
-    {
-      unsigned long i = ulongval ();
-      if (i != ((long) (sizeof (int))))
-	exit (1);
-      fprintf (f, "%lu\n", i);
-    }
-  exit (ferror (f) || fclose (f) != 0);
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_sizeof_int=`cat conftest.val`
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (int), 77
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-rm -f conftest.val
-else
-  ac_cv_sizeof_int=0
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
-echo "${ECHO_T}$ac_cv_sizeof_int" >&6
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_INT $ac_cv_sizeof_int
-_ACEOF
-
-  echo "$as_me:$LINENO: checking for long" >&5
-echo $ECHO_N "checking for long... $ECHO_C" >&6
-if test "${ac_cv_type_long+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-if ((long *) 0)
-  return 0;
-if (sizeof (long))
-  return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_type_long=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_long=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
-echo "${ECHO_T}$ac_cv_type_long" >&6
-
-echo "$as_me:$LINENO: checking size of long" >&5
-echo $ECHO_N "checking size of long... $ECHO_C" >&6
-if test "${ac_cv_sizeof_long+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "$ac_cv_type_long" = yes; then
-  # The cast to unsigned long works around a bug in the HP C Compiler
-  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-  # This bug is HP SR number 8606223364.
-  if test "$cross_compiling" = yes; then
-  # Depending upon the size, compute the lo and hi bounds.
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_lo=0 ac_mid=0
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_hi=$ac_mid; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo=`expr $ac_mid + 1`
-                    if test $ac_lo -le $ac_mid; then
-                      ac_lo= ac_hi=
-                      break
-                    fi
-                    ac_mid=`expr 2 '*' $ac_mid + 1`
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_hi=-1 ac_mid=-1
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_lo=$ac_mid; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_hi=`expr '(' $ac_mid ')' - 1`
-                       if test $ac_mid -le $ac_hi; then
-                         ac_lo= ac_hi=
-                         break
-                       fi
-                       ac_mid=`expr 2 '*' $ac_mid`
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo= ac_hi=
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
-  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_hi=$ac_mid
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo=`expr '(' $ac_mid ')' + 1`
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_long=$ac_lo;;
-'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (long), 77
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; } ;;
-esac
-else
-  if test "$cross_compiling" = yes; then
-  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-long longval () { return (long) (sizeof (long)); }
-unsigned long ulongval () { return (long) (sizeof (long)); }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
-  FILE *f = fopen ("conftest.val", "w");
-  if (! f)
-    exit (1);
-  if (((long) (sizeof (long))) < 0)
-    {
-      long i = longval ();
-      if (i != ((long) (sizeof (long))))
-	exit (1);
-      fprintf (f, "%ld\n", i);
-    }
-  else
-    {
-      unsigned long i = ulongval ();
-      if (i != ((long) (sizeof (long))))
-	exit (1);
-      fprintf (f, "%lu\n", i);
-    }
-  exit (ferror (f) || fclose (f) != 0);
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_sizeof_long=`cat conftest.val`
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (long), 77
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-rm -f conftest.val
-else
-  ac_cv_sizeof_long=0
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
-echo "${ECHO_T}$ac_cv_sizeof_long" >&6
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG $ac_cv_sizeof_long
-_ACEOF
-
-  echo "$as_me:$LINENO: checking for char *" >&5
-echo $ECHO_N "checking for char *... $ECHO_C" >&6
-if test "${ac_cv_type_char_p+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-if ((char * *) 0)
-  return 0;
-if (sizeof (char *))
-  return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_type_char_p=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_char_p=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_char_p" >&5
-echo "${ECHO_T}$ac_cv_type_char_p" >&6
-
-echo "$as_me:$LINENO: checking size of char *" >&5
-echo $ECHO_N "checking size of char *... $ECHO_C" >&6
-if test "${ac_cv_sizeof_char_p+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "$ac_cv_type_char_p" = yes; then
-  # The cast to unsigned long works around a bug in the HP C Compiler
-  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-  # This bug is HP SR number 8606223364.
-  if test "$cross_compiling" = yes; then
-  # Depending upon the size, compute the lo and hi bounds.
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (char *))) >= 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_lo=0 ac_mid=0
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (char *))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_hi=$ac_mid; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo=`expr $ac_mid + 1`
-                    if test $ac_lo -le $ac_mid; then
-                      ac_lo= ac_hi=
-                      break
-                    fi
-                    ac_mid=`expr 2 '*' $ac_mid + 1`
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (char *))) < 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_hi=-1 ac_mid=-1
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (char *))) >= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_lo=$ac_mid; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_hi=`expr '(' $ac_mid ')' - 1`
-                       if test $ac_mid -le $ac_hi; then
-                         ac_lo= ac_hi=
-                         break
-                       fi
-                       ac_mid=`expr 2 '*' $ac_mid`
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo= ac_hi=
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
-  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (char *))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_hi=$ac_mid
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo=`expr '(' $ac_mid ')' + 1`
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_char_p=$ac_lo;;
-'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char *), 77
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (char *), 77
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; } ;;
-esac
-else
-  if test "$cross_compiling" = yes; then
-  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-long longval () { return (long) (sizeof (char *)); }
-unsigned long ulongval () { return (long) (sizeof (char *)); }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
-  FILE *f = fopen ("conftest.val", "w");
-  if (! f)
-    exit (1);
-  if (((long) (sizeof (char *))) < 0)
-    {
-      long i = longval ();
-      if (i != ((long) (sizeof (char *))))
-	exit (1);
-      fprintf (f, "%ld\n", i);
-    }
-  else
-    {
-      unsigned long i = ulongval ();
-      if (i != ((long) (sizeof (char *))))
-	exit (1);
-      fprintf (f, "%lu\n", i);
-    }
-  exit (ferror (f) || fclose (f) != 0);
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_sizeof_char_p=`cat conftest.val`
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char *), 77
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (char *), 77
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-rm -f conftest.val
-else
-  ac_cv_sizeof_char_p=0
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_sizeof_char_p" >&5
-echo "${ECHO_T}$ac_cv_sizeof_char_p" >&6
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_CHAR_P $ac_cv_sizeof_char_p
-_ACEOF
-
-  echo "$as_me:$LINENO: checking for char" >&5
-echo $ECHO_N "checking for char... $ECHO_C" >&6
-if test "${ac_cv_type_char+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-if ((char *) 0)
-  return 0;
-if (sizeof (char))
-  return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_type_char=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_char=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
-echo "${ECHO_T}$ac_cv_type_char" >&6
-
-echo "$as_me:$LINENO: checking size of char" >&5
-echo $ECHO_N "checking size of char... $ECHO_C" >&6
-if test "${ac_cv_sizeof_char+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "$ac_cv_type_char" = yes; then
-  # The cast to unsigned long works around a bug in the HP C Compiler
-  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-  # This bug is HP SR number 8606223364.
-  if test "$cross_compiling" = yes; then
-  # Depending upon the size, compute the lo and hi bounds.
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_lo=0 ac_mid=0
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_hi=$ac_mid; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo=`expr $ac_mid + 1`
-                    if test $ac_lo -le $ac_mid; then
-                      ac_lo= ac_hi=
-                      break
-                    fi
-                    ac_mid=`expr 2 '*' $ac_mid + 1`
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_hi=-1 ac_mid=-1
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
+      if test "$GCC" = yes; then
+	case $host_os in aix4.012|aix4.012.*)
+	# We only want to do this on AIX 4.2 and lower, the check
+	# below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" && \
+  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	  then
+  	  # We have reworked collect2
+  	  hardcode_direct_GCJ=yes
+	  else
+  	  # We have old collect2
+  	  hardcode_direct_GCJ=unsupported
+  	  # It fails to find uninstalled libraries when the uninstalled
+  	  # path is not listed in the libpath.  Setting hardcode_minus_L
+  	  # to unsupported forces relinking
+  	  hardcode_minus_L_GCJ=yes
+  	  hardcode_libdir_flag_spec_GCJ='-L$libdir'
+  	  hardcode_libdir_separator_GCJ=
+	  fi
+	esac
+	shared_flag='-shared'
+      else
+	# not using gcc
+	if test "$host_cpu" = ia64; then
+  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+  	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+  	if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+  	fi
+	fi
+      fi
+
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      always_export_symbols_GCJ=yes
+      if test "$aix_use_runtimelinking" = yes; then
+	# Warning - without using the other runtime loading flags (-brtl),
+	# -berok will link without error, but may produce a broken library.
+	allow_undefined_flag_GCJ='-berok'
+       # Determine the default libpath from the value encoded in an empty executable.
+       cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$ac_includes_default
+
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
-test_array [0] = 0
 
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_lo=$ac_mid; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_hi=`expr '(' $ac_mid ')' - 1`
-                       if test $ac_mid -le $ac_hi; then
-                         ac_lo= ac_hi=
-                         break
-                       fi
-                       ac_mid=`expr 2 '*' $ac_mid`
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-  done
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_lo= ac_hi=
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
-  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+       hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
+	archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+       else
+	if test "$host_cpu" = ia64; then
+	  hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib'
+	  allow_undefined_flag_GCJ="-z nodefs"
+	  archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an empty executable.
+	 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$ac_includes_default
+
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
-test_array [0] = 0
 
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_hi=$ac_mid
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo=`expr '(' $ac_mid ')' + 1`
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_char=$ac_lo;;
-'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (char), 77
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; } ;;
-esac
-else
-  if test "$cross_compiling" = yes; then
-  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-long longval () { return (long) (sizeof (char)); }
-unsigned long ulongval () { return (long) (sizeof (char)); }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
-  FILE *f = fopen ("conftest.val", "w");
-  if (! f)
-    exit (1);
-  if (((long) (sizeof (char))) < 0)
-    {
-      long i = longval ();
-      if (i != ((long) (sizeof (char))))
-	exit (1);
-      fprintf (f, "%ld\n", i);
-    }
-  else
-    {
-      unsigned long i = ulongval ();
-      if (i != ((long) (sizeof (char))))
-	exit (1);
-      fprintf (f, "%lu\n", i);
-    }
-  exit (ferror (f) || fclose (f) != 0);
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_sizeof_char=`cat conftest.val`
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (char), 77
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-rm -f conftest.val
-else
-  ac_cv_sizeof_char=0
 fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
-echo "${ECHO_T}$ac_cv_sizeof_char" >&6
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_CHAR $ac_cv_sizeof_char
-_ACEOF
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+	 hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  no_undefined_flag_GCJ=' ${wl}-bernotok'
+	  allow_undefined_flag_GCJ=' ${wl}-berok'
+	  # -bexpall does not export symbols beginning with underscore (_)
+	  always_export_symbols_GCJ=yes
+	  # Exported symbols can be pulled into shared objects from archives
+	  whole_archive_flag_spec_GCJ=' '
+	  archive_cmds_need_lc_GCJ=yes
+	  # This is similar to how AIX traditionally builds it's shared libraries.
+	  archive_expsym_cmds_GCJ="\$CC $shared_flag"' -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'
+	fi
+      fi
+      ;;
 
+    amigaos*)
+      archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_minus_L_GCJ=yes
+      # see comment about different semantics on the GNU ld section
+      ld_shlibs_GCJ=no
+      ;;
 
+    bsdi[45]*)
+      export_dynamic_flag_spec_GCJ=-rdynamic
+      ;;
 
-echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec_GCJ=' '
+      allow_undefined_flag_GCJ=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      old_archive_From_new_cmds_GCJ='true'
+      # FIXME: Should let the user specify the lib program.
+      old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs'
+      fix_srcfile_path='`cygpath -w "$srcfile"`'
+      enable_shared_with_static_runtimes_GCJ=yes
+      ;;
 
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char dlopen ();
-int
-main ()
-{
-dlopen ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_dl_dlopen=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+    darwin* | rhapsody*)
+      case "$host_os" in
+        rhapsody* | darwin1.[012])
+         allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[012])
+               allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
+      esac
+      archive_cmds_need_lc_GCJ=no
+      hardcode_direct_GCJ=no
+      hardcode_automatic_GCJ=yes
+      hardcode_shlibpath_var_GCJ=unsupported
+      whole_archive_flag_spec_GCJ=''
+      link_all_deplibs_GCJ=yes
+    if test "$GCC" = yes ; then
+    	output_verbose_link_cmd='echo'
+        archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+      module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+      archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $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}'
+      module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    else
+      case "$cc_basename" in
+        xlc*)
+         output_verbose_link_cmd='echo'
+         archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+         module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+         archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         ld_shlibs_GCJ=no
+          ;;
+      esac
+    fi
+      ;;
 
-ac_cv_lib_dl_dlopen=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
-if test $ac_cv_lib_dl_dlopen = yes; then
+    dgux*)
+      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    freebsd1*)
+      ld_shlibs_GCJ=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec_GCJ='-R$libdir'
+      hardcode_direct_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_GCJ=yes
+      hardcode_minus_L_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | kfreebsd*-gnu)
+      archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      hardcode_libdir_flag_spec_GCJ='-R$libdir'
+      hardcode_direct_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	archive_cmds_GCJ='$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'
+      else
+	archive_cmds_GCJ='$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
+      hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator_GCJ=:
+      hardcode_direct_GCJ=yes
 
-LIBDL="-ldl"
-ac_cv_have_dlfcn=yes
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L_GCJ=yes
+      export_dynamic_flag_spec_GCJ='${wl}-E'
+      ;;
 
-fi
+    hpux10* | hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case "$host_cpu" in
+	hppa*64*|ia64*)
+	  archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case "$host_cpu" in
+	hppa*64*|ia64*)
+	  archive_cmds_GCJ='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  ;;
+	*)
+	  archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	case "$host_cpu" in
+	hppa*64*)
+	  hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
+	  hardcode_libdir_flag_spec_ld_GCJ='+b $libdir'
+	  hardcode_libdir_separator_GCJ=:
+	  hardcode_direct_GCJ=no
+	  hardcode_shlibpath_var_GCJ=no
+	  ;;
+	ia64*)
+	  hardcode_libdir_flag_spec_GCJ='-L$libdir'
+	  hardcode_direct_GCJ=no
+	  hardcode_shlibpath_var_GCJ=no
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L_GCJ=yes
+	  ;;
+	*)
+	  hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
+	  hardcode_libdir_separator_GCJ=:
+	  hardcode_direct_GCJ=yes
+	  export_dynamic_flag_spec_GCJ='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L_GCJ=yes
+	  ;;
+	esac
+      fi
+      ;;
 
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir'
+      fi
+      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_GCJ=:
+      link_all_deplibs_GCJ=yes
+      ;;
 
-echo "$as_me:$LINENO: checking for shl_unload in -ldld" >&5
-echo $ECHO_N "checking for shl_unload in -ldld... $ECHO_C" >&6
-if test "${ac_cv_lib_dld_shl_unload+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec_GCJ='-R$libdir'
+      hardcode_direct_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
 
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char shl_unload ();
-int
-main ()
-{
-shl_unload ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_dld_shl_unload=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+    newsos6)
+      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_GCJ=yes
+      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_GCJ=:
+      hardcode_shlibpath_var_GCJ=no
+      ;;
 
-ac_cv_lib_dld_shl_unload=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_unload" >&5
-echo "${ECHO_T}$ac_cv_lib_dld_shl_unload" >&6
-if test $ac_cv_lib_dld_shl_unload = yes; then
+    openbsd*)
+      hardcode_direct_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
+	export_dynamic_flag_spec_GCJ='${wl}-E'
+      else
+       case $host_os in
+	 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+	   archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	   hardcode_libdir_flag_spec_GCJ='-R$libdir'
+	   ;;
+	 *)
+	   archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	   hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
+	   ;;
+       esac
+      fi
+      ;;
 
-LIBDL="-ldld"
-ac_cv_have_shload=yes
+    os2*)
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_minus_L_GCJ=yes
+      allow_undefined_flag_GCJ=unsupported
+      archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
 
-fi
+    osf3*)
+      if test "$GCC" = yes; then
+	allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	allow_undefined_flag_GCJ=' -expect_unresolved \*'
+	archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_GCJ=:
+      ;;
+
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+      else
+	allow_undefined_flag_GCJ=' -expect_unresolved \*'
+	archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
 
+	# Both c and cxx compiler support -rpath directly
+	hardcode_libdir_flag_spec_GCJ='-rpath $libdir'
+      fi
+      hardcode_libdir_separator_GCJ=:
+      ;;
 
+    sco3.2v5*)
+      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var_GCJ=no
+      export_dynamic_flag_spec_GCJ='${wl}-Bexport'
+      runpath_var=LD_RUN_PATH
+      hardcode_runpath_var=yes
+      ;;
 
+    solaris*)
+      no_undefined_flag_GCJ=' -z text'
+      if test "$GCC" = yes; then
+	archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+      else
+	archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+      fi
+      hardcode_libdir_flag_spec_GCJ='-R$libdir'
+      hardcode_shlibpath_var_GCJ=no
+      case $host_os in
+      solaris2.[0-5] | solaris2.[0-5].*) ;;
+      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
+	whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;;
+      esac
+      link_all_deplibs_GCJ=yes
+      ;;
 
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_direct_GCJ=yes
+      hardcode_minus_L_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
 
+    sysv4)
+      case $host_vendor in
+	sni)
+	  archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct_GCJ=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  reload_cmds_GCJ='$CC -r -o $output$reload_objs'
+	  hardcode_direct_GCJ=no
+        ;;
+	motorola)
+	  archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var_GCJ=no
+      ;;
 
+    sysv4.3*)
+      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var_GCJ=no
+      export_dynamic_flag_spec_GCJ='-Bexport'
+      ;;
 
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	hardcode_shlibpath_var_GCJ=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	ld_shlibs_GCJ=yes
+      fi
+      ;;
 
+    sysv4.2uw2*)
+      archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_GCJ=yes
+      hardcode_minus_L_GCJ=no
+      hardcode_shlibpath_var_GCJ=no
+      hardcode_runpath_var=yes
+      runpath_var=LD_RUN_PATH
+      ;;
 
+   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
+      no_undefined_flag_GCJ='${wl}-z ${wl}text'
+      if test "$GCC" = yes; then
+	archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_GCJ='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var_GCJ=no
+      ;;
 
-for ac_func in vsnprintf snprintf
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
+    sysv5*)
+      no_undefined_flag_GCJ=' -z text'
+      # $CC -shared without GNU ld will not create a library from C++
+      # object files and a static libstdc++, better avoid it by now
+      archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+  		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+      hardcode_libdir_flag_spec_GCJ=
+      hardcode_shlibpath_var_GCJ=no
+      runpath_var='LD_RUN_PATH'
+      ;;
 
-int
-main ()
-{
-return f != $ac_func;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+    uts4*)
+      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    *)
+      ld_shlibs_GCJ=no
+      ;;
+    esac
+  fi
+
+echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5
+echo "${ECHO_T}$ld_shlibs_GCJ" >&6
+test "$ld_shlibs_GCJ" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_GCJ" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc_GCJ=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds_GCJ in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
+      $rm conftest*
+      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+  (exit $ac_status); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl_GCJ
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ
+        allow_undefined_flag_GCJ=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+  (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+  (exit $ac_status); }
+        then
+	  archive_cmds_need_lc_GCJ=no
+        else
+	  archive_cmds_need_lc_GCJ=yes
+        fi
+        allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5
+echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6
+      ;;
+    esac
+  fi
+  ;;
+esac
 
+echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+if test "$GCC" = yes; then
+  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
 fi
-done
+need_lib_prefix=unknown
+hardcode_into_libs=no
 
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
 
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
 
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
 
+aix4* | aix5*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
 
+amigaos*)
+  library_names_spec='$libname.ixlibrary $libname.a'
+  # Create ${libname}_ixlibrary.a entries in /sys/libs.
+  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+  ;;
 
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
 
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
 
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
 
-# Check whether --enable-embedded or --disable-embedded was given.
-if test "${enable_embedded+set}" = set; then
-  enableval="$enable_embedded"
-  kde_use_qt_emb=$enableval
-else
-  kde_use_qt_emb=no
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
 
-fi;
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
 
-# Check whether --enable-qtopia or --disable-qtopia was given.
-if test "${enable_qtopia+set}" = set; then
-  enableval="$enable_qtopia"
-  kde_use_qt_emb_palm=$enableval
-else
-  kde_use_qt_emb_palm=no
+  linux*)
+    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      supports_anon_versioning=no
+      case `$LD -v 2>/dev/null` in
+        *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+        *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+        *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+        *\ 2.11.*) ;; # other 2.11 versions
+        *) supports_anon_versioning=yes ;;
+      esac
+      if test $supports_anon_versioning = yes; then
+        archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
+cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+$echo "local: *; };" >> $output_objdir/$libname.ver~
+        $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+      else
+        $archive_expsym_cmds="$archive_cmds"
+      fi
+    else
+      ld_shlibs=no
+    fi
+    ;;
 
-fi;
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
 
-if test "$kde_use_qt_emb" = "no"; then
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
+  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+  if test "$GCC" = yes; then
+    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+  else
+    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+  fi
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
 
-echo "$as_me:$LINENO: checking for X" >&5
-echo $ECHO_N "checking for X... $ECHO_C" >&6
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
 
+freebsd1*)
+  dynamic_linker=no
+  ;;
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+kfreebsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
 
-if test "${kde_cv_have_x+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  # One or both of the vars are not set, and there is no cached value.
-if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
-   kde_x_includes=NO
-else
-   kde_x_includes=$x_includes
-fi
-if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then
-   kde_x_libraries=NO
-else
-   kde_x_libraries=$x_libraries
-fi
+freebsd*)
+  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.01* | freebsdelf3.01*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  *) # from 3.2 on
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
 
-# below we use the standard autoconf calls
-ac_x_libraries=$kde_x_libraries
-ac_x_includes=$kde_x_includes
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
 
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case "$host_cpu" in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
 
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
 
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
 
-if test "$ac_x_includes" = NO; then
-  # Guess where to find include files, by looking for this one X11 .h file.
-  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
+# This must be Linux ELF.
+linux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
 
-  # First, try using that file with no special directory specified.
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$x_direct_test_include>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-  else
-    ac_cpp_err=
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
   fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  # We can compile using X headers with no special include directory.
-ac_x_includes=
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-  # Look for the header file in a standard set of common directories.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-  for ac_dir in               \
-    /usr/X11/include          \
-    /usr/X11R6/include        \
-    /usr/X11R5/include        \
-    /usr/X11R4/include        \
-                              \
-    /usr/include/X11          \
-    /usr/include/X11R6        \
-    /usr/include/X11R5        \
-    /usr/include/X11R4        \
-                              \
-    /usr/local/X11/include    \
-    /usr/local/X11R6/include  \
-    /usr/local/X11R5/include  \
-    /usr/local/X11R4/include  \
-                              \
-    /usr/local/include/X11    \
-    /usr/local/include/X11R6  \
-    /usr/local/include/X11R5  \
-    /usr/local/include/X11R4  \
-                              \
-    /usr/X386/include         \
-    /usr/x386/include         \
-    /usr/XFree86/include/X11  \
-                              \
-    /usr/include              \
-    /usr/local/include        \
-    /usr/unsupported/include  \
-    /usr/athena/include       \
-    /usr/local/x11r5/include  \
-    /usr/lpp/Xamples/include  \
-                              \
-    /usr/openwin/include      \
-    /usr/openwin/share/include \
-    ; \
-  do
-    if test -r "$ac_dir/$x_direct_test_include"; then
-      ac_x_includes=$ac_dir
-      break
-    fi
-  done
-fi
-rm -f conftest.err conftest.$ac_ext
-fi # $ac_x_includes = NO
-
-if test "$ac_x_libraries" = NO; then
-  # Check for the libraries.
-
-  test -z "$x_direct_test_library" && x_direct_test_library=Xt
-  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
+  case $host_cpu:$lt_cv_cc_64bit_output in
+  powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
+    sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/X11R6/lib64"
+    sys_lib_search_path_spec="/lib64 /usr/lib64 /usr/local/lib64 /usr/X11R6/lib64"
+    ;;
+  esac
 
-  # See if we find them without any special options.
-  # Don't add to $LIBS permanently.
-  ac_save_LIBS="$LIBS"
-  LIBS="-l$x_direct_test_library $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
 
-int
-main ()
-{
-${x_direct_test_function}()
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+  # Find out which ABI we are using (multilib Linux x86_64 hack).
+  libsuff=
+  case "$host_cpu" in
+  x86_64*)
+    echo '#line 18547 "configure"' > conftest.$ac_ext
+    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  LIBS="$ac_save_LIBS"
-# We can link X programs with no special library path.
-ac_x_libraries=
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-LIBS="$ac_save_LIBS"
-# First see if replacing the include by lib works.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-for ac_dir in `echo "$ac_x_includes" | sed s/include/lib${kdelibsuff}/` \
-    /usr/X11/lib${kdelibsuff}           \
-    /usr/X11R6/lib${kdelibsuff}         \
-    /usr/X11R5/lib${kdelibsuff}         \
-    /usr/X11R4/lib${kdelibsuff}         \
-                                        \
-    /usr/lib${kdelibsuff}/X11           \
-    /usr/lib${kdelibsuff}/X11R6         \
-    /usr/lib${kdelibsuff}/X11R5         \
-    /usr/lib${kdelibsuff}/X11R4         \
-                                        \
-    /usr/local/X11/lib${kdelibsuff}     \
-    /usr/local/X11R6/lib${kdelibsuff}   \
-    /usr/local/X11R5/lib${kdelibsuff}   \
-    /usr/local/X11R4/lib${kdelibsuff}   \
-                                        \
-    /usr/local/lib${kdelibsuff}/X11     \
-    /usr/local/lib${kdelibsuff}/X11R6   \
-    /usr/local/lib${kdelibsuff}/X11R5   \
-    /usr/local/lib${kdelibsuff}/X11R4   \
-                                        \
-    /usr/X386/lib${kdelibsuff}          \
-    /usr/x386/lib${kdelibsuff}          \
-    /usr/XFree86/lib${kdelibsuff}/X11   \
-                                        \
-    /usr/lib${kdelibsuff}               \
-    /usr/local/lib${kdelibsuff}         \
-    /usr/unsupported/lib${kdelibsuff}   \
-    /usr/athena/lib${kdelibsuff}        \
-    /usr/local/x11r5/lib${kdelibsuff}   \
-    /usr/lpp/Xamples/lib${kdelibsuff}   \
-    /lib/usr/lib${kdelibsuff}/X11       \
-                                        \
-    /usr/openwin/lib${kdelibsuff}       \
-    /usr/openwin/share/lib${kdelibsuff} \
-    ; \
-do
-  for ac_extension in a so sl; do
-    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
-      ac_x_libraries=$ac_dir
-      break 2
+  (exit $ac_status); }; then
+      case `/usr/bin/file conftest.$ac_objext` in
+      *64-bit*)
+        libsuff=64
+        ;;
+      esac
     fi
-  done
-done
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi # $ac_x_libraries = NO
+    rm -rf conftest*
+    ;;
+  *)
+    ;;
+  esac
+  sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
+  sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+  ;;
+
+knetbsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
 
-case "$host" in
-mips-sgi-irix6*)
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
   ;;
-*-*-solaris*)
+
+nto-qnx*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
   ;;
-*)
-  rm -fr conftest.dir
-if mkdir conftest.dir; then
-  cd conftest.dir
-  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
-  cat >Imakefile <<'_ACEOF'
-acfindx:
-	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
-_ACEOF
-  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
-    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
-    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
-    for ac_extension in a so sl; do
-      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
-         test -f $ac_im_libdir/libX11.$ac_extension; then
-        ac_im_usrlibdir=$ac_im_libdir; break
-      fi
-    done
-    # Screen out bogus values from the imake configuration.  They are
-    # bogus both because they are the default anyway, and because
-    # using them would break gcc on systems where it needs fixed includes.
-    case $ac_im_incroot in
-	/usr/include) ;;
-	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
-    esac
-    case $ac_im_usrlibdir in
-	/usr/lib | /lib) ;;
-	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
-    esac
+
+openbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
   fi
-  cd ..
-  rm -fr conftest.dir
-fi
+  ;;
 
-  if test -z "$ac_x_includes"; then
-    ac_x_includes="."
-  fi
-  if test -z "$ac_x_libraries"; then
-    ac_x_libraries="/usr/lib${kdelibsuff}"
-  fi
-esac
-#from now on we use our own again
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
 
-# when the user already gave --x-includes, we ignore
-# what the standard autoconf macros told us.
-if test "$kde_x_includes" = NO; then
-  kde_x_includes=$ac_x_includes
-fi
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
 
-# for --x-libraries too
-if test "$kde_x_libraries" = NO; then
-  kde_x_libraries=$ac_x_libraries
-fi
+sco3.2v5*)
+  version_type=osf
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
 
-if test "$kde_x_includes" = NO; then
-  { { echo "$as_me:$LINENO: error: Can't find X includes. Please check your installation and add the correct paths!" >&5
-echo "$as_me: error: Can't find X includes. Please check your installation and add the correct paths!" >&2;}
-   { (exit 1); exit 1; }; }
-fi
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
 
-if test "$kde_x_libraries" = NO; then
-  { { echo "$as_me:$LINENO: error: Can't find X libraries. Please check your installation and add the correct paths!" >&5
-echo "$as_me: error: Can't find X libraries. Please check your installation and add the correct paths!" >&2;}
-   { (exit 1); exit 1; }; }
-fi
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
 
-# Record where we found X for the cache.
-kde_cv_have_x="have_x=yes \
-         kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
 
-fi
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
 
-eval "$kde_cv_have_x"
+*)
+  dynamic_linker=no
+  ;;
+esac
+echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6
+test "$dynamic_linker" = no && can_build_shared=no
 
-if test "$have_x" != yes; then
-  echo "$as_me:$LINENO: result: $have_x" >&5
-echo "${ECHO_T}$have_x" >&6
-  no_x=yes
+echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
+hardcode_action_GCJ=
+if test -n "$hardcode_libdir_flag_spec_GCJ" || \
+   test -n "$runpath_var_GCJ" || \
+   test "X$hardcode_automatic_GCJ" = "Xyes" ; then
+
+  # We can hardcode non-existant directories.
+  if test "$hardcode_direct_GCJ" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no &&
+     test "$hardcode_minus_L_GCJ" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action_GCJ=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action_GCJ=immediate
+  fi
 else
-  echo "$as_me:$LINENO: result: libraries $kde_x_libraries, headers $kde_x_includes" >&5
-echo "${ECHO_T}libraries $kde_x_libraries, headers $kde_x_includes" >&6
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action_GCJ=unsupported
 fi
+echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5
+echo "${ECHO_T}$hardcode_action_GCJ" >&6
 
-if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
-  X_INCLUDES=""
-  x_includes=".";  else
-  x_includes=$kde_x_includes
-  X_INCLUDES="-I$x_includes"
+if test "$hardcode_action_GCJ" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
 fi
 
-if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then
-  X_LDFLAGS=""
-  x_libraries="/usr/lib";  else
-  x_libraries=$kde_x_libraries
-  X_LDFLAGS="-L$x_libraries"
+striplib=
+old_striplib=
+echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+   darwin*)
+       if test -n "$STRIP" ; then
+         striplib="$STRIP -x"
+         echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+       else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+       ;;
+   *)
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+    ;;
+  esac
 fi
-all_includes="$X_INCLUDES"
-all_libraries="$X_LDFLAGS"
-
 
+if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
 
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
 
+  mingw* | pw32*)
+    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen_libs=
+   ;;
 
+  cygwin*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+   ;;
 
-# Check for libraries that X11R6 Xt/Xaw programs need.
-ac_save_LDFLAGS="$LDFLAGS"
-LDFLAGS="$LDFLAGS $X_LDFLAGS"
-# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
-# check for ICE first), but we must link in the order -lSM -lICE or
-# we get undefined symbols.  So assume we have SM if we have ICE.
-# These have to be linked with before -lX11, unlike the other
-# libraries we check for below, so use a different variable.
-#  --interran at uluru.Stanford.EDU, kb at cs.umb.edu.
-echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
-echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
-if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
+  darwin*)
+  # if libdl is installed we need to link against it
+    echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lICE $X_EXTRA_LIBS $LIBS"
+LIBS="-ldl  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -20615,266 +18846,164 @@ extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
-char IceConnectionNumber ();
+char dlopen ();
 int
 main ()
 {
-IceConnectionNumber ();
+dlopen ();
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_ICE_IceConnectionNumber=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_ICE_IceConnectionNumber=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
-echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
-if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
-  LIBSM="-lSM -lICE"
-fi
-
-
-LDFLAGS="$ac_save_LDFLAGS"
-
-
-
-LIB_X11='-lX11 $(LIBSOCKET)'
-
-
-echo "$as_me:$LINENO: checking for libXext" >&5
-echo $ECHO_N "checking for libXext... $ECHO_C" >&6
-if test "${kde_cv_have_libXext+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-kde_ldflags_safe="$LDFLAGS"
-kde_libs_safe="$LIBS"
-
-LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
-LIBS="-lXext -lX11 $LIBSOCKET"
-
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <stdio.h>
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-#endif
-
-int
-main ()
-{
-
-printf("hello Xext\n");
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  kde_cv_have_libXext=yes
+  ac_cv_lib_dl_dlopen=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-kde_cv_have_libXext=no
-
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-
-LDFLAGS=$kde_ldflags_safe
-LIBS=$kde_libs_safe
-
+ac_cv_lib_dl_dlopen=no
 fi
-
-
-echo "$as_me:$LINENO: result: $kde_cv_have_libXext" >&5
-echo "${ECHO_T}$kde_cv_have_libXext" >&6
-
-if test "$kde_cv_have_libXext" = "no"; then
-  { { echo "$as_me:$LINENO: error: We need a working libXext to proceed. Since configure
-can't find it itself, we stop here assuming that make wouldn't find
-them either." >&5
-echo "$as_me: error: We need a working libXext to proceed. Since configure
-can't find it itself, we stop here assuming that make wouldn't find
-them either." >&2;}
-   { (exit 1); exit 1; }; }
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-
-echo "$as_me:$LINENO: checking for Xinerama" >&5
-echo $ECHO_N "checking for Xinerama... $ECHO_C" >&6
-
-
-# Check whether --with-xinerama or --without-xinerama was given.
-if test "${with_xinerama+set}" = set; then
-  withval="$with_xinerama"
-
-    no_xinerama=no
-
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
 else
 
-    no_xinerama=yes
-
-
-fi;
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
 
-kde_save_LDFLAGS="$LDFLAGS"
-kde_save_CFLAGS="$CFLAGS"
-kde_save_LIBS="$LIBS"
-LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
-CFLAGS="$CFLAGS -I$x_includes"
-LIBS="-lXinerama -lXext"
+fi
 
-if test "x$no_xinerama" = "xno"; then
+   ;;
 
-  if test "${ac_cv_have_xinerama+set}" = set; then
+  *)
+    echo "$as_me:$LINENO: checking for shl_load" >&5
+echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
+if test "${ac_cv_func_shl_load+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-
-	  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <X11/Xlib.h>
-  			#include <X11/extensions/Xinerama.h>
+/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define shl_load innocuous_shl_load
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char shl_load (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef shl_load
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char shl_load ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_shl_load) || defined (__stub___shl_load)
+choke me
+#else
+char (*f) () = shl_load;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
 int
 main ()
 {
-XineramaIsActive(NULL);
+return f != shl_load;
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_have_xinerama="yes"
+  ac_cv_func_shl_load=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_have_xinerama="no"
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-
-fi
-
-else
-  ac_cv_have_xinerama=no;
+ac_cv_func_shl_load=no
 fi
-
-echo "$as_me:$LINENO: result: $ac_cv_have_xinerama" >&5
-echo "${ECHO_T}$ac_cv_have_xinerama" >&6
-
-LIBXINERAMA=""
-
-if test "$ac_cv_have_xinerama" = "yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_XINERAMA 1
-_ACEOF
-
-  LIBXINERAMA="-lXinerama"
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
 fi
-
-
-
-LDFLAGS="$kde_save_LDFLAGS"
-CFLAGS="$kde_save_CFLAGS"
-LIBS="$kde_save_LIBS"
-
-LIB_XEXT="-lXext"
-QTE_NORTTI=""
-
+echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
+echo "${ECHO_T}$ac_cv_func_shl_load" >&6
+if test $ac_cv_func_shl_load = yes; then
+  lt_cv_dlopen="shl_load"
 else
-    CPPFLAGS=-DQWS
-  CXXFLAGS="$CXXFLAGS -fno-rtti"
-  QTE_NORTTI="-fno-rtti -DQWS"
-  X_PRE_LIBS=""
-  LIB_X11=""
-  LIB_XEXT=""
-  LIBSM=""
-  X_INCLUDES=""
-  X_LDFLAGS=""
-  x_includes=""
-  x_libraries=""
-
-
-
-
-
-
-
-fi
-
-
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-
-echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
-echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
-if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
+  echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread  $LIBS"
+LIBS="-ldld  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -20887,215 +19016,154 @@ extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
-char pthread_create ();
+char shl_load ();
 int
 main ()
 {
-pthread_create ();
+shl_load ();
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_pthread_pthread_create=yes
+  ac_cv_lib_dld_shl_load=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_pthread_pthread_create=no
+ac_cv_lib_dld_shl_load=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
-echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
-if test $ac_cv_lib_pthread_pthread_create = yes; then
-  LIBPTHREAD="-lpthread"
-fi
-
-
-
-
-    # Check whether --enable-kernel-threads or --disable-kernel-threads was given.
-if test "${enable_kernel_threads+set}" = set; then
-  enableval="$enable_kernel_threads"
-  kde_use_kernthreads=$enableval
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
+if test $ac_cv_lib_dld_shl_load = yes; then
+  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
 else
-  kde_use_kernthreads=no
-fi;
-
-    if test "$kde_use_kernthreads" = "yes"; then
-      ac_save_CXXFLAGS="$CXXFLAGS"
-      ac_save_CFLAGS="$CFLAGS"
-      CXXFLAGS="-I/usr/local/include/pthread/linuxthreads $CXXFLAGS"
-      CFLAGS="-I/usr/local/include/pthread/linuxthreads $CFLAGS"
-
-for ac_header in pthread/linuxthreads/pthread.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for dlopen" >&5
+echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
+if test "${ac_cv_func_dlopen+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define dlopen innocuous_dlopen
 
-ac_header_compiler=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char dlopen (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
 
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef dlopen
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_dlopen) || defined (__stub___dlopen)
+choke me
+#else
+char (*f) () = dlopen;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != dlopen;
+  ;
+  return 0;
+}
 _ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc in
-  yes:no )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf at gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-  no:yes )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf at gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_dlopen=yes
 else
-  eval "$as_ac_Header=$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+ac_cv_func_dlopen=no
 fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
 fi
-
-done
-
-      CXXFLAGS="$ac_save_CXXFLAGS"
-      CFLAGS="$ac_save_CFLAGS"
-      if test "$ac_cv_header_pthread_linuxthreads_pthread_h" = "no"; then
-        kde_use_kernthreads=no
-      else
-                echo "$as_me:$LINENO: checking for pthread_join in -llthread" >&5
-echo $ECHO_N "checking for pthread_join in -llthread... $ECHO_C" >&6
-if test "${ac_cv_lib_lthread_pthread_join+set}" = set; then
+echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+echo "${ECHO_T}$ac_cv_func_dlopen" >&6
+if test $ac_cv_func_dlopen = yes; then
+  lt_cv_dlopen="dlopen"
+else
+  echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-llthread  $LIBS"
+LIBS="-ldl  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -21108,1590 +19176,1326 @@ extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
-char pthread_join ();
+char dlopen ();
 int
 main ()
 {
-pthread_join ();
+dlopen ();
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_lthread_pthread_join=yes
+  ac_cv_lib_dl_dlopen=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_lthread_pthread_join=no
+ac_cv_lib_dl_dlopen=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_lthread_pthread_join" >&5
-echo "${ECHO_T}$ac_cv_lib_lthread_pthread_join" >&6
-if test $ac_cv_lib_lthread_pthread_join = yes; then
-  LIBPTHREAD="-llthread -llgcc_r"
-fi
-         if test "x$LIBPTHREAD" = "x"; then
-          kde_use_kernthreads=no
-        else
-          USE_THREADS="-D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads"
-        fi
-      fi
-    else
-      USE_THREADS=""
-      if test -z "$LIBPTHREAD"; then
-
-echo "$as_me:$LINENO: checking whether $CXX supports -pthread" >&5
-echo $ECHO_N "checking whether $CXX supports -pthread... $ECHO_C" >&6
-kde_cache=`echo pthread | sed 'y% .=/+-%____p_%'`
-if eval "test \"\${kde_cv_prog_cxx_$kde_cache+set}\" = set"; then
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+  echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
+echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-
-
-
-   ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-
-
-  save_CXXFLAGS="$CXXFLAGS"
-  CXXFLAGS="$CXXFLAGS -pthread"
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
 int
 main ()
 {
- return 0;
+dlopen ();
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  eval "kde_cv_prog_cxx_$kde_cache=yes"
+  ac_cv_lib_svld_dlopen=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+ac_cv_lib_svld_dlopen=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-  CXXFLAGS="$save_CXXFLAGS"
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-
-if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- :
- USE_THREADS="-pthread"
+echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
+if test $ac_cv_lib_svld_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
 else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- :
-
-fi
-
-      fi
-    fi
-
-
-
-    case $host_os in
- 	solaris*)
-
-echo "$as_me:$LINENO: checking whether $CXX supports -mt" >&5
-echo $ECHO_N "checking whether $CXX supports -mt... $ECHO_C" >&6
-kde_cache=`echo mt | sed 'y% .=/+-%____p_%'`
-if eval "test \"\${kde_cv_prog_cxx_$kde_cache+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
+echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-
-
-
-   ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-
-
-  save_CXXFLAGS="$CXXFLAGS"
-  CXXFLAGS="$CXXFLAGS -mt"
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dld_link ();
 int
 main ()
 {
- return 0;
+dld_link ();
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  eval "kde_cv_prog_cxx_$kde_cache=yes"
+  ac_cv_lib_dld_dld_link=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+ac_cv_lib_dld_dld_link=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
+if test $ac_cv_lib_dld_dld_link = yes; then
+  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
+fi
+
+
+fi
+
+
+fi
+
+
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-  CXXFLAGS="$save_CXXFLAGS"
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 fi
 
-if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- :
- USE_THREADS="-mt"
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- :
-
-fi
-
-                CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
-    		;;
-        freebsd*)
-                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
-                ;;
-        aix*)
-                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
-                LIBPTHREAD="$LIBPTHREAD -lc_r"
-                ;;
-        linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
-                if test "$CXX" = "KCC"; then
-                  CXXFLAGS="$CXXFLAGS --thread_safe"
-		  NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
-                fi
-                ;;
-	*)
-		;;
-    esac
 
+fi
+
+    ;;
+  esac
+
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
 
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
 
+    save_LDFLAGS="$LDFLAGS"
+    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
 
-echo "$as_me:$LINENO: checking for extra includes" >&5
-echo $ECHO_N "checking for extra includes... $ECHO_C" >&6
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
 
-# Check whether --with-extra-includes or --without-extra-includes was given.
-if test "${with_extra_includes+set}" = set; then
-  withval="$with_extra_includes"
-  kde_use_extra_includes="$withval"
+    echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
+echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  	  if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self=cross
 else
-  kde_use_extra_includes=NONE
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<EOF
+#line 19407 "configure"
+#include "confdefs.h"
 
-fi;
-kde_extra_includes=
-if test -n "$kde_use_extra_includes" && \
-   test "$kde_use_extra_includes" != "NONE"; then
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
 
-   ac_save_ifs=$IFS
-   IFS=':'
-   for dir in $kde_use_extra_includes; do
-     kde_extra_includes="$kde_extra_includes $dir"
-     USER_INCLUDES="$USER_INCLUDES -I$dir"
-   done
-   IFS=$ac_save_ifs
-   kde_use_extra_includes="added"
-else
-   kde_use_extra_includes="no"
+    exit (status);
+}
+EOF
+  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self=no
+  fi
 fi
+rm -fr conftest*
 
 
-echo "$as_me:$LINENO: result: $kde_use_extra_includes" >&5
-echo "${ECHO_T}$kde_use_extra_includes" >&6
-
-kde_extra_libs=
-echo "$as_me:$LINENO: checking for extra libs" >&5
-echo $ECHO_N "checking for extra libs... $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self" >&6
 
-# Check whether --with-extra-libs or --without-extra-libs was given.
-if test "${with_extra_libs+set}" = set; then
-  withval="$with_extra_libs"
-  kde_use_extra_libs=$withval
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      LDFLAGS="$LDFLAGS $link_static_flag"
+      echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
+echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self_static+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  kde_use_extra_libs=NONE
-
-fi;
-if test -n "$kde_use_extra_libs" && \
-   test "$kde_use_extra_libs" != "NONE"; then
-
-   ac_save_ifs=$IFS
-   IFS=':'
-   for dir in $kde_use_extra_libs; do
-     kde_extra_libs="$kde_extra_libs $dir"
-     KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
-     USER_LDFLAGS="$USER_LDFLAGS -L$dir"
-   done
-   IFS=$ac_save_ifs
-   kde_use_extra_libs="added"
+  	  if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self_static=cross
 else
-   kde_use_extra_libs="no"
-fi
-
-
-
-echo "$as_me:$LINENO: result: $kde_use_extra_libs" >&5
-echo "${ECHO_T}$kde_use_extra_libs" >&6
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<EOF
+#line 19505 "configure"
+#include "confdefs.h"
 
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
 
+#include <stdio.h>
 
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
 
-echo "$as_me:$LINENO: checking for libz" >&5
-echo $ECHO_N "checking for libz... $ECHO_C" >&6
-if test "${ac_cv_lib_z+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
 
-kde_save_LIBS="$LIBS"
-LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
-kde_save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
 
-#include<zlib.h>
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
 
-int
-main ()
-{
-return (zlibVersion() == ZLIB_VERSION);
-  ;
-  return 0;
+    exit (status);
 }
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+EOF
+  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "ac_cv_lib_z='-lz'"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "ac_cv_lib_z=no"
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS="$kde_save_LIBS"
-CFLAGS="$kde_save_CFLAGS"
-
+  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self_static=no
+  fi
 fi
-if test ! "$ac_cv_lib_z" = no; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBZ 1
-_ACEOF
-
-  LIBZ="$ac_cv_lib_z"
+rm -fr conftest*
 
-  echo "$as_me:$LINENO: result: $ac_cv_lib_z" >&5
-echo "${ECHO_T}$ac_cv_lib_z" >&6
-else
-  { { echo "$as_me:$LINENO: error: not found. Check your installation and look into config.log" >&5
-echo "$as_me: error: not found. Check your installation and look into config.log" >&2;}
-   { (exit 1); exit 1; }; }
-  LIBZ=""
 
 fi
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
+    fi
 
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
 
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
 
-
-echo "$as_me:$LINENO: checking for libpng" >&5
-echo $ECHO_N "checking for libpng... $ECHO_C" >&6
-if test "${ac_cv_lib_png+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-kde_save_LIBS="$LIBS"
-if test "x$kde_use_qt_emb" != "xyes"; then
-LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
-else
-LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
+  case $lt_cv_dlopen_self_static in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
+  esac
 fi
-kde_save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-    #include<png.h>
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler_GCJ \
+    CC_GCJ \
+    LD_GCJ \
+    lt_prog_compiler_wl_GCJ \
+    lt_prog_compiler_pic_GCJ \
+    lt_prog_compiler_static_GCJ \
+    lt_prog_compiler_no_builtin_flag_GCJ \
+    export_dynamic_flag_spec_GCJ \
+    thread_safe_flag_spec_GCJ \
+    whole_archive_flag_spec_GCJ \
+    enable_shared_with_static_runtimes_GCJ \
+    old_archive_cmds_GCJ \
+    old_archive_from_new_cmds_GCJ \
+    predep_objects_GCJ \
+    postdep_objects_GCJ \
+    predeps_GCJ \
+    postdeps_GCJ \
+    compiler_lib_search_path_GCJ \
+    archive_cmds_GCJ \
+    archive_expsym_cmds_GCJ \
+    postinstall_cmds_GCJ \
+    postuninstall_cmds_GCJ \
+    old_archive_from_expsyms_cmds_GCJ \
+    allow_undefined_flag_GCJ \
+    no_undefined_flag_GCJ \
+    export_symbols_cmds_GCJ \
+    hardcode_libdir_flag_spec_GCJ \
+    hardcode_libdir_flag_spec_ld_GCJ \
+    hardcode_libdir_separator_GCJ \
+    hardcode_automatic_GCJ \
+    module_cmds_GCJ \
+    module_expsym_cmds_GCJ \
+    lt_cv_prog_compiler_c_o_GCJ \
+    exclude_expsyms_GCJ \
+    include_expsyms_GCJ; do
+
+    case $var in
+    old_archive_cmds_GCJ | \
+    old_archive_from_new_cmds_GCJ | \
+    archive_cmds_GCJ | \
+    archive_expsym_cmds_GCJ | \
+    module_cmds_GCJ | \
+    module_expsym_cmds_GCJ | \
+    old_archive_from_expsyms_cmds_GCJ | \
+    export_symbols_cmds_GCJ | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
 
-int
-main ()
-{
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
 
-    png_structp png_ptr = png_create_read_struct(  /* image ptr */
-		PNG_LIBPNG_VER_STRING, 0, 0, 0 );
-    return( png_ptr != 0 );
+cfgfile="$ofile"
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "ac_cv_lib_png='-lpng $LIBZ -lm'"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  cat <<__EOF__ >> "$cfgfile"
+# ### BEGIN LIBTOOL TAG CONFIG: $tagname
 
-eval "ac_cv_lib_png=no"
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS="$kde_save_LIBS"
-CFLAGS="$kde_save_CFLAGS"
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
 
-fi
-if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBPNG 1
-_ACEOF
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
 
-  LIBPNG="$ac_cv_lib_png"
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_GCJ
 
-  echo "$as_me:$LINENO: result: $ac_cv_lib_png" >&5
-echo "${ECHO_T}$ac_cv_lib_png" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-  LIBPNG=""
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ
 
-fi
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
 
+# The host system.
+host_alias=$host_alias
+host=$host
 
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
 
-echo "$as_me:$LINENO: checking for libjpeg6b" >&5
-echo $ECHO_N "checking for libjpeg6b... $ECHO_C" >&6
-if test "${ac_cv_lib_jpeg_6b+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+# A C compiler.
+LTCC=$lt_LTCC
 
-ac_save_LIBS="$LIBS"
-LIBS="$all_libraries $USER_LDFLAGS -ljpeg6b -lm"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* 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 "C" {
-#endif
-    void jpeg_CreateDecompress(j_decompress_ptr cinfo,
-                                    int version, size_t structsize);
-#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.  */
+# A language-specific compiler.
+CC=$lt_compiler_GCJ
 
-int
-main ()
-{
-jpeg_CreateDecompress(0L, 0, 0);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "ac_cv_lib_jpeg_6b=-ljpeg6b"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC_GCJ
 
-eval "ac_cv_lib_jpeg_6b=no"
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS="$ac_save_LIBS"
-CFLAGS="$ac_save_CFLAGS"
+# An ERE matcher.
+EGREP=$lt_EGREP
 
-fi
+# The linker used to build libraries.
+LD=$lt_LD_GCJ
 
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
 
-if eval "test ! \"`echo $ac_cv_lib_jpeg_6b`\" = no"; then
-  LIBJPEG="$ac_cv_lib_jpeg_6b"
-  echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_6b" >&5
-echo "${ECHO_T}$ac_cv_lib_jpeg_6b" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+# A BSD-compatible nm program.
+NM=$lt_NM
 
-echo "$as_me:$LINENO: checking for libjpeg" >&5
-echo $ECHO_N "checking for libjpeg... $ECHO_C" >&6
-if test "${ac_cv_lib_jpeg_normal+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+# A symbol stripping program
+STRIP=$lt_STRIP
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
 
-ac_save_LIBS="$LIBS"
-LIBS="$all_libraries $USER_LDFLAGS -ljpeg -lm"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* 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 "C" {
-#endif
-    void jpeg_CreateDecompress(j_decompress_ptr cinfo,
-                                    int version, size_t structsize);
-#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.  */
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
 
-int
-main ()
-{
-jpeg_CreateDecompress(0L, 0, 0);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "ac_cv_lib_jpeg_normal=-ljpeg"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
 
-eval "ac_cv_lib_jpeg_normal=no"
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS="$ac_save_LIBS"
-CFLAGS="$ac_save_CFLAGS"
+# Used on cygwin: assembler.
+AS="$AS"
 
-fi
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
 
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
 
-if eval "test ! \"`echo $ac_cv_lib_jpeg_normal`\" = no"; then
-  LIBJPEG="$ac_cv_lib_jpeg_normal"
-  echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_normal" >&5
-echo "${ECHO_T}$ac_cv_lib_jpeg_normal" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_GCJ
 
-       LIBJPEG=
+# Object file suffix (normally "o").
+objext="$ac_objext"
 
+# Old archive suffix (normally "a").
+libext="$libext"
 
-fi
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
 
+# Executable file suffix (normally "").
+exeext="$exeext"
 
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_GCJ
+pic_mode=$pic_mode
 
-fi
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
 
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ
 
+# Must we lock files when doing compilation ?
+need_locks=$lt_need_locks
 
-jpeg_incdirs="$includedir /usr/include /usr/local/include $kde_extra_includes"
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
 
-jpeg_incdir=NO
-for i in $jpeg_incdirs;
-do
-  for j in jpeglib.h;
-  do
-    echo "configure: 21751: $i/$j" >&5
-    if test -r "$i/$j"; then
-      echo "taking that" >&5
-      jpeg_incdir=$i
-      break 2
-    fi
-  done
-done
+# Do we need a version for libraries?
+need_version=$need_version
 
-test "x$jpeg_incdir" = xNO && jpeg_incdir=
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
 
-if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBJPEG 1
-_ACEOF
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
 
-else
-  if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
-    { echo "$as_me:$LINENO: WARNING:
-There is an installation error in jpeg support. You seem to have only one
-of either the headers _or_ the libraries installed. You may need to either
-provide correct --with-extra-... options, or the development package of
-libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
-Disabling JPEG support.
-" >&5
-echo "$as_me: WARNING:
-There is an installation error in jpeg support. You seem to have only one
-of either the headers _or_ the libraries installed. You may need to either
-provide correct --with-extra-... options, or the development package of
-libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
-Disabling JPEG support.
-" >&2;}
-  else
-    { echo "$as_me:$LINENO: WARNING: libjpeg not found. disable JPEG support." >&5
-echo "$as_me: WARNING: libjpeg not found. disable JPEG support." >&2;}
-  fi
-  jpeg_incdir=
-  LIBJPEG=
-fi
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_GCJ
 
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ
 
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ
 
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ
 
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ
 
+# Library versioning type.
+version_type=$version_type
 
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
 
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
 
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
 
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds_GCJ
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
 
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ
 
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ
 
-# Check whether --enable-mt or --disable-mt was given.
-if test "${enable_mt+set}" = set; then
-  enableval="$enable_mt"
-  kde_use_qt_mt=$enableval
-else
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds_GCJ
+archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
 
-    if test $kde_qtver = 3; then
-      kde_use_qt_mt=yes
-    else
-      kde_use_qt_mt=no
-    fi
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds_GCJ
+module_expsym_cmds=$lt_module_expsym_cmds_GCJ
 
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
 
-fi;
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_predep_objects_GCJ
 
-USING_QT_MT=""
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects_GCJ
 
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps_GCJ
 
-KDE_MT_LDFLAGS=
-KDE_MT_LIBS=
-if test "x$kde_use_qt_mt" = "xyes"; then
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps_GCJ
 
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ
 
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
 
-    if test -z "$LIBPTHREAD"; then
-    if test -z "$USE_THREADS"; then
-      kde_check_threading_default=no
-    else
-      kde_check_threading_default=yes
-    fi
-  else
-    kde_check_threading_default=yes
-  fi
-  # Check whether --enable-threading or --disable-threading was given.
-if test "${enable_threading+set}" = set; then
-  enableval="$enable_threading"
-  kde_use_threading=$enableval
-else
-  kde_use_threading=$kde_check_threading_default
-fi;
-  if test "x$kde_use_threading" = "xyes"; then
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LIBPTHREAD 1
-_ACEOF
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_GCJ
 
-  fi
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_GCJ
 
-  if test "x$kde_use_threading" = "xyes"; then
-    CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
-    KDE_MT_LDFLAGS="$USE_THREADS"
-    KDE_MT_LIBS="$LIBPTHREAD"
-  else
-    kde_use_qt_mt=no
-  fi
-fi
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
 
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
 
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
 
-kde_qt_was_given=yes
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
 
-if test -z "$LIBQT_GLOB"; then
-  if test "x$kde_use_qt_emb" = "xyes"; then
-    LIBQT_GLOB="libqte.*"
-  else
-    LIBQT_GLOB="libqt.*"
-  fi
-fi
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
 
-if test -z "$LIBQT"; then
-  if test "x$kde_use_qt_emb" = "xyes"; then
-    qtlib="qte"
-  else
-    qtlib="qt"
-  fi
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
 
-  kde_int_qt="-l$qtlib"
-else
-  kde_int_qt="$LIBQT"
-  kde_lib_qt_set=yes
-fi
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
 
-if test -z "$LIBQPE"; then
-  if test "x$kde_use_qt_emb" = "xyes"; then
-    if test "x$kde_use_qt_emb_palm" = "xyes"; then
-      LIB_QPE="-lqpe"
-    else
-      LIB_QPE=""
-    fi
-  else
-    LIB_QPE=""
-  fi
-fi
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
 
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_GCJ
 
-if test "x$kde_use_qt_mt" = "xyes"; then
-  if test -z "$LIBQT"; then
-    LIBQT="-l$qtlib-mt"
-    kde_int_qt="-l$qtlib-mt"
-  else
-    LIBQT="$qtlib-mt"
-    kde_int_qt="$qtlib-mt"
-  fi
-  LIBQT_GLOB="lib$qtlib-mt.*"
-  USING_QT_MT="using -mt"
-else
-  LIBQT="-l$qtlib"
-fi
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
 
-if test $kde_qtver != 1; then
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ
 
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ
 
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ
 
-  LIBQT="$LIBQT $LIBPNG $LIBJPEG"
-fi
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct_GCJ
 
-if test $kde_qtver = 3; then
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L_GCJ
 
-  LIBQT="$LIBQT $LIBDL"
-fi
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ
 
-echo "$as_me:$LINENO: checking for Qt" >&5
-echo $ECHO_N "checking for Qt... $ECHO_C" >&6
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic_GCJ
 
-if test "x$kde_use_qt_emb" != "xyes"; then
-LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
-fi
-ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
-qt_libraries=""
-qt_includes=""
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
 
-# Check whether --with-qt-dir or --without-qt-dir was given.
-if test "${with_qt_dir+set}" = set; then
-  withval="$with_qt_dir"
-    ac_qt_includes="$withval"/include
-       ac_qt_libraries="$withval"/lib${kdelibsuff}
-       ac_qt_bindir="$withval"/bin
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_GCJ
 
-fi;
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
 
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
 
-# Check whether --with-qt-includes or --without-qt-includes was given.
-if test "${with_qt_includes+set}" = set; then
-  withval="$with_qt_includes"
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path_GCJ"
 
-       ac_qt_includes="$withval"
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols_GCJ
 
-fi;
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_GCJ
 
-kde_qt_libs_given=no
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
 
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_GCJ
 
-# Check whether --with-qt-libraries or --without-qt-libraries was given.
-if test "${with_qt_libraries+set}" = set; then
-  withval="$with_qt_libraries"
-    ac_qt_libraries="$withval"
-       kde_qt_libs_given=yes
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_GCJ
 
-fi;
+# ### END LIBTOOL TAG CONFIG: $tagname
 
-if test "${ac_cv_have_qt+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  #try to guess Qt locations
+__EOF__
 
-qt_incdirs=""
-for dir in $kde_qt_dirs; do
-   qt_incdirs="$qt_incdirs $dir/include $dir"
-done
-qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/X11R6/include/qt2 $x_includes"
-if test ! "$ac_qt_includes" = "NO"; then
-   qt_incdirs="$ac_qt_includes $qt_incdirs"
-fi
 
-if test "$kde_qtver" != "1"; then
-  kde_qt_header=qstyle.h
 else
-  kde_qt_header=qglobal.h
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
 fi
 
 
-qt_incdir=NO
-for i in $qt_incdirs;
-do
-  for j in $kde_qt_header;
-  do
-    echo "configure: 21989: $i/$j" >&5
-    if test -r "$i/$j"; then
-      echo "taking that" >&5
-      qt_incdir=$i
-      break 2
-    fi
-  done
-done
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
-ac_qt_includes="$qt_incdir"
+CC="$lt_save_CC"
 
-qt_libdirs=""
-for dir in $kde_qt_dirs; do
-   qt_libdirs="$qt_libdirs $dir/lib${kdelibsuff} $dir"
-done
-qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
-if test ! "$ac_qt_libraries" = "NO"; then
-  qt_libdir=$ac_qt_libraries
-else
-  qt_libdirs="$ac_qt_libraries $qt_libdirs"
-  # if the Qt was given, the chance is too big that libqt.* doesn't exist
-  qt_libdir=NONE
-  for dir in $qt_libdirs; do
-    try="ls -1 $dir/${LIBQT_GLOB}"
-    if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&5 ; fi
-  done
-fi
+	else
+	  tagname=""
+	fi
+	;;
 
-ac_qt_libraries="$qt_libdir"
+      RC)
 
 
 
- ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+# Source file extension for RC test sources.
+ac_ext=rc
 
-ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+# Object file extension for compiled RC test sources.
+objext=o
+objext_RC=$objext
 
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
 
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
 
-ac_cxxflags_safe="$CXXFLAGS"
-ac_ldflags_safe="$LDFLAGS"
-ac_libs_safe="$LIBS"
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
-CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
-LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
-LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
 
+# Allow CC to be a program name with arguments.
+compiler=$CC
 
 
-cat > conftest.$ac_ext <<EOF
-#include "confdefs.h"
-#include <qglobal.h>
-#include <qapplication.h>
-EOF
-if test "$kde_qtver" = "2"; then
-cat >> conftest.$ac_ext <<EOF
-#include <qevent.h>
-#include <qstring.h>
-#include <qstyle.h>
-EOF
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${RC-"windres"}
+compiler=$CC
+compiler_RC=$CC
+lt_cv_prog_compiler_c_o_RC=yes
 
-if test $kde_qtsubver -gt 0; then
-cat >> conftest.$ac_ext <<EOF
-#if QT_VERSION < 210
-#error 1
-#endif
-EOF
-fi
-fi
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler_RC \
+    CC_RC \
+    LD_RC \
+    lt_prog_compiler_wl_RC \
+    lt_prog_compiler_pic_RC \
+    lt_prog_compiler_static_RC \
+    lt_prog_compiler_no_builtin_flag_RC \
+    export_dynamic_flag_spec_RC \
+    thread_safe_flag_spec_RC \
+    whole_archive_flag_spec_RC \
+    enable_shared_with_static_runtimes_RC \
+    old_archive_cmds_RC \
+    old_archive_from_new_cmds_RC \
+    predep_objects_RC \
+    postdep_objects_RC \
+    predeps_RC \
+    postdeps_RC \
+    compiler_lib_search_path_RC \
+    archive_cmds_RC \
+    archive_expsym_cmds_RC \
+    postinstall_cmds_RC \
+    postuninstall_cmds_RC \
+    old_archive_from_expsyms_cmds_RC \
+    allow_undefined_flag_RC \
+    no_undefined_flag_RC \
+    export_symbols_cmds_RC \
+    hardcode_libdir_flag_spec_RC \
+    hardcode_libdir_flag_spec_ld_RC \
+    hardcode_libdir_separator_RC \
+    hardcode_automatic_RC \
+    module_cmds_RC \
+    module_expsym_cmds_RC \
+    lt_cv_prog_compiler_c_o_RC \
+    exclude_expsyms_RC \
+    include_expsyms_RC; do
 
-if test "$kde_qtver" = "3"; then
-cat >> conftest.$ac_ext <<EOF
-#include <qcursor.h>
-#include <qstylefactory.h>
-#include <private/qucomextra_p.h>
-EOF
-fi
+    case $var in
+    old_archive_cmds_RC | \
+    old_archive_from_new_cmds_RC | \
+    archive_cmds_RC | \
+    archive_expsym_cmds_RC | \
+    module_cmds_RC | \
+    module_expsym_cmds_RC | \
+    old_archive_from_expsyms_cmds_RC | \
+    export_symbols_cmds_RC | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
 
-echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
-cat >> conftest.$ac_ext <<EOF
-#error 1
-#endif
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
 
-int main() {
-EOF
-if test "$kde_qtver" = "2"; then
-cat >> conftest.$ac_ext <<EOF
-    QStringList *t = new QStringList();
-    Q_UNUSED(t);
-EOF
-if test $kde_qtsubver -gt 0; then
-cat >> conftest.$ac_ext <<EOF
-    QString s;
-    s.setLatin1("Elvis is alive", 14);
-EOF
-fi
-fi
-if test "$kde_qtver" = "3"; then
-cat >> conftest.$ac_ext <<EOF
-    (void)QStyleFactory::create(QString::null);
-    QCursor c(Qt::WhatsThisCursor);
-EOF
-fi
-cat >> conftest.$ac_ext <<EOF
-    return 0;
-}
-EOF
+cfgfile="$ofile"
 
+  cat <<__EOF__ >> "$cfgfile"
+# ### BEGIN LIBTOOL TAG CONFIG: $tagname
 
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && test -s conftest; then
-  rm -f conftest*
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_qt_libraries="NO"
-fi
-rm -f conftest*
-CXXFLAGS="$ac_cxxflags_safe"
-LDFLAGS="$ac_ldflags_safe"
-LIBS="$ac_libs_safe"
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
 
-if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
-  ac_cv_have_qt="have_qt=no"
-  ac_qt_notfound=""
-  missing_qt_mt=""
-  if test "$ac_qt_includes" = NO; then
-    if test "$ac_qt_libraries" = NO; then
-      ac_qt_notfound="(headers and libraries)";
-    else
-      ac_qt_notfound="(headers)";
-    fi
-  else
-    if test "x$kde_use_qt_mt" = "xyes"; then
-       missing_qt_mt="
-Make sure that you have compiled Qt with thread support!"
-       ac_qt_notfound="(library $qtlib-mt)";
-    else
-       ac_qt_notfound="(library $qtlib)";
-    fi
-  fi
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
 
-  { { echo "$as_me:$LINENO: error: Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
-For more details about this problem, look at the end of config.log.$missing_qt_mt" >&5
-echo "$as_me: error: Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
-For more details about this problem, look at the end of config.log.$missing_qt_mt" >&2;}
-   { (exit 1); exit 1; }; }
-else
-  have_qt="yes"
-fi
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
 
-fi
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_RC
 
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
 
-eval "$ac_cv_have_qt"
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
 
-if test "$have_qt" != yes; then
-  echo "$as_me:$LINENO: result: $have_qt" >&5
-echo "${ECHO_T}$have_qt" >&6;
-else
-  ac_cv_have_qt="have_qt=yes \
-    ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
-  echo "$as_me:$LINENO: result: libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT" >&5
-echo "${ECHO_T}libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT" >&6
+# The host system.
+host_alias=$host_alias
+host=$host
 
-  qt_libraries="$ac_qt_libraries"
-  qt_includes="$ac_qt_includes"
-fi
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
 
-if test ! "$kde_qt_libs_given" = "yes"; then
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
 
+# A C compiler.
+LTCC=$lt_LTCC
 
-echo "$as_me:$LINENO: checking if Qt compiles without flags" >&5
-echo $ECHO_N "checking if Qt compiles without flags... $ECHO_C" >&6
-if test "${kde_cv_qt_direct+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+# A language-specific compiler.
+CC=$lt_compiler_RC
 
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC_RC
 
+# An ERE matcher.
+EGREP=$lt_EGREP
 
- ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+# The linker used to build libraries.
+LD=$lt_LD_RC
 
-ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
 
+# A BSD-compatible nm program.
+NM=$lt_NM
 
-ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH
-ac_LIBRARY_PATH="$LIBRARY_PATH"
-ac_cxxflags_safe="$CXXFLAGS"
-ac_ldflags_safe="$LDFLAGS"
-ac_libs_safe="$LIBS"
+# A symbol stripping program
+STRIP=$lt_STRIP
 
-CXXFLAGS="$CXXFLAGS -I$qt_includes"
-LDFLAGS="$LDFLAGS $X_LDFLAGS"
-if test "x$kde_use_qt_emb" != "xyes"; then
-LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
-else
-LIBS="$LIBQT $LIBSOCKET"
-fi
-LD_LIBRARY_PATH=
-export LD_LIBRARY_PATH
-LIBRARY_PATH=
-export LIBRARY_PATH
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
 
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
 
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
 
-cat > conftest.$ac_ext <<EOF
-#include "confdefs.h"
-#include <qglobal.h>
-#include <qapplication.h>
-EOF
-if test "$kde_qtver" = "2"; then
-cat >> conftest.$ac_ext <<EOF
-#include <qevent.h>
-#include <qstring.h>
-#include <qstyle.h>
-EOF
+# Used on cygwin: assembler.
+AS="$AS"
 
-if test $kde_qtsubver -gt 0; then
-cat >> conftest.$ac_ext <<EOF
-#if QT_VERSION < 210
-#error 1
-#endif
-EOF
-fi
-fi
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
 
-if test "$kde_qtver" = "3"; then
-cat >> conftest.$ac_ext <<EOF
-#include <qcursor.h>
-#include <qstylefactory.h>
-#include <private/qucomextra_p.h>
-EOF
-fi
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
 
-echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
-cat >> conftest.$ac_ext <<EOF
-#error 1
-#endif
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_RC
 
-int main() {
-EOF
-if test "$kde_qtver" = "2"; then
-cat >> conftest.$ac_ext <<EOF
-    QStringList *t = new QStringList();
-    Q_UNUSED(t);
-EOF
-if test $kde_qtsubver -gt 0; then
-cat >> conftest.$ac_ext <<EOF
-    QString s;
-    s.setLatin1("Elvis is alive", 14);
-EOF
-fi
-fi
-if test "$kde_qtver" = "3"; then
-cat >> conftest.$ac_ext <<EOF
-    (void)QStyleFactory::create(QString::null);
-    QCursor c(Qt::WhatsThisCursor);
-EOF
-fi
-cat >> conftest.$ac_ext <<EOF
-    return 0;
-}
-EOF
+# Object file suffix (normally "o").
+objext="$ac_objext"
 
+# Old archive suffix (normally "a").
+libext="$libext"
 
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && test -s conftest; then
-  kde_cv_qt_direct="yes"
-else
-  kde_cv_qt_direct="no"
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
 
-rm -f conftest*
-CXXFLAGS="$ac_cxxflags_safe"
-LDFLAGS="$ac_ldflags_safe"
-LIBS="$ac_libs_safe"
-
-LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"
-export LD_LIBRARY_PATH
-LIBRARY_PATH="$ac_LIBRARY_PATH"
-export LIBRARY_PATH
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+# Executable file suffix (normally "").
+exeext="$exeext"
 
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_RC
+pic_mode=$pic_mode
 
-fi
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
 
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
 
-if test "$kde_cv_qt_direct" = "yes"; then
-  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-  qt_libraries=
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+# Must we lock files when doing compilation ?
+need_locks=$lt_need_locks
 
-fi
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
 
-fi
+# Do we need a version for libraries?
+need_version=$need_version
 
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
 
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
 
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
 
-if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
- QT_INCLUDES=""
-else
- QT_INCLUDES="-I$qt_includes"
- all_includes="$QT_INCLUDES $all_includes"
-fi
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_RC
 
-if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then
- QT_LDFLAGS=""
-else
- QT_LDFLAGS="-L$qt_libraries"
- all_libraries="$all_libraries $QT_LDFLAGS"
-fi
-test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
 
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
 
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
 
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
 
-   qt_bindirs=""
-   for dir in $kde_qt_dirs; do
-      qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc"
-   done
-   qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin"
-   if test ! "$ac_qt_bindir" = "NO"; then
-      qt_bindirs="$ac_qt_bindir $qt_bindirs"
-   fi
+# Library versioning type.
+version_type=$version_type
 
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
 
-   echo "$as_me:$LINENO: checking for moc" >&5
-echo $ECHO_N "checking for moc... $ECHO_C" >&6
-   if test -n "$MOC"; then
-        kde_cv_path="$MOC";
-   else
-        kde_cache=`echo moc | sed 'y%./+-%__p_%'`
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
 
-        if eval "test \"\${kde_cv_path_$kde_cache+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
 
-        kde_cv_path="NONE"
-	dirs="$qt_bindirs"
-	kde_save_IFS=$IFS
-	IFS=':'
-	for dir in $PATH; do
-	  dirs="$dirs $dir"
-        done
-	IFS=$kde_save_IFS
-
-        for dir in $dirs; do
-	  if test -x "$dir/moc"; then
-	    if test -n ""
-	    then
-              evalstr="$dir/moc  2>&1 "
-	      if eval $evalstr; then
-                kde_cv_path="$dir/moc"
-                break
-	      fi
-            else
-		kde_cv_path="$dir/moc"
-                break
-	    fi
-          fi
-        done
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds_RC
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
 
-        eval "kde_cv_path_$kde_cache=$kde_cv_path"
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
 
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
 
-fi
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds_RC
+archive_expsym_cmds=$lt_archive_expsym_cmds_RC
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
 
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds_RC
+module_expsym_cmds=$lt_module_expsym_cmds_RC
 
-      eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
 
-   fi
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_predep_objects_RC
 
-   if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
-      echo "$as_me:$LINENO: result: not found" >&5
-echo "${ECHO_T}not found" >&6
-
-    { { echo "$as_me:$LINENO: error: No Qt meta object compiler (moc) found!
-Please check whether you installed Qt correctly.
-You need to have a running moc binary.
-configure tried to run $ac_cv_path_moc and the test didn't
-succeed. If configure shouldn't have tried this one, set
-the environment variable MOC to the right one before running
-configure.
-" >&5
-echo "$as_me: error: No Qt meta object compiler (moc) found!
-Please check whether you installed Qt correctly.
-You need to have a running moc binary.
-configure tried to run $ac_cv_path_moc and the test didn't
-succeed. If configure shouldn't have tried this one, set
-the environment variable MOC to the right one before running
-configure.
-" >&2;}
-   { (exit 1); exit 1; }; }
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects_RC
 
-   else
-      echo "$as_me:$LINENO: result: $kde_cv_path" >&5
-echo "${ECHO_T}$kde_cv_path" >&6
-      MOC=$kde_cv_path
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps_RC
 
-   fi
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps_RC
 
-   if test -z "$UIC_NOT_NEEDED"; then
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_RC
 
-   echo "$as_me:$LINENO: checking for uic" >&5
-echo $ECHO_N "checking for uic... $ECHO_C" >&6
-   if test -n "$UIC_PATH"; then
-        kde_cv_path="$UIC_PATH";
-   else
-        kde_cache=`echo uic | sed 'y%./+-%__p_%'`
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
 
-        if eval "test \"\${kde_cv_path_$kde_cache+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
 
-        kde_cv_path="NONE"
-	dirs="$qt_bindirs"
-	kde_save_IFS=$IFS
-	IFS=':'
-	for dir in $PATH; do
-	  dirs="$dirs $dir"
-        done
-	IFS=$kde_save_IFS
-
-        for dir in $dirs; do
-	  if test -x "$dir/uic"; then
-	    if test -n ""
-	    then
-              evalstr="$dir/uic  2>&1 "
-	      if eval $evalstr; then
-                kde_cv_path="$dir/uic"
-                break
-	      fi
-            else
-		kde_cv_path="$dir/uic"
-                break
-	    fi
-          fi
-        done
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_RC
 
-        eval "kde_cv_path_$kde_cache=$kde_cv_path"
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_RC
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
 
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
 
-fi
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
 
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
 
-      eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
 
-   fi
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
 
-   if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
-      echo "$as_me:$LINENO: result: not found" >&5
-echo "${ECHO_T}not found" >&6
-      UIC_PATH=""
-   else
-      echo "$as_me:$LINENO: result: $kde_cv_path" >&5
-echo "${ECHO_T}$kde_cv_path" >&6
-      UIC_PATH=$kde_cv_path
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
 
-   fi
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
 
-     if test -z "$UIC_PATH" ; then
-
-    { echo "$as_me:$LINENO: WARNING: No Qt ui compiler (uic) found!
-Please check whether you installed Qt correctly.
-You need to have a running uic binary.
-configure tried to run $ac_cv_path_uic and the test didn't
-succeed. If configure shouldn't have tried this one, set
-the environment variable UIC to the right one before running
-configure.
-" >&5
-echo "$as_me: WARNING: No Qt ui compiler (uic) found!
-Please check whether you installed Qt correctly.
-You need to have a running uic binary.
-configure tried to run $ac_cv_path_uic and the test didn't
-succeed. If configure shouldn't have tried this one, set
-the environment variable UIC to the right one before running
-configure.
-" >&2;}
-
-       exit 1
-     elif test $kde_qtver = 3; then
-
-    echo "$as_me:$LINENO: checking whether uic supports -L " >&5
-echo $ECHO_N "checking whether uic supports -L ... $ECHO_C" >&6
-    kde_cache=`echo L | sed 'y% .=/+-%____p_%'`
-    if eval "test \"\${kde_cv_prog_uic_$kde_cache+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_RC
 
-        cat >conftest.ui <<EOT
-        <!DOCTYPE UI><UI version="3" stdsetdef="1"></UI>
-EOT
-        ac_uic_testrun="$UIC_PATH -L /nonexistant conftest.ui >/dev/null"
-        if { (eval echo "$as_me:$LINENO: \"$ac_uic_testrun\"") >&5
-  (eval $ac_uic_testrun) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-            eval "kde_cv_prog_uic_$kde_cache=yes"
-        else
-            eval "kde_cv_prog_uic_$kde_cache=no"
-        fi
-        rm -f conftest*
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
 
-fi
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
 
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
 
-    if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then
-        echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-        :
-        ac_uic_supports_libpath=yes
-    else
-        echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-        :
-        ac_uic_supports_libpath=no
-    fi
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct_RC
 
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L_RC
 
-    echo "$as_me:$LINENO: checking whether uic supports -nounload " >&5
-echo $ECHO_N "checking whether uic supports -nounload ... $ECHO_C" >&6
-    kde_cache=`echo nounload | sed 'y% .=/+-%____p_%'`
-    if eval "test \"\${kde_cv_prog_uic_$kde_cache+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
 
-        cat >conftest.ui <<EOT
-        <!DOCTYPE UI><UI version="3" stdsetdef="1"></UI>
-EOT
-        ac_uic_testrun="$UIC_PATH -nounload  conftest.ui >/dev/null"
-        if { (eval echo "$as_me:$LINENO: \"$ac_uic_testrun\"") >&5
-  (eval $ac_uic_testrun) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-            eval "kde_cv_prog_uic_$kde_cache=yes"
-        else
-            eval "kde_cv_prog_uic_$kde_cache=no"
-        fi
-        rm -f conftest*
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic_RC
 
-fi
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
 
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_RC
 
-    if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then
-        echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-        :
-        ac_uic_supports_nounload=yes
-    else
-        echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-        :
-        ac_uic_supports_nounload=no
-    fi
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
 
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
 
-       UIC=$UIC_PATH
-       if test x$ac_uic_supports_libpath = xyes; then
-           UIC="$UIC -L \$(kde_widgetdir)"
-       fi
-       if test x$ac_uic_supports_nounload = xyes; then
-           UIC="$UIC -nounload"
-       fi
-     fi
-   else
-     UIC="echo uic not available: "
-   fi
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path_RC"
 
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols_RC
 
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_RC
 
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
 
-   UIC_TR="i18n"
-   if test $kde_qtver = 3; then
-     UIC_TR="tr2i18n"
-   fi
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_RC
 
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_RC
 
+# ### END LIBTOOL TAG CONFIG: $tagname
 
+__EOF__
 
 
-echo "$as_me:$LINENO: checking if Qt needs $LIBJPEG" >&5
-echo $ECHO_N "checking if Qt needs $LIBJPEG... $ECHO_C" >&6
-if test "${kde_cv_qt_jpeg+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+fi
 
 
-
- ac_ext=cc
+ac_ext=cc
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
-ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-
-
-ac_save_LIBS="$LIBS"
-LIBS="$all_libraries $USER_LDFLAGS $LIBQT"
-LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
-ac_save_CXXFLAGS="$CXXFLAGS"
-CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <qapplication.h>
-int
-main ()
-{
-
-            int argc;
-            char** argv;
-            QApplication app(argc, argv);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "kde_cv_qt_jpeg=no"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "kde_cv_qt_jpeg=yes"
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS="$ac_save_LIBS"
-CXXFLAGS="$ac_save_CXXFLAGS"
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+CC="$lt_save_CC"
 
+	;;
 
-fi
+      *)
+	{ { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5
+echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
+   { (exit 1); exit 1; }; }
+	;;
+      esac
 
+      # Append the new tag name to the list of available tags.
+      if test -n "$tagname" ; then
+      available_tags="$available_tags $tagname"
+    fi
+    fi
+  done
+  IFS="$lt_save_ifs"
 
-if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then
-  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-  LIBJPEG_QT='$(LIBJPEG)'
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-  LIBJPEG_QT=
+  # Now substitute the updated list of available tags.
+  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
+    mv "${ofile}T" "$ofile"
+    chmod +x "$ofile"
+  else
+    rm -f "${ofile}T"
+    { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5
+echo "$as_me: error: unable to update list of available tagged configurations." >&2;}
+   { (exit 1); exit 1; }; }
+  fi
 fi
 
 
 
-if test "x$kde_use_qt_emb" != "xyes"; then
-LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
-else
-LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBPNG)'
-fi
-test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
-
-
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
 
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 
+# Prevent multiple expansion
 
 
 
@@ -22702,58 +20506,18 @@ test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
 
 
 
-DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
 
-if test ! -s $srcdir/subdirs; then
-    TOPSUBDIRS=""
-  files=`cd $srcdir && ls -1`
-  dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
-  for i in $dirs; do
-    echo $i >> $srcdir/subdirs
-  done
-fi
 
-if test -s $srcdir/inst-apps; then
-  ac_topsubdirs="`cat $srcdir/inst-apps`"
-else
-  ac_topsubdirs="`cat $srcdir/subdirs`"
-fi
 
-for i in $ac_topsubdirs; do
-  echo "$as_me:$LINENO: checking if $i should be compiled" >&5
-echo $ECHO_N "checking if $i should be compiled... $ECHO_C" >&6
-  if test -d $srcdir/$i; then
-    install_it="yes"
-    for j in $DO_NOT_COMPILE; do
-      if test $i = $j; then
-        install_it="no"
-      fi
-    done
-  else
-    install_it="no"
-  fi
-  echo "$as_me:$LINENO: result: $install_it" >&5
-echo "${ECHO_T}$install_it" >&6
-  vari=`echo $i | sed -e 's,[-+.],_,g'`
-  if test $install_it = "yes"; then
-    TOPSUBDIRS="$TOPSUBDIRS $i"
-    eval "$vari""_SUBDIR_included=yes"
-  else
-    eval "$vari""_SUBDIR_included=no"
-  fi
-done
 
 
 
 
-          ac_config_files="$ac_config_files Makefile"
 
-          ac_config_files="$ac_config_files linpsk/Makefile"
 
-          ac_config_files="$ac_config_files linpsk/docs/Makefile"
 
-          ac_config_files="$ac_config_files linpsk/docs/en/Makefile"
 
+                                        ac_config_files="$ac_config_files Makefile src/Makefile src/portaudio/Makefile src/interfaces/Makefile"
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
 # tests run on this system so they can be shared between configure
@@ -22782,13 +20546,13 @@ _ACEOF
       # `set' does not quote correctly, so add quotes (double-quote
       # substitution turns \\\\ into \\, and sed turns \\ into \).
       sed -n \
-        "s/'/'\\\\''/g;
-    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
       ;;
     *)
       # `set' quotes correctly as required by POSIX, so do not add quotes.
       sed -n \
-        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
       ;;
     esac;
 } |
@@ -22818,13 +20582,13 @@ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
 # trailing colons and then remove the whole line if VPATH becomes empty
 # (actually we leave an empty line to preserve line numbers).
 if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
 s/:*\$(srcdir):*/:/;
 s/:*\${srcdir}:*/:/;
 s/:*@srcdir@:*/:/;
-s/^\([^=]*=[ 	]*\):*/\1/;
+s/^\([^=]*=[	 ]*\):*/\1/;
 s/:*$//;
-s/^[^=]*=[ 	]*$//;
+s/^[^=]*=[	 ]*$//;
 }'
 fi
 
@@ -22835,7 +20599,7 @@ ac_ltlibobjs=
 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
   # 1. Remove the extension, and $U if already installed.
   ac_i=`echo "$ac_i" |
-         sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+	 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
   # 2. Add them.
   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
@@ -22852,6 +20616,13 @@ echo "$as_me: error: conditional \"AMDEP\" was never defined.
 Usually this means the macro was only invoked conditionally." >&2;}
    { (exit 1); exit 1; }; }
 fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
   { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
 Usually this means the macro was only invoked conditionally." >&5
@@ -22900,9 +20671,10 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
   set -o posix
 fi
+DUALCASE=1; export DUALCASE # for MKS sh
 
 # Support unset when possible.
-if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
   as_unset=unset
 else
   as_unset=false
@@ -22921,7 +20693,7 @@ for as_var in \
   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
   LC_TELEPHONE LC_TIME
 do
-  if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
     eval $as_var=C; export $as_var
   else
     $as_unset $as_var
@@ -23100,16 +20872,17 @@ rm -f conf$$ conf$$.exe conf$$.file
 if mkdir -p . 2>/dev/null; then
   as_mkdir_p=:
 else
+  test -d ./-p && rmdir ./-p
   as_mkdir_p=false
 fi
 
 as_executable_p="test -f"
 
 # Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 
 # Sed expression to map a string onto a valid variable name.
-as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
 # IFS
@@ -23136,7 +20909,7 @@ _ASBOX
 cat >&5 <<_CSEOF
 
 This file was extended by $as_me, which was
-generated by GNU Autoconf 2.57.  Invocation command line was
+generated by GNU Autoconf 2.59.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -23180,9 +20953,9 @@ Usage: $0 [OPTIONS] [FILE]...
   -d, --debug      don't remove temporary files
       --recheck    update $as_me by reconfiguring in the same conditions
   --file=FILE[:TEMPLATE]
-                   instantiate the configuration file FILE
+		   instantiate the configuration file FILE
   --header=FILE[:TEMPLATE]
-                   instantiate the configuration header FILE
+		   instantiate the configuration header FILE
 
 Configuration files:
 $config_files
@@ -23199,11 +20972,10 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
 config.status
-configured by $0, generated by GNU Autoconf 2.57,
+configured by $0, generated by GNU Autoconf 2.59,
   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 
-Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
-Free Software Foundation, Inc.
+Copyright (C) 2003 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 srcdir=$srcdir
@@ -23310,9 +21082,9 @@ do
   case "$ac_config_target" in
   # Handling of arguments.
   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-  "linpsk/Makefile" ) CONFIG_FILES="$CONFIG_FILES linpsk/Makefile" ;;
-  "linpsk/docs/Makefile" ) CONFIG_FILES="$CONFIG_FILES linpsk/docs/Makefile" ;;
-  "linpsk/docs/en/Makefile" ) CONFIG_FILES="$CONFIG_FILES linpsk/docs/en/Makefile" ;;
+  "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+  "src/portaudio/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/portaudio/Makefile" ;;
+  "src/interfaces/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/interfaces/Makefile" ;;
   "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
   "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
@@ -23400,18 +21172,6 @@ s, at ECHO_C@,$ECHO_C,;t t
 s, at ECHO_N@,$ECHO_N,;t t
 s, at ECHO_T@,$ECHO_T,;t t
 s, at LIBS@,$LIBS,;t t
-s, at build@,$build,;t t
-s, at build_cpu@,$build_cpu,;t t
-s, at build_vendor@,$build_vendor,;t t
-s, at build_os@,$build_os,;t t
-s, at host@,$host,;t t
-s, at host_cpu@,$host_cpu,;t t
-s, at host_vendor@,$host_vendor,;t t
-s, at host_os@,$host_os,;t t
-s, at target@,$target,;t t
-s, at target_cpu@,$target_cpu,;t t
-s, at target_vendor@,$target_vendor,;t t
-s, at target_os@,$target_os,;t t
 s, at INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
 s, at INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
 s, at INSTALL_DATA@,$INSTALL_DATA,;t t
@@ -23423,18 +21183,22 @@ s, at AUTOCONF@,$AUTOCONF,;t t
 s, at AUTOMAKE@,$AUTOMAKE,;t t
 s, at AUTOHEADER@,$AUTOHEADER,;t t
 s, at MAKEINFO@,$MAKEINFO,;t t
-s, at AMTAR@,$AMTAR,;t t
 s, at install_sh@,$install_sh,;t t
 s, at STRIP@,$STRIP,;t t
 s, at ac_ct_STRIP@,$ac_ct_STRIP,;t t
 s, at INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s, at mkdir_p@,$mkdir_p,;t t
 s, at AWK@,$AWK,;t t
 s, at SET_MAKE@,$SET_MAKE,;t t
-s, at CC@,$CC,;t t
-s, at CFLAGS@,$CFLAGS,;t t
+s, at am__leading_dot@,$am__leading_dot,;t t
+s, at AMTAR@,$AMTAR,;t t
+s, at am__tar@,$am__tar,;t t
+s, at am__untar@,$am__untar,;t t
+s, at CXX@,$CXX,;t t
+s, at CXXFLAGS@,$CXXFLAGS,;t t
 s, at LDFLAGS@,$LDFLAGS,;t t
 s, at CPPFLAGS@,$CPPFLAGS,;t t
-s, at ac_ct_CC@,$ac_ct_CC,;t t
+s, at ac_ct_CXX@,$ac_ct_CXX,;t t
 s, at EXEEXT@,$EXEEXT,;t t
 s, at OBJEXT@,$OBJEXT,;t t
 s, at DEPDIR@,$DEPDIR,;t t
@@ -23443,77 +21207,40 @@ s, at am__quote@,$am__quote,;t t
 s, at AMDEP_TRUE@,$AMDEP_TRUE,;t t
 s, at AMDEP_FALSE@,$AMDEP_FALSE,;t t
 s, at AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
+s, at CXXDEPMODE@,$CXXDEPMODE,;t t
+s, at am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t
+s, at am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t
+s, at CC@,$CC,;t t
+s, at CFLAGS@,$CFLAGS,;t t
+s, at ac_ct_CC@,$ac_ct_CC,;t t
 s, at CCDEPMODE@,$CCDEPMODE,;t t
 s, at am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
 s, at am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
 s, at CPP@,$CPP,;t t
-s, at CXX@,$CXX,;t t
-s, at CXXFLAGS@,$CXXFLAGS,;t t
-s, at ac_ct_CXX@,$ac_ct_CXX,;t t
-s, at CXXDEPMODE@,$CXXDEPMODE,;t t
-s, at am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t
-s, at am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t
-s, at WOVERLOADED_VIRTUAL@,$WOVERLOADED_VIRTUAL,;t t
-s, at USE_EXCEPTIONS@,$USE_EXCEPTIONS,;t t
-s, at USE_RTTI@,$USE_RTTI,;t t
-s, at CXXCPP@,$CXXCPP,;t t
-s, at NOOPT_CXXFLAGS@,$NOOPT_CXXFLAGS,;t t
-s, at NOOPT_CFLAGS@,$NOOPT_CFLAGS,;t t
-s, at REPO@,$REPO,;t t
-s, at NOREPO@,$NOREPO,;t t
-s, at KDE_USE_FINAL_TRUE@,$KDE_USE_FINAL_TRUE,;t t
-s, at KDE_USE_FINAL_FALSE@,$KDE_USE_FINAL_FALSE,;t t
-s, at KDE_USE_CLOSURE_TRUE@,$KDE_USE_CLOSURE_TRUE,;t t
-s, at KDE_USE_CLOSURE_FALSE@,$KDE_USE_CLOSURE_FALSE,;t t
+s, at MOC@,$MOC,;t t
+s, at UIC@,$UIC,;t t
+s, at QT_CXXFLAGS@,$QT_CXXFLAGS,;t t
+s, at QT_LDADD@,$QT_LDADD,;t t
+s, at build@,$build,;t t
+s, at build_cpu@,$build_cpu,;t t
+s, at build_vendor@,$build_vendor,;t t
+s, at build_os@,$build_os,;t t
+s, at host@,$host,;t t
+s, at host_cpu@,$host_cpu,;t t
+s, at host_vendor@,$host_vendor,;t t
+s, at host_os@,$host_os,;t t
+s, at EGREP@,$EGREP,;t t
 s, at LN_S@,$LN_S,;t t
 s, at ECHO@,$ECHO,;t t
+s, at AR@,$AR,;t t
+s, at ac_ct_AR@,$ac_ct_AR,;t t
 s, at RANLIB@,$RANLIB,;t t
 s, at ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
-s, at EGREP@,$EGREP,;t t
+s, at CXXCPP@,$CXXCPP,;t t
+s, at F77@,$F77,;t t
+s, at FFLAGS@,$FFLAGS,;t t
+s, at ac_ct_F77@,$ac_ct_F77,;t t
 s, at LIBTOOL@,$LIBTOOL,;t t
-s, at KDE_PLUGIN@,$KDE_PLUGIN,;t t
-s, at all_includes@,$all_includes,;t t
-s, at all_libraries@,$all_libraries,;t t
-s, at LIBUTIL@,$LIBUTIL,;t t
-s, at LIBCOMPAT@,$LIBCOMPAT,;t t
-s, at LIBCRYPT@,$LIBCRYPT,;t t
-s, at LIBRESOLV@,$LIBRESOLV,;t t
-s, at LIB_POLL@,$LIB_POLL,;t t
-s, at FRAMEWORK_COREAUDIO@,$FRAMEWORK_COREAUDIO,;t t
-s, at LIBSOCKET@,$LIBSOCKET,;t t
-s, at X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
-s, at LIBUCB@,$LIBUCB,;t t
-s, at LIBDL@,$LIBDL,;t t
-s, at X_INCLUDES@,$X_INCLUDES,;t t
-s, at X_LDFLAGS@,$X_LDFLAGS,;t t
-s, at x_libraries@,$x_libraries,;t t
-s, at x_includes@,$x_includes,;t t
-s, at LIBSM@,$LIBSM,;t t
-s, at X_PRE_LIBS@,$X_PRE_LIBS,;t t
-s, at LIB_X11@,$LIB_X11,;t t
-s, at LIBXINERAMA@,$LIBXINERAMA,;t t
-s, at QTE_NORTTI@,$QTE_NORTTI,;t t
-s, at LIB_XEXT@,$LIB_XEXT,;t t
-s, at LIBPTHREAD@,$LIBPTHREAD,;t t
-s, at USE_THREADS@,$USE_THREADS,;t t
-s, at KDE_MT_LDFLAGS@,$KDE_MT_LDFLAGS,;t t
-s, at KDE_MT_LIBS@,$KDE_MT_LIBS,;t t
-s, at USER_INCLUDES@,$USER_INCLUDES,;t t
-s, at USER_LDFLAGS@,$USER_LDFLAGS,;t t
-s, at LIBZ@,$LIBZ,;t t
-s, at LIBPNG@,$LIBPNG,;t t
-s, at LIBJPEG@,$LIBJPEG,;t t
-s, at qt_libraries@,$qt_libraries,;t t
-s, at qt_includes@,$qt_includes,;t t
-s, at QT_INCLUDES@,$QT_INCLUDES,;t t
-s, at QT_LDFLAGS@,$QT_LDFLAGS,;t t
-s, at MOC@,$MOC,;t t
-s, at UIC@,$UIC,;t t
-s, at UIC_TR@,$UIC_TR,;t t
-s, at LIB_QT@,$LIB_QT,;t t
-s, at LIB_QPE@,$LIB_QPE,;t t
-s, at kde_qtver@,$kde_qtver,;t t
-s, at TOPSUBDIRS@,$TOPSUBDIRS,;t t
 s, at LIBOBJS@,$LIBOBJS,;t t
 s, at LTLIBOBJS@,$LTLIBOBJS,;t t
 CEOF
@@ -23545,9 +21272,9 @@ _ACEOF
       (echo ':t
   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
       if test -z "$ac_sed_cmds"; then
-  	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
       else
-  	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
       fi
       ac_sed_frag=`expr $ac_sed_frag + 1`
       ac_beg=$ac_end
@@ -23565,21 +21292,21 @@ for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
   case $ac_file in
   - | *:- | *:-:* ) # input from stdin
-        cat >$tmp/stdin
-        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+	cat >$tmp/stdin
+	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
   * )   ac_file_in=$ac_file.in ;;
   esac
 
   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-         X"$ac_file" : 'X\(//\)[^/]' \| \
-         X"$ac_file" : 'X\(//\)$' \| \
-         X"$ac_file" : 'X\(/\)' \| \
-         .     : '\(.\)' 2>/dev/null ||
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
 echo X"$ac_file" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
   	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
@@ -23595,10 +21322,10 @@ echo X"$ac_file" |
       as_dirs="$as_dir $as_dirs"
       as_dir=`(dirname "$as_dir") 2>/dev/null ||
 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-         X"$as_dir" : 'X\(//\)[^/]' \| \
-         X"$as_dir" : 'X\(//\)$' \| \
-         X"$as_dir" : 'X\(/\)' \| \
-         .     : '\(.\)' 2>/dev/null ||
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
 echo X"$as_dir" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
   	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
@@ -23636,12 +21363,45 @@ case $srcdir in
     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
     ac_top_srcdir=$ac_top_builddir$srcdir ;;
 esac
-# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
-# absolute.
-ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
-ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
-ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
-ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
 
 
   case $INSTALL in
@@ -23663,7 +21423,7 @@ echo "$as_me: creating $ac_file" >&6;}
     configure_input="$ac_file.  "
   fi
   configure_input=$configure_input"Generated from `echo $ac_file_in |
-                                     sed 's,.*/,,'` by configure."
+				     sed 's,.*/,,'` by configure."
 
   # First look for the input files in the build tree, otherwise in the
   # src tree.
@@ -23672,24 +21432,24 @@ echo "$as_me: creating $ac_file" >&6;}
       case $f in
       -) echo $tmp/stdin ;;
       [\\/$]*)
-         # Absolute (can't be DOS-style, as IFS=:)
-         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+	 # Absolute (can't be DOS-style, as IFS=:)
+	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
-         echo $f;;
+	 echo "$f";;
       *) # Relative
-         if test -f "$f"; then
-           # Build tree
-           echo $f
-         elif test -f "$srcdir/$f"; then
-           # Source tree
-           echo $srcdir/$f
-         else
-           # /dev/null tree
-           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+	 if test -f "$f"; then
+	   # Build tree
+	   echo "$f"
+	 elif test -f "$srcdir/$f"; then
+	   # Source tree
+	   echo "$srcdir/$f"
+	 else
+	   # /dev/null tree
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
-         fi;;
+	 fi;;
       esac
     done` || { (exit 1); exit 1; }
 _ACEOF
@@ -23731,12 +21491,12 @@ cat >>$CONFIG_STATUS <<\_ACEOF
 # NAME is the cpp macro being defined and VALUE is the value it is being given.
 #
 # ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
-ac_dB='[ 	].*$,\1#\2'
+ac_dA='s,^\([	 ]*\)#\([	 ]*define[	 ][	 ]*\)'
+ac_dB='[	 ].*$,\1#\2'
 ac_dC=' '
 ac_dD=',;t'
 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
+ac_uA='s,^\([	 ]*\)#\([	 ]*\)undef\([	 ][	 ]*\)'
 ac_uB='$,\1#\2define\3'
 ac_uC=' '
 ac_uD=',;t'
@@ -23745,11 +21505,11 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
   case $ac_file in
   - | *:- | *:-:* ) # input from stdin
-        cat >$tmp/stdin
-        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+	cat >$tmp/stdin
+	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
   * )   ac_file_in=$ac_file.in ;;
   esac
 
@@ -23763,28 +21523,29 @@ echo "$as_me: creating $ac_file" >&6;}
       case $f in
       -) echo $tmp/stdin ;;
       [\\/$]*)
-         # Absolute (can't be DOS-style, as IFS=:)
-         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+	 # Absolute (can't be DOS-style, as IFS=:)
+	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
-         echo $f;;
+	 # Do quote $f, to prevent DOS paths from being IFS'd.
+	 echo "$f";;
       *) # Relative
-         if test -f "$f"; then
-           # Build tree
-           echo $f
-         elif test -f "$srcdir/$f"; then
-           # Source tree
-           echo $srcdir/$f
-         else
-           # /dev/null tree
-           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+	 if test -f "$f"; then
+	   # Build tree
+	   echo "$f"
+	 elif test -f "$srcdir/$f"; then
+	   # Source tree
+	   echo "$srcdir/$f"
+	 else
+	   # /dev/null tree
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
-         fi;;
+	 fi;;
       esac
     done` || { (exit 1); exit 1; }
   # Remove the trailing spaces.
-  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in
+  sed 's/[	 ]*$//' $ac_file_inputs >$tmp/in
 
 _ACEOF
 
@@ -23807,9 +21568,9 @@ s/[\\&,]/\\&/g
 s,[\\$`],\\&,g
 t clear
 : clear
-s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	(][^ 	(]*\)\(([^)]*)\)[ 	]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*\)\(([^)]*)\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
 t end
-s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	][^ 	]*\)[ 	]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
 : end
 _ACEOF
 # If some macros were called several times there might be several times
@@ -23823,13 +21584,13 @@ rm -f confdef2sed.sed
 # example, in the case of _POSIX_SOURCE, which is predefined and required
 # on some systems where configure will not decide to define it.
 cat >>conftest.undefs <<\_ACEOF
-s,^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+s,^[	 ]*#[	 ]*undef[	 ][	 ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
 _ACEOF
 
 # Break up conftest.defines because some shells have a limit on the size
 # of here documents, and old seds have small limits too (100 cmds).
 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
-echo '  if grep "^[ 	]*#[ 	]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo '  if grep "^[	 ]*#[	 ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
 echo '  :' >>$CONFIG_STATUS
 rm -f conftest.tail
@@ -23838,7 +21599,7 @@ do
   # Write a limited-size here document to $tmp/defines.sed.
   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
   # Speed up: don't consider the non `#define' lines.
-  echo '/^[ 	]*#[ 	]*define/!b' >>$CONFIG_STATUS
+  echo '/^[	 ]*#[	 ]*define/!b' >>$CONFIG_STATUS
   # Work around the forget-to-reset-the-flag bug.
   echo 't clr' >>$CONFIG_STATUS
   echo ': clr' >>$CONFIG_STATUS
@@ -23865,7 +21626,7 @@ do
   # Write a limited-size here document to $tmp/undefs.sed.
   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
   # Speed up: don't consider the non `#undef'
-  echo '/^[ 	]*#[ 	]*undef/!b' >>$CONFIG_STATUS
+  echo '/^[	 ]*#[	 ]*undef/!b' >>$CONFIG_STATUS
   # Work around the forget-to-reset-the-flag bug.
   echo 't clr' >>$CONFIG_STATUS
   echo ': clr' >>$CONFIG_STATUS
@@ -23899,10 +21660,10 @@ echo "$as_me: $ac_file is unchanged" >&6;}
     else
       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-         X"$ac_file" : 'X\(//\)[^/]' \| \
-         X"$ac_file" : 'X\(//\)$' \| \
-         X"$ac_file" : 'X\(/\)' \| \
-         .     : '\(.\)' 2>/dev/null ||
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
 echo X"$ac_file" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
   	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
@@ -23918,10 +21679,10 @@ echo X"$ac_file" |
       as_dirs="$as_dir $as_dirs"
       as_dir=`(dirname "$as_dir") 2>/dev/null ||
 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-         X"$as_dir" : 'X\(//\)[^/]' \| \
-         X"$as_dir" : 'X\(//\)$' \| \
-         X"$as_dir" : 'X\(/\)' \| \
-         .     : '\(.\)' 2>/dev/null ||
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
 echo X"$as_dir" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
   	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
@@ -23941,13 +21702,22 @@ echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
     cat $tmp/config.h
     rm -f $tmp/config.h
   fi
-_am_stamp_count=`expr ${_am_stamp_count-0} + 1`
+# Compute $ac_file's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $ac_file | $ac_file:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
 echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
 $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-         X$ac_file : 'X\(//\)[^/]' \| \
-         X$ac_file : 'X\(//\)$' \| \
-         X$ac_file : 'X\(/\)' \| \
-         .     : '\(.\)' 2>/dev/null ||
+	 X$ac_file : 'X\(//\)[^/]' \| \
+	 X$ac_file : 'X\(//\)$' \| \
+	 X$ac_file : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
 echo X$ac_file |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
   	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
@@ -23966,16 +21736,41 @@ for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-         X"$ac_dest" : 'X\(//\)[^/]' \| \
-         X"$ac_dest" : 'X\(//\)$' \| \
-         X"$ac_dest" : 'X\(/\)' \| \
-         .     : '\(.\)' 2>/dev/null ||
+	 X"$ac_dest" : 'X\(//\)[^/]' \| \
+	 X"$ac_dest" : 'X\(//\)$' \| \
+	 X"$ac_dest" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
 echo X"$ac_dest" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
   	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
   	  /^X\(\/\/\)$/{ s//\1/; q; }
   	  /^X\(\/\).*/{ s//\1/; q; }
   	  s/.*/./; q'`
+  { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
   ac_builddir=.
 
 if test "$ac_dir" != .; then
@@ -24001,12 +21796,45 @@ case $srcdir in
     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
     ac_top_srcdir=$ac_top_builddir$srcdir ;;
 esac
-# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
-# absolute.
-ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
-ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
-ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
-ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
 
 
   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
@@ -24024,10 +21852,10 @@ echo "$as_me: executing $ac_dest commands" >&6;}
   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
     dirpart=`(dirname "$mf") 2>/dev/null ||
 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-         X"$mf" : 'X\(//\)[^/]' \| \
-         X"$mf" : 'X\(//\)$' \| \
-         X"$mf" : 'X\(/\)' \| \
-         .     : '\(.\)' 2>/dev/null ||
+	 X"$mf" : 'X\(//\)[^/]' \| \
+	 X"$mf" : 'X\(//\)$' \| \
+	 X"$mf" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
 echo X"$mf" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
   	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
@@ -24037,36 +21865,30 @@ echo X"$mf" |
   else
     continue
   fi
-  grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
-  # Extract the definition of DEP_FILES from the Makefile without
-  # running `make'.
-  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+  # Extract the definition of DEPDIR, am__include, and am__quote
+  # from the Makefile without running `make'.
+  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
   test -z "$DEPDIR" && continue
+  am__include=`sed -n 's/^am__include = //p' < "$mf"`
+  test -z "am__include" && continue
+  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
   # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n -e '/^U = / s///p' < "$mf"`
-  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
-  # We invoke sed twice because it is the simplest approach to
-  # changing $(DEPDIR) to its actual value in the expansion.
-  for file in `sed -n -e '
-    /^DEP_FILES = .*\\\\$/ {
-      s/^DEP_FILES = //
-      :loop
-	s/\\\\$//
-	p
-	n
-	/\\\\$/ b loop
-      p
-    }
-    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+  U=`sed -n 's/^U = //p' < "$mf"`
+  # Find all dependency output files, they are included files with
+  # $(DEPDIR) in their names.  We invoke sed twice because it is the
+  # simplest approach to changing $(DEPDIR) to its actual value in the
+  # expansion.
+  for file in `sed -n "
+    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
     # Make sure the directory exists.
     test -f "$dirpart/$file" && continue
     fdir=`(dirname "$file") 2>/dev/null ||
 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-         X"$file" : 'X\(//\)[^/]' \| \
-         X"$file" : 'X\(//\)$' \| \
-         X"$file" : 'X\(/\)' \| \
-         .     : '\(.\)' 2>/dev/null ||
+	 X"$file" : 'X\(//\)[^/]' \| \
+	 X"$file" : 'X\(//\)$' \| \
+	 X"$file" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
 echo X"$file" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
   	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
@@ -24082,10 +21904,10 @@ echo X"$file" |
       as_dirs="$as_dir $as_dirs"
       as_dir=`(dirname "$as_dir") 2>/dev/null ||
 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-         X"$as_dir" : 'X\(//\)[^/]' \| \
-         X"$as_dir" : 'X\(//\)$' \| \
-         X"$as_dir" : 'X\(/\)' \| \
-         .     : '\(.\)' 2>/dev/null ||
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
 echo X"$as_dir" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
   	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
diff --git a/configure.in b/configure.in
index 33947ad..e5f933c 100644
--- a/configure.in
+++ b/configure.in
@@ -1,67 +1,13 @@
-# Original Author was Kalle at kde.org
-# I lifted it in some mater. (Stephan Kulow)
-# I used much code from Janos Farkas
-
-dnl Process this file with autoconf to produce a configure script.
-
-AC_INIT(acinclude.m4) dnl a source file from your sub dir
-
-dnl This is so we can use kde-common
-AC_CONFIG_AUX_DIR(admin)
-
-AC_CANONICAL_SYSTEM 
-
-dnl Automake doc recommends to do this only here. (Janos)
-AM_INIT_AUTOMAKE(linpsk,0.7.1)
-
-dnl KDE_SET_PREFIX
-
-AC_PREFIX_DEFAULT(/usr/local)
-if test "x$prefix" = "xNONE"; then
-  prefix=$ac_default_prefix
-  ac_configure_args="$ac_configure_args --prefix $prefix"
-fi
-
-dnl generate the config header
-AM_CONFIG_HEADER(config.h) dnl at the distribution this done
-
-dnl Checks for programs.
-AC_CHECK_COMPILERS
-
-dnl CXXFLAGS="$NOOPT_CXXFLAGS" dnl __kdevelop[noopt]__
-dnl CFLAGS="$NOOPT_CFLAGS" dnl __kdevelop[noopt]__
-dnl CXXFLAGS="$CXXFLAGS $USE_EXCEPTIONS" dnl __kdevelop[exc]__
-
-AC_ENABLE_SHARED(yes)
-AC_ENABLE_STATIC(no)
-KDE_PROG_LIBTOOL
-
-all_libraries="$all_libraries $USER_LDFLAGS"
-all_includes="$all_includes $USER_INCLUDES"
-AC_SUBST(all_includes)
-AC_SUBST(all_libraries)
-
-dnl for NLS support. Call them in this order!
-dnl WITH_NLS is for the po files
-dnl AM_KDE_WITH_NLS
-
-KDE_USE_QT(3)
-AC_PATH_QT
-
-dnl KDE_NEED_FLEX dnl __kdevelop__
-dnl AC_PROG_YACC dnl __kdevelop__
-
-dnl Perform program name transformation
-dnl AC_ARG_PROGRAM
-
-
-dnl PACKAGE set before
-
-KDE_CREATE_SUBDIRSLIST
-
-dnl add here all your Makefiles. This are created by configure
-AC_CONFIG_FILES([ Makefile ])
-AC_CONFIG_FILES([ linpsk/Makefile ])
-AC_CONFIG_FILES([ linpsk/docs/Makefile ])
-AC_CONFIG_FILES([ linpsk/docs/en/Makefile ])
-AC_OUTPUT
+AC_INIT(configure.in)
+
+AM_CONFIG_HEADER(config.h)
+AM_INIT_AUTOMAKE(linpsk, 0.8.1)
+CHECK_QT
+FIND_FFTW
+AC_SUBST(QT_CXXFLAGS)
+AC_SUBST(QT_LDADD)
+AC_LANG_CPLUSPLUS
+AC_PROG_CXX
+AM_PROG_LIBTOOL
+
+AC_OUTPUT(Makefile src/Makefile src/portaudio/Makefile src/interfaces/Makefile)
diff --git a/debian/.#changelog b/debian/.#changelog
deleted file mode 120000
index 737b662..0000000
--- a/debian/.#changelog
+++ /dev/null
@@ -1 +0,0 @@
-bruce at quidnet.com.4158:1067914646
\ No newline at end of file
diff --git a/debian/README.Debian b/debian/README.Debian
deleted file mode 100644
index 0edd8e6..0000000
--- a/debian/README.Debian
+++ /dev/null
@@ -1,6 +0,0 @@
-linpsk for Debian
------------------
-
-The sound files for the "Demo" mode are not incuded in this distribution.
-
- -- Bruce Walker <bruce at w1bw.org>, Sun,  9 Dec 2001 22:32:01 -0500
diff --git a/debian/changelog b/debian/changelog
deleted file mode 100644
index 0c6d6fd..0000000
--- a/debian/changelog
+++ /dev/null
@@ -1,38 +0,0 @@
-linpsk (0.7.1-1) unstable; urgency=low
-
-  * New upstream 0.7.1
-  * now compiles with g++3, Qt3 (closes: #198541)
-
- -- Bruce Walker <w1bw at debian.org>  Mon, 22 Sep 2003 15:56:30 -0400
-
-linpsk (0.6.2-3) unstable; urgency=low
-
-  * Now let's put config.sub and config.guess in the right place :-)
-  * (closes: #132077)
-
- -- Bruce Walker <bruce at w1bw.org>  Wed,  6 Feb 2002 11:43:38 -0500
-
-linpsk (0.6.2-2) unstable; urgency=low
-
-  * Incorporate latest config.sub and config.guess (closes: #132077)
-
- -- Bruce Walker <bruce at w1bw.org>  Mon,  4 Feb 2002 10:39:11 -0500
-
-linpsk (0.6.2-1) unstable; urgency=low
-
-  * Upstream 0.6.2
-  * Maintainer now <w1bw at debian.org>
-
- -- Bruce Walker <w1bw at debian.org>  Fri,  1 Feb 2002 13:44:51 -0500
-
-linpsk (0.6.1-1) unstable; urgency=low
-
-  * Initial Release.
-  * Debianized...modified makefiles to remove demo sound file
-  * references (not included); docs install handled in debian/docs.
-
- -- Bruce Walker <bruce at w1bw.org>  Sun,  9 Dec 2001 22:32:01 -0500
-
-Local variables:
-mode: debian-changelog
-End:
diff --git a/debian/control b/debian/control
deleted file mode 100644
index e92416d..0000000
--- a/debian/control
+++ /dev/null
@@ -1,21 +0,0 @@
-Source: linpsk
-Section: hamradio
-Priority: optional
-Maintainer: Bruce Walker <w1bw at debian.org>
-Build-Depends: debhelper (>> 3.0.0), libqt3-mt-dev (>> 3.1.0), fftw-dev
-Standards-Version: 3.6.1.0
-
-Package: linpsk
-Architecture: any
-Depends: ${shlibs:Depends}
-Description: Program for operating PSK31/RTTY modes with X GUI
- linpsk is a  program for operating on amateur radio digital modes.
- linpsk currently supports BPSK, QPSK, and RTTY modes,
- and it provides an X user interface.  linpsk's main features are:
-   --simultaneous decoding of up to four channels
-   --different digital modes may be mixed
-   --trigger text can be defined on each channel
-   --each channel can be logged to a file
-   --user-defined macros and two files for larger texts
-   --spectrum and waterfall displays, both scalable in the frequency domain.
- At the Moment RTTY only supports 45 baud and 1.5 stopbits.
diff --git a/debian/copyright b/debian/copyright
deleted file mode 100644
index def6aaa..0000000
--- a/debian/copyright
+++ /dev/null
@@ -1,16 +0,0 @@
-This package was debianized by Bruce Walker <w1bw at debian.org> on
-Sun,  9 Dec 2001 22:32:01 -0500.
-
-It was downloaded from linpsk.sourceforge.net.
-
-Upstream Author: Volker Schroer <dl1ksv at gmx.de>
-
-Copyright:
-This software is copyright (c) 2000-2001 by Volker Schroer
-
-You are free to distribute this software under the terms of the GNU
-General Public License.  On Debian systems, the complete text of the
-GNU General Public License can be found in the file
-/usr/share/common-licenses/GPL.
-
-
diff --git a/debian/dirs b/debian/dirs
deleted file mode 100644
index e772481..0000000
--- a/debian/dirs
+++ /dev/null
@@ -1 +0,0 @@
-usr/bin
diff --git a/debian/docs b/debian/docs
deleted file mode 100644
index a154303..0000000
--- a/debian/docs
+++ /dev/null
@@ -1,11 +0,0 @@
-AUTHORS
-README
-TODO
-linpsk/docs/en/index.html
-linpsk/docs/en/index-1.html
-linpsk/docs/en/index-2.html
-linpsk/docs/en/index-3.html
-linpsk/docs/en/index-4.html
-linpsk/docs/en/index-5.html
-linpsk/docs/en/index-6.html
-linpsk/docs/en/index.sgml
diff --git a/debian/linpsk.1 b/debian/linpsk.1
deleted file mode 100644
index 8ee2112..0000000
--- a/debian/linpsk.1
+++ /dev/null
@@ -1,19 +0,0 @@
-.TH LINPSK 1
-.SH NAME
-linpsk \- amateur radio PSK31/RTTY program via soundcard
-.SH SYNOPSIS
-.B linpsk
-.br
-
-.SH DESCRIPTION
-.B linpsk
-uses a soundcard to receive and transmit RTTY and PSK31, an extremely
-narrow band HF-mode, using an X windows GUI for keyboard QSOs. The
-package does not come with a manual page.  Documentation for linpsk
-can be found in /usr/share/doc/linpsk.
-
-.SH BUGS
-The sound files for the "Demo" mode are not included in this distribution.
-
-.SH AUTHOR
-linpsk was written by Volker Schroer <dl1ksv at gmx.de>
diff --git a/debian/linpsk.manpages b/debian/linpsk.manpages
deleted file mode 100644
index b51878b..0000000
--- a/debian/linpsk.manpages
+++ /dev/null
@@ -1 +0,0 @@
-debian/linpsk.1
diff --git a/debian/linpsk.menu b/debian/linpsk.menu
deleted file mode 100644
index 5cbf57f..0000000
--- a/debian/linpsk.menu
+++ /dev/null
@@ -1,2 +0,0 @@
-?package(linpsk):needs=X11 section=Apps/Hamradio\
-  title="linpsk" command="/usr/bin/linpsk"
diff --git a/debian/rules b/debian/rules
deleted file mode 100755
index 740d4eb..0000000
--- a/debian/rules
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/usr/bin/make -f
-# Sample debian/rules that uses debhelper.
-# GNU copyright 1997 to 1999 by Joey Hess.
-
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-# This is the debhelper compatability version to use.
-export DH_COMPAT=3
-
-configure: configure-stamp
-configure-stamp:
-	dh_testdir
-	# Add here commands to configure the package.
-	./configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
-
-	touch configure-stamp
-
-build: configure-stamp build-stamp
-build-stamp:
-	dh_testdir
-
-	# Add here commands to compile the package.
-	$(MAKE)
-	#/usr/bin/docbook-to-man debian/linpsk.sgml > linpsk.1
-
-	touch build-stamp
-
-clean:
-	dh_testdir
-	dh_testroot
-	rm -f build-stamp configure-stamp
-
-	# Add here commands to clean up after the build process.
-	-$(MAKE) distclean
-
-	dh_clean
-
-install: build
-	dh_testdir
-	dh_testroot
-	dh_clean -k
-	dh_installdirs
-
-	# Add here commands to install the package into debian/linpsk.
-	$(MAKE) install DESTDIR=$(CURDIR)/debian/linpsk
-
-
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build install
-	dh_testdir
-	dh_testroot
-#	dh_installdebconf	
-	dh_installdocs
-	dh_installexamples
-	dh_installmenu
-#	dh_installlogrotate
-#	dh_installemacsen
-#	dh_installpam
-#	dh_installmime
-#	dh_installinit
-	dh_installcron
-	dh_installman
-	dh_installinfo
-#	dh_undocumented
-	dh_installchangelogs ChangeLog
-	dh_link
-	dh_strip
-	dh_compress
-	dh_fixperms
-#	dh_makeshlibs
-	dh_installdeb
-#	dh_perl
-	dh_shlibdeps
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
diff --git a/admin/depcomp b/depcomp
similarity index 93%
rename from admin/depcomp
rename to depcomp
index 6589965..4c20c6c 100755
--- a/admin/depcomp
+++ b/depcomp
@@ -197,6 +197,36 @@ aix)
   rm -f "$tmpdepfile"
   ;;
 
+icc)
+  # Must come before tru64.
+
+  # Intel's C compiler understands `-MD -MF file'.  However
+  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+  # will fill foo.d with something like
+  #    foo.o: sub/foo.c
+  #    foo.o: sub/foo.h
+  # which is wrong.  We want:
+  #    sub/foo.o: sub/foo.c
+  #    sub/foo.o: sub/foo.h
+  #    sub/foo.c:
+  #    sub/foo.h:
+
+  "$@" -MD -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  # 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:'.
+  sed -e "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+  sed -e "s,^[^:]*: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
 tru64)
    # The Tru64 AIX compiler uses -MD to generate dependencies as a side
    # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
diff --git a/admin/install-sh b/install-sh
similarity index 65%
rename from admin/install-sh
rename to install-sh
index 11870f1..36f96f3 100755
--- a/admin/install-sh
+++ b/install-sh
@@ -56,7 +56,7 @@ dir_arg=""
 
 while [ x"$1" != x ]; do
     case $1 in
-	-c) instcmd="$cpprog"
+	-c) instcmd=$cpprog
 	    shift
 	    continue;;
 
@@ -79,7 +79,7 @@ while [ x"$1" != x ]; do
 	    shift
 	    continue;;
 
-	-s) stripcmd="$stripprog"
+	-s) stripcmd=$stripprog
 	    shift
 	    continue;;
 
@@ -106,7 +106,7 @@ done
 
 if [ x"$src" = x ]
 then
-	echo "install:	no input file specified"
+	echo "$0: no input file specified" >&2
 	exit 1
 else
 	:
@@ -115,8 +115,8 @@ fi
 if [ x"$dir_arg" != x ]; then
 	dst=$src
 	src=""
-	
-	if [ -d $dst ]; then
+
+	if [ -d "$dst" ]; then
 		instcmd=:
 		chmodcmd=""
 	else
@@ -125,20 +125,20 @@ if [ x"$dir_arg" != x ]; then
 else
 
 # Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad 
+# might cause directories to be created, which would be especially bad
 # if $src (and thus $dsttmp) contains '*'.
 
 	if [ -f "$src" ] || [ -d "$src" ]
 	then
 		:
 	else
-		echo "install:  $src does not exist"
+		echo "$0: $src does not exist" >&2
 		exit 1
 	fi
-	
+
 	if [ x"$dst" = x ]
 	then
-		echo "install:	no destination specified"
+		echo "$0: no destination specified" >&2
 		exit 1
 	else
 		:
@@ -147,16 +147,16 @@ else
 # 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 $dst ]
+	if [ -d "$dst" ]
 	then
-		dst="$dst"/`basename $src`
+		dst=$dst/`basename "$src"`
 	else
 		:
 	fi
 fi
 
 ## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
 
 # Make sure that the destination directory exists.
 #  this part is taken from Noah Friedman's mkinstalldirs script
@@ -165,69 +165,73 @@ dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
 if [ ! -d "$dstdir" ]; then
 defaultIFS='
 	'
-IFS="${IFS-${defaultIFS}}"
+IFS="${IFS-$defaultIFS}"
 
-oIFS="${IFS}"
+oIFS=$IFS
 # Some sh's can't handle IFS=/ for some reason.
 IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
+set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS=$oIFS
 
 pathcomp=''
 
 while [ $# -ne 0 ] ; do
-	pathcomp="${pathcomp}${1}"
+	pathcomp=$pathcomp$1
 	shift
 
-	if [ ! -d "${pathcomp}" ] ;
+	if [ ! -d "$pathcomp" ] ;
         then
-		$mkdirprog "${pathcomp}"
+		$mkdirprog "$pathcomp"
 	else
 		:
 	fi
 
-	pathcomp="${pathcomp}/"
+	pathcomp=$pathcomp/
 done
 fi
 
 if [ x"$dir_arg" != x ]
 then
-	$doit $instcmd $dst &&
+	$doit $instcmd "$dst" &&
 
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi
+	if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
+	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
+	if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
+	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
 else
 
 # If we're going to rename the final executable, determine the name now.
 
-	if [ x"$transformarg" = x ] 
+	if [ x"$transformarg" = x ]
 	then
-		dstfile=`basename $dst`
+		dstfile=`basename "$dst"`
 	else
-		dstfile=`basename $dst $transformbasename | 
+		dstfile=`basename "$dst" $transformbasename |
 			sed $transformarg`$transformbasename
 	fi
 
 # don't allow the sed command to completely eliminate the filename
 
-	if [ x"$dstfile" = x ] 
+	if [ x"$dstfile" = x ]
 	then
-		dstfile=`basename $dst`
+		dstfile=`basename "$dst"`
 	else
 		:
 	fi
 
-# Make a temp file name in the proper directory.
+# Make a couple of temp file names in the proper directory.
 
 	dsttmp=$dstdir/#inst.$$#
+	rmtmp=$dstdir/#rm.$$#
 
-# Move or copy the file name to the temp name
+# Trap to clean up temp files at exit.
 
-	$doit $instcmd $src $dsttmp &&
+	trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
+	trap '(exit $?); exit' 1 2 13 15
 
-	trap "rm -f ${dsttmp}" 0 &&
+# Move or copy the file name to the temp name
+
+	$doit $instcmd "$src" "$dsttmp" &&
 
 # and set any options; do chmod last to preserve setuid bits
 
@@ -235,17 +239,38 @@ else
 # ignore errors from any of these, just make sure not to ignore
 # errors from the above "$doit $instcmd $src $dsttmp" command.
 
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi &&
+	if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
+	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
+	if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
+	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
+
+# 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 [ -f "$dstdir/$dstfile" ]
+	then
+		$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
+		$doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
+		{
+		  echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+		  (exit 1); exit
+		}
+	else
+		:
+	fi
+} &&
 
 # Now rename the file to the real destination.
 
-	$doit $rmcmd -f $dstdir/$dstfile &&
-	$doit $mvcmd $dsttmp $dstdir/$dstfile 
+	$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
 
 fi &&
 
+# The final little trick to "correctly" pass the exit status to the exit trap.
 
-exit 0
+{
+	(exit 0); exit
+}
diff --git a/linpsk.kdevprj b/linpsk.kdevprj
deleted file mode 100644
index 8da64a2..0000000
--- a/linpsk.kdevprj
+++ /dev/null
@@ -1,817 +0,0 @@
-[AUTHORS]
-dist=true
-install=false
-install_location=
-type=DATA
-
-[COPYING]
-dist=true
-install=false
-install_location=
-type=DATA
-
-[ChangeLog]
-dist=true
-install=false
-install_location=
-type=DATA
-
-[Config for BinMakefileAm]
-addcxxflags=
-bin_program=linpsk
-cflags=
-cppflags=
-cxxflags=\s-O0 -Wall -Wundef
-ldadd=$(LIB_QPE) -lrfftw -lfftw -lqt
-ldflags=\s           \s
-
-[General]
-AMChanged=false
-author=Volker Schroer
-configure_args=\s--build=i386-linux --host=i386-linux --target=i386-linux\s
-email=dl1ksv at gmx.de
-kdevprj_version=1.3
-lfv_open_groups=Benutzerschnittstelle
-make_options=\s-j1
-makefiles=Makefile.am,linpsk/Makefile.am,linpsk/docs/Makefile.am,linpsk/docs/en/Makefile.am
-modifyMakefiles=true
-project_name=LinPSK
-project_type=normal_qt3
-sgml_file=/home/schroer/projects/linpsk/linpsk/docs/en/index.sgml
-short_info=
-sub_dir=linpsk/
-version=0.7.1
-version_control=None
-workspace=1
-
-[INSTALL]
-dist=true
-install=false
-install_location=
-type=DATA
-
-[LFV Groups]
-Andere=*
-Benutzerschnittstelle=*.kdevdlg,*.ui,*.rc,*.dlg
-GNU=AUTHORS,COPYING,ChangeLog,INSTALL,README,TODO,NEWS
-Header=*.h,*.hh,*.hxx,*.hpp,*.H
-Quellen=*.cpp,*.c,*.cc,*.C,*.cxx,*.ec,*.ecpp,*.lxx,*.l++,*.ll,*.l
-groups=Header,Quellen,Benutzerschnittstelle,Übersetzungen,GNU,Andere
-Übersetzungen=*.ts
-
-[Makefile.am]
-files=linpsk.kdevprj,admin,AUTHORS,COPYING,ChangeLog,INSTALL,README,TODO,linpsk.lsm
-sub_dirs=linpsk
-type=normal
-
-[README]
-dist=true
-install=false
-install_location=
-type=DATA
-
-[TODO]
-dist=true
-install=false
-install_location=
-type=DATA
-
-[admin]
-dist=true
-install=false
-install_location=
-type=DATA
-
-[linpsk.kdevprj]
-dist=true
-install=false
-install_location=
-type=DATA
-
-[linpsk.lsm]
-dist=true
-install=false
-install_location=
-type=DATA
-
-[linpsk/Makefile.am]
-files=linpsk/main.cpp,linpsk/parameter.cpp,linpsk/parameter.h,linpsk/cledbutton.cpp,linpsk/cledbutton.h,linpsk/constants.h,linpsk/cspectrumdisplay.cpp,linpsk/cspectrumdisplay.h,linpsk/color.h,linpsk/controlpanel.cpp,linpsk/controlpanel.h,linpsk/crecording.cpp,linpsk/crecording.h,linpsk/crxdisplay.cpp,linpsk/crxdisplay.h,linpsk/csquelch.cpp,linpsk/csquelch.h,linpsk/ctrigger.cpp,linpsk/ctrigger.h,linpsk/ctxdisplay.cpp,linpsk/ctxdisplay.h,linpsk/ctxfunctions.cpp,linpsk/ctxfunctions.h,linpsk [...]
-sub_dirs=docs
-type=prog_main
-
-[linpsk/addmacro.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/addmacro.ui]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/addmacro.ui.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/addrxwindow.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/addrxwindow.ui]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/addrxwindow.ui.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/bpskdemodulator.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/bpskdemodulator.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/bpskmodulator.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/bpskmodulator.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/cdemodulator.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/cdemodulator.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/cdisplay.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/cdisplay.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/cledbutton.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/cledbutton.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/cmodulator.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/cmodulator.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/color.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/constants.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/controlpanel.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/controlpanel.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/cpskdemodulator.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/cpskdemodulator.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/crecording.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/crecording.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/crxchannel.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/crxchannel.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/crxdisplay.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/crxdisplay.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/crxwindow.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/crxwindow.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/csound.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/csound.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/cspectrumdisplay.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/cspectrumdisplay.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/csquelch.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/csquelch.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/ctrigger.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/ctrigger.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/ctxbuffer.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/ctxbuffer.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/ctxdisplay.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/ctxdisplay.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/ctxfunctions.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/ctxfunctions.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/ctxwindow.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/ctxwindow.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/deinterleaver.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/deinterleaver.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/docs/Makefile.am]
-sub_dirs=en
-type=normal
-
-[linpsk/docs/en/Makefile.am]
-files=linpsk/docs/en/index.html,linpsk/docs/en/index-1.html,linpsk/docs/en/index-2.html,linpsk/docs/en/index-3.html,linpsk/docs/en/index-4.html,linpsk/docs/en/index-5.html,linpsk/docs/en/index-6.html
-sub_dirs=
-type=normal
-
-[linpsk/docs/en/index-1.html]
-dist=true
-install=false
-install_location=$$(prefix)/doc/linpsk/index-1.html
-type=DATA
-
-[linpsk/docs/en/index-2.html]
-dist=false
-install=false
-install_location=$$(prefix)/doc/linpsk/index-2.html
-type=DATA
-
-[linpsk/docs/en/index-3.html]
-dist=false
-install=false
-install_location=$$(prefix)/doc/linpsk/index-3.html
-type=DATA
-
-[linpsk/docs/en/index-4.html]
-dist=false
-install=false
-install_location=$$(prefix)/doc/linpsk/index-4.html
-type=DATA
-
-[linpsk/docs/en/index-5.html]
-dist=false
-install=false
-install_location=$$(prefix)/doc/linpsk/index-5.html
-type=DATA
-
-[linpsk/docs/en/index-6.html]
-dist=false
-install=false
-install_location=$$(prefix)/doc/linpsk/index-6.html
-type=DATA
-
-[linpsk/docs/en/index.html]
-dist=false
-install=false
-install_location=$$(prefix)/doc/linpsk/index.html
-type=DATA
-
-[linpsk/editmacro.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/editmacro.ui]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/editmacro.ui.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/feccoder.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/feccoder.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/fircoeffs.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/frequencyselect.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/frequencyselect.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/fskdemodulator.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/fskdemodulator.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/fskmodulator.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/fskmodulator.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/generalsettings.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/generalsettings.ui]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/generalsettings.ui.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/input.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/input.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/interleaver.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/interleaver.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/linpsk.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/linpsk.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/macros.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/macros.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/macrowindow.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/macrowindow.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/main.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/mfskdemodulator.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/mfskdemodulator.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/mfskmodulator.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/mfskmodulator.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/mfskvaricode.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/mfskvaricode.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/modemenu.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/modemenu.ui]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/modemenu.ui.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/parameter.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/parameter.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/pskmodulator.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/pskmodulator.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/psktable.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/qpskdemodulator.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/qpskdemodulator.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/qpskmodulator.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/qpskmodulator.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/qsodata.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/qsodata.ui]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/qsodata.ui.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/qsoinfo.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/qsoinfo.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/rttydemodulator.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/rttydemodulator.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/rttymodulator.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/rttymodulator.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/textinput.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/textinput.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/utils.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/utils.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/viterbi.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/viterbi.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[linpsk/waveinput.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[linpsk/waveinput.h]
-dist=true
-install=false
-install_location=
-type=HEADER
diff --git a/linpsk.kdevses b/linpsk.kdevses
deleted file mode 100644
index 1d172dc..0000000
--- a/linpsk.kdevses
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version = '1.0' encoding = 'UTF-8'?>
-<!DOCTYPE KDevPrjSession>
-<KDevPrjSession>
- <LastCompileConfig>(Default)</LastCompileConfig>
- <Mainframe MaximizeMode="1" />
- <DocsAndViews NumberOfDocuments="1" >
-  <Doc0 CursorPosLine="0" Type="KWriteDoc" NumberOfViews="1" CursorPosCol="0" FileName="/home/schroer/projects/linpsk/docs/internet/linpskhome.html" >
-   <View0 Top="0" Width="708" Attach="1" Height="408" Left="0" Focus="1" Type="KWriteView" MinMaxMode="0" />
-  </Doc0>
- </DocsAndViews>
-</KDevPrjSession>
diff --git a/linpsk.lsm b/linpsk.lsm
deleted file mode 100644
index a13b208..0000000
--- a/linpsk.lsm
+++ /dev/null
@@ -1,14 +0,0 @@
-Begin3
-Title:          LinPSK 
-Version:        0.7
-Entered-date:   
-Description:    
-Keywords:        
-Author:         Volker Schroer <dl1ksv at gmx.de> 
-Maintained-by:  Volker Schroer <dl1ksv at gmx.de> 
-Primary-site:   	        
-Home-page:      http:// 
-Original-site:  
-Platforms:       Linux and other Unices
-Copying-policy: GNU Public License
-End
diff --git a/LinPSK.png b/linpsk.png
similarity index 100%
rename from LinPSK.png
rename to linpsk.png
diff --git a/linpsk/Makefile.am b/linpsk/Makefile.am
deleted file mode 100644
index 03d63bd..0000000
--- a/linpsk/Makefile.am
+++ /dev/null
@@ -1,27 +0,0 @@
-####### kdevelop will overwrite this part!!! (begin)##########
-bin_PROGRAMS = linpsk
-
-## INCLUDES were found outside kdevelop specific part
-
-linpsk_SOURCES = editmacro.ui qsoinfo.cpp macros.cpp macrowindow.cpp addmacro.ui qsodata.ui modemenu.ui utils.cpp generalsettings.ui interleaver.cpp feccoder.cpp fskmodulator.cpp mfskvaricode.cpp mfskmodulator.cpp qpskmodulator.cpp bpskmodulator.cpp ctxwindow.cpp ctxbuffer.cpp pskmodulator.cpp rttymodulator.cpp cmodulator.cpp viterbi.cpp deinterleaver.cpp fskdemodulator.cpp mfskdemodulator.cpp rttydemodulator.cpp addrxwindow.ui cdisplay.cpp qpskdemodulator.cpp csound.cpp cpskdemodulator. [...]
-## following changed to -lqt-mt for debian --w1bw at debian.org
-linpsk_LDADD   = $(LIB_QPE) -lrfftw -lfftw -lqt-mt $(LIBSOCKET)
-
-SUBDIRS = docs 
-
-EXTRA_DIST = main.cpp parameter.cpp parameter.h cledbutton.cpp cledbutton.h constants.h cspectrumdisplay.cpp cspectrumdisplay.h color.h controlpanel.cpp controlpanel.h crecording.cpp crecording.h crxdisplay.cpp crxdisplay.h csquelch.cpp csquelch.h ctrigger.cpp ctrigger.h ctxdisplay.cpp ctxdisplay.h ctxfunctions.cpp ctxfunctions.h frequencyselect.cpp frequencyselect.h linpsk.cpp linpsk.h crxwindow.cpp crxwindow.h input.cpp input.h textinput.cpp textinput.h waveinput.cpp waveinput.h crxcha [...]
-
-####### kdevelop will overwrite this part!!! (end)############
-
-
-# set the include path for X, qt and KDE
-INCLUDES= $(all_includes)
-
-linpsk_METASOURCES = AUTO
-
-# the library search path. 
-linpsk_LDFLAGS = $(all_libraries) 
-
-# them while "make clean", use CLEANFILES
-DISTCLEANFILES = $(linpsk_METASOURCES)
-
diff --git a/linpsk/Makefile.in b/linpsk/Makefile.in
deleted file mode 100644
index 25456b3..0000000
--- a/linpsk/Makefile.in
+++ /dev/null
@@ -1,1070 +0,0 @@
-# Makefile.in generated by automake 1.7.2 from Makefile.am.
-# KDE tags expanded automatically by am_edit - $Revision: 1.349.2.2 $ 
-# @configure_input@
-
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
-# Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
- at SET_MAKE@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
-
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-ECHO = @ECHO@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FRAMEWORK_COREAUDIO = @FRAMEWORK_COREAUDIO@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@
-KDE_MT_LIBS = @KDE_MT_LIBS@
-KDE_PLUGIN = @KDE_PLUGIN@
-KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
-KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
-KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
-KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
-LDFLAGS = @LDFLAGS@
-LIBCOMPAT = @LIBCOMPAT@
-LIBCRYPT = @LIBCRYPT@
-LIBDL = @LIBDL@
-LIBJPEG = @LIBJPEG@
-LIBOBJS = @LIBOBJS@
-LIBPNG = @LIBPNG@
-LIBPTHREAD = @LIBPTHREAD@
-LIBRESOLV = @LIBRESOLV@
-LIBS = @LIBS@
-LIBSM = @LIBSM@
-LIBSOCKET = @LIBSOCKET@
-LIBTOOL = @LIBTOOL@
-LIBUCB = @LIBUCB@
-LIBUTIL = @LIBUTIL@
-LIBXINERAMA = @LIBXINERAMA@
-LIBZ = @LIBZ@
-LIB_POLL = @LIB_POLL@
-LIB_QPE = @LIB_QPE@
-LIB_QT = @LIB_QT@
-LIB_X11 = @LIB_X11@
-LIB_XEXT = @LIB_XEXT@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-MOC = @MOC@
-NOOPT_CFLAGS = @NOOPT_CFLAGS@
-NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
-NOREPO = @NOREPO@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-QTE_NORTTI = @QTE_NORTTI@
-QT_INCLUDES = @QT_INCLUDES@
-QT_LDFLAGS = @QT_LDFLAGS@
-RANLIB = @RANLIB@
-REPO = @REPO@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-TOPSUBDIRS = @TOPSUBDIRS@
-UIC = @UIC@
-UIC_TR = @UIC_TR@
-USER_INCLUDES = @USER_INCLUDES@
-USER_LDFLAGS = @USER_LDFLAGS@
-USE_EXCEPTIONS = @USE_EXCEPTIONS@
-USE_RTTI = @USE_RTTI@
-USE_THREADS = @USE_THREADS@
-VERSION = @VERSION@
-WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
-X_EXTRA_LIBS = @X_EXTRA_LIBS@
-X_INCLUDES = @X_INCLUDES@
-X_LDFLAGS = @X_LDFLAGS@
-X_PRE_LIBS = @X_PRE_LIBS@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-all_includes = @all_includes@
-all_libraries = @all_libraries@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
-am__include = @am__include@
-am__quote = @am__quote@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-kde_qtver = @kde_qtver@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-oldincludedir = @oldincludedir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-qt_includes = @qt_includes@
-qt_libraries = @qt_libraries@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-x_includes = @x_includes@
-x_libraries = @x_libraries@
-
-####### kdevelop will overwrite this part!!! (begin)##########
-bin_PROGRAMS = linpsk
-
-#>- linpsk_SOURCES = editmacro.ui qsoinfo.cpp macros.cpp macrowindow.cpp addmacro.ui qsodata.ui modemenu.ui utils.cpp generalsettings.ui interleaver.cpp feccoder.cpp fskmodulator.cpp mfskvaricode.cpp mfskmodulator.cpp qpskmodulator.cpp bpskmodulator.cpp ctxwindow.cpp ctxbuffer.cpp pskmodulator.cpp rttymodulator.cpp cmodulator.cpp viterbi.cpp deinterleaver.cpp fskdemodulator.cpp mfskdemodulator.cpp rttydemodulator.cpp addrxwindow.ui cdisplay.cpp qpskdemodulator.cpp csound.cpp cpskdemodula [...]
-#>+ 1
-linpsk_SOURCES= qsoinfo.cpp macros.cpp macrowindow.cpp    utils.cpp  interleaver.cpp feccoder.cpp fskmodulator.cpp mfskvaricode.cpp mfskmodulator.cpp qpskmodulator.cpp bpskmodulator.cpp ctxwindow.cpp ctxbuffer.cpp pskmodulator.cpp rttymodulator.cpp cmodulator.cpp viterbi.cpp deinterleaver.cpp fskdemodulator.cpp mfskdemodulator.cpp rttydemodulator.cpp  cdisplay.cpp qpskdemodulator.cpp csound.cpp cpskdemodulator.cpp bpskdemodulator.cpp cdemodulator.cpp crxchannel.cpp waveinput.cpp textinpu [...]
-## following changed to -lqt-mt for debian --w1bw at debian.org
-linpsk_LDADD = $(LIB_QPE) -lrfftw -lfftw -lqt-mt $(LIBSOCKET)
-
-SUBDIRS = docs 
-
-EXTRA_DIST = main.cpp parameter.cpp parameter.h cledbutton.cpp cledbutton.h constants.h cspectrumdisplay.cpp cspectrumdisplay.h color.h controlpanel.cpp controlpanel.h crecording.cpp crecording.h crxdisplay.cpp crxdisplay.h csquelch.cpp csquelch.h ctrigger.cpp ctrigger.h ctxdisplay.cpp ctxdisplay.h ctxfunctions.cpp ctxfunctions.h frequencyselect.cpp frequencyselect.h linpsk.cpp linpsk.h crxwindow.cpp crxwindow.h input.cpp input.h textinput.cpp textinput.h waveinput.cpp waveinput.h crxcha [...]
-
-####### kdevelop will overwrite this part!!! (end)############
-
-# set the include path for X, qt and KDE
-INCLUDES = $(all_includes)
-
-#>- linpsk_METASOURCES = AUTO
-
-# the library search path. 
-linpsk_LDFLAGS = $(all_libraries) 
-
-# them while "make clean", use CLEANFILES
-DISTCLEANFILES = $(linpsk_METASOURCES)
-subdir = linpsk
-mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-bin_PROGRAMS = linpsk$(EXEEXT)
-PROGRAMS = $(bin_PROGRAMS)
-
-am_linpsk_OBJECTS = qsoinfo.$(OBJEXT) macros.$(OBJEXT) \
-	macrowindow.$(OBJEXT) utils.$(OBJEXT) interleaver.$(OBJEXT) \
-	feccoder.$(OBJEXT) fskmodulator.$(OBJEXT) \
-	mfskvaricode.$(OBJEXT) mfskmodulator.$(OBJEXT) \
-	qpskmodulator.$(OBJEXT) bpskmodulator.$(OBJEXT) \
-	ctxwindow.$(OBJEXT) ctxbuffer.$(OBJEXT) pskmodulator.$(OBJEXT) \
-	rttymodulator.$(OBJEXT) cmodulator.$(OBJEXT) viterbi.$(OBJEXT) \
-	deinterleaver.$(OBJEXT) fskdemodulator.$(OBJEXT) \
-	mfskdemodulator.$(OBJEXT) rttydemodulator.$(OBJEXT) \
-	cdisplay.$(OBJEXT) qpskdemodulator.$(OBJEXT) csound.$(OBJEXT) \
-	cpskdemodulator.$(OBJEXT) bpskdemodulator.$(OBJEXT) \
-	cdemodulator.$(OBJEXT) crxchannel.$(OBJEXT) waveinput.$(OBJEXT) \
-	textinput.$(OBJEXT) input.$(OBJEXT) crxwindow.$(OBJEXT) \
-	linpsk.$(OBJEXT) frequencyselect.$(OBJEXT) \
-	ctxfunctions.$(OBJEXT) ctxdisplay.$(OBJEXT) ctrigger.$(OBJEXT) \
-	csquelch.$(OBJEXT) crxdisplay.$(OBJEXT) crecording.$(OBJEXT) \
-	controlpanel.$(OBJEXT) cspectrumdisplay.$(OBJEXT) \
-	cledbutton.$(OBJEXT) parameter.$(OBJEXT) main.$(OBJEXT)
-#>- linpsk_OBJECTS = $(am_linpsk_OBJECTS)
-#>+ 22
-linpsk_final_OBJECTS = linpsk.all_cpp.o 
-linpsk_nofinal_OBJECTS = qsoinfo.$(OBJEXT) macros.$(OBJEXT) \
-	macrowindow.$(OBJEXT) utils.$(OBJEXT) interleaver.$(OBJEXT) \
-	feccoder.$(OBJEXT) fskmodulator.$(OBJEXT) \
-	mfskvaricode.$(OBJEXT) mfskmodulator.$(OBJEXT) \
-	qpskmodulator.$(OBJEXT) bpskmodulator.$(OBJEXT) \
-	ctxwindow.$(OBJEXT) ctxbuffer.$(OBJEXT) pskmodulator.$(OBJEXT) \
-	rttymodulator.$(OBJEXT) cmodulator.$(OBJEXT) viterbi.$(OBJEXT) \
-	deinterleaver.$(OBJEXT) fskdemodulator.$(OBJEXT) \
-	mfskdemodulator.$(OBJEXT) rttydemodulator.$(OBJEXT) \
-	cdisplay.$(OBJEXT) qpskdemodulator.$(OBJEXT) csound.$(OBJEXT) \
-	cpskdemodulator.$(OBJEXT) bpskdemodulator.$(OBJEXT) \
-	cdemodulator.$(OBJEXT) crxchannel.$(OBJEXT) waveinput.$(OBJEXT) \
-	textinput.$(OBJEXT) input.$(OBJEXT) crxwindow.$(OBJEXT) \
-	linpsk.$(OBJEXT) frequencyselect.$(OBJEXT) \
-	ctxfunctions.$(OBJEXT) ctxdisplay.$(OBJEXT) ctrigger.$(OBJEXT) \
-	csquelch.$(OBJEXT) crxdisplay.$(OBJEXT) crecording.$(OBJEXT) \
-	controlpanel.$(OBJEXT) cspectrumdisplay.$(OBJEXT) \
-	cledbutton.$(OBJEXT) parameter.$(OBJEXT) main.$(OBJEXT) editmacro.$(OBJEXT) addmacro.$(OBJEXT) qsodata.$(OBJEXT) modemenu.$(OBJEXT) generalsettings.$(OBJEXT) addrxwindow.$(OBJEXT)\
-ctrigger.moc.o cledbutton.moc.o pskmodulator.moc.o crxdisplay.moc.o crxchannel.moc.o macrowindow.moc.o cspectrumdisplay.moc.o cmodulator.moc.o cdemodulator.moc.o ctxfunctions.moc.o frequencyselect.moc.o crecording.moc.o rttymodulator.moc.o cdisplay.moc.o linpsk.moc.o controlpanel.moc.o ctxwindow.moc.o csquelch.moc.o crxwindow.moc.o macros.moc.o cpskdemodulator.moc.o ctxdisplay.moc.o 
- at KDE_USE_FINAL_FALSE@linpsk_OBJECTS = $(linpsk_nofinal_OBJECTS)
- at KDE_USE_FINAL_TRUE@linpsk_OBJECTS = $(linpsk_final_OBJECTS)
-linpsk_DEPENDENCIES =
-
-DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/admin/depcomp
-am__depfiles_maybe = depfiles
-#>- @AMDEP_TRUE at DEP_FILES = ./$(DEPDIR)/bpskdemodulator.Po \
-#>- @AMDEP_TRUE@	./$(DEPDIR)/bpskmodulator.Po \
-#>- @AMDEP_TRUE@	./$(DEPDIR)/cdemodulator.Po ./$(DEPDIR)/cdisplay.Po \
-#>- @AMDEP_TRUE@	./$(DEPDIR)/cledbutton.Po ./$(DEPDIR)/cmodulator.Po \
-#>- @AMDEP_TRUE@	./$(DEPDIR)/controlpanel.Po \
-#>- @AMDEP_TRUE@	./$(DEPDIR)/cpskdemodulator.Po \
-#>- @AMDEP_TRUE@	./$(DEPDIR)/crecording.Po ./$(DEPDIR)/crxchannel.Po \
-#>- @AMDEP_TRUE@	./$(DEPDIR)/crxdisplay.Po ./$(DEPDIR)/crxwindow.Po \
-#>- @AMDEP_TRUE@	./$(DEPDIR)/csound.Po \
-#>- @AMDEP_TRUE@	./$(DEPDIR)/cspectrumdisplay.Po \
-#>- @AMDEP_TRUE@	./$(DEPDIR)/csquelch.Po ./$(DEPDIR)/ctrigger.Po \
-#>- @AMDEP_TRUE@	./$(DEPDIR)/ctxbuffer.Po ./$(DEPDIR)/ctxdisplay.Po \
-#>- @AMDEP_TRUE@	./$(DEPDIR)/ctxfunctions.Po \
-#>- @AMDEP_TRUE@	./$(DEPDIR)/ctxwindow.Po \
-#>- @AMDEP_TRUE@	./$(DEPDIR)/deinterleaver.Po \
-#>- @AMDEP_TRUE@	./$(DEPDIR)/feccoder.Po \
-#>- @AMDEP_TRUE@	./$(DEPDIR)/frequencyselect.Po \
-#>- @AMDEP_TRUE@	./$(DEPDIR)/fskdemodulator.Po \
-#>- @AMDEP_TRUE@	./$(DEPDIR)/fskmodulator.Po ./$(DEPDIR)/input.Po \
-#>- @AMDEP_TRUE@	./$(DEPDIR)/interleaver.Po ./$(DEPDIR)/linpsk.Po \
-#>- @AMDEP_TRUE@	./$(DEPDIR)/macros.Po ./$(DEPDIR)/macrowindow.Po \
-#>- @AMDEP_TRUE@	./$(DEPDIR)/main.Po ./$(DEPDIR)/mfskdemodulator.Po \
-#>- @AMDEP_TRUE@	./$(DEPDIR)/mfskmodulator.Po \
-#>- @AMDEP_TRUE@	./$(DEPDIR)/mfskvaricode.Po \
-#>- @AMDEP_TRUE@	./$(DEPDIR)/parameter.Po \
-#>- @AMDEP_TRUE@	./$(DEPDIR)/pskmodulator.Po \
-#>- @AMDEP_TRUE@	./$(DEPDIR)/qpskdemodulator.Po \
-#>- @AMDEP_TRUE@	./$(DEPDIR)/qpskmodulator.Po ./$(DEPDIR)/qsoinfo.Po \
-#>- @AMDEP_TRUE@	./$(DEPDIR)/rttydemodulator.Po \
-#>- @AMDEP_TRUE@	./$(DEPDIR)/rttymodulator.Po \
-#>- @AMDEP_TRUE@	./$(DEPDIR)/textinput.Po ./$(DEPDIR)/utils.Po \
-#>- @AMDEP_TRUE@	./$(DEPDIR)/viterbi.Po ./$(DEPDIR)/waveinput.Po
-#>+ 65
- at AMDEP_TRUE@@KDE_USE_FINAL_TRUE at DEP_FILES =  $(DEPDIR)/editmacro.P $(DEPDIR)/addmacro.P $(DEPDIR)/qsodata.P $(DEPDIR)/modemenu.P $(DEPDIR)/generalsettings.P $(DEPDIR)/addrxwindow.P $(DEPDIR)/ctrigger.moc.P $(DEPDIR)/cledbutton.moc.P $(DEPDIR)/pskmodulator.moc.P $(DEPDIR)/crxdisplay.moc.P $(DEPDIR)/crxchannel.moc.P $(DEPDIR)/macrowindow.moc.P $(DEPDIR)/cspectrumdisplay.moc.P $(DEPDIR)/cmodulator.moc.P $(DEPDIR)/cdemodulator.moc.P $(DEPDIR)/ctxfunctions.moc.P $(DEPDIR)/frequencyselect.moc. [...]
- at AMDEP_TRUE@@KDE_USE_FINAL_TRUE@	@AMDEP_TRUE@	./$(DEPDIR)/bpskmodulator.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_TRUE@	@AMDEP_TRUE@	./$(DEPDIR)/cdemodulator.Po ./$(DEPDIR)/cdisplay.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_TRUE@	@AMDEP_TRUE@	./$(DEPDIR)/cledbutton.Po ./$(DEPDIR)/cmodulator.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_TRUE@	@AMDEP_TRUE@	./$(DEPDIR)/controlpanel.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_TRUE@	@AMDEP_TRUE@	./$(DEPDIR)/cpskdemodulator.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_TRUE@	@AMDEP_TRUE@	./$(DEPDIR)/crecording.Po ./$(DEPDIR)/crxchannel.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_TRUE@	@AMDEP_TRUE@	./$(DEPDIR)/crxdisplay.Po ./$(DEPDIR)/crxwindow.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_TRUE@	@AMDEP_TRUE@	./$(DEPDIR)/csound.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_TRUE@	@AMDEP_TRUE@	./$(DEPDIR)/cspectrumdisplay.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_TRUE@	@AMDEP_TRUE@	./$(DEPDIR)/csquelch.Po ./$(DEPDIR)/ctrigger.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_TRUE@	@AMDEP_TRUE@	./$(DEPDIR)/ctxbuffer.Po ./$(DEPDIR)/ctxdisplay.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_TRUE@	@AMDEP_TRUE@	./$(DEPDIR)/ctxfunctions.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_TRUE@	@AMDEP_TRUE@	./$(DEPDIR)/ctxwindow.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_TRUE@	@AMDEP_TRUE@	./$(DEPDIR)/deinterleaver.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_TRUE@	@AMDEP_TRUE@	./$(DEPDIR)/feccoder.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_TRUE@	@AMDEP_TRUE@	./$(DEPDIR)/frequencyselect.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_TRUE@	@AMDEP_TRUE@	./$(DEPDIR)/fskdemodulator.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_TRUE@	@AMDEP_TRUE@	./$(DEPDIR)/fskmodulator.Po ./$(DEPDIR)/input.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_TRUE@	@AMDEP_TRUE@	./$(DEPDIR)/interleaver.Po ./$(DEPDIR)/linpsk.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_TRUE@	@AMDEP_TRUE@	./$(DEPDIR)/macros.Po ./$(DEPDIR)/macrowindow.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_TRUE@	@AMDEP_TRUE@	./$(DEPDIR)/main.Po ./$(DEPDIR)/mfskdemodulator.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_TRUE@	@AMDEP_TRUE@	./$(DEPDIR)/mfskmodulator.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_TRUE@	@AMDEP_TRUE@	./$(DEPDIR)/mfskvaricode.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_TRUE@	@AMDEP_TRUE@	./$(DEPDIR)/parameter.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_TRUE@	@AMDEP_TRUE@	./$(DEPDIR)/pskmodulator.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_TRUE@	@AMDEP_TRUE@	./$(DEPDIR)/qpskdemodulator.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_TRUE@	@AMDEP_TRUE@	./$(DEPDIR)/qpskmodulator.Po ./$(DEPDIR)/qsoinfo.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_TRUE@	@AMDEP_TRUE@	./$(DEPDIR)/rttydemodulator.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_TRUE@	@AMDEP_TRUE@	./$(DEPDIR)/rttymodulator.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_TRUE@	@AMDEP_TRUE@	./$(DEPDIR)/textinput.Po ./$(DEPDIR)/utils.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_TRUE@	@AMDEP_TRUE@	./$(DEPDIR)/viterbi.Po ./$(DEPDIR)/waveinput.Po
- at AMDEP_TRUE@@KDE_USE_FINAL_FALSE at DEP_FILES =  $(DEPDIR)/editmacro.P $(DEPDIR)/addmacro.P $(DEPDIR)/qsodata.P $(DEPDIR)/modemenu.P $(DEPDIR)/generalsettings.P $(DEPDIR)/addrxwindow.P $(DEPDIR)/ctrigger.moc.P $(DEPDIR)/cledbutton.moc.P $(DEPDIR)/pskmodulator.moc.P $(DEPDIR)/crxdisplay.moc.P $(DEPDIR)/crxchannel.moc.P $(DEPDIR)/macrowindow.moc.P $(DEPDIR)/cspectrumdisplay.moc.P $(DEPDIR)/cmodulator.moc.P $(DEPDIR)/cdemodulator.moc.P $(DEPDIR)/ctxfunctions.moc.P $(DEPDIR)/frequencyselect.moc [...]
- at AMDEP_TRUE@@KDE_USE_FINAL_FALSE@	@AMDEP_TRUE@	./$(DEPDIR)/bpskmodulator.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_FALSE@	@AMDEP_TRUE@	./$(DEPDIR)/cdemodulator.Po ./$(DEPDIR)/cdisplay.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_FALSE@	@AMDEP_TRUE@	./$(DEPDIR)/cledbutton.Po ./$(DEPDIR)/cmodulator.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_FALSE@	@AMDEP_TRUE@	./$(DEPDIR)/controlpanel.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_FALSE@	@AMDEP_TRUE@	./$(DEPDIR)/cpskdemodulator.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_FALSE@	@AMDEP_TRUE@	./$(DEPDIR)/crecording.Po ./$(DEPDIR)/crxchannel.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_FALSE@	@AMDEP_TRUE@	./$(DEPDIR)/crxdisplay.Po ./$(DEPDIR)/crxwindow.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_FALSE@	@AMDEP_TRUE@	./$(DEPDIR)/csound.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_FALSE@	@AMDEP_TRUE@	./$(DEPDIR)/cspectrumdisplay.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_FALSE@	@AMDEP_TRUE@	./$(DEPDIR)/csquelch.Po ./$(DEPDIR)/ctrigger.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_FALSE@	@AMDEP_TRUE@	./$(DEPDIR)/ctxbuffer.Po ./$(DEPDIR)/ctxdisplay.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_FALSE@	@AMDEP_TRUE@	./$(DEPDIR)/ctxfunctions.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_FALSE@	@AMDEP_TRUE@	./$(DEPDIR)/ctxwindow.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_FALSE@	@AMDEP_TRUE@	./$(DEPDIR)/deinterleaver.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_FALSE@	@AMDEP_TRUE@	./$(DEPDIR)/feccoder.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_FALSE@	@AMDEP_TRUE@	./$(DEPDIR)/frequencyselect.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_FALSE@	@AMDEP_TRUE@	./$(DEPDIR)/fskdemodulator.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_FALSE@	@AMDEP_TRUE@	./$(DEPDIR)/fskmodulator.Po ./$(DEPDIR)/input.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_FALSE@	@AMDEP_TRUE@	./$(DEPDIR)/interleaver.Po ./$(DEPDIR)/linpsk.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_FALSE@	@AMDEP_TRUE@	./$(DEPDIR)/macros.Po ./$(DEPDIR)/macrowindow.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_FALSE@	@AMDEP_TRUE@	./$(DEPDIR)/main.Po ./$(DEPDIR)/mfskdemodulator.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_FALSE@	@AMDEP_TRUE@	./$(DEPDIR)/mfskmodulator.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_FALSE@	@AMDEP_TRUE@	./$(DEPDIR)/mfskvaricode.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_FALSE@	@AMDEP_TRUE@	./$(DEPDIR)/parameter.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_FALSE@	@AMDEP_TRUE@	./$(DEPDIR)/pskmodulator.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_FALSE@	@AMDEP_TRUE@	./$(DEPDIR)/qpskdemodulator.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_FALSE@	@AMDEP_TRUE@	./$(DEPDIR)/qpskmodulator.Po ./$(DEPDIR)/qsoinfo.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_FALSE@	@AMDEP_TRUE@	./$(DEPDIR)/rttydemodulator.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_FALSE@	@AMDEP_TRUE@	./$(DEPDIR)/rttymodulator.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_FALSE@	@AMDEP_TRUE@	./$(DEPDIR)/textinput.Po ./$(DEPDIR)/utils.Po \
- at AMDEP_TRUE@@KDE_USE_FINAL_FALSE@	@AMDEP_TRUE@	./$(DEPDIR)/viterbi.Po ./$(DEPDIR)/waveinput.Po
-
-#>- CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
-#>- 	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-#>+ 2
-CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
-	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
-#>- LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \
-#>- 	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-#>- 	$(AM_CXXFLAGS) $(CXXFLAGS)
-#>+ 3
-LTCXXCOMPILE = $(LIBTOOL) --mode=compile --tag=CXX $(CXX) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS)
-CXXLD = $(CXX)
-#>- CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
-#>- 	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-#>+ 2
-CXXLINK = $(LIBTOOL) --mode=link --tag=CXX $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-DIST_SOURCES = $(linpsk_SOURCES)
-
-RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
-	ps-recursive install-info-recursive uninstall-info-recursive \
-	all-recursive install-data-recursive install-exec-recursive \
-	installdirs-recursive install-recursive uninstall-recursive \
-	check-recursive installcheck-recursive
-DIST_COMMON = Makefile.am Makefile.in
-DIST_SUBDIRS = $(SUBDIRS)
-SOURCES = $(linpsk_SOURCES)
-
-#>- all: all-recursive
-#>+ 1
-all: docs-am  all-recursive
-
-.SUFFIXES:
-.SUFFIXES: .cpp .lo .o .obj
-$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
-#>- 	cd $(top_srcdir) && \
-#>- 	  $(AUTOMAKE) --gnu  linpsk/Makefile
-#>+ 3
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  linpsk/Makefile
-	cd $(top_srcdir) && perl admin/am_edit linpsk-0.7.1/linpsk/Makefile.in
-Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
-install-binPROGRAMS: $(bin_PROGRAMS)
-	@$(NORMAL_INSTALL)
-	$(mkinstalldirs) $(DESTDIR)$(bindir)
-	@list='$(bin_PROGRAMS)'; for p in $$list; do \
-	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  if test -f $$p \
-	     || test -f $$p1 \
-	  ; then \
-	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-	   echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
-	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
-	  else :; fi; \
-	done
-
-uninstall-binPROGRAMS:
-	@$(NORMAL_UNINSTALL)
-	@list='$(bin_PROGRAMS)'; for p in $$list; do \
-	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-	  echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
-	  rm -f $(DESTDIR)$(bindir)/$$f; \
-	done
-
-clean-binPROGRAMS:
-	@list='$(bin_PROGRAMS)'; for p in $$list; do \
-	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  echo " rm -f $$p $$f"; \
-	  rm -f $$p $$f ; \
-	done
-linpsk$(EXEEXT): $(linpsk_OBJECTS) $(linpsk_DEPENDENCIES) 
-	@rm -f linpsk$(EXEEXT)
-	$(CXXLINK) $(linpsk_LDFLAGS) $(linpsk_OBJECTS) $(linpsk_LDADD) $(LIBS)
-
-mostlyclean-compile:
-	-rm -f *.$(OBJEXT) core *.core
-
-distclean-compile:
-	-rm -f *.tab.c
-
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bpskdemodulator.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bpskmodulator.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdemodulator.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdisplay.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cledbutton.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cmodulator.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/controlpanel.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cpskdemodulator.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/crecording.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/crxchannel.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/crxdisplay.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/crxwindow.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/csound.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cspectrumdisplay.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/csquelch.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ctrigger.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ctxbuffer.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ctxdisplay.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ctxfunctions.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ctxwindow.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/deinterleaver.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/feccoder.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/frequencyselect.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fskdemodulator.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fskmodulator.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/input.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/interleaver.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/linpsk.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/macros.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/macrowindow.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/main.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mfskdemodulator.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mfskmodulator.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mfskvaricode.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/parameter.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pskmodulator.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/qpskdemodulator.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/qpskmodulator.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/qsoinfo.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/rttydemodulator.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/rttymodulator.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/textinput.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/utils.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/viterbi.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/waveinput.Po at am__quote@
-
-distclean-depend:
-	-rm -rf ./$(DEPDIR)
-
-.cpp.o:
- at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
- at am__fastdepCXX_TRUE@	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
- at am__fastdepCXX_TRUE@	then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
- at am__fastdepCXX_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
- at am__fastdepCXX_TRUE@	fi
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
-
-.cpp.obj:
- at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
- at am__fastdepCXX_TRUE@	  -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
- at am__fastdepCXX_TRUE@	then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
- at am__fastdepCXX_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
- at am__fastdepCXX_TRUE@	fi
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
-
-.cpp.lo:
- at am__fastdepCXX_TRUE@	if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
- at am__fastdepCXX_TRUE@	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
- at am__fastdepCXX_TRUE@	then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \
- at am__fastdepCXX_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
- at am__fastdepCXX_TRUE@	fi
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
-	@set fnord $$MAKEFLAGS; amf=$$2; \
-	dot_seen=no; \
-	target=`echo $@ | sed s/-recursive//`; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    dot_seen=yes; \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
-	done; \
-	if test "$$dot_seen" = "no"; then \
-	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
-	fi; test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
-	@set fnord $$MAKEFLAGS; amf=$$2; \
-	dot_seen=no; \
-	case "$@" in \
-	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-	  *) list='$(SUBDIRS)' ;; \
-	esac; \
-	rev=''; for subdir in $$list; do \
-	  if test "$$subdir" = "."; then :; else \
-	    rev="$$subdir $$rev"; \
-	  fi; \
-	done; \
-	rev="$$rev ."; \
-	target=`echo $@ | sed s/-recursive//`; \
-	for subdir in $$rev; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
-	done && test -z "$$fail"
-tags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
-	done
-ctags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
-	done
-
-ETAGS = etags
-ETAGSFLAGS =
-
-CTAGS = ctags
-CTAGSFLAGS =
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	mkid -fID $$unique
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
-	  fi; \
-	done; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(ETAGS_ARGS)$$tags$$unique" \
-	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	     $$tags $$unique
-
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-#>+ 4
-KDE_DIST=filenew.xpm ctrigger.ui.h filesave.xpm ctxfunctions.ui.h ctxdisplay.ui frequencyselect.ui generalsettings.tar.gz ctxfunctions.ui ctrigger.ui ctxdisplay.ui.h csquelch.ui.h 
-
-DISTFILES= $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST)
-
-
-top_distdir = ..
-distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkinstalldirs) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
-	  if test -d $$d/$$file; then \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
-	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
-	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
-	    || exit 1; \
-	  fi; \
-	done
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    test -d $(distdir)/$$subdir \
-	    || mkdir $(distdir)/$$subdir \
-	    || exit 1; \
-	    (cd $$subdir && \
-	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$(top_distdir)" \
-	        distdir=../$(distdir)/$$subdir \
-	        distdir) \
-	      || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-recursive
-all-am: Makefile $(PROGRAMS)
-installdirs: installdirs-recursive
-installdirs-am:
-	$(mkinstalldirs) $(DESTDIR)$(bindir)
-
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-rm -f Makefile $(CONFIG_CLEAN_FILES)
-	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-#>- clean: clean-recursive
-#>+ 1
-clean: kde-rpo-clean  clean-recursive
-
-#>- clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
-#>+ 1
-clean-am: clean-metasources clean-ui clean-final  clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-recursive
-
-distclean-am: clean-am distclean-compile distclean-depend \
-	distclean-generic distclean-libtool distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-info: info-recursive
-
-info-am:
-
-install-data-am:
-
-install-exec-am: install-binPROGRAMS
-
-install-info: install-info-recursive
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
-
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
-	mostlyclean-libtool
-
-pdf: pdf-recursive
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am: uninstall-binPROGRAMS uninstall-info-am
-
-uninstall-info: uninstall-info-recursive
-
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
-	clean-binPROGRAMS clean-generic clean-libtool clean-recursive \
-	ctags ctags-recursive distclean distclean-compile \
-	distclean-depend distclean-generic distclean-libtool \
-	distclean-recursive distclean-tags distdir dvi dvi-am \
-	dvi-recursive info info-am info-recursive install install-am \
-	install-binPROGRAMS install-data install-data-am \
-	install-data-recursive install-exec install-exec-am \
-	install-exec-recursive install-info install-info-am \
-	install-info-recursive install-man install-recursive \
-	install-strip installcheck installcheck-am installdirs \
-	installdirs-am installdirs-recursive maintainer-clean \
-	maintainer-clean-generic maintainer-clean-recursive mostlyclean \
-	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
-	mostlyclean-recursive pdf pdf-am pdf-recursive ps ps-am \
-	ps-recursive tags tags-recursive uninstall uninstall-am \
-	uninstall-binPROGRAMS uninstall-info-am \
-	uninstall-info-recursive uninstall-recursive
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
-
-
-#>+ 61
-editmacro.cpp: $(srcdir)/editmacro.ui editmacro.h editmacro.moc
-	rm -f editmacro.cpp
-	$(UIC) -i editmacro.h $(srcdir)/editmacro.ui > editmacro.cpp; ret=$$?; \
-	if test "$$ret" = 0; then echo '#include "editmacro.moc"' >> editmacro.cpp; else rm -f editmacro.cpp ; exit $$ret ; fi
-
-editmacro.h: $(srcdir)/editmacro.ui
-	$(UIC) -o editmacro.h $(srcdir)/editmacro.ui
-
-editmacro.moc: editmacro.h
-	$(MOC) editmacro.h -o editmacro.moc
-addmacro.cpp: $(srcdir)/addmacro.ui addmacro.h addmacro.moc
-	rm -f addmacro.cpp
-	$(UIC) -i addmacro.h $(srcdir)/addmacro.ui > addmacro.cpp; ret=$$?; \
-	if test "$$ret" = 0; then echo '#include "addmacro.moc"' >> addmacro.cpp; else rm -f addmacro.cpp ; exit $$ret ; fi
-
-addmacro.h: $(srcdir)/addmacro.ui
-	$(UIC) -o addmacro.h $(srcdir)/addmacro.ui
-
-addmacro.moc: addmacro.h
-	$(MOC) addmacro.h -o addmacro.moc
-qsodata.cpp: $(srcdir)/qsodata.ui qsodata.h qsodata.moc
-	rm -f qsodata.cpp
-	$(UIC) -i qsodata.h $(srcdir)/qsodata.ui > qsodata.cpp; ret=$$?; \
-	if test "$$ret" = 0; then echo '#include "qsodata.moc"' >> qsodata.cpp; else rm -f qsodata.cpp ; exit $$ret ; fi
-
-qsodata.h: $(srcdir)/qsodata.ui
-	$(UIC) -o qsodata.h $(srcdir)/qsodata.ui
-
-qsodata.moc: qsodata.h
-	$(MOC) qsodata.h -o qsodata.moc
-modemenu.cpp: $(srcdir)/modemenu.ui modemenu.h modemenu.moc
-	rm -f modemenu.cpp
-	$(UIC) -i modemenu.h $(srcdir)/modemenu.ui > modemenu.cpp; ret=$$?; \
-	if test "$$ret" = 0; then echo '#include "modemenu.moc"' >> modemenu.cpp; else rm -f modemenu.cpp ; exit $$ret ; fi
-
-modemenu.h: $(srcdir)/modemenu.ui
-	$(UIC) -o modemenu.h $(srcdir)/modemenu.ui
-
-modemenu.moc: modemenu.h
-	$(MOC) modemenu.h -o modemenu.moc
-generalsettings.cpp: $(srcdir)/generalsettings.ui generalsettings.h generalsettings.moc
-	rm -f generalsettings.cpp
-	$(UIC) -i generalsettings.h $(srcdir)/generalsettings.ui > generalsettings.cpp; ret=$$?; \
-	if test "$$ret" = 0; then echo '#include "generalsettings.moc"' >> generalsettings.cpp; else rm -f generalsettings.cpp ; exit $$ret ; fi
-
-generalsettings.h: $(srcdir)/generalsettings.ui
-	$(UIC) -o generalsettings.h $(srcdir)/generalsettings.ui
-
-generalsettings.moc: generalsettings.h
-	$(MOC) generalsettings.h -o generalsettings.moc
-addrxwindow.cpp: $(srcdir)/addrxwindow.ui addrxwindow.h addrxwindow.moc
-	rm -f addrxwindow.cpp
-	$(UIC) -i addrxwindow.h $(srcdir)/addrxwindow.ui > addrxwindow.cpp; ret=$$?; \
-	if test "$$ret" = 0; then echo '#include "addrxwindow.moc"' >> addrxwindow.cpp; else rm -f addrxwindow.cpp ; exit $$ret ; fi
-
-addrxwindow.h: $(srcdir)/addrxwindow.ui
-	$(UIC) -o addrxwindow.h $(srcdir)/addrxwindow.ui
-
-addrxwindow.moc: addrxwindow.h
-	$(MOC) addrxwindow.h -o addrxwindow.moc
-
-#>+ 3
-ctrigger.moc.cpp: $(srcdir)/ctrigger.h
-	$(MOC) $(srcdir)/ctrigger.h -o ctrigger.moc.cpp
-
-#>+ 3
-cledbutton.moc.cpp: $(srcdir)/cledbutton.h
-	$(MOC) $(srcdir)/cledbutton.h -o cledbutton.moc.cpp
-
-#>+ 3
-pskmodulator.moc.cpp: $(srcdir)/pskmodulator.h
-	$(MOC) $(srcdir)/pskmodulator.h -o pskmodulator.moc.cpp
-
-#>+ 3
-crxdisplay.moc.cpp: $(srcdir)/crxdisplay.h
-	$(MOC) $(srcdir)/crxdisplay.h -o crxdisplay.moc.cpp
-
-#>+ 3
-crxchannel.moc.cpp: $(srcdir)/crxchannel.h
-	$(MOC) $(srcdir)/crxchannel.h -o crxchannel.moc.cpp
-
-#>+ 3
-macrowindow.moc.cpp: $(srcdir)/macrowindow.h
-	$(MOC) $(srcdir)/macrowindow.h -o macrowindow.moc.cpp
-
-#>+ 3
-cspectrumdisplay.moc.cpp: $(srcdir)/cspectrumdisplay.h
-	$(MOC) $(srcdir)/cspectrumdisplay.h -o cspectrumdisplay.moc.cpp
-
-#>+ 3
-cmodulator.moc.cpp: $(srcdir)/cmodulator.h
-	$(MOC) $(srcdir)/cmodulator.h -o cmodulator.moc.cpp
-
-#>+ 3
-cdemodulator.moc.cpp: $(srcdir)/cdemodulator.h
-	$(MOC) $(srcdir)/cdemodulator.h -o cdemodulator.moc.cpp
-
-#>+ 3
-ctxfunctions.moc.cpp: $(srcdir)/ctxfunctions.h
-	$(MOC) $(srcdir)/ctxfunctions.h -o ctxfunctions.moc.cpp
-
-#>+ 3
-frequencyselect.moc.cpp: $(srcdir)/frequencyselect.h
-	$(MOC) $(srcdir)/frequencyselect.h -o frequencyselect.moc.cpp
-
-#>+ 3
-crecording.moc.cpp: $(srcdir)/crecording.h
-	$(MOC) $(srcdir)/crecording.h -o crecording.moc.cpp
-
-#>+ 3
-rttymodulator.moc.cpp: $(srcdir)/rttymodulator.h
-	$(MOC) $(srcdir)/rttymodulator.h -o rttymodulator.moc.cpp
-
-#>+ 3
-cdisplay.moc.cpp: $(srcdir)/cdisplay.h
-	$(MOC) $(srcdir)/cdisplay.h -o cdisplay.moc.cpp
-
-#>+ 3
-linpsk.moc.cpp: $(srcdir)/linpsk.h
-	$(MOC) $(srcdir)/linpsk.h -o linpsk.moc.cpp
-
-#>+ 3
-controlpanel.moc.cpp: $(srcdir)/controlpanel.h
-	$(MOC) $(srcdir)/controlpanel.h -o controlpanel.moc.cpp
-
-#>+ 3
-ctxwindow.moc.cpp: $(srcdir)/ctxwindow.h
-	$(MOC) $(srcdir)/ctxwindow.h -o ctxwindow.moc.cpp
-
-#>+ 3
-csquelch.moc.cpp: $(srcdir)/csquelch.h
-	$(MOC) $(srcdir)/csquelch.h -o csquelch.moc.cpp
-
-#>+ 3
-crxwindow.moc.cpp: $(srcdir)/crxwindow.h
-	$(MOC) $(srcdir)/crxwindow.h -o crxwindow.moc.cpp
-
-#>+ 3
-macros.moc.cpp: $(srcdir)/macros.h
-	$(MOC) $(srcdir)/macros.h -o macros.moc.cpp
-
-#>+ 3
-cpskdemodulator.moc.cpp: $(srcdir)/cpskdemodulator.h
-	$(MOC) $(srcdir)/cpskdemodulator.h -o cpskdemodulator.moc.cpp
-
-#>+ 3
-ctxdisplay.moc.cpp: $(srcdir)/ctxdisplay.h
-	$(MOC) $(srcdir)/ctxdisplay.h -o ctxdisplay.moc.cpp
-
-#>+ 3
-clean-metasources:
-	-rm -f  ctrigger.moc.cpp cledbutton.moc.cpp pskmodulator.moc.cpp crxdisplay.moc.cpp crxchannel.moc.cpp macrowindow.moc.cpp cspectrumdisplay.moc.cpp cmodulator.moc.cpp cdemodulator.moc.cpp ctxfunctions.moc.cpp frequencyselect.moc.cpp crecording.moc.cpp rttymodulator.moc.cpp cdisplay.moc.cpp linpsk.moc.cpp controlpanel.moc.cpp ctxwindow.moc.cpp csquelch.moc.cpp crxwindow.moc.cpp macros.moc.cpp cpskdemodulator.moc.cpp ctxdisplay.moc.cpp
-
-#>+ 9
-clean-ui:
-	-rm -f \
-	editmacro.cpp editmacro.h editmacro.moc \
-	addmacro.cpp addmacro.h addmacro.moc \
-	qsodata.cpp qsodata.h qsodata.moc \
-	modemenu.cpp modemenu.h modemenu.moc \
-	generalsettings.cpp generalsettings.h generalsettings.moc \
-	addrxwindow.cpp addrxwindow.h addrxwindow.moc 
-
-#>+ 2
-docs-am:
-
-#>+ 6
-force-reedit:
-		cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  linpsk/Makefile
-	cd $(top_srcdir) && perl admin/am_edit linpsk-0.7.1/linpsk/Makefile.in
-
-
-#>+ 11
-linpsk.all_cpp.cpp: $(srcdir)/Makefile.in $(srcdir)/qsoinfo.cpp $(srcdir)/macros.cpp $(srcdir)/macrowindow.cpp $(srcdir)/utils.cpp $(srcdir)/interleaver.cpp $(srcdir)/feccoder.cpp $(srcdir)/fskmodulator.cpp $(srcdir)/mfskvaricode.cpp $(srcdir)/mfskmodulator.cpp $(srcdir)/qpskmodulator.cpp $(srcdir)/bpskmodulator.cpp $(srcdir)/ctxwindow.cpp $(srcdir)/ctxbuffer.cpp $(srcdir)/pskmodulator.cpp $(srcdir)/rttymodulator.cpp $(srcdir)/cmodulator.cpp $(srcdir)/viterbi.cpp $(srcdir)/deinterleaver. [...]
-	@echo 'creating linpsk.all_cpp.cpp ...'; \
-	rm -f linpsk.all_cpp.files linpsk.all_cpp.final; \
-	echo "#define KDE_USE_FINAL 1" >> linpsk.all_cpp.final; \
-	for file in qsoinfo.cpp macros.cpp macrowindow.cpp utils.cpp interleaver.cpp feccoder.cpp fskmodulator.cpp mfskvaricode.cpp mfskmodulator.cpp qpskmodulator.cpp bpskmodulator.cpp ctxwindow.cpp ctxbuffer.cpp pskmodulator.cpp rttymodulator.cpp cmodulator.cpp viterbi.cpp deinterleaver.cpp fskdemodulator.cpp mfskdemodulator.cpp rttydemodulator.cpp cdisplay.cpp qpskdemodulator.cpp csound.cpp cpskdemodulator.cpp bpskdemodulator.cpp cdemodulator.cpp crxchannel.cpp waveinput.cpp textinput.cpp in [...]
-	  echo "#include \"$$file\"" >> linpsk.all_cpp.files; \
-	  test ! -f $(srcdir)/$$file || egrep '^#pragma +implementation' $(srcdir)/$$file >> linpsk.all_cpp.final; \
-	done; \
-	cat linpsk.all_cpp.final linpsk.all_cpp.files > linpsk.all_cpp.cpp; \
-	rm -f linpsk.all_cpp.final linpsk.all_cpp.files
-
-#>+ 3
-clean-final:
-	-rm -f linpsk.all_cpp.cpp
-
-#>+ 2
-final:
-	$(MAKE) linpsk_OBJECTS="$(linpsk_final_OBJECTS)" all-am
-#>+ 2
-final-install:
-	$(MAKE) linpsk_OBJECTS="$(linpsk_final_OBJECTS)" install-am
-#>+ 2
-no-final:
-	$(MAKE) linpsk_OBJECTS="$(linpsk_nofinal_OBJECTS)" all-am
-#>+ 2
-no-final-install:
-	$(MAKE) linpsk_OBJECTS="$(linpsk_nofinal_OBJECTS)" install-am
-#>+ 3
-cvs-clean:
-	$(MAKE) admindir=$(top_srcdir)/admin -f $(top_srcdir)/admin/Makefile.common cvs-clean
-
-#>+ 3
-kde-rpo-clean:
-	-rm -f *.rpo
-
-#>+ 46
-$(srcdir)/qpskdemodulator.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/cdisplay.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/rttymodulator.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/controlpanel.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/waveinput.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/cmodulator.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/macrowindow.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/main.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/cpskdemodulator.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/viterbi.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/qpskmodulator.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/csquelch.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/bpskdemodulator.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/interleaver.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/mfskvaricode.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/crecording.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/cspectrumdisplay.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/fskdemodulator.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/ctxwindow.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/qsoinfo.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/frequencyselect.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/deinterleaver.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/ctxbuffer.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/parameter.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/textinput.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/fskmodulator.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/input.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/ctxdisplay.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/mfskdemodulator.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/csound.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/rttydemodulator.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/macros.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/cdemodulator.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/crxdisplay.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/ctxfunctions.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/linpsk.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/pskmodulator.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/utils.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/ctrigger.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/bpskmodulator.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/crxchannel.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/mfskmodulator.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/feccoder.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/cledbutton.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
-$(srcdir)/crxwindow.cpp: editmacro.h addmacro.h qsodata.h modemenu.h generalsettings.h addrxwindow.h 
diff --git a/linpsk/cdisplay.cpp b/linpsk/cdisplay.cpp
deleted file mode 100644
index 1e109b3..0000000
--- a/linpsk/cdisplay.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-/***************************************************************************
-                          cdisplay.cpp  -  description
-                             -------------------
-    begin                : Sat Mar 18 2000
-    copyright            : (C) 2000 by Volker Schroer
-    email                : DL1KSV at gmx.de
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   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  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *    based on the work of  Moe Wheatly, AE4JY                             *  
- ***************************************************************************/
-
-
-#include "cdisplay.h"
-#include <qpixmap.h>
-#include <qpainter.h>
-
-CDisplay::CDisplay(QWidget *parent, const char *name ): QFrame(parent,name)
-
-{
-    setBackgroundColor(white);
-    setFrameStyle(QFrame::Box | QFrame::Sunken);
-    setLineWidth(2);
-    setMidLineWidth(1);
-    Buffer = 0;
-
-}
-
-CDisplay::~CDisplay()
-{
-}
-
-void CDisplay::paintEvent(QPaintEvent *)
-{
-QPainter p;
-p.begin(this);
-
-if (Buffer !=0)
- bitBlt(this,0,0,Buffer);
-drawFrame(&p);
-
-p.end();
-}
-
-void CDisplay::mousePressEvent(QMouseEvent *e)
-
-{
-emit frequencyChanged(e->x());
-}
-
-void CDisplay::setBufferPointer(QPixmap *p)
-{
-Buffer = p;
-}
diff --git a/linpsk/cdisplay.h b/linpsk/cdisplay.h
deleted file mode 100644
index 74bb4e0..0000000
--- a/linpsk/cdisplay.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/***************************************************************************
-                          cdisplay.h  -  description
-                             -------------------
-    begin                : Mon Mar 6 2000
-    copyright            : (C) 2000 by Volker Schroer
-    email                : DL1KSV at gmx.de
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   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  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *   based on the work of Moe Wheatley, AE4JY                              *
- ***************************************************************************/
-
-#ifndef CDISPLAY_H
-#define CDISPLAY_H
-
-#include <qframe.h>
-
-class QPixmap;
-
-/**Class for displaying the different Types
-of the input data like spectrum, waterfall
-  *@author Volker Schroer
-  */
-
-
-class CDisplay : public QFrame  {
- Q_OBJECT
-public: 
-	CDisplay(QWidget *parent,  const char *name=0 );
-	~CDisplay();
-  /** Painter for CDisplay Class */
-  void setBufferPointer(QPixmap *);
-  void paintEvent(QPaintEvent *);
-	void mousePressEvent(QMouseEvent *);
-
-
-
-public slots:
-signals: // Signals
-void frequencyChanged(int);
-protected: // Protected methods
-private:
-
-QPixmap* Buffer;
- };
-
-#endif
diff --git a/linpsk/csound.cpp b/linpsk/csound.cpp
deleted file mode 100644
index 481b67c..0000000
--- a/linpsk/csound.cpp
+++ /dev/null
@@ -1,339 +0,0 @@
-/***************************************************************************
-                          csound.cpp  -  description
-                             -------------------
-    begin                : Wed Apr 5 2000
-    copyright            : (C) 2000 by Volker Schroer
-    email                : huv.schroer at gmx.de
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   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  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- ***************************************************************************/
-
-#include "csound.h"
-
-#ifdef LINPSK_FOR_MAC
-#include <esd.h>
-#include "parameter.h"
-extern Parameter settings;
-#endif
-
-
-CSound::CSound(int ptt = -1):Input(ptt)
-{
-#ifdef LINPSK_FOR_MAC
-audioformat=ESD_BITS16; // 16 Bit little Endian
-mode=ESD_MONO;	//Mono
-#else
-audioformat=AFMT_S16_LE; // 16 Bit little Endian
-mode=0;	//Mono
-#endif
-speed=11025;
-fragsize=BUF_SIZE;
-started=FALSE;
-audio_buffer=0;
-
-
-}
-CSound::~CSound()
-{
-if ( audio_buffer > 0)
-	delete audio_buffer;
-}
-
-bool CSound::setParams(QString *errorstring)
-{
-audio_buffer=0;
-audio_buffer= new unsigned char[BUF_SIZE*sizeof(short int)];
-
-if ( audio_buffer <= 0)
-  {
-	 *errorstring= QString(QObject::tr("Could not assign enough memory for buffer"));
-	 return FALSE;
-	}
-
-
-#ifdef LINPSK_FOR_MAC
-int fl;
-fl=1;
-ioctl(fd,FIONBIO,&fl); // Set IO to Nonblocking
-filled = 0;
-#else
-unsigned int fs;
-int Fragsize;
-
-Fragsize=fragsize;
-for (fs=0;Fragsize>0;fs++)
-    {
-      Fragsize>>=1;
-    }
-
-Fragsize=0x7fff0000+fs;
-
- if(ioctl(fd,SNDCTL_DSP_SETFMT,&audioformat) == -1)
-  {
-	 *errorstring= QString(QObject::tr("Error setting Audioformat"));
-	 return FALSE;
-	}
- if(audioformat != AFMT_S16_LE)
-	 if(audioformat != AFMT_U8)
-  {
-		*errorstring = QString(QObject::tr("Device neither supports 16 Bit encoding nor 8 bit unsigned ")) + QString::number(audioformat);
-		return FALSE;
-	}
-if (ioctl(fd,SNDCTL_DSP_STEREO,&mode) == -1)
-	{
-	 *errorstring=QString(QObject::tr("Error setting Mono Mode"));
-   return FALSE;
-	}
-if (ioctl(fd,SNDCTL_DSP_SPEED,&speed) == -1)
-	{
-	 *errorstring=QString(QObject::tr("Error setting speed to 11025 HZ"));
-	return FALSE;
-	}
-	// Set Fragsize
-  ioctl (fd, SNDCTL_DSP_SETFRAGMENT,&Fragsize);
-
-  // and read it back
-  if(ioctl(fd,SNDCTL_DSP_GETBLKSIZE,&fs))
-    {
-      *errorstring=QString(QObject::tr("Error on reading fragsize"));
-      return FALSE;
-    }
- if (fs != fragsize*sizeof(short int))
-		{
-		 *errorstring=QString(QObject::tr("Not enough memory for requested Fragmentsize"));
-			return FALSE;
-		}
-
-#endif
-
-return true;
-}
-
-
-int CSound::getSamples(double *sample,int anzahl)
-{
-
-
-unsigned char *audiobuffer;
-
-int len;
-int i;
-short int value;
-#ifdef LINPSK_FOR_MAC
-
-		audiobuffer=audio_buffer;
-		len=read(fd,audio_buffer,(anzahl - filled)*sizeof(short int));
-
-		if ( len > 0)
-			{
-				sample += filled;
-				for(i=0;i<len;i +=2)
-  			{
-				value = *audiobuffer++ ;
-				value = (value & 0x00FF) | ((*audiobuffer++ << 8	) & 0xFF00);		
-    	 	*sample++=float(value);
-				}
-	     }
-
-if ( len/2 + filled < anzahl)
-	{
-	filled = filled + len/2 ;
-  len = 0;
-	}
-else
- filled = 0;
-return len;
-	
-}
-#else
-
-unsigned short int uvalue;
-
-		audiobuffer=audio_buffer;
- 		if (started)
-    	 {
-				ioctl(fd, SNDCTL_DSP_GETISPACE, &info);
-      	if(info.fragments == 0)
-	 	  		return 0;
-		  	}	
-		else
-				started= true;
-	if (audioformat == AFMT_S16_LE)
-	 {	
-		len=read(fd,audio_buffer,anzahl*sizeof(short int));
-		for(i=0;i<len;i +=2)
-  		{
-        value = *audiobuffer++;
-				value = (value & 0x00FF) | ((*audiobuffer++ << 8	) & 0xFF00);
-     		*sample++=float(value);
-			}
-		 }	
-		else
-	 {	
-		len=read(fd,audio_buffer,anzahl*sizeof(char));
-		for(i=0;i<len;i++)
-  		{
-				uvalue = (*audiobuffer++ << 8	) & 0xFF00;		
-     		*sample++=float(uvalue-32786);
-			}
-		 }	
-
-return len;
-}	
-
-#endif
-	
-#ifdef LINPSK_FOR_MAC
-bool CSound::open_Device_read(QString Device)
-{
-esd_format_t format;
-int fl;
-
-	format = ESD_BITS16 | ESD_MONO | ESD_SAMPLE | ESD_RECORD;
-	fd=esd_record_stream_fallback(format,speed,NULL,NULL);
-
-	if (fd >0 )
-			return true;
-	else
-		return false;
-	
-}
-#endif
-
-bool CSound::open_Device_write(QString Device)
-{
-
-#ifdef LINPSK_FOR_MAC
-esd_format_t format;
-
-format = ESD_STREAM | ESD_MONO | audioformat | ESD_PLAY;		
-fd=esd_play_stream_fallback(format,speed,NULL,NULL);
-
-#else
-fd=open(Device,O_WRONLY);
-#endif
-if (fd >0)
-		return true;
-else
-	return false;
-}
-
-int CSound::putSamples(double *sample,int anzahl)
-{
- int len;
- int i;
-
- unsigned char *audiobuffer;
- short int value;
-
- audiobuffer=audio_buffer;	
-
-#ifdef LINPSK_FOR_MAC
-if ( filled == 0)
-	{
-  for (i=0;i<anzahl;i++)
-		{
-		value = (*sample++)*settings.OutputVolume/100.;
-		*audiobuffer++ = (unsigned char) (value & 0xff);
-		*audiobuffer++ = (unsigned char) ((value >> 8) &0xff);
-		}
-	i=anzahl*sizeof(short int);
-  	len =  write(fd,audio_buffer,i);
-	if (len != i)
-		{
-		if (len > 0 )
-			filled = len;
-		return 0;
-		}
-	else
-	 return len/2;
-	}
-else
-	{
-		i=anzahl*sizeof(short int)-filled;
-	 	len =  write(fd,&audio_buffer[filled],i);
-	if (len != i)
-		{
-		if (len > 0 )
-			filled = filled + len;
-		return 0;
-		}
-	else
-	{
-  	filled = 0;
-	 return anzahl;
-	}
-	}	
-#else
- ioctl(fd, SNDCTL_DSP_GETOSPACE, &info);
- if(info.fragments <= info.fragstotal-2) // Dont write too much buffers
-    {
-      return 0;
-    }
-if (audioformat == AFMT_S16_LE)
-	{
-	  for (i=0;i<anzahl;i++)
-		{
-			*sample = *sample/4.;
-			value= (short int) (*sample++);
-			*audiobuffer++ = (unsigned char) (value & 0xff);
-			*audiobuffer++ = (unsigned char) ((value >> 8) &0xff);
-		}
-  	len = write(fd,audio_buffer,anzahl*sizeof(short int));
-		len = len/2;
-	}
-	else
-	{
- 		for (i=0;i<anzahl;i++)
-		{
-			*sample = *sample/2.;
-			value = (short int) (*sample++);
-			unsigned short int uvalue = value + 32786;
-			*audiobuffer++ =(unsigned char) ((uvalue >> 8) &0xff);
-		}
-		len = write(fd,audio_buffer,anzahl);
-		
-	}
-  return len;
-#endif
-}
-
-void CSound::PTT(bool mode)
-{
-#ifdef LINPSK_FOR_MAC
-return;
-#else
-int flags;
-flags= TIOCM_RTS|TIOCM_DTR;
-if (serial <0) // No serial Device selected
-		return;
-if (mode)		// PTT on
-	ioctl(serial,TIOCMBIS,&flags);
-else
-  ioctl(serial,TIOCMBIC,&flags);
-return;
-#endif
-}
-
-bool CSound::close_Device()
-{
-
-if(fd >= 0)
-#ifdef LINPSK_FOR_MAC
-	 esd_close(fd);
-#else
-	close (fd);
-#endif
-	
-fd=-1;
-started = false;
-return true;
-}
-
-
diff --git a/linpsk/cspectrumdisplay.cpp b/linpsk/cspectrumdisplay.cpp
deleted file mode 100644
index 2f7fcd6..0000000
--- a/linpsk/cspectrumdisplay.cpp
+++ /dev/null
@@ -1,395 +0,0 @@
-/***************************************************************************
-                          cspectrumdisplay.cpp  -  description
-                             -------------------
-    begin                : Son Dez 8 2002
-    copyright            : (C) 2002 by Volker Schroer
-    email                : dl1ksv at gmx.de
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   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  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- ***************************************************************************/
-
-
-#include <qradiobutton.h>
-#include <qspinbox.h>
-#include <qpixmap.h>
-#include <qpainter.h>
-
-#include "cspectrumdisplay.h"
-#include "crxchannel.h"
-#include "parameter.h"
-#include "color.h"
-#include "cdisplay.h"
-#define SPECTRUMHEIGHT 80
-#define WATERFALLHEIGHT 20
-#define distance 3
-
-extern Parameter settings;
-
-CSpectrumDisplay::CSpectrumDisplay( QWidget* parent, const char* name, WFlags fl )
-    : QWidget( parent, name, fl )
-{
-
-    Display=new CDisplay(this,"Spectrum");
-    MaxFreq = new QSpinBox( this, "MaxFreq" );
-    MaxFreq->setMaxValue( 2500 );
-    MaxFreq->setMinValue( 1300 );
-    MaxFreq->setValue( 2500 );
-    MaxFreq->setLineStep(100);
-
-    MinFreq = new QSpinBox( this, "MinFreq" );
-    MinFreq->setButtonSymbols( QSpinBox::UpDownArrows );
-    MinFreq->setMaxValue( 1200 );
-    MinFreq->setMinValue( 100 );
-    MinFreq->setLineStep( 100);
-
-//    Slow = new QRadioButton( this, "Slow" );
-    languageChange();
-    calculateSizeofComponents();
-
-    inputdata=0;
-    // Creating Variables for the fft
-
-    output = new fftw_real[BUF_SIZE/2];
-
-    plan=rfftw_create_plan(BUF_SIZE/2,FFTW_REAL_TO_COMPLEX,FFTW_ESTIMATE);
-
-    pdisplay = 0;
-    pwaterfall=0;
-    overload=false;
-    Phase=0;
-    Farbe=0;
-// Connections
-   connect(Display,SIGNAL(frequencyChanged(int)),this,SLOT(setnewFrequency(int)));
-}
-
-/*
- *  Destroys the object and frees any allocated resources
- */
-CSpectrumDisplay::~CSpectrumDisplay()
-{
-    // no need to delete child widgets, Qt does it all for us
-}
-
-/*
- *  Sets the strings of the subwidgets using the current
- *  language.
- */
-void CSpectrumDisplay::languageChange()
-{
-
-    MaxFreq->setSuffix( tr( " Hz" ) );
-    MinFreq->setSuffix( tr( " Hz" ) );
-//    Slow->setText( tr( "Slow" ) );
-}
-void CSpectrumDisplay::resizeEvent( QResizeEvent * )
-{
- 
-calculateSizeofComponents();
-translate();
-if (pdisplay != 0)
-  pdisplay->resize(Display->width(),Display->height());
-else
-  pdisplay = new QPixmap(Display->width(),Display->height());
-if (pwaterfall != 0)
-  pwaterfall->resize(Display->width(),30);
-else
-  pwaterfall = new QPixmap(Display->width(),30);
-pwaterfall->fill(black);
-plotspectrum();
-
-}
-
-void CSpectrumDisplay::calculateSizeofComponents()
-{
-int xpos,ypos,width,height,innerheight,innerwidth,xdist;
-width=this->width();
-height=this->height();
-/** Display **/
-xpos=0;
-ypos=height*distance/100;
-innerwidth=width;
-innerheight=height*SPECTRUMHEIGHT/100;
-Display->setGeometry(xpos,ypos,innerwidth,innerheight);
-
-/** Controlelements of the display **/
-ypos=ypos+innerheight+distance*height/100;
-innerheight=height-ypos-distance*height/100;
-innerwidth=(width-2*xpos)/3;
-xdist=innerwidth/2;
-MinFreq->setGeometry(xpos,ypos,innerwidth,innerheight);
-//xpos=xpos+innerwidth+xdist;
-//Slow->setGeometry(xpos,ypos,innerwidth,innerheight);
-xpos=width-innerwidth;
-MaxFreq->setGeometry(xpos,ypos,innerwidth,innerheight);
-
-}
-
-void CSpectrumDisplay::setInputPointer(double *x)
-{
-inputdata =x;
-}
-
-// Plot Spectrum of decimated Input
-void CSpectrumDisplay::plotspectrum()
-{
-
-QPainter p;
-
-
-int dist,y,z,ymax,xmax;
-int minfreq,maxfreq;
-float IMD;
-double scale;
-if (pdisplay !=0 )
-  scale = (pdisplay->height()-40)/512.;
-else
-scale =0.0 ;
-
-minfreq=MinFreq->value();
-maxfreq=MaxFreq->value();
-ymax=pdisplay->height();
-dist=(ymax-40)/10;
-y=ymax-dist-40;
-xmax=pdisplay->width();
-
-pdisplay->fill();
-p.begin(pdisplay);
-p.setBrush(white);
-
-p.setPen(black);
-//Plot Frequencylines for the different Rx- Windows
-
-  for (CRxChannel *pRx=settings.ChannelChain;pRx != 0;pRx= pRx->getNextChannel())
-  {
-    if ( Farbe > 0)
-     {
-       int ID = pRx->getID();
-       if ( ID >= 0 && ID < Farbe->size() )
-         p.setPen(Farbe->at(ID));
-     } 
-    // Calculate Centerfrequency Coordinates
-    z=(( (int) pRx->getRxFrequency()-minfreq)*xmax)/(maxfreq-minfreq);
-    p.drawLine(z,0,z,ymax);
-
-    if ( pRx->getModulationType() == RTTY ) // RTTY demands to lines
-      {
-        z=(( (int) pRx->getRxFrequency()-minfreq+170)*xmax)/(maxfreq-minfreq);
-        p.drawLine(z,0,z,ymax);
-      }
- }
-p.setPen(black);
-// Plot Lineal
-paintLineal(&p,y,ymax-33);
-
-// Plot Grid
-for (int i=1;i<10; i++)
-	{
-
-   p.drawLine(0,y,xmax,y);
-   y -=dist;
-  }
-
-
-if(overload)
-	p.setPen(red);
-else
-	p.setPen(blue);
-  p.moveTo(0,ymax);
-if ( inputdata != 0)
-  {
-    for(int i=0;i<pdisplay->width();i++)
-     {
-      z=xtranslate[i];
-      y=ymax-(int)(scale*fftdata[z])-40;
-      p.lineTo(i,y);
-     }
-  }
-if (Phase !=0)
-  plotVector(&p);
-p.end();
-bitBlt(pwaterfall,0,2,pwaterfall);
-
-p.begin(pwaterfall);
-p.setBrush(white);
-
-for (int i=0;i<xmax;i++)
- {
-	z=xtranslate[i];
-	y=fftdata[z];
-  if ( y > 255)
-    y = 255;
-  p.setPen(color[y]);
-	p.drawPoint(i,0);
-	p.drawPoint(i,1);
- }
-p.end();
-
-bitBlt(pdisplay,0,ymax-30,pwaterfall);
-Display->setBufferPointer(pdisplay);
-Display->repaint();
-
-// Calculate IMD
-if ( ( (settings.ActChannel->getModulationType() == BPSK) ||
-     (settings.ActChannel->getModulationType() == QPSK) ) && (*inputdata != 0) )
-  {
-
-    int Freq1,Freq2;
-    double Frequency;
-    Frequency=settings.ActChannel->getRxFrequency();
-    Freq1=(int) ( (Frequency+ 15.625)*1024./2756.25);
-    Freq2=(int) ( (Frequency+ 46.875)*1024./2756.25);
-    IMD=power_spectrum[Freq2]/power_spectrum[Freq1];
-    Freq1=(int) ( (Frequency- 15.625)*1024./2756.25);
-    Freq2=(int) ( (Frequency- 46.875)*1024./2756.25);
-    IMD = 10.*log10( (IMD + power_spectrum[Freq2]/power_spectrum[Freq1])/2);
-  }
-else
-  IMD=0.0;
- emit new_IMD(IMD);
-}
-void CSpectrumDisplay::calcFFT()
-{
-int N;
-
-N=BUF_SIZE/2;
-if (inputdata == 0)
-  return;          // No data available
-// Check for Overload
-overload=false;
-for (int i=0;i<N;i++)
-  
-    if(inputdata[i] >16384.0)
-      overload=true;
-     
-  
-rfftw_one(plan,inputdata,output);
-
-//Calculate power spectrum and normalize
-
-for(int i=1;i<(N-1)/2;i++)
-     power_spectrum[i] =output[i]*output[i] + output[N-i]*output[N-i];
-//     fftdata[i] =(int) (scale*log10(output[i]*output[i] + output[N-i]*output[N-i]));
-
-for(int i=0;i<Display->width();i++)     // 38.25 = 1.5 *255/10 slightly scale up for colors
-//     fftdata[xtranslate[i]]=(int) (51.2*(log10(power_spectrum[xtranslate[i]]+1.1258312e5)-5.051473275));
-     fftdata[xtranslate[i]]=(int) (38.25*(log10(power_spectrum[xtranslate[i]]+1.1258312e5)-5.051473275));
-
-  
-}
-
-void CSpectrumDisplay::translate(void)
-{
-int i,to,minfreq,maxfreq,displaywidth;
-minfreq=MinFreq->value();
-maxfreq=MaxFreq->value();
-to=int(maxfreq*1024/2756.25);
-displaywidth=Display->width();
-for (i=0;i<displaywidth;i++)
-  xtranslate[i]=(((maxfreq-minfreq)*i*to/displaywidth)+minfreq*to)/maxfreq;
-}
-
-void CSpectrumDisplay::startPlot()
-{
-translate();
-calcFFT();
-plotspectrum();
-}
-
-void CSpectrumDisplay::setnewFrequency(int position)
-{
-double freq;
-freq= (position*(MaxFreq->value()-MinFreq->value()))/Display->width()+MinFreq->value();
-settings.ActChannel->setRxFrequency(freq);
-emit FrequencyChanged(freq);
-}
-
-void CSpectrumDisplay::paintLineal(QPainter* p,int y1,int y2)
-{
-
-int stepfrequency,stepwidth;
-int i,ix,NumberofFreqs,diff;
-QString frequency;
-QFontMetrics fm(Display->font());
-
-// Calcalute Frequency- Steps
-diff=(MaxFreq->value()-MinFreq->value());
-NumberofFreqs=7;
-while(NumberofFreqs >4)
-  {
-    stepfrequency=diff/NumberofFreqs;
-    if ( stepfrequency * NumberofFreqs != diff )
-      NumberofFreqs--;
-    else
-      break;
-  }
-stepwidth=Display->width()/NumberofFreqs;
-//iy=fm.height()+2;
-
-for( i=1; i < NumberofFreqs; i++)
-{
-  frequency.setNum(MinFreq->value()+stepfrequency*i);
-  ix=i*stepwidth-fm.width(frequency)/2;
-  p->drawText(ix,y2,frequency);
-  ix=i*stepwidth;
-p->drawLine(ix,y1,ix,y1+2);
-}
-
-}
-
-void CSpectrumDisplay::plotVector(QPainter *p)
-{
-
-//int x,y,x1,y1,
-int xc,yc;
-double mag;
-//double tmpx;
-//double tmpy;
-
-
-xc=Display->width()/8;
-yc=Display->height()/8;
-p->drawEllipse(xc,yc,40,40);
-xc=xc+20;
-yc=yc+20;
-p->setPen(green);
-/**
-  for( x=196,y=0; x<10*196; y+=196, x+=196 )// 196 = (612.5/31.25)*10
-	{
-		x1 = x/10;
-		y1 = y/10;
-		tmpx =Phase[y1].real() * Phase[x1].real() +
-				Phase[y1].imag() * Phase[x1].imag();
-		tmpy = Phase[y1].imag() * Phase[x1].real() -
-				Phase[y1].real() * Phase[x1].imag();
-		p->moveTo( xc,  yc );
-		mag = 2*sqrt(tmpx * tmpx + tmpy * tmpy);
-
-		p->lineTo( xc+(int)(yc*tmpy/mag), yc-(int)(yc*tmpx/mag) );
-
-	}
-**/
-for(int i=0; i< 11; i++)
- {
-   p->moveTo( xc,yc);
-   mag=abs(Phase[i]);
-   if ( mag > 0.001)
-     p->lineTo(xc - (int)(20.*Phase[i].imag()/mag), yc - (int)(20.*Phase[i].real()/mag) );
- }  
-}
-
-void CSpectrumDisplay::setPhasePointer(std::complex<float> *p)
-{
-Phase=p;
-}
-void CSpectrumDisplay::setColorList(std::vector<QColor> *c)
-{
-  Farbe=c;
-}
-  
-
diff --git a/linpsk/csquelch.cpp b/linpsk/csquelch.cpp
deleted file mode 100644
index 751b6ee..0000000
--- a/linpsk/csquelch.cpp
+++ /dev/null
@@ -1,193 +0,0 @@
-/***************************************************************************
-                          |FILENAME|  -  description
-                             -------------------
-    begin                : |DATE|
-    copyright            : (C) |YEAR| by |AUTHOR|
-    email                : |EMAIL|
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   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  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- ***************************************************************************/
-
-#include <qvariant.h>
-#include <qradiobutton.h>
-#include <qslider.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qstyle.h>
-#include <qlabel.h>
-
-#include "csquelch.h"
-#include "color.h"
-
-#define Black color[0]
-#define Grey  color[64]
-#define Cyan  color[127]
-#define Yellow color[192]
-
-mySlider::mySlider(QWidget *parent, const char *name = 0) :
-QSlider(parent,name)
-{
-    setOrientation( QSlider::Vertical );
-    setTickmarks( QSlider::NoMarks );
-    setTickInterval( 10 );
-    setMinValue(0);
-    setMaxValue(100);
-
-setBackgroundColor(Black);
-setValue(50);
-SquelchLevel=0;
-
-
-}
-
-mySlider::~mySlider()
-{
-}
-/** Painting Slider Background depending on Threshold and Signal Strength
-*/
-void mySlider::paintEvent(QPaintEvent *)
-{
-QPainter p;
-int scale;
-scale=height()*(100-SquelchLevel)/100;
-p.begin(this);
-p.setBrush(black);
-if (SquelchLevel > (100-value()) )
-  p.fillRect(0,scale,width(),height()-scale,Yellow);
-else
-  p.fillRect(0,scale,width(),height()-scale,Cyan);
-p.fillRect(0,0,width(),scale,Black);
-    QStyle::SFlags flags = QStyle::Style_Default;
-
-    QStyle::SCFlags sub = QStyle::SC_SliderGroove | QStyle::SC_SliderHandle;
-
-    style().drawComplexControl( QStyle::CC_Slider, &p, this, rect(), colorGroup(),
-                                flags, sub,  QStyle::SC_SliderHandle  );
-
-p.end();
-
-
-}
-
-void mySlider::setSquelchLevel(int level)
-{
-SquelchLevel=level;
-repaint();
-}
-
-int mySlider::getThreshold()
-{
-return 100-value();
-}
-
-/* 
- *  Constructs a CSquelch which is a child of 'parent', with the 
- *  name 'name'.' 
- */
-CSquelch::CSquelch( QWidget* parent,  const char* name )
-    : QGroupBox( parent, name )
-{
-    setFrameShape( QGroupBox::WinPanel );
-    setFrameShadow( QGroupBox::Raised );
-    setAlignment( int( QGroupBox::AlignHCenter ) );
-
-    Activate = new QRadioButton( this, "Activate" );
-    Activate->setGeometry( QRect( 120, 340, 60, 41 ) );
-    ActivateText = new QLabel(this,"ActivateText");
-    ActivateText->setAlignment(AlignHCenter);
- 
-
-    Squelch = new mySlider( this, "Squelch" );
-    Squelch->setPaletteBackgroundColor( QColor( 0, 0, 0 ) );
-    Squelch->setOrientation( QSlider::Vertical );
-    Squelch->setTickmarks( QSlider::NoMarks );
-    Squelch->setTickInterval( 10 );
-    Squelch->setMinValue(0);
-    Squelch->setMaxValue(100);
-
-   
-    languageChange();
-
-}
-
-/*
- *  Destroys the object and frees any allocated resources
- */
-CSquelch::~CSquelch()
-{
-    // no need to delete child widgets, Qt does it all for us
-}
-
-/*
- *  Sets the strings of the subwidgets using the current
- *  language.
- */
-void CSquelch::languageChange()
-{
-    setTitle( tr( "Squelch" ) );
-    ActivateText->setText( tr( "On/Off" ) );
-}
-void CSquelch::resizeEvent( QResizeEvent * )
-{
-calculateSizeofComponents();
-}
-
-void CSquelch::calculateSizeofComponents()
-{
-/** Margins **/
-#define TOPMARGIN 10
-/** WIDTH and Height in % **/
-#define SQUELCHWIDTH 20
-#define SQUELCHHEIGHT 70
-#define BUTTONWIDTH 90
-#define BUTTONHEIGHT 10
-
-int xpos,ypos, width,height,innerwidth,innerheight;
-
-width=this->width();
-height=this->height();
-innerwidth=width*SQUELCHWIDTH/100;
-xpos=(width-innerwidth)/2;
-ypos=height*TOPMARGIN/100;
-innerheight=height*SQUELCHHEIGHT/100;
-Squelch->setGeometry(xpos,ypos,innerwidth,innerheight);
-ypos=ypos+innerheight;
-innerheight=height*BUTTONHEIGHT/100;
-Activate->setGeometry(xpos,ypos,innerwidth,innerheight);
-innerwidth=width*BUTTONWIDTH/100;
-xpos=(width-innerwidth)/2;
-ypos=ypos+innerheight;
-ActivateText->setGeometry(xpos,ypos,innerwidth,innerheight);
-
-this->setFrameRect(QRect(0,0,width,height));
-}
-
-
-void CSquelch::setSquelchLevel(int level)
-{
-Squelch->setSquelchLevel(level);
-repaint();
-
-}
-int CSquelch::getThreshold()
-{
-return Squelch->getThreshold();
-}
-bool CSquelch::getSquelchState()
-{
-return Activate->isOn();
-}
-void CSquelch::setSquelchState(bool state)
-{
-Activate->setChecked(state);
-}
-void CSquelch::setThreshold(int Threshold)
-{
-Squelch->setValue(100-Threshold);
-}
diff --git a/linpsk/csquelch.ui.h b/linpsk/csquelch.ui.h
deleted file mode 100644
index fd9ee85..0000000
--- a/linpsk/csquelch.ui.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/****************************************************************************
-** ui.h extension file, included from the uic-generated form implementation.
-**
-** If you wish to add, delete or rename functions or slots use
-** Qt Designer which will update this file, preserving your code. Create an
-** init() function in place of a constructor, and a destroy() function in
-** place of a destructor.
-*****************************************************************************/
-
-
-void CSquelch::init()
-{
-calculateSizeofComponents();
-}
-
-void CSquelch::resizeEvent( QResizeEvent * )
-{
-calculateSizeofComponents();
-}
-
-void CSquelch::calculateSizeofComponents()
-{
-/** Margins **/
-#define TOPMARGIN 10
-/** WIDTH and Height in % **/
-#define SQUELCHWIDTH 20
-#define SQUELCHHEIGHT 70
-#define BUTTONWIDTH 90
-#define BUTTONHEIGHT 10
-
-int xpos,ypos, width,height,innerwidth,innerheight;
-
-width=this->width();
-height=this->height();
-innerwidth=width*SQUELCHWIDTH/100;
-xpos=(width-innerwidth)/2;
-ypos=height*TOPMARGIN/100;
-innerheight=height*SQUELCHHEIGHT/100;
-Squelch->setGeometry(xpos,ypos,innerwidth,innerheight);
-ypos=ypos+innerheight;
-innerwidth=width*BUTTONWIDTH/100;
-xpos=(width-innerwidth)/2;
-innerheight=height*BUTTONHEIGHT/100;
-Activate->setGeometry(xpos,ypos,innerwidth,innerheight);
-this->setFrameRect(QRect(0,0,width,height));
-}
diff --git a/linpsk/ctrigger.ui b/linpsk/ctrigger.ui
deleted file mode 100644
index cae766b..0000000
--- a/linpsk/ctrigger.ui
+++ /dev/null
@@ -1,90 +0,0 @@
-<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
-<class>CTrigger</class>
-<widget class="QGroupBox">
-    <property name="name">
-        <cstring>CTrigger</cstring>
-    </property>
-    <property name="geometry">
-        <rect>
-            <x>0</x>
-            <y>0</y>
-            <width>300</width>
-            <height>400</height>
-        </rect>
-    </property>
-    <property name="font">
-        <font>
-            <pointsize>10</pointsize>
-        </font>
-    </property>
-    <property name="caption">
-        <string>QGroupBoxForm</string>
-    </property>
-    <property name="frameShape">
-        <enum>WinPanel</enum>
-    </property>
-    <property name="frameShadow">
-        <enum>Raised</enum>
-    </property>
-    <property name="title">
-        <string>Trigger</string>
-    </property>
-    <property name="alignment">
-        <set>AlignHCenter</set>
-    </property>
-    <widget class="QLineEdit">
-        <property name="name">
-            <cstring>TriggerText</cstring>
-        </property>
-        <property name="geometry">
-            <rect>
-                <x>20</x>
-                <y>60</y>
-                <width>251</width>
-                <height>61</height>
-            </rect>
-        </property>
-        <property name="font">
-            <font>
-            </font>
-        </property>
-        <property name="text">
-            <string>CQ CQ</string>
-        </property>
-        <property name="maxLength">
-            <number>80</number>
-        </property>
-    </widget>
-    <widget class="QRadioButton">
-        <property name="name">
-            <cstring>Activate</cstring>
-        </property>
-        <property name="geometry">
-            <rect>
-                <x>30</x>
-                <y>150</y>
-                <width>241</width>
-                <height>71</height>
-            </rect>
-        </property>
-        <property name="font">
-            <font>
-            </font>
-        </property>
-        <property name="text">
-            <string>Activate</string>
-        </property>
-    </widget>
-</widget>
-<includes>
-    <include location="local" impldecl="in implementation">ctrigger.ui.h</include>
-</includes>
-<slots>
-    <slot specifier="non virtual">init()</slot>
-</slots>
-<functions>
-    <function access="protected" specifier="non virtual">resizeEvent( QResizeEvent * )</function>
-    <function access="private" specifier="non virtual">calculateSizeofComponents()</function>
-</functions>
-<layoutdefaults spacing="6" margin="11"/>
-</UI>
diff --git a/linpsk/ctrigger.ui.h b/linpsk/ctrigger.ui.h
deleted file mode 100644
index 271f6b8..0000000
--- a/linpsk/ctrigger.ui.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/****************************************************************************
-** ui.h extension file, included from the uic-generated form implementation.
-**
-** If you wish to add, delete or rename functions or slots use
-** Qt Designer which will update this file, preserving your code. Create an
-** init() function in place of a constructor, and a destroy() function in
-** place of a destructor.
-*****************************************************************************/
-
-
-void CTrigger::init()
-{
-calculateSizeofComponents();
-}
-
-void CTrigger::resizeEvent( QResizeEvent * )
-{
-calculateSizeofComponents();
-}
-
-void CTrigger::calculateSizeofComponents()
-{
-#define LEFTANDRIGHTMARGIN 5
-#define TOP 30
-#define LABELHEIGHT 30
-int xpos,ypos,width,height,innerwidth,innerheight;
-width=this->width();
-height=this->height();
-xpos=width*LEFTANDRIGHTMARGIN/100;
-ypos=height*TOP/100;
-innerwidth=width-2*xpos;
-innerheight=height*LABELHEIGHT/100;
-TriggerText->setGeometry(xpos,ypos,innerwidth,innerheight);
-ypos=ypos+innerheight;
-Activate->setGeometry(xpos+1,ypos,innerwidth-2,innerheight);
-this->setFrameRect(QRect(0,0,width,height));
-}
diff --git a/linpsk/ctxdisplay.ui b/linpsk/ctxdisplay.ui
deleted file mode 100644
index e1e0b3e..0000000
--- a/linpsk/ctxdisplay.ui
+++ /dev/null
@@ -1,167 +0,0 @@
-<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
-<class>CTxDisplay</class>
-<comment>Widget contains the TX controls and TX Functions</comment>
-<widget class="QFrame">
-    <property name="name">
-        <cstring>CTxDisplay</cstring>
-    </property>
-    <property name="geometry">
-        <rect>
-            <x>0</x>
-            <y>0</y>
-            <width>540</width>
-            <height>133</height>
-        </rect>
-    </property>
-    <property name="minimumSize">
-        <size>
-            <width>540</width>
-            <height>96</height>
-        </size>
-    </property>
-    <property name="baseSize">
-        <size>
-            <width>540</width>
-            <height>96</height>
-        </size>
-    </property>
-    <property name="caption">
-        <string>CTxDisplay</string>
-    </property>
-    <property name="frameShape">
-        <enum>Panel</enum>
-    </property>
-    <property name="frameShadow">
-        <enum>Sunken</enum>
-    </property>
-    <widget class="CTxWindow">
-        <property name="name">
-            <cstring>TxWindow</cstring>
-        </property>
-        <property name="geometry">
-            <rect>
-                <x>160</x>
-                <y>10</y>
-                <width>370</width>
-                <height>96</height>
-            </rect>
-        </property>
-        <property name="minimumSize">
-            <size>
-                <width>370</width>
-                <height>96</height>
-            </size>
-        </property>
-    </widget>
-    <widget class="FrequencySelect">
-        <property name="name">
-            <cstring>TxFreq</cstring>
-        </property>
-        <property name="geometry">
-            <rect>
-                <x>10</x>
-                <y>20</y>
-                <width>80</width>
-                <height>71</height>
-            </rect>
-        </property>
-    </widget>
-    <widget class="CTxFunctions">
-        <property name="name">
-            <cstring>TxFunctions</cstring>
-        </property>
-        <property name="geometry">
-            <rect>
-                <x>100</x>
-                <y>20</y>
-                <width>51</width>
-                <height>71</height>
-            </rect>
-        </property>
-    </widget>
-</widget>
-<customwidgets>
-    <customwidget>
-        <class>CTxWindow</class>
-        <header location="local">/home/schroer/projects/linpsk/linpsk/ctxwindow.h</header>
-        <sizehint>
-            <width>420</width>
-            <height>96</height>
-        </sizehint>
-        <container>0</container>
-        <sizepolicy>
-            <hordata>5</hordata>
-            <verdata>5</verdata>
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-        </sizepolicy>
-        <pixmap>image0</pixmap>
-        <slot access="public" specifier="">slot()</slot>
-        <slot access="public" specifier="">resizeEvent(QResizeEvent *)</slot>
-    </customwidget>
-    <customwidget>
-        <class>FrequencySelect</class>
-        <header location="local">frequencyselect.h</header>
-        <sizehint>
-            <width>-1</width>
-            <height>-1</height>
-        </sizehint>
-        <container>0</container>
-        <sizepolicy>
-            <hordata>5</hordata>
-            <verdata>5</verdata>
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-        </sizepolicy>
-        <pixmap>image0</pixmap>
-        <signal>FrequencyChanged(uint)</signal>
-        <signal>FrequencyChanged(int)</signal>
-        <slot access="public" specifier="">slot()</slot>
-        <slot access="public" specifier="">setFrequency(uint)</slot>
-        <slot access="public" specifier="">slot()</slot>
-        <slot access="public" specifier="">getFrequency()</slot>
-        <slot access="public" specifier="">SetFrequency(int)</slot>
-        <property type="String">Title</property>
-    </customwidget>
-    <customwidget>
-        <class>CTxFunctions</class>
-        <header location="local">ctxfunctions.h</header>
-        <sizehint>
-            <width>-1</width>
-            <height>-1</height>
-        </sizehint>
-        <container>0</container>
-        <sizepolicy>
-            <hordata>5</hordata>
-            <verdata>5</verdata>
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-        </sizepolicy>
-        <pixmap>image1</pixmap>
-    </customwidget>
-</customwidgets>
-<images>
-    <image name="image0">
-        <data format="XPM.GZ" length="2926">789c9d95594f32591086effd15c4ba3393fae895ee4ce6824540141011b7c95cf406a202caa6f065fefb549faaea0b24996fc623cb937aeb3d55754e871f67a587eb6ee9ecc7c96a1dada74929798e96a5b374339bedfefceb8f9f27a7b65da27fcb724bf6e96f27a783752929f516f32c070402289b3fc39d8203c3136157e276c1260eac0f0ade0907927f2d9c58261f929cad72be0cef8535ff5959e277c201ef0fa02cf1ae7022f9efca12ff301ca81e87c21a5f32db5acf95b0eebfcdd92e2be3a5b0fa7986435bfd6e981d99278c0ae6795c288b3e2b98e3036157d8f8 [...]
-    </image>
-    <image name="image1">
-        <data format="XPM.GZ" length="3326">789c959549532b470cc7ef7c0a17ba51293dcfea994ae580591e186c30c60ba472e859bcb0d8e0153b95ef1e4db7340f777c09a2303feb2fb5a4ee9ef9715219dc372b273f8e164bb59ca49574ace695936cf5febefdf3af3ffe3e3a76dd0afd3a5e5c718f7f3b3a6e2f2b69a5359be60520104055ff689e59ac2c4e2c4e2dce2cce2d1e165c4b6a712dd1dcb1fc67164ff719ac7ae0cde28d15ff60b16be9adfee1d5e2f53eab89956f54b0f295a37ccdefecf7d95fb7e2c756bce6d88f9dd8c4eb7ebcd88bbc5873db8ab7e73db0b85f72a4ebafeed703e3928d3fd01c95fc [...]
-    </image>
-</images>
-<includes>
-    <include location="local" impldecl="in implementation">ctxdisplay.ui.h</include>
-</includes>
-<slots>
-    <slot specifier="non virtual">init()</slot>
-</slots>
-<functions>
-    <function access="private" specifier="non virtual">calculateSizeofComponents()</function>
-    <function access="protected" specifier="non virtual">resizeEvent( QResizeEvent * )</function>
-</functions>
-<pixmapfunction></pixmapfunction>
-<layoutdefaults spacing="0" margin="2"/>
-<includehints>
-    <includehint>ctxwindow.h</includehint>
-    <includehint>frequencyselect.h</includehint>
-</includehints>
-</UI>
diff --git a/linpsk/ctxdisplay.ui.h b/linpsk/ctxdisplay.ui.h
deleted file mode 100644
index e9cfbf3..0000000
--- a/linpsk/ctxdisplay.ui.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************************
-** ui.h extension file, included from the uic-generated form implementation.
-**
-** If you wish to add, delete or rename functions or slots use
-** Qt Designer which will update this file, preserving your code. Create an
-** init() function in place of a constructor, and a destroy() function in
-** place of a destructor.
-*****************************************************************************/
-
-
-void CTxDisplay::init()
-{
-calculateSizeofComponents();
-TxFreq->setFunctionText("Net");
-TxFreq->setTitle("Tx Freq");
-}
-
-void CTxDisplay::calculateSizeofComponents()
-{
-/** in percent of whole widget **/
-/** TX Function part **/
-#define TXFUNCTIONWIDTH 10
-/** TxFrequency (Width) **/
-#define TXFREQWIDTH 15
-#define TXFREQHEIGHT 70
-/** Left and Right Margin **/
-#define LEFTANDRIGHTMARGIN 2
-/** Top and Bottom Margin **/
-#define TOPANDBOTTOMMARGIN 2
-/** Inner distance **/
-#define distance 3
-
-int xpos,ypos,width,height,innerheight,innerwidth;
-width=this->width();
-height=this->height();
-xpos=width*LEFTANDRIGHTMARGIN/100;
-
-/** Frequency select Box **/
-
-innerheight=height*TXFREQHEIGHT/100;
-ypos=(height-innerheight)/2;
-innerwidth=width*TXFREQWIDTH/100;
-
-TxFreq->setGeometry(xpos,ypos,innerwidth,innerheight);
-
-/** TX- Functions **/
-
-
-ypos=height*TOPANDBOTTOMMARGIN/100;
-innerheight=height-2*ypos;
-xpos=xpos+innerwidth+width*distance/100;
-innerwidth=width*TXFUNCTIONWIDTH/100;
-
-TxFunctions->setGeometry(xpos,ypos,innerwidth,innerheight);
-/** TX- Window **/
-xpos=xpos+innerwidth+width*distance/100;
-innerwidth=width-xpos-width*distance/100;
-TxWindow->setGeometry(xpos,ypos,innerwidth,innerheight);
-
-}
-
-void CTxDisplay::resizeEvent( QResizeEvent * )
-{
-calculateSizeofComponents();
-
-}
diff --git a/linpsk/ctxfunctions.ui b/linpsk/ctxfunctions.ui
deleted file mode 100644
index 7d10955..0000000
--- a/linpsk/ctxfunctions.ui
+++ /dev/null
@@ -1,117 +0,0 @@
-<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
-<class>CTxFunctions</class>
-<widget class="QGroupBox">
-    <property name="name">
-        <cstring>CTxFunctions</cstring>
-    </property>
-    <property name="geometry">
-        <rect>
-            <x>0</x>
-            <y>0</y>
-            <width>300</width>
-            <height>400</height>
-        </rect>
-    </property>
-    <property name="caption">
-        <string>QGroupBoxForm</string>
-    </property>
-    <property name="frameShape">
-        <enum>NoFrame</enum>
-    </property>
-    <property name="title">
-        <string></string>
-    </property>
-    <widget class="QPushButton">
-        <property name="name">
-            <cstring>Tune</cstring>
-        </property>
-        <property name="geometry">
-            <rect>
-                <x>50</x>
-                <y>50</y>
-                <width>161</width>
-                <height>61</height>
-            </rect>
-        </property>
-        <property name="font">
-            <font>
-                <pointsize>10</pointsize>
-            </font>
-        </property>
-        <property name="text">
-            <string>Tune</string>
-        </property>
-        <property name="flat">
-            <bool>false</bool>
-        </property>
-    </widget>
-    <widget class="QPushButton">
-        <property name="name">
-            <cstring>CWId</cstring>
-        </property>
-        <property name="geometry">
-            <rect>
-                <x>50</x>
-                <y>130</y>
-                <width>161</width>
-                <height>71</height>
-            </rect>
-        </property>
-        <property name="font">
-            <font>
-                <pointsize>10</pointsize>
-            </font>
-        </property>
-        <property name="text">
-            <string>Send CWId</string>
-        </property>
-    </widget>
-    <widget class="CLedButton">
-        <property name="name">
-            <cstring>RXTX</cstring>
-        </property>
-        <property name="geometry">
-            <rect>
-                <x>50</x>
-                <y>240</y>
-                <width>181</width>
-                <height>101</height>
-            </rect>
-        </property>
-    </widget>
-</widget>
-<customwidgets>
-    <customwidget>
-        <class>CLedButton</class>
-        <header location="local">cledbutton.h</header>
-        <sizehint>
-            <width>-1</width>
-            <height>-1</height>
-        </sizehint>
-        <container>0</container>
-        <sizepolicy>
-            <hordata>5</hordata>
-            <verdata>5</verdata>
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-        </sizepolicy>
-        <pixmap>image0</pixmap>
-    </customwidget>
-</customwidgets>
-<images>
-    <image name="image0">
-        <data format="XPM.GZ" length="3326">789c959549532b470cc7ef7c0a17ba51293dcfea994ae580591e186c30c60ba472e859bcb0d8e0153b95ef1e4db7340f777c09a2303feb2fb5a4ee9ef9715219dc372b273f8e164bb59ca49574ace695936cf5febefdf3af3ffe3e3a76dd0afd3a5e5c718f7f3b3a6e2f2b69a5359be60520104055ff689e59ac2c4e2c4e2dce2cce2d1e165c4b6a712dd1dcb1fc67164ff719ac7ae0cde28d15ff60b16be9adfee1d5e2f53eab89956f54b0f295a37ccdefecf7d95fb7e2c756bce6d88f9dd8c4eb7ebcd88bbc5873db8ab7e73db0b85f72a4ebafeed703e3928d3fd01c95fc [...]
-    </image>
-</images>
-<includes>
-    <include location="local" impldecl="in implementation">ctxfunctions.ui.h</include>
-</includes>
-<slots>
-    <slot specifier="non virtual">init()</slot>
-</slots>
-<functions>
-    <function access="protected" specifier="non virtual">resizeEvent( QResizeEvent * )</function>
-    <function access="private" specifier="non virtual">calculateSizeofComponents()</function>
-</functions>
-<layoutdefaults spacing="6" margin="11"/>
-</UI>
diff --git a/linpsk/ctxfunctions.ui.h b/linpsk/ctxfunctions.ui.h
deleted file mode 100644
index 06c852c..0000000
--- a/linpsk/ctxfunctions.ui.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/****************************************************************************
-** ui.h extension file, included from the uic-generated form implementation.
-**
-** If you wish to add, delete or rename functions or slots use
-** Qt Designer which will update this file, preserving your code. Create an
-** init() function in place of a constructor, and a destroy() function in
-** place of a destructor.
-*****************************************************************************/
-
-
-void CTxFunctions::init()
-{
-calculateSizeofComponents();
-}
-
-void CTxFunctions::resizeEvent( QResizeEvent * )
-{
-calculateSizeofComponents();
-}
-
-void CTxFunctions::calculateSizeofComponents()
-{
-#define LEFTANDRIGHTMARGINS 5
-#define TOPMARGIN 5
-#define NORMALLABELHEIGHT 15
-#define distance 7
-
-int xpos,ypos,width,height,innerheight,innerwidth;
-width=this->width();
-height=this->height();
-xpos=width*LEFTANDRIGHTMARGINS/100;
-ypos=height*TOPMARGIN/100;
-innerwidth=width-2*xpos;
-innerheight=height*NORMALLABELHEIGHT/100;
-/** Tune **/
-Tune->setGeometry(xpos,2*ypos,innerwidth,innerheight);
-
-/** Send CWId **/
-ypos=ypos+innerheight+height*distance/100;
-CWId->setGeometry(xpos,ypos,innerwidth,innerheight);
-
-/** RXTX **/
-ypos=ypos+innerheight+height*distance/100;
-innerheight=height-ypos-height*TOPMARGIN/100;
-RXTX->setGeometry(xpos,ypos,innerwidth,innerheight);
-
-}
diff --git a/linpsk/docs/Makefile.am b/linpsk/docs/Makefile.am
deleted file mode 100644
index 550ae51..0000000
--- a/linpsk/docs/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-####### kdevelop will overwrite this part!!! (begin)##########
-
-SUBDIRS = en 
-
-####### kdevelop will overwrite this part!!! (end)############
diff --git a/linpsk/docs/Makefile.in b/linpsk/docs/Makefile.in
deleted file mode 100644
index c964e84..0000000
--- a/linpsk/docs/Makefile.in
+++ /dev/null
@@ -1,522 +0,0 @@
-# Makefile.in generated by automake 1.7.2 from Makefile.am.
-# KDE tags expanded automatically by am_edit - $Revision: 1.349.2.2 $ 
-# @configure_input@
-
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
-# Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
- at SET_MAKE@
-
-####### kdevelop will overwrite this part!!! (begin)##########
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
-
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-ECHO = @ECHO@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FRAMEWORK_COREAUDIO = @FRAMEWORK_COREAUDIO@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@
-KDE_MT_LIBS = @KDE_MT_LIBS@
-KDE_PLUGIN = @KDE_PLUGIN@
-KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
-KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
-KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
-KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
-LDFLAGS = @LDFLAGS@
-LIBCOMPAT = @LIBCOMPAT@
-LIBCRYPT = @LIBCRYPT@
-LIBDL = @LIBDL@
-LIBJPEG = @LIBJPEG@
-LIBOBJS = @LIBOBJS@
-LIBPNG = @LIBPNG@
-LIBPTHREAD = @LIBPTHREAD@
-LIBRESOLV = @LIBRESOLV@
-LIBS = @LIBS@
-LIBSM = @LIBSM@
-LIBSOCKET = @LIBSOCKET@
-LIBTOOL = @LIBTOOL@
-LIBUCB = @LIBUCB@
-LIBUTIL = @LIBUTIL@
-LIBXINERAMA = @LIBXINERAMA@
-LIBZ = @LIBZ@
-LIB_POLL = @LIB_POLL@
-LIB_QPE = @LIB_QPE@
-LIB_QT = @LIB_QT@
-LIB_X11 = @LIB_X11@
-LIB_XEXT = @LIB_XEXT@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-MOC = @MOC@
-NOOPT_CFLAGS = @NOOPT_CFLAGS@
-NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
-NOREPO = @NOREPO@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-QTE_NORTTI = @QTE_NORTTI@
-QT_INCLUDES = @QT_INCLUDES@
-QT_LDFLAGS = @QT_LDFLAGS@
-RANLIB = @RANLIB@
-REPO = @REPO@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-TOPSUBDIRS = @TOPSUBDIRS@
-UIC = @UIC@
-UIC_TR = @UIC_TR@
-USER_INCLUDES = @USER_INCLUDES@
-USER_LDFLAGS = @USER_LDFLAGS@
-USE_EXCEPTIONS = @USE_EXCEPTIONS@
-USE_RTTI = @USE_RTTI@
-USE_THREADS = @USE_THREADS@
-VERSION = @VERSION@
-WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
-X_EXTRA_LIBS = @X_EXTRA_LIBS@
-X_INCLUDES = @X_INCLUDES@
-X_LDFLAGS = @X_LDFLAGS@
-X_PRE_LIBS = @X_PRE_LIBS@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-all_includes = @all_includes@
-all_libraries = @all_libraries@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
-am__include = @am__include@
-am__quote = @am__quote@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-kde_qtver = @kde_qtver@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-oldincludedir = @oldincludedir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-qt_includes = @qt_includes@
-qt_libraries = @qt_libraries@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-x_includes = @x_includes@
-x_libraries = @x_libraries@
-
-SUBDIRS = en 
-subdir = linpsk/docs
-mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-DIST_SOURCES =
-
-RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
-	ps-recursive install-info-recursive uninstall-info-recursive \
-	all-recursive install-data-recursive install-exec-recursive \
-	installdirs-recursive install-recursive uninstall-recursive \
-	check-recursive installcheck-recursive
-DIST_COMMON = Makefile.am Makefile.in
-DIST_SUBDIRS = $(SUBDIRS)
-#>- all: all-recursive
-#>+ 1
-all: docs-am  all-recursive
-
-.SUFFIXES:
-$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
-#>- 	cd $(top_srcdir) && \
-#>- 	  $(AUTOMAKE) --gnu  linpsk/docs/Makefile
-#>+ 3
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  linpsk/docs/Makefile
-	cd $(top_srcdir) && perl admin/am_edit linpsk-0.7.1/linpsk/docs/Makefile.in
-Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
-	@set fnord $$MAKEFLAGS; amf=$$2; \
-	dot_seen=no; \
-	target=`echo $@ | sed s/-recursive//`; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    dot_seen=yes; \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
-	done; \
-	if test "$$dot_seen" = "no"; then \
-	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
-	fi; test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
-	@set fnord $$MAKEFLAGS; amf=$$2; \
-	dot_seen=no; \
-	case "$@" in \
-	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-	  *) list='$(SUBDIRS)' ;; \
-	esac; \
-	rev=''; for subdir in $$list; do \
-	  if test "$$subdir" = "."; then :; else \
-	    rev="$$subdir $$rev"; \
-	  fi; \
-	done; \
-	rev="$$rev ."; \
-	target=`echo $@ | sed s/-recursive//`; \
-	for subdir in $$rev; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
-	done && test -z "$$fail"
-tags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
-	done
-ctags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
-	done
-
-ETAGS = etags
-ETAGSFLAGS =
-
-CTAGS = ctags
-CTAGSFLAGS =
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	mkid -fID $$unique
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
-	  fi; \
-	done; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(ETAGS_ARGS)$$tags$$unique" \
-	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	     $$tags $$unique
-
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-
-top_distdir = ../..
-distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkinstalldirs) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
-	  if test -d $$d/$$file; then \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
-	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
-	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
-	    || exit 1; \
-	  fi; \
-	done
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    test -d $(distdir)/$$subdir \
-	    || mkdir $(distdir)/$$subdir \
-	    || exit 1; \
-	    (cd $$subdir && \
-	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$(top_distdir)" \
-	        distdir=../$(distdir)/$$subdir \
-	        distdir) \
-	      || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-recursive
-all-am: Makefile
-installdirs: installdirs-recursive
-installdirs-am:
-
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-rm -f Makefile $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-#>- clean: clean-recursive
-#>+ 1
-clean: kde-rpo-clean  clean-recursive
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-recursive
-
-distclean-am: clean-am distclean-generic distclean-libtool \
-	distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-info: info-recursive
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-recursive
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
-
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-recursive
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am: uninstall-info-am
-
-uninstall-info: uninstall-info-recursive
-
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
-	clean-generic clean-libtool clean-recursive ctags \
-	ctags-recursive distclean distclean-generic distclean-libtool \
-	distclean-recursive distclean-tags distdir dvi dvi-am \
-	dvi-recursive info info-am info-recursive install install-am \
-	install-data install-data-am install-data-recursive \
-	install-exec install-exec-am install-exec-recursive \
-	install-info install-info-am install-info-recursive install-man \
-	install-recursive install-strip installcheck installcheck-am \
-	installdirs installdirs-am installdirs-recursive \
-	maintainer-clean maintainer-clean-generic \
-	maintainer-clean-recursive mostlyclean mostlyclean-generic \
-	mostlyclean-libtool mostlyclean-recursive pdf pdf-am \
-	pdf-recursive ps ps-am ps-recursive tags tags-recursive \
-	uninstall uninstall-am uninstall-info-am \
-	uninstall-info-recursive uninstall-recursive
-
-
-####### kdevelop will overwrite this part!!! (end)############
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
-
-
-#>+ 2
-docs-am:
-
-#>+ 6
-force-reedit:
-		cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  linpsk/docs/Makefile
-	cd $(top_srcdir) && perl admin/am_edit linpsk-0.7.1/linpsk/docs/Makefile.in
-
-
-#>+ 2
-final:
-	$(MAKE) all-am
-#>+ 2
-final-install:
-	$(MAKE) install-am
-#>+ 2
-no-final:
-	$(MAKE) all-am
-#>+ 2
-no-final-install:
-	$(MAKE) install-am
-#>+ 3
-cvs-clean:
-	$(MAKE) admindir=$(top_srcdir)/admin -f $(top_srcdir)/admin/Makefile.common cvs-clean
-
-#>+ 3
-kde-rpo-clean:
-	-rm -f *.rpo
diff --git a/linpsk/docs/en/Makefile.am b/linpsk/docs/en/Makefile.am
deleted file mode 100644
index 6c7690d..0000000
--- a/linpsk/docs/en/Makefile.am
+++ /dev/null
@@ -1,6 +0,0 @@
-####### kdevelop will overwrite this part!!! (begin)##########
-
-
-EXTRA_DIST = index-1.html 
-
-####### kdevelop will overwrite this part!!! (end)############
diff --git a/linpsk/docs/en/Makefile.in b/linpsk/docs/en/Makefile.in
deleted file mode 100644
index d46ed38..0000000
--- a/linpsk/docs/en/Makefile.in
+++ /dev/null
@@ -1,385 +0,0 @@
-# Makefile.in generated by automake 1.7.2 from Makefile.am.
-# KDE tags expanded automatically by am_edit - $Revision: 1.349.2.2 $ 
-# @configure_input@
-
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
-# Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
- at SET_MAKE@
-
-####### kdevelop will overwrite this part!!! (begin)##########
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../../..
-
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-ECHO = @ECHO@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FRAMEWORK_COREAUDIO = @FRAMEWORK_COREAUDIO@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@
-KDE_MT_LIBS = @KDE_MT_LIBS@
-KDE_PLUGIN = @KDE_PLUGIN@
-KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
-KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
-KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
-KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
-LDFLAGS = @LDFLAGS@
-LIBCOMPAT = @LIBCOMPAT@
-LIBCRYPT = @LIBCRYPT@
-LIBDL = @LIBDL@
-LIBJPEG = @LIBJPEG@
-LIBOBJS = @LIBOBJS@
-LIBPNG = @LIBPNG@
-LIBPTHREAD = @LIBPTHREAD@
-LIBRESOLV = @LIBRESOLV@
-LIBS = @LIBS@
-LIBSM = @LIBSM@
-LIBSOCKET = @LIBSOCKET@
-LIBTOOL = @LIBTOOL@
-LIBUCB = @LIBUCB@
-LIBUTIL = @LIBUTIL@
-LIBXINERAMA = @LIBXINERAMA@
-LIBZ = @LIBZ@
-LIB_POLL = @LIB_POLL@
-LIB_QPE = @LIB_QPE@
-LIB_QT = @LIB_QT@
-LIB_X11 = @LIB_X11@
-LIB_XEXT = @LIB_XEXT@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-MOC = @MOC@
-NOOPT_CFLAGS = @NOOPT_CFLAGS@
-NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
-NOREPO = @NOREPO@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-QTE_NORTTI = @QTE_NORTTI@
-QT_INCLUDES = @QT_INCLUDES@
-QT_LDFLAGS = @QT_LDFLAGS@
-RANLIB = @RANLIB@
-REPO = @REPO@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-TOPSUBDIRS = @TOPSUBDIRS@
-UIC = @UIC@
-UIC_TR = @UIC_TR@
-USER_INCLUDES = @USER_INCLUDES@
-USER_LDFLAGS = @USER_LDFLAGS@
-USE_EXCEPTIONS = @USE_EXCEPTIONS@
-USE_RTTI = @USE_RTTI@
-USE_THREADS = @USE_THREADS@
-VERSION = @VERSION@
-WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
-X_EXTRA_LIBS = @X_EXTRA_LIBS@
-X_INCLUDES = @X_INCLUDES@
-X_LDFLAGS = @X_LDFLAGS@
-X_PRE_LIBS = @X_PRE_LIBS@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-all_includes = @all_includes@
-all_libraries = @all_libraries@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
-am__include = @am__include@
-am__quote = @am__quote@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-kde_qtver = @kde_qtver@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-oldincludedir = @oldincludedir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-qt_includes = @qt_includes@
-qt_libraries = @qt_libraries@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-x_includes = @x_includes@
-x_libraries = @x_libraries@
-
-EXTRA_DIST = index-1.html 
-subdir = linpsk/docs/en
-mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-DIST_SOURCES =
-DIST_COMMON = Makefile.am Makefile.in
-#>- all: all-am
-#>+ 1
-all: docs-am  all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
-#>- 	cd $(top_srcdir) && \
-#>- 	  $(AUTOMAKE) --gnu  linpsk/docs/en/Makefile
-#>+ 3
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  linpsk/docs/en/Makefile
-	cd $(top_srcdir) && perl admin/am_edit linpsk-0.7.1/linpsk/docs/en/Makefile.in
-Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
-	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-#>+ 4
-KDE_DIST=index-3.html index-4.html index-5.html index.html index-2.html index.sgml index-6.html 
-
-DISTFILES= $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST)
-
-
-top_distdir = ../../..
-distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkinstalldirs) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
-	  if test -d $$d/$$file; then \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
-	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
-	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-am
-all-am: Makefile
-
-installdirs:
-
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-rm -f Makefile $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-#>- clean: clean-am
-#>+ 1
-clean: kde-rpo-clean  clean-am
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
-
-distclean-am: clean-am distclean-generic distclean-libtool
-
-dvi: dvi-am
-
-dvi-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-info-am
-
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
-	distclean distclean-generic distclean-libtool distdir dvi \
-	dvi-am info info-am install install-am install-data \
-	install-data-am install-exec install-exec-am install-info \
-	install-info-am install-man install-strip installcheck \
-	installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-generic \
-	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
-	uninstall-info-am
-
-
-####### kdevelop will overwrite this part!!! (end)############
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
-
-
-#>+ 2
-docs-am:
-
-#>+ 6
-force-reedit:
-		cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  linpsk/docs/en/Makefile
-	cd $(top_srcdir) && perl admin/am_edit linpsk-0.7.1/linpsk/docs/en/Makefile.in
-
-
-#>+ 2
-final:
-	$(MAKE) all-am
-#>+ 2
-final-install:
-	$(MAKE) install-am
-#>+ 2
-no-final:
-	$(MAKE) all-am
-#>+ 2
-no-final-install:
-	$(MAKE) install-am
-#>+ 3
-cvs-clean:
-	$(MAKE) admindir=$(top_srcdir)/admin -f $(top_srcdir)/admin/Makefile.common cvs-clean
-
-#>+ 3
-kde-rpo-clean:
-	-rm -f *.rpo
diff --git a/linpsk/docs/en/index-1.html b/linpsk/docs/en/index-1.html
deleted file mode 100644
index fa8bcda..0000000
--- a/linpsk/docs/en/index-1.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML>
-<HEAD>
- <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
- <TITLE>The LinPSK Handbook: Introduction</TITLE>
- <LINK HREF="index-2.html" REL=next>
-
- <LINK HREF="index.html#toc1" REL=contents>
-</HEAD>
-<BODY>
-<A HREF="index-2.html">Next</A>
-Previous
-<A HREF="index.html#toc1">Contents</A>
-<HR>
-<H2><A NAME="s1">1. Introduction</A></H2>
-
-<P>
-<H2><A NAME="ss1.1">1.1 Changes</A>
-</H2>
-
-<P>
-<P>
-<HR>
-<A HREF="index-2.html">Next</A>
-Previous
-<A HREF="index.html#toc1">Contents</A>
-</BODY>
-</HTML>
diff --git a/linpsk/docs/en/index-2.html b/linpsk/docs/en/index-2.html
deleted file mode 100644
index fa41563..0000000
--- a/linpsk/docs/en/index-2.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML>
-<HEAD>
- <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
- <TITLE>The LinPSK Handbook: Installation</TITLE>
- <LINK HREF="index-3.html" REL=next>
- <LINK HREF="index-1.html" REL=previous>
- <LINK HREF="index.html#toc2" REL=contents>
-</HEAD>
-<BODY>
-<A HREF="index-3.html">Next</A>
-<A HREF="index-1.html">Previous</A>
-<A HREF="index.html#toc2">Contents</A>
-<HR>
-<H2><A NAME="s2">2. Installation</A></H2>
-
-<P>
-<H2><A NAME="ss2.1">2.1 How to obtain LinPSK </A>
-</H2>
-
-<P>
-<P>
-<H2><A NAME="ss2.2">2.2 Requirements</A>
-</H2>
-
-<P>
-<P>
-<H2><A NAME="ss2.3">2.3 Compilation and installation</A>
-</H2>
-
-<P>
-<P>In order to compile and install LinPSK on your system, type the following in
-the base directory of the LinPSK distribution:
-<P>
-<BLOCKQUOTE><CODE>
-<PRE>
-% ./configure
-% make
-% make install
-</PRE>
-</CODE></BLOCKQUOTE>
-<P>
-<P>Since LinPSK uses 
-<PRE>
-autoconf
-</PRE>
- you should have not trouble
-compiling it.
-Should you run into problems please report them to the the author at 
-<A HREF="mailto:dl1ksv at gmx.de">Volker Schroer</A><P>
-<P>
-<P>
-<HR>
-<A HREF="index-3.html">Next</A>
-<A HREF="index-1.html">Previous</A>
-<A HREF="index.html#toc2">Contents</A>
-</BODY>
-</HTML>
diff --git a/linpsk/docs/en/index-3.html b/linpsk/docs/en/index-3.html
deleted file mode 100644
index da1a18f..0000000
--- a/linpsk/docs/en/index-3.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML>
-<HEAD>
- <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
- <TITLE>The LinPSK Handbook: Usage </TITLE>
- <LINK HREF="index-4.html" REL=next>
- <LINK HREF="index-2.html" REL=previous>
- <LINK HREF="index.html#toc3" REL=contents>
-</HEAD>
-<BODY>
-<A HREF="index-4.html">Next</A>
-<A HREF="index-2.html">Previous</A>
-<A HREF="index.html#toc3">Contents</A>
-<HR>
-<H2><A NAME="s3">3. Usage </A></H2>
-
-<P>
-<H2><A NAME="ss3.1">3.1 General Usage</A>
-</H2>
-
-<P>
-<HR>
-<A HREF="index-4.html">Next</A>
-<A HREF="index-2.html">Previous</A>
-<A HREF="index.html#toc3">Contents</A>
-</BODY>
-</HTML>
diff --git a/linpsk/docs/en/index-4.html b/linpsk/docs/en/index-4.html
deleted file mode 100644
index 2408309..0000000
--- a/linpsk/docs/en/index-4.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML>
-<HEAD>
- <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
- <TITLE>The LinPSK Handbook: Another Section</TITLE>
- <LINK HREF="index-5.html" REL=next>
- <LINK HREF="index-3.html" REL=previous>
- <LINK HREF="index.html#toc4" REL=contents>
-</HEAD>
-<BODY>
-<A HREF="index-5.html">Next</A>
-<A HREF="index-3.html">Previous</A>
-<A HREF="index.html#toc4">Contents</A>
-<HR>
-<H2><A NAME="s4">4. Another Section</A></H2>
-
-<P>
-<P>
-<HR>
-<A HREF="index-5.html">Next</A>
-<A HREF="index-3.html">Previous</A>
-<A HREF="index.html#toc4">Contents</A>
-</BODY>
-</HTML>
diff --git a/linpsk/docs/en/index-5.html b/linpsk/docs/en/index-5.html
deleted file mode 100644
index c133306..0000000
--- a/linpsk/docs/en/index-5.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML>
-<HEAD>
- <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
- <TITLE>The LinPSK Handbook: Questions and Answers</TITLE>
- <LINK HREF="index-6.html" REL=next>
- <LINK HREF="index-4.html" REL=previous>
- <LINK HREF="index.html#toc5" REL=contents>
-</HEAD>
-<BODY>
-<A HREF="index-6.html">Next</A>
-<A HREF="index-4.html">Previous</A>
-<A HREF="index.html#toc5">Contents</A>
-<HR>
-<H2><A NAME="s5">5. Questions and Answers</A></H2>
-
-<P>
-<P>
-<HR>
-<A HREF="index-6.html">Next</A>
-<A HREF="index-4.html">Previous</A>
-<A HREF="index.html#toc5">Contents</A>
-</BODY>
-</HTML>
diff --git a/linpsk/docs/en/index-6.html b/linpsk/docs/en/index-6.html
deleted file mode 100644
index 592c44d..0000000
--- a/linpsk/docs/en/index-6.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML>
-<HEAD>
- <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
- <TITLE>The LinPSK Handbook: Copyright</TITLE>
- <LINK HREF="index-5.html" REL=previous>
- <LINK HREF="index.html#toc6" REL=contents>
-</HEAD>
-<BODY>
-Next
-<A HREF="index-5.html">Previous</A>
-<A HREF="index.html#toc6">Contents</A>
-<HR>
-<H2><A NAME="s6">6. Copyright</A></H2>
-
-<P>
-<P>LinPSK Copyright 2002 Volker Schroer , dl1ksv at gmx.de
-<P>
-<P>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
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-<P>This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-<P>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., 675 Mass Ave, Cambridge, MA 02139, USA.
-<P>
-<P>
-<HR>
-Next
-<A HREF="index-5.html">Previous</A>
-<A HREF="index.html#toc6">Contents</A>
-</BODY>
-</HTML>
diff --git a/linpsk/docs/en/index.html b/linpsk/docs/en/index.html
deleted file mode 100644
index bcf9bef..0000000
--- a/linpsk/docs/en/index.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML>
-<HEAD>
- <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
- <TITLE>The LinPSK Handbook</TITLE>
- <LINK HREF="index-1.html" REL=next>
-
-
-</HEAD>
-<BODY>
-<A HREF="index-1.html">Next</A>
-Previous
-Contents
-<HR>
-<H1>The LinPSK Handbook</H1>
-
-<H2>Volker Schroer <CODE>dl1ksv at gmx.de</CODE></H2>Version 0.7 , Sam Nov 23 21:41:05 CET 2002
-<P><HR>
-<EM>This Handbook describes LinPSK Version 0.7</EM>
-<HR>
-<P>
-<H2><A NAME="toc1">1.</A> <A HREF="index-1.html">Introduction</A></H2>
-
-<UL>
-<LI><A HREF="index-1.html#ss1.1">1.1 Changes</A>
-</UL>
-<P>
-<H2><A NAME="toc2">2.</A> <A HREF="index-2.html">Installation</A></H2>
-
-<UL>
-<LI><A HREF="index-2.html#ss2.1">2.1 How to obtain LinPSK </A>
-<LI><A HREF="index-2.html#ss2.2">2.2 Requirements</A>
-<LI><A HREF="index-2.html#ss2.3">2.3 Compilation and installation</A>
-</UL>
-<P>
-<H2><A NAME="toc3">3.</A> <A HREF="index-3.html">Usage </A></H2>
-
-<UL>
-<LI><A HREF="index-3.html#ss3.1">3.1 General Usage</A>
-</UL>
-<P>
-<H2><A NAME="toc4">4.</A> <A HREF="index-4.html">Another Section</A></H2>
-
-<P>
-<H2><A NAME="toc5">5.</A> <A HREF="index-5.html">Questions and Answers</A></H2>
-
-<P>
-<H2><A NAME="toc6">6.</A> <A HREF="index-6.html">Copyright</A></H2>
-
-<HR>
-<A HREF="index-1.html">Next</A>
-Previous
-Contents
-</BODY>
-</HTML>
diff --git a/linpsk/docs/en/index.sgml b/linpsk/docs/en/index.sgml
deleted file mode 100644
index c1b7f3b..0000000
--- a/linpsk/docs/en/index.sgml
+++ /dev/null
@@ -1,74 +0,0 @@
-
-<!doctype linuxdoc system>
-<article>
-<title>The LinPSK Handbook
-<author>Volker Schroer <tt>dl1ksv at gmx.de</tt>
-<date>Version 0.7 , Sam Nov 23 21:41:05 CET 2002
-<abstract>
-This Handbook describes LinPSK Version 0.7
-</abstract>
-
-<toc>
-
-<sect>Introduction
-<p>
-<sect1>Changes
-<p>
-
-<sect>Installation
-<p>
-<sect1>How to obtain LinPSK 
-<p>
-
-<sect1>Requirements
-<p>
-
-<sect1>Compilation and installation
-<p>
-
-In order to compile and install LinPSK on your system, type the following in
-the base directory of the LinPSK distribution:
-
-<tscreen><verb>
-% ./configure
-% make
-% make install
-</verb></tscreen>
-
-<p>
-Since LinPSK uses <verb>autoconf</verb> you should have not trouble
-compiling it.
-Should you run into problems please report them to the the author at 
-<htmlurl url="mailto:dl1ksv at gmx.de" name = "Volker Schroer">
-
-
-<p>
-<sect> Usage <p>
-<sect1> General Usage
-<p>
-<sect> Another Section
-<p>
-
-<sect>Questions and Answers<p>
-
-<sect>Copyright<p>
-
-LinPSK Copyright 2002 Volker Schroer , dl1ksv at gmx.de
-
-
-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
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-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., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-<p>
-</article>
diff --git a/linpsk/filenew.xpm b/linpsk/filenew.xpm
deleted file mode 100644
index 2543c9b..0000000
--- a/linpsk/filenew.xpm
+++ /dev/null
@@ -1,22 +0,0 @@
-/* XPM */
-static const char * filenew[] = {
-"10 14 5 1",
-" 	c None",
-".	c #000000",
-"+	c #FFFFFF",
-"@	c #DCDCDC",
-"#	c #C0C0C0",
-".......   ",
-".++++@@.  ",
-".++++#+ at . ",
-".++++#++ at .",
-".++++#....",
-".+++++###.",
-".++++++++.",
-".++++++++.",
-".++++++++.",
-".++++++++.",
-".++++++++.",
-".++++++++.",
-".++++++++.",
-".........."};
diff --git a/linpsk/filesave.xpm b/linpsk/filesave.xpm
deleted file mode 100644
index 9273e57..0000000
--- a/linpsk/filesave.xpm
+++ /dev/null
@@ -1,34 +0,0 @@
-/* XPM */
-static char *filesave[]={
-"250 30 1 1",
-". c #ffffff",
-"..........................................................................................................................................................................................................................................................",
-"..........................................................................................................................................................................................................................................................",
-"..........................................................................................................................................................................................................................................................",
-"..........................................................................................................................................................................................................................................................",
-"..........................................................................................................................................................................................................................................................",
-"..........................................................................................................................................................................................................................................................",
-"..........................................................................................................................................................................................................................................................",
-"..........................................................................................................................................................................................................................................................",
-"..........................................................................................................................................................................................................................................................",
-"..........................................................................................................................................................................................................................................................",
-"..........................................................................................................................................................................................................................................................",
-"..........................................................................................................................................................................................................................................................",
-"..........................................................................................................................................................................................................................................................",
-"..........................................................................................................................................................................................................................................................",
-"..........................................................................................................................................................................................................................................................",
-"..........................................................................................................................................................................................................................................................",
-"..........................................................................................................................................................................................................................................................",
-"..........................................................................................................................................................................................................................................................",
-"..........................................................................................................................................................................................................................................................",
-"..........................................................................................................................................................................................................................................................",
-"..........................................................................................................................................................................................................................................................",
-"..........................................................................................................................................................................................................................................................",
-"..........................................................................................................................................................................................................................................................",
-"..........................................................................................................................................................................................................................................................",
-"..........................................................................................................................................................................................................................................................",
-"..........................................................................................................................................................................................................................................................",
-"..........................................................................................................................................................................................................................................................",
-"..........................................................................................................................................................................................................................................................",
-"..........................................................................................................................................................................................................................................................",
-".........................................................................................................................................................................................................................................................."};
diff --git a/linpsk/frequencyselect.ui b/linpsk/frequencyselect.ui
deleted file mode 100644
index 44b1297..0000000
--- a/linpsk/frequencyselect.ui
+++ /dev/null
@@ -1,113 +0,0 @@
-<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
-<class>FrequencySelect</class>
-<widget class="QGroupBox">
-    <property name="name">
-        <cstring>FrequencySelect</cstring>
-    </property>
-    <property name="geometry">
-        <rect>
-            <x>0</x>
-            <y>0</y>
-            <width>251</width>
-            <height>260</height>
-        </rect>
-    </property>
-    <property name="sizePolicy">
-        <sizepolicy>
-            <hsizetype>4</hsizetype>
-            <vsizetype>4</vsizetype>
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-        </sizepolicy>
-    </property>
-    <property name="minimumSize">
-        <size>
-            <width>50</width>
-            <height>60</height>
-        </size>
-    </property>
-    <property name="font">
-        <font>
-            <pointsize>10</pointsize>
-        </font>
-    </property>
-    <property name="caption">
-        <string>Select</string>
-    </property>
-    <property name="frameShape">
-        <enum>WinPanel</enum>
-    </property>
-    <property name="frameShadow">
-        <enum>Raised</enum>
-    </property>
-    <property name="title">
-        <string>FrequencySelect</string>
-    </property>
-    <property name="alignment">
-        <set>AlignCenter</set>
-    </property>
-    <widget class="QRadioButton">
-        <property name="name">
-            <cstring>Activate</cstring>
-        </property>
-        <property name="geometry">
-            <rect>
-                <x>40</x>
-                <y>140</y>
-                <width>170</width>
-                <height>40</height>
-            </rect>
-        </property>
-        <property name="font">
-            <font>
-            </font>
-        </property>
-        <property name="text">
-            <string>Frequency</string>
-        </property>
-    </widget>
-    <widget class="QSpinBox">
-        <property name="name">
-            <cstring>Frequency</cstring>
-        </property>
-        <property name="geometry">
-            <rect>
-                <x>40</x>
-                <y>80</y>
-                <width>171</width>
-                <height>51</height>
-            </rect>
-        </property>
-        <property name="font">
-            <font>
-            </font>
-        </property>
-        <property name="maxValue">
-            <number>2500</number>
-        </property>
-        <property name="minValue">
-            <number>300</number>
-        </property>
-        <property name="value">
-            <number>1000</number>
-        </property>
-    </widget>
-</widget>
-<includes>
-    <include location="local" impldecl="in implementation">frequencyselect.ui.h</include>
-</includes>
-<variables>
-    <variable access="private">uint frequency;</variable>
-</variables>
-<slots>
-    <slot specifier="non virtual" returnType="uint">getFrequency()</slot>
-    <slot specifier="non virtual">setFrequency( uint )</slot>
-    <slot specifier="non virtual">init()</slot>
-</slots>
-<functions>
-    <function access="private" specifier="non virtual">calculateSizeofComponents(int,int)</function>
-    <function specifier="non virtual">setFunctionText( QString text )</function>
-    <function access="protected" specifier="non virtual">resizeEvent( QResizeEvent * )</function>
-</functions>
-<layoutdefaults spacing="6" margin="11"/>
-</UI>
diff --git a/linpsk/fskdemodulator.cpp b/linpsk/fskdemodulator.cpp
deleted file mode 100644
index 1ce8e8e..0000000
--- a/linpsk/fskdemodulator.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-/***************************************************************************
-                          fskdemodulator.cpp  -  description
-                             -------------------
-    begin                : Fre Jan 31 2003
-    copyright            : (C) 2003 by Volker Schroer
-    email                : dl1ksv at gmx.de
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   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  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *   The PSK part is based on WinPSK 1.0 by Moe Wheatly, AE4JY             *
- ***************************************************************************/
-
-#include "fskdemodulator.h"
-
-FSKDemodulator::FSKDemodulator():CDemodulator()
-{
-init_filter(0.05, 0.45);
-twiddles=0;
-bins=0;
-Filterptr=0;
-for (int i=0; i <HilbertFilterLength; i++)
-  FilterBuffer[i]=0.;
-}
-FSKDemodulator::~FSKDemodulator()
-{
-}
-
-void FSKDemodulator::init_filter(double f1,double f2)
-{
-int i;
-double t,h,x,y;
-  for (i = 0; i < HilbertFilterLength; i++)
-  {
-    t = i - (HilbertFilterLength - 1.0) / 2.0;
-    h = i * (1.0 / (HilbertFilterLength - 1.0));
-
-		x = (2 * f2 * sinc(2 * f2 * t) -
-		     2 * f1 * sinc(2 * f1 * t)) * hamming(h);
-
-		/*
-		 * The actual filter code assumes the impulse response
-		 * is in time reversed order. This will be anti-
-		 * symmetric so the minus sign handles that for us.
-		 */
-		y = (2 * f2 * cosc(2 * f2 * t) -
-		     2 * f1 * cosc(2 * f1 * t)) * hamming(h);
-    filter[i]=complex<double>(x,-y);
-  }
-
-}
-
-/*
- * Sinc done properly.
- */
-double FSKDemodulator::sinc(double x)
-{
-	if (fabs(x) < 1e-10)
-		return 1.0;
-	else
-		return sin(M_PI * x) / (M_PI * x);
-}
-
-/*
- * Don't ask...
- */
-double FSKDemodulator::cosc(double x)
-{
-	if (fabs(x) < 1e-10)
-		return 0.0;
-	else
-		return (1.0 - cos(M_PI * x)) / (M_PI * x);
-}
-
-/*
- * Hamming window function.
- */
-double FSKDemodulator::hamming(double x)
-{
-	return 0.54 - 0.46 * cos(2 * M_PI * x);
-}
-/**
-bool FSKDemodulator::init(double,int)
-{
-if ( (bins = new complex<float> [NumberofTones]) == NULL )
-	return false;
-if ( (twiddles = new complex<float> [SamplesPerBit]) == NULL )
-	return false;
-
-}
-**/
-complex<double> FSKDemodulator::Hilbert(double in)
-{
-complex<double> sum;
-complex<double> *z;
-int i,j;
-sum= complex<double>(0.,0.);
-FilterBuffer[Filterptr]=in;
-z=filter+HilbertFilterLength-1;
-//z=filter;
-for(i=0;i<HilbertFilterLength;i++)
-  {
-   j = ( Filterptr - i + HilbertFilterLength ) % HilbertFilterLength;
-  sum +=FilterBuffer[j] * (*z);
-  z--;
-  }
-Filterptr = (Filterptr + 1) % HilbertFilterLength;
-return sum;
-}
diff --git a/linpsk/generalsettings.tar.gz b/linpsk/generalsettings.tar.gz
deleted file mode 100644
index c9e3f4a..0000000
Binary files a/linpsk/generalsettings.tar.gz and /dev/null differ
diff --git a/linpsk/generalsettings.ui.h b/linpsk/generalsettings.ui.h
deleted file mode 100644
index 5846109..0000000
--- a/linpsk/generalsettings.ui.h
+++ /dev/null
@@ -1,177 +0,0 @@
-/****************************************************************************
-** ui.h extension file, included from the uic-generated form implementation.
-**
-** If you wish to add, delete or rename functions or slots use
-** Qt Designer which will update this file, preserving your code. Create an
-** init() function in place of a constructor, and a destroy() function in
-** place of a destructor.
-*****************************************************************************/
-#ifndef LINPSK_FOR_MAC
-#include <sys/soundcard.h>
-#endif
-#include <qmessagebox.h>
-#include <qwidget.h>
-extern Parameter settings;
-
-Parameter GeneralSettings::getSettings()
-{
-LocalSettings.callsign=Callsign->text();
-if(Demomode->isOn() )
- {
-   LocalSettings.DemoMode=true;
-   LocalSettings.DemoTypeNumber=Fileformat->id(Fileformat->selected());
-   LocalSettings.inputFilename="";
-  }
-else
-  {
-   LocalSettings.DemoMode=false;
-   SoundDevice->setText(LocalSettings.SoundDevice);
-  }
-LocalSettings.timeoffset=UTC->value();
-if( SlashedZero->isOn())
-  LocalSettings.slashed0=true;
-else
-  LocalSettings.slashed0=false;
-
-return LocalSettings;
-}
-
-void GeneralSettings::init()
-{
-connect(Output,SIGNAL(valueChanged(int)),this,SIGNAL(OutputLevelChanged(int)));
-LocalSettings = settings;    
-SoundDevice->setText(LocalSettings.SoundDevice);
-Callsign->setText(LocalSettings.callsign);
-UTC->setValue(LocalSettings.timeoffset);
-SlashedZero->setChecked(LocalSettings.slashed0);
-
-Demomode->setChecked(LocalSettings.DemoMode);
-
-Fileformat->setButton(LocalSettings.DemoTypeNumber);
-if (Demomode->isOn())
-    Fileformat->show();
-else
-    Fileformat->hide();
-PTT->setButton(LocalSettings.ptt);
-//  PTTControl
-    if(!checkcom("/dev/ttyS0"))
-      COM1->hide();
-    if(!checkcom("/dev/ttyS1"))
-      COM2->hide();
-    if(!checkcom("/dev/ttyS2"))
-      COM3->hide();
-    if(!checkcom("/dev/ttyS3"))
-      COM4->hide();
-#ifdef LINPSK_FOR_MAC
-SerialDevice->hide();
-SoundDeviceL->hide();
-SoundDevice->hide();
-Others->hide();
-
-#else
-if (LocalSettings.ptt < 5)
-     SerialDevice->hide();
-else
-  {
-   SerialDevice->setText(LocalSettings.SerialDevice);
-   SerialDevice->show();
-  }  
-#endif          
-// Input Source (Ugly coding)
-#ifndef LINPSK_FOR_MAC
-	if (LocalSettings.InputSource == SOUND_MIXER_MIC)
-	InputSelection->setButton(0);
-		if (LocalSettings.InputSource == SOUND_MIXER_LINE)
-	InputSelection->setButton(1);
-Input->setValue(LocalSettings.InputVolume);
-#else
-InputSelection->hide();
-ILevel->hide();
-Input->hide();
-         
-#endif
-Output->setValue(LocalSettings.OutputVolume);
-}
-
-
-void GeneralSettings::GeneralSettings_destroyed( QObject * )
-{
-
-}
-
-
-void GeneralSettings::selectDemomode()
-{
-if (Demomode->isOn())
-    Fileformat->show();
-else
-    Fileformat->hide();
-}
-
-
-
-
-void GeneralSettings::SelectInputSource( int Device )
-{
-#ifndef LINPSK_FOR_MAC
-if (Device == 0 )
-	LocalSettings.InputSource = SOUND_MIXER_MIC;
-if (Device == 1 )
-	LocalSettings.InputSource = SOUND_MIXER_LINE;
-setVolume(LocalSettings.InputSource,LocalSettings.InputVolume);
-#endif	
-}
-
-void GeneralSettings::setInputLevel( int Level )
-{
-#ifndef LINPSK_FOR_MAC
-LocalSettings.InputVolume=Level;
-setVolume(LocalSettings.InputSource,LocalSettings.InputVolume);
-#endif 
-}
-
-void GeneralSettings::setOutputLevel( int Level )
-{
-LocalSettings.OutputVolume=Level; 
-#ifndef LINPSK_FOR_MAC
-setOutputVolume(LocalSettings.OutputVolume);
-#endif    
-}
-
-
-void GeneralSettings::selectComPort( int port)
-{
-LocalSettings.ptt=port;
-if (port == 5 )
-   {
-   SerialDevice->setText(LocalSettings.SerialDevice);
-   SerialDevice->show();
-  }
-else
-  { QString s;
-    SerialDevice->hide();
-     if (port > 0)
-       LocalSettings.SerialDevice="/dev/ttyS"+s.setNum(port-1);     
-  }
-
-}
-
-
-void GeneralSettings::setSerialDevice()
-{
-if (PTT->id(PTT->selected()) == 5 )
- {
-  if (checkcom(SerialDevice->text()) )
-    LocalSettings.SerialDevice=SerialDevice->text();
-  else
-      QMessageBox::warning( (QWidget *) 0,QString("Settings"),
-        "Serial Device " + SerialDevice->text() + " not found \n Device remains unchanged",
-        0);
-  }
-}
-
-
-void GeneralSettings::setSoundDevice()
-{
-LocalSettings.SoundDevice=SoundDevice->text();
-}
diff --git a/linpsk/macrowindow.cpp b/linpsk/macrowindow.cpp
deleted file mode 100644
index 2d5e351..0000000
--- a/linpsk/macrowindow.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-/***************************************************************************
-                          macros.cpp  -  description
-                             -------------------
-    begin                : Sam Mai 3 2003
-    copyright            : (C) 2003 by Volker Schroer
-    email                : dl1ksv at gmx.de
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   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  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- ***************************************************************************/
-
-#include "macrowindow.h"
-#include <qpushbutton.h>
-#include <qbuttongroup.h>
-
-#include "macros.h"
-
-MacroWindow::MacroWindow(QWidget *parent, const char *name ) : QScrollView(parent,name)
-{
-DisplayBox=new QButtonGroup(1,Horizontal,viewport());
-DisplayBox->setMargin(0);
-DisplayBox->setLineWidth(0);
-DisplayBox->setMidLineWidth(0);
-addChild(DisplayBox);
-setResizePolicy(AutoOne);
-verticalScrollBar()->setFixedWidth(16);
-setVScrollBarMode(AlwaysOn);
-setHScrollBarMode(AlwaysOff);
-horizontalScrollBar()->setFixedHeight(16);
-connect(DisplayBox,SIGNAL(clicked(int)),this,SIGNAL(callMacro(int)));
-}
-MacroWindow::~MacroWindow(){
-}
-void MacroWindow::resizeEvent( QResizeEvent * )
-{
-int width,y;
-int anzahl = DisplayBox->count();
-width=this->width();
-width=width-verticalScrollBar()->width();
-
-DisplayBox->setFixedWidth(width);
-width=width-15;
-y=5;
-for(int i=0; i < anzahl; i++)
- {
-  QButton *pb; 
-  pb=DisplayBox->find(i);
-  pb->setGeometry(5,y,width,20);
-  y=y+25;
- } 
-}
-void MacroWindow::updateMacroWindow(Macros *Macro)
-{
-QButton *pb;
-int anzahl = DisplayBox->count();
-int i;
-
-for(i=0; i < anzahl; i++)
- {
-  pb=DisplayBox->find(i);
-  DisplayBox->remove(pb);
-  delete pb;
- }
-anzahl= Macro->MacroNames.size();  
-for(i=0; i< anzahl;i++)
- {
-  pb = new QPushButton(DisplayBox);
-
-  if ( !Macro->Accelerator[i].isEmpty() )
-   {
-    pb->setAccel(QKeySequence(Macro->Accelerator[i]));
-    pb->setText(Macro->MacroNames[i]+" ("+Macro->Accelerator[i]+")");    
-   } 
-  else
-     pb->setText(Macro->MacroNames[i]); 
-  pb->show();
- }
-show(); 
-}
-
diff --git a/linpsk/mfskdemodulator.cpp b/linpsk/mfskdemodulator.cpp
deleted file mode 100644
index 7d7bebf..0000000
--- a/linpsk/mfskdemodulator.cpp
+++ /dev/null
@@ -1,390 +0,0 @@
-/***************************************************************************
-                          mfskdemodulator.cpp  -  description
-                             -------------------
-    begin                : Mit Jan 29 2003
-    copyright            : (C) 2003 by Volker Schroer
-    email                : dl1ksv at gmx.de
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   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  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *   The PSK part is based on WinPSK 1.0 by Moe Wheatly, AE4JY             *
- ***************************************************************************/
-
-#include "mfskdemodulator.h"
-#include "deinterleaver.h"
-#include "viterbi.h"
-#include "constants.h"
-#include "mfskvaricode.h"
-
-const double MFSKDistance(double xa,int b)
-{
-unsigned int count,c;
-int a;
-a= (int) xa;
-c = a ^ b;
-count =0;
-while( c > 0 )
-  {
-   if (c & 1) count++;
-    c = c >>1;
-  }
-return double(count);
-
-}
-
-MFSKDemodulator::MFSKDemodulator():FSKDemodulator()
-{
-NumberofTones=16;
-Baudrate=15.625;
-phaseacc=0.;
-pipeptr=0;
-
-OszFrequency =0.;
-Decoder=new MFSKVaricode();
-viterbi = new Viterbi(7,0x6D,0x4F,MFSKDistance);
-datashreg=0;
-}
-MFSKDemodulator::~MFSKDemodulator()
-{
-if ( leave != 0)
-  delete leave;
-if ( viterbi != 0)
-  delete viterbi;
-if ( bins != 0)
-  delete bins;
-if (twiddles != 0)
-  delete twiddles;
-if (history != 0)
-  delete history;
-if ( Pipe != 0)
-  delete Pipe;
-if ( Decoder !=0)
-  delete Decoder;
-if ( viterbi != 0)
-  delete viterbi;
-}
-
-void MFSKDemodulator::ProcessInput(double * input)
-{
-int i;
-complex<double> z;
-OszFreqinc=(RxFrequency-1000.)*PI2/SampleRate;
-//unsigned char  symbol[4],ch;
-//int c;
-for (i=0; i< NxSamples; i++)
-  {
-
-
-   z = Hilbert(input[i]);
-//Generate complex sample by mixing input sample with NCO's sin/cos
-  OszFrequency = OszFrequency + OszFreqinc ;
-//**
-  if(OszFrequency > PI2)		//handle 2 Pi wrap around
-  OszFrequency -= PI2;
-   else
-    if ( OszFrequency < -PI2)
-      OszFrequency += PI2;
-
-  if(OszFrequency > M_PI)		//handle 2 Pi wrap around
-  OszFrequency -= PI2;
-   else
-    if ( OszFrequency < -M_PI)
-      OszFrequency += PI2;
-
-  z = z * complex<double> (cos(OszFrequency),sin(OszFrequency));
-  sfft(z);
-  for (int j=0; j < NumberofTones;j++)
-    Pipe[pipeptr][j]=bins[j];
-  if (synccounter > 0)
-    synccounter--;
-     else
-     if (symbolphase == symboltime)
-     {
-      synccounter = SymbolLength / 2;
-
-      currsymbol = decodesymbol(bins);
-      currvector = bins[currsymbol ];
-
-      // decode symbol 
-      recvsymbol( bins);
-
-			// update the scope 
-//			update_syncscope(m);
-
-			// symbol sync 
-			synchronize();
-
-			// frequency tracking 
-			afc();
-
-			prev2symbol = prev1symbol;
-			prev2vector = prev1vector;
-			prev1symbol = currsymbol;
-			prev1vector = currvector;
-		}
-      pipeptr = (pipeptr +1) % (2* SymbolLength);
-      symbolphase = ( symbolphase + 1 ) % SymbolLength;
-
-
-  }
-}
-
-int MFSKDemodulator::getSquelchValue()
-{
-
-return 0;
-}
-bool MFSKDemodulator::Init(double FS,int NumberofSamples)
-{
-SymbolLength=(int) (FS/Baudrate+0.5);
-NxSamples=NumberofSamples;
-SampleRate=FS;
-OszFreqinc=(RxFrequency-1000.)*PI2/SampleRate;
-
-//Pipe = new complex<double> [NumberofTones][2*SymbolLength];
-//Pipe.reserve(2*NumberofTones*SymbolLength);
-leave = new Deinterleaver[10]();
-return init_sfft(SymbolLength);
-}
-bool MFSKDemodulator::init_sfft(int len)
-{
-#define	STABCOEFF	0.9999
-if ( (bins=new complex<double>[NumberofTones]) == NULL)
-  return false;
-if ( (twiddles=new complex<double>[len]) == NULL)
-  return false;
-if ( (history=new complex<double>[len]) == NULL)
-  return false;
-for (int i = 0; i < len; i++) 
- twiddles[i] = complex<double>(cos(i * 2.0 * M_PI / len) * STABCOEFF,sin(i * 2.0 * M_PI / len) * STABCOEFF);
-ptr=0;
-return true;
-}
-
-
-void MFSKDemodulator::sfft(complex<double> input)
-{
-	complex<double> old, z;
-	int i;
-//  int first,last;
-//  first =64; // Freq * SymbolLength / SampleRate = Freq / Baudrate
-//  last = 80;
-
-	/* restore the sample fftlen samples back */
-	old = history[ptr];
-//	old.re *= s->corr;
-//	old.im *= s->corr;
-
-	/* save the new sample */
-  history[ptr] = input;
-
-	/* advance the history pointer */
-	ptr = (ptr + 1) % SymbolLength;
-
-	/* calculate the wanted bins */
-	for (i = 0; i < NumberofTones; i++)
- {
-		z = bins[i];
-		z = z - old;
-		z = z + input;
-		bins[i] = z * twiddles[i+64];
-	}
-}
-
-int MFSKDemodulator::decodesymbol(complex<double> *in)
-{
-	int i, symbol = 0;
-	double x, max = 0.0;
-
-
-	for (i = 0; i < NumberofTones; i++) {
-		if ((x = abs(in[i])) > max) {
-			max = x;
-			symbol = i;
-		}
-	}
-
-	return symbol;
-}
-void MFSKDemodulator::recvsymbol(complex<double> *bins)
-{
-double tone, sum, b[4];
-unsigned char symbols[4];
-int i, j;
-
-/* gray decode and form soft decision samples */
-/**
-	sum = b[0] = b[1] = b[2] = b[3] = 0.0;
-	for (i = 0; i < 16; i++)
-   {
-		j = graydecode(i);
-
-		tone = abs(bins[i]);
-
-		b[0] += (j & 8) ? tone : -tone;
-		b[1] += (j & 4) ? tone : -tone;
-		b[2] += (j & 2) ? tone : -tone;
-		b[3] += (j & 1) ? tone : -tone;
-
-		sum += tone;
-	}
-**/
-//	if (sum == 0.0) {
-		/* avoid divide by zero */
-/**
-		symbols[0] = 0;
-		symbols[1] = 0;
-		symbols[2] = 0;
-		symbols[3] = 0;
-	} else {
-**/
-		/* shift to range 0...255 */
-/**
-		symbols[0] = clamp(128.0 + (b[0] / sum * 128.0));
-		symbols[1] = clamp(128.0 + (b[1] / sum * 128.0));
-		symbols[2] = clamp(128.0 + (b[2] / sum * 128.0));
-		symbols[3] = clamp(128.0 + (b[3] / sum * 128.0));
-	}
-**/
-/*******************Test ***********************/
-j=graydecode(currsymbol);
-for(i=3;i >=0 ; i--)
-  {
-    if (j & 1)
-      symbols[i] ='1';
-    else
-      symbols[i] ='0';
-    j = j >>1;
-  }
-/***************************/
-  for(i=0; i < 10; i++)
-    leave[i].deinterleave(symbols);
-/********** Test *******/
-j=0;
-if ( symbols[0] == '1')
-  j=2;
-if (symbols[1] == '1')
-  j = j+1;
-viterbi->decode(j);
-recvbit(viterbi->getbit(48));
-
-j=0;
-if ( symbols[2] == '1')
-  j=2;
-if (symbols[3] == '1')
-  j = j+1;
-viterbi->decode(j);
-recvbit(viterbi->getbit(48));
-
-/**
-for(i=0; i <4; i++)
-  {
-    j=0;
-    if ( symbols[i] == '1' )
-      j = 1;
-    recvbit(j);
-  }
-**/     
-/*****************************/
-
-//	viterbi->viterbi27( symbols);
-
-//	if (viterbi->datalen > 0)
-//   {
-
-//		if (trx->squelchon && m->averagemetric < prefs.sqval)
-//			return;
-/**
-		for (i = 0; i < viterbi->datalen; i++)
-     {
-			recvbit(viterbi->data[i] & 128);
-			recvbit(viterbi->data[i] & 64);
-			recvbit(viterbi->data[i] & 32);
-			recvbit(viterbi->data[i] & 16);
-			recvbit(viterbi->data[i] & 8);
-			recvbit(viterbi->data[i] & 4);
-			recvbit(viterbi->data[i] & 2);
-			recvbit(viterbi->data[i] & 1);
-		}
-**/
-//	}
-/**/
-}
-
-void MFSKDemodulator::synchronize()
-{
-	int i, j, syn = -1;
-	double val, max = 0.0;
-
-	if (currsymbol == prev1symbol)
-		return;
-	if (prev1symbol == prev2symbol)
-		return;
-
-	for (i = 0;  ( unsigned int ) i < (2*SymbolLength); i++) {
-		j = (i + pipeptr) % (2*SymbolLength);
-		val = abs(Pipe[j][prev1symbol]);
-		if (val > max) {
-			syn = i;
-			max = val;
-		}
-	}
-i = SymbolLength;
-//  syncaverage += (syn - SymbolLength) / 16.0;
-  syncaverage += (syn - i) / 16.0;
-
-	if (syncaverage < 0.0)
-		syncaverage += SymbolLength;
-	if (syncaverage >= SymbolLength)
-		syncaverage -= SymbolLength;
-
-	symboltime = (unsigned int) floor(syncaverage);
-}
-
-void MFSKDemodulator::afc()
-{
-complex<double> z;
-double x;
-
-	if (UseAfc == false)
-		return;
-
-	if (currsymbol !=prev1symbol)
-		return;
-
-	z = prev1vector* conj(currvector);
-	x = atan2(z.imag(),z.real()) / SymbolLength / (2.0 * M_PI / SampleRate);
-
-	if ( UseAfc && (x > - Baudrate / 2.0 ) &&   ( x < Baudrate / 2.0 ) )
-      RxFrequency = RxFrequency + (x / 8.0);
-}
-
-void MFSKDemodulator::recvbit(int bit)
-{
-	int c;
-  char zeichen;
-	datashreg = (datashreg << 1);
-  c = !! bit;
-  datashreg = datashreg | c;
-
-	/* search for "001" */
-  c = datashreg & 7;
-	if ((datashreg & 7) == 1)
-   {
-		/* the "1" belongs to the next symbol */
-		c = Decoder->decode(datashreg >> 1);
-
-///		if (c != -1)
-///			trx_put_rx_char(c);
-  zeichen = c;
-  if ( c != -1 )
-		emit newSymbol((char) c);
-		/* we already received this */
-		datashreg = 1;
-	}
-}
diff --git a/linpsk/qsodata.ui.h b/linpsk/qsodata.ui.h
deleted file mode 100644
index 7bc39b3..0000000
--- a/linpsk/qsodata.ui.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/****************************************************************************
-** ui.h extension file, included from the uic-generated form implementation.
-**
-** If you wish to add, delete or rename functions or slots use
-** Qt Designer which will update this file, preserving your code. Create an
-** init() function in place of a constructor, and a destroy() function in
-** place of a destructor.
-*****************************************************************************/
-
-#include "parameter.h"
-#include "qsoinfo.h"
-#include <qdatetime.h>
-
-extern Parameter settings;
-void QSOData::init()
-{
-QsoData= new QsoInfo();
-*QsoData=*(settings.QsoData);
-RemoteCallsign->setText(QsoData->TheirCall);
-OPName->setText(QsoData->TheirName);
-QTHName->setText(QsoData->QTH);
-Loc->setText(QsoData->Locator);
-QSOFrequency->setText(QsoData->Frequency);
-HisRST->setText(QsoData->HisRst);
-MineRST->setText(QsoData->MyRst);
-QsoDate->setText(QsoData->QsoDate);
-QSOTime->setText(QsoData->QsoTime);
-}
-
-
-void QSOData::clear()
-{
-if (QsoData != 0)
-  delete QsoData;
-QsoData= new QsoInfo();  
-*(settings.QsoData)=*QsoData;
-init();
-}
-
-void QSOData::Callsignchanged()
-{
-QsoData->TheirCall=RemoteCallsign->text();
-settings.QsoData->TheirCall=QsoData->TheirCall;
-}
-
-void QSOData::Namechanged()
-{
-QsoData->TheirName=OPName->text();
-settings.QsoData->TheirName=QsoData->TheirName;
-}
-
-void QSOData::QTHchanged()
-{
-QsoData->QTH=QTHName->text();
-settings.QsoData->QTH=QsoData->QTH;
-
-}
-
-void QSOData::Locatorchanged()
-{
-QsoData->Locator=Loc->text();
-settings.QsoData->Locator=QsoData->Locator;
-}
-
-void QSOData::Frequencychanged()
-{
-QsoData->Frequency=QSOFrequency->text();
-settings.QsoData->Frequency=QsoData->Frequency;
-}
-
-void QSOData::HisRSTchanged()
-{
-QsoData->HisRst=HisRST->text();
-settings.QsoData->HisRst=QsoData->HisRst;
-}
-
-void QSOData::MyRSTchanged()
-{
-QsoData->MyRst=MineRST->text();
-settings.QsoData->MyRst=QsoData->MyRst;
-}
-
-void QSOData::Datechanged()
-{
-QsoData->QsoDate=QsoDate->text();
-settings.QsoData->QsoDate=QsoData->QsoDate;
-}
-
-void QSOData::Timechanged()
-{
-QsoData->QsoTime=QSOTime->text();
-settings.QsoData->QsoTime=QsoData->QsoTime;
-}
-
-
-
-
-void QSOData::refreshDateTime()
-{
-QDateTime t=QDateTime::currentDateTime();
-t.addSecs(settings.timeoffset*3600);
-QsoData->QsoDate=t.toString("d.MM.yyyy");
-QsoData->QsoTime=t.toString("h:mm");
-QsoDate->setText(QsoData->QsoDate);
-QSOTime->setText(QsoData->QsoTime);
-settings.QsoData->QsoTime=QsoData->QsoTime;
-settings.QsoData->QsoDate=QsoData->QsoDate;
-}
diff --git a/linpsk/rttydemodulator.cpp b/linpsk/rttydemodulator.cpp
deleted file mode 100644
index e76250c..0000000
--- a/linpsk/rttydemodulator.cpp
+++ /dev/null
@@ -1,560 +0,0 @@
-/***************************************************************************
-                          rttydemodulator.cpp  -  description
-                             -------------------
-    begin                : Mon Jun 4 2001
-    copyright            : (C) 2001 by Volker Schroer
-    email                : dl1ksv at gmx.de
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   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  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *    based on the work of  Moe Wheatly, AE4JY                             *  
- ***************************************************************************/
-
-#include "rttydemodulator.h"
-
-RTTYDemodulator::RTTYDemodulator():CDemodulator()
-{
-ShiftOn = false;
-NumberOfStopBits = 2;
-parity = 0;
-x1=0;
-#define NumberofTones 7		// define statically to avoid variable sized arrays later --w1bw at debian.org
-//NumberofTones=7;
-NxSamples = 0;
-
-twiddles = NULL;
-bins = NULL;
-history = NULL;
-FrequencyNumber = NULL;
-// Disable PhaseDisplay
-
-}
-RTTYDemodulator::~RTTYDemodulator()
-{
-if (twiddles != NULL)
-  delete twiddles;
-
-if (bins != NULL)
-	delete bins;
-
-if (history != NULL )
-	delete history;
-if (FrequencyNumber != NULL)
-	delete FrequencyNumber;
-}
-/** returns the asci char corresponding to the baudot code */
-char RTTYDemodulator::baudot_code(char data)
-{
-/** Table of letters */
-
-static const char letters[32] =	{0x00,'E','\n','A',' ','S','I','U',
-								 '\n','D','R','J','N','F','C','K',
-								 'T','Z','L','W','H','Y','P','Q',
-								 'O','B','G','^','M','X','V','^'};
-
-
-/** Table of symbols */
-static const char symbols[32] = {0x00,'3','\n','-',' ',',','8','7',
- '\n','$','4','#',',','�',':','(',
- '5','+',')','2','�','6','0','1',
-'9','7','�','^','.','/','=','^'};
-
-char c;
-
-	switch (data)
-	 {
-		case 0x1f :
-				ShiftOn = false;  //LTRS
-				c = 0;
-				break;
-		case 0x1b :
-		 		ShiftOn = true;   //FIGS
-		 		c = 0;
-		  	break;
-		default:	if (!ShiftOn)
-								c=letters[data];
-							 else
-							 c=symbols[data];
-						 break;
- 		}
-
-
-if ( c == ' ')				// Unshift on Space
-	ShiftOn =false;	
-
-return c;
-}
-
-bool RTTYDemodulator::Init(double FS,int NumberOfSamples)
-{
-
-int i;
-float x;
-
-Baudrate=45;
-NumberOfBits=5;
-NxSamples=NumberOfSamples;
-SymbolLength=int (FS/Baudrate+0.5);
-SampleRate=FS;
-Status = WaitingForMark;
-actSample=0;
-data=0;
-BitsInData=0;
-bitcounter=0;
-c=0;
-count=0;
-
-FrequencyChanged = false;
-
-
-ave1=0.0;
-ave2=0.0;
-
-
-
-if ( (twiddles = new complex<float> [SymbolLength]) == NULL )
-	return false;
-
-if ( (bins = new complex<float> [NumberofTones]) == NULL )
-	return false;
-
-if ( (history = new float[SymbolLength] ) == NULL )
-	return false;
-if ( (FrequencyNumber=new int[NumberofTones]) == NULL )
-	return false;
-ptr = 0;
-
-setRxFrequency(1000.);
-
-// Initialize the coefficients for the slfft
-
-for (i=0;(unsigned int) i < SymbolLength; i++)
-	{
-		x =2*i * M_PI*Baudrate/FS;
-		twiddles[i] = complex<float> ( cos(x), sin(x) ) ;
-	}
-
-for (i=0; (unsigned int) i<SymbolLength; i++)
-{
-history[i]= 0.;
-}
-for(i=0;i<NumberofTones;i++)
-		bins[i]= complex<float> (0.,0.);
-return true;
-}
-
-void RTTYDemodulator::ProcessInput(double *input)
-{
-
-
-
-
-
-char c1;
-
-bool bit;
-
-DataAvailable = true;	// Just read the data
-actSample = 0;				// Start processing, counter will be incremented while processing
-											// the next value
-data=input;	
-while (DataAvailable)
-	{
-		switch (Status)
-			{
-				case WaitingForMark:
-						while ( DataAvailable ) 				// Waiting for Mark
-		 					if (ProcessNextSample() > 0)
-							{
-								Status = WaitingForSpace;   // We seem to have found Mark, so we can wait for
-								break;                     // Space
-							}
-				break;
-				
-				case WaitingForSpace:   	           // Mark seems to be found, now waiting for transition																																
-						while ( DataAvailable )					 // Waiting for transition
-							if (ProcessNextSample() < 0 ) 		
-							{
-								Status  = CheckingStartBit;  // Transition seems to be found	
-								bitcounter = SymbolLength/2;
-								CalcQuality();
-								break;
-							}
-						break;				
-							
-				case CheckingStartBit:
-
-					while ( DataAvailable  )
-							if ( --bitcounter > 0)
-								ProcessNextSample();
-							else
-					if ( ProcessNextSample() > 0 ) 		// 0.5 bit processed
-							{
-								Status  = WaitingForSpace; // Was'nt the correct start bit, as we found Mark
-								break;                     // here , so go and look for another Space
-							}	
-						else
-							{		
-///								Status = SkipRestOfStartBit;   // We are tight behind the midle of the Startbit
-								Status = CollectingByte;   // We are tight behind the midle of the Startbit
-
-///							bitcounter = SymbolLength/4;
-///								bitcounter =1;
-///                CalcQuality();
-								Frequencykor = 0;
-								bitcounter =5;
-                CalcQuality();
-                reset();
-								break;
-							}
-						
-					break;				// We've reached the end of the available data or completed Status
-
-        case SkipRestOfStartBit:
-					while ( DataAvailable && (--bitcounter > 0) )
-						if  ( ProcessNextSample() > 0 )		// Oops, already Mark
-							{
-								Status = CollectingByte;
-								bitcounter = 5;
-								reset();
-								count = 10;										// This is only aguess
-								break;
-							}
-					if ( bitcounter == 0 )			// Normal end of skip
-						{
-								Status = CollectingByte;
-								bitcounter = 5;
-								reset();
-								break;
-						}
-					break;
-				case CollectingByte:
-					while( DataAvailable && (bitcounter > 0) )
-						{
-							bit=get_next_bit();							
-							if ( DataAvailable )
-								{
-									if (bit)
-										BitsInData++;
-									bitcounter--;
-									c >>=1;
-									if (bit)
-										c |= 128;
-								}									
-							else
-								break;			// No more data to be processed at the moment	
-							
-						}
-					if ( bitcounter == 0 ) // Data 'byte' completed
-						{
-							c >>= (8- NumberOfBits);
-							Status = CheckingParity;
-							c1=c;
-							c1 = baudot_code(c1);  // FIGS or LTRS result in c1 = 0 !
-							if ( (c1 > 0 ) && (!Squelch || (Squelch && ( (unsigned int)(100.*ave1)>Threshold))))
-								emit newSymbol( c1 );
-						}	
-							
-					break;	
-					
-				case CheckingParity:
-
-					if (parity)
-						{
-							bit=get_next_bit();
-							if (	DataAvailable && (!Squelch || (Squelch && ( (unsigned int)(100.*ave1)>Threshold))))
-								{
-									if (bit)
-										BitsInData++;
-									if (parity == 1 ) // even
-										{
-										if ( BitsInData & 1)	// error						
-											{
-											emit newSymbol('<');
-											emit newSymbol('P');
-											emit newSymbol('>');
-											}
-										}
-									else							// odd
-										{
-										if (! (BitsInData & 1))	// error						
-											{
-											emit newSymbol('<');
-											emit newSymbol('P');
-											emit newSymbol('>');
-											}
-										}
-									
-									}
-								}	
-								Status =WaitingForStopBits;
-								BitsInData = 0;
-//								bitcounter=NumberOfStopBits;
-								bitcounter =1;
-							
-				break;	
-									
-				case WaitingForStopBits:
-					while ( DataAvailable && bitcounter >0 )
-						{
-						bit = get_next_bit();
-						if ( DataAvailable )		// We've got a bit
-							{
-								bitcounter --;
-								if  (!bit)		// Framing Error
-									{
-                  if((!Squelch || (Squelch && ( (unsigned int)(100.*ave1)>Threshold))))
-                    {
-                      emit newSymbol('<');
-                      emit newSymbol('F');
-                      emit newSymbol('>');
-                     }
-      						Status = CollectingByte;   // Lets try whether this was already the start bit
-///									Status = WaitingForMark;
-									bitcounter=NumberOfBits;
-									c=0;
-									if ( (Frequencykor != 0) && UseAfc && (ave1 > 0.35))
-									{
-										emit rxFrequencyChanged( RxFrequency + Frequencykor);
-                    setRxFrequency ( RxFrequency + Frequencykor);
-										Frequencykor =0;
-									}
-			            break;
-									}
-								else
-							{
-										
-								c=0;
-///								Status=WaitingForSpace;
-								Status=WaitingForMark;
-
-								if ( ( Frequencykor != 0) && UseAfc && ( ave1 >0.35 ))
-									{
-										emit rxFrequencyChanged( RxFrequency + Frequencykor);
-                    setRxFrequency ( RxFrequency + Frequencykor);
-										Frequencykor =0;
-                  }
-								break;
-							}	
-
-							}
-						}
-				
-				break;
-				
-				case ThrowHalfBit:
-					while ( DataAvailable && --bitcounter > 0)
-						ProcessNextSample();
-					if ( bitcounter == 0 )
-						Status = WaitingForMark;
-				break;			
-						
-		}	// End switch	
-	}	// End While
-}
-
-int RTTYDemodulator::ProcessNextSample()
-{
-float x;
-float z[NumberofTones];
-int i,index;
-if ( actSample<NxSamples )
-	{
-	DataAvailable = true;
-	x= (float) data[actSample];
-	actSample++;
-  slfft(x);
-	for (i=0;i < NumberofTones; i++)
-		z[i] = abs(bins[i]);
-
-index=0;
-x= z[0];
-for (i=1;i <NumberofTones;i++)
-	{
-	if (z[i]> x)
-		{
-			index = i;
-			x = z[i];
-		}
-	}
-	if ( index > 3)
-		return 1;
-	else
-		return -1;
-	}
-else
-	DataAvailable = false;
-	
-return 0;		
-}
-
-
-
-bool RTTYDemodulator::get_next_bit()
-{
-
-int x;
-float z[NumberofTones],y;
-int i, index;
-
-/*while (DataAvailable)
-	{
- 	if (count != SymbolLength )
-			{
-				if ( actSample<NxSamples )
-				{
-					z= (float) data[actSample];
-					count++;
-					actSample++;
-  				slfft(z);
-				}
-				else
-					DataAvailable = false;
-				x = 0;
-			}
-	else
-		{
-			x = ProcessNextSample();
-			CalcQuality();
-      reset();
-			break;
-  	}
-	}*/
-while (DataAvailable)
-	{
-	if ( actSample < NxSamples)
-		{
-			y= (float) data[actSample];
-			count++;
-			actSample++;
-			slfft(y);
-			if ( count == SymbolLength)
-				{
-					if (UseAfc)
-						{
-							for (i=0;i < NumberofTones; i++)
-								z[i] = abs(bins[i]);
-
-							index=0;
-							y	= z[0];
-							for (i=1;i <NumberofTones;i++)
-								{
-									if (z[i]> y)
-									{
-										index = i;
-										y = z[i];
-									}
-								}
-							if ( z[1] > z[5] )
-								x = -1;
-							else
-								x =1;
-							switch (index)
-								{
-									//case 1:       // Frequency is ok
-									//case 5:
-									//	break;     Handled by default
-									case 0:				// Frequency is too high
-									case 4:
-										Frequencykor -= 1;
-										break;
-									case 2: 			// Frequency is too low
-									case 6:
-										Frequencykor += 1;
-										break;
-									default:
-										break;
-								}	
-									
-						}
-					else
-						if ( abs(bins[1]) > abs(bins[5]) )
-							x= -1;
-						else
-							x =1;
-          CalcQuality();
-					reset();
-					break;
-				}
-		}
-	 else
-		{
-			DataAvailable = false;
-			x = 0;
-		}
-	}
-return ( (x > 0 ) ? true : false) ;	
-}
-
-void RTTYDemodulator::slfft(float x)
-{
-float old;
-
-///old = x - history[ptr];
-old = history[ptr];
-
-history[ptr] = x;
-ptr = (ptr +1) % SymbolLength;
-
-for (int i=0; i <NumberofTones;i++)
-  	bins[i] = bins[i]*twiddles[FrequencyNumber[i]] +x - old;
-	
-}
-
-void RTTYDemodulator::setRxFrequency(double freq)
-{
-int i;
-if ( freq != RxFrequency)
-	{
-		RxFrequency=freq;
-		for(i=0; i < NumberofTones; i++)
-			bins[i]=complex<float>(0.0,0.0);
-
-		FrequencyNumber[1]= (int) (((RxFrequency*SymbolLength)/SampleRate)+0.5);
-		FrequencyNumber[0] = FrequencyNumber[1] - 1;
-		FrequencyNumber[2] = FrequencyNumber[1] + 1;
-		FrequencyNumber[3] = FrequencyNumber[2] + 1;
-		FrequencyNumber[5]= (int) ((((RxFrequency+170) *SymbolLength)/SampleRate)+0.5);
-		FrequencyNumber[4] = FrequencyNumber[5] - 1;
-		FrequencyNumber[6] = FrequencyNumber[5] + 1;
-   }
-}
-
-void RTTYDemodulator::CalcQuality()
-{
-ave2=ave1;
-float sum,diff;
-sum=abs(bins[1])+abs(bins[5]);
-diff=abs( abs(bins[1])-abs(bins[5]));
-//ave1=0.8*ave1 + 0.2 * abs(y0-y1)/(y0+y1);
-if ( sum > 0.5 )
-	ave1=0.7*ave1 + 0.25 * ave2 + 0.05 * diff/sum;
-else
-	ave1 = 0.5*ave1 + 0.3 *ave2;
-}
-
-int RTTYDemodulator::getSquelchValue()
-{
-return (int)(100.*ave1);
-}
-
-
-
-
-void RTTYDemodulator::reset()
-{
-int i;
-
-for(i=0;i<NumberofTones;i++)
-			bins[i]=complex<float> (0.0,0.0);
-for(i=0;(unsigned int) i < SymbolLength; i++)	
-			history[i]=0.;
-count =0;
-x1=0;
-
-}
diff --git a/linpsk/rttydemodulator.h b/linpsk/rttydemodulator.h
deleted file mode 100644
index 2180718..0000000
--- a/linpsk/rttydemodulator.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/***************************************************************************
-                          rttydemodulator.h  -  description
-                             -------------------
-    begin                : Mon Jun 4 2001
-    copyright            : (C) 2001 by Volker Schroer
-    email                : dl1ksv at gmx.de
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   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  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- ***************************************************************************/
-
-#ifndef RTTYDEMODULATOR_H
-#define RTTYDEMODULATOR_H
-
-#include <cdemodulator.h>
-#include <complex>
-
-using namespace std;
-/**Decodes RTTY 
-  *@author Volker Schroer
-  */
-enum StateOfReception { WaitingForMark,WaitingForSpace, CheckingStartBit,SkipRestOfStartBit,CollectingByte,
-												 CheckingParity, WaitingForStopBits,ThrowHalfBit};
-/** Number of tones used in fsk (2 for Rtty) but we use 7 for doing some afc */
-
-//#define  NumberofTones 7
-
-class RTTYDemodulator : public CDemodulator  {
-public: 
-	RTTYDemodulator();
-	~RTTYDemodulator();
-
-	/** Prozess the input */
-	void ProcessInput(double * input);
-  int getSquelchValue();
-	bool Init(double,int);
-	
-public slots: // Public slots
-/** Set RxFrequencies for RTTY */
-void setRxFrequency(double);
-
-private: 	//Private Variables
-
-int NumberofTones;
-/** coeficients for slidding fft */
-complex<float> *twiddles;
-
-/** result of slidding fft for the different tones */
-complex<float> *bins;
-/** history of sampled values for fft */
-float *history;
-/** Mapping of Frequency to integer number (index) */
-int *FrequencyNumber;
-
-/** Number of samples to process */
-int NxSamples;
-/** Actuell Sample , just to be processed */
-int actSample;
-/** Adress of data */
-double *data;
-
-/** SampleRate */
-double SampleRate;
-
-/** Status of Shift */
-bool ShiftOn;
-
-/** Baudrate */
-int Baudrate;
-/** Number of Stopbits */
-
-unsigned int NumberOfStopBits;
-
-/** Parity
-	0 none
-	1 even
-	2 odd	*/
-unsigned int parity;
-/** Samples per bit */
-unsigned int SamplesPerBit;
-/** Number of Bits per Character */
-unsigned int NumberOfBits;
-
-bool DataAvailable;
-
-/** Status of reception*/
-StateOfReception Status;
-
-/** Pointer to history */
-int ptr;
-
-/** Look at FSKDemodulator **/
-unsigned int SymbolLength;
-
-/** Counts the number of bits in act. Character ( for parity) */
-unsigned int BitsInData;
-/** Number of Bits to be processed */
-int bitcounter ;
-/** Bitpattern of actual processed byte */
-int c;
-/** has detected Frequency changed ? */
-bool FrequencyChanged;
-/** How to correct the Rxfrequency */
-int Frequencykor;
-/** previous sample */
-int x1;
-/** Sample position in bit */
-unsigned int count ;
-/** Variables for Squelch computing */
-float ave1,ave2;
-
-
-private: // Private methods
-  /** returns the asci char coresponding to the baudot code */
-  char baudot_code(char);
-  /** Processes the next sample */
-  int ProcessNextSample();
-  /** gets the next bit */
-  bool get_next_bit();
-	/** Sliding fft */
-	void slfft(float);
-	/** Calc the quality of the signal for squelch */
-	void CalcQuality();
-	/** Reset the values of sliding of fft */
-	void reset();
-};
-
-#endif
diff --git a/linpsk/utils.cpp b/linpsk/utils.cpp
deleted file mode 100644
index 906c4bc..0000000
--- a/linpsk/utils.cpp
+++ /dev/null
@@ -1,80 +0,0 @@
-/***************************************************************************
-                          utils.cpp  -  description
-                             -------------------
-    begin                : Fri Apr 18 2003
-    copyright            : (C) 2000 by Volker Schroer
-    email                : DL1KSV at gmx.de
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   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  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *    based on the work of  Moe Wheatly, AE4JY                             *
- ***************************************************************************/
-
-#include "utils.h"
-#ifndef LINPSK_FOR_MAC
-#include <linux/serial.h>
-#include <sys/soundcard.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <sys/ioctl.h>
-#endif
-
-void setVolume(int Device,int Volume)
-{
-#ifndef LINPSK_FOR_MAC
-int fd;
-int ii;
-
-fd=open("/dev/mixer",O_RDWR);
-if  (fd >0)
-	{
-    ii=(1 << Device);
-  	ioctl(fd,MIXER_WRITE(SOUND_MIXER_RECSRC),&ii);
-		ii = Volume & 0x7f;
-		ioctl(fd,MIXER_WRITE(Device),&ii);
-		close(fd);
-	}
-#endif
-}
-void setOutputVolume(int Level)
-{
-#ifndef LINPSK_FOR_MAC
-setVolume(MIXER_WRITE(SOUND_MIXER_VOLUME),Level);
-#endif
-}
-
-bool checkcom(const char* s)
-{
-
-#ifdef LINPSK_FOR_MAC
-return false;
-#else
-int fd;
-
-struct serial_struct serinfo;
-
-
-fd=open(s,O_RDWR|O_NONBLOCK);
-
-if (fd <0)
-
-return false;
-
-serinfo.reserved_char[0] = 0;
-if (ioctl(fd, TIOCGSERIAL, &serinfo) < 0)
-	{
-	close(fd);
-	return false;
-	}
-close(fd);
-if ( serinfo.type == 5 || serinfo.type ==0 )
-return false;
-else
-return true;
-#endif
-}
diff --git a/linpsk/utils.h b/linpsk/utils.h
deleted file mode 100644
index 6378de7..0000000
--- a/linpsk/utils.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/***************************************************************************
-                          utils.h  -  description
-                             -------------------
-    begin                : Fri Apr 18 2003
-    copyright            : (C) 2003 by Volker Schroer, DL1KSV
-    email                : DL1KSV at gmx.de
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   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  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *   based on the work of Moe Wheatley, AE4JY                              *
- ***************************************************************************/
-#ifndef UTILS_H
-#define UTILS_H
-void setVolume(int Device,int Volume);
-/** Set Output Level **/
-void setOutputVolume(int);
-bool checkcom(const char* s);
-
-#endif
diff --git a/linpsk/waveinput.cpp b/linpsk/waveinput.cpp
deleted file mode 100644
index df1f2df..0000000
--- a/linpsk/waveinput.cpp
+++ /dev/null
@@ -1,156 +0,0 @@
-/***************************************************************************
-                          waveinput.cpp  -  description
-                             -------------------
-    begin                : Sat May 5 2001
-    copyright            : (C) 2001 by Volker Schroer
-    email                : DL1KSV at gmx.de
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   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  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- ***************************************************************************/
-
-#include "waveinput.h"
-
-WaveInput::WaveInput(int ptt = -1): Input(ptt)
-{
-}
-WaveInput::~WaveInput(){
-}
-
-/** Opens the Device for writting, for Wavefiles this means write nothing ! */
-bool WaveInput::open_Device_write(QString)
-{
-return true;
-}
-
-/** puts the Samples onto the Device, for a Wavemode Device nothing happens */
-int WaveInput::putSamples(double *,int anzahl)
-{
-return anzahl;
-}
-	
-/** Dummy */
-void WaveInput::PTT(bool )
-{
-}
-/** Dummy */
-bool WaveInput::setParams(QString *)
-{
-return true;
-}
-
- /** Opens the Device named Device for reading */
-
-bool WaveInput::open_Device_read(QString Device)
-{
-char header[5];
-char c;
-QString s;
-int i;
-fd = open(Device,O_RDONLY);
-if (fd < 0)
-	return false;
-// Check for RIFF
-i =read(fd,&header[0],4*sizeof(header[0]));
-if ( i != 4)
-	{
-		close(fd);
-		qWarning("Header mismatch\n");
-		return false;
-	}
-header[4]=0;	
-s=QString(header);
-
-if  ( s != "RIFF")
-	{
-		close(fd);
-		qWarning(Device + " is not a RIFF File\n");
-		return false;
-	}
-//Check for Wave
-lseek(fd,8,SEEK_SET);
-
-i =read(fd,&header[0],4*sizeof(header[0]));
-header[4]=0;
-if ( i != 4)
-	{
-		close(fd);
-		qWarning("SubType mismatch\n");
-		return false;
-	}
-s=QString(header);
-
-if  ( s != "WAVE")
-	{
-		close(fd);
-		qWarning(Device + " is not a WAVE File\n");
-		return false;
-	}
-// Now find data
-
-i=read(fd,&header[0],4*sizeof(header[0]));
-if ( i != 4)		
-	{
-		close(fd);
-			qWarning("No data found\n");
-	return false;
-	}
-header[5]=0;
-
-s=QString(header);
-while( ( s != "data" ) && (i > 0) )
-	{
-		i = read (fd,&c,1);
-		s.remove(0,1); 	// remove first character
-		s += c;					// append new one
-	}		
-if ( s == "data")
-	{		// got it
-		offset = lseek(fd,4,SEEK_CUR);		
-		lseek(fd,offset,SEEK_SET); //Remove 4 bytes length info
-		return true;
-	}
-else
-	{								//no data found
-		close(fd);
-			qWarning("No data found\n");
-	return false;
-	}
-	
-}
-
-int WaveInput::getSamples(double *sample,int anzahl)
-{
-unsigned char c[2];
-int i,j;
-j=0;
-double x;
-while (j<anzahl)
- {
-
-  i= read(fd,&c[0],2*sizeof(c[0]));
-  if (i == 2)
-  	{
-			if ( c[1] < 128 )
-			i =  c[0]+ c[1]* 256 ;
-			else
-			i = ( c[1]- 256) *256 +c[0];
-  		x= i;
-			*(sample++)= x/8.;
-			
-			j++;
-		}		
-   else
-
-		
-    lseek(fd,offset,SEEK_SET);
-		
- } // End while
-return j;
-
-}
diff --git a/admin/ltmain.sh b/ltmain.sh
similarity index 71%
rename from admin/ltmain.sh
rename to ltmain.sh
index f2a88ef..21c53a6 100644
--- a/admin/ltmain.sh
+++ b/ltmain.sh
@@ -1,7 +1,7 @@
 # ltmain.sh - Provide generalized library-building support services.
 # NOTE: Changing this file will not affect anything until you rerun configure.
 #
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
 # Free Software Foundation, Inc.
 # Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
 #
@@ -24,6 +24,37 @@
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 
+basename="s,^.*/,,g"
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+# define SED for historic ltconfig's generated by Libtool 1.3
+test -z "$SED" && SED=sed
+
+# The name of this program:
+progname=`echo "$progpath" | $SED $basename`
+modename="$progname"
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION=1.5.10
+TIMESTAMP=" (1.1220.2.131 2004/09/19 12:46:56)"
+
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes.
+if test -n "${ZSH_VERSION+set}" ; then
+  setopt NO_GLOB_SUBST
+fi
+
 # Check that we have a working $echo.
 if test "X$1" = X--no-reexec; then
   # Discard the --no-reexec flag, and continue.
@@ -36,7 +67,7 @@ elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
   :
 else
   # Restart under the correct shell, and then maybe $echo will work.
-  exec $SHELL "$0" --no-reexec ${1+"$@"}
+  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
 fi
 
 if test "X$1" = X--fallback-echo; then
@@ -45,19 +76,9 @@ if test "X$1" = X--fallback-echo; then
   cat <<EOF
 $*
 EOF
-  exit 0
+  exit $EXIT_SUCCESS
 fi
 
-# The name of this program.
-progname=`$echo "$0" | ${SED} 's%^.*/%%'`
-modename="$progname"
-
-# Constants.
-PROGRAM=ltmain.sh
-PACKAGE=libtool
-VERSION=1.4e
-TIMESTAMP=" (1.1090 2002/02/07 19:54:36)"
-
 default_mode=
 help="Try \`$progname --help' for more information."
 magic="%%%MAGIC variable%%%"
@@ -69,8 +90,17 @@ rm="rm -f"
 # metacharacters that are still active within double-quoted strings.
 Xsed="${SED}"' -e 1s/^X//'
 sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
-SP2NL='tr \040 \012'
-NL2SP='tr \015\012 \040\040'
+# test EBCDIC or ASCII
+case `echo A|tr A '\301'` in
+ A) # EBCDIC based system
+  SP2NL="tr '\100' '\n'"
+  NL2SP="tr '\r\n' '\100\100'"
+  ;;
+ *) # Assume ASCII based system
+  SP2NL="tr '\040' '\012'"
+  NL2SP="tr '\015\012' '\040\040'"
+  ;;
+esac
 
 # NLS nuisances.
 # Only set LANG and LC_ALL to C if already set.
@@ -85,12 +115,13 @@ if test "${LANG+set}" = set; then
 fi
 
 # Make sure IFS has a sensible default
-: ${IFS=" 	"}
+: ${IFS=" 	
+"}
 
 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
-  echo "$modename: not configured to build any kind of library" 1>&2
-  echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
-  exit 1
+  $echo "$modename: not configured to build any kind of library" 1>&2
+  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
+  exit $EXIT_FAILURE
 fi
 
 # Global variables.
@@ -105,6 +136,268 @@ execute_dlfiles=
 lo2o="s/\\.lo\$/.${objext}/"
 o2lo="s/\\.${objext}\$/.lo/"
 
+if test -z "$max_cmd_len"; then
+  i=0
+  testring="ABCD"
+  new_result=
+  
+  # If test is not a shell built-in, we'll probably end up computing a
+  # maximum length that is only half of the actual maximum length, but
+  # we can't tell.
+  while (test "X"`$SHELL $0 --fallback-echo "X$testring" 2>/dev/null` \
+             = "XX$testring") >/dev/null 2>&1 &&
+          new_result=`expr "X$testring" : ".*" 2>&1` &&
+          max_cmd_len="$new_result" &&
+          test "$i" != 17 # 1/2 MB should be enough
+  do
+    i=`expr $i + 1`
+    testring="$testring$testring"
+  done
+  testring=
+  # Add a significant safety factor because C++ compilers can tack on massive
+  # amounts of additional arguments before passing them to the linker.
+  # It appears as though 1/2 is a usable value.
+  max_cmd_len=`expr $max_cmd_len \/ 2`
+fi
+
+#####################################
+# Shell function definitions:
+# This seems to be the best place for them
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+func_win32_libid () {
+  win32_libid_type="unknown"
+  win32_fileres=`file -L $1 2>/dev/null`
+  case $win32_fileres in
+  *ar\ archive\ import\ library*) # definitely import
+    win32_libid_type="x86 archive import"
+    ;;
+  *ar\ archive*) # could be an import, or static
+    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
+      $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
+      win32_nmres=`eval $NM -f posix -A $1 | \
+	sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
+      if test "X$win32_nmres" = "Ximport" ; then
+        win32_libid_type="x86 archive import"
+      else
+        win32_libid_type="x86 archive static"
+      fi
+    fi
+    ;;
+  *DLL*)
+    win32_libid_type="x86 DLL"
+    ;;
+  *executable*) # but shell scripts are "executable" too...
+    case $win32_fileres in
+    *MS\ Windows\ PE\ Intel*)
+      win32_libid_type="x86 DLL"
+      ;;
+    esac
+    ;;
+  esac
+  $echo $win32_libid_type
+}
+
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag () {
+    if test -n "$available_tags" && test -z "$tagname"; then
+      CC_quoted=
+      for arg in $CC; do
+	case $arg in
+	  *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	  arg="\"$arg\""
+	  ;;
+	esac
+	CC_quoted="$CC_quoted $arg"
+      done
+      case $@ in
+      # Blanks in the command may have been stripped by the calling shell,
+      # but not from the CC environment variable when configure was run.
+      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
+      # Blanks at the start of $base_compile will cause this to fail
+      # if we don't check for them as well.
+      *)
+	for z in $available_tags; do
+	  if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+	    # Evaluate the configuration.
+	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+	    CC_quoted=
+	    for arg in $CC; do
+	    # Double-quote args containing other shell metacharacters.
+	    case $arg in
+	      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	      arg="\"$arg\""
+	      ;;
+	    esac
+	    CC_quoted="$CC_quoted $arg"
+	  done
+	    # user sometimes does CC=<HOST>-gcc so we need to match that to 'gcc'
+	    trimedcc=`echo ${CC} | $SED -e "s/${host}-//g"`
+	    # and sometimes libtool has CC=<HOST>-gcc but user does CC=gcc
+	    extendcc=${host}-${CC}
+	    case "$@ " in
+	      "gcc "* | " gcc "* | "${host}-gcc "* | " ${host}-gcc "*)
+	      tagname=CC
+	      break ;;
+	      "$trimedcc "* | " $trimedcc "* | "`$echo $trimedcc` "* | " `$echo $trimedcc` "*|\
+	      "$extendcc "* | " $extendcc "* | "`$echo $extendcc` "* | " `$echo $extendcc` "*|\
+	      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
+	      # The compiler in the base compile command matches
+	      # the one in the tagged configuration.
+	      # Assume this is the tagged configuration we want.
+	      tagname=$z
+	      break
+	      ;;
+	    esac
+	  fi
+	done
+	# If $tagname still isn't set, then no tagged configuration
+	# was found and let the user know that the "--tag" command
+	# line option must be used.
+	if test -z "$tagname"; then
+	  $echo "$modename: unable to infer tagged configuration"
+	  $echo "$modename: specify a tag with \`--tag'" 1>&2
+	  exit $EXIT_FAILURE
+#        else
+#          $echo "$modename: using $tagname tagged configuration"
+	fi
+	;;
+      esac
+    fi
+}
+
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives () {
+    my_gentop="$1"; shift
+    my_oldlibs=${1+"$@"}
+    my_oldobjs=""
+    my_xlib=""
+    my_xabs=""
+    my_xdir=""
+    my_status=""
+
+    $show "${rm}r $my_gentop"
+    $run ${rm}r "$my_gentop"
+    $show "$mkdir $my_gentop"
+    $run $mkdir "$my_gentop"
+    my_status=$?
+    if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
+      exit $my_status
+    fi
+
+    for my_xlib in $my_oldlibs; do
+      # Extract the objects.
+      case $my_xlib in
+	[\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+	*) my_xabs=`pwd`"/$my_xlib" ;;
+      esac
+      my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
+      my_xdir="$my_gentop/$my_xlib"
+
+      $show "${rm}r $my_xdir"
+      $run ${rm}r "$my_xdir"
+      $show "$mkdir $my_xdir"
+      $run $mkdir "$my_xdir"
+      status=$?
+      if test "$status" -ne 0 && test ! -d "$my_xdir"; then
+	exit $status
+      fi
+      case $host in
+      *-darwin*)
+	$show "Extracting $my_xabs"
+	# Do not bother doing anything if just a dry run
+	if test -z "$run"; then
+	  darwin_orig_dir=`pwd`
+	  cd $my_xdir || exit $?
+	  darwin_archive=$my_xabs
+	  darwin_curdir=`pwd`
+	  darwin_base_archive=`basename $darwin_archive`
+	  darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
+	  if test -n "$darwin_arches"; then 
+	    darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
+	    darwin_arch=
+	    $show "$darwin_base_archive has multiple architectures $darwin_arches"
+	    for darwin_arch in  $darwin_arches ; do
+	      mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+	      lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+	      # Remove the table of contents from the thin files.
+	      $AR -d "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" __.SYMDEF 2>/dev/null || true
+	      $AR -d "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" __.SYMDEF\ SORTED 2>/dev/null || true
+	      cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+	      $AR -xo "${darwin_base_archive}"
+	      rm "${darwin_base_archive}"
+	      cd "$darwin_curdir"
+	    done # $darwin_arches
+      ## Okay now we have a bunch of thin objects, gotta fatten them up :)
+	    darwin_filelist=`find unfat-$$ -type f | xargs basename | sort -u | $NL2SP`
+	    darwin_file=
+	    darwin_files=
+	    for darwin_file in $darwin_filelist; do
+	      darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
+	      lipo -create -output "$darwin_file" $darwin_files
+	    done # $darwin_filelist
+	    rm -rf unfat-$$
+	    cd "$darwin_orig_dir"
+	  else
+	    cd $darwin_orig_dir
+	    (cd $my_xdir && $AR x $my_xabs) || exit $?
+	  fi # $darwin_arches
+	fi # $run
+      ;;
+      *)
+	# We will extract separately just the conflicting names and we will
+	# no longer touch any unique names. It is faster to leave these
+	# extract automatically by $AR in one run.
+	$show "(cd $my_xdir && $AR x $my_xabs)"
+	$run eval "(cd \$my_xdir && $AR x \$my_xabs)" || exit $?
+	if ($AR t "$my_xabs" | sort | sort -uc >/dev/null 2>&1); then
+	  :
+	else
+	  $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
+	  $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
+	  $AR t "$my_xabs" | sort | uniq -cd | while read -r count name
+	  do
+	    i=1
+	    while test "$i" -le "$count"
+	    do
+	      # Put our $i before any first dot (extension)
+	      # Never overwrite any file
+	      name_to="$name"
+	      while test "X$name_to" = "X$name" || test -f "$my_xdir/$name_to"
+	      do
+		name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
+	      done
+	      $show "(cd $my_xdir && $AR xN $i $my_xabs '$name' && $mv '$name' '$name_to')"
+	      $run eval "(cd \$my_xdir && $AR xN $i \$my_xabs '$name' && $mv '$name' '$name_to')" || exit $?
+	      i=`expr $i + 1`
+	    done
+	  done
+	fi
+	;;
+      esac
+      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+    done
+
+    func_extract_archives_result="$my_oldobjs"
+}
+# End of Shell function definitions
+#####################################
+
+# Darwin sucks
+eval std_shrext=\"$shrext_cmds\"
+
 # Parse our command line options once, thoroughly.
 while test "$#" -gt 0
 do
@@ -124,12 +417,13 @@ do
       ;;
     tag)
       tagname="$arg"
+      preserve_args="${preserve_args}=$arg"
 
       # Check whether tagname contains only valid characters
       case $tagname in
       *[!-_A-Za-z0-9,/]*)
-	echo "$progname: invalid tag name: $tagname" 1>&2
-	exit 1
+	$echo "$progname: invalid tag name: $tagname" 1>&2
+	exit $EXIT_FAILURE
 	;;
       esac
 
@@ -139,12 +433,12 @@ do
 	# not specially marked.
 	;;
       *)
-	if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then
+	if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
 	  taglist="$taglist $tagname"
 	  # Evaluate the configuration.
-	  eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`"
+	  eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
 	else
-	  echo "$progname: ignoring unknown tag $tagname" 1>&2
+	  $echo "$progname: ignoring unknown tag $tagname" 1>&2
 	fi
 	;;
       esac
@@ -166,27 +460,27 @@ do
     ;;
 
   --version)
-    echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
-    echo
-    echo "Copyright 1996, 1997, 1998, 1999, 2000, 2001"
-    echo "Free Software Foundation, Inc."
-    echo "This is free software; see the source for copying conditions.  There is NO"
-    echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-    exit 0
+    $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
+    $echo
+    $echo "Copyright (C) 2003  Free Software Foundation, Inc."
+    $echo "This is free software; see the source for copying conditions.  There is NO"
+    $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+    exit $EXIT_SUCCESS
     ;;
 
   --config)
-    ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
+    ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
     # Now print the configurations for the tags.
     for tagname in $taglist; do
-      ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$0"
+      ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
     done
-    exit 0
+    exit $EXIT_SUCCESS
     ;;
 
   --debug)
-    echo "$progname: enabling shell trace mode"
+    $echo "$progname: enabling shell trace mode"
     set -x
+    preserve_args="$preserve_args $arg"
     ;;
 
   --dry-run | -n)
@@ -194,18 +488,18 @@ do
     ;;
 
   --features)
-    echo "host: $host"
+    $echo "host: $host"
     if test "$build_libtool_libs" = yes; then
-      echo "enable shared libraries"
+      $echo "enable shared libraries"
     else
-      echo "disable shared libraries"
+      $echo "disable shared libraries"
     fi
     if test "$build_old_libs" = yes; then
-      echo "enable static libraries"
+      $echo "enable static libraries"
     else
-      echo "disable static libraries"
+      $echo "disable static libraries"
     fi
-    exit 0
+    exit $EXIT_SUCCESS
     ;;
 
   --finish) mode="finish" ;;
@@ -217,6 +511,7 @@ do
 
   --quiet | --silent)
     show=:
+    preserve_args="$preserve_args $arg"
     ;;
 
   --tag) prevopt="--tag" prev=tag ;;
@@ -224,6 +519,7 @@ do
     set tag "$optarg" ${1+"$@"}
     shift
     prev=tag
+    preserve_args="$preserve_args --tag"
     ;;
 
   -dlopen)
@@ -234,7 +530,7 @@ do
   -*)
     $echo "$modename: unrecognized option \`$arg'" 1>&2
     $echo "$help" 1>&2
-    exit 1
+    exit $EXIT_FAILURE
     ;;
 
   *)
@@ -247,7 +543,7 @@ done
 if test -n "$prevopt"; then
   $echo "$modename: option \`$prevopt' requires an argument" 1>&2
   $echo "$help" 1>&2
-  exit 1
+  exit $EXIT_FAILURE
 fi
 
 # If this variable is set in any of the actions, the command in it
@@ -259,8 +555,10 @@ if test -z "$show_help"; then
 
   # Infer the operation mode.
   if test -z "$mode"; then
+    $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
+    $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2
     case $nonopt in
-    *cc | *++ | gcc* | *-gcc*)
+    *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
       mode=link
       for arg
       do
@@ -301,7 +599,7 @@ if test -z "$show_help"; then
   if test -n "$execute_dlfiles" && test "$mode" != execute; then
     $echo "$modename: unrecognized option \`-dlopen'" 1>&2
     $echo "$help" 1>&2
-    exit 1
+    exit $EXIT_FAILURE
   fi
 
   # Change the help message to a mode-specific one.
@@ -315,152 +613,118 @@ if test -z "$show_help"; then
     modename="$modename: compile"
     # Get the compilation command and the source file.
     base_compile=
-    prev=
-    lastarg=
-    srcfile="$nonopt"
+    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
+    suppress_opt=yes
     suppress_output=
+    arg_mode=normal
+    libobj=
+    later=
 
-    user_target=no
     for arg
     do
-      case $prev in
-      "") ;;
-      xcompiler)
-	# Aesthetically quote the previous argument.
-	prev=
-	lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-
-	case $arg in
-	# Double-quote args containing other shell metacharacters.
-	# Many Bourne shells cannot handle close brackets correctly
-	# in scan sets, so we specify it separately.
-	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	  arg="\"$arg\""
-	  ;;
-	esac
+      case "$arg_mode" in
+      arg  )
+	# do not "continue".  Instead, add this to base_compile
+	lastarg="$arg"
+	arg_mode=normal
+	;;
 
-	# Add the previous argument to base_compile.
-	if test -z "$base_compile"; then
-	  base_compile="$lastarg"
-	else
-	  base_compile="$base_compile $lastarg"
-	fi
+      target )
+	libobj="$arg"
+	arg_mode=normal
 	continue
 	;;
-      esac
 
-      # Accept any command-line options.
-      case $arg in
-      -o)
-	if test "$user_target" != "no"; then
-	  $echo "$modename: you cannot specify \`-o' more than once" 1>&2
-	  exit 1
-	fi
-	user_target=next
-	;;
+      normal )
+	# Accept any command-line options.
+	case $arg in
+	-o)
+	  if test -n "$libobj" ; then
+	    $echo "$modename: you cannot specify \`-o' more than once" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	  arg_mode=target
+	  continue
+	  ;;
 
-      -static)
-	build_old_libs=yes
-	continue
-	;;
+	-static | -prefer-pic | -prefer-non-pic)
+	  later="$later $arg"
+	  continue
+	  ;;
 
-      -prefer-pic)
-	pic_mode=yes
-	continue
-	;;
+	-no-suppress)
+	  suppress_opt=no
+	  continue
+	  ;;
 
-      -prefer-non-pic)
-	pic_mode=no
-	continue
-	;;
+	-Xcompiler)
+	  arg_mode=arg  #  the next one goes into the "base_compile" arg list
+	  continue      #  The current "srcfile" will either be retained or
+	  ;;            #  replaced later.  I would guess that would be a bug.
 
-      -Xcompiler)
-	prev=xcompiler
-	continue
-	;;
+	-Wc,*)
+	  args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
+	  lastarg=
+	  save_ifs="$IFS"; IFS=','
+ 	  for arg in $args; do
+	    IFS="$save_ifs"
 
-      -Wc,*)
-	args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
-	lastarg=
-	save_ifs="$IFS"; IFS=','
-	for arg in $args; do
+	    # Double-quote args containing other shell metacharacters.
+	    # Many Bourne shells cannot handle close brackets correctly
+	    # in scan sets, so we specify it separately.
+	    case $arg in
+	      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	      arg="\"$arg\""
+	      ;;
+	    esac
+	    lastarg="$lastarg $arg"
+	  done
 	  IFS="$save_ifs"
+	  lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
 
-	  # Double-quote args containing other shell metacharacters.
-	  # Many Bourne shells cannot handle close brackets correctly
-	  # in scan sets, so we specify it separately.
-	  case $arg in
-	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	    arg="\"$arg\""
-	    ;;
-	  esac
-	  lastarg="$lastarg $arg"
-	done
-	IFS="$save_ifs"
-	lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
-
-	# Add the arguments to base_compile.
-	if test -z "$base_compile"; then
-	  base_compile="$lastarg"
-	else
+	  # Add the arguments to base_compile.
 	  base_compile="$base_compile $lastarg"
-	fi
-	continue
-	;;
-      esac
+	  continue
+	  ;;
 
-      case $user_target in
-      next)
-	# The next one is the -o target name
-	user_target=yes
-	continue
-	;;
-      yes)
-	# We got the output file
-	user_target=set
-	libobj="$arg"
-	continue
+	* )
+	  # Accept the current argument as the source file.
+	  # The previous "srcfile" becomes the current argument.
+	  #
+	  lastarg="$srcfile"
+	  srcfile="$arg"
+	  ;;
+	esac  #  case $arg
 	;;
-      esac
-
-      # Accept the current argument as the source file.
-      lastarg="$srcfile"
-      srcfile="$arg"
+      esac    #  case $arg_mode
 
       # Aesthetically quote the previous argument.
-
-      # Backslashify any backslashes, double quotes, and dollar signs.
-      # These are the only characters that are still specially
-      # interpreted inside of double-quoted scrings.
       lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
 
+      case $lastarg in
       # Double-quote args containing other shell metacharacters.
       # Many Bourne shells cannot handle close brackets correctly
       # in scan sets, so we specify it separately.
-      case $lastarg in
       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
 	lastarg="\"$lastarg\""
 	;;
       esac
 
-      # Add the previous argument to base_compile.
-      if test -z "$base_compile"; then
-	base_compile="$lastarg"
-      else
-	base_compile="$base_compile $lastarg"
-      fi
-    done
+      base_compile="$base_compile $lastarg"
+    done # for arg
 
-    case $user_target in
-    set)
+    case $arg_mode in
+    arg)
+      $echo "$modename: you must specify an argument for -Xcompile"
+      exit $EXIT_FAILURE
       ;;
-    no)
-      # Get the name of the library object.
-      libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
+    target)
+      $echo "$modename: you must specify a target with \`-o'" 1>&2
+      exit $EXIT_FAILURE
       ;;
     *)
-      $echo "$modename: you must specify a target with \`-o'" 1>&2
-      exit 1
+      # Get the name of the library object.
+      [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
       ;;
     esac
 
@@ -489,53 +753,30 @@ if test -z "$show_help"; then
     *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
     *)
       $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
-      exit 1
+      exit $EXIT_FAILURE
       ;;
     esac
 
-    # Infer tagged configuration to use if any are available and
-    # if one wasn't chosen via the "--tag" command line option.
-    # Only attempt this if the compiler in the base compile
-    # command doesn't match the default compiler.
-    if test -n "$available_tags" && test -z "$tagname"; then
-      case "$base_compile " in
-      "$CC "*) ;;
-      # Blanks in the command may have been stripped by the calling shell,
-      # but not from the CC environment variable when ltconfig was run.
-      "`$echo $CC` "*) ;;
-      *)
-	for z in $available_tags; do
-	  if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
-	    # Evaluate the configuration.
-	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
-	    case "$base_compile " in
-	    "$CC "*)
-	      # The compiler in the base compile command matches
-	      # the one in the tagged configuration.
-	      # Assume this is the tagged configuration we want.
-	      tagname=$z
-	      break
-	      ;;
-	    "`$echo $CC` "*)
-	      tagname=$z
-	      break
-	      ;;
-	    esac
-	  fi
-	done
-	# If $tagname still isn't set, then no tagged configuration
-	# was found and let the user know that the "--tag" command
-	# line option must be used.
-	if test -z "$tagname"; then
-	  echo "$modename: unable to infer tagged configuration"
-	  echo "$modename: specify a tag with \`--tag'" 1>&2
-	  exit 1
-#        else
-#          echo "$modename: using $tagname tagged configuration"
-	fi
+    func_infer_tag $base_compile
+
+    for arg in $later; do
+      case $arg in
+      -static)
+	build_old_libs=yes
+	continue
+	;;
+
+      -prefer-pic)
+	pic_mode=yes
+	continue
+	;;
+
+      -prefer-non-pic)
+	pic_mode=no
+	continue
 	;;
       esac
-    fi
+    done
 
     objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
     xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
@@ -549,7 +790,7 @@ if test -z "$show_help"; then
     if test -z "$base_compile"; then
       $echo "$modename: you must specify a compilation command" 1>&2
       $echo "$help" 1>&2
-      exit 1
+      exit $EXIT_FAILURE
     fi
 
     # Delete any leftover library objects.
@@ -560,7 +801,7 @@ if test -z "$show_help"; then
     fi
 
     $run $rm $removelist
-    trap "$run $rm $removelist; exit 1" 1 2 15
+    trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
 
     # On Cygwin there's no "real" PIC flag so we must build both object types
     case $host_os in
@@ -579,7 +820,7 @@ if test -z "$show_help"; then
       output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
       lockfile="$output_obj.lock"
       removelist="$removelist $output_obj $lockfile"
-      trap "$run $rm $removelist; exit 1" 1 2 15
+      trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
     else
       output_obj=
       need_locks=no
@@ -589,13 +830,13 @@ if test -z "$show_help"; then
     # Lock this critical section if it is needed
     # We use this script file to make the link, it avoids creating a new file
     if test "$need_locks" = yes; then
-      until $run ln "$0" "$lockfile" 2>/dev/null; do
+      until $run ln "$srcfile" "$lockfile" 2>/dev/null; do
 	$show "Waiting for $lockfile to be removed"
 	sleep 2
       done
     elif test "$need_locks" = warn; then
       if test -f "$lockfile"; then
-	echo "\
+	$echo "\
 *** ERROR, $lockfile exists and contains:
 `cat $lockfile 2>/dev/null`
 
@@ -607,9 +848,9 @@ avoid parallel builds (make -j) in this platform, or get a better
 compiler."
 
 	$run $rm $removelist
-	exit 1
+	exit $EXIT_FAILURE
       fi
-      echo $srcfile > "$lockfile"
+      $echo $srcfile > "$lockfile"
     fi
 
     if test -n "$fix_srcfile_path"; then
@@ -662,12 +903,12 @@ EOF
       if $run eval "$command"; then :
       else
 	test -n "$output_obj" && $run $rm $removelist
-	exit 1
+	exit $EXIT_FAILURE
       fi
 
       if test "$need_locks" = warn &&
 	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
-	echo "\
+	$echo "\
 *** ERROR, $lockfile contains:
 `cat $lockfile 2>/dev/null`
 
@@ -682,7 +923,7 @@ avoid parallel builds (make -j) in this platform, or get a better
 compiler."
 
 	$run $rm $removelist
-	exit 1
+	exit $EXIT_FAILURE
       fi
 
       # Just move the object if needed, then go on to compile the next one
@@ -703,7 +944,9 @@ pic_object='$objdir/$objname'
 EOF
 
       # Allow error messages only from the first compilation.
-      suppress_output=' >/dev/null 2>&1'
+      if test "$suppress_opt" = yes; then
+        suppress_output=' >/dev/null 2>&1'
+      fi
     else
       # No PIC object so indicate it doesn't exist in the libtool
       # object file.
@@ -732,12 +975,12 @@ EOF
       if $run eval "$command"; then :
       else
 	$run $rm $removelist
-	exit 1
+	exit $EXIT_FAILURE
       fi
 
       if test "$need_locks" = warn &&
 	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
-	echo "\
+	$echo "\
 *** ERROR, $lockfile contains:
 `cat $lockfile 2>/dev/null`
 
@@ -752,7 +995,7 @@ avoid parallel builds (make -j) in this platform, or get a better
 compiler."
 
 	$run $rm $removelist
-	exit 1
+	exit $EXIT_FAILURE
       fi
 
       # Just move the object if needed
@@ -790,7 +1033,7 @@ EOF
       $run $rm "$lockfile"
     fi
 
-    exit 0
+    exit $EXIT_SUCCESS
     ;;
 
   # libtool link mode
@@ -801,7 +1044,7 @@ EOF
       # It is impossible to link a dll without this setting, and
       # we shouldn't force the makefile maintainer to figure out
       # which system we are compiling for in order to pass an extra
-      # flag for every libtool invokation.
+      # flag for every libtool invocation.
       # allow_undefined=no
 
       # FIXME: Unfortunately, there are problems with the above when trying
@@ -816,7 +1059,7 @@ EOF
       ;;
     esac
     libtool_args="$nonopt"
-    base_compile="$nonopt"
+    base_compile="$nonopt $@"
     compile_command="$nonopt"
     finalize_command="$nonopt"
 
@@ -828,11 +1071,11 @@ EOF
     old_convenience=
     deplibs=
     old_deplibs=
-    add_flags=
     compiler_flags=
     linker_flags=
     dllsearchpath=
     lib_search_path=`pwd`
+    inst_prefix_dir=
 
     avoid_version=no
     dlfiles=
@@ -848,6 +1091,7 @@ EOF
     no_install=no
     objs=
     non_pic_objects=
+    precious_files_regex=
     prefer_static_libs=no
     preload=no
     prev=
@@ -859,6 +1103,9 @@ EOF
     temp_rpath=
     thread_safe=no
     vinfo=
+    vinfo_number=no
+
+    func_infer_tag $base_compile
 
     # We need to know -static, to get the right output filenames.
     for arg
@@ -891,7 +1138,6 @@ EOF
     # Go through the arguments, transforming them on the way.
     while test "$#" -gt 0; do
       arg="$1"
-      base_compile="$base_compile $arg"
       shift
       case $arg in
       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
@@ -955,7 +1201,7 @@ EOF
 	  export_symbols="$arg"
 	  if test ! -f "$arg"; then
 	    $echo "$modename: symbol file \`$arg' does not exist"
-	    exit 1
+	    exit $EXIT_FAILURE
 	  fi
 	  prev=
 	  continue
@@ -965,6 +1211,16 @@ EOF
 	  prev=
 	  continue
 	  ;;
+	inst_prefix)
+	  inst_prefix_dir="$arg"
+	  prev=
+	  continue
+	  ;;
+	precious_regex)
+	  precious_files_regex="$arg"
+	  prev=
+	  continue
+	  ;;
 	release)
 	  release="-$arg"
 	  prev=
@@ -981,7 +1237,7 @@ EOF
 	      # A libtool-controlled object.
 
 	      # Check to see that this really is a libtool object.
-	      if (${SED} -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	      if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
 		pic_object=
 		non_pic_object=
 
@@ -997,7 +1253,7 @@ EOF
 		   test "$pic_object" = none && \
 		   test "$non_pic_object" = none; then
 		  $echo "$modename: cannot find name of object for \`$arg'" 1>&2
-		  exit 1
+		  exit $EXIT_FAILURE
 		fi
 
 		# Extract subdirectory from the argument.
@@ -1050,7 +1306,7 @@ EOF
 		# Only an error if not doing a dry-run.
 		if test -z "$run"; then
 		  $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
-		  exit 1
+		  exit $EXIT_FAILURE
 		else
 		  # Dry-run case.
 
@@ -1071,7 +1327,7 @@ EOF
 	    done
 	  else
 	    $echo "$modename: link input file \`$save_arg' does not exist"
-	    exit 1
+	    exit $EXIT_FAILURE
 	  fi
 	  arg=$save_arg
 	  prev=
@@ -1083,7 +1339,7 @@ EOF
 	  [\\/]* | [A-Za-z]:[\\/]*) ;;
 	  *)
 	    $echo "$modename: only absolute run-paths are allowed" 1>&2
-	    exit 1
+	    exit $EXIT_FAILURE
 	    ;;
 	  esac
 	  if test "$prev" = rpath; then
@@ -1115,6 +1371,19 @@ EOF
 	  finalize_command="$finalize_command $wl$qarg"
 	  continue
 	  ;;
+	xcclinker)
+	  linker_flags="$linker_flags $qarg"
+	  compiler_flags="$compiler_flags $qarg"
+	  prev=
+	  compile_command="$compile_command $qarg"
+	  finalize_command="$finalize_command $qarg"
+	  continue
+	  ;;
+	shrext)
+  	  shrext_cmds="$arg"
+	  prev=
+	  continue
+	  ;;
 	*)
 	  eval "$prev=\"\$arg\""
 	  prev=
@@ -1163,7 +1432,7 @@ EOF
       -export-symbols | -export-symbols-regex)
 	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
 	  $echo "$modename: more than one -exported-symbols argument is not allowed"
-	  exit 1
+	  exit $EXIT_FAILURE
 	fi
 	if test "X$arg" = "X-export-symbols"; then
 	  prev=expsyms
@@ -1173,6 +1442,11 @@ EOF
 	continue
 	;;
 
+      -inst-prefix-dir)
+	prev=inst_prefix
+	continue
+	;;
+
       # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
       # so, if we see these flags be careful not to treat them like -L
       -L[A-Z][A-Z]*:*)
@@ -1194,7 +1468,7 @@ EOF
 	  absdir=`cd "$dir" && pwd`
 	  if test -z "$absdir"; then
 	    $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
-	    exit 1
+	    exit $EXIT_FAILURE
 	  fi
 	  dir="$absdir"
 	  ;;
@@ -1249,11 +1523,44 @@ EOF
 	continue
 	;;
 
+     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+	deplibs="$deplibs $arg"
+	continue
+	;;
+
       -module)
 	module=yes
 	continue
 	;;
 
+      # gcc -m* arguments should be passed to the linker via $compiler_flags
+      # in order to pass architecture information to the linker
+      # (e.g. 32 vs 64-bit).  This may also be accomplished via -Wl,-mfoo
+      # but this is not reliable with gcc because gcc may use -mfoo to
+      # select a different linker, different libraries, etc, while
+      # -Wl,-mfoo simply passes -mfoo to the linker.
+      -m*)
+	# Unknown arguments in both finalize_command and compile_command need
+	# to be aesthetically quoted because they are evaled later.
+	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+	case $arg in
+	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	  arg="\"$arg\""
+	  ;;
+	esac
+        compile_command="$compile_command $arg"
+        finalize_command="$finalize_command $arg"
+        if test "$with_gcc" = "yes" ; then
+          compiler_flags="$compiler_flags $arg"
+        fi
+        continue
+        ;;
+
+      -shrext)
+	prev=shrext
+	continue
+	;;
+
       -no-fast-install)
 	fast_install=no
 	continue
@@ -1285,6 +1592,11 @@ EOF
 
       -o) prev=output ;;
 
+      -precious-files-regex)
+	prev=precious_regex
+	continue
+	;;
+
       -release)
 	prev=release
 	continue
@@ -1307,7 +1619,7 @@ EOF
 	[\\/]* | [A-Za-z]:[\\/]*) ;;
 	*)
 	  $echo "$modename: only absolute run-paths are allowed" 1>&2
-	  exit 1
+	  exit $EXIT_FAILURE
 	  ;;
 	esac
 	case "$xrpath " in
@@ -1335,6 +1647,11 @@ EOF
 	prev=vinfo
 	continue
 	;;
+      -version-number)
+	prev=vinfo
+	vinfo_number=yes
+	continue
+	;;
 
       -Wc,*)
 	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
@@ -1383,6 +1700,16 @@ EOF
 	continue
 	;;
 
+      -XCClinker)
+	prev=xcclinker
+	continue
+	;;
+
+      -Kthread | -mthreads | -mt | -pthread | -pthreads | -threads | -qthreaded | -kthread )
+        compiler_flags="$compiler_flags $arg"
+        continue
+        ;;
+
       # Some other compiler flag.
       -* | +*)
 	# Unknown arguments in both finalize_command and compile_command need
@@ -1393,7 +1720,6 @@ EOF
 	  arg="\"$arg\""
 	  ;;
 	esac
-	add_flags="$add_flags $arg"
 	;;
 
       *.$objext)
@@ -1405,7 +1731,7 @@ EOF
 	# A libtool-controlled object.
 
 	# Check to see that this really is a libtool object.
-	if (${SED} -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
 	  pic_object=
 	  non_pic_object=
 
@@ -1421,7 +1747,7 @@ EOF
 	     test "$pic_object" = none && \
 	     test "$non_pic_object" = none; then
 	    $echo "$modename: cannot find name of object for \`$arg'" 1>&2
-	    exit 1
+	    exit $EXIT_FAILURE
 	  fi
 
 	  # Extract subdirectory from the argument.
@@ -1474,7 +1800,7 @@ EOF
 	  # Only an error if not doing a dry-run.
 	  if test -z "$run"; then
 	    $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
-	    exit 1
+	    exit $EXIT_FAILURE
 	  else
 	    # Dry-run case.
 
@@ -1528,7 +1854,6 @@ EOF
 	  arg="\"$arg\""
 	  ;;
 	esac
-	add_flags="$add_flags $arg"
 	;;
       esac # arg
 
@@ -1542,51 +1867,7 @@ EOF
     if test -n "$prev"; then
       $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
       $echo "$help" 1>&2
-      exit 1
-    fi
-
-    # Infer tagged configuration to use if any are available and
-    # if one wasn't chosen via the "--tag" command line option.
-    # Only attempt this if the compiler in the base link
-    # command doesn't match the default compiler.
-    if test -n "$available_tags" && test -z "$tagname"; then
-      case $base_compile in
-      "$CC "*) ;;
-      # Blanks in the command may have been stripped by the calling shell,
-      # but not from the CC environment variable when ltconfig was run.
-      "`$echo $CC` "*) ;;
-      *)
-	for z in $available_tags; do
-	  if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
-	    # Evaluate the configuration.
-	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
-	    case $base_compile in
-	    "$CC "*)
-	      # The compiler in $compile_command matches
-	      # the one in the tagged configuration.
-	      # Assume this is the tagged configuration we want.
-	      tagname=$z
-	      break
-	      ;;
-	    "`$echo $CC` "*)
-	      tagname=$z
-	      break
-	      ;;
-	    esac
-	  fi
-	done
-	# If $tagname still isn't set, then no tagged configuration
-	# was found and let the user know that the "--tag" command
-	# line option must be used.
-	if test -z "$tagname"; then
-	  echo "$modename: unable to infer tagged configuration"
-	  echo "$modename: specify a tag with \`--tag'" 1>&2
-	  exit 1
-#       else
-#         echo "$modename: using $tagname tagged configuration"
-	fi
-	;;
-      esac
+      exit $EXIT_FAILURE
     fi
 
     if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
@@ -1630,7 +1911,7 @@ EOF
     "")
       $echo "$modename: you must specify an output file" 1>&2
       $echo "$help" 1>&2
-      exit 1
+      exit $EXIT_FAILURE
       ;;
     *.$libext) linkmode=oldlib ;;
     *.lo | *.$objext) linkmode=obj ;;
@@ -1638,7 +1919,17 @@ EOF
     *) linkmode=prog ;; # Anything else should be a program.
     esac
 
+    case $host in
+    *cygwin* | *mingw* | *pw32*)
+      # don't eliminate duplications in $postdeps and $predeps
+      duplicate_compiler_generated_deps=yes
+      ;;
+    *)
+      duplicate_compiler_generated_deps=$duplicate_deps
+      ;;
+    esac
     specialdeplibs=
+
     libs=
     # Find all interdependent deplibs by searching for libraries
     # that are linked more than once (e.g. -la -lb -la)
@@ -1658,7 +1949,7 @@ EOF
       # $postdeps and mark them as special (i.e., whose duplicates are
       # not to be eliminated).
       pre_post_deps=
-      if test "X$duplicate_deps" = "Xyes" ; then
+      if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
 	for pre_post_dep in $predeps $postdeps; do
 	  case "$pre_post_deps " in
 	  *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
@@ -1683,7 +1974,7 @@ EOF
 	  *.la) ;;
 	  *)
 	    $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
-	    exit 1
+	    exit $EXIT_FAILURE
 	    ;;
 	  esac
 	done
@@ -1721,23 +2012,38 @@ EOF
 	lib=
 	found=no
 	case $deplib in
+	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+	  if test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$deplib $compile_deplibs"
+	    finalize_deplibs="$deplib $finalize_deplibs"
+	  else
+	    deplibs="$deplib $deplibs"
+	  fi
+	  continue
+	  ;;
 	-l*)
 	  if test "$linkmode" != lib && test "$linkmode" != prog; then
 	    $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
 	    continue
 	  fi
-	  if test "$pass" = conv && test "$allow_undefined" = yes; then
+	  if test "$pass" = conv; then
 	    deplibs="$deplib $deplibs"
 	    continue
 	  fi
 	  name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
 	  for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
-	    # Search the libtool library
-	    lib="$searchdir/lib${name}.la"
-	    if test -f "$lib"; then
-	      found=yes
-	      break
-	    fi
+	    for search_ext in .la $std_shrext .so .a; do
+	      # Search the libtool library
+	      lib="$searchdir/lib${name}${search_ext}"
+	      if test -f "$lib"; then
+		if test "$search_ext" = ".la"; then
+		  found=yes
+		else
+		  found=no
+		fi
+		break 2
+	      fi
+	    done
 	  done
 	  if test "$found" != yes; then
 	    # deplib doesn't seem to be a libtool library
@@ -1749,6 +2055,42 @@ EOF
 	      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
 	    fi
 	    continue
+	  else # deplib is a libtool library
+	    # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+	    # We need to do some special things here, and not later.
+	    if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+	      case " $predeps $postdeps " in
+	      *" $deplib "*)
+		if (${SED} -e '2q' $lib |
+                    grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+		  library_names=
+		  old_library=
+		  case $lib in
+		  */* | *\\*) . $lib ;;
+		  *) . ./$lib ;;
+		  esac
+		  for l in $old_library $library_names; do
+		    ll="$l"
+		  done
+		  if test "X$ll" = "X$old_library" ; then # only static version available
+		    found=no
+		    ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
+		    test "X$ladir" = "X$lib" && ladir="."
+		    lib=$ladir/$old_library
+		    if test "$linkmode,$pass" = "prog,link"; then
+		      compile_deplibs="$deplib $compile_deplibs"
+		      finalize_deplibs="$deplib $finalize_deplibs"
+		    else
+		      deplibs="$deplib $deplibs"
+		      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+		    fi
+		    continue
+		  fi
+		fi
+	        ;;
+	      *) ;;
+	      esac
+	    fi
 	  fi
 	  ;; # -l
 	-L*)
@@ -1766,11 +2108,11 @@ EOF
 	    fi
 	    if test "$pass" = scan; then
 	      deplibs="$deplib $deplibs"
-	      newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
 	    else
 	      compile_deplibs="$deplib $compile_deplibs"
 	      finalize_deplibs="$deplib $finalize_deplibs"
 	    fi
+	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
 	    ;;
 	  *)
 	    $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
@@ -1798,18 +2140,33 @@ EOF
 	  fi
 	  case $linkmode in
 	  lib)
-	    if test "$deplibs_check_method" != pass_all; then
-	      echo
-	      echo "*** Warning: Trying to link with static lib archive $deplib."
-	      echo "*** I have the capability to make that library automatically link in when"
-	      echo "*** you link to this library.  But I can only do this if you have a"
-	      echo "*** shared version of the library, which you do not appear to have"
-	      echo "*** because the file extensions .$libext of this argument makes me believe"
-	      echo "*** that it is just a static archive that I should not used here."
+	    valid_a_lib=no
+	    case $deplibs_check_method in
+	      match_pattern*)
+		set dummy $deplibs_check_method
+	        match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+		if eval $echo \"$deplib\" 2>/dev/null \
+		    | $SED 10q \
+		    | $EGREP "$match_pattern_regex" > /dev/null; then
+		  valid_a_lib=yes
+		fi
+		;;
+	      pass_all)
+		valid_a_lib=yes
+		;;
+            esac
+	    if test "$valid_a_lib" != yes; then
+	      $echo
+	      $echo "*** Warning: Trying to link with static lib archive $deplib."
+	      $echo "*** I have the capability to make that library automatically link in when"
+	      $echo "*** you link to this library.  But I can only do this if you have a"
+	      $echo "*** shared version of the library, which you do not appear to have"
+	      $echo "*** because the file extensions .$libext of this argument makes me believe"
+	      $echo "*** that it is just a static archive that I should not used here."
 	    else
-	      echo
-	      echo "*** Warning: Linking the shared library $output against the"
-	      echo "*** static library $deplib is not portable!"
+	      $echo
+	      $echo "*** Warning: Linking the shared library $output against the"
+	      $echo "*** static library $deplib is not portable!"
 	      deplibs="$deplib $deplibs"
 	    fi
 	    continue
@@ -1849,14 +2206,14 @@ EOF
 	if test "$found" = yes || test -f "$lib"; then :
 	else
 	  $echo "$modename: cannot find the library \`$lib'" 1>&2
-	  exit 1
+	  exit $EXIT_FAILURE
 	fi
 
 	# Check to see that this really is a libtool archive.
-	if (${SED} -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
 	else
 	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-	  exit 1
+	  exit $EXIT_FAILURE
 	fi
 
 	ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
@@ -1869,8 +2226,9 @@ EOF
 	library_names=
 	old_library=
 	# If the library was installed with an old release of libtool,
-	# it will not redefine variable installed.
+	# it will not redefine variables installed, or shouldnotlink
 	installed=yes
+	shouldnotlink=no
 
 	# Read the .la file
 	case $lib in
@@ -1888,32 +2246,32 @@ EOF
 	if test "$pass" = conv; then
 	  # Only check for convenience libraries
 	  deplibs="$lib $deplibs"
-	  tmp_libs=
-	  for deplib in $dependency_libs; do
-	    #echo "Adding $deplib to \$deplibs"
-	    deplibs="$deplib $deplibs"
-            if test "X$duplicate_deps" = "Xyes" ; then
-	      case "$tmp_libs " in
-	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
-	      esac
-            fi
-	    tmp_libs="$tmp_libs $deplib"
-	  done
 	  if test -z "$libdir"; then
 	    if test -z "$old_library"; then
 	      $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
-	      exit 1
+	      exit $EXIT_FAILURE
 	    fi
 	    # It is a libtool convenience library, so add in its objects.
 	    convenience="$convenience $ladir/$objdir/$old_library"
 	    old_convenience="$old_convenience $ladir/$objdir/$old_library"
+	    tmp_libs=
+	    for deplib in $dependency_libs; do
+	      deplibs="$deplib $deplibs"
+              if test "X$duplicate_deps" = "Xyes" ; then
+	        case "$tmp_libs " in
+	        *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	        esac
+              fi
+	      tmp_libs="$tmp_libs $deplib"
+	    done
 	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
 	    $echo "$modename: \`$lib' is not a convenience library" 1>&2
-	    exit 1
+	    exit $EXIT_FAILURE
 	  fi
 	  continue
 	fi # $pass = conv
 
+
 	# Get the name of the library we link against.
 	linklib=
 	for l in $old_library $library_names; do
@@ -1921,16 +2279,18 @@ EOF
 	done
 	if test -z "$linklib"; then
 	  $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
-	  exit 1
+	  exit $EXIT_FAILURE
 	fi
 
 	# This library was specified with -dlopen.
 	if test "$pass" = dlopen; then
 	  if test -z "$libdir"; then
 	    $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
-	    exit 1
+	    exit $EXIT_FAILURE
 	  fi
-	  if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+	  if test -z "$dlname" ||
+	     test "$dlopen_support" != yes ||
+	     test "$build_libtool_libs" = no; then
 	    # If there is no dlname, no dlopen support or we're linking
 	    # statically, we need to preload.  We also need to preload any
 	    # dependent libraries so libltdl's deplib preloader doesn't
@@ -1968,10 +2328,17 @@ EOF
 	    absdir="$libdir"
 	  fi
 	else
-	  dir="$ladir/$objdir"
-	  absdir="$abs_ladir/$objdir"
-	  # Remove this search path later
-	  notinst_path="$notinst_path $abs_ladir"
+	  if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+	    dir="$ladir"
+	    absdir="$abs_ladir"
+	    # Remove this search path later
+	    notinst_path="$notinst_path $abs_ladir"
+	  else
+	    dir="$ladir/$objdir"
+	    absdir="$abs_ladir/$objdir"
+	    # Remove this search path later
+	    notinst_path="$notinst_path $abs_ladir"
+	  fi
 	fi # $installed = yes
 	name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
 
@@ -1979,7 +2346,7 @@ EOF
 	if test "$pass" = dlpreopen; then
 	  if test -z "$libdir"; then
 	    $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
-	    exit 1
+	    exit $EXIT_FAILURE
 	  fi
 	  # Prefer using a static library (so that no silly _DYNAMIC symbols
 	  # are required to link).
@@ -2006,6 +2373,7 @@ EOF
 	  continue
 	fi
 
+
 	if test "$linkmode" = prog && test "$pass" != link; then
 	  newlib_search_path="$newlib_search_path $ladir"
 	  deplibs="$lib $deplibs"
@@ -2092,6 +2460,18 @@ EOF
 	    need_relink=yes
 	  fi
 	  # This is a shared library
+
+	  # Warn about portability, can't link against -module's on
+	  # some systems (darwin)
+	  if test "$shouldnotlink" = yes && test "$pass" = link ; then
+	    $echo
+	    if test "$linkmode" = prog; then
+	      $echo "*** Warning: Linking the executable $output against the loadable module"
+	    else
+	      $echo "*** Warning: Linking the shared library $output against the loadable module"
+	    fi
+	    $echo "*** $linklib is not portable!"
+	  fi
 	  if test "$linkmode" = lib &&
 	     test "$hardcode_into_libs" = yes; then
 	    # Hardcode the library path.
@@ -2129,7 +2509,7 @@ EOF
 	    elif test -n "$soname_spec"; then
 	      # bleh windows
 	      case $host in
-	      *cygwin*)
+	      *cygwin* | mingw*)
 		major=`expr $current - $age`
 		versuffix="-$major"
 		;;
@@ -2141,17 +2521,18 @@ EOF
 
 	    # Make a new name for the extract_expsyms_cmds to use
 	    soroot="$soname"
-	    soname=`echo $soroot | ${SED} -e 's/^.*\///'`
-	    newlib="libimp-`echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
+	    soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
+	    newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
 
 	    # If the library has no export list, then create one now
 	    if test -f "$output_objdir/$soname-def"; then :
 	    else
 	      $show "extracting exported symbol list from \`$soname'"
 	      save_ifs="$IFS"; IFS='~'
-	      eval cmds=\"$extract_expsyms_cmds\"
+	      cmds=$extract_expsyms_cmds
 	      for cmd in $cmds; do
 		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
 		$show "$cmd"
 		$run eval "$cmd" || exit $?
 	      done
@@ -2162,9 +2543,10 @@ EOF
 	    if test -f "$output_objdir/$newlib"; then :; else
 	      $show "generating import library for \`$soname'"
 	      save_ifs="$IFS"; IFS='~'
-	      eval cmds=\"$old_archive_from_expsyms_cmds\"
+	      cmds=$old_archive_from_expsyms_cmds
 	      for cmd in $cmds; do
 		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
 		$show "$cmd"
 		$run eval "$cmd" || exit $?
 	      done
@@ -2184,6 +2566,22 @@ EOF
 	    immediate | unsupported)
 	      if test "$hardcode_direct" = no; then
 		add="$dir/$linklib"
+		case $host in
+		  *-*-sco3.2v5* ) add_dir="-L$dir" ;;
+		  *-*-darwin* )
+		    # if the lib is a module then we can not link against
+		    # it, someone is ignoring the new warnings I added
+		    if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then
+		      $echo "** Warning, lib $linklib is a module, not a shared library"
+		      if test -z "$old_library" ; then
+		        $echo
+		        $echo "** And there doesn't seem to be a static archive available"
+		        $echo "** The link will probably fail, sorry"
+		      else
+		        add="$dir/$old_library"
+		      fi
+		    fi
+		esac
 	      elif test "$hardcode_minus_L" = no; then
 		case $host in
 		*-*-sunos*) add_shlibpath="$dir" ;;
@@ -2202,6 +2600,14 @@ EOF
 		add="$dir/$linklib"
 	      elif test "$hardcode_minus_L" = yes; then
 		add_dir="-L$dir"
+		# Try looking first in the location we're being installed to.
+		if test -n "$inst_prefix_dir"; then
+		  case "$libdir" in
+		    [\\/]*)
+		      add_dir="$add_dir -L$inst_prefix_dir$libdir"
+		      ;;
+		  esac
+		fi
 		add="-l$name"
 	      elif test "$hardcode_shlibpath_var" = yes; then
 		add_shlibpath="$dir"
@@ -2215,7 +2621,7 @@ EOF
 
 	    if test "$lib_linked" != yes; then
 	      $echo "$modename: configuration error: unsupported hardcode properties"
-	      exit 1
+	      exit $EXIT_FAILURE
 	    fi
 
 	    if test -n "$add_shlibpath"; then
@@ -2257,9 +2663,24 @@ EOF
 	      *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
 	      esac
 	      add="-l$name"
+	    elif test "$hardcode_automatic" = yes; then
+	      if test -n "$inst_prefix_dir" &&
+		 test -f "$inst_prefix_dir$libdir/$linklib" ; then
+	        add="$inst_prefix_dir$libdir/$linklib"
+	      else
+	        add="$libdir/$linklib"
+	      fi
 	    else
 	      # We cannot seem to hardcode it, guess we'll fake it.
 	      add_dir="-L$libdir"
+	      # Try looking first in the location we're being installed to.
+	      if test -n "$inst_prefix_dir"; then
+		case "$libdir" in
+		  [\\/]*)
+		    add_dir="$add_dir -L$inst_prefix_dir$libdir"
+		    ;;
+		esac
+	      fi
 	      add="-l$name"
 	    fi
 
@@ -2291,21 +2712,21 @@ EOF
 
 	    # Just print a warning and add the library to dependency_libs so
 	    # that the program can be linked against the static library.
-	    echo
-	    echo "*** Warning: This system can not link to static lib archive $lib."
-	    echo "*** I have the capability to make that library automatically link in when"
-	    echo "*** you link to this library.  But I can only do this if you have a"
-	    echo "*** shared version of the library, which you do not appear to have."
+	    $echo
+	    $echo "*** Warning: This system can not link to static lib archive $lib."
+	    $echo "*** I have the capability to make that library automatically link in when"
+	    $echo "*** you link to this library.  But I can only do this if you have a"
+	    $echo "*** shared version of the library, which you do not appear to have."
 	    if test "$module" = yes; then
-	      echo "*** But as you try to build a module library, libtool will still create "
-	      echo "*** a static module, that should work as long as the dlopening application"
-	      echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
+	      $echo "*** But as you try to build a module library, libtool will still create "
+	      $echo "*** a static module, that should work as long as the dlopening application"
+	      $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
 	      if test -z "$global_symbol_pipe"; then
-		echo
-		echo "*** However, this would only work if libtool was able to extract symbol"
-		echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
-		echo "*** not find such a program.  So, this module is probably useless."
-		echo "*** \`nm' from GNU binutils and a full rebuild may help."
+		$echo
+		$echo "*** However, this would only work if libtool was able to extract symbol"
+		$echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+		$echo "*** not find such a program.  So, this module is probably useless."
+		$echo "*** \`nm' from GNU binutils and a full rebuild may help."
 	      fi
 	      if test "$build_old_libs" = no; then
 		build_libtool_libs=module
@@ -2323,9 +2744,10 @@ EOF
 	fi # link shared/static library?
 
 	if test "$linkmode" = lib; then
-	  #if test -n "$dependency_libs" &&
-	  #   { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes ||
-	  #     test "$link_static" = yes; }; then
+	  if test -n "$dependency_libs" &&
+	     { test "$hardcode_into_libs" != yes ||
+	       test "$build_old_libs" = yes ||
+	       test "$link_static" = yes; }; then
 	    # Extract -R from dependency_libs
 	    temp_deplibs=
 	    for libdir in $dependency_libs; do
@@ -2339,7 +2761,7 @@ EOF
 	      esac
 	    done
 	    dependency_libs="$temp_deplibs"
-	  #fi
+	  fi
 
 	  newlib_search_path="$newlib_search_path $absdir"
 	  # Link against this library
@@ -2375,20 +2797,68 @@ EOF
 		  fi
 		  ;;
 		esac
-		if grep "^installed=no" $deplib > /dev/null; then
-		  path="-L$absdir/$objdir"
-		else
-		  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
-		  if test -z "$libdir"; then
-		    $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
-		    exit 1
-		  fi
-		  path="-L$absdir"
-		fi
+		if grep "^installed=no" $deplib > /dev/null; then
+		  path="$absdir/$objdir"
+		else
+		  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		  if test -z "$libdir"; then
+		    $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+		    exit $EXIT_FAILURE
+		  fi
+		  if test "$absdir" != "$libdir"; then
+		    $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
+		  fi
+		  path="$absdir"
+		fi
+		depdepl=
+		case $host in
+		*-*-darwin*)
+		  # we do not want to link against static libs,
+		  # but need to link against shared
+		  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+		  if test -n "$deplibrary_names" ; then
+		    for tmp in $deplibrary_names ; do
+		      depdepl=$tmp
+		    done
+		    if test -f "$path/$depdepl" ; then
+		      depdepl="$path/$depdepl"
+		    fi
+		    # do not add paths which are already there
+		    case " $newlib_search_path " in
+		    *" $path "*) ;;
+		    *) newlib_search_path="$newlib_search_path $path";;
+		    esac
+		  fi
+		  path=""
+		  ;;
+		*)
+		  path="-L$path"
+		  ;;
+		esac
+		;;
+	      -l*)
+		case $host in
+		*-*-darwin*)
+		  # Again, we only want to link against shared libraries
+		  eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
+		  for tmp in $newlib_search_path ; do
+		    if test -f "$tmp/lib$tmp_libs.dylib" ; then
+		      eval depdepl="$tmp/lib$tmp_libs.dylib"
+		      break
+		    fi
+		  done
+		  path=""
+		  ;;
+		*) continue ;;
+		esac
 		;;
 	      *) continue ;;
 	      esac
 	      case " $deplibs " in
+	      *" $depdepl "*) ;;
+	      *) deplibs="$depdepl $deplibs" ;;
+	      esac
+	      case " $deplibs " in
 	      *" $path "*) ;;
 	      *) deplibs="$deplibs $path" ;;
 	      esac
@@ -2434,6 +2904,7 @@ EOF
 	    # practice:
 	    case $deplib in
 	    -L*) new_libs="$deplib $new_libs" ;;
+	    -R*) ;;
 	    *)
 	      # And here is the reason: when a library appears more
 	      # than once as an explicit dependence of a library, or
@@ -2470,18 +2941,26 @@ EOF
 	      *) tmp_libs="$tmp_libs $deplib" ;;
 	      esac
 	      ;;
-	    -R*)
-	      temp_xrpath=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
-	      case " $xrpath " in
-	      *" $temp_xrpath "*) ;;
-	      *) xrpath="$xrpath $temp_xrpath";;
-	      esac;;
 	    *) tmp_libs="$tmp_libs $deplib" ;;
 	    esac
 	  done
 	  eval $var=\"$tmp_libs\"
 	done # for var
       fi
+      # Last step: remove runtime libs from dependency_libs
+      # (they stay in deplibs)
+      tmp_libs=
+      for i in $dependency_libs ; do
+	case " $predeps $postdeps $compiler_lib_search_path " in
+	*" $i "*)
+	  i=""
+	  ;;
+	esac
+	if test -n "$i" ; then
+	  tmp_libs="$tmp_libs $i"
+	fi
+      done
+      dependency_libs=$tmp_libs
     done # for pass
     if test "$linkmode" = prog; then
       dlfiles="$newdlfiles"
@@ -2507,7 +2986,7 @@ EOF
       fi
 
       if test -n "$vinfo"; then
-	$echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
+	$echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
       fi
 
       if test -n "$release"; then
@@ -2529,17 +3008,19 @@ EOF
       case $outputname in
       lib*)
 	name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+	eval shared_ext=\"$shrext_cmds\"
 	eval libname=\"$libname_spec\"
 	;;
       *)
 	if test "$module" = no; then
 	  $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
 	  $echo "$help" 1>&2
-	  exit 1
+	  exit $EXIT_FAILURE
 	fi
 	if test "$need_lib_prefix" != no; then
 	  # Add the "lib" prefix for modules if required
 	  name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+	  eval shared_ext=\"$shrext_cmds\"
 	  eval libname=\"$libname_spec\"
 	else
 	  libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
@@ -2550,11 +3031,11 @@ EOF
       if test -n "$objs"; then
 	if test "$deplibs_check_method" != pass_all; then
 	  $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
-	  exit 1
+	  exit $EXIT_FAILURE
 	else
-	  echo
-	  echo "*** Warning: Linking the shared library $output against the non-libtool"
-	  echo "*** objects $objs is not portable!"
+	  $echo
+	  $echo "*** Warning: Linking the shared library $output against the non-libtool"
+	  $echo "*** objects $objs is not portable!"
 	  libobjs="$libobjs $objs"
 	fi
       fi
@@ -2582,7 +3063,7 @@ EOF
 	fi
 
 	if test -n "$vinfo"; then
-	  $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
+	  $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
 	fi
 
 	if test -n "$release"; then
@@ -2598,45 +3079,82 @@ EOF
 	if test -n "$8"; then
 	  $echo "$modename: too many parameters to \`-version-info'" 1>&2
 	  $echo "$help" 1>&2
-	  exit 1
+	  exit $EXIT_FAILURE
 	fi
 
-	current="$2"
-	revision="$3"
-	age="$4"
+	# convert absolute version numbers to libtool ages
+	# this retains compatibility with .la files and attempts
+	# to make the code below a bit more comprehensible
+
+	case $vinfo_number in
+	yes)
+	  number_major="$2"
+	  number_minor="$3"
+	  number_revision="$4"
+	  #
+	  # There are really only two kinds -- those that
+	  # use the current revision as the major version
+	  # and those that subtract age and use age as
+	  # a minor version.  But, then there is irix
+	  # which has an extra 1 added just for fun
+	  #
+	  case $version_type in
+	  darwin|linux|osf|windows)
+	    current=`expr $number_major + $number_minor`
+	    age="$number_minor"
+	    revision="$number_revision"
+	    ;;
+	  freebsd-aout|freebsd-elf|sunos)
+	    current="$number_major"
+	    revision="$number_minor"
+	    age="0"
+	    ;;
+	  irix|nonstopux)
+	    current=`expr $number_major + $number_minor - 1`
+	    age="$number_minor"
+	    revision="$number_minor"
+	    ;;
+	  esac
+	  ;;
+	no)
+	  current="$2"
+	  revision="$3"
+	  age="$4"
+	  ;;
+	esac
 
 	# Check that each of the things are valid numbers.
 	case $current in
-	0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+	[0-9]*) ;;
 	*)
 	  $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
 	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-	  exit 1
+	  exit $EXIT_FAILURE
 	  ;;
 	esac
 
 	case $revision in
-	0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+	[0-9]*) ;;
 	*)
 	  $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
 	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-	  exit 1
+	  exit $EXIT_FAILURE
 	  ;;
 	esac
 
 	case $age in
-	0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+	[0-9]*) ;;
 	*)
 	  $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
 	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-	  exit 1
+	  exit $EXIT_FAILURE
 	  ;;
 	esac
 
 	if test "$age" -gt "$current"; then
 	  $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
 	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-	  exit 1
+	  exit $EXIT_FAILURE
 	fi
 
 	# Calculate the version variables.
@@ -2653,7 +3171,7 @@ EOF
 	  versuffix="$major.$age.$revision"
 	  # Darwin ld doesn't like 0 for these options...
 	  minor_current=`expr $current + 1`
-	  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+	  verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
 	  ;;
 
 	freebsd-aout)
@@ -2667,14 +3185,14 @@ EOF
 	  ;;
 
 	irix | nonstopux)
+	  major=`expr $current - $age + 1`
+
 	  case $version_type in
 	    nonstopux) verstring_prefix=nonstopux ;;
 	    *)         verstring_prefix=sgi ;;
 	  esac
 	  verstring="$verstring_prefix$major.$revision"
 
-	  major=`expr $current - $age + 1`
-
 	  # Add in all the interfaces that we are compatible with.
 	  loop=$revision
 	  while test "$loop" -ne 0; do
@@ -2694,7 +3212,7 @@ EOF
 	  ;;
 
 	osf)
-	  major=`expr $current - $age`
+	  major=.`expr $current - $age`
 	  versuffix=".$current.$age.$revision"
 	  verstring="$current.$age.$revision"
 
@@ -2724,8 +3242,8 @@ EOF
 
 	*)
 	  $echo "$modename: unknown library version type \`$version_type'" 1>&2
-	  echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
-	  exit 1
+	  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
+	  exit $EXIT_FAILURE
 	  ;;
 	esac
 
@@ -2773,12 +3291,18 @@ EOF
 	# Remove our outputs, but don't remove object files since they
 	# may have been created when compiling PIC objects.
 	removelist=
-	tempremovelist=`echo "$output_objdir/*"`
+	tempremovelist=`$echo "$output_objdir/*"`
 	for p in $tempremovelist; do
 	  case $p in
 	    *.$objext)
 	       ;;
 	    $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+	       if test "X$precious_files_regex" != "X"; then
+	         if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+	         then
+		   continue
+		 fi
+	       fi
 	       removelist="$removelist $p"
 	       ;;
 	    *) ;;
@@ -2800,9 +3324,9 @@ EOF
 
       # Eliminate all temporary directories.
       for path in $notinst_path; do
-	lib_search_path=`echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
-	deplibs=`echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
-	dependency_libs=`echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
+	lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
+	deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
+	dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
       done
 
       if test -n "$xrpath"; then
@@ -2815,7 +3339,7 @@ EOF
 	  *) finalize_rpath="$finalize_rpath $libdir" ;;
 	  esac
 	done
-	if true || test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+	if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
 	  dependency_libs="$temp_xrpath $dependency_libs"
 	fi
       fi
@@ -2886,7 +3410,7 @@ EOF
 	  # This might be a little naive.  We might want to check
 	  # whether the library exists or not.  But this is on
 	  # osf3 & osf4 and I'm not really sure... Just
-	  # implementing what was already the behaviour.
+	  # implementing what was already the behavior.
 	  newdeplibs=$deplibs
 	  ;;
 	test_compile)
@@ -2905,62 +3429,82 @@ EOF
 	    for i in $deplibs; do
 	      name="`expr $i : '-l\(.*\)'`"
 	      # If $name is empty we are operating on a -L argument.
-             if test "$name" != "" && test "$name" -ne "0"; then
-		libname=`eval \\$echo \"$libname_spec\"`
-		deplib_matches=`eval \\$echo \"$library_names_spec\"`
-		set dummy $deplib_matches
-		deplib_match=$2
-		if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
-		  newdeplibs="$newdeplibs $i"
-		else
-		  droppeddeps=yes
-		  echo
-		  echo "*** Warning: dynamic linker does not accept needed library $i."
-		  echo "*** I have the capability to make that library automatically link in when"
-		  echo "*** you link to this library.  But I can only do this if you have a"
-		  echo "*** shared version of the library, which I believe you do not have"
-		  echo "*** because a test_compile did reveal that the linker did not use it for"
-		  echo "*** its dynamic dependency list that programs get resolved with at runtime."
+              if test "$name" != "" && test "$name" -ne "0"; then
+		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		  case " $predeps $postdeps " in
+		  *" $i "*)
+		    newdeplibs="$newdeplibs $i"
+		    i=""
+		    ;;
+		  esac
+	        fi
+		if test -n "$i" ; then
+		  libname=`eval \\$echo \"$libname_spec\"`
+		  deplib_matches=`eval \\$echo \"$library_names_spec\"`
+		  set dummy $deplib_matches
+		  deplib_match=$2
+		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		    newdeplibs="$newdeplibs $i"
+		  else
+		    droppeddeps=yes
+		    $echo
+		    $echo "*** Warning: dynamic linker does not accept needed library $i."
+		    $echo "*** I have the capability to make that library automatically link in when"
+		    $echo "*** you link to this library.  But I can only do this if you have a"
+		    $echo "*** shared version of the library, which I believe you do not have"
+		    $echo "*** because a test_compile did reveal that the linker did not use it for"
+		    $echo "*** its dynamic dependency list that programs get resolved with at runtime."
+		  fi
 		fi
 	      else
 		newdeplibs="$newdeplibs $i"
 	      fi
 	    done
 	  else
-	    # Error occured in the first compile.  Let's try to salvage
+	    # Error occurred in the first compile.  Let's try to salvage
 	    # the situation: Compile a separate program for each library.
 	    for i in $deplibs; do
 	      name="`expr $i : '-l\(.*\)'`"
-	     # If $name is empty we are operating on a -L argument.
-             if test "$name" != "" && test "$name" != "0"; then
+	      # If $name is empty we are operating on a -L argument.
+              if test "$name" != "" && test "$name" != "0"; then
 		$rm conftest
 		$LTCC -o conftest conftest.c $i
 		# Did it work?
 		if test "$?" -eq 0 ; then
 		  ldd_output=`ldd conftest`
-		  libname=`eval \\$echo \"$libname_spec\"`
-		  deplib_matches=`eval \\$echo \"$library_names_spec\"`
-		  set dummy $deplib_matches
-		  deplib_match=$2
-		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
-		    newdeplibs="$newdeplibs $i"
-		  else
-		    droppeddeps=yes
-		    echo
-		    echo "*** Warning: dynamic linker does not accept needed library $i."
-		    echo "*** I have the capability to make that library automatically link in when"
-		    echo "*** you link to this library.  But I can only do this if you have a"
-		    echo "*** shared version of the library, which you do not appear to have"
-		    echo "*** because a test_compile did reveal that the linker did not use this one"
-		    echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+		  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		    case " $predeps $postdeps " in
+		    *" $i "*)
+		      newdeplibs="$newdeplibs $i"
+		      i=""
+		      ;;
+		    esac
+		  fi
+		  if test -n "$i" ; then
+		    libname=`eval \\$echo \"$libname_spec\"`
+		    deplib_matches=`eval \\$echo \"$library_names_spec\"`
+		    set dummy $deplib_matches
+		    deplib_match=$2
+		    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		      newdeplibs="$newdeplibs $i"
+		    else
+		      droppeddeps=yes
+		      $echo
+		      $echo "*** Warning: dynamic linker does not accept needed library $i."
+		      $echo "*** I have the capability to make that library automatically link in when"
+		      $echo "*** you link to this library.  But I can only do this if you have a"
+		      $echo "*** shared version of the library, which you do not appear to have"
+		      $echo "*** because a test_compile did reveal that the linker did not use this one"
+		      $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+		    fi
 		  fi
 		else
 		  droppeddeps=yes
-		  echo
-		  echo "*** Warning!  Library $i is needed by this library but I was not able to"
-		  echo "***  make it link in!  You will probably need to install it or some"
-		  echo "*** library that it depends on before this library will be fully"
-		  echo "*** functional.  Installing it before continuing would be even better."
+		  $echo
+		  $echo "*** Warning!  Library $i is needed by this library but I was not able to"
+		  $echo "***  make it link in!  You will probably need to install it or some"
+		  $echo "*** library that it depends on before this library will be fully"
+		  $echo "*** functional.  Installing it before continuing would be even better."
 		fi
 	      else
 		newdeplibs="$newdeplibs $i"
@@ -2974,11 +3518,20 @@ EOF
 	  for a_deplib in $deplibs; do
 	    name="`expr $a_deplib : '-l\(.*\)'`"
 	    # If $name is empty we are operating on a -L argument.
-           if test "$name" != "" && test  "$name" != "0"; then
-	      libname=`eval \\$echo \"$libname_spec\"`
-	      for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
-		    potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
-		    for potent_lib in $potential_libs; do
+            if test "$name" != "" && test  "$name" != "0"; then
+	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		case " $predeps $postdeps " in
+		*" $a_deplib "*)
+		  newdeplibs="$newdeplibs $a_deplib"
+		  a_deplib=""
+		  ;;
+		esac
+	      fi
+	      if test -n "$a_deplib" ; then
+		libname=`eval \\$echo \"$libname_spec\"`
+		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+		  for potent_lib in $potential_libs; do
 		      # Follow soft links.
 		      if ls -lLd "$potent_lib" 2>/dev/null \
 			 | grep " -> " >/dev/null; then
@@ -2997,28 +3550,36 @@ EOF
 			*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
 			esac
 		      done
+		      # It is ok to link against an archive when
+		      # building a shared library.
+		      if $AR -t $potlib > /dev/null 2>&1; then
+		        newdeplibs="$newdeplibs $a_deplib"
+		        a_deplib=""
+		        break 2
+		      fi
 		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
 			 | ${SED} 10q \
-			 | egrep "$file_magic_regex" > /dev/null; then
+			 | $EGREP "$file_magic_regex" > /dev/null; then
 			newdeplibs="$newdeplibs $a_deplib"
 			a_deplib=""
 			break 2
 		      fi
-		    done
-	      done
+		  done
+		done
+	      fi
 	      if test -n "$a_deplib" ; then
 		droppeddeps=yes
-		echo
-		echo "*** Warning: linker path does not have real file for library $a_deplib."
-		echo "*** I have the capability to make that library automatically link in when"
-		echo "*** you link to this library.  But I can only do this if you have a"
-		echo "*** shared version of the library, which you do not appear to have"
-		echo "*** because I did check the linker path looking for a file starting"
+		$echo
+		$echo "*** Warning: linker path does not have real file for library $a_deplib."
+		$echo "*** I have the capability to make that library automatically link in when"
+		$echo "*** you link to this library.  But I can only do this if you have a"
+		$echo "*** shared version of the library, which you do not appear to have"
+		$echo "*** because I did check the linker path looking for a file starting"
 		if test -z "$potlib" ; then
-		  echo "*** with $libname but no candidates were found. (...for file magic test)"
+		  $echo "*** with $libname but no candidates were found. (...for file magic test)"
 		else
-		  echo "*** with $libname and none of the candidates passed a file format test"
-		  echo "*** using a file magic. Last file checked: $potlib"
+		  $echo "*** with $libname and none of the candidates passed a file format test"
+		  $echo "*** using a file magic. Last file checked: $potlib"
 		fi
 	      fi
 	    else
@@ -3034,33 +3595,43 @@ EOF
 	    name="`expr $a_deplib : '-l\(.*\)'`"
 	    # If $name is empty we are operating on a -L argument.
 	    if test -n "$name" && test "$name" != "0"; then
-	      libname=`eval \\$echo \"$libname_spec\"`
-	      for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
-		potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
-		for potent_lib in $potential_libs; do
-		  potlib="$potent_lib" # see symlink-check above in file_magic test
-		  if eval echo \"$potent_lib\" 2>/dev/null \
-		      | ${SED} 10q \
-		      | egrep "$match_pattern_regex" > /dev/null; then
-		    newdeplibs="$newdeplibs $a_deplib"
-		    a_deplib=""
-		    break 2
-		  fi
+	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		case " $predeps $postdeps " in
+		*" $a_deplib "*)
+		  newdeplibs="$newdeplibs $a_deplib"
+		  a_deplib=""
+		  ;;
+		esac
+	      fi
+	      if test -n "$a_deplib" ; then
+		libname=`eval \\$echo \"$libname_spec\"`
+		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+		  for potent_lib in $potential_libs; do
+		    potlib="$potent_lib" # see symlink-check above in file_magic test
+		    if eval $echo \"$potent_lib\" 2>/dev/null \
+		        | ${SED} 10q \
+		        | $EGREP "$match_pattern_regex" > /dev/null; then
+		      newdeplibs="$newdeplibs $a_deplib"
+		      a_deplib=""
+		      break 2
+		    fi
+		  done
 		done
-	      done
+	      fi
 	      if test -n "$a_deplib" ; then
 		droppeddeps=yes
-		echo
-		echo "*** Warning: linker path does not have real file for library $a_deplib."
-		echo "*** I have the capability to make that library automatically link in when"
-		echo "*** you link to this library.  But I can only do this if you have a"
-		echo "*** shared version of the library, which you do not appear to have"
-		echo "*** because I did check the linker path looking for a file starting"
+		$echo
+		$echo "*** Warning: linker path does not have real file for library $a_deplib."
+		$echo "*** I have the capability to make that library automatically link in when"
+		$echo "*** you link to this library.  But I can only do this if you have a"
+		$echo "*** shared version of the library, which you do not appear to have"
+		$echo "*** because I did check the linker path looking for a file starting"
 		if test -z "$potlib" ; then
-		  echo "*** with $libname but no candidates were found. (...for regex pattern test)"
+		  $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
 		else
-		  echo "*** with $libname and none of the candidates passed a file format test"
-		  echo "*** using a regex pattern. Last file checked: $potlib"
+		  $echo "*** with $libname and none of the candidates passed a file format test"
+		  $echo "*** using a regex pattern. Last file checked: $potlib"
 		fi
 	      fi
 	    else
@@ -3071,16 +3642,23 @@ EOF
 	  ;;
 	none | unknown | *)
 	  newdeplibs=""
-	  if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
-	       -e 's/ -[LR][^ ]*//g' -e 's/[ 	]//g' |
-	     grep . >/dev/null; then
-	    echo
+	  tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
+	    -e 's/ -[LR][^ ]*//g'`
+	  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+	    for i in $predeps $postdeps ; do
+	      # can't use Xsed below, because $i might contain '/'
+	      tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
+	    done
+	  fi
+	  if $echo "X $tmp_deplibs" | $Xsed -e 's/[ 	]//g' \
+	    | grep . >/dev/null; then
+	    $echo
 	    if test "X$deplibs_check_method" = "Xnone"; then
-	      echo "*** Warning: inter-library dependencies are not supported in this platform."
+	      $echo "*** Warning: inter-library dependencies are not supported in this platform."
 	    else
-	      echo "*** Warning: inter-library dependencies are not known to be supported."
+	      $echo "*** Warning: inter-library dependencies are not known to be supported."
 	    fi
-	    echo "*** All declared inter-library dependencies are being dropped."
+	    $echo "*** All declared inter-library dependencies are being dropped."
 	    droppeddeps=yes
 	  fi
 	  ;;
@@ -3100,17 +3678,17 @@ EOF
 
 	if test "$droppeddeps" = yes; then
 	  if test "$module" = yes; then
-	    echo
-	    echo "*** Warning: libtool could not satisfy all declared inter-library"
-	    echo "*** dependencies of module $libname.  Therefore, libtool will create"
-	    echo "*** a static module, that should work as long as the dlopening"
-	    echo "*** application is linked with the -dlopen flag."
+	    $echo
+	    $echo "*** Warning: libtool could not satisfy all declared inter-library"
+	    $echo "*** dependencies of module $libname.  Therefore, libtool will create"
+	    $echo "*** a static module, that should work as long as the dlopening"
+	    $echo "*** application is linked with the -dlopen flag."
 	    if test -z "$global_symbol_pipe"; then
-	      echo
-	      echo "*** However, this would only work if libtool was able to extract symbol"
-	      echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
-	      echo "*** not find such a program.  So, this module is probably useless."
-	      echo "*** \`nm' from GNU binutils and a full rebuild may help."
+	      $echo
+	      $echo "*** However, this would only work if libtool was able to extract symbol"
+	      $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+	      $echo "*** not find such a program.  So, this module is probably useless."
+	      $echo "*** \`nm' from GNU binutils and a full rebuild may help."
 	    fi
 	    if test "$build_old_libs" = no; then
 	      oldlibs="$output_objdir/$libname.$libext"
@@ -3120,16 +3698,16 @@ EOF
 	      build_libtool_libs=no
 	    fi
 	  else
-	    echo "*** The inter-library dependencies that have been dropped here will be"
-	    echo "*** automatically added whenever a program is linked with this library"
-	    echo "*** or is declared to -dlopen it."
+	    $echo "*** The inter-library dependencies that have been dropped here will be"
+	    $echo "*** automatically added whenever a program is linked with this library"
+	    $echo "*** or is declared to -dlopen it."
 
 	    if test "$allow_undefined" = no; then
-	      echo
-	      echo "*** Since this library must not contain undefined symbols,"
-	      echo "*** because either the platform does not support them or"
-	      echo "*** it was explicitly requested with -no-undefined,"
-	      echo "*** libtool will only create a static version of it."
+	      $echo
+	      $echo "*** Since this library must not contain undefined symbols,"
+	      $echo "*** because either the platform does not support them or"
+	      $echo "*** it was explicitly requested with -no-undefined,"
+	      $echo "*** libtool will only create a static version of it."
 	      if test "$build_old_libs" = no; then
 		oldlibs="$output_objdir/$libname.$libext"
 		build_libtool_libs=module
@@ -3156,7 +3734,7 @@ EOF
 	  hardcode_libdirs=
 	  dep_rpath=
 	  rpath="$finalize_rpath"
-	  test "$mode" != relink && test "$fast_install" = no && rpath="$compile_rpath$rpath"
+	  test "$mode" != relink && rpath="$compile_rpath$rpath"
 	  for libdir in $rpath; do
 	    if test -n "$hardcode_libdir_flag_spec"; then
 	      if test -n "$hardcode_libdir_separator"; then
@@ -3187,7 +3765,11 @@ EOF
 	  if test -n "$hardcode_libdir_separator" &&
 	     test -n "$hardcode_libdirs"; then
 	    libdir="$hardcode_libdirs"
-	    eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+	    if test -n "$hardcode_libdir_flag_spec_ld"; then
+	      eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+	    else
+	      eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+	    fi
 	  fi
 	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
 	    # We should set the runpath_var.
@@ -3207,6 +3789,7 @@ EOF
 	fi
 
 	# Get the real and link names of the library.
+	eval shared_ext=\"$shrext_cmds\"
 	eval library_names=\"$library_names_spec\"
 	set dummy $library_names
 	realname="$2"
@@ -3236,17 +3819,26 @@ EOF
 	    $show "generating symbol list for \`$libname.la'"
 	    export_symbols="$output_objdir/$libname.exp"
 	    $run $rm $export_symbols
-	    eval cmds=\"$export_symbols_cmds\"
+	    cmds=$export_symbols_cmds
 	    save_ifs="$IFS"; IFS='~'
 	    for cmd in $cmds; do
 	      IFS="$save_ifs"
-	      $show "$cmd"
-	      $run eval "$cmd" || exit $?
+	      eval cmd=\"$cmd\"
+	      if len=`expr "X$cmd" : ".*"` &&
+	       test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	        $show "$cmd"
+	        $run eval "$cmd" || exit $?
+	        skipped_export=false
+	      else
+	        # The command line is too long to execute in one step.
+	        $show "using reloadable object file for export list..."
+	        skipped_export=:
+	      fi
 	    done
 	    IFS="$save_ifs"
 	    if test -n "$export_symbols_regex"; then
-	      $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
-	      $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+	      $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
+	      $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
 	      $show "$mv \"${export_symbols}T\" \"$export_symbols\""
 	      $run eval '$mv "${export_symbols}T" "$export_symbols"'
 	    fi
@@ -3257,47 +3849,30 @@ EOF
 	  $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
 	fi
 
+	tmp_deplibs=
+	for test_deplib in $deplibs; do
+		case " $convenience " in
+		*" $test_deplib "*) ;;
+		*)
+			tmp_deplibs="$tmp_deplibs $test_deplib"
+			;;
+		esac
+	done
+	deplibs="$tmp_deplibs"
+
 	if test -n "$convenience"; then
 	  if test -n "$whole_archive_flag_spec"; then
 	    save_libobjs=$libobjs
 	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
 	  else
 	    gentop="$output_objdir/${outputname}x"
-	    $show "${rm}r $gentop"
-	    $run ${rm}r "$gentop"
-	    $show "$mkdir $gentop"
-	    $run $mkdir "$gentop"
-	    status=$?
-	    if test "$status" -ne 0 && test ! -d "$gentop"; then
-	      exit $status
-	    fi
 	    generated="$generated $gentop"
 
-	    for xlib in $convenience; do
-	      # Extract the objects.
-	      case $xlib in
-	      [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
-	      *) xabs=`pwd`"/$xlib" ;;
-	      esac
-	      xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
-	      xdir="$gentop/$xlib"
-
-	      $show "${rm}r $xdir"
-	      $run ${rm}r "$xdir"
-	      $show "$mkdir $xdir"
-	      $run $mkdir "$xdir"
-	      status=$?
-	      if test "$status" -ne 0 && test ! -d "$xdir"; then
-		exit $status
-	      fi
-	      $show "(cd $xdir && $AR x $xabs)"
-	      $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
-
-	      libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
-	    done
+	    func_extract_archives $gentop $convenience
+	    libobjs="$libobjs $func_extract_archives_result"
 	  fi
 	fi
-
+	
 	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
 	  eval flag=\"$thread_safe_flag_spec\"
 	  linker_flags="$linker_flags $flag"
@@ -3308,23 +3883,26 @@ EOF
 	  $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
 	fi
 
-	# Add all flags from the command line.  We here create a library,
-	# but those flags were only added to compile_command and
-	# finalize_command, which are only used when creating executables.
-	# So do it by hand here.
-	compiler_flags="$compiler_flags $add_flags"
-	# Only add it to commands which use CC, instead of LD, i.e.
-	# only to $compiler_flags
-	#linker_flags="$linker_flags $add_flags"
-
 	# Do each of the archive commands.
+	if test "$module" = yes && test -n "$module_cmds" ; then
+	  if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+	    eval test_cmds=\"$module_expsym_cmds\"
+	    cmds=$module_expsym_cmds
+	  else
+	    eval test_cmds=\"$module_cmds\"
+	    cmds=$module_cmds
+	  fi
+	else
 	if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
-	  eval cmds=\"$archive_expsym_cmds\"
+	  eval test_cmds=\"$archive_expsym_cmds\"
+	  cmds=$archive_expsym_cmds
 	else
-	  eval cmds=\"$archive_cmds\"
+	  eval test_cmds=\"$archive_cmds\"
+	  cmds=$archive_cmds
+	  fi
 	fi
 
-	if len=`expr "X$cmds" : ".*"` &&
+	if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` &&
 	   test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
 	  :
 	else
@@ -3385,6 +3963,15 @@ EOF
 	  test -z "$concat_cmds" || concat_cmds=$concat_cmds~
 	  eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
 
+	  if ${skipped_export-false}; then
+	    $show "generating symbol list for \`$libname.la'"
+	    export_symbols="$output_objdir/$libname.exp"
+	    $run $rm $export_symbols
+	    libobjs=$output
+	    # Append the command to create the export file.
+	    eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
+          fi
+
 	  # Set up a command to remove the reloadale object files
 	  # after they are used.
 	  i=0
@@ -3416,19 +4003,28 @@ EOF
 	  # value of $libobjs for piecewise linking.
 
 	  # Do each of the archive commands.
+	  if test "$module" = yes && test -n "$module_cmds" ; then
+	    if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+	      cmds=$module_expsym_cmds
+	    else
+	      cmds=$module_cmds
+	    fi
+	  else
 	  if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
-	    eval cmds=\"$archive_expsym_cmds\"
+	    cmds=$archive_expsym_cmds
 	  else
-	    eval cmds=\"$archive_cmds\"
+	    cmds=$archive_cmds
+	    fi
 	  fi
 
 	  # Append the command to remove the reloadable object files
 	  # to the just-reset $cmds.
-	  eval cmds=\"\$cmds~$rm $delfiles\"
+	  eval cmds=\"\$cmds~\$rm $delfiles\"
 	fi
 	save_ifs="$IFS"; IFS='~'
 	for cmd in $cmds; do
 	  IFS="$save_ifs"
+	  eval cmd=\"$cmd\"
 	  $show "$cmd"
 	  $run eval "$cmd" || exit $?
 	done
@@ -3437,7 +4033,7 @@ EOF
 	# Restore the uninstalled library and exit
 	if test "$mode" = relink; then
 	  $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
-	  exit 0
+	  exit $EXIT_SUCCESS
 	fi
 
 	# Create links to the real library.
@@ -3485,7 +4081,7 @@ EOF
       *.lo)
 	if test -n "$objs$old_deplibs"; then
 	  $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
-	  exit 1
+	  exit $EXIT_FAILURE
 	fi
 	libobj="$output"
 	obj=`$echo "X$output" | $Xsed -e "$lo2o"`
@@ -3514,38 +4110,10 @@ EOF
 	  eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
 	else
 	  gentop="$output_objdir/${obj}x"
-	  $show "${rm}r $gentop"
-	  $run ${rm}r "$gentop"
-	  $show "$mkdir $gentop"
-	  $run $mkdir "$gentop"
-	  status=$?
-	  if test "$status" -ne 0 && test ! -d "$gentop"; then
-	    exit $status
-	  fi
 	  generated="$generated $gentop"
 
-	  for xlib in $convenience; do
-	    # Extract the objects.
-	    case $xlib in
-	    [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
-	    *) xabs=`pwd`"/$xlib" ;;
-	    esac
-	    xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
-	    xdir="$gentop/$xlib"
-
-	    $show "${rm}r $xdir"
-	    $run ${rm}r "$xdir"
-	    $show "$mkdir $xdir"
-	    $run $mkdir "$xdir"
-	    status=$?
-	    if test "$status" -ne 0 && test ! -d "$xdir"; then
-	      exit $status
-	    fi
-	    $show "(cd $xdir && $AR x $xabs)"
-	    $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
-
-	    reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
-	  done
+	  func_extract_archives $gentop $convenience
+	  reload_conv_objs="$reload_objs $func_extract_archives_result"
 	fi
       fi
 
@@ -3553,10 +4121,11 @@ EOF
       reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
 
       output="$obj"
-      eval cmds=\"$reload_cmds\"
+      cmds=$reload_cmds
       save_ifs="$IFS"; IFS='~'
       for cmd in $cmds; do
 	IFS="$save_ifs"
+	eval cmd=\"$cmd\"
 	$show "$cmd"
 	$run eval "$cmd" || exit $?
       done
@@ -3569,7 +4138,7 @@ EOF
 	  $run ${rm}r $gentop
 	fi
 
-	exit 0
+	exit $EXIT_SUCCESS
       fi
 
       if test "$build_libtool_libs" != yes; then
@@ -3582,17 +4151,18 @@ EOF
 	# accidentally link it into a program.
 	# $show "echo timestamp > $libobj"
 	# $run eval "echo timestamp > $libobj" || exit $?
-	exit 0
+	exit $EXIT_SUCCESS
       fi
 
       if test -n "$pic_flag" || test "$pic_mode" != default; then
 	# Only do commands if we really have different PIC objects.
 	reload_objs="$libobjs $reload_conv_objs"
 	output="$libobj"
-	eval cmds=\"$reload_cmds\"
+	cmds=$reload_cmds
 	save_ifs="$IFS"; IFS='~'
 	for cmd in $cmds; do
 	  IFS="$save_ifs"
+	  eval cmd=\"$cmd\"
 	  $show "$cmd"
 	  $run eval "$cmd" || exit $?
 	done
@@ -3604,12 +4174,12 @@ EOF
 	$run ${rm}r $gentop
       fi
 
-      exit 0
+      exit $EXIT_SUCCESS
       ;;
 
     prog)
       case $host in
-	*cygwin*) output=`echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
+	*cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
       esac
       if test -n "$vinfo"; then
 	$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
@@ -3634,6 +4204,16 @@ EOF
 	;;
       esac
 
+      case $host in
+      *darwin*)
+        # Don't allow lazy linking, it breaks C++ global constructors
+        if test "$tagname" = CXX ; then
+        compile_command="$compile_command ${wl}-bind_at_load"
+        finalize_command="$finalize_command ${wl}-bind_at_load"
+        fi
+        ;;
+      esac
+
       compile_command="$compile_command $compile_deplibs"
       finalize_command="$finalize_command $finalize_deplibs"
 
@@ -3784,12 +4364,12 @@ extern \"C\" {
 	    done
 
 	    if test -n "$exclude_expsyms"; then
-	      $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+	      $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
 	      $run eval '$mv "$nlist"T "$nlist"'
 	    fi
 
 	    if test -n "$export_symbols_regex"; then
-	      $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+	      $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
 	      $run eval '$mv "$nlist"T "$nlist"'
 	    fi
 
@@ -3807,8 +4387,8 @@ extern \"C\" {
 
 	  for arg in $dlprefiles; do
 	    $show "extracting global C symbols from \`$arg'"
-	    name=`echo "$arg" | ${SED} -e 's%^.*/%%'`
-	    $run eval 'echo ": $name " >> "$nlist"'
+	    name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
+	    $run eval '$echo ": $name " >> "$nlist"'
 	    $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
 	  done
 
@@ -3817,12 +4397,18 @@ extern \"C\" {
 	    test -f "$nlist" || : > "$nlist"
 
 	    if test -n "$exclude_expsyms"; then
-	      egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+	      $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
 	      $mv "$nlist"T "$nlist"
 	    fi
 
 	    # Try sorting and uniquifying the output.
-	    if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
+	    if grep -v "^: " < "$nlist" |
+		if sort -k 3 </dev/null >/dev/null 2>&1; then
+		  sort -k 3
+		else
+		  sort +2
+		fi |
+		uniq > "$nlist"S; then
 	      :
 	    else
 	      grep -v "^: " < "$nlist" > "$nlist"S
@@ -3831,7 +4417,7 @@ extern \"C\" {
 	    if test -f "$nlist"S; then
 	      eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
 	    else
-	      echo '/* NONE */' >> "$output_objdir/$dlsyms"
+	      $echo '/* NONE */' >> "$output_objdir/$dlsyms"
 	    fi
 
 	    $echo >> "$output_objdir/$dlsyms" "\
@@ -3906,7 +4492,7 @@ static const void *lt_preloaded_setup() {
 	  ;;
 	*)
 	  $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
-	  exit 1
+	  exit $EXIT_FAILURE
 	  ;;
 	esac
       else
@@ -3919,17 +4505,6 @@ static const void *lt_preloaded_setup() {
 	finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
       fi
 
-      # AIX runtime linking requires linking programs with -Wl,-brtl and libs with -Wl,-G
-      # Also add -bnolibpath to the beginning of the link line, to clear the hardcoded runpath.
-      # Otherwise, things like the -L path to libgcc.a are accidentally hardcoded by ld.
-      # This does not apply on AIX for ia64, which uses a SysV linker.
-      case "$host" in
-        ia64-*-aix5*) ;;
-        *-*-aix4* | *-*-aix5*)
-                   compile_command=`$echo "X$compile_command $wl-brtl" | $Xsed -e "s/\$CC/\$CC $wl-bnolibpath/1"`
-                   finalize_command=`$echo "X$finalize_command $wl-brtl" | $Xsed -e "s/\$CC/\$CC $wl-bnolibpath/1"` ;;
-      esac
-
       if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
 	# Replace the output file specification.
 	compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
@@ -4005,7 +4580,7 @@ static const void *lt_preloaded_setup() {
 	# Link the executable and exit
 	$show "$link_command"
 	$run eval "$link_command" || exit $?
-	exit 0
+	exit $EXIT_SUCCESS
       fi
 
       if test "$hardcode_action" = relink; then
@@ -4060,10 +4635,10 @@ static const void *lt_preloaded_setup() {
       fi
 
       # Quote $echo for shipping.
-      if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
-	case $0 in
-	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
-	*) qecho="$SHELL `pwd`/$0 --fallback-echo";;
+      if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
+	case $progpath in
+	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
+	*) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
 	esac
 	qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
       else
@@ -4075,15 +4650,230 @@ static const void *lt_preloaded_setup() {
 	# win32 will think the script is a binary if it has
 	# a .exe suffix, so we strip it off here.
 	case $output in
-	  *.exe) output=`echo $output|${SED} 's,.exe$,,'` ;;
+	  *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
 	esac
 	# test for cygwin because mv fails w/o .exe extensions
 	case $host in
-	  *cygwin*) exeext=.exe ;;
+	  *cygwin*)
+	    exeext=.exe
+	    outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
 	  *) exeext= ;;
 	esac
+	case $host in
+	  *cygwin* | *mingw* )
+	    cwrappersource=`$echo ${objdir}/lt-${output}.c`
+	    cwrapper=`$echo ${output}.exe`
+	    $rm $cwrappersource $cwrapper
+	    trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+	    cat > $cwrappersource <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+   Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+
+   The $output program cannot be directly executed until all the libtool
+   libraries that it depends on are installed.
+
+   This wrapper executable should never be moved out of the build directory.
+   If it is, it will not operate correctly.
+
+   Currently, it simply execs the wrapper *script* "/bin/sh $output",
+   but could eventually absorb all of the scripts functionality and
+   exec $objdir/$outputname directly.
+*/
+EOF
+	    cat >> $cwrappersource<<"EOF"
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef DIR_SEPARATOR
+#define DIR_SEPARATOR '/'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+  defined (__OS2__)
+#define HAVE_DOS_BASED_FILE_SYSTEM
+#ifndef DIR_SEPARATOR_2
+#define DIR_SEPARATOR_2 '\\'
+#endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+        (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+  if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+const char *program_name = NULL;
+
+void * xmalloc (size_t num);
+char * xstrdup (const char *string);
+char * basename (const char *name);
+char * fnqualify(const char *path);
+char * strendzap(char *str, const char *pat);
+void lt_fatal (const char *message, ...);
+
+int
+main (int argc, char *argv[])
+{
+  char **newargz;
+  int i;
+
+  program_name = (char *) xstrdup ((char *) basename (argv[0]));
+  newargz = XMALLOC(char *, argc+2);
+EOF
+
+	    cat >> $cwrappersource <<EOF
+  newargz[0] = "$SHELL";
+EOF
+
+	    cat >> $cwrappersource <<"EOF"
+  newargz[1] = fnqualify(argv[0]);
+  /* we know the script has the same name, without the .exe */
+  /* so make sure newargz[1] doesn't end in .exe */
+  strendzap(newargz[1],".exe");
+  for (i = 1; i < argc; i++)
+    newargz[i+1] = xstrdup(argv[i]);
+  newargz[argc+1] = NULL;
+EOF
+
+	    cat >> $cwrappersource <<EOF
+  execv("$SHELL",newargz);
+EOF
+
+	    cat >> $cwrappersource <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+  void * p = (void *) malloc (num);
+  if (!p)
+    lt_fatal ("Memory exhausted");
+
+  return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+  return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
+;
+}
+
+char *
+basename (const char *name)
+{
+  const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  /* Skip over the disk name in MSDOS pathnames. */
+  if (isalpha (name[0]) && name[1] == ':')
+    name += 2;
+#endif
+
+  for (base = name; *name; name++)
+    if (IS_DIR_SEPARATOR (*name))
+      base = name + 1;
+  return (char *) base;
+}
+
+char *
+fnqualify(const char *path)
+{
+  size_t size;
+  char *p;
+  char tmp[LT_PATHMAX + 1];
+
+  assert(path != NULL);
+
+  /* Is it qualified already? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  if (isalpha (path[0]) && path[1] == ':')
+    return xstrdup (path);
+#endif
+  if (IS_DIR_SEPARATOR (path[0]))
+    return xstrdup (path);
+
+  /* prepend the current directory */
+  /* doesn't handle '~' */
+  if (getcwd (tmp, LT_PATHMAX) == NULL)
+    lt_fatal ("getcwd failed");
+  size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
+  p = XMALLOC(char, size);
+  sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
+  return p;
+}
+
+char *
+strendzap(char *str, const char *pat)
+{
+  size_t len, patlen;
+
+  assert(str != NULL);
+  assert(pat != NULL);
+
+  len = strlen(str);
+  patlen = strlen(pat);
+
+  if (patlen <= len)
+  {
+    str += len - patlen;
+    if (strcmp(str, pat) == 0)
+      *str = '\0';
+  }
+  return str;
+}
+
+static void
+lt_error_core (int exit_status, const char * mode,
+          const char * message, va_list ap)
+{
+  fprintf (stderr, "%s: %s: ", program_name, mode);
+  vfprintf (stderr, message, ap);
+  fprintf (stderr, ".\n");
+
+  if (exit_status >= 0)
+    exit (exit_status);
+}
+
+void
+lt_fatal (const char *message, ...)
+{
+  va_list ap;
+  va_start (ap, message);
+  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
+  va_end (ap);
+}
+EOF
+	  # we should really use a build-platform specific compiler
+	  # here, but OTOH, the wrappers (shell script and this C one)
+	  # are only useful if you want to execute the "real" binary.
+	  # Since the "real" binary is built for $host, then this
+	  # wrapper might as well be built for $host, too.
+	  $run $LTCC -s -o $cwrapper $cwrappersource
+	  ;;
+	esac
 	$rm $output
-	trap "$rm $output; exit 1" 1 2 15
+	trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
 
 	$echo > $output "\
 #! $SHELL
@@ -4104,7 +4894,7 @@ sed_quote_subst='$sed_quote_subst'
 
 # The HP-UX ksh and POSIX shell print the target directory to stdout
 # if CDPATH is set.
-if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
 relink_command=\"$relink_command\"
 
@@ -4159,7 +4949,7 @@ else
 "
 
 	if test "$fast_install" = yes; then
-	  echo >> $output "\
+	  $echo >> $output "\
   program=lt-'$outputname'$exeext
   progdir=\"\$thisdir/$objdir\"
 
@@ -4175,7 +4965,7 @@ else
       $rm \"\$progdir/\$file\"
     fi"
 
-	  echo >> $output "\
+	  $echo >> $output "\
 
     # relink executable if necessary
     if test -n \"\$relink_command\"; then
@@ -4183,7 +4973,7 @@ else
       else
 	$echo \"\$relink_command_output\" >&2
 	$rm \"\$progdir/\$file\"
-	exit 1
+	exit $EXIT_FAILURE
       fi
     fi
 
@@ -4193,13 +4983,13 @@ else
     $rm \"\$progdir/\$file\"
   fi"
 	else
-	  echo >> $output "\
+	  $echo >> $output "\
   program='$outputname'
   progdir=\"\$thisdir/$objdir\"
 "
 	fi
 
-	echo >> $output "\
+	$echo >> $output "\
 
   if test -f \"\$progdir/\$program\"; then"
 
@@ -4230,14 +5020,6 @@ else
       # Run the actual program with our arguments.
 "
 	case $host in
-	# win32 systems need to use the prog path for dll
-	# lookup to work
-	*-*-cygwin* | *-*-pw32*)
-	  $echo >> $output "\
-      exec \$progdir/\$program \${1+\"\$@\"}
-"
-	  ;;
-
 	# Backslashes separate directories on plain windows
 	*-*-mingw | *-*-os2*)
 	  $echo >> $output "\
@@ -4247,30 +5029,26 @@ else
 
 	*)
 	  $echo >> $output "\
-      # Export the path to the program.
-      PATH=\"\$progdir:\$PATH\"
-      export PATH
-
-      exec \$program \${1+\"\$@\"}
+      exec \$progdir/\$program \${1+\"\$@\"}
 "
 	  ;;
 	esac
 	$echo >> $output "\
       \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
-      exit 1
+      exit $EXIT_FAILURE
     fi
   else
     # The program doesn't exist.
     \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
     \$echo \"This script is just a wrapper for \$program.\" 1>&2
-    echo \"See the $PACKAGE documentation for more information.\" 1>&2
-    exit 1
+    $echo \"See the $PACKAGE documentation for more information.\" 1>&2
+    exit $EXIT_FAILURE
   fi
 fi\
 "
 	chmod +x $output
       fi
-      exit 0
+      exit $EXIT_SUCCESS
       ;;
     esac
 
@@ -4286,7 +5064,6 @@ fi\
 	  oldobjs="$libobjs_save"
 	  build_libtool_libs=no
 	else
-	  #oldobjs="$oldobjs$old_deplibs $non_pic_objects"
 	  oldobjs="$old_deplibs $non_pic_objects"
 	fi
 	addlibs="$old_convenience"
@@ -4294,52 +5071,21 @@ fi\
 
       if test -n "$addlibs"; then
 	gentop="$output_objdir/${outputname}x"
-	$show "${rm}r $gentop"
-	$run ${rm}r "$gentop"
-	$show "$mkdir $gentop"
-	$run $mkdir "$gentop"
-	status=$?
-	if test "$status" -ne 0 && test ! -d "$gentop"; then
-	  exit $status
-	fi
 	generated="$generated $gentop"
 
-	# Add in members from convenience archives.
-	for xlib in $addlibs; do
-	  # Extract the objects.
-	  case $xlib in
-	  [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
-	  *) xabs=`pwd`"/$xlib" ;;
-	  esac
-	  xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
-	  xdir="$gentop/$xlib"
-
-	  $show "${rm}r $xdir"
-	  $run ${rm}r "$xdir"
-	  $show "$mkdir $xdir"
-	  $run $mkdir "$xdir"
-	  status=$?
-	  if test "$status" -ne 0 && test ! -d "$xdir"; then
-	    exit $status
-	  fi
-	  $show "(cd $xdir && $AR x $xabs)"
-	  $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
-
-	  oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
-	done
+	func_extract_archives $gentop $addlibs
+	oldobjs="$oldobjs $func_extract_archives_result"
       fi
 
-      compiler_flags="$compiler_flags $add_flags"
-
       # Do each command in the archive commands.
       if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
-	eval cmds=\"$old_archive_from_new_cmds\"
+       cmds=$old_archive_from_new_cmds
       else
 	eval cmds=\"$old_archive_cmds\"
 
 	if len=`expr "X$cmds" : ".*"` &&
 	     test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
-	  :
+	  cmds=$old_archive_cmds
 	else
 	  # the command line is too long to link in one step, link in parts
 	  $echo "using piecewise archive linking..."
@@ -4348,6 +5094,25 @@ fi\
 	  objlist=
 	  concat_cmds=
 	  save_oldobjs=$oldobjs
+	  # GNU ar 2.10+ was changed to match POSIX; thus no paths are
+	  # encoded into archives.  This makes 'ar r' malfunction in
+	  # this piecewise linking case whenever conflicting object
+	  # names appear in distinct ar calls; check, warn and compensate.
+	    if (for obj in $save_oldobjs
+	    do
+	      $echo "X$obj" | $Xsed -e 's%^.*/%%'
+	    done | sort | sort -uc >/dev/null 2>&1); then
+	    :
+	  else
+	    $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
+	    $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
+	    AR_FLAGS=cq
+	  fi
+	  # Is there a better way of finding the last object in the list?
+	  for obj in $save_oldobjs
+	  do
+	    last_oldobj=$obj
+	  done
 	  for obj in $save_oldobjs
 	  do
 	    oldobjs="$objlist $obj"
@@ -4359,6 +5124,9 @@ fi\
 	    else
 	      # the above command should be used before it gets too long
 	      oldobjs=$objlist
+	      if test "$obj" = "$last_oldobj" ; then
+	        RANLIB=$save_RANLIB
+	      fi
 	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
 	      eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
 	      objlist=
@@ -4366,11 +5134,16 @@ fi\
 	  done
 	  RANLIB=$save_RANLIB
 	  oldobjs=$objlist
-	  eval cmds=\"\$concat_cmds~$old_archive_cmds\"
+	  if test "X$oldobjs" = "X" ; then
+	    eval cmds=\"\$concat_cmds\"
+	  else
+	    eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+	  fi
 	fi
       fi
       save_ifs="$IFS"; IFS='~'
       for cmd in $cmds; do
+        eval cmd=\"$cmd\"
 	IFS="$save_ifs"
 	$show "$cmd"
 	$run eval "$cmd" || exit $?
@@ -4402,8 +5175,12 @@ fi\
 	fi
       done
       # Quote the link command for shipping.
-      relink_command="($relink_command; cd `pwd`; $SHELL $0 --mode=relink $libtool_args)"
+      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
       relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+      if test "$hardcode_automatic" = yes ; then
+	relink_command=
+      fi
+
 
       # Only create the output if not a dry run.
       if test -z "$run"; then
@@ -4422,11 +5199,52 @@ fi\
 		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
 		if test -z "$libdir"; then
 		  $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
-		  exit 1
+		  exit $EXIT_FAILURE
+		fi
+		# We do not want portage's install root ($D) present.  Check only for
+		# this if the .la is being installed.
+		if test "$installed" = yes && test "$D"; then
+		  eval mynewdependency_lib=`echo "$libdir/$name" |sed -e "s:$D::g" -e 's://:/:g'`
+		else
+		  mynewdependency_lib="$libdir/$name"
+		fi
+		# Do not add duplicates
+		if test "$mynewdependency_lib"; then
+		  my_little_ninja_foo_1=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"`
+		  if test -z "$my_little_ninja_foo_1"; then
+		    newdependency_libs="$newdependency_libs $mynewdependency_lib"
+		  fi
+		fi
+		;;
+		  *)
+		if test "$installed" = yes; then
+		  # Rather use S=WORKDIR if our version of portage supports it.
+		  # This is because some ebuild (gcc) do not use $S as buildroot.
+		  if test "$PWORKDIR"; then
+		    S="$PWORKDIR"
+		  fi
+		  # We do not want portage's build root ($S) present.
+		  my_little_ninja_foo_2=`echo $deplib |$EGREP -e "$S"`
+		  if test -n "$my_little_ninja_foo_2" && test "$S"; then
+		    mynewdependency_lib=""
+		  # We do not want portage's install root ($D) present.
+		  my_little_ninja_foo_3=`echo $deplib |$EGREP -e "$D"`
+		  elif test -n "$my_little_ninja_foo_3" && test "$D"; then
+		    eval mynewdependency_lib=`echo "$deplib" |sed -e "s:$D::g" -e 's://:/:g'`
+		  else
+		    mynewdependency_lib="$deplib"
+		  fi
+		else
+		  mynewdependency_lib="$deplib"
+		fi
+		# Do not add duplicates
+		if test "$mynewdependency_lib"; then
+		  my_little_ninja_foo_4=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"`
+		  if test -z "$my_little_ninja_foo_4"; then
+			newdependency_libs="$newdependency_libs $mynewdependency_lib"
+		  fi
 		fi
-		newdependency_libs="$newdependency_libs $libdir/$name"
 		;;
-	      *) newdependency_libs="$newdependency_libs $deplib" ;;
 	      esac
 	    done
 	    dependency_libs="$newdependency_libs"
@@ -4436,7 +5254,7 @@ fi\
 	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
 	      if test -z "$libdir"; then
 		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-		exit 1
+		exit $EXIT_FAILURE
 	      fi
 	      newdlfiles="$newdlfiles $libdir/$name"
 	    done
@@ -4447,18 +5265,41 @@ fi\
 	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
 	      if test -z "$libdir"; then
 		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-		exit 1
+		exit $EXIT_FAILURE
 	      fi
 	      newdlprefiles="$newdlprefiles $libdir/$name"
 	    done
 	    dlprefiles="$newdlprefiles"
+	  else
+	    newdlfiles=
+	    for lib in $dlfiles; do
+	      case $lib in
+		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+		*) abs=`pwd`"/$lib" ;;
+	      esac
+	      newdlfiles="$newdlfiles $abs"
+	    done
+	    dlfiles="$newdlfiles"
+	    newdlprefiles=
+	    for lib in $dlprefiles; do
+	      case $lib in
+		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+		*) abs=`pwd`"/$lib" ;;
+	      esac
+	      newdlprefiles="$newdlprefiles $abs"
+	    done
+	    dlprefiles="$newdlprefiles"
 	  fi
 	  $rm $output
 	  # place dlname in correct position for cygwin
 	  tdlname=$dlname
 	  case $host,$output,$installed,$module,$dlname in
-	    *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
 	  esac
+	  # Do not add duplicates
+	  if test "$installed" = yes && test "$D"; then
+	    install_libdir=`echo "$install_libdir" |sed -e "s:$D::g" -e 's://:/:g'`
+	  fi
 	  $echo > $output "\
 # $outputname - a libtool library file
 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
@@ -4486,13 +5327,16 @@ revision=$revision
 # Is this an already installed library?
 installed=$installed
 
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
 # Files to dlopen/dlpreopen
 dlopen='$dlfiles'
 dlpreopen='$dlprefiles'
 
 # Directory that this library needs to be installed in:
 libdir='$install_libdir'"
-	  if test "$installed" = no && test "$need_relink" = yes && test "$fast_install" = no; then
+	  if test "$installed" = no && test "$need_relink" = yes; then
 	    $echo >> $output "\
 relink_command=\"$relink_command\""
 	  fi
@@ -4505,7 +5349,7 @@ relink_command=\"$relink_command\""
       $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
       ;;
     esac
-    exit 0
+    exit $EXIT_SUCCESS
     ;;
 
   # libtool install mode
@@ -4594,13 +5438,13 @@ relink_command=\"$relink_command\""
     if test -z "$install_prog"; then
       $echo "$modename: you must specify an install program" 1>&2
       $echo "$help" 1>&2
-      exit 1
+      exit $EXIT_FAILURE
     fi
 
     if test -n "$prev"; then
       $echo "$modename: the \`$prev' option requires an argument" 1>&2
       $echo "$help" 1>&2
-      exit 1
+      exit $EXIT_FAILURE
     fi
 
     if test -z "$files"; then
@@ -4610,7 +5454,7 @@ relink_command=\"$relink_command\""
 	$echo "$modename: you must specify a destination" 1>&2
       fi
       $echo "$help" 1>&2
-      exit 1
+      exit $EXIT_FAILURE
     fi
 
     # Strip any trailing slash from the destination.
@@ -4631,7 +5475,7 @@ relink_command=\"$relink_command\""
       if test "$#" -gt 2; then
 	$echo "$modename: \`$dest' is not a directory" 1>&2
 	$echo "$help" 1>&2
-	exit 1
+	exit $EXIT_FAILURE
       fi
     fi
     case $destdir in
@@ -4643,7 +5487,7 @@ relink_command=\"$relink_command\""
 	*)
 	  $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
 	  $echo "$help" 1>&2
-	  exit 1
+	  exit $EXIT_FAILURE
 	  ;;
 	esac
       done
@@ -4668,11 +5512,11 @@ relink_command=\"$relink_command\""
 
       *.la)
 	# Check to see that this really is a libtool archive.
-	if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
 	else
 	  $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
 	  $echo "$help" 1>&2
-	  exit 1
+	  exit $EXIT_FAILURE
 	fi
 
 	library_names=
@@ -4703,12 +5547,33 @@ relink_command=\"$relink_command\""
 	dir="$dir$objdir"
 
 	if test -n "$relink_command"; then
+	  # Determine the prefix the user has applied to our future dir.
+	  inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
+
+	  # Don't allow the user to place us outside of our expected
+	  # location b/c this prevents finding dependent libraries that
+	  # are installed to the same prefix.
+	  # At present, this check doesn't affect windows .dll's that
+	  # are installed into $libdir/../bin (currently, that works fine)
+	  # but it's something to keep an eye on.
+	  if test "$inst_prefix_dir" = "$destdir"; then
+	    $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+
+	  if test -n "$inst_prefix_dir"; then
+	    # Stick the inst_prefix_dir data into the link command.
+	    relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+	  else
+	    relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+	  fi
+
 	  $echo "$modename: warning: relinking \`$file'" 1>&2
 	  $show "$relink_command"
 	  if $run eval "$relink_command"; then :
 	  else
 	    $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
-	    continue
+	    exit $EXIT_FAILURE
 	  fi
 	fi
 
@@ -4743,10 +5608,11 @@ relink_command=\"$relink_command\""
 
 	  # Do each command in the postinstall commands.
 	  lib="$destdir/$realname"
-	  eval cmds=\"$postinstall_cmds\"
+	  cmds=$postinstall_cmds
 	  save_ifs="$IFS"; IFS='~'
 	  for cmd in $cmds; do
 	    IFS="$save_ifs"
+	    eval cmd=\"$cmd\"
 	    $show "$cmd"
 	    $run eval "$cmd" || exit $?
 	  done
@@ -4786,7 +5652,7 @@ relink_command=\"$relink_command\""
 	*)
 	  $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
 	  $echo "$help" 1>&2
-	  exit 1
+	  exit $EXIT_FAILURE
 	  ;;
 	esac
 
@@ -4804,7 +5670,7 @@ relink_command=\"$relink_command\""
 	  $show "$install_prog $staticobj $staticdest"
 	  $run eval "$install_prog \$staticobj \$staticdest" || exit $?
 	fi
-	exit 0
+	exit $EXIT_SUCCESS
 	;;
 
       *)
@@ -4816,29 +5682,49 @@ relink_command=\"$relink_command\""
 	  destfile="$destdir/$destfile"
 	fi
 
+	# If the file is missing, and there is a .exe on the end, strip it
+	# because it is most likely a libtool script we actually want to
+	# install
+	stripped_ext=""
+	case $file in
+	  *.exe)
+	    if test ! -f "$file"; then
+	      file=`$echo $file|${SED} 's,.exe$,,'`
+	      stripped_ext=".exe"
+	    fi
+	    ;;
+	esac
+
 	# Do a test to see if this is really a libtool program.
 	case $host in
 	*cygwin*|*mingw*)
-	    wrapper=`echo $file | ${SED} -e 's,.exe$,,'`
+	    wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
 	    ;;
 	*)
 	    wrapper=$file
 	    ;;
 	esac
-	if (${SED} -e '4q' $wrapper | egrep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
+	if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
 	  notinst_deplibs=
 	  relink_command=
 
+	  # To insure that "foo" is sourced, and not "foo.exe",
+	  # finese the cygwin/MSYS system by explicitly sourcing "foo."
+	  # which disallows the automatic-append-.exe behavior.
+	  case $build in
+	  *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
+	  *) wrapperdot=${wrapper} ;;
+	  esac
 	  # If there is no directory component, then add one.
 	  case $file in
-	  */* | *\\*) . $wrapper ;;
-	  *) . ./$wrapper ;;
+	  */* | *\\*) . ${wrapperdot} ;;
+	  *) . ./${wrapperdot} ;;
 	  esac
 
 	  # Check the variables that should have been set.
 	  if test -z "$notinst_deplibs"; then
 	    $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
-	    exit 1
+	    exit $EXIT_FAILURE
 	  fi
 
 	  finalize=yes
@@ -4860,10 +5746,17 @@ relink_command=\"$relink_command\""
 	  done
 
 	  relink_command=
+	  # To insure that "foo" is sourced, and not "foo.exe",
+	  # finese the cygwin/MSYS system by explicitly sourcing "foo."
+	  # which disallows the automatic-append-.exe behavior.
+	  case $build in
+	  *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
+	  *) wrapperdot=${wrapper} ;;
+	  esac
 	  # If there is no directory component, then add one.
 	  case $file in
-	  */* | *\\*) . $file ;;
-	  *) . ./$file ;;
+	  */* | *\\*) . ${wrapperdot} ;;
+	  *) . ./${wrapperdot} ;;
 	  esac
 
 	  outputname=
@@ -4872,12 +5765,16 @@ relink_command=\"$relink_command\""
 	      tmpdir="/tmp"
 	      test -n "$TMPDIR" && tmpdir="$TMPDIR"
 	      tmpdir="$tmpdir/libtool-$$"
-	      if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
+	      save_umask=`umask`
+	      umask 0077
+	      if $mkdir "$tmpdir"; then
+	        umask $save_umask
 	      else
+	        umask $save_umask
 		$echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
 		continue
 	      fi
-	      file=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+	      file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
 	      outputname="$tmpdir/$file"
 	      # Replace the output file specification.
 	      relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
@@ -4895,7 +5792,7 @@ relink_command=\"$relink_command\""
 	    fi
 	  else
 	    # Install the binary that we compiled earlier.
-	    file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+	    file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
 	  fi
 	fi
 
@@ -4911,7 +5808,7 @@ relink_command=\"$relink_command\""
 	    destfile=$destfile.exe
 	    ;;
 	  *:*.exe)
-	    destfile=`echo $destfile | ${SED} -e 's,.exe$,,'`
+	    destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
 	    ;;
 	  esac
 	  ;;
@@ -4932,16 +5829,17 @@ relink_command=\"$relink_command\""
       $show "$install_prog $file $oldlib"
       $run eval "$install_prog \$file \$oldlib" || exit $?
 
-      if test -n "$stripme" && test -n "$striplib"; then
+      if test -n "$stripme" && test -n "$old_striplib"; then
 	$show "$old_striplib $oldlib"
 	$run eval "$old_striplib $oldlib" || exit $?
       fi
 
       # Do each command in the postinstall commands.
-      eval cmds=\"$old_postinstall_cmds\"
+      cmds=$old_postinstall_cmds
       save_ifs="$IFS"; IFS='~'
       for cmd in $cmds; do
 	IFS="$save_ifs"
+	eval cmd=\"$cmd\"
 	$show "$cmd"
 	$run eval "$cmd" || exit $?
       done
@@ -4955,9 +5853,9 @@ relink_command=\"$relink_command\""
     if test -n "$current_libdirs"; then
       # Maybe just do a dry run.
       test -n "$run" && current_libdirs=" -n$current_libdirs"
-      exec_cmd='$SHELL $0 --finish$current_libdirs'
+      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
     else
-      exit 0
+      exit $EXIT_SUCCESS
     fi
     ;;
 
@@ -4976,10 +5874,11 @@ relink_command=\"$relink_command\""
       for libdir in $libdirs; do
 	if test -n "$finish_cmds"; then
 	  # Do each command in the finish commands.
-	  eval cmds=\"$finish_cmds\"
+	  cmds=$finish_cmds
 	  save_ifs="$IFS"; IFS='~'
 	  for cmd in $cmds; do
 	    IFS="$save_ifs"
+	    eval cmd=\"$cmd\"
 	    $show "$cmd"
 	    $run eval "$cmd" || admincmds="$admincmds
        $cmd"
@@ -4996,43 +5895,43 @@ relink_command=\"$relink_command\""
     fi
 
     # Exit here if they wanted silent mode.
-    exit 0
+    test "$show" = : && exit $EXIT_SUCCESS
 
-    echo "----------------------------------------------------------------------"
-    echo "Libraries have been installed in:"
+    $echo "----------------------------------------------------------------------"
+    $echo "Libraries have been installed in:"
     for libdir in $libdirs; do
-      echo "   $libdir"
+      $echo "   $libdir"
     done
-    echo
-    echo "If you ever happen to want to link against installed libraries"
-    echo "in a given directory, LIBDIR, you must either use libtool, and"
-    echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
-    echo "flag during linking and do at least one of the following:"
+    $echo
+    $echo "If you ever happen to want to link against installed libraries"
+    $echo "in a given directory, LIBDIR, you must either use libtool, and"
+    $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
+    $echo "flag during linking and do at least one of the following:"
     if test -n "$shlibpath_var"; then
-      echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
-      echo "     during execution"
+      $echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
+      $echo "     during execution"
     fi
     if test -n "$runpath_var"; then
-      echo "   - add LIBDIR to the \`$runpath_var' environment variable"
-      echo "     during linking"
+      $echo "   - add LIBDIR to the \`$runpath_var' environment variable"
+      $echo "     during linking"
     fi
     if test -n "$hardcode_libdir_flag_spec"; then
       libdir=LIBDIR
       eval flag=\"$hardcode_libdir_flag_spec\"
 
-      echo "   - use the \`$flag' linker flag"
+      $echo "   - use the \`$flag' linker flag"
     fi
     if test -n "$admincmds"; then
-      echo "   - have your system administrator run these commands:$admincmds"
+      $echo "   - have your system administrator run these commands:$admincmds"
     fi
     if test -f /etc/ld.so.conf; then
-      echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+      $echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
     fi
-    echo
-    echo "See any operating system documentation about shared libraries for"
-    echo "more information, such as the ld(1) and ld.so(8) manual pages."
-    echo "----------------------------------------------------------------------"
-    exit 0
+    $echo
+    $echo "See any operating system documentation about shared libraries for"
+    $echo "more information, such as the ld(1) and ld.so(8) manual pages."
+    $echo "----------------------------------------------------------------------"
+    exit $EXIT_SUCCESS
     ;;
 
   # libtool execute mode
@@ -5044,7 +5943,7 @@ relink_command=\"$relink_command\""
     if test -z "$cmd"; then
       $echo "$modename: you must specify a COMMAND" 1>&2
       $echo "$help"
-      exit 1
+      exit $EXIT_FAILURE
     fi
 
     # Handle -dlopen flags immediately.
@@ -5052,18 +5951,18 @@ relink_command=\"$relink_command\""
       if test ! -f "$file"; then
 	$echo "$modename: \`$file' is not a file" 1>&2
 	$echo "$help" 1>&2
-	exit 1
+	exit $EXIT_FAILURE
       fi
 
       dir=
       case $file in
       *.la)
 	# Check to see that this really is a libtool archive.
-	if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
 	else
 	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
 	  $echo "$help" 1>&2
-	  exit 1
+	  exit $EXIT_FAILURE
 	fi
 
 	# Read the libtool library.
@@ -5090,7 +5989,7 @@ relink_command=\"$relink_command\""
 	  dir="$dir/$objdir"
 	else
 	  $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
-	  exit 1
+	  exit $EXIT_FAILURE
 	fi
 	;;
 
@@ -5130,7 +6029,7 @@ relink_command=\"$relink_command\""
       -*) ;;
       *)
 	# Do a test to see if this is really a libtool program.
-	if (${SED} -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
 	  # If there is no directory component, then add one.
 	  case $file in
 	  */* | *\\*) . $file ;;
@@ -5153,7 +6052,7 @@ relink_command=\"$relink_command\""
 	eval "export $shlibpath_var"
       fi
 
-      # Restore saved enviroment variables
+      # Restore saved environment variables
       if test "${save_LC_ALL+set}" = set; then
 	LC_ALL="$save_LC_ALL"; export LC_ALL
       fi
@@ -5170,7 +6069,7 @@ relink_command=\"$relink_command\""
 	$echo "export $shlibpath_var"
       fi
       $echo "$cmd$args"
-      exit 0
+      exit $EXIT_SUCCESS
     fi
     ;;
 
@@ -5198,18 +6097,19 @@ relink_command=\"$relink_command\""
     if test -z "$rm"; then
       $echo "$modename: you must specify an RM program" 1>&2
       $echo "$help" 1>&2
-      exit 1
+      exit $EXIT_FAILURE
     fi
 
     rmdirs=
 
+    origobjdir="$objdir"
     for file in $files; do
       dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
       if test "X$dir" = "X$file"; then
 	dir=.
-	objdir="$objdir"
+	objdir="$origobjdir"
       else
-	objdir="$dir/$objdir"
+	objdir="$dir/$origobjdir"
       fi
       name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
       test "$mode" = uninstall && objdir="$dir"
@@ -5239,7 +6139,7 @@ relink_command=\"$relink_command\""
       case $name in
       *.la)
 	# Possibly a libtool archive, so verify it.
-	if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
 	  . $dir/$name
 
 	  # Delete the libtool libraries and symlinks.
@@ -5252,10 +6152,11 @@ relink_command=\"$relink_command\""
 	  if test "$mode" = uninstall; then
 	    if test -n "$library_names"; then
 	      # Do each command in the postuninstall commands.
-	      eval cmds=\"$postuninstall_cmds\"
+	      cmds=$postuninstall_cmds
 	      save_ifs="$IFS"; IFS='~'
 	      for cmd in $cmds; do
 		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
 		$show "$cmd"
 		$run eval "$cmd"
 		if test "$?" -ne 0 && test "$rmforce" != yes; then
@@ -5267,10 +6168,11 @@ relink_command=\"$relink_command\""
 
 	    if test -n "$old_library"; then
 	      # Do each command in the old_postuninstall commands.
-	      eval cmds=\"$old_postuninstall_cmds\"
+	      cmds=$old_postuninstall_cmds
 	      save_ifs="$IFS"; IFS='~'
 	      for cmd in $cmds; do
 		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
 		$show "$cmd"
 		$run eval "$cmd"
 		if test "$?" -ne 0 && test "$rmforce" != yes; then
@@ -5286,7 +6188,7 @@ relink_command=\"$relink_command\""
 
       *.lo)
 	# Possibly a libtool object, so verify it.
-	if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
 
 	  # Read the .lo file
 	  . $dir/$name
@@ -5306,15 +6208,31 @@ relink_command=\"$relink_command\""
 	;;
 
       *)
-	# Do a test to see if this is a libtool program.
-	if test "$mode" = clean &&
-	   (${SED} -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-	  relink_command=
-	  . $dir/$file
+	if test "$mode" = clean ; then
+	  noexename=$name
+	  case $file in
+	  *.exe)
+	    file=`$echo $file|${SED} 's,.exe$,,'`
+	    noexename=`$echo $name|${SED} 's,.exe$,,'`
+	    # $file with .exe has already been added to rmfiles,
+	    # add $file without .exe
+	    rmfiles="$rmfiles $file"
+	    ;;
+	  esac
+	  # Do a test to see if this is a libtool program.
+	  if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	    relink_command=
+	    . $dir/$noexename
 
-	  rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
-	  if test "$fast_install" = yes && test -n "$relink_command"; then
-	    rmfiles="$rmfiles $objdir/lt-$name"
+	    # note $name still contains .exe if it was in $file originally
+	    # as does the version of $file that was added into $rmfiles
+	    rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+	    if test "$fast_install" = yes && test -n "$relink_command"; then
+	      rmfiles="$rmfiles $objdir/lt-$name"
+	    fi
+	    if test "X$noexename" != "X$name" ; then
+	      rmfiles="$rmfiles $objdir/lt-${noexename}.c"
+	    fi
 	  fi
 	fi
 	;;
@@ -5322,6 +6240,7 @@ relink_command=\"$relink_command\""
       $show "$rm $rmfiles"
       $run $rm $rmfiles || exit_status=1
     done
+    objdir="$origobjdir"
 
     # Try to remove the ${objdir}s in the directories where we deleted files
     for dir in $rmdirs; do
@@ -5337,20 +6256,20 @@ relink_command=\"$relink_command\""
   "")
     $echo "$modename: you must specify a MODE" 1>&2
     $echo "$generic_help" 1>&2
-    exit 1
+    exit $EXIT_FAILURE
     ;;
   esac
 
   if test -z "$exec_cmd"; then
     $echo "$modename: invalid operation mode \`$mode'" 1>&2
     $echo "$generic_help" 1>&2
-    exit 1
+    exit $EXIT_FAILURE
   fi
 fi # test -z "$show_help"
 
 if test -n "$exec_cmd"; then
   eval exec $exec_cmd
-  exit 1
+  exit $EXIT_FAILURE
 fi
 
 # We need to display help for each of the modes.
@@ -5383,8 +6302,10 @@ MODE must be one of the following:
       uninstall       remove libraries from an installed directory
 
 MODE-ARGS vary depending on the MODE.  Try \`$modename --help --mode=MODE' for
-a more detailed description of MODE."
-  exit 0
+a more detailed description of MODE.
+
+Report bugs to <bug-libtool at gnu.org>."
+  exit $EXIT_SUCCESS
   ;;
 
 clean)
@@ -5496,6 +6417,8 @@ The following components of LINK-COMMAND are treated specially:
   -no-undefined     declare that a library does not refer to external symbols
   -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
   -objectlist FILE  Use a list of object files found in FILE to specify objects
+  -precious-files-regex REGEX
+                    don't remove output files matching REGEX
   -release RELEASE  specify package release information
   -rpath LIBDIR     the created library will eventually be installed in LIBDIR
   -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
@@ -5537,14 +6460,14 @@ Otherwise, only FILE itself is deleted using RM."
 *)
   $echo "$modename: invalid operation mode \`$mode'" 1>&2
   $echo "$help" 1>&2
-  exit 1
+  exit $EXIT_FAILURE
   ;;
 esac
 
-echo
+$echo
 $echo "Try \`$modename --help' for more information about other modes."
 
-exit 0
+exit $EXIT_SUCCESS
 
 # The TAGs below are defined such that we never get into a situation
 # in which we disable both kinds of libraries.  Given conflicting
@@ -5563,7 +6486,7 @@ build_old_libs=yes
 # ### END LIBTOOL TAG CONFIG: disable-shared
 
 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
-build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
 # ### END LIBTOOL TAG CONFIG: disable-static
 
 # Local Variables:
diff --git a/admin/missing b/missing
similarity index 100%
rename from admin/missing
rename to missing
diff --git a/admin/mkinstalldirs b/mkinstalldirs
similarity index 100%
rename from admin/mkinstalldirs
rename to mkinstalldirs
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..878e25f
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,57 @@
+bin_PROGRAMS = linpsk
+linpsk_SOURCES = linpsk.cpp addrxwindow.h bpskdemodulator.h bpskmodulator.h \
+	cdemodulator.h cledbutton.h cmodulator.h color.h constants.h controlpanel.h \
+	cpskdemodulator.h crecording.h crxchannel.h crxdisplay.h crxwindow.h csound.h csquelch.h \
+	ctrigger.h ctxbuffer.h ctxdisplay.h ctxfunctions.h ctxwindow.h deinterleaver.h \
+	deletemacro.h editmacro.h feccoder.h fircoeffs.h firfilter.h frequencyselect.h \
+	fskdemodulator.h fskmodulator.h input.h interleaver.h linpsk.h macros.h macrowindow.h \
+	mfskdemodulator.h mfskmodulator.h mfskvaricode.h parameter.h pskmodulator.h psktable.h \
+	qpskdemodulator.h qpskmodulator.h rttydemodulator.h rttymodulator.h spectrumdisplay.h \
+	textinput.h viterbi.h waveinput.h bpskdemodulator.cpp bpskmodulator.cpp \
+	cdemodulator.cpp cledbutton.cpp cmodulator.cpp controlpanel.cpp cpskdemodulator.cpp \
+	crecording.cpp crxchannel.cpp crxdisplay.cpp crxwindow.cpp csound.cpp csquelch.cpp \
+	ctrigger.cpp ctxbuffer.cpp ctxdisplay.cpp ctxfunctions.cpp ctxwindow.cpp \
+	deinterleaver.cpp feccoder.cpp firfilter.cpp frequencyselect.cpp fskdemodulator.cpp \
+	fskmodulator.cpp input.cpp interleaver.cpp macros.cpp main.cpp mfskdemodulator.cpp \
+	mfskmodulator.cpp mfskvaricode.cpp modemenu.cpp parameter.cpp pskmodulator.cpp \
+	qpskdemodulator.cpp qpskmodulator.cpp qsodata.cpp qsoinfo.cpp rttydemodulator.cpp \
+	rttymodulator.cpp spectrumdisplay.cpp textinput.cpp viterbi.cpp waveinput.cpp qsoinfo.h \
+	macrowindow.cpp
+
+MOCABLES = cdemodulator.moc.o \
+		cledbutton.moc.o \
+		cmodulator.moc.o \
+		controlpanel.moc.o \
+		cpskdemodulator.moc.o \
+		crecording.moc.o \
+		crxchannel.moc.o \
+		crxdisplay.moc.o \
+		crxwindow.moc.o \
+		csquelch.moc.o \
+		ctrigger.moc.o \
+		ctxdisplay.moc.o \
+		ctxfunctions.moc.o \
+		ctxwindow.moc.o \
+		frequencyselect.moc.o \
+		linpsk.moc.o \
+		macros.moc.o \
+		macrowindow.moc.o \
+		pskmodulator.moc.o \
+		rttymodulator.moc.o \
+		spectrumdisplay.moc.o
+
+linpsk_DEPENDENCIES = $(linpsk_SOURCES) $(MOCABLES)
+
+%.moc.cpp:  %.h
+	$(MOC) $(top_srcdir)/src/$*.h -o $@
+
+# set the include path found by configure
+INCLUDES = -I$(top_srcdir)/src -I$(top_builddir)/src/interfaces \
+	-I$(top_srcdir)/src/portaudio $(QT_CXXFLAGS) $(all_includes) \
+	-I$(top_srcdir)/src/interfaces
+
+# the library search path.
+linpsk_LDFLAGS = $(all_libraries) 
+SUBDIRS = portaudio interfaces
+linpsk_LDADD = $(top_builddir)/src/portaudio/libportaudio.a $(top_builddir)/src/interfaces/libinterfaces.a -lfftw3 $(QT_LDADD) \
+	$(MOCABLES)
diff --git a/src/Makefile.in b/src/Makefile.in
new file mode 100644
index 0000000..18a2889
--- /dev/null
+++ b/src/Makefile.in
@@ -0,0 +1,684 @@
+# Makefile.in generated by automake 1.9.4 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+SOURCES = $(linpsk_SOURCES)
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS = linpsk$(EXEEXT)
+subdir = src
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS)
+am_linpsk_OBJECTS = linpsk.$(OBJEXT) bpskdemodulator.$(OBJEXT) \
+	bpskmodulator.$(OBJEXT) cdemodulator.$(OBJEXT) \
+	cledbutton.$(OBJEXT) cmodulator.$(OBJEXT) \
+	controlpanel.$(OBJEXT) cpskdemodulator.$(OBJEXT) \
+	crecording.$(OBJEXT) crxchannel.$(OBJEXT) crxdisplay.$(OBJEXT) \
+	crxwindow.$(OBJEXT) csound.$(OBJEXT) csquelch.$(OBJEXT) \
+	ctrigger.$(OBJEXT) ctxbuffer.$(OBJEXT) ctxdisplay.$(OBJEXT) \
+	ctxfunctions.$(OBJEXT) ctxwindow.$(OBJEXT) \
+	deinterleaver.$(OBJEXT) feccoder.$(OBJEXT) firfilter.$(OBJEXT) \
+	frequencyselect.$(OBJEXT) fskdemodulator.$(OBJEXT) \
+	fskmodulator.$(OBJEXT) input.$(OBJEXT) interleaver.$(OBJEXT) \
+	macros.$(OBJEXT) main.$(OBJEXT) mfskdemodulator.$(OBJEXT) \
+	mfskmodulator.$(OBJEXT) mfskvaricode.$(OBJEXT) \
+	modemenu.$(OBJEXT) parameter.$(OBJEXT) pskmodulator.$(OBJEXT) \
+	qpskdemodulator.$(OBJEXT) qpskmodulator.$(OBJEXT) \
+	qsodata.$(OBJEXT) qsoinfo.$(OBJEXT) rttydemodulator.$(OBJEXT) \
+	rttymodulator.$(OBJEXT) spectrumdisplay.$(OBJEXT) \
+	textinput.$(OBJEXT) viterbi.$(OBJEXT) waveinput.$(OBJEXT) \
+	macrowindow.$(OBJEXT)
+linpsk_OBJECTS = $(am_linpsk_OBJECTS)
+am__DEPENDENCIES_1 =
+am__DEPENDENCIES_2 = cdemodulator.moc.o cledbutton.moc.o \
+	cmodulator.moc.o controlpanel.moc.o cpskdemodulator.moc.o \
+	crecording.moc.o crxchannel.moc.o crxdisplay.moc.o \
+	crxwindow.moc.o csquelch.moc.o ctrigger.moc.o ctxdisplay.moc.o \
+	ctxfunctions.moc.o ctxwindow.moc.o frequencyselect.moc.o \
+	linpsk.moc.o macros.moc.o macrowindow.moc.o pskmodulator.moc.o \
+	rttymodulator.moc.o spectrumdisplay.moc.o
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(linpsk_SOURCES)
+DIST_SOURCES = $(linpsk_SOURCES)
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-exec-recursive install-info-recursive \
+	install-recursive installcheck-recursive installdirs-recursive \
+	pdf-recursive ps-recursive uninstall-info-recursive \
+	uninstall-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MOC = @MOC@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_LDADD = @QT_LDADD@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+linpsk_SOURCES = linpsk.cpp addrxwindow.h bpskdemodulator.h bpskmodulator.h \
+	cdemodulator.h cledbutton.h cmodulator.h color.h constants.h controlpanel.h \
+	cpskdemodulator.h crecording.h crxchannel.h crxdisplay.h crxwindow.h csound.h csquelch.h \
+	ctrigger.h ctxbuffer.h ctxdisplay.h ctxfunctions.h ctxwindow.h deinterleaver.h \
+	deletemacro.h editmacro.h feccoder.h fircoeffs.h firfilter.h frequencyselect.h \
+	fskdemodulator.h fskmodulator.h input.h interleaver.h linpsk.h macros.h macrowindow.h \
+	mfskdemodulator.h mfskmodulator.h mfskvaricode.h parameter.h pskmodulator.h psktable.h \
+	qpskdemodulator.h qpskmodulator.h rttydemodulator.h rttymodulator.h spectrumdisplay.h \
+	textinput.h viterbi.h waveinput.h bpskdemodulator.cpp bpskmodulator.cpp \
+	cdemodulator.cpp cledbutton.cpp cmodulator.cpp controlpanel.cpp cpskdemodulator.cpp \
+	crecording.cpp crxchannel.cpp crxdisplay.cpp crxwindow.cpp csound.cpp csquelch.cpp \
+	ctrigger.cpp ctxbuffer.cpp ctxdisplay.cpp ctxfunctions.cpp ctxwindow.cpp \
+	deinterleaver.cpp feccoder.cpp firfilter.cpp frequencyselect.cpp fskdemodulator.cpp \
+	fskmodulator.cpp input.cpp interleaver.cpp macros.cpp main.cpp mfskdemodulator.cpp \
+	mfskmodulator.cpp mfskvaricode.cpp modemenu.cpp parameter.cpp pskmodulator.cpp \
+	qpskdemodulator.cpp qpskmodulator.cpp qsodata.cpp qsoinfo.cpp rttydemodulator.cpp \
+	rttymodulator.cpp spectrumdisplay.cpp textinput.cpp viterbi.cpp waveinput.cpp qsoinfo.h \
+	macrowindow.cpp
+
+MOCABLES = cdemodulator.moc.o \
+		cledbutton.moc.o \
+		cmodulator.moc.o \
+		controlpanel.moc.o \
+		cpskdemodulator.moc.o \
+		crecording.moc.o \
+		crxchannel.moc.o \
+		crxdisplay.moc.o \
+		crxwindow.moc.o \
+		csquelch.moc.o \
+		ctrigger.moc.o \
+		ctxdisplay.moc.o \
+		ctxfunctions.moc.o \
+		ctxwindow.moc.o \
+		frequencyselect.moc.o \
+		linpsk.moc.o \
+		macros.moc.o \
+		macrowindow.moc.o \
+		pskmodulator.moc.o \
+		rttymodulator.moc.o \
+		spectrumdisplay.moc.o
+
+linpsk_DEPENDENCIES = $(linpsk_SOURCES) $(MOCABLES)
+
+# set the include path found by configure
+INCLUDES = -I$(top_srcdir)/src -I$(top_builddir)/src/interfaces \
+	-I$(top_srcdir)/src/portaudio $(QT_CXXFLAGS) $(all_includes) \
+	-I$(top_srcdir)/src/interfaces
+
+
+# the library search path.
+linpsk_LDFLAGS = $(all_libraries) 
+SUBDIRS = portaudio interfaces
+linpsk_LDADD = $(top_builddir)/src/portaudio/libportaudio.a $(top_builddir)/src/interfaces/libinterfaces.a -lfftw3 $(QT_LDADD) \
+	$(MOCABLES)
+
+all: all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  src/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  if test -f $$p \
+	     || test -f $$p1 \
+	  ; then \
+	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+	   echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
+	  else :; fi; \
+	done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
+	done
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  echo " rm -f $$p $$f"; \
+	  rm -f $$p $$f ; \
+	done
+linpsk$(EXEEXT): $(linpsk_OBJECTS) $(linpsk_DEPENDENCIES) 
+	@rm -f linpsk$(EXEEXT)
+	$(CXXLINK) $(linpsk_LDFLAGS) $(linpsk_OBJECTS) $(linpsk_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bpskdemodulator.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bpskmodulator.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdemodulator.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cledbutton.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cmodulator.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/controlpanel.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cpskdemodulator.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/crecording.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/crxchannel.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/crxdisplay.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/crxwindow.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/csound.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/csquelch.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ctrigger.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ctxbuffer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ctxdisplay.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ctxfunctions.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ctxwindow.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/deinterleaver.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/feccoder.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/firfilter.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/frequencyselect.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fskdemodulator.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fskmodulator.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/input.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/interleaver.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/linpsk.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/macros.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/macrowindow.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/main.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mfskdemodulator.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mfskmodulator.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mfskvaricode.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/modemenu.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/parameter.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pskmodulator.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/qpskdemodulator.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/qpskmodulator.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/qsodata.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/qsoinfo.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/rttydemodulator.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/rttymodulator.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/spectrumdisplay.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/textinput.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/viterbi.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/waveinput.Po at am__quote@
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@set fnord $$MAKEFLAGS; amf=$$2; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@set fnord $$MAKEFLAGS; amf=$$2; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(mkdir_p) "$(distdir)/$$subdir" \
+	    || exit 1; \
+	    distdir=`$(am__cd) $(distdir) && pwd`; \
+	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$top_distdir" \
+	        distdir="$$distdir/$$subdir" \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(PROGRAMS)
+installdirs: installdirs-recursive
+installdirs-am:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-info-am
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
+	clean clean-binPROGRAMS clean-generic clean-libtool \
+	clean-recursive ctags ctags-recursive distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-recursive distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-binPROGRAMS \
+	install-data install-data-am install-exec install-exec-am \
+	install-info install-info-am install-man install-strip \
+	installcheck installcheck-am installdirs installdirs-am \
+	maintainer-clean maintainer-clean-generic \
+	maintainer-clean-recursive mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \
+	pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+	uninstall-binPROGRAMS uninstall-info-am
+
+
+%.moc.cpp:  %.h
+	$(MOC) $(top_srcdir)/src/$*.h -o $@
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/addrxwindow.h b/src/addrxwindow.h
new file mode 100644
index 0000000..23183df
--- /dev/null
+++ b/src/addrxwindow.h
@@ -0,0 +1,62 @@
+/****************************************************************************
+** Form interface generated from reading ui file 'addrxwindow.ui'
+**
+** Created: Sat Sep 18 18:46:16 2004
+**      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.2   edited Nov 24 13:47 $)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+
+#ifndef ADDRXWINDOW_H
+#define ADDRXWINDOW_H
+
+#include <qvariant.h>
+#include <qdialog.h>
+#include "constants.h"
+
+class QVBoxLayout;
+class QHBoxLayout;
+class QGridLayout;
+class QSpacerItem;
+class QLabel;
+class QLineEdit;
+class QListBox;
+class QListBoxItem;
+class QSpinBox;
+class QPushButton;
+
+class AddRxWindow : public QDialog
+{
+    Q_OBJECT
+
+public:
+    AddRxWindow( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+    ~AddRxWindow();
+
+    QLabel* RxWindowName;
+    QLabel* Modulation;
+    QLabel* RxFrequency;
+    QLineEdit* TitleText;
+    QListBox* RxMode;
+    QSpinBox* Frequency;
+    QPushButton* buttonOk;
+    QPushButton* buttonCancel;
+
+public slots:
+    void init();
+
+protected:
+    QVBoxLayout* layout10;
+    QSpacerItem* spacer11;
+    QHBoxLayout* layout9;
+    QVBoxLayout* layout19;
+    QVBoxLayout* layout7;
+    QHBoxLayout* layout8;
+    QSpacerItem* spacer3;
+
+protected slots:
+    virtual void languageChange();
+
+};
+
+#endif // ADDRXWINDOW_H
diff --git a/linpsk/bpskdemodulator.cpp b/src/bpskdemodulator.cpp
similarity index 91%
rename from linpsk/bpskdemodulator.cpp
rename to src/bpskdemodulator.cpp
index 754d21d..d04eea5 100644
--- a/linpsk/bpskdemodulator.cpp
+++ b/src/bpskdemodulator.cpp
@@ -42,16 +42,14 @@ char ch =0;
 			m_BitAcc &= 0x07FF;
 			ch = m_VaricodeDecTbl[m_BitAcc];
 			m_BitAcc = 0;
-      
-	if( (ch!=0)  &&
-   ( !Squelch || (Squelch && (fastSquelch || ( ( unsigned int ) m_DevAve  > Threshold ))))) // Squelch Part
-    
-    {
-		  emit newSymbol(ch);
-      if (fastSquelch && (( unsigned int ) m_DevAve < Threshold) )
+     if( (ch!=0)  &&
+      ( !Squelch || (Squelch && (fastSquelch || ( ( unsigned int ) m_DevAve  > Threshold ))))) // Squelch Part
+      {
+       emit newSymbol(ch);
+       if (fastSquelch && (( unsigned int ) m_DevAve < Threshold) )
        fastSquelch = false;
-    } 
-		}
+      } 
+   }
 	}
 	else
 	{
diff --git a/linpsk/bpskdemodulator.h b/src/bpskdemodulator.h
similarity index 96%
rename from linpsk/bpskdemodulator.h
rename to src/bpskdemodulator.h
index d49fe0e..c91a737 100644
--- a/linpsk/bpskdemodulator.h
+++ b/src/bpskdemodulator.h
@@ -32,7 +32,6 @@ public:
 	~BPskDemodulator();
 protected:	
 /** Decodes a BPSK Symbol */
-//void DecodeSymbol( complex<double> newsamp);
 void DecodeSymbol( double);
 
 void CalcQuality(double);
diff --git a/linpsk/bpskmodulator.cpp b/src/bpskmodulator.cpp
similarity index 100%
rename from linpsk/bpskmodulator.cpp
rename to src/bpskmodulator.cpp
diff --git a/linpsk/bpskmodulator.h b/src/bpskmodulator.h
similarity index 100%
rename from linpsk/bpskmodulator.h
rename to src/bpskmodulator.h
diff --git a/linpsk/cdemodulator.cpp b/src/cdemodulator.cpp
similarity index 73%
rename from linpsk/cdemodulator.cpp
rename to src/cdemodulator.cpp
index 10a8edf..df552e1 100644
--- a/linpsk/cdemodulator.cpp
+++ b/src/cdemodulator.cpp
@@ -18,7 +18,7 @@
 
 CDemodulator::CDemodulator()
 {
-UseAfc = true;
+UseAfc = Off;
 Squelch = true;
 Threshold= 50;
 }
@@ -27,7 +27,7 @@ CDemodulator::~CDemodulator()
 {
 }
 
-void CDemodulator::setAfc(bool afc) { UseAfc=afc; }
+void CDemodulator::setAfcMode(AfcMode afc) { UseAfc=afc; }
 
 void CDemodulator::setRxFrequency(double freq)
 {
@@ -49,7 +49,7 @@ void CDemodulator::setSquelch(bool OnOff)
 Squelch=OnOff;
 }
 
-bool CDemodulator::getAFC()
+AfcMode CDemodulator::getAfcMode()
 {
 return UseAfc;
 }
@@ -65,4 +65,31 @@ int CDemodulator::getThreshold()
 {
 return Threshold;
 }
+double CDemodulator::get2RxFrequency(void)
+{
+return 0.0;
+}  
+float CDemodulator::getIMD()
+{
+return 0.0;
+}
+
+ void CDemodulator::setParameter(RxTxParameterType,void *)
+ {
+ /**
+  * At the moment only RTTY uses some extra Parameters
+  * So there is mostly nothing to do
+  * but that may change in the future
+ **/ 
+ return;
+ }
+ void *CDemodulator::getParameter(RxTxParameterType)    
+ {
+ return 0;
+ } 
+ void *CDemodulator::getBuffer()    
+ {
+ return 0;
+ }
+ 
 
diff --git a/linpsk/cdemodulator.h b/src/cdemodulator.h
similarity index 69%
rename from linpsk/cdemodulator.h
rename to src/cdemodulator.h
index edc7237..ba6ca8c 100644
--- a/linpsk/cdemodulator.h
+++ b/src/cdemodulator.h
@@ -19,38 +19,45 @@
 
 #include <qobject.h>
 #include <complex>
-
+#include "constants.h"
 /**Base class for all possible types of demodulators
   *@author Volker Schroer
   */
-
 class CDemodulator : public QObject
  {
  Q_OBJECT
-public: 
-	 CDemodulator();
-	
-	virtual ~CDemodulator();
-  /** processes the input */
-  virtual void ProcessInput(double *input) = 0;
-	/** gets the selected frequency */
-	double getRxFrequency(void);
-	/** Initialises something */
-	virtual bool Init(double,int) = 0;
-  virtual std::complex<float> *getPhasePointer();
-  virtual int getSquelchValue() = 0;
-  virtual bool getAFC();
-  virtual bool getSquelchState();
-  virtual int getThreshold();
+public:
+ 
+ CDemodulator();
 
+ virtual ~CDemodulator();
+ /** processes the input */
+ virtual void ProcessInput(double *input, double *spectrum) = 0;
+ /** gets the selected frequency */
+ double getRxFrequency(void);
+ virtual double get2RxFrequency(void);
+ /** Initialises something */
+ virtual bool Init(double,int) = 0;
+ virtual std::complex<float> *getPhasePointer();
+ virtual int getSquelchValue() = 0;
+ virtual AfcMode getAfcMode();
+ virtual AfcMode AfcProperties() = 0;
+ void setAfcMode(AfcMode);
+ virtual bool getSquelchState();
+ virtual int getThreshold();
+ virtual float getIMD();
+ virtual void setParameter(RxTxParameterType,void *);
+ virtual void *getParameter(RxTxParameterType);
+ virtual void *getBuffer();
 protected:
-	/** Status of AFC */
-	bool UseAfc;
+/** Status of AFC */
+  AfcMode UseAfc;
   /** Status of Squelch **/
   bool Squelch;
   unsigned int Threshold;
 	/** Frequency to be received */
-	double RxFrequency;
+  double RxFrequency;
+
   /** Number of Samples **/
   int NxSamples;
   /** Oszilatorfrequency **/
@@ -62,7 +69,6 @@ protected:
 
 public slots: //Slots
   /** enables/ disables the use of AFC */
-	virtual void	setAfc(bool);
   /** sets the frequency for the demodulator */
   virtual void setRxFrequency(double);
   void setThreshold(int);
@@ -72,8 +78,6 @@ public slots: //Slots
 signals: // Signals
   /** Signal will be emitted if a new character was detected */
   void newSymbol(char);
-	/** Signal will be emitted if AFC is on and the RxFrequency has changed */
-	void rxFrequencyChanged(double);
 
 };
 
diff --git a/linpsk/cledbutton.cpp b/src/cledbutton.cpp
similarity index 100%
rename from linpsk/cledbutton.cpp
rename to src/cledbutton.cpp
diff --git a/linpsk/cledbutton.h b/src/cledbutton.h
similarity index 100%
rename from linpsk/cledbutton.h
rename to src/cledbutton.h
diff --git a/linpsk/cmodulator.cpp b/src/cmodulator.cpp
similarity index 83%
rename from linpsk/cmodulator.cpp
rename to src/cmodulator.cpp
index 649ba86..ff36f69 100644
--- a/linpsk/cmodulator.cpp
+++ b/src/cmodulator.cpp
@@ -27,3 +27,12 @@ CModulator::~CModulator()
 {
 }
 
+void CModulator::setParameter(RxTxParameterType,void *)
+{
+ /**
+ * At the moment only RTTY uses some extra Parameters
+  * So there is mostly nothing to do
+  * but that may change in the future
+  **/ 
+ return;
+}
diff --git a/linpsk/cmodulator.h b/src/cmodulator.h
similarity index 95%
rename from linpsk/cmodulator.h
rename to src/cmodulator.h
index 448dbcc..4873b19 100644
--- a/linpsk/cmodulator.h
+++ b/src/cmodulator.h
@@ -19,6 +19,7 @@
 
 #include <qobject.h>
 #include "parameter.h"
+#include "constants.h"
 
 
 /**Base Class for all possible transmit types
@@ -33,6 +34,7 @@ Q_OBJECT
 public: 
 	CModulator(int FS,CTxBuffer *);
 	~CModulator();
+        virtual void setParameter(RxTxParameterType,void *);
 
 /** Calculate the Signal to be fed into the soundcard */
 	virtual int CalcSignal(double *data,int BufferSize) = 0;
diff --git a/linpsk/color.h b/src/color.h
similarity index 100%
rename from linpsk/color.h
rename to src/color.h
diff --git a/linpsk/constants.h b/src/constants.h
similarity index 68%
rename from linpsk/constants.h
rename to src/constants.h
index f35396d..509d1e1 100644
--- a/linpsk/constants.h
+++ b/src/constants.h
@@ -18,8 +18,8 @@
 #ifndef CONSTANTS_H
 #define CONSTANTS_H
 
-#include <math.h>						// for some constants like PI
-//#include <qstring.h>
+#include <math.h>                        // for some constants like PI
+#include <qstring.h>
 
 #define TXOFF_CODE -1			// control codes that can be placed in the input
 #define TXON_CODE -2			// queue for various control functions
@@ -30,7 +30,7 @@
 
 #define TXBUFFER_LENGTH 1000
 #define BUF_SIZE 4096	//size of data chunks to process at a time from
-											// the soundcard
+                        // the soundcard
 #define RxWindowBuffer 50 // Max Number of Lines in the RX ScrollBuffer
 
 // define some constants
@@ -43,10 +43,44 @@
 #define M_PI_7_4	(M_PI + M_PI_2 + M_PI_4) // 7Pi/4
 
 enum Mode {BPSK=0,QPSK,RTTY,MFSK16};
+enum AfcMode {Off,Narrow,Wide};
 
+enum Paritaet {None,Even,Odd};
 
+enum StopBits {One,Onepoint5,Two};
 
-// LengtH of Hilber Transformer Coefficients
+enum RxTxParameterType{Reverse,Offset,Parity,Extra,Standard};
+enum StateOfReception { WaitingForMark,WaitingForSpace, CheckingStartBit,SkipRestOfStartBit,CollectingByte,
+                        CheckingParity, WaitingForStopBits,ThrowHalfBit};
+
+
+typedef struct
+{
+bool reverse;
+Paritaet parity;
+int offset;
+StopBits stopbits;
+}  ExtraParameter;
+
+typedef struct
+{
+AfcMode afc;
+bool Squelch;
+int Threshold;
+
+} Controls;
+
+typedef struct
+{
+ QString RemoteCallsign;
+ QString OpName;
+ QString Qth;
+ QString Locator;
+ QString QsoFrequency;
+ QString HisRST;
+ QString MyRST;
+ QString QsoDate;
+ QString QsoTime;
+} QsoInfo;
 
-#define HilbertFilterLength 37
 #endif
diff --git a/linpsk/controlpanel.cpp b/src/controlpanel.cpp
similarity index 81%
rename from linpsk/controlpanel.cpp
rename to src/controlpanel.cpp
index c6ebf6c..73485f3 100644
--- a/linpsk/controlpanel.cpp
+++ b/src/controlpanel.cpp
@@ -8,7 +8,7 @@
 #include <qimage.h>
 #include <qpixmap.h>
 
-#include "cspectrumdisplay.h"
+#include "spectrumdisplay.h"
 #include "qsodata.h"
 #include "macrowindow.h"
 
@@ -22,7 +22,7 @@ ControlPanel::ControlPanel( QWidget* parent,  const char* name )
     setFrameShape( QFrame::StyledPanel );
     setFrameShadow( QFrame::Sunken );
 
-    SpectrumDisplay = new CSpectrumDisplay( this, "SpectrumDisplay" );
+    Display = new SpectrumDisplay( this, "SpectrumDisplay" );
     QSO = new QSOData(this,"QSOData");
     MacroBox = new MacroWindow(this,"MacroBox");
     languageChange();
@@ -33,6 +33,9 @@ ControlPanel::ControlPanel( QWidget* parent,  const char* name )
  */
 ControlPanel::~ControlPanel()
 {
+ if(QSO)
+  delete QSO;
+ QSO=0;
     // no need to delete child widgets, Qt does it all for us
 }
 
@@ -49,21 +52,24 @@ void ControlPanel::calculateSizeofComponents()
 #define TOPMARGIN 2
 #define LEFTMARGIN 2
 #define SPECTRUMWIDTH 35
+#define SPECTRUMHEIGHT 85
+
 int xpos,ypos,width,height,innerheight,innerwidth;
 width=this->width();
 height=this->height();
 xpos=width*LEFTMARGIN/100;
 ypos=height*TOPMARGIN/100;
-innerwidth=width*SPECTRUMWIDTH/100;
-innerheight=height-2*ypos;
-SpectrumDisplay->setGeometry(xpos,ypos,innerwidth,innerheight);
+innerwidth=(width-xpos)*SPECTRUMWIDTH/100;
+innerheight=((height-2*ypos)*SPECTRUMHEIGHT)/100;
+Display->setGeometry(xpos,ypos,innerwidth,innerheight);
 xpos=xpos+innerwidth+10;
 innerwidth=innerwidth+20;
+innerheight=(height*(100-2*TOPMARGIN))/100;
+
 QSO->setGeometry(xpos,ypos,innerwidth,innerheight);
 xpos = xpos+innerwidth+10;
 innerwidth = width-xpos-5;
 //if (MacroBox->verticalScrollBar()->isVisible() )
-//innerwidth=innerwidth-MacroBox->verticalScrollBar()->width();
 
 MacroBox->setGeometry(xpos,ypos,innerwidth,innerheight);
 
diff --git a/linpsk/controlpanel.h b/src/controlpanel.h
similarity index 90%
rename from linpsk/controlpanel.h
rename to src/controlpanel.h
index 3f5c3ca..0a039c9 100644
--- a/linpsk/controlpanel.h
+++ b/src/controlpanel.h
@@ -10,7 +10,7 @@
 using namespace std;
 
 
-class CSpectrumDisplay;
+class SpectrumDisplay;
 class QSOData;
 class MacroWindow;
 
@@ -22,7 +22,7 @@ public:
     ControlPanel( QWidget* parent = 0, const char* name = 0 );
     ~ControlPanel();
 
-    CSpectrumDisplay* SpectrumDisplay;
+    SpectrumDisplay* Display;
     QSOData *QSO;
     MacroWindow  *MacroBox;
 
diff --git a/linpsk/cpskdemodulator.cpp b/src/cpskdemodulator.cpp
similarity index 90%
rename from linpsk/cpskdemodulator.cpp
rename to src/cpskdemodulator.cpp
index 2f9803f..c024b25 100644
--- a/linpsk/cpskdemodulator.cpp
+++ b/src/cpskdemodulator.cpp
@@ -296,6 +296,7 @@ CPskDemodulator::CPskDemodulator(): CDemodulator()
 	m_pQue2 = NULL;
 	m_pQue3 = NULL;
 	m_VaricodeDecTbl = NULL;
+        Phase= NULL;
 }
 
 CPskDemodulator::~CPskDemodulator()
@@ -308,6 +309,8 @@ CPskDemodulator::~CPskDemodulator()
 		delete m_pQue3;
 	if(m_VaricodeDecTbl)
 		delete m_VaricodeDecTbl;
+        if(Phase )
+         delete Phase;
 
 }
 
@@ -392,31 +395,26 @@ for (i=0;i< 228; i++)
 	m_PkPos = 0;
 	m_NewPkPos = 5;
 	m_BitPos = 0;
-/**
-  m_I1 = 0.0;
-	m_I0 = 0.0;
-	m_Q1 = 0.0;
-	m_Q0 = 0.0;
-**/
   Prev_Sample=complex<double>(0.0,0.0) ;
   Phase_Vector = Prev_Sample;  
 	m_DevAve = 0.78;
 
-  m_z1=complex<double>(0.0,0.0);
-	m_z2=m_z1;
-	m_FerAve = 0.0;
+///  m_z1=complex<double>(0.0,0.0);
+///	m_z2=m_z1;
+///	m_FerAve = 0.0;
 	m_QFreqError = 0.0;
 	m_LastPkPos = 0;
 	m_ClkErrCounter = 0;
 	m_ClkErrTimer = 0;
 	m_ClkError = 0;
 // Initializing Variables for AFC
-	dp=0.0;
-	dp1=0.0;
-	dp2=0.0;
-
+fe0=0.0;
+fe1=0.0;
+fe2=0.0;
 // FastSquelch
 fastSquelch=false;
+// IMD
+IMD=0.0; // Means Unkonown
 		
 return true;
 }
@@ -428,7 +426,7 @@ return true;
 //  30mSec for BPSK, 38mSec for QPSK( 133MHz Pentium )
 //////////////////////////////////////////////////////////////////////
 
-void CPskDemodulator::ProcessInput( double* pIn)
+void CPskDemodulator::ProcessInput( double* pIn, double *Spectrum)
 {
 double freqerror;
 double vcophz = OszFrequency;
@@ -441,10 +439,44 @@ complex<double>* Qptr1;
 complex<double>* Inptr2;			//decimation FIR #2 variables
 complex<double>* Qptr2;
 
-if ( UseAfc)
-		freqerror= m_FreqError;
-	else
-		freqerror= 0.0;	
+if ( UseAfc == Wide )
+ { 
+// Check if we are near the center frequency in Spectrum
+  int index;
+  index=(int) (RxFrequency/2.69165);
+  double smooth[15],xx;
+// First we smooth the spectrum
+  for(int i=0; i<15; i++)
+   {
+    smooth[i]=0.0; 
+    for (int k=0; k <15; k++)
+     smooth[i] +=Spectrum[index-14+k+i]/7;
+   }
+   int maxspect=0;
+   xx=0.0;
+   for(int i=0;i <15; i++)
+    {
+     if (smooth[i] >xx )
+      {
+       xx=smooth[i];
+       maxspect=i;
+      }
+    }
+   freqerror= m_FreqError;
+   if ( maxspect < 5 )  // We are far above the Frequency
+    {
+     RxFrequency -=1.0;
+     freqerror =0.0;
+    }
+   else
+    if (maxspect > 9 )
+     {
+      RxFrequency += 1.0;
+      freqerror =.00;
+     }
+    }
+ else
+ freqerror= 0.0;	
 
 	m_DispTrig = false;
 	j=0;
@@ -522,21 +554,21 @@ if ( UseAfc)
           Phase[j++]=Phase_Vector;
           double angle =  atan2(Phase_Vector.imag(),Phase_Vector.real());
 					DecodeSymbol( angle);
-          if( UseAfc )
+          if ( (unsigned int) m_DevAve  > Threshold)
+           {
+           if (m_OffCount > 10)
+             calcIMD(Spectrum); // We got enough Idles to calc the IMD
+           }  
+           else
+            IMD =0.0;
+          if( UseAfc != Off )
            freqerror = CalcFreqError();
           else
-					{
-#ifdef AFC_DEBUG
-					 freqerror = CalcFreqError(m_BitSignal);	// 10 uSec( 133MHz Pentium )
-#endif
-	 				 freqerror = 0.0;
-           ferror = 0.0;
-	 				}
+           freqerror = 0.0;
+
          } 
-//        m_DispTrig = true;
-//          Phase[j++]=m_BitSignal;
-			}
-		}
+	}
+       }
 	}
 	m_SampCnt = m_SampCnt%9;
 	m_pInPtr1 = Inptr1;		// save position in circular delay line
@@ -545,11 +577,10 @@ if ( UseAfc)
 	m_FreqError = freqerror;
 	OszFrequency = vcophz;
 
-  if (UseAfc)			// Change RxFrequency, but slowly
+  if (UseAfc != Off)			// Change RxFrequency, but slowly
   {
     freqerror=freqerror*SampleRate/PI2;
     RxFrequency = RxFrequency + freqerror;
-    emit rxFrequencyChanged(RxFrequency);
   }
 
   settings.clockerror=m_ClkError;
@@ -617,13 +648,24 @@ int BitPos = m_BitPos;
 
 //////////////////////////////////////////////////////////////////////
 //  Frequency error calculator
-// calculates the derivative of the tan(I/Q).
-// returns frequency error ~= .0034 per Hz error.
 //////////////////////////////////////////////////////////////////////
 double CPskDemodulator::CalcFreqError()
 {
-ferror =0.5 * ferror +   m_QFreqError/SampleRate;
-return ferror;    
+      
+//ferror =0.5 * ferror +   m_QFreqError/SampleRate;
+
+double error;
+
+error=m_QFreqError/SampleRate;
+fe0= 0.8 *fe0 +0.496663368949175* error +
+       0.0066732621016505 *fe1+
+       0.496663368949175 *fe2;
+fe2=fe1;
+fe1=error;
+return fe0;         
+         
+
+    
 }
 
 //////////////////////////////////////////////////////////////////////
@@ -701,8 +743,23 @@ int CPskDemodulator::getSquelchValue()
 {
 return  (int) m_DevAve;
 }
+void CPskDemodulator::calcIMD(double *Spectrum)
+{
+int freq1,freq2;
 
+freq1 = (int) ((RxFrequency+15.625)/2.69165);  
+freq2 = (int) ((RxFrequency+46.875)/2.69165);
+IMD=(Spectrum[freq2-1]+Spectrum[freq2]+Spectrum[freq2+1])/(Spectrum[freq1-1]+Spectrum[freq1]+Spectrum[freq1+1]);
+freq1=(int) ( (RxFrequency- 15.625)/2.69165);
+freq2=(int) ( (RxFrequency- 46.875)/2.69165);
+IMD = 10.*log10( (IMD + (Spectrum[freq2-1]+Spectrum[freq2]+Spectrum[freq2+1])/(Spectrum[freq1-1]+Spectrum[freq1]+Spectrum[freq1+1]))/2);
 
-
-
-
+}
+float CPskDemodulator::getIMD()
+{
+return IMD;
+}  
+AfcMode CPskDemodulator::AfcProperties()
+{
+return Wide;
+}
diff --git a/linpsk/cpskdemodulator.h b/src/cpskdemodulator.h
similarity index 75%
rename from linpsk/cpskdemodulator.h
rename to src/cpskdemodulator.h
index 4226f86..77a48c8 100644
--- a/linpsk/cpskdemodulator.h
+++ b/src/cpskdemodulator.h
@@ -25,8 +25,6 @@ using namespace std;
 #include <complex>
 #include <stdlib.h>
 
-
-#include "crxdisplay.h"
 #include "cdemodulator.h"
 
 
@@ -34,35 +32,24 @@ class CPskDemodulator  : public CDemodulator
 {
  Q_OBJECT
 public:
-	CPskDemodulator();
-	virtual ~CPskDemodulator();
-	bool Init(double Fs ,int BlockSize);
-  int getSquelchValue();
-	void ProcessInput( double *pIn);
-  complex<float> * getPhasePointer();
-// Variables
-#ifdef AFC_DEBUG	
-	double m_FreqError;
-	double m_QFreqError;
-#endif
-
+ CPskDemodulator();
+ virtual ~CPskDemodulator();
+ bool Init(double Fs ,int BlockSize);
+ int getSquelchValue();
+ void ProcessInput( double *pIn, double *Spectrum);
+ complex<float> * getPhasePointer();
+ virtual float getIMD();
+ AfcMode AfcProperties();
 	
 protected:
 
 // Methods
 /** Decodes the symbol depending on the PskModes */	
-//	virtual void DecodeSymbol( complex<double> newsamp) = 0;
  virtual void DecodeSymbol( double) = 0;
 /** Calculates the Cuality of the signal -- depends on the mode */	
 	virtual	void CalcQuality( double angle ) = 0;	
 	
 // Variables		
-/**
-  double m_I0;		// 2 stage I/Q delay line variables
-	double m_I1;
-	double m_Q0;
-	double m_Q1;
-**/
   complex<double> Prev_Sample;
   complex<double> Phase_Vector;
 	int m_BitAcc;
@@ -70,15 +57,12 @@ protected:
 	unsigned char* m_VaricodeDecTbl;
 	int m_OnCount;
 	int m_OffCount;	
-#ifndef AFC_DEBUG
 	double m_FreqError;
 	double m_QFreqError;
-#endif	
+
   double m_DevAve;
-  double ferror,dp;
 
   bool fastSquelch;
-
 private:
 	int m_ClkErrTimer;
 	int m_ClkErrCounter;
@@ -91,6 +75,7 @@ private:
 	void CalcBitFilter(  complex<double> Samp);
 	double CalcAGC( complex<double> Samp );
 	double CalcFreqError();
+  void calcIMD(double *Spectrum);  
 //variables
 	double m_QPSKprob[4];
 	int m_LastPkPos;
@@ -115,26 +100,23 @@ private:
   complex<float> * Phase;
 // Local variables for various functions that need to be saved between calls
 	double m_AGCave;
-	complex<double> m_z1; //Old Version of Freqerror
-	complex<double> m_z2; // dito
-	double m_FerAve;
+///	complex<double> m_z1; //Old Version of Freqerror
+///	complex<double> m_z2; // dito
+///	double m_FerAve;
 	double m_LastFreq;
 	int	m_PkPos;
 	int	m_NewPkPos;
 	int m_BitPos;
+float IMD;
+
 /** Some Variable for CalcQuality */
-//float fe1,fe2,ferror1,ferror2;
-double dp1,dp2;
+
+double fe0,fe1,fe2;
 
 
 public slots:
 signals: // Signals
-  /** emits this signal if the user changed the cursor
-and with it the desired RX- Frequency */
-//  void rxFrequencyChanged(double);
-//	void newSymbol(char );
-//	void setFastSquelch(bool);
-//	void setSquelchValue(int);
+
 };
 
 #endif
diff --git a/linpsk/crecording.cpp b/src/crecording.cpp
similarity index 93%
rename from linpsk/crecording.cpp
rename to src/crecording.cpp
index 1c7b329..5dd85c2 100644
--- a/linpsk/crecording.cpp
+++ b/src/crecording.cpp
@@ -12,8 +12,7 @@
  *   it under the terms of the GNU General Public License as published by  *
  *   the Free Software Foundation; either version 2 of the License, or     *
  *   (at your option) any later version.                                   *
- *   The PSK part is based on WinPSK 1.0 by Moe Wheatly, AE4JY             *
- ************************************************************************/
+ ***************************************************************************/
 
 #include "crecording.h"
 
@@ -55,8 +54,8 @@ CRecording::~CRecording()
 void CRecording::languageChange()
 {
 
-    setTitle( tr( "Record QSO" ) );
-    Record->setText( tr( "On/Off" ) );
+//    setTitle( tr( "Record QSO" ) );
+    Record->setText( tr( "Record QSO" ) );
 }
 void CRecording::resizeEvent( QResizeEvent * )
 {
@@ -70,10 +69,12 @@ void CRecording::calculateSizeofComponents()
 #define LEFTMARGIN 5
 #define TOPMARGIN 30
 int innerwidth,innerheight,xpos,ypos,width,height;
+
 width=this->width();
 height=this->height();
 xpos=width*LEFTMARGIN/100;
 ypos=height*TOPMARGIN/100;
+
 innerwidth=width-2*xpos;
 innerheight=height-3*ypos/2;
 Record->setGeometry(xpos,ypos,innerwidth,innerheight);
diff --git a/linpsk/crecording.h b/src/crecording.h
similarity index 100%
rename from linpsk/crecording.h
rename to src/crecording.h
diff --git a/linpsk/crxchannel.cpp b/src/crxchannel.cpp
similarity index 83%
rename from linpsk/crxchannel.cpp
rename to src/crxchannel.cpp
index 95dcb13..123a870 100644
--- a/linpsk/crxchannel.cpp
+++ b/src/crxchannel.cpp
@@ -49,6 +49,12 @@ switch (DemodulatorType)
     SampleRate=11025;
     BufferLength=BUF_SIZE;
     break;
+//  case RTTY2:
+//    Demodulator = new RTTY2Demodulator();
+//    SampleRate=11025;
+//    BufferLength=BUF_SIZE;
+//    break;
+    
   case MFSK16:
     Demodulator = new MFSKDemodulator();
     SampleRate=11025;
@@ -62,7 +68,7 @@ switch (DemodulatorType)
 Demodulator->Init(SampleRate,BufferLength); // Should changed later to
                                               // adjusted Samplerate
 Demodulator->setRxFrequency(double(Freq));
-Demodulator->setAfc(true);
+Demodulator->setAfcMode(Demodulator->AfcProperties());
 RxWindow = new CRxWindow(parent);
 connect(Demodulator,SIGNAL(newSymbol(char)),RxWindow,SLOT(updateRx(char)));
 connect(RxWindow,SIGNAL(Triggered()),this,SLOT(triggered()));
@@ -103,9 +109,9 @@ if ( RxWindow != 0 )
   RxWindow->setGeometry(x,y,width,height);
 }
 
-void CRxChannel::processInput(double *Input)
+void CRxChannel::processInput(double *Input, double *Spectrum)
 {
-Demodulator->ProcessInput(Input);
+Demodulator->ProcessInput(Input, Spectrum);
 }
 
 CRxChannel * CRxChannel::getNextChannel()
@@ -170,14 +176,14 @@ int CRxChannel::getID()
 return WindowsID;
 }
 
-void CRxChannel::setAFC(bool OnOff)
+void CRxChannel::setAfcMode(AfcMode mode)
 {
-Demodulator->setAfc(OnOff);
+Demodulator->setAfcMode(mode);
 }
 
-bool CRxChannel::getAFC()
+AfcMode CRxChannel::getAfcMode()
 {
-return Demodulator->getAFC();
+return Demodulator->getAfcMode();
 }
 int CRxChannel::getSquelchValue()
 {
@@ -197,7 +203,10 @@ return Demodulator->getSquelchState();
 }
 double CRxChannel::getRxFrequency()
 {
-return Demodulator->getRxFrequency();
+if (Demodulator != 0)
+ return Demodulator->getRxFrequency();
+else
+ return 0; 
 }
 int CRxChannel::getThreshold()
 {
@@ -222,7 +231,6 @@ if ( RxMode != DemodulatorType )
    Demodulator->disconnect();
    double SampleRate=5512.5;
    double Freq=Demodulator->getRxFrequency();
-   bool AFC = Demodulator->getAFC();
    bool Squelch = Demodulator->getSquelchState();
    int Threshold = Demodulator->getThreshold();
    delete Demodulator;
@@ -238,6 +246,7 @@ if ( RxMode != DemodulatorType )
       SampleRate=11025;
       BufferLength=BUF_SIZE;
       break;
+ 
      case MFSK16:
       Demodulator = new MFSKDemodulator();
       SampleRate=11025;
@@ -252,20 +261,20 @@ if ( RxMode != DemodulatorType )
    Demodulator->Init(SampleRate,BufferLength); // Should changed later to
                                               // adjusted Samplerate
    Demodulator->setRxFrequency(Freq);
-   Demodulator->setAfc(AFC);
    Demodulator->setThreshold(Threshold);
    Demodulator->setSquelch(Squelch);
    connect(Demodulator,SIGNAL(newSymbol(char)),RxWindow,SLOT(updateRx(char)));
 
  }     
 }
-void CRxChannel::setQsoData(QsoInfo Data)
+void CRxChannel::setQsoData(QsoInfo *Data)
 {
-QsoData = Data;  
+ if (Data)
+  QsoData = *Data;  
 }
-QsoInfo CRxChannel::getQsoData()
+QsoInfo *CRxChannel::getQsoData()
 {
-return QsoData;  
+return &QsoData;  
 }
 void CRxChannel::triggered()
 {
@@ -284,3 +293,27 @@ void CRxChannel::record(bool recording)
   else
    RxWindow->stopRecording();   
 }
+int CRxChannel::get2RxFrequency()
+{
+return (int) Demodulator->get2RxFrequency();  
+}
+float CRxChannel::getIMD()
+{
+return Demodulator->getIMD();
+}
+void CRxChannel::setParameter(RxTxParameterType Type,void *Value)
+{
+Demodulator->setParameter(Type,Value);
+}
+void *CRxChannel::getParameter(RxTxParameterType Type)
+{
+return Demodulator->getParameter(Type);
+}
+void * CRxChannel::getBuffer()
+{
+return Demodulator->getBuffer();
+}
+AfcMode CRxChannel::AfcProperties()
+{
+ return Demodulator->AfcProperties();
+}
diff --git a/linpsk/crxchannel.h b/src/crxchannel.h
similarity index 86%
rename from linpsk/crxchannel.h
rename to src/crxchannel.h
index 76f2552..192e49b 100644
--- a/linpsk/crxchannel.h
+++ b/src/crxchannel.h
@@ -20,14 +20,15 @@
 #include "constants.h"
 #include <qobject.h>
 #include <complex>
+
+#include "cdemodulator.h"
 /**Class to administrate the different RX Channels
   *@author Volker Schroer
   */
 class CRxWindow;
-class CDemodulator;
 class QWidget;
 #include <qcolor.h>
-#include "qsoinfo.h"
+
 class CRxChannel : public QObject
  {
  Q_OBJECT
@@ -38,32 +39,38 @@ virtual ~CRxChannel();
   void setPrevChannel(CRxChannel *);
   void changeChain(CRxChannel *);
   void setGeometry(int,int,int,int);
-  void processInput(double *);
+  void processInput(double *, double *);
+  AfcMode getAfcMode();
+  AfcMode AfcProperties();
   CRxChannel *getNextChannel();
   double getRxFrequency();
+  int get2RxFrequency();
   Mode getModulationType();
   int getID();
-  bool getAFC();
   bool getSquelchState();
   int getSquelchValue();
   void setThreshold(int);
   int getThreshold();
   QColor getWindowColor();
   void setWindowColor(QColor);
+  void setParameter(RxTxParameterType,void *);
+  void *getParameter(RxTxParameterType);
   CRxWindow *RxWindow;
+  float getIMD();
+  virtual void *getBuffer();
 public slots:
   void setRxFrequency(double);
   void hide();
   void show();
   class CRxChannel *getChannel(int);
-  void setAFC(bool);
+  void setAfcMode(AfcMode);
   std::complex<float>* getPhasePointer();
   void setSquelch(bool);
   void updateRx(char);
   void clearRxWindow();
   void setMode(Mode);
-  void setQsoData(QsoInfo);
-  QsoInfo getQsoData();
+  void setQsoData(QsoInfo *);
+  QsoInfo *getQsoData();
   void record(bool);
 protected:
 
diff --git a/linpsk/crxdisplay.cpp b/src/crxdisplay.cpp
similarity index 78%
rename from linpsk/crxdisplay.cpp
rename to src/crxdisplay.cpp
index 6b99430..2873705 100644
--- a/linpsk/crxdisplay.cpp
+++ b/src/crxdisplay.cpp
@@ -40,7 +40,6 @@
 #include "waveinput.h"
 #include "csound.h"
 #include "fircoeffs.h"
-#include "qsoinfo.h"
 #include "parameter.h"
 
 #include "color.h"
@@ -89,9 +88,9 @@ CRxDisplay::CRxDisplay( QWidget* parent,  const char* name )
     setFrameShape( QFrame::WinPanel );
     setFrameShadow( QFrame::Sunken );
 
-    RxFreq = new FrequencySelect( this, "RxFreq" );
-    RxFreq->setTitle("Rx Freq");
-    RxFreq->setFunctionText("AFC");
+    RxFreq = new FrequencySelect( this, "RxFreq" , Wide);
+    RxFreq->setTitle("Rx Freq / AFC");
+    RxFreq->setFunctionText("Narrow");
 
     Recording = new CRecording( this, "Recording" );
 
@@ -101,31 +100,36 @@ CRxDisplay::CRxDisplay( QWidget* parent,  const char* name )
 
     RxHeader = new MyTabBar( this);
     RxHeader->setShape(QTabBar::RoundedAbove);
-
+    Clear= new QPushButton(this,"RxClear");
+    Clear->setText("Clear");
+    
     QTab *Tab = new QTab("Rx 1");
     Sound=0;
    
-    inbuf = new double[sizeof(double)*BUF_SIZE];
-    dec2fir = new double[sizeof(double)*DEC2_LPFIR_LENGTH];
-    outbuf = new double[sizeof(double)*BUF_SIZE];
-
+    dec2fir = new double[DEC2_LPFIR_LENGTH];
+ 
     int ID=RxHeader->addTab(Tab);
     RxChannel = new CRxChannel(ID,this);
     settings.ChannelChain=RxChannel;
     settings.ActChannel=RxChannel;
-    RxFreq->setState(RxChannel->getAFC());
     Squelch->setSquelchState(RxChannel->getSquelchState());
     languageChange();
  // Connect Signals and Slots
-     RxTimer= new QTimer(this);
-     connect(RxTimer,SIGNAL(timeout()),this,SLOT(process_rxdata()));
- connect(RxFreq,SIGNAL(FrequencyChanged(double)),this,SLOT(setRxFrequency(double)));
- connect(RxHeader,SIGNAL(selected(int)),this,SLOT(changeActiveRxWindow(int)));
- connect(RxFreq,SIGNAL(toggleAFC(bool)),this,SLOT(setAFC(bool)));
+    RxTimer= new QTimer(this);
+    connect(RxTimer,SIGNAL(timeout()),this,SLOT(process_rxdata()));
+    connect(RxFreq,SIGNAL(FrequencyChanged(double)),this,SLOT(setRxFrequency(double)));
+    connect(RxHeader,SIGNAL(selected(int)),this,SLOT(changeActiveRxWindow(int)));
+// connect(RxFreq,SIGNAL(toggleAFC(bool)),this,SLOT(setAFC(bool)));
  connect(Trigger->Activate,SIGNAL(clicked()),this,SLOT(trigger()));
  connect(Trigger->TriggerText,SIGNAL(returnPressed()),this,SLOT(trigger()));
  connect(RxChannel,SIGNAL(Triggered(int)),RxHeader,SLOT(setCurrentTab(int)));
+ connect ( Clear, SIGNAL( clicked() ),this, SLOT(clearRxWindow()));
  trigger(); // We should ensure that the triggertext is stored;
+
+// Creating Variables for the fft
+
+// plan=rfftw_create_plan(BUF_SIZE/2,FFTW_REAL_TO_COMPLEX,FFTW_ESTIMATE);
+ plan=fftw_plan_r2r_1d(BUF_SIZE/2,outbuf,output,FFTW_R2HC ,FFTW_PATIENT );
 }
 
 /*
@@ -149,11 +153,11 @@ void CRxDisplay::calculateSizeofComponents()
 {
 /** in percent of whole widget **/
 /** RX Part **/
-#define RXPARTWIDTH 65
+#define RXPARTWIDTH 64
 /**  Squelch **/
 #define SQUELCHWIDTH 10
 /** General Width **/
-#define GENERALWIDTH 15
+#define GENERALWIDTH 18
 /** Recording **/
 #define RECORDHEIGHT 25
 /** Trigger **/
@@ -161,11 +165,11 @@ void CRxDisplay::calculateSizeofComponents()
 /** RxFrequency (Height) **/
 #define RXFREQHEIGHT 70
 /** Left and Right Margin **/
-#define LEFTANDRIGHTMARGIN 2
+#define LEFTANDRIGHTMARGIN 1
 /** Top and Bottom Margin **/
 #define TOPANDBOTTOMMARGIN 5
 /** Inner distance **/
-#define distance 3
+#define distance 1
 /** Tab height **/
 #define TABHEIGHT 10
 int xpos,ypos,width,height,innerheight,innerwidth;
@@ -201,6 +205,8 @@ xpos=xpos+innerwidth+width*distance/100;
 innerwidth=width-xpos-width*LEFTANDRIGHTMARGIN/100;
 innerheight=height*TABHEIGHT/100;
 RxHeader->setGeometry(xpos,ypos,innerwidth,innerheight);
+Clear->setGeometry(width-width*LEFTANDRIGHTMARGIN/100-100,ypos,100,innerheight);
+
 ypos=ypos+innerheight;
 innerheight=height-innerheight-height*TOPANDBOTTOMMARGIN/100;
 settings.ActChannel->setGeometry(xpos,ypos,innerwidth,innerheight);
@@ -227,10 +233,8 @@ if ( Sound == 0 )
       Sound = new TextInput(-1);
     }
     else
-     {
-      settings.inputFilename=settings.SoundDevice; 
       Sound = new CSound(settings.serial);
-     } 
+    
   }
 if ( Sound <= 0 )
   return false;
@@ -238,30 +242,22 @@ m_pDec2InPtr=dec2fir;
 
 for (int i=0; i <DEC2_LPFIR_LENGTH;i++)
   dec2fir[i] = 0.0; // fill delay buffer with zero
-if ( Sound->open_Device_read(settings.inputFilename))
+if ( Sound->open_Device_read(&errorstring))
   {
    if(settings.DemoMode)
-    time= 350; // In Demomode we should get realistic Timing;
+    time= 100; // In Demomode we should get realistic Timing, but for testing it should go quicker;
     else
     time =160;
-    if (!Sound->setParams(&errorstring))
-      {
-        QMessageBox::information(0,"LinPsk",errorstring);
-        if (Sound != 0 )
-          delete Sound;
-          Sound = 0;
-        return false;
-      }
-       RxTimer->start(time,false);         // Every 371 ms we shoud get BUF_SIZE samples in DemoMode
-                                        // Or we poll the soundcard
+    RxTimer->start(time,false);     // Every 371 ms we shoud get BUF_SIZE samples in DemoMode
+                                    // Or we poll the soundcard
    }
 
 else        //Something went wrong in Opening Input File
   {
     if (settings.DemoMode)
-      QMessageBox::information(0,"LinPsk","No Samplefile for Demo selected or no File found\nPlease select File in File Menu");
+      QMessageBox::information(0,"LinPsk",errorstring);
     else
-       QMessageBox::critical(0,"LinPsk","Input Device not available\nProgram is terminating");
+       QMessageBox::critical(0,"LinPsk",errorstring);
     if ( Sound != 0 )
       delete Sound;
     Sound = 0;
@@ -314,23 +310,60 @@ double* Inptr;
 void CRxDisplay::process_rxdata()
 
 {
-QString s;
 
+bool overload;
  if (Sound->getSamples(inbuf,BUF_SIZE) == 0)
   return; // No sample available, try later
-
+overload=false;
 ProcDec2Fir( inbuf, outbuf , BUF_SIZE);	// 2uS per sample
-for(CRxChannel * p=RxChannel;p != 0;p=p->getNextChannel() )
-  if ( (p->getModulationType() != RTTY) && (p->getModulationType() != MFSK16) )
-    p->processInput(outbuf);
-  else
-    p->processInput(inbuf);
-/** Update RxFreq for the active Channel **/
+
+
 RxFreq->setFrequency( (unsigned int) settings.ActChannel->getRxFrequency());
 Squelch->setSquelchLevel(settings.ActChannel->getSquelchValue());
 settings.ActChannel->setThreshold(Squelch->getThreshold());
 settings.ActChannel->setSquelch(Squelch->getSquelchState());
-emit startPlotting();
+settings.ActChannel->setAfcMode(RxFreq->getAfcMode());
+
+for(CRxChannel * p=RxChannel;p != 0;p=p->getNextChannel() )
+  if ( (p->getModulationType() != RTTY) && (p->getModulationType() != MFSK16) )
+    {
+      
+     p->processInput(outbuf,output);
+    }
+  else
+    p->processInput(inbuf,output);
+
+/** Update RxFreq for the active Channel **/
+emit new_IMD(settings.ActChannel->getIMD());
+
+
+// Calculate FFT and start Ploting 
+
+// First  look for overload 
+int N=BUF_SIZE/2;
+for(int i=0; i <N;i++)
+{
+ if ( inbuf[i] > 0.77)
+  overload=true;
+ // Apply Hamming to Data
+ outbuf[i] *=(0.54-0.46*cos((i*PI2)/N));  
+ }
+if( !overload)
+ for(int i=N;i<BUF_SIZE;i++)
+  if (inbuf[i] > 0.77 ) 
+   {
+    overload=true;
+    break;
+   }
+fftw_execute(plan);
+
+//Calculate power spectrum 
+for(int i=1;i<BUF_SIZE/4;i++)
+ output[i] =output[i]*output[i] + output[BUF_SIZE/2-i]*output[BUF_SIZE/2-i];
+ 
+emit startPlotting(output,overload);
+
+  
 }
 
 void CRxDisplay::addRxWindow(int Frequency,Mode Modulation,QString Heading)
@@ -347,12 +380,6 @@ RxHeader->repaint();
  trigger(); // We should ensure that the triggertext is stored;
 }
 
-
-double * CRxDisplay::FFTValues()
-{
-return outbuf;
-}
-
 void CRxDisplay::setRxFrequency(double freq)
 {
 settings.ActChannel->setRxFrequency(freq);
@@ -363,11 +390,13 @@ void CRxDisplay::changeActiveRxWindow(int ID)
 if (settings.ActChannel != 0 )
   {
   settings.ActChannel->hide();
-  settings.ActChannel->setQsoData(*(settings.QsoData)); // Save actual Data to  Channel
+  settings.ActChannel->setQsoData(settings.QslData); // Save actual Data to  Channel
+  settings.ActChannel->setAfcMode(RxFreq->getAfcMode());
   if (settings.ActChannel->getChannel(ID) != 0 )
     settings.ActChannel=settings.ActChannel->getChannel(ID);
-  *(settings.QsoData) = settings.ActChannel->getQsoData();  
-  RxFreq->setState(settings.ActChannel->getAFC());
+  settings.QslData = settings.ActChannel->getQsoData();
+  RxFreq->setAfcDisplayMode(settings.ActChannel->AfcProperties());
+  RxFreq->setAfcMode(settings.ActChannel->getAfcMode());
   RxFreq->setFrequency((unsigned int) settings.ActChannel->getRxFrequency());
   Squelch->setSquelchState(settings.ActChannel->getSquelchState());
   Squelch->setThreshold(settings.ActChannel->getThreshold());
@@ -380,18 +409,16 @@ if (settings.ActChannel != 0 )
   RxHeader->setCurrentTab(ID);
   }
 }
-void CRxDisplay::setAFC(bool OnOff)
-/** Using this slot , we avoid to connect and disconnect the active channel,
-if the active channel changes **/
-{
-if (settings.ActChannel !=0)
-  settings.ActChannel->setAFC(OnOff);
-}
+
+
 void CRxDisplay::stop_process_loop()
 {
 RxTimer->stop();
-Sound->close_Device();
-delete Sound;
+if (Sound != 0)
+{
+ Sound->close_Device();
+ delete Sound;
+}
 Sound = 0 ;
 }
 void CRxDisplay::trigger()
@@ -405,3 +432,8 @@ void CRxDisplay::setColorList(std::vector<QColor> *c)
 {
 RxHeader->setColorList(c);
 }
+void CRxDisplay::clearRxWindow()
+{
+settings.ActChannel->clearRxWindow();
+}
+
diff --git a/linpsk/crxdisplay.h b/src/crxdisplay.h
similarity index 89%
rename from linpsk/crxdisplay.h
rename to src/crxdisplay.h
index 49fc8c5..05cfa09 100644
--- a/linpsk/crxdisplay.h
+++ b/src/crxdisplay.h
@@ -26,6 +26,8 @@
 #include <qcolor.h>
 #include <vector>
 
+#include <fftw3.h>
+#include "constants.h"
 class QTab;
 class CRecording;
 class CRxChannel;
@@ -35,6 +37,7 @@ class FrequencySelect;
 class CRxWindow;
 class Input;
 class QTimer;
+class QPushButton;
 
 
 class MyTabBar : public QTabBar
@@ -68,7 +71,7 @@ public:
     CSquelch* Squelch;
     void setColorList(std::vector<QColor> *);
     MyTabBar* RxHeader;
-//    MyTab* Tab;
+
 public slots:
   /** Starting receiving/transmitting */
   void addRxWindow(int Frequency,Mode Modulation,QString Heading);
@@ -83,8 +86,8 @@ protected slots:
   virtual void languageChange();
   void process_rxdata();
   void changeActiveRxWindow(int);
-  void setAFC(bool);
   void trigger();
+  void clearRxWindow();
 private:
   void calculateSizeofComponents();
 /**
@@ -92,20 +95,28 @@ Sound is a pointer to the Input Source, may be a File with
 Demo Samples (text or wav), or the soundcard ( /dev/audio )
 **/
   Input *Sound;
+QPushButton *Clear;  
 /** Pointer to input Buffer **/
-  double *inbuf;
+//  double *inbuf;
+double inbuf[BUF_SIZE];
   CRxChannel *RxChannel;
    /** Decimation Filter to reduce samplerate */
 void ProcDec2Fir(double *pIn, double *pOut,int BlockSize);
    double *dec2fir; // queue for decimation by 2 filter
-   double *outbuf; // outputbuffer
+//   double *outbuf; // outputbuffer
+   double outbuf[BUF_SIZE];
    double *m_pDec2InPtr;
 /** Timer ** for polling the soundcard **/
 QTimer *RxTimer;
+//fftw_real* output;
+double output[BUF_SIZE/2];
+fftw_plan plan;
+
 signals:
-//void abbruch();
-void startPlotting();
+
+void startPlotting(double *,bool);
 void newActiveChannel();
+void new_IMD(float);
 
 };
 
diff --git a/linpsk/crxwindow.cpp b/src/crxwindow.cpp
similarity index 92%
rename from linpsk/crxwindow.cpp
rename to src/crxwindow.cpp
index d6a9f74..bd8d71e 100644
--- a/linpsk/crxwindow.cpp
+++ b/src/crxwindow.cpp
@@ -46,8 +46,8 @@ for (int i=0;i<RxWindowBuffer;i++)
 
   ScrollBuffer[i]->setFrameShape( QLineEdit::NoFrame );
   ScrollBuffer[i]->setReadOnly(true);
-  ScrollBuffer[i]->setFixedWidth(620);
-  ScrollBuffer[i]->setMaxLength(80);
+  ScrollBuffer[i]->setFixedWidth(642);
+//  ScrollBuffer[i]->setMaxLength(80);
   ScrollBuffer[i]->setFixedHeight(fm.height());
   }
 verticalScrollBar()->setFixedWidth(16);
@@ -64,6 +64,14 @@ AutoScroll=true;
  */
 CRxWindow::~CRxWindow()
 {
+ for (int i=0;i<RxWindowBuffer;i++)
+ {
+  
+  if(ScrollBuffer[i])
+   delete ScrollBuffer[i];
+  ScrollBuffer[i]=0;
+ }
+  
     // no need to delete child widgets, Qt does it all for us
 }
 void CRxWindow::updateRx(char c)
@@ -209,20 +217,27 @@ QString CRxWindow::getTriggerText()
 void CRxWindow::stopRecording()
 {
 /** Save all lines in Buffer **/
-for(int i=0; i <= Row; i++)
- *stream << ScrollBuffer[i]->text() << "\n";
-File.close();
-save=false;
-delete stream;   
+if (save)
+ {
+  for(int i=0; i <= Row; i++)
+   *stream << ScrollBuffer[i]->text() << "\n"; 
+  File.close();
+  save=false;
+  delete stream;
+ }
 }  
 void CRxWindow::startRecording(QString Datei)
 {
-File.setName(Datei);
-File.open(IO_WriteOnly);
-save=true;
-stream =new QTextStream(&File);  
+if(!save)
+ {
+  File.setName(Datei);
+  File.open(IO_WriteOnly);
+  save=true;
+  stream =new QTextStream(&File);
+ } 
 }
 bool CRxWindow::getRecordingState()
 {
   return save;
 }  
+
diff --git a/linpsk/crxwindow.h b/src/crxwindow.h
similarity index 98%
rename from linpsk/crxwindow.h
rename to src/crxwindow.h
index c956614..a33072b 100644
--- a/linpsk/crxwindow.h
+++ b/src/crxwindow.h
@@ -19,14 +19,13 @@
 
 #include <qscrollview.h>
 #include "constants.h"
-#include "qsoinfo.h"
+
 #include <qfile.h>
 #include <qtextstream.h>
 class QLineEdit;
 class QVBox;
 class QWidget;
 class QString;
-
 class CRxWindow : public QScrollView
 {
     Q_OBJECT
@@ -55,6 +54,7 @@ protected slots:
 private:
 
 QLineEdit* ScrollBuffer[RxWindowBuffer];
+
 int Row,Column;
 void RemoveFirstLine();
 void NeueZeile();
diff --git a/src/csound.cpp b/src/csound.cpp
new file mode 100644
index 0000000..4ed955a
--- /dev/null
+++ b/src/csound.cpp
@@ -0,0 +1,318 @@
+/***************************************************************************
+                          csound.cpp  -  description
+                             -------------------
+    begin                : Wed Apr 5 2000
+    copyright            : (C) 2000 by Volker Schroer
+    email                : huv.schroer at gmx.de
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) any later version.                                   *
+ ***************************************************************************/
+
+#include "csound.h"
+#include "parameter.h"
+
+extern Parameter settings;
+static int inputCallback(   void *inputBuffer, void *,
+                             unsigned long framesPerBuffer,
+                             PaTimestamp , void *userData )
+{
+int SamplestoStore;
+SamplestoStore=framesPerBuffer;
+float *store;
+AudioBuffer *buffer = (AudioBuffer *) userData;
+float *inputData =(float *) inputBuffer;
+
+if (SamplestoStore != BUF_SIZE )
+ return 0; // Should never happen;
+store = buffer->audiobuffer + buffer->in;
+for (int i=0; i < SamplestoStore; i ++)
+ *(store++) = *(inputData+ 2*i);
+
+  buffer->in += BUF_SIZE;
+  buffer->available++;
+  if (buffer->in >= buffer->maxbuf)
+   buffer->in -=buffer->maxbuf;
+ 
+return 0;
+}                             
+
+static int outputCallback(   void *, void *outputBuffer,
+                             unsigned long framesPerBuffer,
+                             PaTimestamp , void *userData )
+{
+int SamplestoSend;
+float *out;
+
+SamplestoSend=framesPerBuffer;
+
+AudioBuffer *buffer=(AudioBuffer *) userData;
+float *outputData= (float *) outputBuffer;
+if (buffer->available <= 0)
+{
+// printf("No buffers available\n");
+ return 0; // Should never happen
+} 
+if(SamplestoSend != BUF_SIZE)
+{
+
+// printf("Not enough samples available\n");
+ return 0; // Should never happen
+}  
+out=buffer->audiobuffer + buffer->out;
+for(int i=0;i < SamplestoSend; i++)
+{
+  *outputData++ = (*out);    //left and right channels should be the same
+  *outputData++ = (*out++);
+ }
+
+buffer->available--;
+// printf("buffer read %d\n",buffer->available);
+buffer->out +=BUF_SIZE;
+if (buffer->out >= buffer->maxbuf )
+ buffer->out =0;
+ 
+return 0; 
+  
+}
+                                                          
+CSound::CSound(int ptt = -1):Input(ptt)
+{
+stream=0;
+audio_buffer.maxbuf=3*BUF_SIZE; // We take 3 buffers
+audio_buffer.audiobuffer =new float[audio_buffer.maxbuf];
+started=false;
+output=false;
+
+}
+CSound::~CSound()
+{
+if ( audio_buffer.audiobuffer >0)
+	delete audio_buffer.audiobuffer;
+}
+
+int CSound::getSamples(double *sample,int anzahl)
+{
+if (audio_buffer.available >0)
+ {
+  float *x;
+  audio_buffer.available--;
+  audio_buffer.out += anzahl;
+  if (audio_buffer.out >= audio_buffer.maxbuf)
+   audio_buffer.out=0;
+  x=&audio_buffer.audiobuffer[audio_buffer.out];
+  for(int i=0; i < anzahl; i++)
+   *sample++=(*x++);
+  return anzahl;
+ }
+else 
+ return 0;	
+}
+    
+bool CSound::open_Device_read(QString *errorstring)
+{
+
+output=false;
+audio_buffer.in=0;
+audio_buffer.out=-BUF_SIZE;
+audio_buffer.available=0;
+if (settings.ActualInputDevice < 0 )
+
+   {
+    *errorstring= QString(QObject::tr("No Inputdevice available or Inputdevice not selected"));
+    return false;
+    }
+  
+saveSampleRate(settings.InputDevices[settings.ActualInputDevice]); 
+PaError error=Pa_OpenStream(    &stream,
+				settings.InputDevices[settings.ActualInputDevice],
+				2,
+				paFloat32,
+				0,
+				paNoDevice,
+				0,
+				paFloat32,
+				0,
+				11025,
+				4096,
+				0,
+				paClipOff,
+//				paNoFlag,
+                                inputCallback,
+				&audio_buffer);
+if (error != 0 )
+ {
+   *errorstring= QString(QObject::tr("Error opening stream \n"))+QString( Pa_GetErrorText(error) ); 
+   return false;
+  }
+error=Pa_StartStream(stream);
+if (error != 0)
+ {
+   *errorstring= QString(QObject::tr("Error , couldn't start stream")); 
+   return false;
+ }
+else
+ started=true;
+return true;
+} 
+
+
+bool CSound::open_Device_write(QString *errorstring)
+{
+if (settings.ActualOutputDevice < 0)
+ {
+  *errorstring= QString(QObject::tr("No Outputdevice available or Outputdevice not selected")); 
+  return false;
+ }
+
+output=true;
+audio_buffer.in=-BUF_SIZE;
+audio_buffer.out=0;
+audio_buffer.available=0;
+saveSampleRate(settings.InputDevices[settings.ActualInputDevice]); 
+
+PaError error=Pa_OpenStream(
+ &stream,       // PortAudioStream **
+ paNoDevice,                 // PaDeviceID    Input
+ 0,                          // Anzahl Input Channel
+ paFloat32,                  // Format (float)
+ 0,                          // InputDriverinfo *
+ settings.OutputDevices[settings.ActualOutputDevice],  // PaDeviceID Output
+ 2,                          // Anzahl output Channel
+ paFloat32,                  // Format (float)
+ 0,                          // OutputDriverInfo *
+ 11025,                      // SampleReate
+ 4096,                       // Frames per Buffer
+ 0,                          // number of Buffers 0= Minimum
+ paClipOff,                  // Streams Flags
+ outputCallback,             // PortAudioCallback *
+ &audio_buffer);             // userdata *
+ if (error != 0 )
+  {
+   *errorstring= QString(QObject::tr("Error opening stream")); 
+   return false;
+  }
+return true;
+}
+
+int CSound::putSamples(double *sample,int anzahl)
+{
+if (audio_buffer.available * BUF_SIZE < audio_buffer.maxbuf)
+ {
+  float *x;
+  
+  audio_buffer.in += anzahl;
+  if (audio_buffer.in >= audio_buffer.maxbuf)
+   audio_buffer.in=0;
+  x=&audio_buffer.audiobuffer[audio_buffer.in];
+  for(int i=0; i < anzahl; i++)
+   *x++=*sample++;
+  audio_buffer.available++;
+//  printf("Buffers filled %d\n",audio_buffer.available);
+ return anzahl;
+ }
+else 
+ return 0;
+}
+
+void CSound::PTT(bool mode)
+{
+int flags;
+int ii;
+flags= TIOCM_RTS|TIOCM_DTR;
+if (serial <0) // No serial Device selected
+{
+ // No PTT, only start stream
+ if (mode)
+  {
+   if ( !started ) 
+   {
+    Pa_StartStream(stream);
+    started = true;
+   }
+  } 
+ else
+  { 
+   if ( started ) 
+   {
+    Pa_AbortStream(stream);
+    started = false;
+   }
+  }  
+ return;
+} 
+if (mode)		// PTT on
+{	
+ ii=ioctl(serial,TIOCMBIS,&flags);
+ if ( !started ) 
+   {
+    Pa_StartStream(stream);
+    started = true;
+   }
+} 
+else
+ {
+     if ( started ) 
+   {
+    Pa_AbortStream(stream);
+    started = false;
+   } 
+  ii=ioctl(serial,TIOCMBIC,&flags);
+ } 
+return;
+}
+
+bool CSound::close_Device()
+{
+//if (started)
+if (output)
+{ 
+  // Wait for AudioBuffer to get empty
+ while (audio_buffer.available> 0 )
+  usleep(10000);
+  
+}   
+if (started)
+ Pa_StopStream(stream); 
+if ( stream != 0 )
+ {
+  Pa_CloseStream(stream);
+  stream=0;
+ } 
+started=false;
+output = false;
+return true;
+}
+void CSound::saveSampleRate(PaDeviceID ID)
+{
+
+const PaDeviceInfo* Device;
+// Try to get the acutal Sample Rate
+Device =Pa_GetDeviceInfo(settings.InputDevices[settings.ActualInputDevice]);
+if (Device->numSampleRates == -1)
+ OldSampleRate=Device->sampleRates[1];  // Range, select MaxRate
+else
+ { 
+  if (Device->numSampleRates >0 )
+   OldSampleRate=Device->sampleRates [Device->numSampleRates-1];
+  else
+   OldSampleRate=0;
+ }
+ 
+}
+void CSound::restoreSampleRate()
+{
+if (output)
+{
+}
+else
+{
+}
+}
+
+
diff --git a/linpsk/csound.h b/src/csound.h
similarity index 69%
rename from linpsk/csound.h
rename to src/csound.h
index 1e3b0a2..4e8deb6 100644
--- a/linpsk/csound.h
+++ b/src/csound.h
@@ -17,16 +17,12 @@
 #ifndef CSOUND_H
 #define CSOUND_H
 
-#ifndef LINPSK_FOR_MAC
-#include <sys/soundcard.h>
-#endif
-
 #include <sys/ioctl.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-
+#include <portaudio.h>
 
 #include <qobject.h>
 
@@ -35,38 +31,37 @@
 /**Class for operating on SoundCard
   *@author Volker Schroer
   */
-
+  
+typedef struct {
+    float *audiobuffer;
+    int in;
+    int out;
+    int available;
+    int maxbuf;
+    } AudioBuffer;  
 class CSound :public Input
 {
 public: 
 	CSound(int ptt);
 	~CSound();
-	bool open_Device_write(QString Device);
-#ifdef LINPSK_FOR_MAC
-	bool open_Device_read(QString Device);
-#endif
-	bool close_Device();
-	bool setParams(QString *errorstring);
-  int getSamples(double *,int);				// Reading Samples from Soundcard
+	virtual bool open_Device_write(QString *);
+	virtual bool open_Device_read(QString *);
+	virtual bool close_Device();
+        int getSamples(double *,int);				// Reading Samples from Soundcard
 	int putSamples(double *,int);
 	void PTT(bool);
 
 private: // Private attributes
-  /** Type of Operation Mono/Stereo */
-  int mode;
-  /** Audio Format **/
-	int audioformat;
-  /** Sampling rate */
-   int speed;
-	/** Fragmentsize for Soundcard IO */
-	int fragsize;
-	bool started;
-	unsigned char *audio_buffer;
-#ifdef LINPSK_FOR_MAC
-	int filled;
-#else
-  audio_buf_info info;
-#endif
+bool started;
+bool output;    
+PortAudioStream *stream;
+double OldSampleRate;
+
+AudioBuffer audio_buffer;
+void saveSampleRate(PaDeviceID );
+void restoreSampleRate();
+        
+
 };
 
 #endif
diff --git a/src/csquelch.cpp b/src/csquelch.cpp
new file mode 100644
index 0000000..cb11695
--- /dev/null
+++ b/src/csquelch.cpp
@@ -0,0 +1,339 @@
+/***************************************************************************
+                          |FILENAME|  -  description
+                             -------------------
+    begin                : |DATE|
+    copyright            : (C) |YEAR| by |AUTHOR|
+    email                : |EMAIL|
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) any later version.                                   *
+ ***************************************************************************/
+
+#include <qvariant.h>
+#include <qradiobutton.h>
+#include <qslider.h>
+#include <qlayout.h>
+#include <qpainter.h>
+#include <qstyle.h>
+#include <qlabel.h>
+
+#include <qdrawutil.h>
+#include <qpalette.h>
+
+#include "csquelch.h"
+#include "color.h"
+
+#define Black color[0]
+#define Grey  color[64]
+#define Cyan  color[127]
+#define Yellow color[192]
+
+mySlider::mySlider(QWidget *parent, const char *name = 0) :
+QSlider(parent,name)
+{
+    setOrientation( QSlider::Vertical );
+    setTickmarks( QSlider::NoMarks );
+    setTickInterval( 10 );
+    setMinValue(0);
+    setMaxValue(100);
+
+setValue(50);
+SquelchLevel=0;
+
+
+}
+
+mySlider::~mySlider()
+{
+}
+/** Painting Slider Background depending on Threshold and Signal Strength
+*/
+
+void mySlider::paintEvent(QPaintEvent *)
+{
+
+QPainter p;
+
+QColorGroup cg(colorGroup());
+const QColor c0 = cg.shadow();
+const QColor c1 = cg.dark();
+const QColor c3 = cg.light();
+QColor c4;
+
+int scale;
+
+//p=new QPainter();
+p.begin(this);
+
+int mid = this->width()/2;
+QRect groove = this->rect();
+QRect handle = this->sliderRect();
+                
+int x, y, w, h;
+             
+if ( this->orientation() == Horizontal )
+ {
+  x = 0;
+  y = groove.y() + mid - 3;
+  w = this->width();
+  h = 7;
+ }
+ else
+ {
+   
+   x = groove.x() + mid - 3;
+   
+   w = 10;
+   y = w/2;
+   h = this->height()-w;
+ }
+p.fillRect( x, y, w, h, c1);
+scale=(h*(100-SquelchLevel))/100;
+
+if (SquelchLevel > (100-value()) )
+  c4=Yellow;
+else
+ c4 = Cyan;
+ 
+if ( SquelchLevel == 0  )
+ c4 = c1;
+
+// the dark side
+p.setPen( c1 );
+//p->drawLine( x, y, x + w - 1, y );
+p.drawLine( x, y, x, y + h - 1);
+p.setPen( c0 );
+//p->drawLine( x + 1, y + 1, x + w - 2, y + 1 );
+p.drawLine( x + 1, y + 1, x + 1, y + h - 2 );
+// the bright side!
+
+p.drawLine( x + 1,  y + h - 2, x + w - 2,  y + h - 2 );
+p.drawLine( x + w - 2, y + 1, x + w - 2, y + h - 2 );
+p.setPen( c3 );
+p.drawLine( x, y + h - 1, x + w - 1, y + h - 1 );
+p.drawLine( x + w - 1, y, x + w - 1, y + h - 1 );
+
+p.fillRect(x+1,y+scale,w-2,h-scale,c4);       
+
+p.setBrush(c1);
+p.setPen(c1);
+p.drawPie(x,y-w/2,w-1,w-1,0,2880);
+p.setBrush(c4);
+p.setPen(c4);
+p.drawPie(x,h,w-1,w-1,2880,2880);
+p.setPen(c1);
+p.drawArc(x,h,w-1,w-1,2880,1440);
+p.setPen( c3 );
+p.drawArc(x,h,w-1,w-1,4320,1440);
+
+// ### end slider groove
+
+// Slider Handle
+                int x1 = handle.x();
+                int x2 = handle.x() + handle.width() - 1;
+                int y1 = handle.y();
+                int y2 = handle.y() + handle.height() - 1;
+                int mx = handle.width() / 2;
+                int my = handle.height() / 2;
+
+                if ( this->orientation() == Vertical ) {
+                    // Background
+                    QBrush oldBrush = p.brush();
+                    p.setBrush( cg.brush( QColorGroup::Button ) );
+                    p.setPen( NoPen );
+                    QPointArray a(6);
+                    a.setPoint( 0, x1 + 1, y1 + 1 );
+                    a.setPoint( 1, x2 - my + 2, y1 + 1 );
+                    a.setPoint( 2, x2 - 1, y1 + my - 1 );
+                    a.setPoint( 3, x2 - 1, y2 - my + 1 );
+                    a.setPoint( 4, x2 - my + 2, y2 - 1 );
+                    a.setPoint( 5, x1 + 1, y2 - 1 );
+                    p.drawPolygon( a );
+                    p.setBrush( oldBrush );
+
+                    // shadow border
+                    p.setPen( c0 );
+                    p.drawLine( x1, y1 + 1, x1,y2 - 1 );
+                    p.drawLine( x2 - my + 2, y1, x2, y1 + my - 2 );
+                    p.drawLine( x2 - my + 2, y2, x2, y1 + my + 2 );
+                    p.drawLine( x2, y1 + my - 2, x2, y1 + my + 2 );
+                    p.drawLine( x1 + 1, y1, x2 - my + 2, y1 );
+                    p.drawLine( x1 + 1, y2, x2 - my + 2, y2 );
+
+                    // light shadow
+                    p.setPen( c3 );
+                    p.drawLine( x1 + 1, y1 + 2, x1 + 1, y2 - 2 );
+                    p.drawLine( x1 + 1, y1 + 1, x2 - my + 2, y1 + 1 );
+                    p.drawLine( x2 - my + 2, y1 + 1, x2 - 1, y1 + my - 2 );
+
+                    // dark shadow
+                    p.setPen(c1);
+                    p.drawLine( x2 - 1, y1 + my - 2, x2 - 1, y1 + my + 2 );
+                    p.drawLine( x2 - my + 2, y2 - 1, x2 - 1, y1 + my + 2 );
+                    p.drawLine( x1 + 1, y2 - 1, x2 -my + 2, y2 - 1 );
+
+                } else {  // Horizontal
+                    QBrush oldBrush = p.brush();
+                    p.setBrush( cg.brush( QColorGroup::Button ) );
+                    p.setPen( NoPen );
+                    QPointArray a(6);
+                    a.setPoint( 0, x2 - 1, y1 + 1 );
+                    a.setPoint( 1, x2 - 1, y2 - mx + 2 );
+                    a.setPoint( 2, x2 - mx + 1, y2 - 1 );
+                    a.setPoint( 3, x1 + mx - 1, y2 - 1 );
+                    a.setPoint( 4, x1 + 1, y2 - mx + 2 );
+                    a.setPoint( 5, x1 + 1, y1 + 1 );
+                    p.drawPolygon( a );
+                    p.setBrush( oldBrush );
+
+                    // shadow border
+                    p.setPen( c0 );
+                    p.drawLine( x1 + 1, y1, x2 - 1, y1 );
+                    p.drawLine( x1, y2 - mx + 2, x1 + mx - 2, y2 );
+                    p.drawLine( x2, y2 - mx + 2, x1 + mx + 2, y2 );
+                    p.drawLine( x1 + mx - 2, y2, x1 + mx + 2, y2 );
+                    p.drawLine( x1, y1 + 1, x1, y2 - mx + 2 );
+                    p.drawLine( x2, y1 + 1, x2, y2 - mx + 2 );
+
+                    // light shadow
+                    p.setPen(c3);
+                    p.drawLine( x1 + 1, y1 + 1, x2 - 1, y1 + 1 );
+                    p.drawLine( x1 + 1, y1 + 1, x1 + 1, y2 - mx + 2 );
+
+                    // dark shadow
+                    p.setPen(c1);
+                    p.drawLine( x2 - 1, y1 + 1, x2 - 1, y2 - mx + 2 );
+                    p.drawLine( x1 + 1, y2 - mx + 2, x1 + mx - 2, y2 - 1 );
+                    p.drawLine( x2 - 1, y2 - mx + 2, x1 + mx + 2, y2 - 1 );
+                    p.drawLine( x1 + mx - 2, y2 - 1, x1 + mx + 2, y2 - 1 );
+
+	}
+
+
+
+p.end();
+
+
+}
+
+void mySlider::setSquelchLevel(int level)
+{
+SquelchLevel=level;
+repaint();
+}
+
+int mySlider::getThreshold()
+{
+return 100-value();
+}
+
+/* 
+ *  Constructs a CSquelch which is a child of 'parent', with the 
+ *  name 'name'.' 
+ */
+CSquelch::CSquelch( QWidget* parent,  const char* name )
+    : QGroupBox( parent, name )
+{
+    setFrameShape( QGroupBox::WinPanel );
+    setFrameShadow( QGroupBox::Raised );
+    setAlignment( int( QGroupBox::AlignHCenter ) );
+
+    Activate = new QRadioButton( this, "Activate" );
+    Activate->setGeometry( QRect( 120, 340, 60, 41 ) );
+    ActivateText = new QLabel(this,"ActivateText");
+    ActivateText->setAlignment(AlignHCenter);
+ 
+
+    Squelch = new mySlider( this, "Squelch" );
+ //   Squelch->setPaletteBackgroundColor( QColor( 0, 0, 0 ) );
+    Squelch->setOrientation( QSlider::Vertical );
+    Squelch->setTickmarks( QSlider::NoMarks );
+    Squelch->setTickInterval( 10 );
+    Squelch->setMinValue(0);
+    Squelch->setMaxValue(100);
+
+   
+    languageChange();
+
+}
+
+/*
+ *  Destroys the object and frees any allocated resources
+ */
+CSquelch::~CSquelch()
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+
+/*
+ *  Sets the strings of the subwidgets using the current
+ *  language.
+ */
+void CSquelch::languageChange()
+{
+    setTitle( tr( "Squelch" ) );
+    ActivateText->setText( tr( "On/Off" ) );
+}
+void CSquelch::resizeEvent( QResizeEvent * )
+{
+calculateSizeofComponents();
+}
+
+void CSquelch::calculateSizeofComponents()
+{
+/** Margins **/
+#define TOPMARGIN 10
+/** WIDTH and Height in % **/
+#define SQUELCHWIDTH 25
+#define SQUELCHHEIGHT 70
+#define BUTTONWIDTH 90
+#define BUTTONHEIGHT 10
+
+int xpos,ypos, width,height,innerwidth,innerheight;
+
+width=this->width();
+height=this->height();
+innerwidth=width*SQUELCHWIDTH/100;
+xpos=(width-innerwidth)/2;
+ypos=height*TOPMARGIN/100;
+innerheight=height*SQUELCHHEIGHT/100;
+Squelch->setGeometry(xpos,ypos,innerwidth,innerheight);
+ypos=ypos+innerheight;
+innerheight=height*BUTTONHEIGHT/100;
+Activate->setGeometry(xpos,ypos,innerwidth,innerheight);
+innerwidth=width*BUTTONWIDTH/100;
+xpos=(width-innerwidth)/2;
+ypos=ypos+innerheight;
+ActivateText->setGeometry(xpos,ypos,innerwidth,innerheight);
+
+this->setFrameRect(QRect(0,0,width,height));
+}
+
+
+void CSquelch::setSquelchLevel(int level)
+{
+Squelch->setSquelchLevel(level);
+repaint();
+
+}
+int CSquelch::getThreshold()
+{
+return Squelch->getThreshold();
+}
+bool CSquelch::getSquelchState()
+{
+return Activate->isOn();
+}
+void CSquelch::setSquelchState(bool state)
+{
+Activate->setChecked(state);
+}
+void CSquelch::setThreshold(int Threshold)
+{
+Squelch->setValue(100-Threshold);
+}
diff --git a/linpsk/csquelch.h b/src/csquelch.h
similarity index 100%
rename from linpsk/csquelch.h
rename to src/csquelch.h
diff --git a/linpsk/ctrigger.cpp b/src/ctrigger.cpp
similarity index 100%
rename from linpsk/ctrigger.cpp
rename to src/ctrigger.cpp
diff --git a/linpsk/ctrigger.h b/src/ctrigger.h
similarity index 100%
rename from linpsk/ctrigger.h
rename to src/ctrigger.h
diff --git a/linpsk/ctxbuffer.cpp b/src/ctxbuffer.cpp
similarity index 87%
rename from linpsk/ctxbuffer.cpp
rename to src/ctxbuffer.cpp
index 6a8ab0b..16fad55 100644
--- a/linpsk/ctxbuffer.cpp
+++ b/src/ctxbuffer.cpp
@@ -56,13 +56,32 @@ else
 }
 void CTxBuffer::insert(int c)
 {
-if (filled < TXBUFFER_LENGTH)
-  {
-    filled++;
-    txbuffer[inpos++]=c;
-    inpos = inpos % TXBUFFER_LENGTH;
+if ( c != '\b' )
+{
+ if (filled < TXBUFFER_LENGTH)
+ {
+  filled++;
+  txbuffer[inpos++]=c;
+  inpos = inpos % TXBUFFER_LENGTH;
   }
 }
+else
+{
+ filled--;
+ if ( filled <= 0)
+ {
+  inpos=0;
+  outpos=0;
+  filled=0;
+ }
+ else
+ {
+ inpos--;
+ if (inpos < 0)
+  inpos +=TXBUFFER_LENGTH;
+ }
+}   
+}
 void CTxBuffer::clear()
 {
 filled=0;
diff --git a/linpsk/ctxbuffer.h b/src/ctxbuffer.h
similarity index 93%
rename from linpsk/ctxbuffer.h
rename to src/ctxbuffer.h
index 92557e1..cf2c589 100644
--- a/linpsk/ctxbuffer.h
+++ b/src/ctxbuffer.h
@@ -33,11 +33,12 @@ int getTxChar();
 void insert(int);
 void insert(QString,int);
 void clear();
+
 private:
-	int txbuffer[TXBUFFER_LENGTH];
-  unsigned int filled;
-  unsigned int inpos;
-  unsigned int outpos;
+int txbuffer[TXBUFFER_LENGTH];
+int filled;
+unsigned int inpos;
+unsigned int outpos;
 };
 
 #endif
diff --git a/linpsk/ctxdisplay.cpp b/src/ctxdisplay.cpp
similarity index 96%
rename from linpsk/ctxdisplay.cpp
rename to src/ctxdisplay.cpp
index d61af79..7801fe0 100644
--- a/linpsk/ctxdisplay.cpp
+++ b/src/ctxdisplay.cpp
@@ -44,7 +44,8 @@ CTxDisplay::CTxDisplay( QWidget* parent,  const char* name )
     TxFreq = new FrequencySelect( this, "TxFreq" );
     TxFreq->setFunctionText("Net");
     TxFreq->setTitle("Tx Freq");
-    TxFreq->setState(true);
+    TxFreq->setAfcDisplayMode(Narrow);
+    TxFreq->setAfcMode(Narrow);
     TxFunctions = new CTxFunctions( this, "TxFunctions" );
     connect(TxFunctions,SIGNAL(startRx()),this,SIGNAL(startRx()));
     connect(TxFunctions,SIGNAL(startTx()),this,SIGNAL(startTx()));
@@ -75,14 +76,14 @@ void CTxDisplay::calculateSizeofComponents()
 /** TX Function part **/
 #define TXFUNCTIONWIDTH 10
 /** TxFrequency (Width) **/
-#define TXFREQWIDTH 15
+#define TXFREQWIDTH 18
 #define TXFREQHEIGHT 70
 /** Left and Right Margin **/
-#define LEFTANDRIGHTMARGIN 2
+#define LEFTANDRIGHTMARGIN 1
 /** Top and Bottom Margin **/
 #define TOPANDBOTTOMMARGIN 2
 /** Inner distance **/
-#define distance 3
+#define distance 1
 
 int xpos,ypos,width,height,innerheight,innerwidth;
 width=this->width();
diff --git a/linpsk/ctxdisplay.h b/src/ctxdisplay.h
similarity index 100%
rename from linpsk/ctxdisplay.h
rename to src/ctxdisplay.h
diff --git a/linpsk/ctxfunctions.cpp b/src/ctxfunctions.cpp
similarity index 100%
rename from linpsk/ctxfunctions.cpp
rename to src/ctxfunctions.cpp
diff --git a/linpsk/ctxfunctions.h b/src/ctxfunctions.h
similarity index 100%
rename from linpsk/ctxfunctions.h
rename to src/ctxfunctions.h
diff --git a/linpsk/ctxwindow.cpp b/src/ctxwindow.cpp
similarity index 73%
rename from linpsk/ctxwindow.cpp
rename to src/ctxwindow.cpp
index 9eeeb0a..f966ab8 100644
--- a/linpsk/ctxwindow.cpp
+++ b/src/ctxwindow.cpp
@@ -21,6 +21,9 @@
 #include <qlineedit.h>
 #include <qpushbutton.h>
 #include <qlayout.h>
+#include <qstring.h>
+#include <qclipboard.h>
+
 #include "ctxbuffer.h"
 #include "ctxwindow.h"
 #include <cctype>
@@ -28,6 +31,8 @@
  *  Constructs a CTxWindow which is a child of 'parent', with the 
  *  name 'name'.' 
  */
+ 
+
 CTxWindow::CTxWindow( QWidget* parent,  const char* name )
     : QFrame( parent, name )
 {
@@ -37,7 +42,7 @@ CTxWindow::CTxWindow( QWidget* parent,  const char* name )
     setMargin( 2 );
     setMidLineWidth( 1 );
 
-    Clear = new QPushButton( this, "Clear" );
+    Clear = new QPushButton( this, "TXClear" );
 
 
     Zeile1 = new QLineEdit( this, "Zeile1" );
@@ -58,11 +63,17 @@ CTxWindow::CTxWindow( QWidget* parent,  const char* name )
     Zeile2->setFocusProxy(this);
     Zeile3->setFocusProxy(this);
     setFocusPolicy(ClickFocus);
+    
     // signals and slots connections
-    connect( Clear, SIGNAL( clicked() ), this, SLOT( clear() ) );
+    connect( Clear , SIGNAL( clicked() ), this, SLOT( clear() ) );
     connect( Zeile1, SIGNAL( returnPressed() ), this, SLOT( gotoNextLine() ) );
     connect( Zeile2, SIGNAL( returnPressed() ), this, SLOT( gotoNextLine() ) );
     connect( Zeile3, SIGNAL( returnPressed() ), this, SLOT( gotoNextLine() ) );
+/**    
+    connect( Zeile1, SIGNAL( textChanged(const QString &)) , this, SLOT(transmitText(const QString &)));
+    connect( Zeile2, SIGNAL( textChanged(const QString &)) , this, SLOT(transmitText(const QString &)));
+    connect( Zeile3, SIGNAL( textChanged(const QString &)) , this, SLOT(transmitText(const QString &)));
+**/    
     setEnabled(true);
 }
 
@@ -108,7 +119,7 @@ void CTxWindow::calculateSizeofComponents()
 {
 #define MARGINS 3
 #define DISTANCE 1
-#define BUTTOMWIDTH 10
+#define BUTTOMWIDTH 20
 int xpos,ypos,width,height,innerheight,innerwidth;
 width=this->width();
 height=this->height();
@@ -151,6 +162,8 @@ void CTxWindow::languageChange()
 {
     Clear->setText( tr( "Clear" ) );
 }
+
+
 void CTxWindow::keyPressEvent(QKeyEvent *e)	// Bearbeiten der Eingaben im
 																						// TX Window
 {
@@ -162,51 +175,58 @@ if (Buffer->Filled())
 		e->ignore();
     return;
 	}
-switch(e->key())
-		{
-			case Key_Enter:
-			case Key_Return:
-      gotoNextLine();
-      Buffer->insert('\n');
-			e->accept();
-      break;
-
-			case Key_CapsLock:
-				CapsLock = !CapsLock;
-				e->accept();
-				break;
-
-
-			case Key_Backspace:
-				c='\b';
-				backspace();
-				e->accept();
-        Buffer->insert(c);
-				break;
-
-				default:
-				if ( (e->state() == ShiftButton) || CapsLock)
-				c=toupper(e->ascii());
-				else
-				c=tolower(e->ascii());
-				if ( c !=0 )
-					{
-					Spalte++;
-					if (Spalte >80)
-						{
-						Buffer->insert('\n'); //This newline Char will  be Transmitted
-            gotoNextLine();
-						}
-					Buffer->insert(c);
-          insert(c);
-					e->accept();
-  				}
-				} // End Case
 
+if ( e->state() & ControlButton )
+ {
+  if ( e->key() == Key_V )
+   pasteText( QApplication::clipboard()->text( QClipboard::Clipboard ) );
+ }
+else        
+ switch(e->key())
+  {
+   case Key_Enter:
+   case Key_Return:
+    gotoNextLine();
+    Buffer->insert('\n');
+    e->accept();
+  break;
+
+  case Key_CapsLock:
+    CapsLock = !CapsLock;
+    e->accept();
+   break;
+  
+  case Key_Backspace:
+   c='\b';
+   backspace();
+   e->accept();
+   Buffer->insert(c);
+  break;
 
+  default:
+//    ButtonState cc=e->state();
+//    if ( (cc == ShiftButton) )                
+  if ( (e->state() == ShiftButton) || CapsLock)
+   c=toupper(e->ascii());
+   else
+    c=tolower(e->ascii());
+   if ( c !=0 )
+   {
+    Spalte++;
+    if (Spalte >80)
+    {
+     Buffer->insert('\n'); //This newline Char will  be Transmitted
+     gotoNextLine();
+    }
+     Buffer->insert(c);
+     insert(c);
+     e->accept();
+    }
+   } // End Case
 
 } // keyPressEvent
 
+
 void CTxWindow::backspace()
 {
 
@@ -237,3 +257,20 @@ void CTxWindow::setTxBuffer(CTxBuffer *p)
 Buffer=p;
 }
 
+void CTxWindow::pasteText(const QString &Text)
+{
+int length;
+length=Text.length();
+for (int i=0; i < length; i++)
+ {
+  Spalte++;
+  if (Spalte >80)
+  {
+    Buffer->insert('\n'); //This newline Char will  be Transmitted
+    gotoNextLine();
+  }
+ char c=Text.at(i).latin1(); 
+ Buffer->insert(c);
+ insert(c);
+ }
+}
diff --git a/linpsk/ctxwindow.h b/src/ctxwindow.h
similarity index 97%
rename from linpsk/ctxwindow.h
rename to src/ctxwindow.h
index 4c9ecd3..c0462dd 100644
--- a/linpsk/ctxwindow.h
+++ b/src/ctxwindow.h
@@ -23,6 +23,7 @@
 class QLineEdit;
 class QPushButton;
 class CTxBuffer;
+class QString;
 
 class CTxWindow : public QFrame
 {
@@ -48,6 +49,7 @@ protected:
 
 protected slots:
     virtual void languageChange();
+    void pasteText(const QString &);
 private:
     unsigned int Zeile;
     unsigned int Spalte;
diff --git a/linpsk/deinterleaver.cpp b/src/deinterleaver.cpp
similarity index 100%
rename from linpsk/deinterleaver.cpp
rename to src/deinterleaver.cpp
diff --git a/linpsk/deinterleaver.h b/src/deinterleaver.h
similarity index 100%
rename from linpsk/deinterleaver.h
rename to src/deinterleaver.h
diff --git a/src/deletemacro.h b/src/deletemacro.h
new file mode 100644
index 0000000..f3be543
--- /dev/null
+++ b/src/deletemacro.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+** Form interface generated from reading ui file 'deletemacro.ui'
+**
+** Created: Tue May 11 08:02:19 2004
+**      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.2   edited Nov 24 13:47 $)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+
+#ifndef DELETEMACRO_H
+#define DELETEMACRO_H
+
+#include <qvariant.h>
+#include <qdialog.h>
+
+class QVBoxLayout;
+class QHBoxLayout;
+class QGridLayout;
+class QSpacerItem;
+class QPushButton;
+class QListBox;
+class QListBoxItem;
+class QLabel;
+class Macros;
+
+class DeleteMacro : public QDialog
+{
+    Q_OBJECT
+
+public:
+    DeleteMacro( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+    ~DeleteMacro();
+
+    QPushButton* Ok;
+    QPushButton* Cancel;
+    QListBox* MacroBox;
+    QPushButton* Add;
+    QPushButton* Remove;
+    QListBox* Macrostodelete;
+    QLabel* MLabel;
+    QLabel* DMacros;
+
+public slots:
+    virtual void init( Macros * k );
+    virtual void accept();
+
+protected:
+    Macros * AllMacros;
+
+    QHBoxLayout* layout1;
+    QSpacerItem* spacer1;
+    QHBoxLayout* layout20;
+    QVBoxLayout* layout19;
+    QHBoxLayout* layout5;
+    QSpacerItem* spacer3;
+
+protected slots:
+    virtual void languageChange();
+
+private slots:
+    void addtoList();
+    void removefromList();
+
+};
+
+#endif // DELETEMACRO_H
diff --git a/src/editmacro.h b/src/editmacro.h
new file mode 100644
index 0000000..7c8f98a
--- /dev/null
+++ b/src/editmacro.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+** Form interface generated from reading ui file 'editmacro.ui'
+**
+** Created: Thu Apr 22 17:10:16 2004
+**      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.1   edited Nov 24 13:47 $)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+
+#ifndef EDITMACRO_H
+#define EDITMACRO_H
+
+#include <qvariant.h>
+#include <qdialog.h>
+
+class QVBoxLayout;
+class QHBoxLayout;
+class QGridLayout;
+class QSpacerItem;
+class QLabel;
+class QPushButton;
+class QComboBox;
+class QTextEdit;
+class QListBox;
+class QListBoxItem;
+class QSpinBox;
+class QLineEdit;
+class Macros;
+
+class EditMacro : public QDialog
+{
+    Q_OBJECT
+
+public:
+    EditMacro( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+    ~EditMacro();
+
+    QLabel* textLabel2;
+    QPushButton* buttonCancel;
+    QPushButton* buttonOk;
+    QComboBox* SelectMacro;
+    QTextEdit* Definition;
+    QLabel* textLabel1_2;
+    QListBox* Keywords;
+    QSpinBox* Position;
+    QLabel* textLabel1;
+    QLabel* textLabel1_3;
+    QLineEdit* Accelerator;
+
+public slots:
+    virtual void init( Macros * k );
+
+protected:
+
+protected slots:
+    virtual void languageChange();
+
+    virtual void accept();
+
+
+private:
+    Macros *AllMacros;
+
+private slots:
+    void setText( int Number );
+
+};
+
+#endif // EDITMACRO_H
diff --git a/linpsk/feccoder.cpp b/src/feccoder.cpp
similarity index 100%
rename from linpsk/feccoder.cpp
rename to src/feccoder.cpp
diff --git a/linpsk/feccoder.h b/src/feccoder.h
similarity index 100%
rename from linpsk/feccoder.h
rename to src/feccoder.h
diff --git a/linpsk/fircoeffs.h b/src/fircoeffs.h
similarity index 85%
rename from linpsk/fircoeffs.h
rename to src/fircoeffs.h
index d073bfd..7cf7225 100644
--- a/linpsk/fircoeffs.h
+++ b/src/fircoeffs.h
@@ -28,7 +28,8 @@
 //  Band     Lower       Upper       Value      Weight
 //            edge        edge
 //   1         0.0       .018         1.0         1
-//   2         .25        .5        .00007       100  
+//   2         .25        .5        .00007       100
+/** 
 const double Dec2LPCoef[DEC2_LPFIR_LENGTH ] = {
   0.00041063658,
   0.00040020444,
@@ -76,6 +77,54 @@ const double Dec2LPCoef[DEC2_LPFIR_LENGTH ] = {
   0.00040020444,
   0.00041063658
 };
+**/
+const double Dec2LPCoef[DEC2_LPFIR_LENGTH ] = {
+  0.0041063658,
+  0.0040020444,
+  -0.014690721,
+  -0.046244896,
+  -0.048873265,
+  0.0057075169,
+   0.064849067,
+   0.034999371,
+  -0.072838126,
+   -0.10484073,
+   0.032609865,
+    0.17545124,
+   0.073308048,
+    -0.2042501,
+   -0.24496589,
+    0.13398095,
+    0.45762697,
+    0.10940839,
+   -0.66633815,
+   -0.69373038,
+    0.81944411,
+     3.0510648,
+     4.1246774,
+     3.0510648,
+    0.81944411,
+   -0.69373038,
+   -0.66633815,
+    0.10940839,
+    0.45762697,
+    0.13398095,
+   -0.24496589,
+    -0.2042501,
+   0.073308048,
+    0.17545124,
+   0.032609865,
+   -0.10484073,
+  -0.072838126,
+   0.034999371,
+   0.064849067,
+  0.0057075169,
+  -0.048873265,
+  -0.046244896,
+  -0.014690721,
+  0.0040020444,
+  0.0041063658
+};
 
 #define DEC3_LPFIR_LENGTH 27
 //  Design method: Parks-McClellan method
@@ -84,8 +133,10 @@ const double Dec2LPCoef[DEC2_LPFIR_LENGTH ] = {
 //  Band     Lower       Upper       Value      Weight
 //            edge        edge
 //   1         0.0       .017         1.0         1
-//   2         .166666    .5        .00002       10  
+//   2         .166666    .5        .00002       10 
+ 
 const double Dec3LPCoef[DEC3_LPFIR_LENGTH ] = {
+ /**
  -0.00028892587,
   -0.0012431135,
   -0.0033184787,
@@ -113,6 +164,34 @@ const double Dec3LPCoef[DEC3_LPFIR_LENGTH ] = {
   -0.0033184787,
   -0.0012431135,
  -0.00028892587
+ **/
+  -0.0028892587,
+  -0.012431135,
+  -0.033184787,
+  -0.065777314,
+   -0.10172455,
+   -0.11982908,
+  -0.087991708,
+   0.027573615,
+    0.24743232,
+     0.5640933,
+     0.9349033,
+     1.2882953,
+     1.5434156,
+     1.6367159,
+     1.5434156,
+     1.2882953,
+     0.9349033,
+     0.5640933,
+    0.24743232,
+   0.027573615,
+  -0.087991708,
+   -0.11982908,
+   -0.10172455,
+  -0.065777314,
+  -0.033184787,
+  -0.012431135,
+ -0.0028892587
 };
 
 
diff --git a/src/firfilter.cpp b/src/firfilter.cpp
new file mode 100644
index 0000000..39b67ce
--- /dev/null
+++ b/src/firfilter.cpp
@@ -0,0 +1,114 @@
+/***************************************************************************
+                          firfilter.cpp  -  description
+                             -------------------
+    begin                : Fr Nov 7 2003
+    copyright            : (C) 2003 by Volker Schroer
+    email                : dl1ksv at gmx.de
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) any later version.                                   *
+ *                                                                         *
+ ***************************************************************************/
+
+#include "firfilter.h"
+
+FIRFilter::FIRFilter(double *Filtercoeffs,int Filterlength,FilterMode Mode)
+{
+NxCoeffs=Filterlength;
+
+h=new double[Filterlength];
+if (Mode == RealData)
+ filterbuffer=new double[Filterlength];
+else
+ cfilterbuffer=new complex<double>[Filterlength];
+ 
+for(int i=0;i <Filterlength;i++)
+ {
+   if(Filtercoeffs != 0)
+    h[i] = *(Filtercoeffs+i);
+   if (Mode == RealData)
+    filterbuffer[i]=0.0;
+   else
+    cfilterbuffer[i]=complex<double>(0.,0.);
+ }
+if (Mode == RealData)
+ fbBuffer=filterbuffer;
+else
+ cfbBuffer=cfilterbuffer; 
+}
+
+FIRFilter::~FIRFilter()
+{
+if (h != 0)
+ delete h;
+if (filterbuffer != 0)
+ delete filterbuffer;
+if (cfilterbuffer != 0)
+ delete cfilterbuffer;
+}
+void FIRFilter::processFilter(double *input,double *output,int NxSamples)
+{
+double *oPtr,*fPtr,*fbPtr;
+double acc;
+oPtr=output;
+fbPtr=fbBuffer;
+
+for(int i=0; i <NxSamples;i++)
+ {
+   *fbPtr=input[i];
+   acc=0.0;
+   fPtr=h;   
+   for(int j=0;j <  NxCoeffs; j++)
+    {
+     acc +=(*fbPtr--)*(*fPtr++); // x(n-j)*h(j)
+     if (fbPtr < filterbuffer )
+      fbPtr = filterbuffer+NxCoeffs-1;  
+     }
+   fbPtr++;  
+   if (fbPtr >= (filterbuffer + NxCoeffs ) )
+    fbPtr=filterbuffer;
+   *oPtr++ =acc;    
+ }  
+
+
+fbBuffer=fbPtr;          
+}
+void FIRFilter::setnewCoeffs(double *Filtercoeffs)
+{
+for(int i=0;i <NxCoeffs;i++)
+   h[i] = *(Filtercoeffs+i);
+ }
+
+void FIRFilter::processFilter(complex<double> *input,complex<double> *output,int NxSamples)
+{
+ complex<double> *oPtr,*fbPtr;
+ complex<double> acc;
+ double *fPtr;
+ oPtr=output;
+ fbPtr=cfbBuffer;
+ 
+ for(int i=0; i <NxSamples;i++)
+ {
+  *fbPtr=input[i];
+  acc=0.0;
+  fPtr=h;   
+  for(int j=0;j <  NxCoeffs; j++)
+  {
+   acc +=(*fbPtr--)*(*fPtr++); // x(n-j)*h(j)
+   if (fbPtr < cfilterbuffer )
+    fbPtr = cfilterbuffer+NxCoeffs-1;  
+  }
+  fbPtr++;  
+  if (fbPtr >= (cfilterbuffer + NxCoeffs ) )
+   fbPtr=cfilterbuffer;
+  *oPtr++ =acc;    
+ }  
+ 
+ 
+ cfbBuffer=fbPtr;          
+}
diff --git a/linpsk/viterbi.h b/src/firfilter.h
similarity index 59%
copy from linpsk/viterbi.h
copy to src/firfilter.h
index c00bef4..2b82449 100644
--- a/linpsk/viterbi.h
+++ b/src/firfilter.h
@@ -1,7 +1,7 @@
 /***************************************************************************
-                          viterbi.h  -  description
+                          firfilter.h  -  description
                              -------------------
-    begin                : Sam M�r 8 2003
+    begin                : Fr Nov 7 2003
     copyright            : (C) 2003 by Volker Schroer
     email                : dl1ksv at gmx.de
  ***************************************************************************/
@@ -15,37 +15,29 @@
  *                                                                         *
  ***************************************************************************/
 
-#ifndef VITERBI_H
-#define VITERBI_H
+#ifndef FIRFILTER_H
+#define FIRFILTER_H
 
-
-/**
+#include <complex>
+using namespace std;
+/**Implements an FIR- Filter
   *@author Volker Schroer
   */
-
-class Viterbi {
+enum FilterMode{RealData,ComplexData};
+class FIRFilter {
 public: 
-	Viterbi(int,unsigned int,unsigned int,const double (*)(double,int));
-	~Viterbi();
-  int encode(int);
-//  void decode(int,const double (*)(int,int));
-  void decode(double);
-
-  int getbit(unsigned int i);
-
-
+	FIRFilter(double *Filtercoeffs,int Filterlength,FilterMode);
+	~FIRFilter();
+  void processFilter(double *input,double *output,int NxSamples);
+  void processFilter(complex<double> *input,complex<double> *output,int NxSamples);
+  void setnewCoeffs(double *Filtercoeffs);
 private:
-unsigned *StateTable;
-long long int *PathMem;
-double *Metric;
-double * distance;
-long long int * bitestimate;
-int NumberofStates;
-int MinimumPath;
-unsigned int CoderState;
-const double (*dist)(double,int);
-
-
+int NxCoeffs;
+double *h;
+complex<double> *cfilterbuffer;
+complex<double> *cfbBuffer;
+double *filterbuffer;
+double *fbBuffer;  
 };
 
 #endif
diff --git a/linpsk/frequencyselect.cpp b/src/frequencyselect.cpp
similarity index 65%
rename from linpsk/frequencyselect.cpp
rename to src/frequencyselect.cpp
index 9f2436c..3765d5f 100644
--- a/linpsk/frequencyselect.cpp
+++ b/src/frequencyselect.cpp
@@ -25,7 +25,7 @@
  *  Constructs a FrequencySelect which is a child of 'parent', with the 
  *  name 'name'.' 
  */
-FrequencySelect::FrequencySelect( QWidget* parent,  const char* name )
+FrequencySelect::FrequencySelect( QWidget* parent,  const char* name , AfcMode WithMode)
     : QGroupBox( parent, name )
 {
     setFrameShape( QGroupBox::WinPanel );
@@ -33,7 +33,24 @@ FrequencySelect::FrequencySelect( QWidget* parent,  const char* name )
     setAlignment( int( QGroupBox::AlignCenter ) );
 
     Activate = new QRadioButton( this, "Activate" );
-
+    AfcWide = new QRadioButton(this,"Wide");
+
+    modus=Wide;
+    switch (WithMode)
+    {
+     case Off:
+      Activate->hide();
+      AfcWide->hide();
+      break;
+     case Narrow:
+      Activate->show();
+      AfcWide->hide();
+      break;
+     case Wide:
+      Activate->show();
+      AfcWide->show();
+      break;
+    }
     Frequency = new QSpinBox( this, "Frequency" );
     Frequency->setMaxValue( 2500 );
     Frequency->setMinValue( 300 );
@@ -41,7 +58,8 @@ FrequencySelect::FrequencySelect( QWidget* parent,  const char* name )
     Frequency->setValue( (int) frequency );
     languageChange();
     connect(Frequency,SIGNAL(valueChanged(int)),this,SLOT(checkFrequency(int)));
-    connect(Activate,SIGNAL(toggled(bool)),this,SIGNAL(toggleAFC(bool)));
+    connect(AfcWide,SIGNAL(clicked()),this,SLOT(toggleWide()));
+    connect(Activate,SIGNAL(clicked()),this,SLOT(toggleActivate()));
 }
 
 /*
@@ -77,9 +95,9 @@ Activate->setText(Text);
 
 void FrequencySelect::calculateSizeofComponents()
 {
-#define LEFTANDRIGHTMARGIN 10
+#define LEFTANDRIGHTMARGIN 6
 #define TOPANDBOTTOM 30
-#define LABELHEIGHT 30
+#define LABELHEIGHT 35
 int width,height,xpos,ypos,innerwidth,innerheight;
 width=this->width();
 height=this->height();
@@ -89,7 +107,12 @@ innerwidth=width-2*xpos;
 innerheight=height*LABELHEIGHT/100;
 Frequency->setGeometry(xpos,ypos,innerwidth,innerheight);
 ypos=ypos+innerheight;
+innerwidth=innerwidth/2;
+xpos = xpos -2;
 Activate->setGeometry(xpos,ypos,innerwidth,innerheight);
+AfcWide->setText("Wide");
+AfcWide->setGeometry(xpos+innerwidth+1,ypos,innerwidth,innerheight);
+  
 setFrameRect(QRect(0,0,width,height));
 
 }
@@ -115,12 +138,67 @@ if ((unsigned int) freq != (unsigned int)frequency)
   }
 }
 
-bool FrequencySelect::State()
+AfcMode FrequencySelect::getAfcMode()
 {
-return Activate->isOn();
+return modus;
 }
 
-void FrequencySelect::setState(bool OnOff)
+void FrequencySelect::setAfcMode(AfcMode mode)
+{
+modus=mode;
+if ( modus == Narrow )
+ {
+  Activate->setChecked(true);
+  AfcWide->setChecked(false);
+ }
+ else if ( modus == Wide )
+  {
+   Activate->setChecked(false);
+   AfcWide->setChecked(true);
+  }
+  else
+   {
+    Activate->setChecked(false);
+    AfcWide->setChecked(false);
+   }
+}
+void FrequencySelect::setAfcDisplayMode(AfcMode Mode)
 {
-Activate->setChecked(OnOff);
+ switch (Mode)
+ {
+  case Off:
+   Activate->hide();
+   AfcWide->hide();
+   break;
+  case Narrow:
+   Activate->show();
+   AfcWide->hide();
+   break;
+  case Wide:
+   Activate->show();
+   AfcWide->show();
+   break;
+ } 
 }
+
+void FrequencySelect::toggleWide()
+{
+ bool OnOff=AfcWide->isOn();
+ Activate->setChecked(false);
+ AfcWide->setChecked(OnOff);
+ if( OnOff )
+  modus=Wide;
+ else
+  modus=Off;  
+}
+void FrequencySelect::toggleActivate()
+{
+ bool OnOff=Activate->isOn();
+ AfcWide->setChecked(false);
+ Activate->setChecked(OnOff);
+ if( OnOff )
+  modus=Narrow;
+ else
+  modus=Off;  
+}
+
diff --git a/linpsk/frequencyselect.h b/src/frequencyselect.h
similarity index 83%
rename from linpsk/frequencyselect.h
rename to src/frequencyselect.h
index 383f3f0..e7f4718 100644
--- a/linpsk/frequencyselect.h
+++ b/src/frequencyselect.h
@@ -20,6 +20,7 @@
 
 #include <qvariant.h>
 #include <qgroupbox.h>
+#include "constants.h"
 class QRadioButton;
 class QSpinBox;
 
@@ -28,15 +29,16 @@ class FrequencySelect : public QGroupBox
     Q_OBJECT
 
 public:
-    FrequencySelect( QWidget* parent = 0, const char* name = 0 );
+    FrequencySelect( QWidget* parent = 0, const char* name = 0, AfcMode WithMode = Wide);
     ~FrequencySelect();
 
     QRadioButton* Activate;
     QSpinBox* Frequency;
 
     void setFunctionText( QString text );
-    bool State();
-    void setState(bool);
+    AfcMode getAfcMode();
+    void setAfcMode(AfcMode);
+    void setAfcDisplayMode(AfcMode);
 
 public slots:
     double getFrequency();
@@ -49,14 +51,17 @@ protected:
 protected slots:
     virtual void languageChange();
     void checkFrequency(int);
+    void toggleWide();
+    void toggleActivate();
 
 private:
     double frequency;
-
+    QRadioButton* AfcWide;
     void calculateSizeofComponents();
+    AfcMode modus;
 signals:
  void FrequencyChanged(double);
- void toggleAFC(bool);
+// void toggleAFC(bool);
 
 };
 
diff --git a/src/fskdemodulator.cpp b/src/fskdemodulator.cpp
new file mode 100644
index 0000000..cd99966
--- /dev/null
+++ b/src/fskdemodulator.cpp
@@ -0,0 +1,175 @@
+/***************************************************************************
+                          fskdemodulator.cpp  -  description
+                             -------------------
+    begin                : Fre Jan 31 2003
+    copyright            : (C) 2003 by Volker Schroer
+    email                : dl1ksv at gmx.de
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) any later version.                                   *
+ *   The PSK part is based on WinPSK 1.0 by Moe Wheatly, AE4JY             *
+ ***************************************************************************/
+
+#include "fskdemodulator.h"
+
+FSKDemodulator::FSKDemodulator(int NxFrequencies):CDemodulator()
+{
+NumberofTones=NxFrequencies;
+mixerfreq = new double[NumberofTones];
+for (int i=0; i < NumberofTones; i++ )
+ mixerfreq[i]=0.;
+mixerfreqinc= new double[NumberofTones];
+//*mixedfreqs= new complex<double>[NumberofTones];
+//*FilterBuffer= new complex<double>[NumberofTones];
+//*FilterOutput= new complex<double>[NumberofTones];
+RestSamples=0;
+}
+FSKDemodulator::~FSKDemodulator()
+{
+if ( mixerfreq )
+ delete mixerfreq;
+
+if ( mixerfreqinc)
+  delete mixerfreqinc;
+
+if (*mixedfreqs != 0)
+ {
+  for(int i=0; i< NumberofTones;i++)
+   if (mixedfreqs[i] != 0)
+    delete mixedfreqs[i];
+ }     
+if (*FilterOutput != 0)
+ {
+  for(int i=0; i< NumberofTones;i++)
+   if (FilterOutput[i] != 0)
+    delete FilterOutput[i];
+ }
+if (*FilterBuffer != 0)
+ {
+  for(int i=0; i< NumberofTones;i++)
+   if (FilterBuffer[i] != 0)
+    delete FilterBuffer[i];
+ } 
+if( lpcoefs !=0)
+  delete lpcoefs;
+}
+
+bool FSKDemodulator::Init(double fs,int Samples)
+{
+NxSamples=Samples;
+SampleRate=fs;
+
+for(int i=0; i< NumberofTones;i++)
+  mixedfreqs[i]=new complex<double>[NxSamples];
+return true;  
+}
+void FSKDemodulator::mixer(double *input)
+{
+double z;
+for (int i=0; i < NxSamples; i++)
+ {
+  z=input[i];
+  for(int j=0; j<NumberofTones;j++)
+   {
+    ;
+    mixedfreqs[j][i]=z*complex<double>(cos(mixerfreq[j]),sin(mixerfreq[j]));  
+    mixerfreq[j] +=mixerfreqinc[j];
+    if( mixerfreq[j] > PI2 )
+     mixerfreq[j] -=PI2;
+   }
+ }
+}
+int FSKDemodulator::lpDownSample()
+{
+int k;
+complex<double> *FilterBufferPtr,*FilterBufferLoopPtr,*OutputPtr,acc;
+complex<double> *FilterInputPtr;
+double *FilterPtr;
+
+for (int j=0;j < NumberofTones;j++)
+ {
+  FilterBufferPtr=FilterBuffer[j];
+  k=RestSamples;
+  FilterBufferLoopPtr=SaveFilterBufferPtr[j];;
+  OutputPtr=FilterOutput[j];
+  FilterInputPtr=mixedfreqs[j];
+  for (int i=0;i < NxSamples;i++)
+   {
+    *FilterBufferLoopPtr=FilterInputPtr[i];
+    if ( (k % DownRate ) == 0)
+     { // Filter
+      FilterPtr=lpcoefs;
+      acc=complex<double>(0.,0.);
+      for(int l=0;l <  FilterLength; l++)
+       {
+        acc +=(*FilterPtr++)*(*FilterBufferLoopPtr--); // x(n-j)*h(j)
+        if (FilterBufferLoopPtr < FilterBufferPtr )
+         FilterBufferLoopPtr = FilterBufferPtr+FilterLength-1;  
+        }	
+       if(++FilterBufferLoopPtr >= (FilterBufferPtr+FilterLength) )
+        FilterBufferLoopPtr=FilterBufferPtr;
+       *OutputPtr++=acc;     
+     } //End Filter
+     else
+      if(++FilterBufferLoopPtr >= (FilterBufferPtr+FilterLength) )
+       FilterBufferLoopPtr=FilterBufferPtr;     
+    k++; 
+   }
+//Save Filter Pointer  
+  SaveFilterBufferPtr[j]=FilterBufferLoopPtr; 
+ }
+RestSamples = (RestSamples+NxSamples)%DownRate;
+k=OutputPtr-FilterOutput[NumberofTones-1];
+return k; 
+}
+void FSKDemodulator::setFilter(double Frequency ,int NxFilter,int Rate)
+{
+double x0;
+int i,j;
+x0=PI2*Frequency/SampleRate;
+FilterLength=NxFilter;
+DownRate=Rate; 
+lpcoefs= new double[FilterLength];
+
+
+j = (FilterLength-1)/2;
+for(i=0;i < FilterLength; i++)
+ {
+  if( i != j )
+   lpcoefs[i]=sin(x0*(i-j))/(i-j);
+  else
+   lpcoefs[i]=x0;
+  lpcoefs[i] *=(0.42-0.5*cos((PI2*i)/(FilterLength-1))
+   +0.08*cos((PI2*(i+i))/(FilterLength-1)));
+//   lpcoefs[i]=1.;
+ }
+  // Normalize for unity at DC
+x0=0.;
+for(i=0;i<FilterLength;i++) 
+ x0 +=lpcoefs[i];
+x0 /=10.;
+for(i=0;i<FilterLength;i++) 
+ lpcoefs[i] /=x0;
+ 
+for(j=0;j < NumberofTones;j++)
+ {
+  FilterBuffer[j] =new complex<double>[FilterLength];
+  SaveFilterBufferPtr[j]=FilterBuffer[j];  
+  for(i=0;i<FilterLength;i++)
+   FilterBuffer[j][i]=complex<double>(0.,0.);   
+ }
+
+ 
+j=NxSamples/DownRate+1;
+for(i=0;i< NumberofTones;i++)
+ FilterOutput[i]=new complex<double>[j];
+
+}
+
+
+
diff --git a/linpsk/fskdemodulator.h b/src/fskdemodulator.h
similarity index 72%
rename from linpsk/fskdemodulator.h
rename to src/fskdemodulator.h
index 6e6a2ee..6498776 100644
--- a/linpsk/fskdemodulator.h
+++ b/src/fskdemodulator.h
@@ -30,31 +30,33 @@ using namespace std;
 
 class FSKDemodulator : public CDemodulator  {
 public: 
-	FSKDemodulator();
+	FSKDemodulator(int NxFrequencies);
 	~FSKDemodulator();
-//bool init(double,int);
+bool Init(double,int);
 protected:
-//int NumberofTones;
+int NumberofTones;
+
 float Baudrate;
 unsigned int SymbolLength;
-/** coeficients for slidding fft */
-complex<double> *twiddles;
-/** result of slidding fft for the different tones */
-complex<double> *bins;
-/** Hilbert Transformer **/
-complex<double> Hilbert(double);
-
+void mixer(double *);
+int lpDownSample();
+void setFilter(double,int,int);
+double *mixerfreqinc;
+double SampleRate;
+complex<double> *FilterOutput[16];
+//complex<double> FilterOutput[16][200];
 
 private: 	//Private Variables
-
-int Filterptr;
-double FilterBuffer[HilbertFilterLength];
-/** Coefficients for Hilber Transformer **/
-complex<double> filter[HilbertFilterLength];
-void init_filter(double,double);
-double cosc(double);
-double sinc(double);
-double hamming(double);
+double *mixerfreq;
+complex<double> *mixedfreqs[16];
+complex<double> *FilterBuffer[16];
+//complex<double> FilterBuffer[16][705];
+complex<double> *SaveFilterBufferPtr[16];
+//complex<double> *FilterBufferPtr;
+double *lpcoefs;
+//Downsampling Rate;
+int DownRate,RestSamples;
+int FilterLength;
 };
 
 #endif
diff --git a/linpsk/fskmodulator.cpp b/src/fskmodulator.cpp
similarity index 67%
rename from linpsk/fskmodulator.cpp
rename to src/fskmodulator.cpp
index d64a788..77d4aa7 100644
--- a/linpsk/fskmodulator.cpp
+++ b/src/fskmodulator.cpp
@@ -21,8 +21,8 @@ FSKModulator::FSKModulator(int FS,CTxBuffer * TxBuffer ):CModulator(FS,TxBuffer)
 {
 NxSamples=0;
 NumberofTones=0;
-FrequencyIncrement=0;
-Frequencypointer=0.0;
+Frequencyr=1.;
+Frequencyi=0.;
 
 }
 FSKModulator::~FSKModulator()
@@ -30,26 +30,36 @@ FSKModulator::~FSKModulator()
 }
 int FSKModulator::CalcSignal( double* pData , int BUFSIZE)
 {
+ double temp;
 
 for(int i=0;i<BUFSIZE;i++)
-	{
-    if (NxSamples >=SamplesperSymbol)
-     {
-      c=getToneNumber();
-      NxSamples=0;
-     }
-    		if ( c < 0)
-			  {
-					if (i >0) i--;
-    			return i;
-				}
-		// Calculate next Sample
-    Frequencypointer +=FrequencyIncrement[c];
-    if ( Frequencypointer >= PI2 )
-      Frequencypointer -= PI2;
- 		pData[i] = 10000.*sin(Frequencypointer);
-		NxSamples++;
-	}
+ {
+  if (NxSamples >=SamplesperSymbol)
+   {
+    c=getToneNumber();
+    NxSamples=0;
+   }
+  if ( c < 0)
+   {
+    if (i > 0) 
+    {
+     i--; // We should stop transmission
+     return -i;
+    }  
+    else
+     return -1; 
+   }
+ // Calculate next Sample
+temp = Frequencyr *ToneFrequencyr[c] - Frequencyi*ToneFrequencyi[c];
+Frequencyi = Frequencyr *ToneFrequencyi[c] + Frequencyi*ToneFrequencyr[c];
+Frequencyr = temp;
+temp = 2.0 -(Frequencyr*Frequencyr+Frequencyi*Frequencyi);
+Frequencyr *=temp;
+Frequencyi *=temp;
+
+  pData[i] = Frequencyr;
+  NxSamples++;
+ }
 return BUFSIZE;
 
 
diff --git a/linpsk/fskmodulator.h b/src/fskmodulator.h
similarity index 94%
rename from linpsk/fskmodulator.h
rename to src/fskmodulator.h
index adbe40f..bbefb6f 100644
--- a/linpsk/fskmodulator.h
+++ b/src/fskmodulator.h
@@ -32,8 +32,10 @@ public:
 protected:
 virtual int getToneNumber()=0;
 unsigned int NumberofTones;
-double *FrequencyIncrement;
-double Frequencypointer;
+double *ToneFrequencyr;
+double *ToneFrequencyi;
+double Frequencyr,Frequencyi;
+
 unsigned int SamplesperSymbol;
 float Baudrate;
 unsigned int NxSamples;
diff --git a/linpsk/input.cpp b/src/input.cpp
similarity index 77%
rename from linpsk/input.cpp
rename to src/input.cpp
index 373d29d..d2955a7 100644
--- a/linpsk/input.cpp
+++ b/src/input.cpp
@@ -18,33 +18,12 @@
 #include <errno.h>
 Input::Input(int ptt)
 {
-fd = -1;
 serial=ptt;
 }
 Input::~Input()
 {
 }
 
- /** Opens the Device named Device for reading */
-
-bool Input::open_Device_read(QString Device)
-{
-fd = open(Device,O_RDONLY);
-if (fd > 0)
-	return true;
-else
-	return false;
-}
-
-  /** Closes the open Device */
-bool Input::close_Device()
-{
-
-if (fd >= 0)
-	close(fd);
-fd = -1;
-return true;
-}
 
 
 
diff --git a/linpsk/input.h b/src/input.h
similarity index 82%
rename from linpsk/input.h
rename to src/input.h
index 2dc998f..4711fb8 100644
--- a/linpsk/input.h
+++ b/src/input.h
@@ -23,23 +23,26 @@
 #include <unistd.h>
 #include <fcntl.h>
 
+
+
 /**Abstract base class for the different input devices like soundcard, textfile,  Wavfile
   *@author Volker Schroer
   */
 
+
 class Input {
 public: 
 	Input(int ptt);
 	virtual ~Input();
 	
   /** Opens the Device named Device for reading */
-  virtual bool open_Device_read(QString Device);
+  virtual bool open_Device_read(QString *) = 0;
 
   /** Opens the Device named Device for writing */
-  virtual bool open_Device_write(QString Device) = 0;
+  virtual bool open_Device_write(QString *) = 0;
 
   /** Closes the open Device */
-  virtual bool close_Device() ;
+  virtual bool close_Device() = 0 ;
 
   /** Tries to read anzahl samples and returns the nuber of read samples */
   virtual int getSamples(double *sample,int anzahl) = 0;
@@ -50,15 +53,10 @@ public:
   /** Switches PTT */
   virtual void PTT(bool mode) = 0;
 
-  /** Sets the neede Parameters and returns an Errorstring if unsuccessfull */
-  virtual bool setParams(QString *errorstring) = 0;
 
 protected:
-	
-	/** Filedescriptor of Input/Output Device */
-	
-int fd;
-	/** Filedescriptor of PTT- Device */
+
+/** Filedescriptor of PTT- Device */
 int serial;  	
 };
 
diff --git a/src/interfaces/Makefile.am b/src/interfaces/Makefile.am
new file mode 100644
index 0000000..81695cb
--- /dev/null
+++ b/src/interfaces/Makefile.am
@@ -0,0 +1,65 @@
+INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/interfaces \
+	-I$(top_srcdir)/src/portaudio $(QT_CXXFLAGS) $(all_includes)
+# METASOURCES = AUTO
+
+lib_LIBRARIES = libinterfaces.a 
+am_libinterfaces_a_OBJECTS = $(UICIMPLS) $(OBJMOC) $(UICDECLS)
+
+UICDECLS = addmacro.h \
+	addrxwindow.h \
+	deletemacro.h \
+	editmacro.h \
+	generalsettings.h \
+	modemenu.h \
+	qsodata.h \
+	renamemacro.h
+
+UICIMPLS = addmacro.imp.o \
+	addrxwindow.imp.o \
+	deletemacro.imp.o \
+	editmacro.imp.o \
+	generalsettings.imp.o \
+	modemenu.imp.o \
+	qsodata.imp.o \
+	renamemacro.imp.o
+
+OBJMOC =  addmacro.moc.o \
+	addrxwindow.moc.o \
+	deletemacro.moc.o \
+	editmacro.moc.o \
+	generalsettings.moc.o \
+	modemenu.moc.o \
+	qsodata.moc.o \
+	renamemacro.moc.o
+
+#*.o:  $(UICIMPLS) $(OBJMOC)
+
+
+libinterface.a: $(am_libinterfaces_a_OBJECTS) 
+
+#libinterfaces.a:  $(UICIMPLS) $(OBJMOC)
+
+
+%.h: %.ui
+	$(UIC) -o $@ $<
+
+%.imp.cpp: %.ui %.h
+	$(UIC) -o $@ -impl $*.h $<
+
+%.moc.o: %.moc.cpp %.h
+	$(CXX) -c $(AM_CXXFLAGS) $(CPPFLAGS) $(INCLUDES) -o $@ $<
+
+%.moc.cpp: %.h
+	$(MOC) $*.h -o $@
+
+%.imp.o: %.imp.cpp %.h
+	$(CXX) -c $(AM_CXXFLAGS) $(CPPFLAGS) $(INCLUDES) -o $@ $<
+AM_CXXFLAGS = -O2
+libinterfaces_a_SOURCES = addmacro.ui addmacro.ui.h\
+	addrxwindow.ui	addrxwindow.ui.h deletemacro.ui deletemacro.ui.h\
+	editmacro.ui	editmacro.ui.h generalsettings.ui generalsettings.ui.h\
+	modemenu.ui	modemenu.ui.h qsodata.ui qsodata.ui.h renamemacro.ui\
+	renamemacro.ui.h addmacro.ui addmacro.ui.h addrxwindow.ui\
+	addrxwindow.ui.h deletemacro.ui deletemacro.ui.h editmacro.ui\
+	editmacro.ui.h generalsettings.ui generalsettings.ui.h modemenu.ui\
+	modemenu.ui.h qsodata.ui qsodata.ui.h renamemacro.ui renamemacro.ui.h
diff --git a/src/interfaces/Makefile.in b/src/interfaces/Makefile.in
new file mode 100644
index 0000000..44b86e6
--- /dev/null
+++ b/src/interfaces/Makefile.in
@@ -0,0 +1,494 @@
+# Makefile.in generated by automake 1.9.4 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+SOURCES = $(libinterfaces_a_SOURCES)
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = src/interfaces
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(libdir)"
+libLIBRARIES_INSTALL = $(INSTALL_DATA)
+LIBRARIES = $(lib_LIBRARIES)
+ARFLAGS = cru
+libinterfaces_a_AR = $(AR) $(ARFLAGS)
+libinterfaces_a_LIBADD =
+libinterfaces_a_OBJECTS = $(am_libinterfaces_a_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libinterfaces_a_SOURCES)
+DIST_SOURCES = $(libinterfaces_a_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MOC = @MOC@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_LDADD = @QT_LDADD@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/interfaces \
+	-I$(top_srcdir)/src/portaudio $(QT_CXXFLAGS) $(all_includes)
+
+# METASOURCES = AUTO
+lib_LIBRARIES = libinterfaces.a 
+am_libinterfaces_a_OBJECTS = $(UICIMPLS) $(OBJMOC) $(UICDECLS)
+UICDECLS = addmacro.h \
+	addrxwindow.h \
+	deletemacro.h \
+	editmacro.h \
+	generalsettings.h \
+	modemenu.h \
+	qsodata.h \
+	renamemacro.h
+
+UICIMPLS = addmacro.imp.o \
+	addrxwindow.imp.o \
+	deletemacro.imp.o \
+	editmacro.imp.o \
+	generalsettings.imp.o \
+	modemenu.imp.o \
+	qsodata.imp.o \
+	renamemacro.imp.o
+
+OBJMOC = addmacro.moc.o \
+	addrxwindow.moc.o \
+	deletemacro.moc.o \
+	editmacro.moc.o \
+	generalsettings.moc.o \
+	modemenu.moc.o \
+	qsodata.moc.o \
+	renamemacro.moc.o
+
+AM_CXXFLAGS = -O2
+libinterfaces_a_SOURCES = addmacro.ui addmacro.ui.h\
+	addrxwindow.ui	addrxwindow.ui.h deletemacro.ui deletemacro.ui.h\
+	editmacro.ui	editmacro.ui.h generalsettings.ui generalsettings.ui.h\
+	modemenu.ui	modemenu.ui.h qsodata.ui qsodata.ui.h renamemacro.ui\
+	renamemacro.ui.h addmacro.ui addmacro.ui.h addrxwindow.ui\
+	addrxwindow.ui.h deletemacro.ui deletemacro.ui.h editmacro.ui\
+	editmacro.ui.h generalsettings.ui generalsettings.ui.h modemenu.ui\
+	modemenu.ui.h qsodata.ui qsodata.ui.h renamemacro.ui renamemacro.ui.h
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/interfaces/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  src/interfaces/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-libLIBRARIES: $(lib_LIBRARIES)
+	@$(NORMAL_INSTALL)
+	test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
+	@list='$(lib_LIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    f=$(am__strip_dir) \
+	    echo " $(libLIBRARIES_INSTALL) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
+	    $(libLIBRARIES_INSTALL) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+	  else :; fi; \
+	done
+	@$(POST_INSTALL)
+	@list='$(lib_LIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    p=$(am__strip_dir) \
+	    echo " $(RANLIB) '$(DESTDIR)$(libdir)/$$p'"; \
+	    $(RANLIB) "$(DESTDIR)$(libdir)/$$p"; \
+	  else :; fi; \
+	done
+
+uninstall-libLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(lib_LIBRARIES)'; for p in $$list; do \
+	  p=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(libdir)/$$p'"; \
+	  rm -f "$(DESTDIR)$(libdir)/$$p"; \
+	done
+
+clean-libLIBRARIES:
+	-test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
+libinterfaces.a: $(libinterfaces_a_OBJECTS) $(libinterfaces_a_DEPENDENCIES) 
+	-rm -f libinterfaces.a
+	$(libinterfaces_a_AR) libinterfaces.a $(libinterfaces_a_OBJECTS) $(libinterfaces_a_LIBADD)
+	$(RANLIB) libinterfaces.a
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LIBRARIES)
+installdirs:
+	for dir in "$(DESTDIR)$(libdir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libLIBRARIES clean-libtool \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-libLIBRARIES
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-libLIBRARIES
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libLIBRARIES clean-libtool ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-exec \
+	install-exec-am install-info install-info-am \
+	install-libLIBRARIES install-man install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-info-am \
+	uninstall-libLIBRARIES
+
+
+#*.o:  $(UICIMPLS) $(OBJMOC)
+
+libinterface.a: $(am_libinterfaces_a_OBJECTS) 
+
+#libinterfaces.a:  $(UICIMPLS) $(OBJMOC)
+
+%.h: %.ui
+	$(UIC) -o $@ $<
+
+%.imp.cpp: %.ui %.h
+	$(UIC) -o $@ -impl $*.h $<
+
+%.moc.o: %.moc.cpp %.h
+	$(CXX) -c $(AM_CXXFLAGS) $(CPPFLAGS) $(INCLUDES) -o $@ $<
+
+%.moc.cpp: %.h
+	$(MOC) $*.h -o $@
+
+%.imp.o: %.imp.cpp %.h
+	$(CXX) -c $(AM_CXXFLAGS) $(CPPFLAGS) $(INCLUDES) -o $@ $<
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/linpsk/addmacro.ui b/src/interfaces/addmacro.ui
similarity index 98%
rename from linpsk/addmacro.ui
rename to src/interfaces/addmacro.ui
index db56f42..e7f2528 100644
--- a/linpsk/addmacro.ui
+++ b/src/interfaces/addmacro.ui
@@ -1,4 +1,4 @@
-<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
 <class>AddMacro</class>
 <widget class="QDialog">
     <property name="name">
@@ -487,10 +487,16 @@
                 </property>
                 <property name="minimumSize">
                     <size>
-                        <width>200</width>
+                        <width>190</width>
                         <height>160</height>
                     </size>
                 </property>
+                <property name="vScrollBarMode">
+                    <enum>AlwaysOn</enum>
+                </property>
+                <property name="hScrollBarMode">
+                    <enum>Auto</enum>
+                </property>
             </widget>
         </vbox>
     </widget>
@@ -517,7 +523,6 @@
 </connections>
 <includes>
     <include location="local" impldecl="in implementation">macros.h</include>
-    <include location="local" impldecl="in implementation">addmacro.ui.h</include>
 </includes>
 <forwards>
     <forward>class Macros</forward>
diff --git a/linpsk/addmacro.ui.h b/src/interfaces/addmacro.ui.h
similarity index 90%
rename from linpsk/addmacro.ui.h
rename to src/interfaces/addmacro.ui.h
index 68b692b..fd73d80 100644
--- a/linpsk/addmacro.ui.h
+++ b/src/interfaces/addmacro.ui.h
@@ -17,16 +17,16 @@ void AddMacro::init()
 
 void AddMacro::setKeywords( Macros *k )
 {
-int anzahl=k->Words.size();  
+int anzahl=k->Keywordcount();  
 if ( anzahl > 0 )
  for(int i=0; i < anzahl; i++)
-  KeywordDisplay->insertItem(k->Words[i]);
-anzahl=k->MacroNames.size();
+  KeywordDisplay->insertItem(k->getKeyword(i));
+anzahl=k->count();
 Position->setValue(anzahl+1);
 Position->setMaxValue(anzahl+1);
 if (anzahl>0)
     for (int i=0; i< anzahl;i++)
-      MacroDisplay->insertItem(k->MacroNames[i]);
+      MacroDisplay->insertItem(k->getMacroName(i));
 
   
 }
diff --git a/linpsk/addrxwindow.ui b/src/interfaces/addrxwindow.ui
similarity index 93%
copy from linpsk/addrxwindow.ui
copy to src/interfaces/addrxwindow.ui
index 859f045..2831fd5 100644
--- a/linpsk/addrxwindow.ui
+++ b/src/interfaces/addrxwindow.ui
@@ -1,4 +1,4 @@
-<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
 <class>AddRxWindow</class>
 <widget class="QDialog">
     <property name="name">
@@ -9,7 +9,7 @@
             <x>0</x>
             <y>0</y>
             <width>245</width>
-            <height>199</height>
+            <height>211</height>
         </rect>
     </property>
     <property name="caption">
@@ -20,14 +20,14 @@
     </property>
     <widget class="QLayoutWidget">
         <property name="name">
-            <cstring>layout22</cstring>
+            <cstring>layout10</cstring>
         </property>
         <property name="geometry">
             <rect>
-                <x>0</x>
-                <y>10</y>
-                <width>220</width>
-                <height>182</height>
+                <x>5</x>
+                <y>19</y>
+                <width>222</width>
+                <height>174</height>
             </rect>
         </property>
         <vbox>
@@ -36,7 +36,7 @@
             </property>
             <widget class="QLayoutWidget">
                 <property name="name">
-                    <cstring>layout20</cstring>
+                    <cstring>layout9</cstring>
                 </property>
                 <hbox>
                     <property name="name">
@@ -78,7 +78,7 @@
                     </widget>
                     <widget class="QLayoutWidget">
                         <property name="name">
-                            <cstring>layout18</cstring>
+                            <cstring>layout7</cstring>
                         </property>
                         <vbox>
                             <property name="name">
@@ -110,6 +110,12 @@
                                         <verstretch>0</verstretch>
                                     </sizepolicy>
                                 </property>
+                                <property name="minimumSize">
+                                    <size>
+                                        <width>135</width>
+                                        <height>42</height>
+                                    </size>
+                                </property>
                                 <property name="vScrollBarMode">
                                     <enum>AlwaysOn</enum>
                                 </property>
@@ -160,13 +166,13 @@
                 <property name="sizeHint">
                     <size>
                         <width>20</width>
-                        <height>40</height>
+                        <height>20</height>
                     </size>
                 </property>
             </spacer>
             <widget class="QLayoutWidget">
                 <property name="name">
-                    <cstring>layout21</cstring>
+                    <cstring>layout8</cstring>
                 </property>
                 <hbox>
                     <property name="name">
@@ -250,7 +256,6 @@
 </connections>
 <includes>
     <include location="local" impldecl="in declaration">constants.h</include>
-    <include location="local" impldecl="in implementation">addrxwindow.ui.h</include>
 </includes>
 <slots>
     <slot specifier="non virtual">init()</slot>
diff --git a/linpsk/addrxwindow.ui.h b/src/interfaces/addrxwindow.ui.h
similarity index 96%
rename from linpsk/addrxwindow.ui.h
rename to src/interfaces/addrxwindow.ui.h
index 5162e23..6dff033 100644
--- a/linpsk/addrxwindow.ui.h
+++ b/src/interfaces/addrxwindow.ui.h
@@ -12,7 +12,7 @@ extern Parameter settings;
 
 void AddRxWindow::init()
 {
-RxMode->setFixedHeight(40);
+//RxMode->setFixedHeight(40);
 RxMode->insertItem("BPSK",0);
 RxMode->insertItem("QPSK",1);
 RxMode->insertItem("RTTY",2);
diff --git a/src/interfaces/deletemacro.ui b/src/interfaces/deletemacro.ui
new file mode 100644
index 0000000..1f43c8a
--- /dev/null
+++ b/src/interfaces/deletemacro.ui
@@ -0,0 +1,293 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>DeleteMacro</class>
+<widget class="QDialog">
+    <property name="name">
+        <cstring>DeleteMacro</cstring>
+    </property>
+    <property name="geometry">
+        <rect>
+            <x>0</x>
+            <y>0</y>
+            <width>600</width>
+            <height>400</height>
+        </rect>
+    </property>
+    <property name="minimumSize">
+        <size>
+            <width>600</width>
+            <height>400</height>
+        </size>
+    </property>
+    <property name="maximumSize">
+        <size>
+            <width>600</width>
+            <height>400</height>
+        </size>
+    </property>
+    <property name="baseSize">
+        <size>
+            <width>300</width>
+            <height>100</height>
+        </size>
+    </property>
+    <property name="caption">
+        <string>Delete Macro</string>
+    </property>
+    <widget class="QLayoutWidget">
+        <property name="name">
+            <cstring>layout1</cstring>
+        </property>
+        <property name="geometry">
+            <rect>
+                <x>110</x>
+                <y>230</y>
+                <width>266</width>
+                <height>34</height>
+            </rect>
+        </property>
+        <hbox>
+            <property name="name">
+                <cstring>unnamed</cstring>
+            </property>
+            <widget class="QPushButton">
+                <property name="name">
+                    <cstring>Ok</cstring>
+                </property>
+                <property name="minimumSize">
+                    <size>
+                        <width>60</width>
+                        <height>25</height>
+                    </size>
+                </property>
+                <property name="text">
+                    <string>Ok</string>
+                </property>
+            </widget>
+            <spacer>
+                <property name="name">
+                    <cstring>spacer1</cstring>
+                </property>
+                <property name="orientation">
+                    <enum>Horizontal</enum>
+                </property>
+                <property name="sizeType">
+                    <enum>Expanding</enum>
+                </property>
+                <property name="sizeHint">
+                    <size>
+                        <width>111</width>
+                        <height>20</height>
+                    </size>
+                </property>
+            </spacer>
+            <widget class="QPushButton">
+                <property name="name">
+                    <cstring>Cancel</cstring>
+                </property>
+                <property name="minimumSize">
+                    <size>
+                        <width>60</width>
+                        <height>25</height>
+                    </size>
+                </property>
+                <property name="text">
+                    <string>Cancel</string>
+                </property>
+            </widget>
+        </hbox>
+    </widget>
+    <widget class="QLayoutWidget">
+        <property name="name">
+            <cstring>layout20</cstring>
+        </property>
+        <property name="geometry">
+            <rect>
+                <x>50</x>
+                <y>90</y>
+                <width>425</width>
+                <height>102</height>
+            </rect>
+        </property>
+        <hbox>
+            <property name="name">
+                <cstring>unnamed</cstring>
+            </property>
+            <widget class="QListBox">
+                <property name="name">
+                    <cstring>MacroBox</cstring>
+                </property>
+                <property name="minimumSize">
+                    <size>
+                        <width>80</width>
+                        <height>100</height>
+                    </size>
+                </property>
+                <property name="selectionMode">
+                    <enum>Single</enum>
+                </property>
+            </widget>
+            <widget class="QLayoutWidget">
+                <property name="name">
+                    <cstring>layout19</cstring>
+                </property>
+                <vbox>
+                    <property name="name">
+                        <cstring>unnamed</cstring>
+                    </property>
+                    <widget class="QPushButton">
+                        <property name="name">
+                            <cstring>Add</cstring>
+                        </property>
+                        <property name="minimumSize">
+                            <size>
+                                <width>160</width>
+                                <height>25</height>
+                            </size>
+                        </property>
+                        <property name="text">
+                            <string>Add to list -></string>
+                        </property>
+                    </widget>
+                    <widget class="QPushButton">
+                        <property name="name">
+                            <cstring>Remove</cstring>
+                        </property>
+                        <property name="minimumSize">
+                            <size>
+                                <width>160</width>
+                                <height>25</height>
+                            </size>
+                        </property>
+                        <property name="text">
+                            <string>Remove from list <-</string>
+                        </property>
+                    </widget>
+                </vbox>
+            </widget>
+            <widget class="QListBox">
+                <property name="name">
+                    <cstring>Macrostodelete</cstring>
+                </property>
+                <property name="minimumSize">
+                    <size>
+                        <width>80</width>
+                        <height>100</height>
+                    </size>
+                </property>
+                <property name="selectionMode">
+                    <enum>Single</enum>
+                </property>
+            </widget>
+        </hbox>
+    </widget>
+    <widget class="QLayoutWidget">
+        <property name="name">
+            <cstring>layout5</cstring>
+        </property>
+        <property name="geometry">
+            <rect>
+                <x>52</x>
+                <y>50</y>
+                <width>422</width>
+                <height>32</height>
+            </rect>
+        </property>
+        <hbox>
+            <property name="name">
+                <cstring>unnamed</cstring>
+            </property>
+            <widget class="QLabel">
+                <property name="name">
+                    <cstring>MLabel</cstring>
+                </property>
+                <property name="minimumSize">
+                    <size>
+                        <width>80</width>
+                        <height>30</height>
+                    </size>
+                </property>
+                <property name="text">
+                    <string>Available Macros</string>
+                </property>
+                <property name="textFormat">
+                    <enum>PlainText</enum>
+                </property>
+            </widget>
+            <spacer>
+                <property name="name">
+                    <cstring>spacer3</cstring>
+                </property>
+                <property name="orientation">
+                    <enum>Horizontal</enum>
+                </property>
+                <property name="sizeType">
+                    <enum>Expanding</enum>
+                </property>
+                <property name="sizeHint">
+                    <size>
+                        <width>179</width>
+                        <height>30</height>
+                    </size>
+                </property>
+            </spacer>
+            <widget class="QLabel">
+                <property name="name">
+                    <cstring>DMacros</cstring>
+                </property>
+                <property name="minimumSize">
+                    <size>
+                        <width>80</width>
+                        <height>25</height>
+                    </size>
+                </property>
+                <property name="text">
+                    <string>Macros to be deleted</string>
+                </property>
+            </widget>
+        </hbox>
+    </widget>
+</widget>
+<connections>
+    <connection>
+        <sender>Ok</sender>
+        <signal>clicked()</signal>
+        <receiver>DeleteMacro</receiver>
+        <slot>accept()</slot>
+    </connection>
+    <connection>
+        <sender>Cancel</sender>
+        <signal>clicked()</signal>
+        <receiver>DeleteMacro</receiver>
+        <slot>reject()</slot>
+    </connection>
+    <connection>
+        <sender>Add</sender>
+        <signal>clicked()</signal>
+        <receiver>DeleteMacro</receiver>
+        <slot>addtoList()</slot>
+    </connection>
+    <connection>
+        <sender>Remove</sender>
+        <signal>clicked()</signal>
+        <receiver>DeleteMacro</receiver>
+        <slot>removefromList()</slot>
+    </connection>
+</connections>
+<includes>
+    <include location="global" impldecl="in implementation">vector</include>
+    <include location="local" impldecl="in implementation">macros.h</include>
+</includes>
+<forwards>
+    <forward>class Macros</forward>
+</forwards>
+<variables>
+    <variable>Macros * AllMacros;</variable>
+</variables>
+<slots>
+    <slot>init( Macros * k )</slot>
+    <slot access="private" specifier="non virtual">addtoList()</slot>
+    <slot access="private" specifier="non virtual">removefromList()</slot>
+    <slot>accept()</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/src/interfaces/deletemacro.ui.h b/src/interfaces/deletemacro.ui.h
new file mode 100644
index 0000000..b5b3f04
--- /dev/null
+++ b/src/interfaces/deletemacro.ui.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+** ui.h extension file, included from the uic-generated form implementation.
+**
+** If you wish to add, delete or rename functions or slots use
+** Qt Designer which will update this file, preserving your code. Create an
+** init() function in place of a constructor, and a destroy() function in
+** place of a destructor.
+*****************************************************************************/
+#include "deletemacro.h"
+#include <vector>
+
+using namespace std;
+
+void DeleteMacro::init(Macros *M)
+{
+int anzahl,i;  
+AllMacros=M;
+anzahl=AllMacros->count();
+if ( anzahl > 0 )
+ for(i=0; i < anzahl; i++)
+  MacroBox->insertItem(M->getMacroName(i));
+
+
+}
+
+
+void DeleteMacro::addtoList()
+{
+int anzahl;
+anzahl=MacroBox->numRows();
+if (anzahl > 0)
+for (int i=0; i < anzahl; i++)
+ if ( MacroBox->isSelected(i))
+  {
+   Macrostodelete->insertItem(MacroBox->text(i));
+   MacroBox->removeItem(i);
+  }
+}
+
+void DeleteMacro::removefromList()
+{
+int anzahl;
+anzahl=Macrostodelete->numRows();
+if (anzahl > 0)
+for (int i=0; i < anzahl; i++)
+ if ( Macrostodelete->isSelected(i))
+  {
+   MacroBox->insertItem(Macrostodelete->text(i));
+   Macrostodelete->removeItem(i);
+  }
+}
+
+
+void DeleteMacro::accept()
+{
+QString s;
+int anzahl;
+anzahl=Macrostodelete->numRows();
+if (anzahl > 0)
+for (int i=0; i < anzahl; i++)
+ {
+   
+  s=Macrostodelete->text(i);
+  int aktAnzahl=AllMacros->count();
+  if (aktAnzahl > 0)
+  {
+  for (int k=0; k < aktAnzahl; k ++)
+   if ( s== AllMacros->getMacroName(k))
+   {
+    AllMacros->deleteMacro(k);
+    break;   
+   } 
+  }
+ 
+ }
+ QDialog::accept();
+}
diff --git a/linpsk/editmacro.ui b/src/interfaces/editmacro.ui
similarity index 98%
rename from linpsk/editmacro.ui
rename to src/interfaces/editmacro.ui
index 503cd13..c13f8bd 100644
--- a/linpsk/editmacro.ui
+++ b/src/interfaces/editmacro.ui
@@ -1,4 +1,4 @@
-<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
 <class>EditMacro</class>
 <widget class="QDialog">
     <property name="name">
@@ -229,7 +229,6 @@
 </connections>
 <includes>
     <include location="local" impldecl="in implementation">macros.h</include>
-    <include location="local" impldecl="in implementation">editmacro.ui.h</include>
 </includes>
 <forwards>
     <forward>class Macros</forward>
diff --git a/linpsk/editmacro.ui.h b/src/interfaces/editmacro.ui.h
similarity index 75%
rename from linpsk/editmacro.ui.h
rename to src/interfaces/editmacro.ui.h
index 539870d..4ea4e99 100644
--- a/linpsk/editmacro.ui.h
+++ b/src/interfaces/editmacro.ui.h
@@ -15,16 +15,16 @@ void EditMacro::init( Macros *k)
 {
 int anzahl,i;  
 AllMacros=k;
-anzahl=AllMacros->Words.size();
+anzahl=AllMacros->Keywordcount();
 if ( anzahl > 0 )
  for(i=0; i < anzahl; i++)
-  Keywords->insertItem(AllMacros->Words[i]);
-anzahl=AllMacros->MacroNames.size();
+  Keywords->insertItem(AllMacros->getKeyword(i));
+anzahl=AllMacros->count();
 
 Position->setMaxValue(anzahl-1);
 SelectMacro->insertItem(" ");
  for(i=0; i < anzahl; i++)
-  SelectMacro->insertItem(AllMacros->MacroNames[i]);
+  SelectMacro->insertItem(AllMacros->getMacroName(i));
 }
 
 
@@ -34,8 +34,8 @@ if( Number > 0)
     { 
       Number--;
       Position->setValue(Number);
-      Definition->setText(AllMacros->MacroText[Number]);
-      Accelerator->setText(AllMacros->Accelerator[Number]);
+      Definition->setText(AllMacros->getDefinition(Number));
+      Accelerator->setText(AllMacros->getAccelerator(Number));
   } 
 }
 
@@ -44,8 +44,8 @@ void EditMacro::accept()
 {
 int AktPosition, NewPosition;
 AktPosition=SelectMacro->currentItem()-1;
-AllMacros->MacroText.at(AktPosition)=Definition->text();
-AllMacros->Accelerator.at(AktPosition)=Accelerator->text();
+AllMacros->setDefinition(Definition->text(),AktPosition);
+AllMacros->setAccelerator(Accelerator->text(),AktPosition);
 /** Position Change to be done later
 NewPosition=Position->value();
 if (AktPosition != NewPosition )
diff --git a/linpsk/generalsettings.ui b/src/interfaces/generalsettings.ui
similarity index 60%
rename from linpsk/generalsettings.ui
rename to src/interfaces/generalsettings.ui
index 3416fbd..272296f 100644
--- a/linpsk/generalsettings.ui
+++ b/src/interfaces/generalsettings.ui
@@ -1,4 +1,4 @@
-<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
 <class>GeneralSettings</class>
 <widget class="QDialog">
     <property name="name">
@@ -9,7 +9,7 @@
             <x>0</x>
             <y>0</y>
             <width>650</width>
-            <height>300</height>
+            <height>450</height>
         </rect>
     </property>
     <property name="sizePolicy">
@@ -23,7 +23,7 @@
     <property name="minimumSize">
         <size>
             <width>650</width>
-            <height>300</height>
+            <height>450</height>
         </size>
     </property>
     <property name="baseSize">
@@ -41,96 +41,6 @@
     <property name="sizeGripEnabled">
         <bool>true</bool>
     </property>
-    <widget class="QLayoutWidget">
-        <property name="name">
-            <cstring>layout7</cstring>
-        </property>
-        <property name="geometry">
-            <rect>
-                <x>61</x>
-                <y>236</y>
-                <width>408</width>
-                <height>28</height>
-            </rect>
-        </property>
-        <hbox>
-            <property name="name">
-                <cstring>unnamed</cstring>
-            </property>
-            <widget class="QPushButton">
-                <property name="name">
-                    <cstring>buttonOk</cstring>
-                </property>
-                <property name="minimumSize">
-                    <size>
-                        <width>80</width>
-                        <height>20</height>
-                    </size>
-                </property>
-                <property name="focusPolicy">
-                    <enum>ClickFocus</enum>
-                </property>
-                <property name="text">
-                    <string>&Ok</string>
-                </property>
-                <property name="accel">
-                    <string>Alt+O</string>
-                </property>
-                <property name="autoDefault">
-                    <bool>false</bool>
-                </property>
-                <property name="default">
-                    <bool>false</bool>
-                </property>
-            </widget>
-            <spacer>
-                <property name="name">
-                    <cstring>spacer2</cstring>
-                </property>
-                <property name="orientation">
-                    <enum>Horizontal</enum>
-                </property>
-                <property name="sizeType">
-                    <enum>Expanding</enum>
-                </property>
-                <property name="sizeHint">
-                    <size>
-                        <width>230</width>
-                        <height>20</height>
-                    </size>
-                </property>
-            </spacer>
-            <widget class="QPushButton">
-                <property name="name">
-                    <cstring>buttonCancel</cstring>
-                </property>
-                <property name="minimumSize">
-                    <size>
-                        <width>80</width>
-                        <height>20</height>
-                    </size>
-                </property>
-                <property name="focusPolicy">
-                    <enum>ClickFocus</enum>
-                </property>
-                <property name="text">
-                    <string>&Cancel</string>
-                </property>
-                <property name="accel">
-                    <string></string>
-                </property>
-                <property name="autoDefault">
-                    <bool>false</bool>
-                </property>
-                <property name="default">
-                    <bool>false</bool>
-                </property>
-                <property name="flat">
-                    <bool>false</bool>
-                </property>
-            </widget>
-        </hbox>
-    </widget>
     <widget class="QFrame">
         <property name="name">
             <cstring>frame3</cstring>
@@ -279,76 +189,149 @@
             <string>Display Zero as Slashed  Zero</string>
         </property>
     </widget>
-    <widget class="QLayoutWidget">
+    <widget class="QLabel">
         <property name="name">
-            <cstring>layout2</cstring>
+            <cstring>UTCL</cstring>
         </property>
         <property name="geometry">
             <rect>
-                <x>470</x>
-                <y>80</y>
+                <x>170</x>
+                <y>10</y>
+                <width>132</width>
+                <height>21</height>
+            </rect>
+        </property>
+        <property name="text">
+            <string>Time Offset to UTC</string>
+        </property>
+    </widget>
+    <widget class="QLineEdit">
+        <property name="name">
+            <cstring>Callsign</cstring>
+        </property>
+        <property name="geometry">
+            <rect>
+                <x>20</x>
+                <y>40</y>
                 <width>90</width>
-                <height>100</height>
+                <height>22</height>
             </rect>
         </property>
-        <vbox>
+        <property name="frameShape">
+            <enum>LineEditPanel</enum>
+        </property>
+        <property name="frameShadow">
+            <enum>Sunken</enum>
+        </property>
+    </widget>
+    <widget class="QLayoutWidget">
+        <property name="name">
+            <cstring>layout3</cstring>
+        </property>
+        <property name="geometry">
+            <rect>
+                <x>90</x>
+                <y>400</y>
+                <width>408</width>
+                <height>45</height>
+            </rect>
+        </property>
+        <hbox>
             <property name="name">
                 <cstring>unnamed</cstring>
             </property>
-            <widget class="QLabel">
+            <widget class="QPushButton">
                 <property name="name">
-                    <cstring>ILevel</cstring>
+                    <cstring>buttonOk</cstring>
+                </property>
+                <property name="minimumSize">
+                    <size>
+                        <width>80</width>
+                        <height>40</height>
+                    </size>
+                </property>
+                <property name="font">
+                    <font>
+                    </font>
+                </property>
+                <property name="focusPolicy">
+                    <enum>ClickFocus</enum>
                 </property>
                 <property name="text">
-                    <string>Inputlevel</string>
+                    <string>&Ok</string>
+                </property>
+                <property name="accel">
+                    <string>Alt+O</string>
+                </property>
+                <property name="autoDefault">
+                    <bool>false</bool>
+                </property>
+                <property name="default">
+                    <bool>false</bool>
                 </property>
             </widget>
-            <widget class="QSpinBox">
+            <spacer>
                 <property name="name">
-                    <cstring>Input</cstring>
+                    <cstring>spacer2</cstring>
                 </property>
-            </widget>
-            <widget class="QLabel">
+                <property name="orientation">
+                    <enum>Horizontal</enum>
+                </property>
+                <property name="sizeType">
+                    <enum>Expanding</enum>
+                </property>
+                <property name="sizeHint">
+                    <size>
+                        <width>232</width>
+                        <height>20</height>
+                    </size>
+                </property>
+            </spacer>
+            <widget class="QPushButton">
                 <property name="name">
-                    <cstring>OLevel</cstring>
+                    <cstring>buttonCancel</cstring>
+                </property>
+                <property name="minimumSize">
+                    <size>
+                        <width>80</width>
+                        <height>40</height>
+                    </size>
+                </property>
+                <property name="font">
+                    <font>
+                    </font>
+                </property>
+                <property name="focusPolicy">
+                    <enum>ClickFocus</enum>
                 </property>
                 <property name="text">
-                    <string>Outputlevel</string>
+                    <string>&Cancel</string>
                 </property>
-            </widget>
-            <widget class="QSpinBox">
-                <property name="name">
-                    <cstring>Output</cstring>
+                <property name="accel">
+                    <string></string>
+                </property>
+                <property name="autoDefault">
+                    <bool>false</bool>
+                </property>
+                <property name="default">
+                    <bool>false</bool>
+                </property>
+                <property name="flat">
+                    <bool>false</bool>
                 </property>
             </widget>
-        </vbox>
-    </widget>
-    <widget class="QLabel">
-        <property name="name">
-            <cstring>UTCL</cstring>
-        </property>
-        <property name="geometry">
-            <rect>
-                <x>170</x>
-                <y>10</y>
-                <width>132</width>
-                <height>21</height>
-            </rect>
-        </property>
-        <property name="text">
-            <string>Time Offset to UTC</string>
-        </property>
+        </hbox>
     </widget>
-    <widget class="QButtonGroup">
+    <widget class="QFrame">
         <property name="name">
-            <cstring>InputSelection</cstring>
+            <cstring>frame6</cstring>
         </property>
         <property name="geometry">
             <rect>
-                <x>340</x>
-                <y>80</y>
-                <width>120</width>
-                <height>80</height>
+                <x>250</x>
+                <y>70</y>
+                <width>151</width>
+                <height>160</height>
             </rect>
         </property>
         <property name="frameShape">
@@ -357,55 +340,64 @@
         <property name="frameShadow">
             <enum>Raised</enum>
         </property>
-        <property name="title">
-            <string>InputSelection</string>
-        </property>
-        <property name="alignment">
-            <set>AlignHCenter</set>
-        </property>
-        <widget class="QRadioButton">
+        <widget class="QLabel">
             <property name="name">
-                <cstring>Mic</cstring>
+                <cstring>textLabel1</cstring>
             </property>
             <property name="geometry">
                 <rect>
-                    <x>11</x>
-                    <y>21</y>
-                    <width>43</width>
-                    <height>19</height>
+                    <x>10</x>
+                    <y>9</y>
+                    <width>131</width>
+                    <height>21</height>
                 </rect>
             </property>
             <property name="text">
-                <string>Mic</string>
+                <string>PTT Device</string>
             </property>
         </widget>
-        <widget class="QRadioButton">
+        <widget class="QLineEdit">
             <property name="name">
-                <cstring>Line</cstring>
+                <cstring>SelectedDevice</cstring>
             </property>
             <property name="geometry">
                 <rect>
                     <x>10</x>
-                    <y>50</y>
-                    <width>50</width>
-                    <height>19</height>
+                    <y>129</y>
+                    <width>131</width>
+                    <height>21</height>
                 </rect>
             </property>
-            <property name="text">
-                <string>Line</string>
+        </widget>
+        <widget class="QListBox">
+            <item>
+                <property name="text">
+                    <string>None</string>
+                </property>
+            </item>
+            <property name="name">
+                <cstring>AvailableDevices</cstring>
+            </property>
+            <property name="geometry">
+                <rect>
+                    <x>11</x>
+                    <y>39</y>
+                    <width>130</width>
+                    <height>61</height>
+                </rect>
             </property>
         </widget>
     </widget>
     <widget class="QFrame">
         <property name="name">
-            <cstring>frame4</cstring>
+            <cstring>OutputSection</cstring>
         </property>
         <property name="geometry">
             <rect>
-                <x>340</x>
-                <y>170</y>
-                <width>121</width>
-                <height>45</height>
+                <x>250</x>
+                <y>240</y>
+                <width>160</width>
+                <height>150</height>
             </rect>
         </property>
         <property name="frameShape">
@@ -414,68 +406,97 @@
         <property name="frameShadow">
             <enum>Raised</enum>
         </property>
-        <widget class="QLineEdit">
+        <widget class="QLayoutWidget">
             <property name="name">
-                <cstring>SoundDevice</cstring>
-            </property>
-            <property name="geometry">
-                <rect>
-                    <x>5</x>
-                    <y>20</y>
-                    <width>110</width>
-                    <height>18</height>
-                </rect>
-            </property>
-            <property name="text">
-                <string>/dev/audio</string>
-            </property>
-        </widget>
-        <widget class="QLabel">
-            <property name="name">
-                <cstring>SoundDeviceL</cstring>
+                <cstring>layout8</cstring>
             </property>
             <property name="geometry">
                 <rect>
                     <x>10</x>
-                    <y>0</y>
-                    <width>100</width>
-                    <height>20</height>
+                    <y>10</y>
+                    <width>140</width>
+                    <height>126</height>
                 </rect>
             </property>
-            <property name="text">
-                <string>Sound Device</string>
-            </property>
+            <vbox>
+                <property name="name">
+                    <cstring>unnamed</cstring>
+                </property>
+                <widget class="QLabel">
+                    <property name="name">
+                        <cstring>OHeader</cstring>
+                    </property>
+                    <property name="font">
+                        <font>
+                        </font>
+                    </property>
+                    <property name="text">
+                        <string>Outputdevices</string>
+                    </property>
+                    <property name="alignment">
+                        <set>AlignCenter</set>
+                    </property>
+                </widget>
+                <widget class="QListBox">
+                    <property name="name">
+                        <cstring>OutputDeviceList</cstring>
+                    </property>
+                    <property name="vScrollBarMode">
+                        <enum>AlwaysOn</enum>
+                    </property>
+                    <property name="hScrollBarMode">
+                        <enum>Auto</enum>
+                    </property>
+                    <property name="currentItem">
+                        <number>-1</number>
+                    </property>
+                </widget>
+                <widget class="QLayoutWidget">
+                    <property name="name">
+                        <cstring>layout7</cstring>
+                    </property>
+                    <hbox>
+                        <property name="name">
+                            <cstring>unnamed</cstring>
+                        </property>
+                        <widget class="QLabel">
+                            <property name="name">
+                                <cstring>OutputL</cstring>
+                            </property>
+                            <property name="enabled">
+                                <bool>false</bool>
+                            </property>
+                            <property name="font">
+                                <font>
+                                </font>
+                            </property>
+                            <property name="text">
+                                <string>Level</string>
+                            </property>
+                        </widget>
+                        <widget class="QSpinBox">
+                            <property name="name">
+                                <cstring>Output</cstring>
+                            </property>
+                            <property name="enabled">
+                                <bool>false</bool>
+                            </property>
+                        </widget>
+                    </hbox>
+                </widget>
+            </vbox>
         </widget>
     </widget>
-    <widget class="QLineEdit">
-        <property name="name">
-            <cstring>Callsign</cstring>
-        </property>
-        <property name="geometry">
-            <rect>
-                <x>20</x>
-                <y>40</y>
-                <width>90</width>
-                <height>22</height>
-            </rect>
-        </property>
-        <property name="frameShape">
-            <enum>LineEditPanel</enum>
-        </property>
-        <property name="frameShadow">
-            <enum>Sunken</enum>
-        </property>
-    </widget>
-    <widget class="QButtonGroup">
+    <widget class="QFrame">
         <property name="name">
-            <cstring>PTT</cstring>
+            <cstring>frame7</cstring>
         </property>
         <property name="geometry">
             <rect>
-                <x>180</x>
+                <x>430</x>
                 <y>80</y>
-                <width>150</width>
-                <height>140</height>
+                <width>131</width>
+                <height>111</height>
             </rect>
         </property>
         <property name="frameShape">
@@ -484,141 +505,152 @@
         <property name="frameShadow">
             <enum>Raised</enum>
         </property>
-        <property name="title">
-            <string>PTT Control</string>
-        </property>
-        <property name="alignment">
-            <set>AlignHCenter</set>
-        </property>
-        <widget class="QRadioButton">
-            <property name="name">
-                <cstring>None</cstring>
-            </property>
-            <property name="geometry">
-                <rect>
-                    <x>10</x>
-                    <y>20</y>
-                    <width>50</width>
-                    <height>20</height>
-                </rect>
-            </property>
-            <property name="text">
-                <string>None</string>
-            </property>
-            <property name="buttonGroupId">
-                <number>0</number>
-            </property>
-        </widget>
-        <widget class="QRadioButton">
-            <property name="name">
-                <cstring>Others</cstring>
-            </property>
-            <property name="geometry">
-                <rect>
-                    <x>76</x>
-                    <y>20</y>
-                    <width>60</width>
-                    <height>20</height>
-                </rect>
-            </property>
-            <property name="text">
-                <string>Other</string>
-            </property>
-            <property name="buttonGroupId">
-                <number>5</number>
-            </property>
-        </widget>
-        <widget class="QRadioButton">
-            <property name="name">
-                <cstring>COM2</cstring>
-            </property>
-            <property name="geometry">
-                <rect>
-                    <x>10</x>
-                    <y>110</y>
-                    <width>59</width>
-                    <height>19</height>
-                </rect>
-            </property>
-            <property name="text">
-                <string>COM2</string>
-            </property>
-            <property name="buttonGroupId">
-                <number>2</number>
-            </property>
-        </widget>
-        <widget class="QRadioButton">
-            <property name="name">
-                <cstring>COM4</cstring>
-            </property>
-            <property name="geometry">
-                <rect>
-                    <x>80</x>
-                    <y>110</y>
-                    <width>59</width>
-                    <height>19</height>
-                </rect>
-            </property>
-            <property name="text">
-                <string>COM4</string>
-            </property>
-            <property name="buttonGroupId">
-                <number>4</number>
-            </property>
-        </widget>
-        <widget class="QRadioButton">
+        <widget class="QLabel">
             <property name="name">
-                <cstring>COM1</cstring>
+                <cstring>textLabel2</cstring>
             </property>
             <property name="geometry">
                 <rect>
-                    <x>10</x>
-                    <y>80</y>
-                    <width>59</width>
-                    <height>19</height>
+                    <x>6</x>
+                    <y>10</y>
+                    <width>120</width>
+                    <height>30</height>
                 </rect>
             </property>
             <property name="text">
-                <string>COM1</string>
-            </property>
-            <property name="buttonGroupId">
-                <number>1</number>
+                <string>QSO Datafile</string>
             </property>
         </widget>
-        <widget class="QRadioButton">
+        <widget class="QLineEdit">
             <property name="name">
-                <cstring>COM3</cstring>
+                <cstring>QsoFile</cstring>
             </property>
             <property name="geometry">
                 <rect>
-                    <x>80</x>
-                    <y>80</y>
-                    <width>59</width>
-                    <height>19</height>
+                    <x>11</x>
+                    <y>70</y>
+                    <width>110</width>
+                    <height>21</height>
                 </rect>
             </property>
             <property name="text">
-                <string>COM3</string>
+                <string>QSO.adif</string>
             </property>
-            <property name="buttonGroupId">
-                <number>3</number>
+            <property name="cursorPosition">
+                <number>0</number>
             </property>
         </widget>
-        <widget class="QLineEdit">
+    </widget>
+    <widget class="QFrame">
+        <property name="name">
+            <cstring>InputSection</cstring>
+        </property>
+        <property name="geometry">
+            <rect>
+                <x>30</x>
+                <y>240</y>
+                <width>160</width>
+                <height>150</height>
+            </rect>
+        </property>
+        <property name="frameShape">
+            <enum>StyledPanel</enum>
+        </property>
+        <property name="frameShadow">
+            <enum>Raised</enum>
+        </property>
+        <widget class="QLayoutWidget">
             <property name="name">
-                <cstring>SerialDevice</cstring>
+                <cstring>layout6</cstring>
             </property>
             <property name="geometry">
                 <rect>
                     <x>10</x>
-                    <y>50</y>
-                    <width>130</width>
-                    <height>23</height>
+                    <y>9</y>
+                    <width>140</width>
+                    <height>126</height>
                 </rect>
             </property>
-            <property name="text">
-                <string>/dev/ttyS?</string>
-            </property>
+            <vbox>
+                <property name="name">
+                    <cstring>unnamed</cstring>
+                </property>
+                <widget class="QLabel">
+                    <property name="name">
+                        <cstring>IHeader</cstring>
+                    </property>
+                    <property name="font">
+                        <font>
+                        </font>
+                    </property>
+                    <property name="text">
+                        <string>Inputdevices</string>
+                    </property>
+                    <property name="alignment">
+                        <set>AlignCenter</set>
+                    </property>
+                </widget>
+                <widget class="QListBox">
+                    <property name="name">
+                        <cstring>InputDeviceList</cstring>
+                    </property>
+                    <property name="paletteBackgroundColor">
+                        <color>
+                            <red>250</red>
+                            <green>250</green>
+                            <blue>250</blue>
+                        </color>
+                    </property>
+                    <property name="backgroundOrigin">
+                        <enum>AncestorOrigin</enum>
+                    </property>
+                    <property name="resizePolicy">
+                        <enum>Manual</enum>
+                    </property>
+                    <property name="vScrollBarMode">
+                        <enum>AlwaysOn</enum>
+                    </property>
+                    <property name="columnMode">
+                        <enum>FixedNumber</enum>
+                    </property>
+                    <property name="rowMode">
+                        <enum>Variable</enum>
+                    </property>
+                </widget>
+                <widget class="QLayoutWidget">
+                    <property name="name">
+                        <cstring>layout4</cstring>
+                    </property>
+                    <hbox>
+                        <property name="name">
+                            <cstring>unnamed</cstring>
+                        </property>
+                        <widget class="QLabel">
+                            <property name="name">
+                                <cstring>InputL</cstring>
+                            </property>
+                            <property name="enabled">
+                                <bool>false</bool>
+                            </property>
+                            <property name="font">
+                                <font>
+                                </font>
+                            </property>
+                            <property name="text">
+                                <string>Level</string>
+                            </property>
+                        </widget>
+                        <widget class="QSpinBox">
+                            <property name="name">
+                                <cstring>Input</cstring>
+                            </property>
+                            <property name="enabled">
+                                <bool>false</bool>
+                            </property>
+                        </widget>
+                    </hbox>
+                </widget>
+            </vbox>
         </widget>
     </widget>
 </widget>
@@ -642,52 +674,22 @@
         <slot>selectDemomode()</slot>
     </connection>
     <connection>
-        <sender>Input</sender>
-        <signal>valueChanged(int)</signal>
-        <receiver>GeneralSettings</receiver>
-        <slot>setInputLevel(int)</slot>
-    </connection>
-    <connection>
-        <sender>InputSelection</sender>
-        <signal>clicked(int)</signal>
+        <sender>InputDeviceList</sender>
+        <signal>highlighted(int)</signal>
         <receiver>GeneralSettings</receiver>
         <slot>SelectInputSource(int)</slot>
     </connection>
     <connection>
-        <sender>Input</sender>
-        <signal>valueChanged(int)</signal>
-        <receiver>GeneralSettings</receiver>
-        <slot>setInputLevel(int)</slot>
-    </connection>
-    <connection>
-        <sender>Output</sender>
-        <signal>valueChanged(int)</signal>
-        <receiver>GeneralSettings</receiver>
-        <slot>setOutputLevel(int)</slot>
-    </connection>
-    <connection>
-        <sender>PTT</sender>
-        <signal>clicked(int)</signal>
-        <receiver>GeneralSettings</receiver>
-        <slot>selectComPort(int)</slot>
-    </connection>
-    <connection>
-        <sender>SoundDevice</sender>
-        <signal>lostFocus()</signal>
-        <receiver>GeneralSettings</receiver>
-        <slot>setSoundDevice()</slot>
-    </connection>
-    <connection>
-        <sender>SerialDevice</sender>
-        <signal>lostFocus()</signal>
+        <sender>OutputDeviceList</sender>
+        <signal>highlighted(int)</signal>
         <receiver>GeneralSettings</receiver>
-        <slot>setSerialDevice()</slot>
+        <slot>SelectOutputSource(int)</slot>
     </connection>
     <connection>
-        <sender>SerialDevice</sender>
-        <signal>returnPressed()</signal>
+        <sender>AvailableDevices</sender>
+        <signal>highlighted(const QString&)</signal>
         <receiver>GeneralSettings</receiver>
-        <slot>setSerialDevice()</slot>
+        <slot>selectComPort(const QString&)</slot>
     </connection>
 </connections>
 <tabstops>
@@ -698,27 +700,18 @@
     <tabstop>buttonCancel</tabstop>
 </tabstops>
 <includes>
-    <include location="local" impldecl="in implementation">utils.h</include>
     <include location="local" impldecl="in declaration">parameter.h</include>
-    <include location="local" impldecl="in implementation">generalsettings.ui.h</include>
 </includes>
 <variables>
     <variable access="private">Parameter LocalSettings;</variable>
 </variables>
-<signals>
-    <signal>OutputLevelChanged(int)</signal>
-    <signal>InputLevelChanged(int,int)</signal>
-</signals>
 <slots>
     <slot specifier="non virtual">init()</slot>
-    <slot>GeneralSettings_destroyed( QObject * )</slot>
+    <slot access="private">GeneralSettings_destroyed( QObject * )</slot>
     <slot specifier="non virtual">selectDemomode()</slot>
     <slot access="private" specifier="non virtual">SelectInputSource( int Device )</slot>
-    <slot access="private" specifier="non virtual">setInputLevel( int Level )</slot>
-    <slot access="private" specifier="non virtual">setOutputLevel( int Level )</slot>
-    <slot access="private" specifier="non virtual">selectComPort( int port )</slot>
-    <slot access="private" specifier="non virtual">setSerialDevice()</slot>
-    <slot access="private" specifier="non virtual">setSoundDevice()</slot>
+    <slot access="private" specifier="non virtual">selectComPort( const QString & )</slot>
+    <slot specifier="non virtual">SelectOutputSource( int Device )</slot>
 </slots>
 <functions>
     <function specifier="non virtual" returnType="Parameter">getSettings()</function>
diff --git a/src/interfaces/generalsettings.ui.h b/src/interfaces/generalsettings.ui.h
new file mode 100644
index 0000000..13658d0
--- /dev/null
+++ b/src/interfaces/generalsettings.ui.h
@@ -0,0 +1,181 @@
+/****************************************************************************
+** ui.h extension file, included from the uic-generated form implementation.
+**
+** If you wish to add, delete or rename functions or slots use
+** Qt Designer which will update this file, preserving your code. Create an
+** init() function in place of a constructor, and a destroy() function in
+** place of a destructor.
+*****************************************************************************/
+#include <portaudio.h>
+#include <qmessagebox.h>
+#include <qwidget.h>
+#include <qdir.h>
+#include <qstringlist.h>
+
+extern Parameter settings;
+
+Parameter GeneralSettings::getSettings()
+{
+LocalSettings.callsign=Callsign->text();
+if(Demomode->isOn() )
+ {
+   LocalSettings.DemoMode=true;
+   LocalSettings.DemoTypeNumber=Fileformat->id(Fileformat->selected());
+   LocalSettings.inputFilename="";
+  }
+else
+   LocalSettings.DemoMode=false;
+  
+LocalSettings.timeoffset=UTC->value();
+if( SlashedZero->isOn())
+  LocalSettings.slashed0=true;
+else
+  LocalSettings.slashed0=false;
+LocalSettings.SerialDevice=SelectedDevice->text();
+LocalSettings.QSOFileName=QsoFile->text();
+return LocalSettings;
+}
+
+void GeneralSettings::init()
+{
+PaDeviceInfo DeviceInfo;
+QString Directory;
+QDir dir;
+//connect(Output,SIGNAL(valueChanged(int)),this,SIGNAL(OutputLevelChanged(int)));
+LocalSettings = settings;    
+
+
+Callsign->setText(LocalSettings.callsign);
+UTC->setValue(LocalSettings.timeoffset);
+SlashedZero->setChecked(LocalSettings.slashed0);
+
+Demomode->setChecked(LocalSettings.DemoMode);
+
+Fileformat->setButton(LocalSettings.DemoTypeNumber);
+if (Demomode->isOn())
+    Fileformat->show();
+else
+    Fileformat->hide();
+
+//PTT
+SelectedDevice->setText(LocalSettings.SerialDevice);
+// First look in the /dev Directory
+Directory="/dev/";
+
+dir.setPath(Directory);
+#ifndef LINPSK_FOR_MAC
+QStringList Files=dir.entryList("ttyS*",QDir::Files|QDir::System,QDir::Name);
+#else
+QStringList Files=dir.entryList("*usbserial*",QDir::Files|QDir::System,QDir::Name);
+#endif
+for(QStringList::iterator Name=Files.begin();Name !=Files.end(); Name++)
+ AvailableDevices->insertItem(Directory + *Name); 
+#ifdef LINPSK_FOR_MAC
+Files=dir.entryList("cu.*",QDir::Files|QDir::System,QDir::Name);
+for(QStringList::iterator Name=Files.begin();Name !=Files.end(); Name++)
+ AvailableDevices->insertItem(Directory + *Name); 
+#endif
+// Now check for usb devices 
+Directory="/dev/usb/tts/";
+dir.setPath(Directory);
+Files=dir.entryList(QDir::Files|QDir::System,QDir::Name); 
+ 
+for(QStringList::iterator Name=Files.begin();Name !=Files.end(); Name++)
+ AvailableDevices->insertItem(Directory + *Name); 
+InputDeviceList->setFixedHeight(60);          
+if (LocalSettings.NumberofInputDevices > 0 )
+ {
+  for (int i=0; i < LocalSettings.NumberofInputDevices; i++)
+   {
+    DeviceInfo = *Pa_GetDeviceInfo( LocalSettings.InputDevices[i] );
+    QString DeviceName=QString(DeviceInfo.name);
+    InputDeviceList->insertItem(DeviceName);
+   }
+   if( LocalSettings.ActualInputDevice >=0 )
+   InputDeviceList->setSelected(LocalSettings.ActualInputDevice,true); 
+ }
+OutputDeviceList->setFixedHeight(60); 
+if (LocalSettings.NumberofOutputDevices > 0 )
+ {
+  for (int i=0; i < LocalSettings.NumberofOutputDevices; i++)
+   {
+    DeviceInfo = *Pa_GetDeviceInfo( LocalSettings.OutputDevices[i] );
+    QString DeviceName=QString(DeviceInfo.name);
+    OutputDeviceList->insertItem(DeviceName);
+   }
+   if( LocalSettings.ActualOutputDevice >=0 )
+    OutputDeviceList->setSelected(LocalSettings.ActualOutputDevice,true); 
+   
+ }
+
+//Output->setValue(LocalSettings.OutputVolume);
+//Input->setValue(LocalSettings.InputVolume);
+QsoFile->setText(LocalSettings.QSOFileName);
+selectDemomode();
+InputL->hide();
+Input->hide();
+OutputL->hide();
+Output->hide();
+}
+
+
+void GeneralSettings::GeneralSettings_destroyed( QObject * )
+{
+
+}
+
+
+void GeneralSettings::selectDemomode()
+{
+if (Demomode->isOn())
+    {
+     Fileformat->show();
+     InputSection->hide();
+     OutputSection->hide();
+     
+    } 
+else
+    {
+     InputSection->show();
+     OutputSection->show();
+     Fileformat->hide();
+    } 
+}
+
+void GeneralSettings::SelectInputSource( int Device )
+{
+LocalSettings.ActualInputDevice = Device;	
+}
+/**
+void GeneralSettings::setInputLevel( int Level )
+{
+LocalSettings.InputVolume = Level;
+if (LocalSettings.ActualInputDevice >= 0)
+	if(setVolume(LocalSettings.InputDevices[LocalSettings.ActualInputDevice],true, Level ) !=0 )
+	   QMessageBox::critical(0," Error Mixer Device for Input","Can't set Input Volume.\nCheck Permissions or use Mixer Application"); 
+}
+
+void GeneralSettings::setOutputLevel( int Level )
+{
+LocalSettings.OutputVolume=Level;
+
+if (LocalSettings.ActualOutputDevice >= 0)
+	if( setVolume(LocalSettings.OutputDevices[LocalSettings.ActualOutputDevice],false, Level ) != 0)
+	   QMessageBox::critical(0," Error Mixer Device for Output","Can't set Output Volume.\nCheck Permissions or use Mixer Application"); 
+}
+**/
+
+void GeneralSettings::selectComPort(const QString &s)
+{
+
+
+SelectedDevice->clear();
+SelectedDevice->setText(s);
+}
+
+
+
+void GeneralSettings::SelectOutputSource(int Device)
+{
+LocalSettings.ActualOutputDevice=Device;
+}
diff --git a/linpsk/modemenu.ui b/src/interfaces/modemenu.ui
similarity index 64%
rename from linpsk/modemenu.ui
rename to src/interfaces/modemenu.ui
index da6ae32..61e8eb8 100644
--- a/linpsk/modemenu.ui
+++ b/src/interfaces/modemenu.ui
@@ -1,4 +1,4 @@
-<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
 <class>ModeMenu</class>
 <widget class="QDialog">
     <property name="name">
@@ -9,7 +9,7 @@
             <x>0</x>
             <y>0</y>
             <width>350</width>
-            <height>150</height>
+            <height>250</height>
         </rect>
     </property>
     <property name="sizePolicy">
@@ -23,7 +23,7 @@
     <property name="minimumSize">
         <size>
             <width>350</width>
-            <height>150</height>
+            <height>250</height>
         </size>
     </property>
     <property name="baseSize">
@@ -38,6 +38,103 @@
     <property name="sizeGripEnabled">
         <bool>true</bool>
     </property>
+    <widget class="QLayoutWidget">
+        <property name="name">
+            <cstring>layout3</cstring>
+        </property>
+        <property name="geometry">
+            <rect>
+                <x>30</x>
+                <y>190</y>
+                <width>300</width>
+                <height>50</height>
+            </rect>
+        </property>
+        <hbox>
+            <property name="name">
+                <cstring>unnamed</cstring>
+            </property>
+            <widget class="QPushButton">
+                <property name="name">
+                    <cstring>buttonOk</cstring>
+                </property>
+                <property name="minimumSize">
+                    <size>
+                        <width>60</width>
+                        <height>20</height>
+                    </size>
+                </property>
+                <property name="text">
+                    <string>&OK</string>
+                </property>
+                <property name="accel">
+                    <string></string>
+                </property>
+                <property name="autoDefault">
+                    <bool>true</bool>
+                </property>
+                <property name="default">
+                    <bool>true</bool>
+                </property>
+            </widget>
+            <spacer>
+                <property name="name">
+                    <cstring>Horizontal Spacing2</cstring>
+                </property>
+                <property name="orientation">
+                    <enum>Horizontal</enum>
+                </property>
+                <property name="sizeType">
+                    <enum>Expanding</enum>
+                </property>
+                <property name="sizeHint">
+                    <size>
+                        <width>110</width>
+                        <height>20</height>
+                    </size>
+                </property>
+            </spacer>
+            <widget class="QPushButton">
+                <property name="name">
+                    <cstring>buttonCancel</cstring>
+                </property>
+                <property name="minimumSize">
+                    <size>
+                        <width>60</width>
+                        <height>20</height>
+                    </size>
+                </property>
+                <property name="text">
+                    <string>&Cancel</string>
+                </property>
+                <property name="accel">
+                    <string></string>
+                </property>
+                <property name="autoDefault">
+                    <bool>true</bool>
+                </property>
+            </widget>
+        </hbox>
+    </widget>
+    <widget class="QRadioButton">
+        <property name="name">
+            <cstring>Reverse</cstring>
+        </property>
+        <property name="geometry">
+            <rect>
+                <x>260</x>
+                <y>30</y>
+                <width>80</width>
+                <height>31</height>
+            </rect>
+        </property>
+        <property name="text">
+            <string>Reverse</string>
+        </property>
+        <property name="checked">
+            <bool>true</bool>
+        </property>
+    </widget>
     <widget class="QListBox">
         <property name="name">
             <cstring>RxMode</cstring>
@@ -47,7 +144,7 @@
                 <x>30</x>
                 <y>20</y>
                 <width>100</width>
-                <height>60</height>
+                <height>160</height>
             </rect>
         </property>
         <property name="sizePolicy">
@@ -59,7 +156,7 @@
             </sizepolicy>
         </property>
         <property name="vScrollBarMode">
-            <enum>AlwaysOn</enum>
+            <enum>Auto</enum>
         </property>
         <property name="hScrollBarMode">
             <enum>AlwaysOff</enum>
@@ -68,197 +165,219 @@
             <number>-1</number>
         </property>
     </widget>
-    <widget class="QGroupBox">
+    <widget class="QButtonGroup">
         <property name="name">
-            <cstring>Spacing</cstring>
+            <cstring>Parity</cstring>
         </property>
         <property name="geometry">
             <rect>
-                <x>145</x>
-                <y>20</y>
-                <width>100</width>
-                <height>60</height>
+                <x>250</x>
+                <y>90</y>
+                <width>80</width>
+                <height>90</height>
             </rect>
         </property>
         <property name="title">
-            <string>Spacing</string>
+            <string>Parity</string>
         </property>
         <property name="alignment">
             <set>AlignHCenter</set>
         </property>
-        <widget class="QSpinBox">
+        <widget class="QRadioButton">
             <property name="name">
-                <cstring>RTTYSpacing</cstring>
+                <cstring>None</cstring>
             </property>
-            <property name="enabled">
+            <property name="geometry">
+                <rect>
+                    <x>10</x>
+                    <y>15</y>
+                    <width>60</width>
+                    <height>20</height>
+                </rect>
+            </property>
+            <property name="text">
+                <string>None</string>
+            </property>
+            <property name="checked">
                 <bool>true</bool>
             </property>
+            <property name="buttonGroupId">
+                <number>0</number>
+            </property>
+        </widget>
+        <widget class="QRadioButton">
+            <property name="name">
+                <cstring>Odd</cstring>
+            </property>
             <property name="geometry">
                 <rect>
                     <x>10</x>
-                    <y>30</y>
-                    <width>80</width>
-                    <height>23</height>
+                    <y>35</y>
+                    <width>61</width>
+                    <height>20</height>
                 </rect>
             </property>
-            <property name="suffix">
-                <string> Hz</string>
+            <property name="text">
+                <string>Odd</string>
             </property>
-            <property name="maxValue">
-                <number>500</number>
+            <property name="buttonGroupId">
+                <number>1</number>
             </property>
-            <property name="minValue">
-                <number>50</number>
+        </widget>
+        <widget class="QRadioButton">
+            <property name="name">
+                <cstring>Even</cstring>
             </property>
-            <property name="value">
-                <number>170</number>
+            <property name="geometry">
+                <rect>
+                    <x>10</x>
+                    <y>55</y>
+                    <width>60</width>
+                    <height>20</height>
+                </rect>
+            </property>
+            <property name="text">
+                <string>Even</string>
+            </property>
+            <property name="buttonGroupId">
+                <number>2</number>
             </property>
         </widget>
     </widget>
     <widget class="QButtonGroup">
         <property name="name">
-            <cstring>Parity</cstring>
+            <cstring>Stopbits</cstring>
         </property>
         <property name="geometry">
             <rect>
-                <x>260</x>
-                <y>10</y>
+                <x>150</x>
+                <y>89</y>
                 <width>80</width>
-                <height>80</height>
+                <height>90</height>
             </rect>
         </property>
         <property name="title">
-            <string>Parity</string>
+            <string>Stopbits</string>
         </property>
         <property name="alignment">
             <set>AlignHCenter</set>
         </property>
+        <property name="checkable">
+            <bool>false</bool>
+        </property>
+        <property name="checked">
+            <bool>false</bool>
+        </property>
+        <property name="exclusive">
+            <bool>false</bool>
+        </property>
         <widget class="QRadioButton">
             <property name="name">
-                <cstring>Odd</cstring>
+                <cstring>One</cstring>
             </property>
             <property name="geometry">
                 <rect>
                     <x>10</x>
-                    <y>35</y>
-                    <width>61</width>
-                    <height>20</height>
+                    <y>20</y>
+                    <width>80</width>
+                    <height>22</height>
                 </rect>
             </property>
             <property name="text">
-                <string>Odd</string>
+                <string>1</string>
+            </property>
+            <property name="buttonGroupId">
+                <number>0</number>
             </property>
         </widget>
         <widget class="QRadioButton">
             <property name="name">
-                <cstring>None</cstring>
+                <cstring>Onepoint5</cstring>
             </property>
             <property name="geometry">
                 <rect>
                     <x>10</x>
-                    <y>15</y>
-                    <width>60</width>
-                    <height>20</height>
+                    <y>40</y>
+                    <width>81</width>
+                    <height>21</height>
                 </rect>
             </property>
             <property name="text">
-                <string>None</string>
+                <string>1.5</string>
+            </property>
+            <property name="checked">
+                <bool>true</bool>
+            </property>
+            <property name="buttonGroupId">
+                <number>1</number>
             </property>
         </widget>
         <widget class="QRadioButton">
             <property name="name">
-                <cstring>Even</cstring>
+                <cstring>Two</cstring>
             </property>
             <property name="geometry">
                 <rect>
                     <x>10</x>
-                    <y>55</y>
-                    <width>60</width>
-                    <height>20</height>
+                    <y>60</y>
+                    <width>80</width>
+                    <height>21</height>
                 </rect>
             </property>
             <property name="text">
-                <string>Even</string>
+                <string>2</string>
+            </property>
+            <property name="buttonGroupId">
+                <number>2</number>
             </property>
         </widget>
     </widget>
-    <widget class="QLayoutWidget">
+    <widget class="QGroupBox">
         <property name="name">
-            <cstring>layout3</cstring>
+            <cstring>Spacing</cstring>
         </property>
         <property name="geometry">
             <rect>
-                <x>30</x>
-                <y>100</y>
-                <width>300</width>
-                <height>50</height>
+                <x>145</x>
+                <y>20</y>
+                <width>100</width>
+                <height>60</height>
             </rect>
         </property>
-        <hbox>
+        <property name="title">
+            <string>Spacing</string>
+        </property>
+        <property name="alignment">
+            <set>AlignHCenter</set>
+        </property>
+        <widget class="QSpinBox">
             <property name="name">
-                <cstring>unnamed</cstring>
+                <cstring>RTTYSpacing</cstring>
             </property>
-            <widget class="QPushButton">
-                <property name="name">
-                    <cstring>buttonOk</cstring>
-                </property>
-                <property name="minimumSize">
-                    <size>
-                        <width>60</width>
-                        <height>20</height>
-                    </size>
-                </property>
-                <property name="text">
-                    <string>&OK</string>
-                </property>
-                <property name="accel">
-                    <string></string>
-                </property>
-                <property name="autoDefault">
-                    <bool>true</bool>
-                </property>
-                <property name="default">
-                    <bool>true</bool>
-                </property>
-            </widget>
-            <spacer>
-                <property name="name">
-                    <cstring>Horizontal Spacing2</cstring>
-                </property>
-                <property name="orientation">
-                    <enum>Horizontal</enum>
-                </property>
-                <property name="sizeType">
-                    <enum>Expanding</enum>
-                </property>
-                <property name="sizeHint">
-                    <size>
-                        <width>110</width>
-                        <height>20</height>
-                    </size>
-                </property>
-            </spacer>
-            <widget class="QPushButton">
-                <property name="name">
-                    <cstring>buttonCancel</cstring>
-                </property>
-                <property name="minimumSize">
-                    <size>
-                        <width>60</width>
-                        <height>20</height>
-                    </size>
-                </property>
-                <property name="text">
-                    <string>&Cancel</string>
-                </property>
-                <property name="accel">
-                    <string></string>
-                </property>
-                <property name="autoDefault">
-                    <bool>true</bool>
-                </property>
-            </widget>
-        </hbox>
+            <property name="enabled">
+                <bool>true</bool>
+            </property>
+            <property name="geometry">
+                <rect>
+                    <x>10</x>
+                    <y>23</y>
+                    <width>80</width>
+                    <height>30</height>
+                </rect>
+            </property>
+            <property name="suffix">
+                <string> Hz</string>
+            </property>
+            <property name="maxValue">
+                <number>999</number>
+            </property>
+            <property name="minValue">
+                <number>0</number>
+            </property>
+            <property name="value">
+                <number>170</number>
+            </property>
+        </widget>
     </widget>
 </widget>
 <connections>
@@ -274,13 +393,24 @@
         <receiver>ModeMenu</receiver>
         <slot>reject()</slot>
     </connection>
+    <connection>
+        <sender>RxMode</sender>
+        <signal>highlighted(int)</signal>
+        <receiver>ModeMenu</receiver>
+        <slot>changeView(int)</slot>
+    </connection>
 </connections>
 <includes>
+    <include location="local" impldecl="in declaration">constants.h</include>
     <include location="local" impldecl="in implementation">parameter.h</include>
-    <include location="local" impldecl="in implementation">modemenu.ui.h</include>
 </includes>
 <slots>
     <slot specifier="non virtual">init()</slot>
+    <slot access="private" specifier="non virtual">changeView(int )</slot>
 </slots>
+<functions>
+    <function specifier="non virtual">setParameter(ExtraParameter)</function>
+    <function specifier="non virtual" returnType="ExtraParameter">getParameter()</function>
+</functions>
 <layoutdefaults spacing="6" margin="11"/>
 </UI>
diff --git a/linpsk/modemenu.ui.h b/src/interfaces/modemenu.ui.h
similarity index 50%
rename from linpsk/modemenu.ui.h
rename to src/interfaces/modemenu.ui.h
index 9cd1dd4..cc4a214 100644
--- a/linpsk/modemenu.ui.h
+++ b/src/interfaces/modemenu.ui.h
@@ -8,37 +8,59 @@
 *****************************************************************************/
 #include "parameter.h"
 #include "crxchannel.h"
+#include "constants.h"
 
 extern Parameter settings;
 
 void ModeMenu::init()
 {
-/**
-int i;
-switch (settings.ActChannel->getModulationType() )
- {
-   case BPSK:
-     i=0;
-     break;
-   case QPSK:
-     i=1;
-     break;     
-   case RTTY:
-     i=2;
-     break;     
-  case MFSK16:  
-     i=3;
-     break;
- }
-**/    
 RxMode->insertItem("BPSK",0);
 RxMode->insertItem("QPSK",1);
 RxMode->insertItem("RTTY",2);
 RxMode->insertItem("MFSK16",3);
 RxMode->setSelected(settings.ActChannel->getModulationType() ,true);
-if (settings.ActChannel->getModulationType() != RTTY )
+if ( settings.ActChannel->getModulationType() != RTTY)
  {
   Parity->hide();
   Spacing->hide();
+  Reverse->hide();
  }   
 }
+void ModeMenu::changeView(int index)
+{
+RxMode->setSelected(index,true);
+if ( index == RTTY )
+ {
+  Parity->show();
+  Spacing->show();
+  Reverse->show();
+  Stopbits->show(); 
+ }
+else
+ {
+  Parity->hide();
+  Spacing->hide();
+  Reverse->hide();
+  Stopbits->hide();
+
+ } 
+}
+void ModeMenu::setParameter(ExtraParameter Param)
+{
+RTTYSpacing->setValue(Param.offset);
+Parity->setButton(Param.parity);
+Stopbits->setButton(Param.stopbits);
+Reverse->setChecked(Param.reverse);
+}
+ExtraParameter ModeMenu::getParameter()
+{
+ExtraParameter Param;
+
+Param.offset=RTTYSpacing->value();
+Param.reverse=Reverse->isChecked();
+Param.parity=(Paritaet) Parity->selectedId();
+Param.stopbits=(StopBits) Stopbits->selectedId();
+return Param;
+}
+
+
diff --git a/linpsk/qsodata.ui b/src/interfaces/qsodata.ui
similarity index 89%
rename from linpsk/qsodata.ui
rename to src/interfaces/qsodata.ui
index 93bf609..318c609 100644
--- a/linpsk/qsodata.ui
+++ b/src/interfaces/qsodata.ui
@@ -1,4 +1,4 @@
-<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
 <class>QSOData</class>
 <widget class="QGroupBox">
     <property name="name">
@@ -41,28 +41,6 @@
     </property>
     <widget class="QLabel">
         <property name="name">
-            <cstring>Name</cstring>
-        </property>
-        <property name="geometry">
-            <rect>
-                <x>10</x>
-                <y>35</y>
-                <width>50</width>
-                <height>16</height>
-            </rect>
-        </property>
-        <property name="frameShape">
-            <enum>NoFrame</enum>
-        </property>
-        <property name="frameShadow">
-            <enum>Plain</enum>
-        </property>
-        <property name="text">
-            <string>Name</string>
-        </property>
-    </widget>
-    <widget class="QLabel">
-        <property name="name">
             <cstring>Date</cstring>
         </property>
         <property name="geometry">
@@ -276,15 +254,15 @@
             <string>Locator</string>
         </property>
     </widget>
-    <widget class="QLabel">
+    <widget class="QLineEdit">
         <property name="name">
-            <cstring>RemoteCall</cstring>
+            <cstring>QsoDate</cstring>
         </property>
         <property name="geometry">
             <rect>
-                <x>10</x>
-                <y>15</y>
-                <width>50</width>
+                <x>45</x>
+                <y>140</y>
+                <width>80</width>
                 <height>15</height>
             </rect>
         </property>
@@ -296,25 +274,49 @@
                 <verstretch>0</verstretch>
             </sizepolicy>
         </property>
-        <property name="text">
-            <string>Callsign</string>
+        <property name="maximumSize">
+            <size>
+                <width>80</width>
+                <height>15</height>
+            </size>
         </property>
-        <property name="textFormat">
-            <enum>PlainText</enum>
+    </widget>
+    <widget class="QLineEdit">
+        <property name="name">
+            <cstring>HisRST</cstring>
         </property>
-        <property name="alignment">
-            <set>AlignVCenter|AlignLeft</set>
+        <property name="geometry">
+            <rect>
+                <x>73</x>
+                <y>120</y>
+                <width>50</width>
+                <height>15</height>
+            </rect>
+        </property>
+        <property name="sizePolicy">
+            <sizepolicy>
+                <hsizetype>0</hsizetype>
+                <vsizetype>0</vsizetype>
+                <horstretch>60</horstretch>
+                <verstretch>20</verstretch>
+            </sizepolicy>
+        </property>
+        <property name="maximumSize">
+            <size>
+                <width>60</width>
+                <height>15</height>
+            </size>
         </property>
     </widget>
-    <widget class="QLineEdit">
+    <widget class="QLabel">
         <property name="name">
-            <cstring>QsoDate</cstring>
+            <cstring>Mine</cstring>
         </property>
         <property name="geometry">
             <rect>
-                <x>45</x>
-                <y>140</y>
-                <width>80</width>
+                <x>130</x>
+                <y>120</y>
+                <width>60</width>
                 <height>15</height>
             </rect>
         </property>
@@ -328,50 +330,116 @@
         </property>
         <property name="maximumSize">
             <size>
-                <width>80</width>
+                <width>60</width>
                 <height>15</height>
             </size>
         </property>
+        <property name="text">
+            <string>My RST</string>
+        </property>
+        <property name="textFormat">
+            <enum>PlainText</enum>
+        </property>
+    </widget>
+    <widget class="QLabel">
+        <property name="name">
+            <cstring>Name</cstring>
+        </property>
+        <property name="geometry">
+            <rect>
+                <x>10</x>
+                <y>35</y>
+                <width>50</width>
+                <height>16</height>
+            </rect>
+        </property>
+        <property name="frameShape">
+            <enum>NoFrame</enum>
+        </property>
+        <property name="frameShadow">
+            <enum>Plain</enum>
+        </property>
+        <property name="text">
+            <string>Name</string>
+        </property>
+    </widget>
+    <widget class="QLabel">
+        <property name="name">
+            <cstring>RemoteCall</cstring>
+        </property>
+        <property name="geometry">
+            <rect>
+                <x>10</x>
+                <y>18</y>
+                <width>50</width>
+                <height>15</height>
+            </rect>
+        </property>
+        <property name="sizePolicy">
+            <sizepolicy>
+                <hsizetype>0</hsizetype>
+                <vsizetype>0</vsizetype>
+                <horstretch>0</horstretch>
+                <verstretch>0</verstretch>
+            </sizepolicy>
+        </property>
+        <property name="text">
+            <string>Callsign</string>
+        </property>
+        <property name="textFormat">
+            <enum>PlainText</enum>
+        </property>
+        <property name="alignment">
+            <set>AlignVCenter|AlignLeft</set>
+        </property>
     </widget>
     <widget class="QPushButton">
         <property name="name">
-            <cstring>Clear</cstring>
+            <cstring>Refresh</cstring>
         </property>
         <property name="geometry">
             <rect>
-                <x>180</x>
+                <x>95</x>
                 <y>170</y>
-                <width>60</width>
-                <height>20</height>
+                <width>67</width>
+                <height>29</height>
             </rect>
         </property>
+        <property name="font">
+            <font>
+            </font>
+        </property>
         <property name="text">
-            <string>Clear</string>
+            <string>Refresh</string>
         </property>
     </widget>
     <widget class="QPushButton">
         <property name="name">
-            <cstring>Save</cstring>
+            <cstring>Clear</cstring>
         </property>
         <property name="geometry">
             <rect>
-                <x>10</x>
+                <x>180</x>
                 <y>170</y>
-                <width>61</width>
-                <height>21</height>
+                <width>60</width>
+                <height>30</height>
             </rect>
         </property>
+        <property name="font">
+            <font>
+            </font>
+        </property>
         <property name="text">
-            <string>Save</string>
+            <string>Clear</string>
         </property>
     </widget>
     <widget class="QLineEdit">
         <property name="name">
-            <cstring>HisRST</cstring>
+            <cstring>MyRST</cstring>
         </property>
         <property name="geometry">
             <rect>
-                <x>73</x>
+                <x>185</x>
                 <y>120</y>
                 <width>50</width>
                 <height>15</height>
@@ -387,55 +455,58 @@
         </property>
         <property name="maximumSize">
             <size>
-                <width>60</width>
+                <width>50</width>
                 <height>15</height>
             </size>
         </property>
     </widget>
     <widget class="QLineEdit">
         <property name="name">
-            <cstring>QSOFrequency</cstring>
+            <cstring>Loc</cstring>
         </property>
         <property name="geometry">
             <rect>
-                <x>105</x>
-                <y>97</y>
-                <width>100</width>
+                <x>75</x>
+                <y>75</y>
+                <width>165</width>
                 <height>15</height>
             </rect>
         </property>
         <property name="maximumSize">
             <size>
-                <width>100</width>
+                <width>200</width>
                 <height>15</height>
             </size>
         </property>
     </widget>
-    <widget class="QPushButton">
+    <widget class="QLineEdit">
         <property name="name">
-            <cstring>Refresh</cstring>
+            <cstring>QsoFrequency</cstring>
         </property>
         <property name="geometry">
             <rect>
-                <x>100</x>
-                <y>170</y>
-                <width>61</width>
-                <height>21</height>
+                <x>105</x>
+                <y>97</y>
+                <width>100</width>
+                <height>15</height>
             </rect>
         </property>
-        <property name="text">
-            <string>Refresh</string>
+        <property name="maximumSize">
+            <size>
+                <width>100</width>
+                <height>15</height>
+            </size>
         </property>
     </widget>
-    <widget class="QLabel">
+    <widget class="QLineEdit">
         <property name="name">
-            <cstring>Mine</cstring>
+            <cstring>QsoTime</cstring>
         </property>
         <property name="geometry">
             <rect>
-                <x>130</x>
-                <y>120</y>
-                <width>60</width>
+                <x>185</x>
+                <y>140</y>
+                <width>50</width>
                 <height>15</height>
             </rect>
         </property>
@@ -449,16 +520,10 @@
         </property>
         <property name="maximumSize">
             <size>
-                <width>60</width>
+                <width>50</width>
                 <height>15</height>
             </size>
         </property>
-        <property name="text">
-            <string>My RST</string>
-        </property>
-        <property name="textFormat">
-            <enum>PlainText</enum>
-        </property>
     </widget>
     <widget class="QLineEdit">
         <property name="name">
@@ -467,7 +532,7 @@
         <property name="geometry">
             <rect>
                 <x>75</x>
-                <y>15</y>
+                <y>18</y>
                 <width>165</width>
                 <height>15</height>
             </rect>
@@ -489,7 +554,7 @@
     </widget>
     <widget class="QLineEdit">
         <property name="name">
-            <cstring>OPName</cstring>
+            <cstring>OpName</cstring>
         </property>
         <property name="geometry">
             <rect>
@@ -508,7 +573,7 @@
     </widget>
     <widget class="QLineEdit">
         <property name="name">
-            <cstring>QTHName</cstring>
+            <cstring>Qth</cstring>
         </property>
         <property name="geometry">
             <rect>
@@ -525,77 +590,42 @@
             </size>
         </property>
     </widget>
-    <widget class="QLineEdit">
-        <property name="name">
-            <cstring>Loc</cstring>
-        </property>
-        <property name="geometry">
-            <rect>
-                <x>75</x>
-                <y>75</y>
-                <width>165</width>
-                <height>15</height>
-            </rect>
-        </property>
-        <property name="maximumSize">
-            <size>
-                <width>200</width>
-                <height>15</height>
-            </size>
-        </property>
-    </widget>
-    <widget class="QLineEdit">
+    <widget class="QPushButton">
         <property name="name">
-            <cstring>MineRST</cstring>
+            <cstring>Save</cstring>
         </property>
         <property name="geometry">
             <rect>
-                <x>185</x>
-                <y>120</y>
-                <width>50</width>
-                <height>15</height>
+                <x>10</x>
+                <y>170</y>
+                <width>61</width>
+                <height>30</height>
             </rect>
         </property>
         <property name="sizePolicy">
             <sizepolicy>
-                <hsizetype>0</hsizetype>
+                <hsizetype>7</hsizetype>
                 <vsizetype>0</vsizetype>
-                <horstretch>60</horstretch>
-                <verstretch>20</verstretch>
+                <horstretch>0</horstretch>
+                <verstretch>0</verstretch>
             </sizepolicy>
         </property>
-        <property name="maximumSize">
+        <property name="minimumSize">
             <size>
-                <width>50</width>
-                <height>15</height>
+                <width>30</width>
+                <height>20</height>
             </size>
         </property>
-    </widget>
-    <widget class="QLineEdit">
-        <property name="name">
-            <cstring>QSOTime</cstring>
-        </property>
-        <property name="geometry">
-            <rect>
-                <x>185</x>
-                <y>140</y>
-                <width>50</width>
-                <height>15</height>
-            </rect>
+        <property name="font">
+            <font>
+                <family>Webdings</family>
+            </font>
         </property>
-        <property name="sizePolicy">
-            <sizepolicy>
-                <hsizetype>0</hsizetype>
-                <vsizetype>0</vsizetype>
-                <horstretch>0</horstretch>
-                <verstretch>0</verstretch>
-            </sizepolicy>
+        <property name="text">
+            <string>Save</string>
         </property>
-        <property name="maximumSize">
-            <size>
-                <width>50</width>
-                <height>15</height>
-            </size>
+        <property name="flat">
+            <bool>false</bool>
         </property>
     </widget>
 </widget>
@@ -619,13 +649,13 @@
         <slot>Callsignchanged()</slot>
     </connection>
     <connection>
-        <sender>OPName</sender>
+        <sender>OpName</sender>
         <signal>returnPressed()</signal>
         <receiver>QSOData</receiver>
         <slot>Namechanged()</slot>
     </connection>
     <connection>
-        <sender>QTHName</sender>
+        <sender>Qth</sender>
         <signal>returnPressed()</signal>
         <receiver>QSOData</receiver>
         <slot>QTHchanged()</slot>
@@ -637,7 +667,7 @@
         <slot>Locatorchanged()</slot>
     </connection>
     <connection>
-        <sender>QSOFrequency</sender>
+        <sender>QsoFrequency</sender>
         <signal>returnPressed()</signal>
         <receiver>QSOData</receiver>
         <slot>Frequencychanged()</slot>
@@ -649,7 +679,7 @@
         <slot>HisRSTchanged()</slot>
     </connection>
     <connection>
-        <sender>MineRST</sender>
+        <sender>MyRST</sender>
         <signal>returnPressed()</signal>
         <receiver>QSOData</receiver>
         <slot>MyRSTchanged()</slot>
@@ -661,7 +691,7 @@
         <slot>Datechanged()</slot>
     </connection>
     <connection>
-        <sender>QSOTime</sender>
+        <sender>QsoTime</sender>
         <signal>returnPressed()</signal>
         <receiver>QSOData</receiver>
         <slot>Timechanged()</slot>
@@ -673,13 +703,13 @@
         <slot>Callsignchanged()</slot>
     </connection>
     <connection>
-        <sender>OPName</sender>
+        <sender>OpName</sender>
         <signal>lostFocus()</signal>
         <receiver>QSOData</receiver>
         <slot>Namechanged()</slot>
     </connection>
     <connection>
-        <sender>QTHName</sender>
+        <sender>Qth</sender>
         <signal>lostFocus()</signal>
         <receiver>QSOData</receiver>
         <slot>QTHchanged()</slot>
@@ -691,7 +721,7 @@
         <slot>Locatorchanged()</slot>
     </connection>
     <connection>
-        <sender>QSOFrequency</sender>
+        <sender>QsoFrequency</sender>
         <signal>lostFocus()</signal>
         <receiver>QSOData</receiver>
         <slot>Frequencychanged()</slot>
@@ -703,7 +733,7 @@
         <slot>HisRSTchanged()</slot>
     </connection>
     <connection>
-        <sender>MineRST</sender>
+        <sender>MyRST</sender>
         <signal>lostFocus()</signal>
         <receiver>QSOData</receiver>
         <slot>MyRSTchanged()</slot>
@@ -715,7 +745,7 @@
         <slot>Datechanged()</slot>
     </connection>
     <connection>
-        <sender>QSOTime</sender>
+        <sender>QsoTime</sender>
         <signal>lostFocus()</signal>
         <receiver>QSOData</receiver>
         <slot>Timechanged()</slot>
@@ -727,13 +757,13 @@
         <slot>Callsignchanged()</slot>
     </connection>
     <connection>
-        <sender>OPName</sender>
+        <sender>OpName</sender>
         <signal>returnPressed()</signal>
         <receiver>QSOData</receiver>
         <slot>Namechanged()</slot>
     </connection>
     <connection>
-        <sender>QTHName</sender>
+        <sender>Qth</sender>
         <signal>returnPressed()</signal>
         <receiver>QSOData</receiver>
         <slot>QTHchanged()</slot>
@@ -745,7 +775,7 @@
         <slot>Locatorchanged()</slot>
     </connection>
     <connection>
-        <sender>QSOFrequency</sender>
+        <sender>QsoFrequency</sender>
         <signal>returnPressed()</signal>
         <receiver>QSOData</receiver>
         <slot>Frequencychanged()</slot>
@@ -757,7 +787,7 @@
         <slot>HisRSTchanged()</slot>
     </connection>
     <connection>
-        <sender>MineRST</sender>
+        <sender>MyRST</sender>
         <signal>returnPressed()</signal>
         <receiver>QSOData</receiver>
         <slot>MyRSTchanged()</slot>
@@ -769,15 +799,40 @@
         <slot>Datechanged()</slot>
     </connection>
     <connection>
-        <sender>QSOTime</sender>
+        <sender>QsoTime</sender>
         <signal>returnPressed()</signal>
         <receiver>QSOData</receiver>
         <slot>Timechanged()</slot>
     </connection>
+    <connection>
+        <sender>Save</sender>
+        <signal>clicked()</signal>
+        <receiver>QSOData</receiver>
+        <slot>save()</slot>
+    </connection>
+    <connection>
+        <sender>RemoteCallsign</sender>
+        <signal>lostFocus()</signal>
+        <receiver>QSOData</receiver>
+        <slot>Callsignchanged()</slot>
+    </connection>
 </connections>
+<tabstops>
+    <tabstop>RemoteCallsign</tabstop>
+    <tabstop>OpName</tabstop>
+    <tabstop>Qth</tabstop>
+    <tabstop>Loc</tabstop>
+    <tabstop>QsoFrequency</tabstop>
+    <tabstop>HisRST</tabstop>
+    <tabstop>MyRST</tabstop>
+    <tabstop>QsoDate</tabstop>
+    <tabstop>QsoTime</tabstop>
+    <tabstop>Save</tabstop>
+    <tabstop>Refresh</tabstop>
+    <tabstop>Clear</tabstop>
+</tabstops>
 <includes>
-    <include location="local" impldecl="in declaration">qsoinfo.h</include>
-    <include location="local" impldecl="in implementation">qsodata.ui.h</include>
+    <include location="local" impldecl="in declaration">constants.h</include>
 </includes>
 <variables>
     <variable access="private">QsoInfo *QsoData;</variable>
@@ -798,6 +853,8 @@
     <slot access="private" specifier="non virtual">Datechanged()</slot>
     <slot access="private" specifier="non virtual">Timechanged()</slot>
     <slot access="private" specifier="non virtual">refreshDateTime()</slot>
+    <slot access="private" specifier="non virtual">save()</slot>
+    <slot specifier="non virtual">destroy()</slot>
 </slots>
 <layoutdefaults spacing="6" margin="11"/>
 </UI>
diff --git a/src/interfaces/qsodata.ui.h b/src/interfaces/qsodata.ui.h
new file mode 100644
index 0000000..ecc6d08
--- /dev/null
+++ b/src/interfaces/qsodata.ui.h
@@ -0,0 +1,179 @@
+/****************************************************************************
+** ui.h extension file, included from the uic-generated form implementation.
+**
+** If you wish to add, delete or rename functions or slots use
+** Qt Designer which will update this file, preserving your code. Create an
+** init() function in place of a constructor, and a destroy() function in
+** place of a destructor.
+*****************************************************************************/
+
+#include "parameter.h"
+#include "crxchannel.h"
+#include <qdatetime.h>
+#include <qfile.h>
+#include <qtextstream.h>
+
+
+extern Parameter settings;
+void QSOData::init()
+{
+ if(settings.QslData)
+ {
+  RemoteCallsign->setText(settings.QslData->RemoteCallsign);
+  OpName->setText(settings.QslData->OpName);
+  Qth->setText(settings.QslData->Qth);
+  Locator->setText(settings.QslData->Locator);
+  QsoFrequency->setText(settings.QslData->QsoFrequency);
+  HisRST->setText(settings.QslData->HisRST);
+  MyRST->setText(settings.QslData->MyRST);
+  QsoDate->setText(settings.QslData->QsoDate);
+  QsoTime->setText(settings.QslData->QsoTime);  
+ }
+
+}
+
+
+void QSOData::clear()
+{
+ RemoteCallsign->setText("");
+ OpName->setText("");
+ Qth->setText("");
+ Locator->setText("");
+ QsoFrequency->setText("");
+ HisRST->setText("");
+ MyRST->setText("");
+ QsoDate->setText("");
+ QsoTime->setText("");
+}
+
+void QSOData::Callsignchanged()
+{
+ settings.QslData->RemoteCallsign=RemoteCallsign->text();
+}
+
+void QSOData::Namechanged()
+{
+ settings.QslData->OpName=OpName->text();
+}
+
+void QSOData::QTHchanged()
+{
+ settings.QslData->Qth=Qth->text();
+
+}
+
+void QSOData::Locatorchanged()
+{
+ settings.QslData->Locator=Locator->text();
+}
+
+void QSOData::Frequencychanged()
+{
+ settings.QslData->QsoFrequency=QsoFrequency->text();
+}
+
+void QSOData::HisRSTchanged()
+{
+ settings.QslData->HisRST=HisRST->text();
+}
+
+void QSOData::MyRSTchanged()
+{
+ settings.QslData->MyRST=MyRST->text();
+}
+
+void QSOData::Datechanged()
+{
+ settings.QslData->QsoDate=QsoDate->text();
+}
+
+void QSOData::Timechanged()
+{
+ settings.QslData->QsoTime=QsoTime->text();
+}
+
+
+
+
+void QSOData::refreshDateTime()
+{
+ QDateTime t1;
+ QDateTime t;
+ t=QDateTime::currentDateTime();
+
+ t1=t.addSecs(settings.timeoffset*3600);
+
+ QsoDate->setText(t.toString("d.MM.yyyy"));
+ QsoTime->setText(t1.toString("h:mm"));
+ settings.QslData->QsoTime=QsoTime->text();
+ settings.QslData->QsoDate=QsoDate->text();
+}
+
+
+void QSOData::save()
+{
+if (settings.QSOFileName == "" || RemoteCallsign->text() =="")
+ return ; // No Filename specified, or nothing relevant to store
+// Get the most recent values
+Callsignchanged();
+//Namechanged(); // Later ?, not saved at the moment
+QTHchanged(); 
+Locatorchanged();
+Frequencychanged();
+HisRSTchanged();
+MyRSTchanged();
+Datechanged();
+Timechanged();
+
+QFile f(settings.QSOFileName);
+f.open(IO_WriteOnly | IO_Append);
+QTextStream stream(&f);
+stream << "<CALL:" << RemoteCallsign->text().length() <<">" << RemoteCallsign->text() ;
+if (settings.callsign != "")
+ stream << "<OPERATOR:" <<settings.callsign.length() << ">" <<settings.callsign;
+if (Qth->text() != "")
+ stream << "<QTH:" << Qth->text().length() << ">" << Qth->text();
+if (Loc->text() != "")
+ stream << "<GRIDSQUARE:" << Loc->text().length() << ">" << Loc->text(); 
+if (QsoFrequency->text() != "")
+ stream << "<BAND:" << QsoFrequency->text().length() << ">" << QsoFrequency->text();
+if (QsoDate->text() != "")
+ stream << "<QSO_DATE:8:d>" << QDateTime::currentDateTime().toString("yyyyMMdd");
+if (QsoTime->text() !="" )
+ stream << "<TIME_ON:" << QsoTime->text().length() << ">" << QsoTime->text();
+if ( HisRST->text() != "" )
+ stream << "<RST_SENT:" << HisRST->text().length() << ">" << HisRST->text();    
+if ( MyRST->text() != "" )
+ stream << "<RST_RCVD:" << MyRST->text().length() << ">" << MyRST->text(); 
+if (settings.ActChannel != 0 )
+{
+ stream << "<MODE:";
+ switch(settings.ActChannel->getModulationType() )
+ {
+  case QPSK:
+  case BPSK:
+    stream << "5>PSK31";     
+   break;
+
+  case RTTY:
+   stream <<"4>RTTY";
+   break;
+         
+  case MFSK16:
+   stream <<"6:MFSK16";
+   break;
+         
+  default:
+   stream <<"5>PSK31";
+        }    
+}
+stream << "<eor>\n";
+f.close();
+clear(); 
+}
+void QSOData::destroy()
+{
+ if(QsoData)
+  delete QsoData;
+ QsoData=0;
+}
diff --git a/linpsk/addrxwindow.ui b/src/interfaces/renamemacro.ui
similarity index 55%
rename from linpsk/addrxwindow.ui
rename to src/interfaces/renamemacro.ui
index 859f045..f635c82 100644
--- a/linpsk/addrxwindow.ui
+++ b/src/interfaces/renamemacro.ui
@@ -1,33 +1,45 @@
-<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
-<class>AddRxWindow</class>
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>RenameMacro</class>
 <widget class="QDialog">
     <property name="name">
-        <cstring>AddRxWindow</cstring>
+        <cstring>RenameMacro</cstring>
     </property>
     <property name="geometry">
         <rect>
             <x>0</x>
             <y>0</y>
-            <width>245</width>
-            <height>199</height>
+            <width>400</width>
+            <height>300</height>
         </rect>
     </property>
+    <property name="minimumSize">
+        <size>
+            <width>400</width>
+            <height>300</height>
+        </size>
+    </property>
+    <property name="maximumSize">
+        <size>
+            <width>400</width>
+            <height>300</height>
+        </size>
+    </property>
     <property name="caption">
-        <string>Add another RxWIndow</string>
+        <string>Rename Macro</string>
     </property>
     <property name="sizeGripEnabled">
         <bool>true</bool>
     </property>
     <widget class="QLayoutWidget">
         <property name="name">
-            <cstring>layout22</cstring>
+            <cstring>layout8</cstring>
         </property>
         <property name="geometry">
             <rect>
-                <x>0</x>
-                <y>10</y>
-                <width>220</width>
-                <height>182</height>
+                <x>39</x>
+                <y>30</y>
+                <width>325</width>
+                <height>207</height>
             </rect>
         </property>
         <vbox>
@@ -36,7 +48,7 @@
             </property>
             <widget class="QLayoutWidget">
                 <property name="name">
-                    <cstring>layout20</cstring>
+                    <cstring>layout6</cstring>
                 </property>
                 <hbox>
                     <property name="name">
@@ -44,7 +56,7 @@
                     </property>
                     <widget class="QLayoutWidget">
                         <property name="name">
-                            <cstring>layout19</cstring>
+                            <cstring>layout4</cstring>
                         </property>
                         <vbox>
                             <property name="name">
@@ -52,121 +64,102 @@
                             </property>
                             <widget class="QLabel">
                                 <property name="name">
-                                    <cstring>RxWindowName</cstring>
+                                    <cstring>MHeader</cstring>
                                 </property>
-                                <property name="text">
-                                    <string>Title</string>
-                                </property>
-                            </widget>
-                            <widget class="QLabel">
-                                <property name="name">
-                                    <cstring>Modulation</cstring>
+                                <property name="minimumSize">
+                                    <size>
+                                        <width>160</width>
+                                        <height>30</height>
+                                    </size>
                                 </property>
                                 <property name="text">
-                                    <string>Mode</string>
+                                    <string>Select Macro</string>
                                 </property>
                             </widget>
-                            <widget class="QLabel">
+                            <widget class="QListBox">
                                 <property name="name">
-                                    <cstring>RxFrequency</cstring>
+                                    <cstring>MacroBox</cstring>
                                 </property>
-                                <property name="text">
-                                    <string>Rx Frequency</string>
+                                <property name="minimumSize">
+                                    <size>
+                                        <width>160</width>
+                                        <height>130</height>
+                                    </size>
+                                </property>
+                                <property name="currentItem">
+                                    <number>-1</number>
                                 </property>
                             </widget>
                         </vbox>
                     </widget>
                     <widget class="QLayoutWidget">
                         <property name="name">
-                            <cstring>layout18</cstring>
+                            <cstring>layout5</cstring>
                         </property>
                         <vbox>
                             <property name="name">
                                 <cstring>unnamed</cstring>
                             </property>
-                            <widget class="QLineEdit">
+                            <widget class="QLabel">
                                 <property name="name">
-                                    <cstring>TitleText</cstring>
+                                    <cstring>OName</cstring>
                                 </property>
-                                <property name="frameShape">
-                                    <enum>LineEditPanel</enum>
-                                </property>
-                                <property name="frameShadow">
-                                    <enum>Sunken</enum>
+                                <property name="minimumSize">
+                                    <size>
+                                        <width>150</width>
+                                        <height>30</height>
+                                    </size>
                                 </property>
                                 <property name="text">
-                                    <string></string>
+                                    <string>Old Name</string>
                                 </property>
                             </widget>
-                            <widget class="QListBox">
+                            <widget class="QLineEdit">
                                 <property name="name">
-                                    <cstring>RxMode</cstring>
+                                    <cstring>OldName</cstring>
                                 </property>
-                                <property name="sizePolicy">
-                                    <sizepolicy>
-                                        <hsizetype>7</hsizetype>
-                                        <vsizetype>0</vsizetype>
-                                        <horstretch>0</horstretch>
-                                        <verstretch>0</verstretch>
-                                    </sizepolicy>
+                                <property name="minimumSize">
+                                    <size>
+                                        <width>150</width>
+                                        <height>30</height>
+                                    </size>
                                 </property>
-                                <property name="vScrollBarMode">
-                                    <enum>AlwaysOn</enum>
-                                </property>
-                                <property name="hScrollBarMode">
-                                    <enum>AlwaysOff</enum>
-                                </property>
-                                <property name="currentItem">
-                                    <number>-1</number>
-                                </property>
-                                <property name="columnMode">
-                                    <enum>FixedNumber</enum>
-                                </property>
-                                <property name="rowMode">
-                                    <enum>Variable</enum>
+                                <property name="readOnly">
+                                    <bool>true</bool>
                                 </property>
                             </widget>
-                            <widget class="QSpinBox">
+                            <widget class="QLabel">
                                 <property name="name">
-                                    <cstring>Frequency</cstring>
+                                    <cstring>NName</cstring>
                                 </property>
-                                <property name="suffix">
-                                    <string>Hz</string>
+                                <property name="minimumSize">
+                                    <size>
+                                        <width>150</width>
+                                        <height>30</height>
+                                    </size>
                                 </property>
-                                <property name="maxValue">
-                                    <number>2500</number>
+                                <property name="text">
+                                    <string>NewName</string>
                                 </property>
-                                <property name="minValue">
-                                    <number>300</number>
+                            </widget>
+                            <widget class="QLineEdit">
+                                <property name="name">
+                                    <cstring>NewName</cstring>
                                 </property>
-                                <property name="value">
-                                    <number>1000</number>
+                                <property name="minimumSize">
+                                    <size>
+                                        <width>150</width>
+                                        <height>30</height>
+                                    </size>
                                 </property>
                             </widget>
                         </vbox>
                     </widget>
                 </hbox>
             </widget>
-            <spacer>
-                <property name="name">
-                    <cstring>spacer11</cstring>
-                </property>
-                <property name="orientation">
-                    <enum>Vertical</enum>
-                </property>
-                <property name="sizeType">
-                    <enum>Expanding</enum>
-                </property>
-                <property name="sizeHint">
-                    <size>
-                        <width>20</width>
-                        <height>40</height>
-                    </size>
-                </property>
-            </spacer>
             <widget class="QLayoutWidget">
                 <property name="name">
-                    <cstring>layout21</cstring>
+                    <cstring>layout7</cstring>
                 </property>
                 <hbox>
                     <property name="name">
@@ -176,28 +169,22 @@
                         <property name="name">
                             <cstring>buttonOk</cstring>
                         </property>
-                        <property name="focusPolicy">
-                            <enum>ClickFocus</enum>
-                        </property>
                         <property name="text">
-                            <string>OK</string>
+                            <string>&OK</string>
                         </property>
                         <property name="accel">
                             <string></string>
                         </property>
                         <property name="autoDefault">
-                            <bool>false</bool>
+                            <bool>true</bool>
                         </property>
                         <property name="default">
-                            <bool>false</bool>
-                        </property>
-                        <property name="flat">
-                            <bool>false</bool>
+                            <bool>true</bool>
                         </property>
                     </widget>
                     <spacer>
                         <property name="name">
-                            <cstring>spacer3</cstring>
+                            <cstring>spacer2</cstring>
                         </property>
                         <property name="orientation">
                             <enum>Horizontal</enum>
@@ -207,7 +194,7 @@
                         </property>
                         <property name="sizeHint">
                             <size>
-                                <width>40</width>
+                                <width>120</width>
                                 <height>20</height>
                             </size>
                         </property>
@@ -216,17 +203,14 @@
                         <property name="name">
                             <cstring>buttonCancel</cstring>
                         </property>
-                        <property name="focusPolicy">
-                            <enum>ClickFocus</enum>
-                        </property>
                         <property name="text">
-                            <string>Cancel</string>
+                            <string>&Cancel</string>
                         </property>
                         <property name="accel">
                             <string></string>
                         </property>
                         <property name="autoDefault">
-                            <bool>false</bool>
+                            <bool>true</bool>
                         </property>
                     </widget>
                 </hbox>
@@ -238,22 +222,36 @@
     <connection>
         <sender>buttonOk</sender>
         <signal>clicked()</signal>
-        <receiver>AddRxWindow</receiver>
+        <receiver>RenameMacro</receiver>
         <slot>accept()</slot>
     </connection>
     <connection>
         <sender>buttonCancel</sender>
         <signal>clicked()</signal>
-        <receiver>AddRxWindow</receiver>
+        <receiver>RenameMacro</receiver>
         <slot>reject()</slot>
     </connection>
+    <connection>
+        <sender>MacroBox</sender>
+        <signal>highlighted(int)</signal>
+        <receiver>RenameMacro</receiver>
+        <slot>selectMacro(int)</slot>
+    </connection>
 </connections>
 <includes>
-    <include location="local" impldecl="in declaration">constants.h</include>
-    <include location="local" impldecl="in implementation">addrxwindow.ui.h</include>
+    <include location="local" impldecl="in implementation">renamemacro.ui.h</include>
 </includes>
+<forwards>
+    <forward>class Macros</forward>
+</forwards>
+<variables>
+    <variable>Macros * AllMacros;</variable>
+    <variable>int MacroNumber;</variable>
+</variables>
 <slots>
-    <slot specifier="non virtual">init()</slot>
+    <slot>init( Macros * M )</slot>
+    <slot>selectMacro( int number )</slot>
+    <slot>accept()</slot>
 </slots>
-<layoutdefaults spacing="6" margin="7"/>
+<layoutdefaults spacing="6" margin="11"/>
 </UI>
diff --git a/src/interfaces/renamemacro.ui.h b/src/interfaces/renamemacro.ui.h
new file mode 100644
index 0000000..eed891d
--- /dev/null
+++ b/src/interfaces/renamemacro.ui.h
@@ -0,0 +1,46 @@
+/****************************************************************************
+** ui.h extension file, included from the uic-generated form implementation.
+**
+** If you wish to add, delete or rename functions or slots use
+** Qt Designer which will update this file, preserving your code. Create an
+** init() function in place of a constructor, and a destroy() function in
+** place of a destructor.
+*****************************************************************************/
+#include "macros.h"
+#include <vector>
+
+#include <qmessagebox.h>
+
+
+//using namespace std;
+
+void RenameMacro::init(Macros *M)
+{
+int anzahl,i;  
+AllMacros=M;
+anzahl=AllMacros->count();
+if ( anzahl > 0 )
+ for(i=0; i < anzahl; i++)
+  MacroBox->insertItem(M->getMacroName(i));
+
+}
+
+void RenameMacro::selectMacro(int number)
+{
+MacroNumber=number;
+OldName->setText(MacroBox->text(MacroNumber));
+}
+
+void RenameMacro::accept()
+{
+if (NewName->text().length() ==0 )
+ {
+  QMessageBox::warning(this,
+  "Error", "New Name of Macro is missing. \n Enter new Name of  Macro",QMessageBox::Ok,NoButton,NoButton);
+    return;
+ }
+else 
+ AllMacros->setMacroName(NewName->text(),MacroNumber);
+QDialog::accept();  
+    
+}
diff --git a/linpsk/interleaver.cpp b/src/interleaver.cpp
similarity index 100%
rename from linpsk/interleaver.cpp
rename to src/interleaver.cpp
diff --git a/linpsk/interleaver.h b/src/interleaver.h
similarity index 100%
rename from linpsk/interleaver.h
rename to src/interleaver.h
diff --git a/linpsk/linpsk.cpp b/src/linpsk.cpp
similarity index 66%
rename from linpsk/linpsk.cpp
rename to src/linpsk.cpp
index 9f5226d..41db952 100644
--- a/linpsk/linpsk.cpp
+++ b/src/linpsk.cpp
@@ -50,7 +50,7 @@
 #include "ctxfunctions.h"
 #include "parameter.h"
 #include "addrxwindow.h"
-#include "cspectrumdisplay.h"
+#include "spectrumdisplay.h"
 #include "frequencyselect.h"
 #include "cledbutton.h"
 #include "rttymodulator.h"
@@ -65,16 +65,32 @@
 #include "waveinput.h"
 #include "csound.h"
 #include "generalsettings.h"
-#include "utils.h"
 #include "modemenu.h"
 #include "macrowindow.h"
 #include "addmacro.h"
+#include "deletemacro.h"
 #include "macros.h"
 #include "qsodata.h"
 #include "editmacro.h"
+#include "deletemacro.h"
+#include "renamemacro.h"
 #include "color.h"
 #include "crecording.h"
+#include "portaudio.h"
+
+#ifdef HAVE_CONFIG
 #include "config.h"
+#else
+#define VERSION "0.8.1"
+#endif
+
+#ifdef LINPSK_FOR_MAC
+
+#define ProgramName "DarwinPSK "
+#else
+
+#define ProgramName "LinPSK "
+#endif
 
 extern Parameter settings;
 /* 
@@ -88,41 +104,49 @@ LinPSK::LinPSK( QWidget* parent, const char* name, WFlags fl )
    RxDisplay = 0;
    TxDisplay = 0;
    Control = 0;
+   Sound = 0;
+   if (Pa_Initialize() == paNoError ) 
+        {        
+         settings.isInitialized=true;
+         settings.setupDevices();
+	}
+   else
+    QMessageBox::warning(0,ProgramName,
+        "Could not initialize Soundsystem.\nCheck, if audiodevice is in use");	
+   SaveParameters= new Parameter();
+
    Macro =new Macros(); // Macros will be used in read_config  
       if (! read_config())
-      QMessageBox::information(0,"LinPsk",
+      QMessageBox::information(0,ProgramName,
         "LinPSK.config not found, using default values\nFile will be generated if you save the settings");
-    if(WindowColors.size() == 0 )
-      WindowColors.push_back(color[0]);
-    Modulator = 0;
-    setCentralWidget( new QWidget( this, "LinPsk 0.7.1" ) );
-    centralWidget()->setMinimumSize(settings.MinimumWindowWidth,settings.MinimumWindowHeight);
-    centralWidget()->setMaximumSize( 950, 700  );
-    setMaximumSize(950,690);
-#ifndef LINPSK_FOR_MAC
-    setCaption(QString ("LinPSK " ) + QString(VERSION));
-#else
-    setCaption(QString ("DarwinPSK ") + QString(VERSION) );
-#endif            
-
-    apply_settings();
-    QStatusBar *StatusBar=this->statusBar();
-    StatusBar->setFixedHeight(settings.StatusBarHeight);
+  	
+    if (settings.ApplicationFont == 0)
+     {
+      settings.ApplicationFont = new QFont(qApp->font().family());
+      settings.ApplicationFont->setPixelSize(10); 
+      qApp->setFont(*settings.ApplicationFont,true);           
+     }
+    else
+      qApp->setFont(*settings.ApplicationFont,true);  
+
+// Save Settings to be able to make local modifications
+*SaveParameters=settings;
+   
+if(WindowColors.size() == 0 )
+  WindowColors.push_back(color[0]);
+ Modulator = 0;
+ setCentralWidget( new QWidget( this,QString(ProgramName) +QString( VERSION)) );
+ centralWidget()->setMinimumSize(settings.MinimumWindowWidth,settings.MinimumWindowHeight);
+
+ setCaption(QString (ProgramName) + QString(VERSION));
+// Create Statusbar
+ QStatusBar *StatusBar=this->statusBar();
+ StatusBar->setFixedHeight(settings.StatusBarHeight);
 
 //Messages
-	msg=new QLabel(StatusBar);
-	StatusBar->addWidget(msg,2,true);
-	msg->setText(tr("Ready"));
-
-//AFC- Debugging
-#ifdef AFC_DEBUG
-	Error = new QLabel(StatusBar);
-	StatusBar -> addWidget(Error,1,true);
-	Df = new QLabel(StatusBar);
-	StatusBar -> addWidget(Df,1,true);
-	Dp = new QLabel(StatusBar);
-	StatusBar -> addWidget(Dp,1,true);
-#endif
+  msg=new QLabel(StatusBar);
+  StatusBar->addWidget(msg,2,true);
+  msg->setText(tr("Ready"));
 
 // IMD
 IMD = new QLabel(StatusBar);
@@ -130,11 +154,11 @@ StatusBar -> addWidget(IMD,1,true);
 
 
 //Clockadjust
-#ifndef AFC_DEBUG
+/** Never needed
 clockadj=new QLabel(StatusBar);
 clockadj->setText("CLK ppm = 0");
 StatusBar->addWidget(clockadj,1,true);
-#endif
+**/
 // Time
 zeit=new QLabel(StatusBar);
 StatusBar->addWidget(zeit,1,true);
@@ -149,16 +173,14 @@ QTimer *clock=new QTimer(this);
 connect(clock,SIGNAL(timeout()),SLOT(setclock()));
 clock->start(60000,false);
 
+ RxDisplay = new CRxDisplay( centralWidget(), "RxDisplay" );
+ RxDisplay->setColorList(&WindowColors);
+ TxDisplay = new CTxDisplay( centralWidget(), "TxDisplay" );
 
+ Control = new ControlPanel( centralWidget(), "Control" );
 
-    RxDisplay = new CRxDisplay( centralWidget(), "RxDisplay" );
-    RxDisplay->setColorList(&WindowColors);
-    TxDisplay = new CTxDisplay( centralWidget(), "TxDisplay" );
-
-    Control = new ControlPanel( centralWidget(), "Control" );
-    Control->SpectrumDisplay->setInputPointer(RxDisplay->FFTValues());
-    Control->SpectrumDisplay->setColorList(&WindowColors);
-    Control->MacroBox->updateMacroWindow(Macro);
+ Control->Display->setColorList(&WindowColors);
+ Control->MacroBox->updateMacroWindow(Macro);
 
     // actions
     // ================= File Actions ========
@@ -172,10 +194,12 @@ clock->start(60000,false);
     // ================= Settings =================    
     General_Settings = new QAction( this, "General_Settings" );
     AddMacros = new QAction( this, "AddMacros" );
+    EditMacros = new QAction( this, "EditMacros" );
+    DeleteMacros = new QAction(this, "DeleteMacros");
+    RenameMacros = new QAction(this, "RenameMacros"); 
     FontSettings = new QAction( this, "FontSettings" );
     ColorSettings = new QAction( this, "ColorSettings" );
-    EditMacros = new QAction( this, "EditMacros" );
-//    EditFiles = new QAction( this, "EditFiles" );
+    
     SaveSettings = new QAction( this, "SaveSettings" );
     //================Actions for RX Window ===========
     Clear_RxWindow = new QAction (this,"Clear_Rx_Window");
@@ -196,12 +220,18 @@ clock->start(60000,false);
     editMenu = new QPopupMenu( this );
     // Settings Menu
     General_Settings->addTo( editMenu );
+    
+    editMenu->insertSeparator();
     AddMacros->addTo( editMenu );
+    EditMacros->addTo( editMenu );
+    DeleteMacros->addTo( editMenu );
+    RenameMacros->addTo( editMenu );
     editMenu->insertSeparator();
+    
     FontSettings->addTo( editMenu );
     ColorSettings->addTo( editMenu );
-    editMenu->insertSeparator();
-    EditMacros->addTo( editMenu );
+    
+
 //    EditFiles->addTo( editMenu );
     editMenu->insertSeparator();
     SaveSettings->addTo( editMenu );
@@ -234,11 +264,18 @@ clock->start(60000,false);
     connect( add_Rx_Window, SIGNAL( activated() ), this, SLOT( addRxWindow() ) );
 //=================================Settings Menu==================
     connect( General_Settings, SIGNAL( activated() ),this, SLOT(generalSettings() ) );
-    connect( AddMacros,SIGNAL( activated() ), this, SLOT(addMacro()));
+    
+    connect( AddMacros     , SIGNAL( activated() ), this, SLOT(addMacro()    ) );
+    connect( EditMacros    , SIGNAL( activated() ), this, SLOT(editMacro()   ) );
+    connect( DeleteMacros  , SIGNAL( activated() ), this, SLOT(deleteMacro() ) );
+    connect( RenameMacros  , SIGNAL( activated() ), this, SLOT(renameMacro() ) );
+//===============================================================================    
     connect( ColorSettings   , SIGNAL( activated() ),this, SLOT(chooseColor() ) );
     connect( FontSettings    , SIGNAL( activated() ),this, SLOT(FontSetup()   ) );
-    connect( EditMacros      , SIGNAL( activated() ),this, SLOT(editMacro()   ) );
+
     connect( SaveSettings    , SIGNAL( activated() ),this, SLOT(saveSettings() ));
+//================================= Help Menu ====================================
+    connect( helpAboutAction , SIGNAL( activated() ),this, SLOT(HelpAbout() ));
 //================================= Rx Parames ===================
     connect ( ChangeRxMode   , SIGNAL( activated() ),this, SLOT(setRxMode()));
     connect ( Clear_RxWindow , SIGNAL( activated() ),settings.ActChannel, SLOT(clearRxWindow()));
@@ -248,17 +285,20 @@ clock->start(60000,false);
     connect(Macro,SIGNAL(StartRx()),this,SLOT(startRx()));
     connect(Macro,SIGNAL(StartTx()),this,SLOT(startTx()));
 
-    connect(RxDisplay,SIGNAL(startPlotting()),Control->SpectrumDisplay,SLOT(startPlot()));
-    connect(Control->SpectrumDisplay,SIGNAL(FrequencyChanged(double)),RxDisplay->RxFreq,SLOT(setFrequency(double)));
-    connect(Control->SpectrumDisplay,SIGNAL(new_IMD(float)),this,SLOT(setIMD(float)));
+    connect(RxDisplay,SIGNAL(startPlotting(double *, bool)), Control->Display,SLOT(startPlot(double *, bool )));
+    connect(Control->Display,SIGNAL(FrequencyChanged(double)),RxDisplay->RxFreq,SLOT(setFrequency(double)));
+    connect(RxDisplay,SIGNAL(new_IMD(float)),this,SLOT(setIMD(float)));
     connect(Control->MacroBox,SIGNAL(callMacro(int)),this,SLOT(executeMacro(int)));
     connect(RxDisplay,SIGNAL(newActiveChannel()),this,SLOT(setChannelParams()));
     connect(RxDisplay->Recording->Record,SIGNAL(toggled(bool)),this,SLOT(recording(bool)));
 //===================================================================
+
 TxBuffer = new CTxBuffer();
 TxDisplay->TxWindow->setTxBuffer(TxBuffer);
 TxTimer = new QTimer(this);
 connect(TxTimer,SIGNAL(timeout()),this,SLOT(process_txdata()));
+apply_settings();
+
 }
 
 /*
@@ -266,6 +306,7 @@ connect(TxTimer,SIGNAL(timeout()),this,SLOT(process_txdata()));
  */
 LinPSK::~LinPSK()
 {
+   
     // no need to delete child widgets, Qt does it all for us
 }
 
@@ -301,6 +342,8 @@ void LinPSK::languageChange()
     FontSettings->setText( tr( "Font Settings" ) );
     ColorSettings->setText( tr( "Color Settings" ) );
     EditMacros->setText( tr( "Edit Macro" ) );
+    DeleteMacros->setText( tr("Delete Macro") );
+    RenameMacros->setText( tr("Rename Macro") );
 //    EditFiles->setText( tr( "Edit Files" ) );
     SaveSettings->setText( tr( "Save Settings" ) );
 // Rx Params
@@ -324,8 +367,21 @@ QString fileName;
 
 void LinPSK::Exit()
 {
-    qApp->quit();
-
+if (settings.Status == ON ) // We arejust transmitting
+ {
+  QMessageBox::information(0,ProgramName,
+    "You should stop transmitting before closing this window!");
+   return;  
+ }
+else
+ {
+  if (RxDisplay != 0)
+   RxDisplay->stop_process_loop();  
+  settings=*SaveParameters;
+  save_config();
+  qApp->quit();
+  return;
+  }  
 }
 
 void LinPSK::helpIndex()
@@ -346,18 +402,23 @@ void LinPSK::helpAbout()
 
 void LinPSK::addRxWindow()
 {
-
 AddRxWindow *Channel=new AddRxWindow();
 if ( Channel->exec() != 0)
   {
+  AfcMode modus;
+  modus=RxDisplay->RxFreq->getAfcMode();
+  settings.ActChannel->setAfcMode(modus);
   if (WindowColors.size() <= settings.RxChannels )  
-    WindowColors.push_back(color[(settings.RxChannels*51)% 256]);  
+    WindowColors.push_back(color[(settings.RxChannels*51)% 256]);
+  Mode rxmode = (Mode) Channel->RxMode->currentItem();
+     
   RxDisplay->addRxWindow(Channel->Frequency->value(),
-                         (Mode) Channel->RxMode->currentItem(),
+                         rxmode,
                          Channel->TitleText->text());
 
   settings.ActChannel->setWindowColor(WindowColors.at(settings.RxChannels));
-  settings.RxChannels++;  
+  settings.RxChannels++;
+  RxDisplay->RxFreq->setAfcDisplayMode(settings.ActChannel->AfcProperties());
   }
 
 }
@@ -372,7 +433,11 @@ void LinPSK::calculateSizeofComponents()
 /** TXDisplay **/
 #define TXPART 20
 /** Controlpanel **/
+#ifndef LINPSK_FOR_MAC
 #define CONTROLPART 35
+#else
+#define CONTROLPART 40
+#endif
 /** Statuspart **/
 #define STATUSPART 3
 int width,height;
@@ -444,12 +509,37 @@ else
      Sound->PTT(false); 
     if (RxDisplay->start_process_loop())
      {
+      QString Info; 
       TxDisplay->TxFunctions->RXTX->setStatus(OFF);
-      msg->setText(tr("Receiving"));
+      if (settings.ActChannel != 0 )
+       switch(settings.ActChannel->getModulationType() )
+        {
+         case QPSK:
+         Info="QPSK";
+         break;
+         
+         case BPSK:
+         Info="BPSK";
+         break;
+
+         case RTTY:
+         Info="RTTY";
+         break;
+         
+         case MFSK16:
+         Info="MFSK16";
+         break;
+
+         
+         default:
+         Info="undefined";
+        }
+          
+      msg->setText(tr("Receiving ")+Info);
      } 
     else
     TxDisplay->TxFunctions->RXTX->setStatus(UNDEF);
-   Control->SpectrumDisplay->show(); 
+   Control->Display->show(); 
   }
 settings.Status=TxDisplay->TxFunctions->RXTX->getstatus();  
 }
@@ -470,7 +560,7 @@ if (settings.ActChannel == 0 )
    return;
   }
 ModulationType = settings.ActChannel->getModulationType();
-if (TxDisplay->TxFreq->State()) // net ?
+if (TxDisplay->TxFreq->getAfcMode() != Off) // net ?
   TxDisplay->TxFreq->setFrequency(settings.ActChannel->getRxFrequency());
 Frequency=TxDisplay->TxFreq->getFrequency();
 switch (ModulationType)
@@ -486,6 +576,8 @@ switch (ModulationType)
 
   case RTTY:
     Modulator = new RTTYModulator(11025,Frequency,TxBuffer);
+    if(settings.ActChannel->getParameter(Extra) != 0)
+     Modulator->setParameter(Extra,settings.ActChannel->getParameter(Extra));
     Info="RTTY";
     break;
   case MFSK16:
@@ -508,34 +600,36 @@ if (settings.DemoMode)
      msg->setText(tr("Transmitting (Demo)")); 
   }
 else
-  {
-   settings.inputFilename=settings.SoundDevice; 
    Sound = new CSound(settings.serial);
-  } 
+
 if ( Sound <= 0 )
   {
-    QMessageBox::critical(0," Programm Error! LinPsk","Could not open Sound Device for Output");
+    QMessageBox::critical(0," Programm Error! LinPsk","Could not create Sound Device for Output");
     TxDisplay->TxFunctions->RXTX->setStatus(ON);
     return;
   }
 
-Sound->open_Device_write(settings.inputFilename);
-if (!Sound->setParams(&errorstring))
+if (!Sound->open_Device_write(&errorstring))
   {
-    QMessageBox::information(0,"LinPsk",errorstring);
-    TxDisplay->TxFunctions->RXTX->setStatus(ON);
+    QMessageBox::information(0,ProgramName,errorstring);
+//    TxDisplay->TxFunctions->RXTX->setStatus(UNDEF);
+    stopTx();
     return;
   }
 
 connect(Modulator,SIGNAL(charSend(char)),settings.ActChannel,SLOT(updateRx(char)));
-TxTimer->start(300,false);
+TxTimer->start(200,false);
 TxDisplay->TxFunctions->RXTX->setStatus(ON);
-Txcount=BUF_SIZE;
-Sound->PTT(true);
 msg->setText(tr("Transmitting ")+Info);
 TxDisplay->TxWindow->setFocus();
 settings.Status=TxDisplay->TxFunctions->RXTX->getstatus();
-Control->SpectrumDisplay->hide();
+Control->Display->hide();
+
+Txcount=BUF_SIZE;
+process_txdata(); // Generate first Sample
+process_txdata();
+process_txdata();
+Sound->PTT(true);
 }
 
 void LinPSK::process_txdata()
@@ -545,12 +639,18 @@ int length;
 if (Txcount >0)
   {
    length = Modulator->CalcSignal(Output,BUF_SIZE);
-   if (length < 0)
+   if (length <= 0)
      {
+
        length = -length;
-       while ( (Txcount=Sound->putSamples(Output,length)) == 0 )
-         qApp->processEvents(100);
-       stopTx();
+       while (length < BUF_SIZE)
+        Output[length++] = 0.0;
+       length=BUF_SIZE;
+       TxTimer->stop();
+        while ( (Txcount=Sound->putSamples(Output,length)) == 0 )
+	 usleep(10000);
+        
+       stopTx(); 
        return;  
       }
    }     
@@ -567,7 +667,6 @@ void LinPSK::generalSettings()
 GeneralSettings *LocalSettings=new GeneralSettings(this);
 if ( LocalSettings->exec() != 0)
   settings = LocalSettings->getSettings();
-delete LocalSettings;
 apply_settings();  
 }
 void LinPSK::chooseColor()
@@ -588,42 +687,129 @@ void LinPSK::FontSetup()
 bool ok;
 QFont f=QFontDialog::getFont(&ok,font(),this);
 if (ok)
+ {
+  settings.ApplicationFont->setFamily(f.family());
+ int ii=f.pixelSize();
+ if (ii <= 0)
+ {
+  ii=f.pointSize();
+  settings.ApplicationFont->setPointSize(ii);
+ }
+ else
+  settings.ApplicationFont->setPixelSize(ii);  
+
   qApp->setFont(f,true);
+ } 
 }
 void LinPSK::stopTx()
 {
-   TxTimer->stop();
-   Modulator->disconnect();
-   delete Modulator;
-   Modulator = 0;
+TxTimer->stop();
+Modulator->disconnect();
+
 if ( Sound != 0)
   Sound->close_Device();
+delete Modulator;
+Modulator = 0;  
 startRx();  
 }
 
 void LinPSK::apply_settings()
 {
-setVolume(settings.InputSource,settings.InputVolume);
-setOutputVolume(settings.OutputVolume);
-selectPTTDevice();    
+selectPTTDevice();
+//if(settings.ActualInputDevice >= 0)
+//	if ( setVolume(settings.InputDevices[settings.ActualInputDevice],true,settings.InputVolume) != paNoError)
+//   QMessageBox::critical(0," Error Mixer Device for Input","Cant't set Input Volume.\nCheck Permissions or use Mixer Application");    
+//if (settings.ActualOutputDevice >= 0)
+//	if (  
+//setVolume(settings.OutputDevices[settings.ActualOutputDevice],false,settings.OutputVolume) != paNoError)
+//   QMessageBox::critical(0," Error Mixer Device for Output","Can't set Output Volume. \nCheck Permissions or use Mixer Application");
+
 }
 void LinPSK::setChannelParams()
 {
-Control->SpectrumDisplay->setPhasePointer(settings.ActChannel->getPhasePointer());
+Control->Display->setPhasePointer(settings.ActChannel->getPhasePointer());
 Clear_RxWindow->disconnect();
 Control->QSO->init();
 connect ( Clear_RxWindow , SIGNAL( activated() ),settings.ActChannel, SLOT(clearRxWindow()));
+
+if (settings.ActChannel != 0 )
+ {
+   QString Info;
+   switch(settings.ActChannel->getModulationType() )
+        {
+
+         case QPSK:
+         Info="QPSK";
+         break;
+
+         case BPSK:
+         Info="BPSK";
+         break;
+
+         case RTTY:
+         Info="RTTY";
+         break;
+
+         case MFSK16:
+         Info="MFSK16";
+         break;
+
+ //        case RTTY2:
+ //        Info="RTTY2";
+ //        break;
+
+
+         default:
+         Info="undefined";
+        }
+      RxDisplay->RxFreq->setAfcDisplayMode(settings.ActChannel->AfcProperties());
+      msg->setText(tr("Receiving ")+Info);
+ }
 }
 void LinPSK::setRxMode()
 {
-ModeMenu *Menu = new ModeMenu();
- if ( Menu->exec() != 0)
+ QString Info; 
+ModeMenu Menu ;
+ExtraParameter *Param;
+Param = (ExtraParameter *) settings.ActChannel->getParameter(Extra);
+if (Param != 0)
+ Menu.setParameter(*Param); 
+ if ( Menu.exec() != 0)
   {
-    settings.ActChannel->setMode((Mode) Menu->RxMode->currentItem());
-    Control->SpectrumDisplay->setPhasePointer(settings.ActChannel->getPhasePointer());
-  }  
+    Mode rxmode = (Mode) Menu.RxMode->currentItem();
+    settings.ActChannel->setMode(rxmode);
+    RxDisplay->RxFreq->setAfcDisplayMode(settings.ActChannel->AfcProperties());
+    RxDisplay->RxFreq->setAfcMode(settings.ActChannel->getAfcMode());
+    Control->Display->setPhasePointer(settings.ActChannel->getPhasePointer());
+    settings.ActChannel->setParameter(Extra,&Menu.getParameter());    
+  }
+ if (settings.ActChannel != 0 )
+  switch(settings.ActChannel->getModulationType() )
+  {
+   case QPSK:
+    Info="QPSK";
+    break;
+    
+   case BPSK:
+    Info="BPSK";
+    break;
+    
+   case RTTY:
+    Info="RTTY";
+    break;
+    
+   case MFSK16:
+    Info="MFSK16";
+    break;
+    
+   default:
+    Info="undefined";
+  }
+   
+   msg->setText(tr("Receiving ")+Info); 
 }
-void LinPSK::saveSettings()
+
+void LinPSK::save_config()
 {
 QFile ConfigFile("LinPSKConfig.xml");
 if( QDir::setCurrent(QDir::homeDirPath()) )
@@ -636,17 +822,37 @@ if( QDir::setCurrent(QDir::homeDirPath()) )
 /** Windows Parameter **/      
       QDomElement Element=Configuration.createElement("WindowsParameter");
       root.appendChild(Element);
+
       QDomElement MinimumWindowWidth=Configuration.createElement("MinimumWindowWidth");
       Element.appendChild(MinimumWindowWidth);
       MinimumWindowWidth.setAttribute("Value",settings.MinimumWindowWidth);
+
+      QDomElement WindowWidth=Configuration.createElement("WindowWidth");
+      Element.appendChild(WindowWidth);
+      WindowWidth.setAttribute("Value",width());
+      
       QDomElement MinimumWindowHeight=Configuration.createElement("MinimumWindowHeight");
       Element.appendChild(MinimumWindowHeight);
       MinimumWindowHeight.setAttribute("Value",settings.MinimumWindowHeight);
+      
+      QDomElement Xpos=Configuration.createElement("Xpos");
+      Element.appendChild(Xpos);
+      Xpos.setAttribute("Value",this->x());
+
+      QDomElement Ypos=Configuration.createElement("Ypos");
+      Element.appendChild(Ypos);
+      Ypos.setAttribute("Value",this->y());
+
+      QDomElement WindowHeight=Configuration.createElement("WindowHeight");
+      Element.appendChild(WindowHeight);
+      WindowHeight.setAttribute("Value",height());
+      
       QDomElement StatusBarHeight=Configuration.createElement("StatusBarHeight");
       Element.appendChild(StatusBarHeight);
       StatusBarHeight.setAttribute("Value",settings.StatusBarHeight);
       QDomElement Windowfont=Configuration.createElement("Font");
       Element.appendChild(Windowfont);
+      
       Windowfont.setAttribute("Name",qApp->font().family());
       Windowfont.setAttribute("Size",qApp->font().pointSize());
 /** Colors **/
@@ -671,7 +877,7 @@ if( QDir::setCurrent(QDir::homeDirPath()) )
       else
         DemoMode.setAttribute("DemoMode","false");
       DemoMode.setAttribute("DemoTypeNumber",settings.DemoTypeNumber);
-      
+ //Operating     
       QDomElement Operating=Configuration.createElement("Operating");
       root.appendChild(Operating);
       QDomElement Callsign=Configuration.createElement("Callsign");
@@ -680,8 +886,11 @@ if( QDir::setCurrent(QDir::homeDirPath()) )
 
       QDomElement Ptt=Configuration.createElement("PTT");
       Operating.appendChild(Ptt);
-      Ptt.setAttribute("Value",settings.ptt);
       Ptt.setAttribute("Device",settings.SerialDevice);
+      QDomElement QsoFile=Configuration.createElement("QsoFile");
+      Operating.appendChild(QsoFile);
+      QsoFile.setAttribute("FileName",settings.QSOFileName);
+      
       QDomElement TimeOffset=Configuration.createElement("Timeoffset");
       Operating.appendChild(TimeOffset);
       TimeOffset.setAttribute("Value",settings.timeoffset);
@@ -692,11 +901,22 @@ if( QDir::setCurrent(QDir::homeDirPath()) )
        Slashed0.setAttribute("Value","true");
       else 
        Slashed0.setAttribute("Value","false");
-
-      QDomElement InputSource=Configuration.createElement("InputSource");
-      Operating.appendChild(InputSource);
-      InputSource.setAttribute("Value",settings.InputSource);
+ if(settings.ActualInputDevice >= 0 )
+   { 
+      QDomElement InputDevice=Configuration.createElement("InputDevice");
+      Operating.appendChild(InputDevice);
+      InputDevice.setAttribute("Value",settings.ActualInputDevice);
+    }
+ if(settings.ActualOutputDevice >= 0 )
+   { 
+      QDomElement OutputDevice=Configuration.createElement("OutputDevice");
+      Operating.appendChild(OutputDevice);
+      OutputDevice.setAttribute("Value",settings.ActualOutputDevice);
+    }  
+     
+      /** To be changed
       InputSource.setAttribute("Device",settings.SoundDevice);
+  **/ 
       
       QDomElement InputVolume=Configuration.createElement("InputVolume");
       Operating.appendChild(InputVolume);
@@ -705,23 +925,26 @@ if( QDir::setCurrent(QDir::homeDirPath()) )
       QDomElement OutputVolume=Configuration.createElement("OutputVolume");
       Operating.appendChild(OutputVolume);
       OutputVolume.setAttribute("Value",settings.OutputVolume);
-       if ( Macro->MacroNames.size() > 0 )
+   
+  
+      
+       if ( (Macro->count() > 0)  )
         {
          QDomElement Macrosection=Configuration.createElement("Macros");
          root.appendChild(Macrosection);
-         for(unsigned int i=0; i<Macro->MacroNames.size();i++)
+         for(unsigned int i=0; i<Macro->count();i++)
           {
             QDomElement Macrodefinition=Configuration.createElement("Macro");
             Macrosection.appendChild(Macrodefinition);
             QDomElement Name=Configuration.createElement("Name");
             Macrodefinition.appendChild(Name);
-            Name.appendChild(Configuration.createTextNode(Macro->MacroNames[i]));
+            Name.appendChild(Configuration.createTextNode(Macro->getMacroName(i)));
             QDomElement Definition=Configuration.createElement("Definition");
             Macrodefinition.appendChild(Definition);
-            Definition.appendChild(Configuration.createTextNode(Macro->MacroText[i]));
+            Definition.appendChild(Configuration.createTextNode(Macro->getDefinition(i)));
             QDomElement Accelerator=Configuration.createElement("Accelerator");
             Macrodefinition.appendChild(Accelerator);
-            Accelerator.appendChild(Configuration.createTextNode(Macro->Accelerator[i]));
+            Accelerator.appendChild(Configuration.createTextNode(Macro->getAccelerator(i)));
             
           }
            
@@ -757,7 +980,7 @@ if ( NewMacro->exec() !=0 )
 }
 void LinPSK::editMacro()
 {
- if ( Macro->MacroNames.size() > 0 )
+ if ( Macro->count() > 0 )
   {  
     EditMacro *Edit = new EditMacro();
     Edit->init(Macro);
@@ -765,12 +988,36 @@ void LinPSK::editMacro()
       Control->MacroBox->updateMacroWindow(Macro);
    }   
 }
+void LinPSK::deleteMacro()
+{
+ if ( Macro->count() > 0 )
+  {
+   DeleteMacro *Del = new DeleteMacro();
+   Del->init(Macro);
+   if ( Del->exec() != 0 )
+    Control->MacroBox->updateMacroWindow(Macro);
+  }
+}
+void LinPSK::renameMacro()
+{
+ if ( Macro->count() > 0 )
+  {
+   RenameMacro *Ren = new RenameMacro();
+   Ren->init(Macro);
+   if ( Ren->exec() != 0 )
+    Control->MacroBox->updateMacroWindow(Macro);
+  }
+}
+
 bool LinPSK::read_config()
 {
 QFile ConfigFile("LinPSKConfig.xml");
 QDomDocument Configuration("LinpskConfiguration");
 QString s;
-
+int HeighttoSet = 0;
+int WidthtoSet = 0;
+int X= -1;
+int Y= -1;
 // Try to read settings from Configfile
 s=QDir::homeDirPath();
 QDir d=QDir::home();
@@ -797,8 +1044,15 @@ if ( ConfigFile.open(IO_ReadOnly) )	// File exists and is readable
              QString Name = e.tagName();
              if (Name == "Font")
               {
-               QFont f(e.attribute("Name",qApp->font().family()),e.attribute("Size","10").toInt());
-               qApp->setFont(f,true);
+               if (settings.ApplicationFont == 0 )
+                settings.ApplicationFont = new QFont(e.attribute("Name",qApp->font().family()));
+               else
+                settings.ApplicationFont->setFamily(e.attribute("Name",qApp->font().family()));
+               int size = e.attribute("Size","10").toInt();
+               if (size < 10 )
+                size=10;
+               settings.ApplicationFont->setPointSize(size); 
+              
                }
               else
                {
@@ -809,6 +1063,17 @@ if ( ConfigFile.open(IO_ReadOnly) )	// File exists and is readable
                      settings.MinimumWindowWidth=Value;
                     if ( Name == "MinimumWindowHeight")
                      settings.MinimumWindowHeight = Value;
+
+                   if ( Name == "WindowWidth")
+                     WidthtoSet=Value;
+                   if ( Name == "WindowHeight")
+                     HeighttoSet = Value;
+                     
+                   if (Name == "Xpos")
+                    X = Value;
+                   if (Name == "Ypos")
+                    Y = Value;   
+
                     if ( Name == "StatusBarHeight")
                      settings.StatusBarHeight = Value;
                    }   
@@ -856,22 +1121,35 @@ if ( ConfigFile.open(IO_ReadOnly) )	// File exists and is readable
                 else
                   Value = e.attribute("Value","0");
                 if ( Name == "PTT")
-                 {
-                  settings.ptt = Value.toInt();
                   settings.SerialDevice=e.attribute("Device",settings.SerialDevice);
-                 } 
+		if ( Name == "QsoFile" )
+		 settings.QSOFileName=e.attribute("FileName",settings.QSOFileName);  
+
                 if ( Name == "Timeoffset" )
                  settings.timeoffset = Value.toInt();
-                if ( Name == "InputSource")
+ 
+                 
+                if ( Name == "InputDevice")
+                 {
+                  settings.ActualInputDevice = Value.toInt();
+                  if ( (settings.ActualInputDevice + 1 )> settings.NumberofInputDevices ) // Device no longer available
+                   settings.ActualInputDevice = -1;
+                 }
+                 
+                if ( Name == "OutputDevice")
                  {
-                  settings.InputSource = Value.toInt();
-                  settings.SoundDevice = e.attribute("Device",settings.SoundDevice);
-                 } 
+                  settings.ActualOutputDevice = Value.toInt();
+                  if ( (settings.ActualOutputDevice + 1 )> settings.NumberofOutputDevices ) // Device no longer available
+                   settings.ActualOutputDevice = -1;
+                 }
+               
                 if ( Name == "InputVolume" )
                  settings.InputVolume = Value.toInt();
                 if ( Name == "OutputVolume" )
                  settings.OutputVolume = Value.toInt();
-                if ( Name == "Slasched0")
+ 
+                              
+                if ( Name == "Slashed0")
                  if ( Value == "true" )
                   settings.slashed0=true;
                  else
@@ -881,28 +1159,33 @@ if ( ConfigFile.open(IO_ReadOnly) )	// File exists and is readable
             }
            if ( s == "Macros" )
             {
-             int count=0;
+/**             
+	     int count=0;
              for(QDomNode n1=n.firstChild(); !n1.isNull(); n1=n1.nextSibling())
-              count++;
+              count++;	      
              Macro->MacroNames.reserve(count);
              Macro->MacroText.reserve(count);
+**/	     
+             int count=0;
              for(QDomNode n1=n.firstChild(); !n1.isNull(); n1=n1.nextSibling())
               {
                if ( n1.hasChildNodes() )
                 {
-                 QString s4=""; 
+                 QString sAcc="";
+		 QString sName="";
+		 QString sDef=""; 
                  for(QDomNode n2=n1.firstChild(); !n2.isNull();n2=n2.nextSibling())
                   {
                    QString s3;
                     s3=n2.toElement().tagName(); 
                    if( s3 == "Name")
-                    Macro->MacroNames.push_back(n2.toElement().text());
+                    sName=n2.toElement().text();
                    if(s3 == "Definition")
-                    Macro->MacroText.push_back(n2.toElement().text());
+                    sDef=n2.toElement().text();
                    if(s3 =="Accelerator" )
-                    s4 = n2.toElement().text(); 
+                    sAcc = n2.toElement().text(); 
                   }
-                  Macro->Accelerator.push_back(s4);
+		  count++;                  Macro->insert(sName,sDef,sAcc,count);
                 }   
               }
 
@@ -914,6 +1197,11 @@ if ( ConfigFile.open(IO_ReadOnly) )	// File exists and is readable
 
     }
   ConfigFile.close();
+  if ( ( HeighttoSet > 0 ) && (WidthtoSet >0 ) )
+   resize(WidthtoSet,HeighttoSet);
+  if ( ( X >= 0 ) && ( Y >= 0) )
+   move (X,Y); 
+  
   return true;
 	}
 else
@@ -921,21 +1209,55 @@ else
 }
 void LinPSK::selectPTTDevice()
 {
-#ifndef LINPSK_FOR_MAC
 
-//if (settings.serial >0 )   // leads to crash, seems to overwrite call stack
+//if (settings.serial >0 )   
 //  close(settings.serial);
-//settings.serial = -1;    
-if (settings.ptt>0)
-     settings.serial=open(settings.SerialDevice,O_EXCL);
+settings.serial = -1;    
+if (settings.SerialDevice != "None")
+//{
+// QMessageBox::information(0,"LinPsk","Trying to open Device " + settings.SerialDevice);
+ settings.serial=open(settings.SerialDevice,O_EXCL| O_WRONLY);
+// if (settings.serial > 0 )
+//  QMessageBox::information(0,"LinPsk","Opening successfull");
+// else
+//  QMessageBox::information(0,"LinPsk","Opening unsuccessfull");
+//} 
 int flags=TIOCM_RTS|TIOCM_DTR;
 if (settings.serial >0)
  ioctl(settings.serial,TIOCMBIC,&flags);
 else
- settings.ptt=0; //Their seems to be a wrong Value in the ConfigFile
-#endif 
+ settings.SerialDevice="None"; //Their seems to be a wrong Value in the ConfigFile 
 }
 void LinPSK::recording(bool on)
 {
   settings.ActChannel->record(on);
 }
+void LinPSK::HelpAbout()
+{
+  QMessageBox::about(this,tr("About..."),
+              ProgramName + QString(VERSION) + "\n written by Volker Schroer, DL1KSV\n"); 
+  setActiveWindow();
+}
+
+void LinPSK::saveSettings()
+{
+*SaveParameters=settings;
+save_config();
+}
+
+void LinPSK::closeEvent( QCloseEvent *e)
+{
+if (settings.Status != ON ) // We are not just transmitting
+ {
+  if (RxDisplay != 0)
+   RxDisplay->stop_process_loop();
+  e->accept();
+ }
+else
+ {
+  QMessageBox::information(0,ProgramName,
+    "You should stop transmitting before closing this window!");
+   e->ignore();  
+ }
+return; 
+}
diff --git a/linpsk/linpsk.h b/src/linpsk.h
similarity index 91%
rename from linpsk/linpsk.h
rename to src/linpsk.h
index 9384271..acb6034 100644
--- a/linpsk/linpsk.h
+++ b/src/linpsk.h
@@ -25,6 +25,8 @@ class QAction;
 class QActionGroup;
 class QToolBar;
 class QPopupMenu;
+class QCloseEvent;
+
 class CRxDisplay;
 class CTxDisplay;
 class ControlPanel;
@@ -33,6 +35,8 @@ class CModulator;
 class CTxBuffer;
 class Input;
 class Macros;
+class Parameter;
+
 
 class LinPSK : public QMainWindow
 {
@@ -58,10 +62,13 @@ public:
     QAction* add_Rx_Window;
     QAction* General_Settings;
     QAction* AddMacros;
+    QAction* EditMacros;
+    QAction* DeleteMacros;
+    QAction* RenameMacros;
+    
     QAction* FontSettings;
     QAction* ColorSettings;
-    QAction* EditMacros;
-//    QAction* EditFiles;
+
     QAction* SaveSettings;
     QAction* Clear_RxWindow;
     QAction* ChangeRxMode;
@@ -109,13 +116,24 @@ protected slots:
   void addMacro();
   /** Edit Macro **/
   void editMacro();
+  /** Delete Macro **/
+  void deleteMacro();
+  /** Rename Macro **/
+  void renameMacro();
   /** Recording **/
   void recording(bool);
+  /** About Info **/
+  void HelpAbout();
+  
+  /** Closing this window **/
+  void closeEvent( QCloseEvent *);
 
 private:
 
     void calculateSizeofComponents();
     bool read_config();
+    void save_config();
+Parameter *SaveParameters;    
 /** Modulator **/
 CModulator *Modulator;
 /** Characters to transmit **/
diff --git a/linpsk/macros.cpp b/src/macros.cpp
similarity index 77%
rename from linpsk/macros.cpp
rename to src/macros.cpp
index 0700bc0..a499929 100644
--- a/linpsk/macros.cpp
+++ b/src/macros.cpp
@@ -19,7 +19,7 @@
 #include "ctxbuffer.h"
 #include <qdatetime.h>
 #include <qmessagebox.h>
-#include "qsoinfo.h"
+#include "constants.h"
 #include <qfile.h>
 extern Parameter settings;
 
@@ -36,7 +36,7 @@ Words.push_back(QString("@THEIRNAME@"));
 Words.push_back(QString("@TIMELOCAL@"));
 Words.push_back(QString("@TIMEUTC@"));
 Words.push_back(QString("@TX@"));
-
+NumberofMacros=0;
 }
 Macros::~Macros(){
 }
@@ -53,7 +53,8 @@ else
     MacroNames.push_back(Name);
     MacroText.push_back(Definition);
     Accelerator.push_back(Acc);
-  }  
+  }
+NumberofMacros++;    
 }
 void Macros::executeMacro(int MacroNumber,CTxBuffer *TxBuffer)
 {
@@ -95,13 +96,13 @@ if (anzahl > 0 )
      else 
      if ( Token == Words[4] )        // Remote callsign
       {
-        Macro.replace(indexvon,Words[4].length(),settings.QsoData->TheirCall);
+        Macro.replace(indexvon,Words[4].length(),settings.QslData->RemoteCallsign);
  
        }
      else  
      if ( Token == Words[5] )        // Remote op's name
       {
-        Macro.replace(indexvon,Words[5].length(),settings.QsoData->TheirName);
+//        Macro.replace(indexvon,Words[5].length(),settings.QsoData->TheirName);
        
        }
      else  
@@ -171,3 +172,61 @@ if (anzahl > 0 )
 TxBuffer->insert(Macro,Macro.length());
 
 }
+
+void Macros::deleteMacro(int number)
+{
+if (number < 0 || number >= NumberofMacros )
+ return;
+
+MacroNames.erase(MacroNames.begin()+number);
+MacroText.erase(MacroText.begin()+number);
+Accelerator.erase(Accelerator.begin()+number);
+
+if (NumberofMacros > 0)
+ NumberofMacros--;
+}
+
+QString Macros::getMacroName(int number)
+{
+if (number < 0 || number >= NumberofMacros )
+ return QString("");
+return MacroNames[number];  
+}
+int Macros::count()
+{
+return NumberofMacros;
+}
+QString Macros::getDefinition(int number)
+{
+if (number < 0 || number >= NumberofMacros )
+ return QString("");
+return MacroText[number];  
+}
+QString Macros::getAccelerator(int number)
+{
+ if (number < 0 || number >= NumberofMacros )
+ return QString("");
+return Accelerator[number];  
+}
+int Macros::Keywordcount()
+{
+return Words.size();
+}
+QString Macros::getKeyword(int number)
+{
+ if (number < 0 || number >= NumberofMacros )
+ return QString("");
+return Words[number];  
+}
+void Macros::setDefinition(QString s,int position)
+{
+MacroText.at(position)=s;
+}
+void Macros::setAccelerator(QString s,int position)
+{
+Accelerator.at(position)=s;
+}
+void Macros::setMacroName(QString s,int MacroNumber)
+{
+MacroNames.at(MacroNumber)=s;
+}
diff --git a/linpsk/macros.h b/src/macros.h
similarity index 84%
rename from linpsk/macros.h
rename to src/macros.h
index 8be16ab..92172f6 100644
--- a/linpsk/macros.h
+++ b/src/macros.h
@@ -32,13 +32,24 @@ class Macros : public QObject
 public: 
 	Macros();
 	~Macros();
+void executeMacro(int,CTxBuffer *);
+void insert(QString ,QString , QString,int);
+void deleteMacro(int);
+QString getMacroName(int);
+QString getDefinition(int);
+void setDefinition(QString,int);
+void setAccelerator(QString,int);
+void setMacroName(QString,int);
+QString getAccelerator(int);
+QString getKeyword(int);
+int count();
+int Keywordcount();
+private:	
 std::vector<QString> Words;
 std::vector<QString> MacroNames ;
 std::vector<QString> MacroText;
 std::vector<QString> Accelerator;
-void insert(QString ,QString , QString,int);
-void executeMacro(int,CTxBuffer *);
-
+int NumberofMacros;
 signals:
 void StartRx();
 void StartTx();
diff --git a/src/macrowindow.cpp b/src/macrowindow.cpp
new file mode 100644
index 0000000..fa6a7db
--- /dev/null
+++ b/src/macrowindow.cpp
@@ -0,0 +1,160 @@
+/***************************************************************************
+                          macros.cpp  -  description
+                             -------------------
+    begin                : Sam Mai 3 2003
+    copyright            : (C) 2003 by Volker Schroer
+    email                : dl1ksv at gmx.de
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) any later version.                                   *
+ ***************************************************************************/
+
+#include "macrowindow.h"
+#include <qpushbutton.h>
+//#include <qbuttongroup.h>
+#include "parameter.h"
+
+#include "macros.h"
+
+extern Parameter settings; 
+myBox::myBox(QWidget *parent, const char *name = 0) :
+QButtonGroup(1,Horizontal,parent,name)
+{
+}
+void myBox::paintEvent(QPaintEvent *)
+{
+int width,height,y;
+int anzahl = this->count();
+width=this->width();
+width=width-15;
+y=5;
+if (settings.ApplicationFont != 0)
+ height=QFontMetrics(*settings.ApplicationFont).height();
+else 
+ height=QFontMetrics(this->font()).height();
+for(int i=0; i < anzahl; i++)
+ {
+  QButton *pb; 
+  pb=this->find(i);
+//  if (settings.ApplicationFont != 0)
+//   pb->setFont(*settings.ApplicationFont);
+
+  pb->setGeometry(5,y,width,height);
+//    pb->setFixedWidth(width);
+
+    y=y+height+2;
+ } 
+}
+
+myBox::~myBox()
+{
+}
+
+MacroWindow::MacroWindow(QWidget *parent, const char *name ) : QScrollView(parent,name)
+{
+DisplayBox=new myBox(viewport());
+
+//DisplayBox=new QVButtonGroup(viewport());
+addChild(DisplayBox);
+//DisplayBox->setMidLineWidth(1);
+setResizePolicy(AutoOne);
+verticalScrollBar()->setFixedWidth(16);
+setVScrollBarMode(AlwaysOn);
+setHScrollBarMode(AlwaysOff);
+horizontalScrollBar()->setFixedHeight(16);
+DisplayBox->setFixedWidth(this->width());
+connect(DisplayBox,SIGNAL(clicked(int)),this,SIGNAL(callMacro(int)));
+}
+MacroWindow::~MacroWindow(){
+}
+
+void MacroWindow::resizeEvent( QResizeEvent * )
+{
+DisplayBox->setFixedWidth(this->width()-verticalScrollBar()->width());
+/**
+int width,height,y;
+int anzahl = DisplayBox->count();
+width=this->width();
+width=width-verticalScrollBar()->width();
+
+DisplayBox->setFixedWidth(width);
+width=width-15;
+y=5;
+if (settings.ApplicationFont != 0)
+ height=QFontMetrics(*settings.ApplicationFont).height();
+else 
+ height=QFontMetrics(this->font()).height();
+for(int i=0; i < anzahl; i++)
+ {
+  QButton *pb; 
+  pb=DisplayBox->find(i);
+//  if (settings.ApplicationFont != 0)
+//   pb->setFont(*settings.ApplicationFont);
+
+//  pb->setGeometry(5,y,width,height);
+//    pb->setFixedWidth(width);
+    pb->move(5,y);
+    y=y+height;
+ }
+**/  
+}
+
+void MacroWindow::updateMacroWindow(Macros *Macro)
+{
+QButton *pb;
+int anzahl = DisplayBox->count();
+int i,height,y;
+if (settings.ApplicationFont != 0)
+ height=QFontMetrics(*settings.ApplicationFont).height()+5;
+else 
+ height=QFontMetrics(this->font()).height()+5;
+ 
+for(i=0; i < anzahl; i++)
+ {
+  pb=DisplayBox->find(i);
+  DisplayBox->remove(pb);
+  delete pb;
+ }
+ 
+anzahl= Macro->count(); 
+//height=10+(height+5)*anzahl;
+//DisplayBox->setFixedHeight(height);
+y=5; 
+for(i=0; i< anzahl;i++)
+ {
+  pb = new QPushButton(DisplayBox);
+//  pb->setFixedHeight(height);
+//  pb->move(5,y);
+//  y=y+height+2;
+  if ( !Macro->getAccelerator(i).isEmpty() )
+   {
+    pb->setAccel(QKeySequence(Macro->getAccelerator(i)));
+    pb->setText(Macro->getMacroName(i)+" ("+Macro->getAccelerator(i)+")");    
+   } 
+  else
+     pb->setText(Macro->getMacroName(i)); 
+  pb->show();
+ }
+
+show(); 
+}
+void MacroWindow::fontChange(const QFont &)
+{
+ if (settings.ApplicationFont != 0)
+ { 
+  DisplayBox->setFont(*settings.ApplicationFont);
+  int anzahl = DisplayBox->count();
+  for(int i=0; i < anzahl; i++)
+  {
+   QButton *pb; 
+   pb=DisplayBox->find(i);
+   pb->setFont(*settings.ApplicationFont);
+  }
+ } 
+ 
+}
diff --git a/linpsk/macrowindow.h b/src/macrowindow.h
similarity index 82%
rename from linpsk/macrowindow.h
rename to src/macrowindow.h
index 6149830..3c913d6 100644
--- a/linpsk/macrowindow.h
+++ b/src/macrowindow.h
@@ -19,15 +19,30 @@
 
 #include <qscrollview.h>
 #include <vector>
+#include <qbuttongroup.h>
 using namespace std;
 
-class QButtonGroup;
+
+
 class Macros;
 /**This class implements simple text and file macros.
 The macros are startet by a pushbutton and the pushbuttons are arranged in a scrollview.
   *@author Volker Schroer
   */
 
+class myBox : public QButtonGroup {
+   Q_OBJECT
+public:
+	myBox(QWidget *parent, const char *name);
+ virtual ~myBox();
+private:
+
+protected:
+/** Painter for Box  */
+  void paintEvent(QPaintEvent *);
+
+};  
+  
 class MacroWindow : public QScrollView  {
    Q_OBJECT
 public: 
@@ -35,8 +50,10 @@ public:
 	~MacroWindow();
 
 private:  
-QButtonGroup* DisplayBox;
-
+//QButtonGroup* DisplayBox;
+myBox* DisplayBox;
+protected:
+void fontChange(const QFont &);
 
 public slots:
 virtual void resizeEvent( QResizeEvent * );
diff --git a/linpsk/main.cpp b/src/main.cpp
similarity index 84%
rename from linpsk/main.cpp
rename to src/main.cpp
index 4a492e8..b0cff40 100644
--- a/linpsk/main.cpp
+++ b/src/main.cpp
@@ -25,19 +25,19 @@
 #include "linpsk.h"
 #include "parameter.h"
 
+
+
+
 Parameter settings;
 
 int main(int argc, char *argv[])
 {
-
         QApplication a( argc, argv );
-            // Read Config - File
-//      if (! settings.read_config())
-//      QMessageBox::information(0,"LinPsk",
-//        "LinPSK.config not found, using default values\nFile will be generated if you save the settings");
 
         LinPSK *w = new LinPSK(0,"LinPSK");
         w->show();
-        return a.exec();
-
+        a.connect( &a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()) );
+        a.exec();
+        return Pa_Terminate();
+        
 }
diff --git a/src/mfskdemodulator.cpp b/src/mfskdemodulator.cpp
new file mode 100644
index 0000000..1c99c1f
--- /dev/null
+++ b/src/mfskdemodulator.cpp
@@ -0,0 +1,203 @@
+/***************************************************************************
+                          mfskdemodulator.cpp  -  description
+                             -------------------
+    begin                : Mit Jan 29 2003
+    copyright            : (C) 2003 by Volker Schroer
+    email                : dl1ksv at gmx.de
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) any later version.                                   *
+ *   The PSK part is based on WinPSK 1.0 by Moe Wheatly, AE4JY             *
+ ***************************************************************************/
+
+#include "mfskdemodulator.h"
+//#include "deinterleaver.h"
+#include "viterbi.h"
+#include "constants.h"
+#include "mfskvaricode.h"
+
+
+const double MFSKDistance(double xa,int b)
+{
+unsigned int count,c;
+int a;
+a= (int) xa;
+c = a ^ b;
+count =0;
+while( c > 0 )
+  {
+   if (c & 1) count++;
+    c = c >>1;
+  }
+return double(count);
+
+}
+
+MFSKDemodulator::MFSKDemodulator():FSKDemodulator(16)
+{
+Decoder=new MFSKVaricode();
+viterbi = new Viterbi(7,0x6D,0x4F,MFSKDistance);
+//leave = new Deinterleaver[10]();
+Bitshiftregister=0;
+}
+MFSKDemodulator::~MFSKDemodulator()
+{
+  
+//if ( leave != 0)
+//  delete leave;
+if ( viterbi)
+  delete viterbi;
+if ( Decoder !=0)
+  delete Decoder;
+}
+
+void MFSKDemodulator::ProcessInput(double * input, double *)
+{
+int SamplestoProcess;
+int i,j;
+int SamplesperBit=16;
+unsigned char Symbols[4];
+int Symbol;
+//Zum Testen
+//double energy[94][16];
+//double phase[94][16];
+double energy[94*16];
+double phase[94*16];
+mixer(input);
+SamplestoProcess=lpDownSample();
+
+for(i=0;i<SamplestoProcess;i++)
+ {
+  for(j=0;j<NumberofTones;j++)
+   {
+//    energy[i][j]=abs(FilterOutput[j][i]);
+//    phase[i][j]=arg(FilterOutput[j][i]);
+    energy[i*16+j]=abs(FilterOutput[j][i]);
+    phase[i*16+j]=arg(FilterOutput[j][i]);
+   }
+ }  
+i=0;
+while ( i < SamplestoProcess)
+ {
+  decodesymbol(&energy[i*16],Symbols);
+  for(j=0;j < 10; j++)
+   leave[i].deinterleave(Symbols);
+/**
+leave0.deinterleave(Symbols);
+leave1.deinterleave(Symbols);
+leave2.deinterleave(Symbols);
+leave3.deinterleave(Symbols);
+leave4.deinterleave(Symbols);
+leave5.deinterleave(Symbols);
+leave6.deinterleave(Symbols);
+leave7.deinterleave(Symbols);
+leave8.deinterleave(Symbols);
+leave9.deinterleave(Symbols);
+**/
+  // Take two bits from Symbols and feed into viterbi decoder 
+  j=0;
+  if ( Symbols[0] == '1')
+   j=2;
+  if (Symbols[1] == '1')
+   j = j+1;
+  viterbi->decode(j);
+  recvbit(viterbi->getbit(48));
+  // Take next two bits from Symbols and feed into viterbi decoder 
+  j=0;
+  if ( Symbols[2] == '1')
+   j=2;
+  if (Symbols[3] == '1')
+   j = j+1;
+  viterbi->decode(j);
+  recvbit(viterbi->getbit(48));   
+  i +=SamplesperBit;
+ }  
+}
+
+int MFSKDemodulator::getSquelchValue()
+{
+
+return 0;
+}
+bool MFSKDemodulator::Init(double FS,int NumberofSamples)
+{
+Baudrate=15.625;
+SymbolLength=(int) (FS/Baudrate+0.5);
+FSKDemodulator::Init(FS,NumberofSamples);
+setFilter(Baudrate/2,705,44);
+setRxFrequency(1000.);
+}
+
+
+void MFSKDemodulator::decodesymbol(double *in,unsigned char * s)
+{
+double x, max = 0.0;
+int i, symbol=0;
+for (i = 0; i < NumberofTones; i++)
+ {
+  if ((x = in[i]) > max)
+   {
+    max = x;
+    symbol = i;
+   }
+ }
+
+// Graydecode Number and convert to char stream 
+// Use char stream to be able to use soft decode later
+for(i=0; i <4; i++)
+ s[i]=GraydecodeTable[symbol][i];
+}
+void MFSKDemodulator::recvbit(int bit)
+{
+	int c;
+  char zeichen;
+	Bitshiftregister = (Bitshiftregister << 1);
+  c = !! bit;
+  Bitshiftregister = Bitshiftregister | c;
+
+	/* search for "001" */
+  c = Bitshiftregister & 7;
+	if ((Bitshiftregister & 7) == 1)
+   {
+		/* the "1" belongs to the next symbol */
+		c = Decoder->decode(Bitshiftregister >> 1);
+
+  zeichen = c;
+  if ( c != -1 )
+		emit newSymbol((char) c);
+		/* we already received this */
+		Bitshiftregister = 1;
+	}
+}
+
+void MFSKDemodulator::synchronize()
+{
+}
+
+void MFSKDemodulator::afc()
+{
+}
+
+double MFSKDemodulator::get2RxFrequency()
+{
+return RxFrequency+ NumberofTones*Baudrate;
+}
+void MFSKDemodulator::setRxFrequency(double freq)
+{
+ if ( freq != RxFrequency)
+ {
+  RxFrequency=freq;
+  for(int i=0;i <NumberofTones;i++) 
+  mixerfreqinc[i]=PI2*(RxFrequency+i*Baudrate)/SampleRate;
+ }
+}
+AfcMode MFSKDemodulator::AfcProperties()
+{
+return Narrow;
+}
+  
\ No newline at end of file
diff --git a/linpsk/mfskdemodulator.h b/src/mfskdemodulator.h
similarity index 57%
rename from linpsk/mfskdemodulator.h
rename to src/mfskdemodulator.h
index 6de721e..eaa2582 100644
--- a/linpsk/mfskdemodulator.h
+++ b/src/mfskdemodulator.h
@@ -18,81 +18,69 @@
 #ifndef MFSKDEMODULATOR_H
 #define MFSKDEMODULATOR_H
 
-#include <fskdemodulator.h>
+#include "fskdemodulator.h"
 #include <complex>
 #include <vector>
-
+#include "deinterleaver.h"
 using namespace std;
-class Deinterleaver;
+//class Deinterleaver;
 class Viterbi;
 class MFSKVaricode;
 /**
   *@author Volker Schroer
   */
-
+static char GraydecodeTable[16][4]={ {'0','0','0','0'}, //  0
+                              {'0','0','0','1'}, //  1
+			      {'0','0','1','1'}, //  2
+			      {'0','0','1','0'}, //  3
+			      {'0','1','1','0'}, //  4
+			      {'0','1','1','1'}, //  5
+			      {'0','1','0','1'}, //  6
+			      {'0','1','0','0'}, //  7
+			      {'1','1','0','0'}, //  8
+			      {'1','1','0','1'}, //  9
+			      {'1','1','1','1'}, // 10
+			      {'1','1','1','0'}, // 11
+			      {'1','0','1','0'}, // 12
+			      {'1','0','1','1'}, // 13
+			      {'1','0','0','1'}, // 14
+			      {'1','0','0','1'}  // 15
+};
 class MFSKDemodulator : public FSKDemodulator  {
 public: 
   MFSKDemodulator();
   ~MFSKDemodulator();
-	/** Prozess the input */
-	void ProcessInput(double * input);
-  int getSquelchValue();
-	bool Init(double,int);
+ /** Prozess the input */
+ void ProcessInput(double * input,double *);
+ int getSquelchValue();
+ bool Init(double,int);
+ virtual double get2RxFrequency();
 
 private:
 
-	/*
-	 * Common stuff
-	 */
-	float phaseacc;
-  int NumberofTones;
-
-	/*
-	 * RX related stuff
-	 */
-// Dimensions are 2 * SymbolLength, NumberofTones
-// Switch later to Vector Construct
-  complex<double> Pipe[1412][16];
-//vector < vector< complex<double> > >  Pipe;
-
-	unsigned int pipeptr;
-
-	unsigned int datashreg;
-
-	complex<double> currvector;
-	complex<double> prev1vector;
-	complex<double> prev2vector;
-
-	int currsymbol;
-	int prev1symbol;
-	int prev2symbol;
-
-
-	unsigned int symbolphase;
-	unsigned int symboltime;
-	float syncaverage;
-	int synccounter;
 MFSKVaricode *Decoder;
-bool init_sfft(int);
-Deinterleaver * leave;
-complex<double> *history;
+//Deinterleaver leave0,leave1,leave2,leave3,leave4,
+//leave5,leave6,leave7,leave8,leave9;
+
+Deinterleaver leave[10];
 Viterbi * viterbi;
-void sfft(complex<double>);
-int decodesymbol(complex<double> *);
-void recvsymbol(complex<double> *);
+void decodesymbol(double *,unsigned char *);
+void recvbit(int);
 void synchronize();
 void afc();
-void recvbit(int);
-int ptr;
+AfcMode AfcProperties();
+unsigned int Bitshiftregister;
+
+public slots: // Public slots
+/** Set RxFrequencies for MFSK16 */
+ void setRxFrequency(double);
+
 
 inline unsigned char graydecode(unsigned char data)
 {
 	return data ^ (data >> 1);
 }
-inline unsigned char clamp(double x)
-{
-	return (x < 0) ? 0 : ((x > 255) ? 255 :(unsigned char) x);
-}
+
 };
 
 #endif
diff --git a/linpsk/mfskmodulator.cpp b/src/mfskmodulator.cpp
similarity index 90%
rename from linpsk/mfskmodulator.cpp
rename to src/mfskmodulator.cpp
index 3f22061..6429a71 100644
--- a/linpsk/mfskmodulator.cpp
+++ b/src/mfskmodulator.cpp
@@ -30,28 +30,33 @@ bitcounter=0;
 symbol=0;
 varicode=0;
 NumberofTones=16;
-FrequencyIncrement=new double[NumberofTones];
+ToneFrequencyr=new double[NumberofTones];
+ToneFrequencyi=new double[NumberofTones];
 Baudrate=15.625;
 SamplesperSymbol=(int) (SampleRate/Baudrate+0.5);
 // Tonespacing has the same value like Baudrate so
-for (unsigned int i=0; i<NumberofTones;i++)
-  FrequencyIncrement[i]=PI2*(freq+i*Baudrate)/SampleRate;
+for ( int i=0; i<NumberofTones;i++)
+{
+  ToneFrequencyr[i]=cos(PI2*(freq+i*Baudrate)/SampleRate);
+  ToneFrequencyi[i]=sin(PI2*(freq+i*Baudrate)/SampleRate);
+}  
 NxSamples=SamplesperSymbol;
 }
 MFSKModulator::~MFSKModulator()
 {
+/**  
 if ( Encoder !=0 )
   delete Encoder;
 if (leave != 0)
   delete leave;
 if ( Fec != 0)
   delete Fec;
-if ( FrequencyIncrement !=0 )
-  delete FrequencyIncrement;
+
+**/  
 }
 int MFSKModulator::getToneNumber()
 {
-char ch;
+int ch;
 
 for(;;)
  {
@@ -101,3 +106,5 @@ for(;;)
     }
  }
 }
+
+
diff --git a/linpsk/mfskmodulator.h b/src/mfskmodulator.h
similarity index 100%
rename from linpsk/mfskmodulator.h
rename to src/mfskmodulator.h
diff --git a/linpsk/mfskvaricode.cpp b/src/mfskvaricode.cpp
similarity index 100%
rename from linpsk/mfskvaricode.cpp
rename to src/mfskvaricode.cpp
diff --git a/linpsk/mfskvaricode.h b/src/mfskvaricode.h
similarity index 100%
rename from linpsk/mfskvaricode.h
rename to src/mfskvaricode.h
diff --git a/src/modemenu.cpp b/src/modemenu.cpp
new file mode 100644
index 0000000..ae88917
--- /dev/null
+++ b/src/modemenu.cpp
@@ -0,0 +1,159 @@
+/****************************************************************************
+** Form implementation generated from reading ui file 'modemenu.ui'
+**
+** Created: Sat Sep 18 18:46:16 2004
+**      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.2   edited Nov 24 13:47 $)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+
+#include "modemenu.h"
+
+#include <qvariant.h>
+#include <qpushbutton.h>
+#include <qradiobutton.h>
+#include <qlistbox.h>
+#include <qbuttongroup.h>
+#include <qgroupbox.h>
+#include <qspinbox.h>
+#include <qlayout.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+#include "parameter.h"
+#include "modemenu.ui.h"
+
+/*
+ *  Constructs a ModeMenu as a child of 'parent', with the
+ *  name 'name' and widget flags set to 'f'.
+ *
+ *  The dialog will by default be modeless, unless you set 'modal' to
+ *  TRUE to construct a modal dialog.
+ */
+ModeMenu::ModeMenu( QWidget* parent, const char* name, bool modal, WFlags fl )
+    : QDialog( parent, name, modal, fl )
+{
+    if ( !name )
+	setName( "ModeMenu" );
+    setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, sizePolicy().hasHeightForWidth() ) );
+    setMinimumSize( QSize( 350, 250 ) );
+    setBaseSize( QSize( 350, 150 ) );
+    setSizeGripEnabled( TRUE );
+
+    QWidget* privateLayoutWidget = new QWidget( this, "layout3" );
+    privateLayoutWidget->setGeometry( QRect( 30, 190, 300, 50 ) );
+    layout3 = new QHBoxLayout( privateLayoutWidget, 11, 6, "layout3"); 
+
+    buttonOk = new QPushButton( privateLayoutWidget, "buttonOk" );
+    buttonOk->setMinimumSize( QSize( 60, 20 ) );
+    buttonOk->setAutoDefault( TRUE );
+    buttonOk->setDefault( TRUE );
+    layout3->addWidget( buttonOk );
+    Horizontal_Spacing2 = new QSpacerItem( 110, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+    layout3->addItem( Horizontal_Spacing2 );
+
+    buttonCancel = new QPushButton( privateLayoutWidget, "buttonCancel" );
+    buttonCancel->setMinimumSize( QSize( 60, 20 ) );
+    buttonCancel->setAutoDefault( TRUE );
+    layout3->addWidget( buttonCancel );
+
+    Reverse = new QRadioButton( this, "Reverse" );
+    Reverse->setGeometry( QRect( 260, 30, 80, 31 ) );
+    Reverse->setChecked( TRUE );
+
+    RxMode = new QListBox( this, "RxMode" );
+    RxMode->setGeometry( QRect( 30, 20, 100, 160 ) );
+    RxMode->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, RxMode->sizePolicy().hasHeightForWidth() ) );
+    RxMode->setVScrollBarMode( QListBox::Auto );
+    RxMode->setHScrollBarMode( QListBox::AlwaysOff );
+
+    Parity = new QButtonGroup( this, "Parity" );
+    Parity->setGeometry( QRect( 250, 90, 80, 90 ) );
+    Parity->setAlignment( int( QButtonGroup::AlignHCenter ) );
+
+    None = new QRadioButton( Parity, "None" );
+    None->setGeometry( QRect( 10, 15, 60, 20 ) );
+    None->setChecked( TRUE );
+    Parity->insert( None, 0 );
+
+    Odd = new QRadioButton( Parity, "Odd" );
+    Odd->setGeometry( QRect( 10, 35, 61, 20 ) );
+    Parity->insert( Odd, 1 );
+
+    Even = new QRadioButton( Parity, "Even" );
+    Even->setGeometry( QRect( 10, 55, 60, 20 ) );
+    Parity->insert( Even, 2 );
+
+    Stopbits = new QButtonGroup( this, "Stopbits" );
+    Stopbits->setGeometry( QRect( 150, 89, 80, 90 ) );
+    Stopbits->setAlignment( int( QButtonGroup::AlignHCenter ) );
+    Stopbits->setCheckable( FALSE );
+    Stopbits->setChecked( FALSE );
+    Stopbits->setExclusive( FALSE );
+
+    One = new QRadioButton( Stopbits, "One" );
+    One->setGeometry( QRect( 10, 20, 80, 22 ) );
+    Stopbits->insert( One, 0 );
+
+    Onepoint5 = new QRadioButton( Stopbits, "Onepoint5" );
+    Onepoint5->setGeometry( QRect( 10, 40, 81, 21 ) );
+    Onepoint5->setChecked( TRUE );
+    Stopbits->insert( Onepoint5, 1 );
+
+    Two = new QRadioButton( Stopbits, "Two" );
+    Two->setGeometry( QRect( 10, 60, 80, 21 ) );
+    Stopbits->insert( Two, 2 );
+
+    Spacing = new QGroupBox( this, "Spacing" );
+    Spacing->setGeometry( QRect( 145, 20, 100, 60 ) );
+    Spacing->setAlignment( int( QGroupBox::AlignHCenter ) );
+
+    RTTYSpacing = new QSpinBox( Spacing, "RTTYSpacing" );
+    RTTYSpacing->setEnabled( TRUE );
+    RTTYSpacing->setGeometry( QRect( 10, 23, 80, 30 ) );
+    RTTYSpacing->setMaxValue( 999 );
+    RTTYSpacing->setMinValue( 0 );
+    RTTYSpacing->setValue( 170 );
+    languageChange();
+    resize( QSize(350, 250).expandedTo(minimumSizeHint()) );
+    clearWState( WState_Polished );
+
+    // signals and slots connections
+    connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
+    connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
+    connect( RxMode, SIGNAL( highlighted(int) ), this, SLOT( changeView(int) ) );
+    init();
+}
+
+/*
+ *  Destroys the object and frees any allocated resources
+ */
+ModeMenu::~ModeMenu()
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+
+/*
+ *  Sets the strings of the subwidgets using the current
+ *  language.
+ */
+void ModeMenu::languageChange()
+{
+    setCaption( tr( "Change Rx Mode" ) );
+    buttonOk->setText( tr( "&OK" ) );
+    buttonOk->setAccel( QKeySequence( QString::null ) );
+    buttonCancel->setText( tr( "&Cancel" ) );
+    buttonCancel->setAccel( QKeySequence( QString::null ) );
+    Reverse->setText( tr( "Reverse" ) );
+    RxMode->setCurrentItem( -1 );
+    Parity->setTitle( tr( "Parity" ) );
+    None->setText( tr( "None" ) );
+    Odd->setText( tr( "Odd" ) );
+    Even->setText( tr( "Even" ) );
+    Stopbits->setTitle( tr( "Stopbits" ) );
+    One->setText( tr( "1" ) );
+    Onepoint5->setText( tr( "1.5" ) );
+    Two->setText( tr( "2" ) );
+    Spacing->setTitle( tr( "Spacing" ) );
+    RTTYSpacing->setSuffix( tr( " Hz" ) );
+}
+
diff --git a/linpsk/parameter.cpp b/src/parameter.cpp
similarity index 55%
rename from linpsk/parameter.cpp
rename to src/parameter.cpp
index d9ef3b8..58ab379 100644
--- a/linpsk/parameter.cpp
+++ b/src/parameter.cpp
@@ -14,9 +14,9 @@
  *   (at your option) any later version.                                   *
  *    based on the work of  Moe Wheatly, AE4JY                             *  
  ***************************************************************************/
-//#include <qdom.h>
+
 #include "parameter.h"
-#include "qsoinfo.h"
+
 Parameter::Parameter()
 {
 
@@ -30,12 +30,12 @@ StatusBarHeight=20;
 
 
 callsign="";
-QsoData=new QsoInfo();
-ptt=0;
+QslData=0;
+
 serial=-1; // Serial none
-SerialDevice="";
+SerialDevice="none";
+QSOFileName="QSOData.adif";
 
-SoundDevice="/dev/audio";
 timeoffset=-2;
 clockerror=0;
 
@@ -44,19 +44,58 @@ DemoMode=true;
 DemoModeFileType[0]="*.wav";
 DemoModeFileType[1]="*.out";
 DemoTypeNumber=0;
-#ifndef LINPSK_FOR_MAC
-InputSource=SOUND_MIXER_MIC;
-#else
-InputSource=0; // has to be changed later for using esd
-#endif
 InputVolume=50;
 OutputVolume=50;
 slashed0=false;
 RxChannels=1;
 ActChannel = 0;   // Pointer to the active Channel
 ChannelChain = 0; // Pointer to the Start of the Rx - ChannelChain
+ApplicationFont =0;
+
+  isInitialized=false;  // Portable Audio not initializde upt to now
 }
 Parameter::~Parameter()
 {
 }
 
+void  Parameter::setupDevices()
+{
+int NumberofDevices;
+PaDeviceInfo DeviceInfo;
+// Setting up Devicelists
+if (! isInitialized )
+ return;
+InputDevices=0;
+NumberofInputDevices=0;
+ActualInputDevice=-1;
+OutputDevices=0;
+ActualOutputDevice=-1;
+NumberofOutputDevices=0;
+NumberofDevices=Pa_CountDevices();
+// Find out possible Devices and count Input and Output Devices
+for (int i=0; i<NumberofDevices; i++)
+  {
+   DeviceInfo = *Pa_GetDeviceInfo( i );
+   if (DeviceInfo.maxInputChannels > 0)
+    NumberofInputDevices++;
+   if (DeviceInfo.maxOutputChannels > 0)
+   NumberofOutputDevices++; 
+  }
+if (NumberofInputDevices >0 )
+ InputDevices = new PaDeviceID[NumberofInputDevices];
+if ( NumberofOutputDevices >0 )
+ OutputDevices = new PaDeviceID[NumberofOutputDevices];
+NumberofInputDevices=0;
+NumberofOutputDevices=0;
+// No sort the devices
+for (int i=0; i<NumberofDevices; i++)
+  {
+   DeviceInfo = *Pa_GetDeviceInfo( i );
+   if (DeviceInfo.maxInputChannels > 0)
+     InputDevices[NumberofInputDevices++] =i;    
+   if (DeviceInfo.maxOutputChannels > 0)
+     OutputDevices[NumberofOutputDevices++] =i;    
+  }  
+
+}
+
diff --git a/linpsk/parameter.h b/src/parameter.h
similarity index 61%
rename from linpsk/parameter.h
rename to src/parameter.h
index 37a2843..6ce71d0 100644
--- a/linpsk/parameter.h
+++ b/src/parameter.h
@@ -22,16 +22,14 @@
 #include <unistd.h>
 #include <fcntl.h>
 #include <sys/ioctl.h>
-
-#ifndef LINPSK_FOR_MAC
-#include <sys/soundcard.h>
-#endif
-
-
+#include "portaudio.h"
 #include <cledbutton.h>
+#include "constants.h"
+
 class CRxChannel;
-class QsoInfo;
 class QString;
+class QFont;
+
 /**Contains parameters for transmitting and receiving
 
 some of them are set by settup
@@ -44,9 +42,7 @@ class Parameter
 public: 
 	Parameter();
 	~Parameter();
-//bool read_config();
-
-
+void setupDevices();
 // Variables
 
 /** MinimumWindowWidth */
@@ -57,37 +53,39 @@ int MinimumWindowHeight;
 int StatusBarHeight;
 
 
-QString callsign;				// Callsign
+QString callsign;                    // Callsign
 
-QString inputFilename;	//Name of Demofile
-QString DemoModeFileType[2]; // File Type of DemoFile
-int DemoTypeNumber;				// Index of selected FileType
-int serial; 						// Filedescriptor for serial Device for PTT
-QString SerialDevice;
-QString SoundDevice;
-bool DemoMode;					// DemoMode ?
-
-int ptt;								// Number of ComPort for PTT 0=none 1-4 Number of ComPort
-int timeoffset;					// offset to UTC
-int clockerror;
+QString inputFilename;              //Name of Demofile
+QString DemoModeFileType[2];        // File Type of DemoFile
+int DemoTypeNumber;                 // Index of selected FileType
+int serial;                         // Filedescriptor for serial Device for PTT
+QString SerialDevice;               //Filename for PTT Device
+QString QSOFileName;                 // Name of the file, where qsodata will be stored
+bool DemoMode;                      // DemoMode ?
 
 
+int timeoffset;                     // offset to UTC
+int clockerror;
 
-/** Number of Input Device
-		1 = Mic
-		2 = Line
-		*/
-int InputSource; 				
+/** DeviceSection */
+bool isInitialized;
+PaDeviceID *InputDevices;    // List of available InputDevices
+int ActualInputDevice;       // Number of actual Device in List of InputDevices
+int NumberofInputDevices;
+PaDeviceID *OutputDevices;   // List of avaliable OutputDevices
+int ActualOutputDevice;      // Number of actual Device in List of OutputDevices
+int NumberofOutputDevices; 
 int InputVolume;				//Input Volume off Mic
 int OutputVolume;				//OutputVolume (line)
 
 bool slashed0; 				// True if to print 0 slashed
 
-int  RxChannels;
+unsigned int  RxChannels;
 CRxChannel * ChannelChain;
 CRxChannel * ActChannel;
-QsoInfo * QsoData;
+QsoInfo *QslData;
 BUTTONSTATUS Status;
+QFont *ApplicationFont;
 
 };
 
diff --git a/src/portaudio/Makefile.am b/src/portaudio/Makefile.am
new file mode 100644
index 0000000..5af850b
--- /dev/null
+++ b/src/portaudio/Makefile.am
@@ -0,0 +1,6 @@
+INCLUDES = $(all_includes)
+METASOURCES = AUTO
+lib_LIBRARIES = libportaudio.a
+libportaudio_a_SOURCES = pa_convert.c pa_host.h pa_lib.c pa_trace.c portaudio.h \
+	pa_trace.h pa_unix.c pa_unix.h pa_unix_oss.c
+AM_CXXFLAGS = -O2
diff --git a/src/portaudio/Makefile.in b/src/portaudio/Makefile.in
new file mode 100644
index 0000000..63d83ea
--- /dev/null
+++ b/src/portaudio/Makefile.in
@@ -0,0 +1,471 @@
+# Makefile.in generated by automake 1.9.4 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+SOURCES = $(libportaudio_a_SOURCES)
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = src/portaudio
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(libdir)"
+libLIBRARIES_INSTALL = $(INSTALL_DATA)
+LIBRARIES = $(lib_LIBRARIES)
+ARFLAGS = cru
+libportaudio_a_AR = $(AR) $(ARFLAGS)
+libportaudio_a_LIBADD =
+am_libportaudio_a_OBJECTS = pa_convert.$(OBJEXT) pa_lib.$(OBJEXT) \
+	pa_trace.$(OBJEXT) pa_unix.$(OBJEXT) pa_unix_oss.$(OBJEXT)
+libportaudio_a_OBJECTS = $(am_libportaudio_a_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libportaudio_a_SOURCES)
+DIST_SOURCES = $(libportaudio_a_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MOC = @MOC@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_LDADD = @QT_LDADD@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+INCLUDES = $(all_includes)
+METASOURCES = AUTO
+lib_LIBRARIES = libportaudio.a
+libportaudio_a_SOURCES = pa_convert.c pa_host.h pa_lib.c pa_trace.c portaudio.h \
+	pa_trace.h pa_unix.c pa_unix.h pa_unix_oss.c
+
+AM_CXXFLAGS = -O2
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/portaudio/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  src/portaudio/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-libLIBRARIES: $(lib_LIBRARIES)
+	@$(NORMAL_INSTALL)
+	test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
+	@list='$(lib_LIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    f=$(am__strip_dir) \
+	    echo " $(libLIBRARIES_INSTALL) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
+	    $(libLIBRARIES_INSTALL) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+	  else :; fi; \
+	done
+	@$(POST_INSTALL)
+	@list='$(lib_LIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    p=$(am__strip_dir) \
+	    echo " $(RANLIB) '$(DESTDIR)$(libdir)/$$p'"; \
+	    $(RANLIB) "$(DESTDIR)$(libdir)/$$p"; \
+	  else :; fi; \
+	done
+
+uninstall-libLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(lib_LIBRARIES)'; for p in $$list; do \
+	  p=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(libdir)/$$p'"; \
+	  rm -f "$(DESTDIR)$(libdir)/$$p"; \
+	done
+
+clean-libLIBRARIES:
+	-test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
+libportaudio.a: $(libportaudio_a_OBJECTS) $(libportaudio_a_DEPENDENCIES) 
+	-rm -f libportaudio.a
+	$(libportaudio_a_AR) libportaudio.a $(libportaudio_a_OBJECTS) $(libportaudio_a_LIBADD)
+	$(RANLIB) libportaudio.a
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pa_convert.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pa_lib.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pa_trace.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pa_unix.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pa_unix_oss.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ at am__fastdepCC_TRUE@	if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LIBRARIES)
+installdirs:
+	for dir in "$(DESTDIR)$(libdir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libLIBRARIES clean-libtool \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-libLIBRARIES
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-libLIBRARIES
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libLIBRARIES clean-libtool ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-exec \
+	install-exec-am install-info install-info-am \
+	install-libLIBRARIES install-man install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-info-am \
+	uninstall-libLIBRARIES
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/portaudio/pa_convert.c b/src/portaudio/pa_convert.c
new file mode 100644
index 0000000..871c136
--- /dev/null
+++ b/src/portaudio/pa_convert.c
@@ -0,0 +1,470 @@
+/*
+ *  pa_conversions.c
+ *  portaudio
+ *
+ *  Created by Phil Burk on Mon Mar 18 2002.
+ *
+ */
+#include <stdio.h>
+
+#include "portaudio.h"
+#include "pa_host.h"
+
+#define CLIP( val, min, max )  { val = ((val) < (min)) ? min : (((val) < (max)) ? (max) : (val)); }
+
+/*************************************************************************/
+static void PaConvert_Float32_Int16(
+    float *sourceBuffer, int sourceStride,
+    short *targetBuffer, int targetStride,
+    int numSamples )
+{
+	int i;
+	for( i=0; i<numSamples; i++ )
+	{
+        short samp = (short) (*sourceBuffer * (32767.0f));
+        *targetBuffer = samp;
+        sourceBuffer += sourceStride;
+        targetBuffer += targetStride;
+    }
+}
+
+/*************************************************************************/
+static void PaConvert_Float32_Int16_Clip(
+    float *sourceBuffer, int sourceStride,
+    short *targetBuffer, int targetStride,
+    int numSamples )
+{
+	int i;
+	for( i=0; i<numSamples; i++ )
+	{
+        long samp = (long) (*sourceBuffer * (32767.0f));
+        CLIP( samp, -0x8000, 0x7FFF );
+        *targetBuffer = (short) samp;
+        sourceBuffer += sourceStride;
+        targetBuffer += targetStride;
+    }
+}
+
+/*************************************************************************/
+static void PaConvert_Float32_Int16_ClipDither(
+    float *sourceBuffer, int sourceStride,
+    short *targetBuffer, int targetStride,
+    int numSamples )
+{
+	int i;
+	for( i=0; i<numSamples; i++ )
+	{
+    // use smaller scaler to prevent overflow when we add the dither
+        float dither  = PaConvert_TriangularDither() * PA_DITHER_SCALE;
+        float dithered = (*sourceBuffer * (32766.0f)) + dither;
+        long samp = (long) dithered;
+        CLIP( samp, -0x8000, 0x7FFF );
+        *targetBuffer = (short) samp;
+        sourceBuffer += sourceStride;
+        targetBuffer += targetStride;
+    }
+}
+
+/*************************************************************************/
+static void PaConvert_Float32_Int16_Dither(
+    float *sourceBuffer, int sourceStride,
+    short *targetBuffer, int targetStride,
+    int numSamples )
+{
+	int i;
+	for( i=0; i<numSamples; i++ )
+	{
+    // use smaller scaler to prevent overflow when we add the dither
+        float dither  = PaConvert_TriangularDither() * PA_DITHER_SCALE;
+        float dithered = (*sourceBuffer * (32766.0f)) + dither;
+        *targetBuffer = (short) dithered;
+        sourceBuffer += sourceStride;
+        targetBuffer += targetStride;
+    }
+}
+
+
+/*************************************************************************/
+static void PaConvert_Int16_Float32(
+    short *sourceBuffer, int sourceStride,
+    float *targetBuffer, int targetStride,
+    int numSamples )
+{
+    int i;
+	for( i=0; i<numSamples; i++ )
+	{
+        float samp = *sourceBuffer * (1.0f / 32768.0f);
+        *targetBuffer = samp;
+        sourceBuffer += sourceStride;
+        targetBuffer += targetStride;
+    }
+}
+
+/*************************************************************************/
+static void PaConvert_Float32_Int8(
+    float *sourceBuffer, int sourceStride,
+    char *targetBuffer, int targetStride,
+    int numSamples )
+{
+	int i;
+	for( i=0; i<numSamples; i++ )
+	{
+        char samp = (char) (*sourceBuffer * (127.0));
+        *targetBuffer = samp;
+        sourceBuffer += sourceStride;
+        targetBuffer += targetStride;
+    }
+}
+
+
+/*************************************************************************/
+static void PaConvert_Float32_Int8_Clip(
+    float *sourceBuffer, int sourceStride,
+    char *targetBuffer, int targetStride,
+    int numSamples )
+{
+	int i;
+	for( i=0; i<numSamples; i++ )
+	{
+        long samp = (long) (*sourceBuffer * 127.0f);
+        CLIP( samp, -0x80, 0x7F );
+        *targetBuffer = (char) samp;
+        sourceBuffer += sourceStride;
+        targetBuffer += targetStride;
+    }
+}
+
+/*************************************************************************/
+static void PaConvert_Float32_Int8_ClipDither(
+    float *sourceBuffer, int sourceStride,
+    char *targetBuffer, int targetStride,
+    int numSamples )
+{
+	int i;
+	for( i=0; i<numSamples; i++ )
+	{
+    // use smaller scaler to prevent overflow when we add the dither
+        float dither  = PaConvert_TriangularDither() * PA_DITHER_SCALE;
+        float dithered = (*sourceBuffer * (126.0f)) + dither;
+        long samp = (long) dithered;
+        CLIP( samp, -0x80, 0x7F );
+        *targetBuffer = (char) samp;
+        sourceBuffer += sourceStride;
+        targetBuffer += targetStride;
+    }
+}
+
+/*************************************************************************/
+static void PaConvert_Float32_Int8_Dither(
+    float *sourceBuffer, int sourceStride,
+    char *targetBuffer, int targetStride,
+    int numSamples )
+{
+	int i;
+	for( i=0; i<numSamples; i++ )
+	{
+    // use smaller scaler to prevent overflow when we add the dither
+        float dither  = PaConvert_TriangularDither() * PA_DITHER_SCALE;  //FIXME
+        float dithered = (*sourceBuffer * (126.0f)) + dither;
+        long samp = (long) dithered;
+        *targetBuffer = (char) samp;
+        sourceBuffer += sourceStride;
+        targetBuffer += targetStride;
+    }
+}
+
+/*************************************************************************/
+static void PaConvert_Int8_Float32(
+    char *sourceBuffer, int sourceStride,
+    float *targetBuffer, int targetStride,
+    int numSamples )
+{
+    int i;
+	for( i=0; i<numSamples; i++ )
+	{
+        float samp = *sourceBuffer * (1.0f / 128.0f);
+        *targetBuffer = samp;
+        sourceBuffer += sourceStride;
+        targetBuffer += targetStride;
+    }
+}
+
+/*************************************************************************/
+static void PaConvert_Float32_UInt8(
+    float *sourceBuffer, int sourceStride,
+    unsigned char *targetBuffer, int targetStride,
+    int numSamples )
+{
+	int i;
+	for( i=0; i<numSamples; i++ )
+	{
+        unsigned char samp = (unsigned char)(128 + (*sourceBuffer * (127.0)));
+        *targetBuffer = samp;
+        sourceBuffer += sourceStride;
+        targetBuffer += targetStride;
+    }
+}
+    
+/*************************************************************************/
+static void PaConvert_UInt8_Float32(
+    unsigned char *sourceBuffer, int sourceStride,
+    float *targetBuffer, int targetStride,
+    int numSamples )
+{
+    int i;
+	for( i=0; i<numSamples; i++ )
+	{
+        float samp = (*sourceBuffer - 128) * (1.0f / 128.0f);
+        *targetBuffer = samp;
+        sourceBuffer += sourceStride;
+        targetBuffer += targetStride;
+    }
+}
+
+/*************************************************************************/
+static void PaConvert_Float32_Int32(
+    float *sourceBuffer, int sourceStride,
+    long *targetBuffer, int targetStride,
+    int numSamples )
+{
+	int i;
+	for( i=0; i<numSamples; i++ )
+	{
+        int samp = (int) (*sourceBuffer * 0x7FFFFFFF);
+        *targetBuffer = samp;
+        sourceBuffer += sourceStride;
+        targetBuffer += targetStride;
+    }
+}
+
+/*************************************************************************/
+static void PaConvert_Float32_Int32_Clip(
+    float *sourceBuffer, int sourceStride,
+    long *targetBuffer, int targetStride,
+    int numSamples )
+{
+	int i;
+	for( i=0; i<numSamples; i++ )
+	{
+        int samp;
+        float fs = *sourceBuffer;
+        CLIP( fs, -1.0f, 0.999999f );
+        samp = (int) (*sourceBuffer * 0x7FFFFFFF);
+        *targetBuffer = samp;
+        sourceBuffer += sourceStride;
+        targetBuffer += targetStride;
+    }
+}
+
+/*************************************************************************/
+static void PaConvert_Int32_Float32(
+    long *sourceBuffer, int sourceStride,
+    float *targetBuffer, int targetStride,
+    int numSamples )
+{
+    int i;
+	for( i=0; i<numSamples; i++ )
+	{
+        float samp = *sourceBuffer * (1.0f / 0x7FFFFFFF);
+        *targetBuffer = samp;
+        sourceBuffer += sourceStride;
+        targetBuffer += targetStride;
+    }
+}
+
+/*************************************************************************/
+static PortAudioConverter *PaConvert_SelectProc( PaSampleFormat sourceFormat,
+        PaSampleFormat targetFormat,  int ifClip, int ifDither )
+{
+    PortAudioConverter *proc = NULL;
+    switch( sourceFormat )
+    {
+    case paUInt8:
+        switch( targetFormat )
+        {
+        case paFloat32:
+            proc = (PortAudioConverter *) PaConvert_UInt8_Float32;
+            break;
+        default:
+            break;
+        }
+        break;
+    case paInt8:
+        switch( targetFormat )
+        {
+        case paFloat32:
+            proc = (PortAudioConverter *) PaConvert_Int8_Float32;
+            break;
+        default:
+            break;
+        }
+        break;
+    case paInt16:
+        switch( targetFormat )
+        {
+        case paFloat32:
+            proc = (PortAudioConverter *) PaConvert_Int16_Float32;
+            break;
+        default:
+            break;
+        }
+        break;
+
+    case paInt32:
+        switch( targetFormat )
+        {
+        case paFloat32:
+            proc = (PortAudioConverter *) PaConvert_Int32_Float32;
+            break;
+        default:
+            break;
+        }
+        break;
+        
+    case paFloat32:
+        switch( targetFormat )
+        {
+        case paUInt8:
+            proc = (PortAudioConverter *) PaConvert_Float32_UInt8;
+            break;
+        case paInt8:
+            if( ifClip && ifDither ) proc = (PortAudioConverter *) PaConvert_Float32_Int8_ClipDither;
+            else if( ifClip ) proc = (PortAudioConverter *) PaConvert_Float32_Int8_Clip;
+            else if( ifDither ) proc = (PortAudioConverter *) PaConvert_Float32_Int8_Dither;
+            else proc = (PortAudioConverter *) PaConvert_Float32_Int8;
+            break;
+        case paInt16:
+            if( ifClip && ifDither ) proc = (PortAudioConverter *) PaConvert_Float32_Int16_ClipDither;
+            else if( ifClip ) proc = (PortAudioConverter *) PaConvert_Float32_Int16_Clip;
+            else if( ifDither ) proc = (PortAudioConverter *) PaConvert_Float32_Int16_Dither;
+            else proc = (PortAudioConverter *) PaConvert_Float32_Int16;
+            break;
+        case paInt32:
+            /* Don't bother dithering a 32 bit integer! */
+            if( ifClip ) proc = (PortAudioConverter *) PaConvert_Float32_Int32_Clip;
+            else proc = (PortAudioConverter *) PaConvert_Float32_Int32;
+            break;
+        default:
+            break;
+        }
+        break;
+    default:
+        break;
+    }
+    return proc;
+            
+}
+
+/*************************************************************************/
+PaError PaConvert_SetupInput( internalPortAudioStream   *past,
+    PaSampleFormat   nativeInputSampleFormat )
+{    
+    past->past_NativeInputSampleFormat = nativeInputSampleFormat;
+    past->past_InputConversionSourceStride = 1;
+    past->past_InputConversionTargetStride = 1;
+    
+    if( nativeInputSampleFormat != past->past_InputSampleFormat )
+    {
+        int ifDither = (past->past_Flags & paDitherOff) == 0;
+        past->past_InputConversionProc = PaConvert_SelectProc( nativeInputSampleFormat,
+             past->past_InputSampleFormat, 0, ifDither );
+        if( past->past_InputConversionProc == NULL ) return paSampleFormatNotSupported;
+    }
+    else
+    {
+        past->past_InputConversionProc = NULL; /* no conversion necessary */
+    }
+    
+    return paNoError;
+}
+
+/*************************************************************************/
+PaError PaConvert_SetupOutput( internalPortAudioStream   *past,
+    PaSampleFormat   nativeOutputSampleFormat )
+{
+
+    past->past_NativeOutputSampleFormat = nativeOutputSampleFormat;
+    past->past_OutputConversionSourceStride = 1;
+    past->past_OutputConversionTargetStride = 1;
+    
+    if( nativeOutputSampleFormat != past->past_OutputSampleFormat )
+    {
+        int ifDither = (past->past_Flags & paDitherOff) == 0;
+        int ifClip = (past->past_Flags & paClipOff) == 0;
+
+        past->past_OutputConversionProc = PaConvert_SelectProc( past->past_OutputSampleFormat,
+            nativeOutputSampleFormat, ifClip, ifDither );
+        if( past->past_OutputConversionProc == NULL ) return paSampleFormatNotSupported;
+    }
+    else
+    {
+        past->past_OutputConversionProc = NULL; /* no conversion necessary */
+    }
+    
+    return paNoError;
+}
+
+/*************************************************************************
+** Called by host code.
+** Convert input from native format to user format,
+** call user code,
+** then convert output to native format.
+** Returns result from user callback.
+*/
+long PaConvert_Process( internalPortAudioStream   *past,
+                            void *nativeInputBuffer,
+                            void *nativeOutputBuffer )
+{
+    int               userResult;
+    void             *inputBuffer = NULL;
+    void             *outputBuffer = NULL;
+
+    /* Get native input data. */
+    if( (past->past_NumInputChannels > 0) && (nativeInputBuffer != NULL) )
+    {
+        if( past->past_InputSampleFormat == past->past_NativeInputSampleFormat )
+        {
+        /*  Already in native format so just read directly from native buffer. */
+            inputBuffer =  nativeInputBuffer;
+        }
+        else
+        {
+            inputBuffer = past->past_InputBuffer;
+        /* Convert input data to user format. */
+            (*past->past_InputConversionProc)(nativeInputBuffer, past->past_InputConversionSourceStride,
+                inputBuffer, past->past_InputConversionTargetStride,
+                past->past_FramesPerUserBuffer * past->past_NumInputChannels );
+        }
+    }
+
+    /* Are we doing output? */
+    if( (past->past_NumOutputChannels > 0) && (nativeOutputBuffer != NULL) )
+    {
+        outputBuffer = (past->past_OutputConversionProc == NULL) ?
+                       nativeOutputBuffer : past->past_OutputBuffer;
+    }
+    /*
+     AddTraceMessage("Pa_CallConvertInt16: inputBuffer = ", (int) inputBuffer );
+     AddTraceMessage("Pa_CallConvertInt16: outputBuffer = ", (int) outputBuffer );
+    */
+    /* Call user callback routine. */
+    userResult = past->past_Callback(
+                     inputBuffer,
+                     outputBuffer,
+                     past->past_FramesPerUserBuffer,
+                     past->past_FrameCount,
+                     past->past_UserData );
+
+    /* Advance frame counter for timestamp. */
+    past->past_FrameCount += past->past_FramesPerUserBuffer; // FIXME - should this be in here?
+
+    /* Convert to native format if necessary. */
+    if( (past->past_OutputConversionProc != NULL ) && (outputBuffer != NULL) )
+    {
+        (*past->past_OutputConversionProc)( outputBuffer, past->past_OutputConversionSourceStride,
+            nativeOutputBuffer, past->past_OutputConversionTargetStride,
+            past->past_FramesPerUserBuffer * past->past_NumOutputChannels );
+    }
+
+    return userResult;
+}
diff --git a/src/portaudio/pa_host.h b/src/portaudio/pa_host.h
new file mode 100644
index 0000000..e9dfe48
--- /dev/null
+++ b/src/portaudio/pa_host.h
@@ -0,0 +1,191 @@
+#ifndef PA_HOST_H
+#define PA_HOST_H
+
+/*
+ * $Id: pa_host.h,v 1.3.4.1 2003/02/11 21:33:58 philburk Exp $
+ * Host dependant internal API for PortAudio
+ *
+ * Author: Phil Burk  <philburk at softsynth.com>
+ *
+ * PortAudio Portable Real-Time Audio Library
+ * Latest Version at: http://www.softsynth.com/portaudio/
+ * DirectSound and Macintosh Implementation
+ * Copyright (c) 1999-2000 Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), 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:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+ 
+#include "portaudio.h"
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#ifndef SUPPORT_AUDIO_CAPTURE
+#define SUPPORT_AUDIO_CAPTURE  (1)
+#endif
+
+#ifndef int32
+    typedef long int32;
+#endif
+#ifndef uint32
+    typedef unsigned long uint32;
+#endif
+#ifndef int16
+    typedef short int16;
+#endif
+#ifndef uint16
+    typedef unsigned short uint16;
+#endif
+
+/* Used to convert between various sample formats. */
+typedef void (PortAudioConverter)(
+    void *inputBuffer, int inputStride,
+    void *outputBuffer, int outputStride,
+    int numSamples );
+
+#define PA_MAGIC    (0x18273645)
+
+/************************************************************************************/
+/****************** Structures ******************************************************/
+/************************************************************************************/
+
+typedef struct internalPortAudioStream
+{
+    uint32                    past_Magic;  /* ID for struct to catch bugs. */
+    
+    /* Begin user specified information. */
+    uint32                    past_FramesPerUserBuffer;
+    uint32                    past_NumUserBuffers;
+    double                    past_SampleRate;     /* Closest supported sample rate. */
+    int                       past_NumInputChannels;
+    int                       past_NumOutputChannels;
+    PaDeviceID                past_InputDeviceID;
+    PaDeviceID                past_OutputDeviceID;
+    PaSampleFormat            past_InputSampleFormat;
+    PaSampleFormat            past_OutputSampleFormat;
+    PortAudioCallback        *past_Callback;
+    void                     *past_UserData;
+    uint32                    past_Flags;
+    /* End user specified information. */
+    
+    void                     *past_DeviceData;
+    PaSampleFormat            past_NativeOutputSampleFormat;
+    PaSampleFormat            past_NativeInputSampleFormat;
+
+    /* Flags for communicating between foreground and background. */
+    volatile int              past_IsActive;      /* Background is still playing. */
+    volatile int              past_StopSoon;      /* Background should keep playing when buffers empty. */
+    volatile int              past_StopNow;       /* Background should stop playing now. */
+    /* These buffers are used when the native format does not match the user format. */
+    void                     *past_InputBuffer;
+    uint32                    past_InputBufferSize; /* Size in bytes of the input buffer. */
+    void                     *past_OutputBuffer;
+    uint32                    past_OutputBufferSize;
+    /* Measurements */
+    uint32                    past_NumCallbacks;
+    PaTimestamp               past_FrameCount;    /* Frames output to buffer. */
+    /* For measuring CPU utilization. */
+    double                    past_AverageInsideCount;
+    double                    past_AverageTotalCount;
+    double                    past_Usage;
+    int                       past_IfLastExitValid;
+    /* Format Conversion */
+    /* These are setup by PaConversion_Setup() */
+    PortAudioConverter       *past_InputConversionProc;
+    int                       past_InputConversionSourceStride;
+    int                       past_InputConversionTargetStride;
+    PortAudioConverter       *past_OutputConversionProc;
+    int                       past_OutputConversionSourceStride;
+    int                       past_OutputConversionTargetStride;
+}
+internalPortAudioStream;
+
+/************************************************************************************/
+/******** These functions must be provided by a platform implementation. ************/
+/************************************************************************************/
+
+PaError PaHost_Init( void );
+PaError PaHost_Term( void );
+
+PaError PaHost_OpenStream( internalPortAudioStream   *past );
+PaError PaHost_CloseStream( internalPortAudioStream   *past );
+
+PaError PaHost_StartOutput( internalPortAudioStream   *past );
+PaError PaHost_StopOutput( internalPortAudioStream   *past, int abort );
+PaError PaHost_StartInput( internalPortAudioStream   *past );
+PaError PaHost_StopInput( internalPortAudioStream   *past, int abort );
+PaError PaHost_StartEngine( internalPortAudioStream   *past );
+PaError PaHost_StopEngine( internalPortAudioStream *past, int abort );
+PaError PaHost_StreamActive( internalPortAudioStream   *past );
+
+void   *PaHost_AllocateFastMemory( long numBytes );
+void    PaHost_FreeFastMemory( void *addr, long numBytes );
+
+/* This only called if PA_VALIDATE_RATE IS CALLED. */
+PaError PaHost_ValidateSampleRate( PaDeviceID id, double requestedFrameRate,
+                                   double *closestFrameRatePtr );
+/***************** Extension for LinPSK /DarwinPSK ********************/
+PaError PaHost_SetInputVolume(PaDeviceID DeviceID,uint32 channel,int Volume);
+PaError PaHost_SetOutputVolume(PaDeviceID DeviceID,uint32 channel,int Volume);
+/**********************************************************************/
+/************ Common Utility Routines provided by PA ******************/
+/**********************************************************************/
+
+/* PaHost_IsInitialized() returns non-zero if PA is initialized, 0 otherwise */
+int PaHost_IsInitialized( void );
+
+internalPortAudioStream* PaHost_GetStreamRepresentation( PortAudioStream *stream );
+
+int PaHost_FindClosestTableEntry( double allowableError,  const double *rateTable,
+                                  int numRates, double frameRate );
+
+long Pa_CallConvertInt16( internalPortAudioStream   *past,
+                          short *nativeInputBuffer,
+                          short *nativeOutputBuffer );
+                          
+/* Calculate 2 LSB dither signal with a triangular distribution.
+** Ranged properly for adding to a 32 bit 1.31 fixed point value prior to >>15.
+** Range of output is +/- 65535
+** Multiply by PA_DITHER_SCALE to get a float between -2.0 and 2.0. */
+#define PA_DITHER_BITS   (15)
+#define PA_DITHER_SCALE  (1.0f / ((1<<PA_DITHER_BITS)-1))
+long PaConvert_TriangularDither( void );
+
+PaError PaConvert_SetupInput( internalPortAudioStream   *past,
+    PaSampleFormat   nativeInputSampleFormat );
+
+PaError PaConvert_SetupOutput( internalPortAudioStream   *past,
+    PaSampleFormat   nativeOutputSampleFormat );
+
+long PaConvert_Process( internalPortAudioStream   *past,
+            void *nativeInputBuffer,
+            void *nativeOutputBuffer );
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* PA_HOST_H */
diff --git a/src/portaudio/pa_lib.c b/src/portaudio/pa_lib.c
new file mode 100644
index 0000000..fc5cdd5
--- /dev/null
+++ b/src/portaudio/pa_lib.c
@@ -0,0 +1,833 @@
+/*
+ * $Id: pa_lib.c,v 1.3.4.2 2003/03/15 02:50:14 pieter Exp $
+ * Portable Audio I/O Library
+ * Host Independant Layer
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2000 Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), 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:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARCant't set Input Volume.\nISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+/* Modification History:
+ PLB20010422 - apply Mike Berry's changes for CodeWarrior on PC
+ PLB20010820 - fix dither and shift for recording PaUInt8 format 
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+
+/* PLB20010422 - "memory.h" doesn't work on CodeWarrior for PC. Thanks Mike Berry for the mod. */
+#ifdef _WIN32
+#ifndef __MWERKS__
+#include <memory.h>
+#endif  /* __MWERKS__ */
+#else   /* !_WIN32 */
+#include <memory.h>
+#endif  /* _WIN32 */
+
+#include "portaudio.h"
+#include "pa_host.h"
+#include "pa_trace.h"
+
+/* The reason we might NOT want to validate the rate before opening the stream
+ * is because many DirectSound drivers lie about the rates they actually support.
+ */
+#define PA_VALIDATE_RATE    (0)   /* If true validate sample rate against driver info. */
+
+/*
+O- maybe not allocate past_InputBuffer and past_OutputBuffer if not needed for conversion
+*/
+
+#ifndef FALSE
+ #define FALSE  (0)
+ #define TRUE   (!FALSE)
+#endif
+
+#define PRINT(x) { printf x; fflush(stdout); }
+#define ERR_RPT(x) PRINT(x)
+#define DBUG(x)  /* PRINT(x) */
+#define DBUGX(x) /* PRINT(x) */
+
+static int gInitCount = 0; /* Count number of times Pa_Initialize() called to allow nesting and overlapping. */
+
+static PaError Pa_KillStream(  PortAudioStream *stream, int abort );
+
+/***********************************************************************/
+int PaHost_FindClosestTableEntry( double allowableError,  const double *rateTable, int numRates, double frameRate )
+{
+    double err, minErr = allowableError;
+    int i, bestFit = -1;
+
+    for( i=0; i<numRates; i++ )
+    {
+        err = fabs( frameRate - rateTable[i] );
+        if( err < minErr )
+        {
+            minErr = err;
+            bestFit = i;
+        }
+    }
+    return bestFit;
+}
+
+/**************************************************************************
+** Make sure sample rate is legal and also convert to enumeration for driver.
+*/
+PaError PaHost_ValidateSampleRate( PaDeviceID id, double requestedFrameRate,
+                                   double *closestFrameRatePtr )
+{
+    long bestRateIndex;
+    const PaDeviceInfo *pdi;
+    pdi = Pa_GetDeviceInfo( id );
+    if( pdi == NULL )
+    {
+        return paInvalidDeviceId;
+    }
+
+    if( pdi->numSampleRates == -1 )
+    {
+        /* Is it out of range? */
+        if( (requestedFrameRate < pdi->sampleRates[0]) ||
+                (requestedFrameRate > pdi->sampleRates[1]) )
+        {
+            return paInvalidSampleRate;
+        }
+
+        *closestFrameRatePtr = requestedFrameRate;
+    }
+    else
+    {
+        bestRateIndex = PaHost_FindClosestTableEntry( 1.0, pdi->sampleRates, pdi->numSampleRates, requestedFrameRate );
+        if( bestRateIndex < 0 ) return paInvalidSampleRate;
+        *closestFrameRatePtr = pdi->sampleRates[bestRateIndex];
+    }
+    return paNoError;
+}
+
+/*************************************************************************/
+PaError Pa_OpenStream(
+    PortAudioStream** streamPtrPtr,
+    PaDeviceID inputDeviceID,
+    int numInputChannels,
+    PaSampleFormat inputSampleFormat,
+    void *inputDriverInfo,
+    PaDeviceID outputDeviceID,
+    int numOutputChannels,
+    PaSampleFormat outputSampleFormat,
+    void *outputDriverInfo,
+    double sampleRate,
+    unsigned long framesPerBuffer,
+    unsigned long numberOfBuffers,
+    unsigned long streamFlags,
+    PortAudioCallback *callback,
+    void *userData )
+{
+    internalPortAudioStream   *past = NULL;
+    PaError                    result = paNoError;
+    int                        bitsPerInputSample;
+    int                        bitsPerOutputSample;
+    /* Print passed parameters. */
+    DBUG(("Pa_OpenStream( %p, %d, %d, %d, %p, /* input */ \n",
+          streamPtrPtr, inputDeviceID, numInputChannels,
+          inputSampleFormat, inputDriverInfo ));
+    DBUG(("               %d, %d, %d, %p, /* output */\n",
+          outputDeviceID, numOutputChannels,
+          outputSampleFormat, outputDriverInfo ));
+    DBUG(("               %g, %d, %d, 0x%x, , %p )\n",
+          sampleRate, framesPerBuffer, numberOfBuffers,
+          streamFlags, userData ));
+
+    /* Check for parameter errors. */
+    if( (streamFlags & ~(paClipOff | paDitherOff)) != 0 ) return paInvalidFlag;
+    if( streamPtrPtr == NULL ) return paBadStreamPtr;
+    if( inputDriverInfo != NULL ) return paHostError; /* REVIEW */
+    if( outputDriverInfo != NULL ) return paHostError; /* REVIEW */
+    if( (inputDeviceID < 0) && ( outputDeviceID < 0) ) return paInvalidDeviceId;
+    if( (outputDeviceID >= Pa_CountDevices()) || (inputDeviceID >= Pa_CountDevices()) )
+    {
+        return paInvalidDeviceId;
+    }
+    if( (numInputChannels <= 0) && ( numOutputChannels <= 0) ) return paInvalidChannelCount;
+
+#if SUPPORT_AUDIO_CAPTURE
+    if( inputDeviceID >= 0 )
+    {
+        PaError size = Pa_GetSampleSize( inputSampleFormat );
+        if( size < 0 ) return size;
+        bitsPerInputSample = 8 * size;
+        if( (numInputChannels <= 0) ) return paInvalidChannelCount;
+    }
+#else
+    if( inputDeviceID >= 0 )
+    {
+        return paInvalidChannelCount;
+    }
+#endif /* SUPPORT_AUDIO_CAPTURE */
+    else
+    {
+        if( numInputChannels > 0 ) return paInvalidChannelCount;
+        bitsPerInputSample = 0;
+    }
+
+    if( outputDeviceID >= 0 )
+    {
+        PaError size = Pa_GetSampleSize( outputSampleFormat );
+        if( size < 0 ) return size;
+        bitsPerOutputSample = 8 * size;
+        if( (numOutputChannels <= 0) ) return paInvalidChannelCount;
+    }
+    else
+    {
+        if( numOutputChannels > 0 ) return paInvalidChannelCount;
+        bitsPerOutputSample = 0;
+    }
+
+    if( callback == NULL ) return paNullCallback;
+
+    /* Allocate and clear stream structure. */
+    past = (internalPortAudioStream *) PaHost_AllocateFastMemory( sizeof(internalPortAudioStream) );
+    if( past == NULL ) return paInsufficientMemory;
+    memset( past, 0, sizeof(internalPortAudioStream) );
+    AddTraceMessage("Pa_OpenStream: past", (long) past );
+
+    past->past_Magic = PA_MAGIC;  /* Set ID to catch bugs. */
+    past->past_FramesPerUserBuffer = framesPerBuffer;
+    past->past_NumUserBuffers = numberOfBuffers; /* NOTE - PaHost_OpenStream() MUST CHECK FOR ZERO! */
+    past->past_Callback = callback;
+    past->past_UserData = userData;
+    past->past_OutputSampleFormat = outputSampleFormat;
+    past->past_InputSampleFormat = inputSampleFormat;
+    past->past_OutputDeviceID = outputDeviceID;
+    past->past_InputDeviceID = inputDeviceID;
+    past->past_NumInputChannels = numInputChannels;
+    past->past_NumOutputChannels = numOutputChannels;
+    past->past_Flags = streamFlags;
+
+    /* Check for absurd sample rates. */
+    if( (sampleRate < 1000.0) || (sampleRate > 200000.0) )
+    {
+        result = paInvalidSampleRate;
+        goto cleanup;
+    }
+
+    /* Allocate buffers that may be used for format conversion from user to native buffers. */
+    if( numInputChannels > 0 )
+    {
+
+#if PA_VALIDATE_RATE
+        result = PaHost_ValidateSampleRate( inputDeviceID, sampleRate, &past->past_SampleRate );
+        if( result < 0 )
+        {
+            goto cleanup;
+        }
+#else
+        past->past_SampleRate = sampleRate;
+#endif
+        /* Allocate single Input buffer for passing formatted samples to user callback. */
+        past->past_InputBufferSize = framesPerBuffer * numInputChannels * ((bitsPerInputSample+7) / 8);
+        past->past_InputBuffer = PaHost_AllocateFastMemory(past->past_InputBufferSize);
+        if( past->past_InputBuffer == NULL )
+        {
+            result = paInsufficientMemory;
+            goto cleanup;
+        }
+    }
+    else
+    {
+        past->past_InputBuffer = NULL;
+    }
+
+    /* Allocate single Output buffer. */
+    if( numOutputChannels > 0 )
+    {
+#if PA_VALIDATE_RATE
+        result = PaHost_ValidateSampleRate( outputDeviceID, sampleRate, &past->past_SampleRate );
+        if( result < 0 )
+        {
+            goto cleanup;
+        }
+#else
+        past->past_SampleRate = sampleRate;
+#endif
+        past->past_OutputBufferSize = framesPerBuffer * numOutputChannels * ((bitsPerOutputSample+7) / 8);
+        past->past_OutputBuffer = PaHost_AllocateFastMemory(past->past_OutputBufferSize);
+        if( past->past_OutputBuffer == NULL )
+        {
+            result = paInsufficientMemory;
+            goto cleanup;
+        }
+    }
+    else
+    {
+        past->past_OutputBuffer = NULL;
+    }
+
+    result = PaHost_OpenStream( past );
+    if( result < 0 ) goto cleanup;
+
+    *streamPtrPtr = (void *) past;
+
+    return result;
+
+cleanup:
+    if( past != NULL ) Pa_CloseStream( past );
+    *streamPtrPtr = NULL;
+    return result;
+}
+
+
+/*************************************************************************/
+PaError Pa_OpenDefaultStream( PortAudioStream** stream,
+                              int numInputChannels,
+                              int numOutputChannels,
+                              PaSampleFormat sampleFormat,
+                              double sampleRate,
+                              unsigned long framesPerBuffer,
+                              unsigned long numberOfBuffers,
+                              PortAudioCallback *callback,
+                              void *userData )
+{
+    return Pa_OpenStream(
+               stream,
+               ((numInputChannels > 0) ? Pa_GetDefaultInputDeviceID() : paNoDevice),
+               numInputChannels, sampleFormat, NULL,
+               ((numOutputChannels > 0) ? Pa_GetDefaultOutputDeviceID() : paNoDevice),
+               numOutputChannels, sampleFormat, NULL,
+               sampleRate, framesPerBuffer, numberOfBuffers, paNoFlag, callback, userData );
+}
+
+/*************************************************************************/
+PaError Pa_CloseStream( PortAudioStream* stream)
+{
+    PaError   result;
+    internalPortAudioStream   *past;
+
+    DBUG(("Pa_CloseStream()\n"));
+    if( stream == NULL ) return paBadStreamPtr;
+    past = (internalPortAudioStream *) stream;
+
+    Pa_AbortStream( past );
+    result = PaHost_CloseStream( past );
+
+    if( past->past_InputBuffer ) PaHost_FreeFastMemory( past->past_InputBuffer, past->past_InputBufferSize );
+    if( past->past_OutputBuffer ) PaHost_FreeFastMemory( past->past_OutputBuffer, past->past_OutputBufferSize );
+    PaHost_FreeFastMemory( past, sizeof(internalPortAudioStream) );
+
+    return result;
+}
+
+/*************************************************************************/
+PaError Pa_StartStream( PortAudioStream *stream )
+{
+    PaError result = paHostError;
+    internalPortAudioStream   *past;
+
+    if( stream == NULL ) return paBadStreamPtr;
+    past = (internalPortAudioStream *) stream;
+
+    past->past_FrameCount = 0.0;
+
+    if( past->past_NumInputChannels > 0 )
+    {
+        result = PaHost_StartInput( past );
+        DBUG(("Pa_StartStream: PaHost_StartInput returned = 0x%X.\n", result));
+        if( result < 0 ) goto error;
+    }
+
+    if( past->past_NumOutputChannels > 0 )
+    {
+        result = PaHost_StartOutput( past );
+        DBUG(("Pa_StartStream: PaHost_StartOutput returned = 0x%X.\n", result));
+        if( result < 0 ) goto error;
+    }
+
+    result = PaHost_StartEngine( past );
+    DBUG(("Pa_StartStream: PaHost_StartEngine returned = 0x%X.\n", result));
+    if( result < 0 ) goto error;
+
+    return paNoError;
+
+error:
+    return result;
+}
+
+/*************************************************************************/
+PaError Pa_StopStream(  PortAudioStream *stream )
+{
+    return Pa_KillStream( stream, 0 );
+}
+
+/*************************************************************************/
+PaError Pa_AbortStream(  PortAudioStream *stream )
+{
+    return Pa_KillStream( stream, 1 );
+}
+
+/*************************************************************************/
+static PaError Pa_KillStream(  PortAudioStream *stream, int abort )
+{
+    PaError result = paNoError;
+    internalPortAudioStream   *past;
+
+    DBUG(("Pa_StopStream().\n"));
+    if( stream == NULL ) return paBadStreamPtr;
+    past = (internalPortAudioStream *) stream;
+
+    if( (past->past_NumInputChannels > 0) || (past->past_NumOutputChannels > 0) )
+    {
+        result = PaHost_StopEngine( past, abort );
+        DBUG(("Pa_StopStream: PaHost_StopEngine returned = 0x%X.\n", result));
+        if( result < 0 ) goto error;
+    }
+
+    if( past->past_NumInputChannels > 0 )
+    {
+        result = PaHost_StopInput( past, abort );
+        DBUG(("Pa_StopStream: PaHost_StopInput returned = 0x%X.\n", result));
+        if( result != paNoError ) goto error;
+    }
+
+    if( past->past_NumOutputChannels > 0 )
+    {
+        result = PaHost_StopOutput( past, abort );
+        DBUG(("Pa_StopStream: PaHost_StopOutput returned = 0x%X.\n", result));
+        if( result != paNoError ) goto error;
+    }
+
+error:
+    past->past_Usage = 0;
+    past->past_IfLastExitValid = 0;
+
+    return result;
+}
+
+/*************************************************************************/
+PaError Pa_StreamActive( PortAudioStream *stream )
+{
+    internalPortAudioStream   *past;
+    if( stream == NULL ) return paBadStreamPtr;
+    past = (internalPortAudioStream *) stream;
+    return PaHost_StreamActive( past );
+}
+
+/*************************************************************************/
+const char *Pa_GetErrorText( PaError errnum )
+{
+    const char *msg;
+
+    switch(errnum)
+    {
+    case paNoError:                  msg = "Success"; break;
+    case paHostError:                msg = "Host error."; break;
+    case paInvalidChannelCount:      msg = "Invalid number of channels."; break;
+    case paInvalidSampleRate:        msg = "Invalid sample rate."; break;
+    case paInvalidDeviceId:          msg = "Invalid device ID."; break;
+    case paInvalidFlag:              msg = "Invalid flag."; break;
+    case paSampleFormatNotSupported: msg = "Sample format not supported"; break;
+    case paBadIODeviceCombination:   msg = "Illegal combination of I/O devices."; break;
+    case paInsufficientMemory:       msg = "Insufficient memory."; break;
+    case paBufferTooBig:             msg = "Buffer too big."; break;
+    case paBufferTooSmall:           msg = "Buffer too small."; break;
+    case paNullCallback:             msg = "No callback routine specified."; break;
+    case paBadStreamPtr:             msg = "Invalid stream pointer."; break;
+    case paTimedOut    :             msg = "Wait Timed Out."; break;
+    case paInternalError:            msg = "Internal PortAudio Error."; break;
+    case paDeviceUnavailable:        msg = "Device Unavailable."; break;
+    default:                         msg = "Illegal error number."; break;
+    }
+    return msg;
+}
+
+/*
+ Get CPU Load as a fraction of total CPU time.
+ A value of 0.5 would imply that PortAudio and the sound generating
+ callback was consuming roughly 50% of the available CPU time.
+ The amount may vary depending on CPU load.
+ This function may be called from the callback function.
+*/
+double Pa_GetCPULoad(  PortAudioStream* stream)
+{
+    internalPortAudioStream   *past;
+    if( stream == NULL ) return (double) paBadStreamPtr;
+    past = (internalPortAudioStream *) stream;
+    return past->past_Usage;
+}
+
+/*************************************************************************/
+internalPortAudioStream* PaHost_GetStreamRepresentation( PortAudioStream *stream )
+{
+    internalPortAudioStream* result = (internalPortAudioStream*) stream;
+
+    if( result == NULL || result->past_Magic != PA_MAGIC )
+        return NULL;
+    else
+        return result;
+}
+
+/*************************************************************
+** Calculate 2 LSB dither signal with a triangular distribution.
+** Ranged properly for adding to a 32 bit integer prior to >>15.
+** Range of output is +/- 32767
+*/
+#define PA_DITHER_BITS   (15)
+#define PA_DITHER_SCALE  (1.0f / ((1<<PA_DITHER_BITS)-1))
+long PaConvert_TriangularDither( void )
+{
+    static unsigned long previous = 0;
+    static unsigned long randSeed1 = 22222;
+    static unsigned long randSeed2 = 5555555;
+    long current, highPass;
+    /* Generate two random numbers. */
+    randSeed1 = (randSeed1 * 196314165) + 907633515;
+    randSeed2 = (randSeed2 * 196314165) + 907633515;
+    /* Generate triangular distribution about 0.
+     * Shift before adding to prevent overflow which would skew the distribution.
+     * Also shift an extra bit for the high pass filter. 
+     */
+#define DITHER_SHIFT  ((32 - PA_DITHER_BITS) + 1)
+    current = (((long)randSeed1)>>DITHER_SHIFT) + (((long)randSeed2)>>DITHER_SHIFT);
+    /* High pass filter to reduce audibility. */
+    highPass = current - previous;
+    previous = current;
+    return highPass;
+}
+
+/*************************************************************************
+** Called by host code.
+** Convert input from Int16, call user code, then convert output
+** to Int16 format for native use.
+** Assumes host native format is paInt16.
+** Returns result from user callback.
+*/
+long Pa_CallConvertInt16( internalPortAudioStream   *past,
+                          short *nativeInputBuffer,
+                          short *nativeOutputBuffer )
+{
+    long              temp;
+    int               userResult;
+    unsigned int      i;
+    void             *inputBuffer = NULL;
+    void             *outputBuffer = NULL;
+
+#if SUPPORT_AUDIO_CAPTURE
+    /* Get native data from DirectSound. */
+    if( (past->past_NumInputChannels > 0) && (nativeInputBuffer != NULL) )
+    {
+        /* Convert from native format to PA format. */
+        unsigned int samplesPerBuffer = past->past_FramesPerUserBuffer * past->past_NumInputChannels;
+        switch(past->past_InputSampleFormat)
+        {
+
+        case paFloat32:
+            {
+                float *inBufPtr = (float *) past->past_InputBuffer;
+                inputBuffer = past->past_InputBuffer;
+                for( i=0; i<samplesPerBuffer; i++ )
+                {
+                    inBufPtr[i] = nativeInputBuffer[i] * (1.0f / 32767.0f);
+                }
+                break;
+            }
+
+        case paInt32:
+            {
+                /* Convert 16 bit data to 32 bit integers */
+                int *inBufPtr = (int *) past->past_InputBuffer;
+                inputBuffer = past->past_InputBuffer;
+                for( i=0; i<samplesPerBuffer; i++ )
+                {
+                    inBufPtr[i] = nativeInputBuffer[i] << 16;
+                }
+                break;
+            }
+
+        case paInt16:
+            {
+                /* Already in correct format so don't copy. */
+                inputBuffer = nativeInputBuffer;
+                break;
+            }
+
+        case paInt8:
+            {
+                /* Convert 16 bit data to 8 bit chars */
+                char *inBufPtr = (char *) past->past_InputBuffer;
+                inputBuffer = past->past_InputBuffer;
+                if( past->past_Flags & paDitherOff )
+                {
+                    for( i=0; i<samplesPerBuffer; i++ )
+                    {
+                        inBufPtr[i] = (char)(nativeInputBuffer[i] >> 8);
+                    }
+                }
+                else
+                {
+                    for( i=0; i<samplesPerBuffer; i++ )
+                    {
+                        temp = nativeInputBuffer[i];
+                        temp += PaConvert_TriangularDither() >> 8; /* PLB20010820 */
+                        temp = ((temp < -0x8000) ? -0x8000 : ((temp > 0x7FFF) ? 0x7FFF : temp));
+                        inBufPtr[i] = (char)(temp >> 8);
+                    }
+                }
+                break;
+            }
+
+        case paUInt8:
+            {
+                /* Convert 16 bit data to 8 bit unsigned chars */
+                unsigned char *inBufPtr = (unsigned char *) past->past_InputBuffer;
+                inputBuffer = past->past_InputBuffer;
+                if( past->past_Flags & paDitherOff )
+                {
+                    for( i=0; i<samplesPerBuffer; i++ )
+                    {
+                        inBufPtr[i] = (unsigned char)((nativeInputBuffer[i] >> 8) + 0x80);
+                    }
+                }
+                else
+                {
+                    /* If you dither then you have to clip because dithering could push the signal out of range! */
+                    for( i=0; i<samplesPerBuffer; i++ )
+                    {
+                        temp = nativeInputBuffer[i];
+                        temp += PaConvert_TriangularDither() >> 8; /* PLB20010820 */
+                        temp = ((temp < -0x8000) ? -0x8000 : ((temp > 0x7FFF) ? 0x7FFF : temp));
+                        inBufPtr[i] = (unsigned char)((temp>>8) + 0x80); /* PLB20010820 */
+                    }
+                }
+                break;
+            }
+
+        default:
+            break;
+        }
+    }
+#endif /* SUPPORT_AUDIO_CAPTURE */
+
+    /* Are we doing output time? */
+    if( (past->past_NumOutputChannels > 0) && (nativeOutputBuffer != NULL) )
+    {
+        /* May already be in native format so just write directly to native buffer. */
+        outputBuffer = (past->past_OutputSampleFormat == paInt16) ?
+                       (void*)nativeOutputBuffer : past->past_OutputBuffer;
+    }
+    /*
+     AddTraceMessage("Pa_CallConvertInt16: inputBuffer = ", (int) inputBuffer );
+     AddTraceMessage("Pa_CallConvertInt16: outputBuffer = ", (int) outputBuffer );
+    */
+    /* Call user callback routine. */
+    userResult = past->past_Callback(
+                     inputBuffer,
+                     outputBuffer,
+                     past->past_FramesPerUserBuffer,
+                     past->past_FrameCount,
+                     past->past_UserData );
+
+    past->past_FrameCount += (PaTimestamp) past->past_FramesPerUserBuffer;
+
+    /* Convert to native format if necessary. */
+    if( outputBuffer != NULL )
+    {
+        unsigned int samplesPerBuffer = past->past_FramesPerUserBuffer * past->past_NumOutputChannels;
+        switch(past->past_OutputSampleFormat)
+        {
+        case paFloat32:
+            {
+                float *outBufPtr = (float *) past->past_OutputBuffer;
+                if( past->past_Flags & paDitherOff )
+                {
+                    if( past->past_Flags & paClipOff ) /* NOTHING */
+                    {
+                        for( i=0; i<samplesPerBuffer; i++ )
+                        {
+                            *nativeOutputBuffer++ = (short) (outBufPtr[i] * (32767.0f));
+                        }
+                    }
+                    else /* CLIP */
+                    {
+                        for( i=0; i<samplesPerBuffer; i++ )
+                        {
+                            temp = (long)(outBufPtr[i] * 32767.0f);
+                            *nativeOutputBuffer++ = (short)((temp < -0x8000) ? -0x8000 : ((temp > 0x7FFF) ? 0x7FFF : temp));
+                        }
+                    }
+                }
+                else
+                {
+                    /* If you dither then you have to clip because dithering could push the signal out of range! */
+                    for( i=0; i<samplesPerBuffer; i++ )
+                    {
+                        float dither  = PaConvert_TriangularDither()*PA_DITHER_SCALE;
+                        float dithered = (outBufPtr[i] * (32767.0f)) + dither;
+                        temp = (long) (dithered);
+                        *nativeOutputBuffer++ = (short)((temp < -0x8000) ? -0x8000 : ((temp > 0x7FFF) ? 0x7FFF : temp));
+                    }
+                }
+                break;
+            }
+
+        case paInt32:
+            {
+                int *outBufPtr = (int *) past->past_OutputBuffer;
+                if( past->past_Flags & paDitherOff )
+                {
+                    for( i=0; i<samplesPerBuffer; i++ )
+                    {
+                        *nativeOutputBuffer++ = (short) (outBufPtr[i] >> 16 );
+                    }
+                }
+                else
+                {
+                    for( i=0; i<samplesPerBuffer; i++ )
+                    {
+                        /* Shift one bit down before dithering so that we have room for overflow from add. */
+                        temp = (outBufPtr[i] >> 1) + PaConvert_TriangularDither();
+                        temp = temp >> 15;
+                        *nativeOutputBuffer++ = (short)((temp < -0x8000) ? -0x8000 : ((temp > 0x7FFF) ? 0x7FFF : temp));
+                    }
+                }
+                break;
+            }
+
+        case paInt8:
+            {
+                char *outBufPtr = (char *) past->past_OutputBuffer;
+                for( i=0; i<samplesPerBuffer; i++ )
+                {
+                    *nativeOutputBuffer++ = (short) (((int)outBufPtr[i]) << 8);
+                }
+                break;
+            }
+
+        case paUInt8:
+            {
+                unsigned char *outBufPtr = (unsigned char *) past->past_OutputBuffer;
+                for( i=0; i<samplesPerBuffer; i++ )
+                {
+                    *nativeOutputBuffer++ = (short) (((int)(outBufPtr[i] - 0x80)) << 8);
+                }
+                break;
+            }
+
+        default:
+            break;
+        }
+
+    }
+
+    return userResult;
+}
+
+/*************************************************************************/
+PaError Pa_Initialize( void )
+{
+    if( gInitCount++ > 0 ) return paNoError;
+    ResetTraceMessages();
+    return PaHost_Init();
+}
+
+PaError Pa_Terminate( void )
+{
+    PaError result = paNoError;
+
+    if( gInitCount == 0 ) return paNoError;
+    else if( --gInitCount == 0 )
+    {
+        result = PaHost_Term();
+        DumpTraceMessages();
+    }
+    return result;
+}
+
+int PaHost_IsInitialized()
+{
+    return gInitCount;
+}
+
+/*************************************************************************/
+PaError Pa_GetSampleSize( PaSampleFormat format )
+{
+    int size;
+    switch(format )
+    {
+
+    case paUInt8:
+    case paInt8:
+        size = 1;
+        break;
+
+    case paInt16:
+        size = 2;
+        break;
+
+    case paPackedInt24:
+        size = 3;
+        break;
+
+    case paFloat32:
+    case paInt32:
+    case paInt24:
+        size = 4;
+        break;
+
+    default:
+        size = paSampleFormatNotSupported;
+        break;
+    }
+    return (PaError) size;
+}
+
+/**************************** extension for LinPSK / DarwinPSK **********/
+/**
+PaError Pa_SetInputVolume(PaDeviceID Device, int Channel, float Volume )
+{
+ // Check, if DeviceID is valid
+ if( (Device < 0) || (Device > Pa_CountDevices() ) )
+   return paInvalidDeviceId;
+ if ( (Volume < 0) || (Volume > 100 ) )
+  return paInternalError; // Perhaps an extra errorcode would be better
+ if (Channel < 0 )
+ return paInvalidChannelCount; 
+// Now set the Volume ( Host specific)
+return PaHost_SetInputVolume(Device,Channel,Volume);
+}
+
+PaError Pa_SetOutputVolume(PaDeviceID Device, int Channel, float Volume )
+{
+ // Check, if DeviceID is valid
+ if( (Device < 0) || (Device > Pa_CountDevices() ) )
+   return paInvalidDeviceId;
+ if ( (Volume < 0) || (Volume > 100 ) )
+  return paInternalError; // Perhaps an extra errorcode would be better
+ if (Channel < 0 )
+ return paInvalidChannelCount; 
+// Now set the Volume ( Host specific)
+return PaHost_SetOutputVolume(Device,Channel,Volume);
+}
+**/
diff --git a/src/portaudio/pa_trace.c b/src/portaudio/pa_trace.c
new file mode 100644
index 0000000..d55a6d3
--- /dev/null
+++ b/src/portaudio/pa_trace.c
@@ -0,0 +1,83 @@
+/*
+ * $Id: pa_trace.c,v 1.1.1.1 2002/01/22 00:52:11 phil Exp $
+ * Portable Audio I/O Library Trace Facility
+ * Store trace information in real-time for later printing.
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2000 Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), 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:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "pa_trace.h"
+
+#if TRACE_REALTIME_EVENTS
+
+static char *traceTextArray[MAX_TRACE_RECORDS];
+static int traceIntArray[MAX_TRACE_RECORDS];
+static int traceIndex = 0;
+static int traceBlock = 0;
+
+/*********************************************************************/
+void ResetTraceMessages()
+{
+    traceIndex = 0;
+}
+
+/*********************************************************************/
+void DumpTraceMessages()
+{
+    int i;
+    int numDump = (traceIndex < MAX_TRACE_RECORDS) ? traceIndex : MAX_TRACE_RECORDS;
+
+    printf("DumpTraceMessages: traceIndex = %d\n", traceIndex );
+    for( i=0; i<numDump; i++ )
+    {
+        printf("%3d: %s = 0x%08X\n",
+               i, traceTextArray[i], traceIntArray[i] );
+    }
+    ResetTraceMessages();
+    fflush(stdout);
+}
+
+/*********************************************************************/
+void AddTraceMessage( char *msg, int data )
+{
+    if( (traceIndex == MAX_TRACE_RECORDS) && (traceBlock == 0) )
+    {
+        traceBlock = 1;
+        /*  DumpTraceMessages(); */
+    }
+    else if( traceIndex < MAX_TRACE_RECORDS )
+    {
+        traceTextArray[traceIndex] = msg;
+        traceIntArray[traceIndex] = data;
+        traceIndex++;
+    }
+}
+
+#endif
diff --git a/src/portaudio/pa_trace.h b/src/portaudio/pa_trace.h
new file mode 100644
index 0000000..d0fc904
--- /dev/null
+++ b/src/portaudio/pa_trace.h
@@ -0,0 +1,67 @@
+#ifndef PA_TRACE_H
+#define PA_TRACE_H
+/*
+ * $Id: pa_trace.h,v 1.1.1.1 2002/01/22 00:52:11 phil Exp $
+ * Portable Audio I/O Library Trace Facility
+ * Store trace information in real-time for later printing.
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2000 Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), 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:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#define TRACE_REALTIME_EVENTS     (0)   /* Keep log of various real-time events. */
+#define MAX_TRACE_RECORDS      (2048)
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+    /************************************************************************************/
+    /****************** Prototypes ******************************************************/
+    /************************************************************************************/
+
+#if TRACE_REALTIME_EVENTS
+
+    void DumpTraceMessages();
+    void ResetTraceMessages();
+    void AddTraceMessage( char *msg, int data );
+
+#else
+
+#define AddTraceMessage(msg,data) /* noop */
+#define ResetTraceMessages() /* noop */
+#define DumpTraceMessages() /* noop */
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* PA_TRACE_H */
diff --git a/src/portaudio/pa_unix.c b/src/portaudio/pa_unix.c
new file mode 100644
index 0000000..5af70bc
--- /dev/null
+++ b/src/portaudio/pa_unix.c
@@ -0,0 +1,1122 @@
+/*
+ * PortAudio Portable Real-Time Audio Library
+ * Latest Version at: http://www.portaudio.com
+ * Linux OSS Implementation by douglas repetto and Phil Burk
+ *
+ * Copyright (c) 1999-2000 Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), 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:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+/*
+Modification History
+  1/2001 - Phil Burk - initial hack for Linux
+  2/2001 - Douglas Repetto - many improvements, initial query support
+  4/2/2001 - Phil - stop/abort thread control, separate in/out native buffers
+  5/28/2001 - Phil - use pthread_create() instead of clone(). Thanks Stephen Brandon!
+       use pthread_join() after thread shutdown.
+  5/29/2001 - Phil - query for multiple devices, multiple formats,
+                     input mode and input+output mode working,
+       Pa_GetCPULoad() implemented.
+  PLB20010817 - Phil & Janos Haber - don't halt if test of sample rate fails.
+  SB20010904 - Stephen Brandon - mods needed for GNUSTEP and SndKit
+  JH20010905 - Janos Haber - FreeBSD mods
+  2001-09-22 - Heiko - (i.e. Heiko Purnhagen <purnhage at tnt.uni-hannover.de> ;-)
+                       added 24k and 16k to ratesToTry[]
+         fixed Pa_GetInternalDevice()
+         changed DEVICE_NAME_BASE from /dev/audio to /dev/dsp
+         handled SNDCTL_DSP_SPEED in Pq_QueryDevice() more graceful
+         fixed Pa_StreamTime() for paqa_errs.c
+         fixed numCannel=2 oddity and error handling in Pa_SetupDeviceFormat()
+         grep also for HP20010922 ...
+  PLB20010924 - Phil - merged Heiko's changes
+                       removed sNumDevices and potential related bugs,
+         use getenv("PA_MIN_LATENCY_MSEC") to set desired latency,
+         simplify CPU Load calculation by comparing real-time to framesPerBuffer,
+         always close device when querying even if error occurs,
+  PLB20010927 - Phil - Improved negotiation for numChannels.
+  SG20011005 - Stewart Greenhill - set numChannels back to reasonable value after query.
+  DH20010115 - David Herring - fixed uninitialized handle.
+
+  DM20020218 - Dominic Mazzoni - Try to open in nonblocking mode first, in case
+                                 the device is already open.  New implementation of
+                                 Pa_StreamTime that uses SNDCTL_DSP_GETOPTR but
+                                 uses our own counter to avoid wraparound.
+  PLB20020222 - Phil Burk - Added WatchDog proc if audio running at high priority.
+                      Check error return from read() and write().
+                      Check CPU endianness instead of assuming Little Endian.
+  20020621 - pa_unix_oss.c split into pa_unix.c, pa_unix.h, pa_unix_oss.c by
+         Augustus Saunders. Return values from usleep() ignored by Sam Bayer
+         because not cross-platform compatible (at least until we get configure
+         going). Pa_SetupDeviceFormat split into input and output sides to
+         reflect capabilities of Solaris.
+
+  20030206 - Martin Rohrbach - various mods for Solaris
+  
+  20030410 - Bjorn Dittmer-Roche - fixed numerous problems associated with pthread_t
+  
+  20030630 - Thomas Richter - eliminated unused variable warnings.
+
+TODO
+O- put semaphore lock around shared data?
+O- handle native formats better
+O- handle stereo-only device better ???
+O- what if input and output of a device capabilities differ (e.g. es1371) ???
+*/
+
+
+#include "pa_unix.h"
+
+typedef void *(*pthread_function_t)(void *);
+
+/************************************************* Shared Data ********/
+/* FIXME - put Mutex around this shared data. */
+static internalPortAudioDevice *sDeviceList = NULL;
+static int sDefaultInputDeviceID = paNoDevice;
+static int sDefaultOutputDeviceID = paNoDevice;
+static int sPaHostError = 0;
+
+/********************************* BEGIN CPU UTILIZATION MEASUREMENT ****/
+static void Pa_StartUsageCalculation( internalPortAudioStream   *past )
+{
+    PaHostSoundControl *pahsc = (PaHostSoundControl *) past->past_DeviceData;
+    if( pahsc == NULL ) return;
+    /* Query system timer for usage analysis and to prevent overuse of CPU. */
+    gettimeofday( &pahsc->pahsc_EntryTime, NULL );
+}
+
+static long SubtractTime_AminusB( struct timeval *timeA, struct timeval *timeB )
+{
+    long secs = timeA->tv_sec - timeB->tv_sec;
+    long usecs = secs * 1000000;
+    usecs += (timeA->tv_usec - timeB->tv_usec);
+    return usecs;
+}
+
+/******************************************************************************
+** Measure fractional CPU load based on real-time it took to calculate
+** buffers worth of output.
+*/
+static void Pa_EndUsageCalculation( internalPortAudioStream   *past )
+{
+    struct timeval currentTime;
+    long  usecsElapsed;
+    double newUsage;
+
+#define LOWPASS_COEFFICIENT_0   (0.95)
+#define LOWPASS_COEFFICIENT_1   (0.99999 - LOWPASS_COEFFICIENT_0)
+
+    PaHostSoundControl *pahsc = (PaHostSoundControl *) past->past_DeviceData;
+    if( pahsc == NULL ) return;
+
+    if( gettimeofday( &currentTime, NULL ) == 0 )
+    {
+        usecsElapsed = SubtractTime_AminusB( &currentTime, &pahsc->pahsc_EntryTime );
+        /* Use inverse because it is faster than the divide. */
+        newUsage =  usecsElapsed * pahsc->pahsc_InverseMicrosPerBuffer;
+
+        past->past_Usage = (LOWPASS_COEFFICIENT_0 * past->past_Usage) +
+                           (LOWPASS_COEFFICIENT_1 * newUsage);
+
+    }
+}
+/****************************************** END CPU UTILIZATION *******/
+
+/*********************************************************************
+ * Determines the number of available devices by trying to open
+ * each "/dev/dsp#" or "/dsp/audio#" in order until it fails.
+ * Add each working device to a singly linked list of devices.
+ */
+PaError Pa_QueryDevices( void )
+{
+    internalPortAudioDevice *pad, *lastPad;
+    int      go = 1;
+    int      numDevices = 0;
+    PaError  testResult;
+    PaError  result = paNoError;
+    char     *envdev;
+
+    sDefaultInputDeviceID = paNoDevice;
+    sDefaultOutputDeviceID = paNoDevice;
+
+    lastPad = NULL;
+
+    while( go )
+    {
+        /* Allocate structure to hold device info. */
+        pad = (internalPortAudioDevice *)
+              PaHost_AllocateFastMemory( sizeof(internalPortAudioDevice) );
+        if( pad == NULL ) return paInsufficientMemory;
+        memset( pad, 0, sizeof(internalPortAudioDevice) );
+
+        /* Build name for device. */
+        if( numDevices == 0 )
+        {
+            sprintf( pad->pad_DeviceName, DEVICE_NAME_BASE);
+        }
+        else
+        {
+            sprintf( pad->pad_DeviceName, DEVICE_NAME_BASE "%d", numDevices );
+        }
+
+        DBUG(("Try device %s\n", pad->pad_DeviceName ));
+        testResult = Pa_QueryDevice( pad->pad_DeviceName, pad );
+        DBUG(("Pa_QueryDevice returned %d\n", testResult ));
+        if( testResult != paNoError )
+        {
+            if( lastPad == NULL )
+            {
+                result = testResult; /* No good devices! */
+            }
+            go = 0;
+            PaHost_FreeFastMemory( pad, sizeof(internalPortAudioDevice) );
+        }
+        else
+        {
+            numDevices += 1;
+            /* Add to linked list of devices. */
+            if( lastPad )
+            {
+                lastPad->pad_Next = pad;
+            }
+            else
+            {
+                sDeviceList = pad; /* First element in linked list. */
+            }
+            lastPad = pad;
+        }
+    }
+
+    /* I'm sitting at a SunRay1 and I neither have /dev/audio# nor /dev/dsp#.
+       Instead, the correct audio device is stored in the environment variable
+       AUDIODEV and/or UTAUDIODEV, so check these devices as well if we haven't
+       checked them yet above  - MR */
+
+    DBUG(("Checking for AUDIODEV and UTAUDIODEV\n"));
+    envdev = getenv("AUDIODEV");
+    if (envdev != NULL && !strstr(envdev, DEVICE_NAME_BASE)) {
+        result = paNoError;
+
+        /* Allocate structure to hold device info. */
+        pad = (internalPortAudioDevice *)
+              PaHost_AllocateFastMemory( sizeof(internalPortAudioDevice) );
+        if( pad == NULL ) return paInsufficientMemory;
+        memset( pad, 0, sizeof(internalPortAudioDevice) );
+
+        /* Build name for device. */
+        strcpy(pad->pad_DeviceName, envdev);
+
+        DBUG(("Try device %s\n", pad->pad_DeviceName ));
+        testResult = Pa_QueryDevice( pad->pad_DeviceName, pad );
+        DBUG(("Pa_QueryDevice returned %d\n", testResult ));
+        if( testResult != paNoError )
+        {
+            if( lastPad == NULL )
+            {
+                result = testResult; /* No good devices! */
+            }
+            PaHost_FreeFastMemory( pad, sizeof(internalPortAudioDevice) );
+        }
+        else
+        {
+            numDevices += 1;
+            /* Add to linked list of devices. */
+            if( lastPad )
+            {
+                lastPad->pad_Next = pad;
+            }
+            else
+            {
+                sDeviceList = pad; /* First element in linked list. */
+            }
+            lastPad = pad;
+        }
+    }
+
+    envdev = getenv("UTAUDIODEV");
+    if (envdev != NULL && !strstr(envdev, DEVICE_NAME_BASE) && getenv("AUDIODEV") != NULL && strcmp(envdev, getenv("AUDIODEV"))) {
+        result = paNoError;
+
+        /* Allocate structure to hold device info. */
+        pad = (internalPortAudioDevice *)
+              PaHost_AllocateFastMemory( sizeof(internalPortAudioDevice) );
+        if( pad == NULL ) return paInsufficientMemory;
+        memset( pad, 0, sizeof(internalPortAudioDevice) );
+
+        /* Build name for device. */
+        strcpy(pad->pad_DeviceName, envdev);
+
+        DBUG(("Try device %s\n", pad->pad_DeviceName ));
+        testResult = Pa_QueryDevice( pad->pad_DeviceName, pad );
+        DBUG(("Pa_QueryDevice returned %d\n", testResult ));
+        if( testResult != paNoError )
+        {
+            if( lastPad == NULL )
+            {
+                result = testResult; /* No good devices! */
+            }
+            PaHost_FreeFastMemory( pad, sizeof(internalPortAudioDevice) );
+        }
+        else
+        {
+            numDevices += 1;
+            /* Add to linked list of devices. */
+            if( lastPad )
+            {
+                lastPad->pad_Next = pad;
+            }
+            else
+            {
+                sDeviceList = pad; /* First element in linked list. */
+            }
+            lastPad = pad;
+        }
+    }
+
+    return result;
+}
+
+/*************************************************************************/
+int Pa_CountDevices()
+{
+    int numDevices = 0;
+    internalPortAudioDevice *pad;
+
+    if( sDeviceList == NULL ) Pa_Initialize();
+    /* Count devices in list. */
+    pad = sDeviceList;
+    while( pad != NULL )
+    {
+        pad = pad->pad_Next;
+        numDevices++;
+    }
+
+    return numDevices;
+}
+
+/*************************************************************************/
+internalPortAudioDevice *Pa_GetInternalDevice( PaDeviceID id )
+{
+    internalPortAudioDevice *pad;
+    if( (id < 0) || ( id >= Pa_CountDevices()) ) return NULL;
+    pad = sDeviceList;
+    while( id > 0 )
+    {
+        pad = pad->pad_Next;
+        id--;
+    }
+    return pad;
+}
+
+/*************************************************************************/
+const PaDeviceInfo* Pa_GetDeviceInfo( PaDeviceID id )
+{
+    internalPortAudioDevice *pad;
+    if( (id < 0) || ( id >= Pa_CountDevices()) ) return NULL;
+    pad = Pa_GetInternalDevice( id );
+    return  &pad->pad_Info ;
+}
+
+static PaError Pa_MaybeQueryDevices( void )
+{
+    if( sDeviceList == NULL )
+    {
+        return Pa_QueryDevices();
+    }
+    return 0;
+}
+
+PaDeviceID Pa_GetDefaultInputDeviceID( void )
+{
+    /* return paNoDevice; */
+    return 0;
+}
+
+PaDeviceID Pa_GetDefaultOutputDeviceID( void )
+{
+    return 0;
+}
+
+/**********************************************************************
+** Make sure that we have queried the device capabilities.
+*/
+
+PaError PaHost_Init( void )
+{
+    return Pa_MaybeQueryDevices();
+}
+
+/*******************************************************************************************
+ * The ol' Canary in a Coal Mine trick.
+ * Just update the time periodically.
+ * Runs at low priority so if audio thread runs wild, this thread will get starved
+ * and the watchdog will detect it.
+ */
+
+#define SCHEDULER_POLICY         SCHED_RR
+#define WATCHDOG_MAX_SECONDS    (3)
+#define WATCHDOG_INTERVAL_USEC  (1000000)
+
+static int PaHost_CanaryProc( PaHostSoundControl   *pahsc )
+{
+    int   result = 0;
+
+#ifdef GNUSTEP
+    GSRegisterCurrentThread(); /* SB20010904 */
+#endif
+
+    while( pahsc->pahsc_CanaryRun) {
+      usleep( WATCHDOG_INTERVAL_USEC );
+      gettimeofday( &pahsc->pahsc_CanaryTime, NULL );
+    }
+
+    DBUG(("PaHost_CanaryProc: exiting.\n"));
+
+#ifdef GNUSTEP
+    GSUnregisterCurrentThread();  /* SB20010904 */
+#endif
+
+    return result;
+}
+
+/*******************************************************************************************
+ * Monitor audio thread and lower its it if it hogs the CPU.
+ * To prevent getting killed, the audio thread must update a
+ * variable with a timer value.
+ * If the value is not recent enough, then the
+ * thread will get killed.
+ */
+
+static PaError PaHost_WatchDogProc( PaHostSoundControl   *pahsc )
+{
+    struct sched_param    schp = { 0 };
+    int                   maxPri;
+
+#ifdef GNUSTEP
+    GSRegisterCurrentThread(); /* SB20010904 */
+#endif
+
+/* Run at a priority level above audio thread so we can still run if it hangs. */
+/* Rise more than 1 because of rumored off-by-one scheduler bugs. */
+    schp.sched_priority = pahsc->pahsc_AudioPriority + 4;
+    maxPri = sched_get_priority_max(SCHEDULER_POLICY);
+    if( schp.sched_priority > maxPri ) schp.sched_priority = maxPri;
+
+    if (sched_setscheduler(0, SCHEDULER_POLICY, &schp) != 0)
+    {
+        ERR_RPT(("PaHost_WatchDogProc: cannot set watch dog priority!\n"));
+        goto killAudio;
+    }
+
+    /* Compare watchdog time with audio and canary thread times. */
+    /* Sleep for a while or until thread cancelled. */
+    while( pahsc->pahsc_WatchDogRun )
+    {
+
+        int              delta;
+        struct timeval   currentTime;
+
+        usleep( WATCHDOG_INTERVAL_USEC );
+        gettimeofday( &currentTime, NULL );
+
+        /* If audio thread is not advancing, then it must be hung so kill it. */
+        delta = currentTime.tv_sec - pahsc->pahsc_EntryTime.tv_sec;
+        DBUG(("PaHost_WatchDogProc: audio delta = %d\n", delta ));
+        if( delta > WATCHDOG_MAX_SECONDS )
+        {
+            goto killAudio;
+        }
+
+        /* If canary died, then lower audio priority and halt canary. */
+        delta = currentTime.tv_sec - pahsc->pahsc_CanaryTime.tv_sec;
+        if( delta > WATCHDOG_MAX_SECONDS )
+        {
+            ERR_RPT(("PaHost_WatchDogProc: canary died!\n"));
+            goto lowerAudio;
+        }
+    }
+
+    DBUG(("PaHost_WatchDogProc: exiting.\n"));
+#ifdef GNUSTEP
+    GSUnregisterCurrentThread();  /* SB20010904 */
+#endif
+    return 0;
+
+lowerAudio:
+    {
+        struct sched_param    schat = { 0 };
+        if( sched_setscheduler(pahsc->pahsc_AudioThreadPID, SCHED_OTHER, &schat) != 0)
+        {
+            ERR_RPT(("PaHost_WatchDogProc: failed to lower audio priority. errno = %d\n", errno ));
+            /* Fall through into killing audio thread. */
+        }
+        else
+        {
+            ERR_RPT(("PaHost_WatchDogProc: lowered audio priority to prevent hogging of CPU.\n"));
+            goto cleanup;
+        }
+    }
+
+killAudio:
+    ERR_RPT(("PaHost_WatchDogProc: killing hung audio thread!\n"));
+    pthread_kill( pahsc->pahsc_AudioThread, SIGKILL );
+
+cleanup:
+    pahsc->pahsc_CanaryRun = 0;
+    DBUG(("PaHost_WatchDogProc: cancel Canary\n"));
+    pthread_cancel( pahsc->pahsc_CanaryThread );
+    DBUG(("PaHost_WatchDogProc: join Canary\n"));
+    pthread_join( pahsc->pahsc_CanaryThread, NULL );
+    DBUG(("PaHost_WatchDogProc: forget Canary\n"));
+    pahsc->pahsc_IsCanaryThreadValid = 0;
+
+#ifdef GNUSTEP
+    GSUnregisterCurrentThread();  /* SB20010904 */
+#endif
+    return 0;
+}
+
+/*******************************************************************************************/
+static void PaHost_StopWatchDog( PaHostSoundControl   *pahsc )
+{
+/* Cancel WatchDog thread if there is one. */
+    if( pahsc->pahsc_IsWatchDogThreadValid )
+    {
+        pahsc->pahsc_WatchDogRun = 0;
+        DBUG(("PaHost_StopWatchDog: cancel WatchDog\n"));
+        pthread_cancel( pahsc->pahsc_WatchDogThread );
+        pthread_join( pahsc->pahsc_WatchDogThread, NULL );
+        pahsc->pahsc_IsWatchDogThreadValid = 0;
+    }
+/* Cancel Canary thread if there is one. */
+    if( pahsc->pahsc_IsCanaryThreadValid )
+    {
+        pahsc->pahsc_CanaryRun = 0;
+        DBUG(("PaHost_StopWatchDog: cancel Canary\n"));
+        pthread_cancel( pahsc->pahsc_CanaryThread );
+        DBUG(("PaHost_StopWatchDog: join Canary\n"));
+        pthread_join( pahsc->pahsc_CanaryThread, NULL );
+        pahsc->pahsc_IsCanaryThreadValid = 0;
+    }
+}
+
+/*******************************************************************************************/
+static PaError PaHost_StartWatchDog( PaHostSoundControl   *pahsc )
+{
+    int      hres;
+    PaError  result = 0;
+
+    /* The watch dog watches for these timer updates */
+    gettimeofday( &pahsc->pahsc_EntryTime, NULL );
+    gettimeofday( &pahsc->pahsc_CanaryTime, NULL );
+
+    /* Launch a canary thread to detect priority abuse. */
+    pahsc->pahsc_CanaryRun = 1;
+    hres = pthread_create(&(pahsc->pahsc_CanaryThread),
+                      NULL /*pthread_attr_t * attr*/,
+                      (pthread_function_t)PaHost_CanaryProc, pahsc);
+    if( hres != 0 )
+    {
+        pahsc->pahsc_IsCanaryThreadValid = 0;
+        result = paHostError;
+        sPaHostError = hres;
+        goto error;
+    }
+    pahsc->pahsc_IsCanaryThreadValid = 1;
+
+    /* Launch a watchdog thread to prevent runaway audio thread. */
+    pahsc->pahsc_WatchDogRun = 1;
+    hres = pthread_create(&(pahsc->pahsc_WatchDogThread),
+                      NULL /*pthread_attr_t * attr*/,
+                      (pthread_function_t)PaHost_WatchDogProc, pahsc);
+    if( hres != 0 )
+    {
+        pahsc->pahsc_IsWatchDogThreadValid = 0;
+        result = paHostError;
+        sPaHostError = hres;
+        goto error;
+    }
+    pahsc->pahsc_IsWatchDogThreadValid = 1;
+    return result;
+
+error:
+    PaHost_StopWatchDog( pahsc );
+    return result;
+}
+
+/*******************************************************************************************
+ * Bump priority of audio thread if running with superuser priveledges.
+ * if priority bumped then launch a watchdog.
+ */
+static PaError PaHost_BoostPriority( internalPortAudioStream *past )
+{
+    PaHostSoundControl  *pahsc;
+    PaError              result = paNoError;
+    struct sched_param   schp = { 0 };
+
+    pahsc = (PaHostSoundControl *) past->past_DeviceData;
+    if( pahsc == NULL ) return paInternalError;
+
+    pahsc->pahsc_AudioThreadPID = getpid();
+    DBUG(("PaHost_BoostPriority: audio PID = %d\n", pahsc->pahsc_AudioThreadPID ));
+
+    /* Choose a priority in the middle of the range. */
+    pahsc->pahsc_AudioPriority = (sched_get_priority_max(SCHEDULER_POLICY) -
+                                  sched_get_priority_min(SCHEDULER_POLICY)) / 2;
+    schp.sched_priority = pahsc->pahsc_AudioPriority;
+
+    if (sched_setscheduler(0, SCHEDULER_POLICY, &schp) != 0)
+    {
+        DBUG(("PortAudio: only superuser can use real-time priority.\n"));
+    }
+    else
+    {
+        DBUG(("PortAudio: audio callback priority set to level %d!\n", schp.sched_priority));
+        /* We are running at high priority so we should have a watchdog in case audio goes wild. */
+        result = PaHost_StartWatchDog( pahsc );
+    }
+
+    return result;
+}
+
+/*******************************************************************************************/
+static PaError Pa_AudioThreadProc( internalPortAudioStream   *past )
+{
+    PaError      result;
+    PaHostSoundControl             *pahsc;
+    ssize_t      bytes_read, bytes_written;
+
+    pahsc = (PaHostSoundControl *) past->past_DeviceData;
+    if( pahsc == NULL ) return paInternalError;
+
+#ifdef GNUSTEP
+    GSRegisterCurrentThread(); /* SB20010904 */
+#endif
+
+    result = PaHost_BoostPriority( past );
+    if( result < 0 ) goto error;
+
+    past->past_IsActive = 1;
+    DBUG(("entering thread.\n"));
+
+    while( (past->past_StopNow == 0) && (past->past_StopSoon == 0) )
+    {
+        /* Read data from device */
+        if(pahsc->pahsc_NativeInputBuffer)
+        {
+            unsigned int totalread = 0;
+            DBUG(("Pa_AudioThreadProc: attempt to read %d bytes\n", pahsc->pahsc_BytesPerInputBuffer));
+            do
+            {
+                bytes_read = read(pahsc->pahsc_InputHandle,
+                    (char *)pahsc->pahsc_NativeInputBuffer + totalread,
+                    pahsc->pahsc_BytesPerInputBuffer - totalread);
+
+                if (bytes_read < 0)
+                {
+                    ERR_RPT(("PortAudio: read interrupted!\n"));
+                    break;
+                }
+
+                totalread += bytes_read;
+            } while( totalread < pahsc->pahsc_BytesPerInputBuffer);
+        }
+
+        /* Convert 16 bit native data to user data and call user routine. */
+        DBUG(("converting...\n"));
+        Pa_StartUsageCalculation( past );
+        result = Pa_CallConvertInt16( past,
+                                      pahsc->pahsc_NativeInputBuffer,
+                                      pahsc->pahsc_NativeOutputBuffer );
+        Pa_EndUsageCalculation( past );
+        if( result != 0)
+        {
+            DBUG(("hmm, Pa_CallConvertInt16() says: %d. i'm bailing.\n",
+                  result));
+            break;
+        }
+
+        /* Write data to device. */
+        if( pahsc->pahsc_NativeOutputBuffer )
+        {
+            unsigned int totalwritten = 0;
+            do
+            {
+                bytes_written = write(pahsc->pahsc_OutputHandle,
+                    (void *)pahsc->pahsc_NativeOutputBuffer,
+                    pahsc->pahsc_BytesPerOutputBuffer);
+                if( bytes_written < 0 )
+                {
+                    ERR_RPT(("PortAudio: write interrupted!"));
+                    break;
+                }
+
+                totalwritten += bytes_written;
+            } while( totalwritten < pahsc->pahsc_BytesPerOutputBuffer);
+        }
+
+        Pa_UpdateStreamTime(pahsc);
+    }
+    DBUG(("Pa_AudioThreadProc: left audio loop.\n"));
+
+    past->past_IsActive = 0;
+    PaHost_StopWatchDog( pahsc );
+
+error:
+    DBUG(("leaving audio thread.\n"));
+#ifdef GNUSTEP
+    GSUnregisterCurrentThread();  /* SB20010904 */
+#endif
+    return result;
+}
+
+/*************************************************************************
+** Determine minimum number of buffers required for this host based
+** on minimum latency. Latency can be optionally set by user by setting
+** an environment variable. For example, to set latency to 200 msec, put:
+**
+**    set PA_MIN_LATENCY_MSEC=200
+**
+** in the cshrc file.
+*/
+#define PA_LATENCY_ENV_NAME  ("PA_MIN_LATENCY_MSEC")
+
+int Pa_GetMinNumBuffers( int framesPerBuffer, double framesPerSecond )
+{
+    int minBuffers;
+    int minLatencyMsec = MIN_LATENCY_MSEC;
+    char *minLatencyText = getenv(PA_LATENCY_ENV_NAME);
+    if( minLatencyText != NULL )
+    {
+        PRINT(("PA_MIN_LATENCY_MSEC = %s\n", minLatencyText ));
+        minLatencyMsec = atoi( minLatencyText );
+        if( minLatencyMsec < 1 ) minLatencyMsec = 1;
+        else if( minLatencyMsec > 5000 ) minLatencyMsec = 5000;
+    }
+
+    minBuffers = (int) ((minLatencyMsec * framesPerSecond) / ( 1000.0 * framesPerBuffer ));
+    if( minBuffers < 2 ) minBuffers = 2;
+    return minBuffers;
+}
+
+/*******************************************************************/
+PaError PaHost_OpenStream( internalPortAudioStream   *past )
+{
+    PaError          result = paNoError;
+    PaHostSoundControl *pahsc;
+    unsigned int     minNumBuffers;
+    internalPortAudioDevice *pad;
+    DBUG(("PaHost_OpenStream() called.\n" ));
+
+    /* Allocate and initialize host data. */
+    pahsc = (PaHostSoundControl *) malloc(sizeof(PaHostSoundControl));
+    if( pahsc == NULL )
+    {
+        result = paInsufficientMemory;
+        goto error;
+    }
+    memset( pahsc, 0, sizeof(PaHostSoundControl) );
+    past->past_DeviceData = (void *) pahsc;
+
+    pahsc->pahsc_OutputHandle = BAD_DEVICE_ID; /* No device currently opened. */
+    pahsc->pahsc_InputHandle = BAD_DEVICE_ID;
+    pahsc->pahsc_IsAudioThreadValid = 0;
+    pahsc->pahsc_IsWatchDogThreadValid = 0;
+
+    /* Allocate native buffers. */
+    pahsc->pahsc_BytesPerInputBuffer = past->past_FramesPerUserBuffer *
+                                       past->past_NumInputChannels * sizeof(short);
+    if( past->past_NumInputChannels > 0)
+    {
+        pahsc->pahsc_NativeInputBuffer = (short *) malloc(pahsc->pahsc_BytesPerInputBuffer);
+        if( pahsc->pahsc_NativeInputBuffer == NULL )
+        {
+            result = paInsufficientMemory;
+            goto error;
+        }
+    }
+    pahsc->pahsc_BytesPerOutputBuffer = past->past_FramesPerUserBuffer *
+                                        past->past_NumOutputChannels * sizeof(short);
+    if( past->past_NumOutputChannels > 0)
+    {
+        pahsc->pahsc_NativeOutputBuffer = (short *) malloc(pahsc->pahsc_BytesPerOutputBuffer);
+        if( pahsc->pahsc_NativeOutputBuffer == NULL )
+        {
+            result = paInsufficientMemory;
+            goto error;
+        }
+    }
+
+    /* DBUG(("PaHost_OpenStream: pahsc_MinFramesPerHostBuffer = %d\n", pahsc->pahsc_MinFramesPerHostBuffer )); */
+    minNumBuffers = Pa_GetMinNumBuffers( past->past_FramesPerUserBuffer, past->past_SampleRate );
+    past->past_NumUserBuffers = ( minNumBuffers > past->past_NumUserBuffers ) ? minNumBuffers : past->past_NumUserBuffers;
+
+    pahsc->pahsc_InverseMicrosPerBuffer = past->past_SampleRate / (1000000.0 * past->past_FramesPerUserBuffer);
+    DBUG(("past_SampleRate = %g\n", past->past_SampleRate ));
+    DBUG(("past_FramesPerUserBuffer = %d\n", past->past_FramesPerUserBuffer ));
+    DBUG(("pahsc_InverseMicrosPerBuffer = %g\n", pahsc->pahsc_InverseMicrosPerBuffer ));
+
+    /* ------------------------- OPEN DEVICE -----------------------*/
+
+    /* just output */
+    if (past->past_OutputDeviceID == past->past_InputDeviceID)
+    {
+
+        if ((past->past_NumOutputChannels > 0) && (past->past_NumInputChannels > 0) )
+        {
+            pad = Pa_GetInternalDevice( past->past_OutputDeviceID );
+            DBUG(("PaHost_OpenStream: attempt to open %s for O_RDWR\n", pad->pad_DeviceName ));
+
+            /* dmazzoni: test it first in nonblocking mode to
+               make sure the device is not busy */
+            pahsc->pahsc_InputHandle = open(pad->pad_DeviceName,O_RDWR|O_NONBLOCK);
+            if(pahsc->pahsc_InputHandle==-1)
+            {
+                ERR_RPT(("PaHost_OpenStream: could not open %s for O_RDWR\n", pad->pad_DeviceName ));
+                result = paHostError;
+                goto error;
+            }
+            close(pahsc->pahsc_InputHandle);
+
+            pahsc->pahsc_OutputHandle = pahsc->pahsc_InputHandle =
+                                            open(pad->pad_DeviceName,O_RDWR);
+            if(pahsc->pahsc_InputHandle==-1)
+            {
+                ERR_RPT(("PaHost_OpenStream: could not open %s for O_RDWR\n", pad->pad_DeviceName ));
+                result = paHostError;
+                goto error;
+            }
+            Pa_SetLatency( pahsc->pahsc_OutputHandle,
+                           past->past_NumUserBuffers, past->past_FramesPerUserBuffer,
+                           past->past_NumOutputChannels );
+            result = Pa_SetupDeviceFormat( pahsc->pahsc_OutputHandle,
+                                           past->past_NumOutputChannels, (int)past->past_SampleRate );
+        }
+    }
+    else
+    {
+        if (past->past_NumOutputChannels > 0)
+        {
+            pad = Pa_GetInternalDevice( past->past_OutputDeviceID );
+            DBUG(("PaHost_OpenStream: attempt to open %s for O_WRONLY\n", pad->pad_DeviceName ));
+            /* dmazzoni: test it first in nonblocking mode to
+               make sure the device is not busy */
+            pahsc->pahsc_OutputHandle = open(pad->pad_DeviceName,O_WRONLY|O_NONBLOCK);
+            if(pahsc->pahsc_OutputHandle==-1)
+            {
+                ERR_RPT(("PaHost_OpenStream: could not open %s for O_WRONLY\n", pad->pad_DeviceName ));
+                result = paHostError;
+                goto error;
+            }
+            close(pahsc->pahsc_OutputHandle);
+
+            pahsc->pahsc_OutputHandle = open(pad->pad_DeviceName,O_WRONLY);
+            if(pahsc->pahsc_OutputHandle==-1)
+            {
+                ERR_RPT(("PaHost_OpenStream: could not open %s for O_WRONLY\n", pad->pad_DeviceName ));
+                result = paHostError;
+                goto error;
+            }
+            Pa_SetLatency( pahsc->pahsc_OutputHandle,
+                           past->past_NumUserBuffers, past->past_FramesPerUserBuffer,
+                           past->past_NumOutputChannels );
+            result = Pa_SetupOutputDeviceFormat( pahsc->pahsc_OutputHandle,
+                                           past->past_NumOutputChannels, (int)past->past_SampleRate );
+        }
+
+        if (past->past_NumInputChannels > 0)
+        {
+            pad = Pa_GetInternalDevice( past->past_InputDeviceID );
+            DBUG(("PaHost_OpenStream: attempt to open %s for O_RDONLY\n", pad->pad_DeviceName ));
+            /* dmazzoni: test it first in nonblocking mode to
+               make sure the device is not busy */
+            pahsc->pahsc_InputHandle = open(pad->pad_DeviceName,O_RDONLY|O_NONBLOCK);
+            if(pahsc->pahsc_InputHandle==-1)
+            {
+                ERR_RPT(("PaHost_OpenStream: could not open %s for O_RDONLY\n", pad->pad_DeviceName ));
+                result = paHostError;
+                goto error;
+            }
+            close(pahsc->pahsc_InputHandle);
+
+            pahsc->pahsc_InputHandle = open(pad->pad_DeviceName,O_RDONLY);
+            if(pahsc->pahsc_InputHandle==-1)
+            {
+                ERR_RPT(("PaHost_OpenStream: could not open %s for O_RDONLY\n", pad->pad_DeviceName ));
+                result = paHostError;
+                goto error;
+            }
+            Pa_SetLatency( pahsc->pahsc_InputHandle, /* DH20010115 - was OutputHandle! */
+                           past->past_NumUserBuffers, past->past_FramesPerUserBuffer,
+                           past->past_NumInputChannels );
+            result = Pa_SetupInputDeviceFormat( pahsc->pahsc_InputHandle,
+                                           past->past_NumInputChannels, (int)past->past_SampleRate );
+        }
+    }
+
+
+    DBUG(("PaHost_OpenStream: SUCCESS - result = %d\n", result ));
+    return result;
+
+error:
+    ERR_RPT(("PaHost_OpenStream: ERROR - result = %d\n", result ));
+    PaHost_CloseStream( past );
+    return result;
+}
+
+/*************************************************************************/
+PaError PaHost_StartOutput( internalPortAudioStream *past )
+{
+    past = past; /* unused */
+    return paNoError;
+}
+
+/*************************************************************************/
+PaError PaHost_StartInput( internalPortAudioStream *past )
+{
+    past = past; /* unused */
+    return paNoError;
+}
+
+/*************************************************************************/
+PaError PaHost_StartEngine( internalPortAudioStream *past )
+{
+    PaHostSoundControl *pahsc;
+    PaError             result = paNoError;
+    int                 hres;
+
+    pahsc = (PaHostSoundControl *) past->past_DeviceData;
+
+    past->past_StopSoon = 0;
+    past->past_StopNow = 0;
+    past->past_IsActive = 1;
+
+    /* Use pthread_create() instead of __clone() because:
+     *   - pthread_create also works for other UNIX systems like Solaris,
+     *   - the Java HotSpot VM crashes in pthread_setcanceltype() when using __clone()
+     */
+    hres = pthread_create(&(pahsc->pahsc_AudioThread),
+                          NULL /*pthread_attr_t * attr*/,
+                          (pthread_function_t)Pa_AudioThreadProc, past);
+    if( hres != 0 )
+    {
+        result = paHostError;
+        sPaHostError = hres;
+        pahsc->pahsc_IsAudioThreadValid = 0;
+        goto error;
+    }
+    pahsc->pahsc_IsAudioThreadValid = 1;
+
+error:
+    return result;
+}
+
+/*************************************************************************/
+PaError PaHost_StopEngine( internalPortAudioStream *past, int abort )
+{
+    int                 hres;
+    PaError             result = paNoError;
+    PaHostSoundControl *pahsc = (PaHostSoundControl *) past->past_DeviceData;
+
+    if( pahsc == NULL ) return paNoError;
+
+    /* Tell background thread to stop generating more data and to let current data play out. */
+    past->past_StopSoon = 1;
+    /* If aborting, tell background thread to stop NOW! */
+    if( abort ) past->past_StopNow = 1;
+
+    /* Join thread to recover memory resources. */
+    if( pahsc->pahsc_IsAudioThreadValid )
+    {
+        /* This check is needed for GNUSTEP - SB20010904 */
+        if ( !pthread_equal( pahsc->pahsc_AudioThread, pthread_self() ) )
+        {
+            hres = pthread_join( pahsc->pahsc_AudioThread, NULL );
+        }
+        else
+        {
+            DBUG(("Play thread was stopped from itself - can't do pthread_join()\n"));
+            hres = 0;
+        }
+
+        if( hres != 0 )
+        {
+            result = paHostError;
+            sPaHostError = hres;
+        }
+        pahsc->pahsc_IsAudioThreadValid = 0;
+    }
+
+    past->past_IsActive = 0;
+
+    return result;
+}
+
+/*************************************************************************/
+PaError PaHost_StopInput( internalPortAudioStream *past, int abort )
+{
+    past = past; /* unused */
+    abort = abort; /* unused */
+    return paNoError;
+}
+
+/*************************************************************************/
+PaError PaHost_StopOutput( internalPortAudioStream *past, int abort )
+{
+    past = past; /* unused */
+    abort = abort; /* unused */
+    return paNoError;
+}
+
+/*******************************************************************/
+PaError PaHost_CloseStream( internalPortAudioStream   *past )
+{
+    PaHostSoundControl *pahsc;
+
+    if( past == NULL ) return paBadStreamPtr;
+    pahsc = (PaHostSoundControl *) past->past_DeviceData;
+    if( pahsc == NULL ) return paNoError;
+
+    if( pahsc->pahsc_OutputHandle != BAD_DEVICE_ID )
+    {
+        int err = 0;
+        DBUG(("PaHost_CloseStream: attempt to close output device handle = %d\n",
+              pahsc->pahsc_OutputHandle ));
+
+        Pa_FlushStream(pahsc->pahsc_OutputHandle);
+
+        err = close(pahsc->pahsc_OutputHandle);
+        if( err < 0 )
+        {
+            ERR_RPT(("PaHost_CloseStream: warning, closing output device failed.\n"));
+        }
+    }
+
+    if( (pahsc->pahsc_InputHandle != BAD_DEVICE_ID) &&
+            (pahsc->pahsc_InputHandle != pahsc->pahsc_OutputHandle) )
+    {
+        int err = 0;
+        DBUG(("PaHost_CloseStream: attempt to close input device handle = %d\n",
+              pahsc->pahsc_InputHandle ));
+
+        Pa_FlushStream(pahsc->pahsc_InputHandle);
+
+        err = close(pahsc->pahsc_InputHandle);
+        if( err < 0 )
+        {
+            ERR_RPT(("PaHost_CloseStream: warning, closing input device failed.\n"));
+        }
+    }
+    pahsc->pahsc_OutputHandle = BAD_DEVICE_ID;
+    pahsc->pahsc_InputHandle = BAD_DEVICE_ID;
+
+    if( pahsc->pahsc_NativeInputBuffer )
+    {
+        free( pahsc->pahsc_NativeInputBuffer );
+        pahsc->pahsc_NativeInputBuffer = NULL;
+    }
+    if( pahsc->pahsc_NativeOutputBuffer )
+    {
+        free( pahsc->pahsc_NativeOutputBuffer );
+        pahsc->pahsc_NativeOutputBuffer = NULL;
+    }
+
+    free( pahsc );
+    past->past_DeviceData = NULL;
+    return paNoError;
+}
+
+/*************************************************************************/
+PaError PaHost_Term( void )
+{
+    /* Free all of the linked devices. */
+    internalPortAudioDevice *pad, *nextPad;
+    pad = sDeviceList;
+    while( pad != NULL )
+    {
+        nextPad = pad->pad_Next;
+        DBUG(("PaHost_Term: freeing %s\n", pad->pad_DeviceName ));
+        PaHost_FreeFastMemory( pad, sizeof(internalPortAudioDevice) );
+        pad = nextPad;
+    }
+    sDeviceList = NULL;
+    return 0;
+}
+
+/*************************************************************************
+ * Sleep for the requested number of milliseconds.
+ */
+void Pa_Sleep( long msec )
+{
+#if 0
+    struct timeval timeout;
+    timeout.tv_sec = msec / 1000;
+    timeout.tv_usec = (msec % 1000) * 1000;
+    select( 0, NULL, NULL, NULL, &timeout );
+#else
+    long usecs = msec * 1000;
+    usleep( usecs );
+#endif
+}
+
+/*************************************************************************
+ * Allocate memory that can be accessed in real-time.
+ * This may need to be held in physical memory so that it is not
+ * paged to virtual memory.
+ * This call MUST be balanced with a call to PaHost_FreeFastMemory().
+ */
+void *PaHost_AllocateFastMemory( long numBytes )
+{
+    void *addr = malloc( numBytes ); /* FIXME - do we need physical, wired, non-virtual memory? */
+    if( addr != NULL ) memset( addr, 0, numBytes );
+    return addr;
+}
+
+/*************************************************************************
+ * Free memory that could be accessed in real-time.
+ * This call MUST be balanced with a call to PaHost_AllocateFastMemory().
+ */
+void PaHost_FreeFastMemory( void *addr, long numBytes )
+{
+    numBytes = numBytes; /* unused */
+    if( addr != NULL ) free( addr );
+}
+
+
+/***********************************************************************/
+PaError PaHost_StreamActive( internalPortAudioStream   *past )
+{
+    PaHostSoundControl *pahsc;
+    if( past == NULL ) return paBadStreamPtr;
+    pahsc = (PaHostSoundControl *) past->past_DeviceData;
+    if( pahsc == NULL ) return paInternalError;
+    return (PaError) (past->past_IsActive != 0);
+}
+
+/***********************************************************************/
+long Pa_GetHostError( void )
+{
+    return (long) sPaHostError;
+}
diff --git a/src/portaudio/pa_unix.h b/src/portaudio/pa_unix.h
new file mode 100644
index 0000000..ee33992
--- /dev/null
+++ b/src/portaudio/pa_unix.h
@@ -0,0 +1,141 @@
+/*
+ * PortAudio Portable Real-Time Audio Library
+ * Latest Version at: http://www.portaudio.com
+ * Linux OSS Implementation by douglas repetto and Phil Burk
+ *
+ * Copyright (c) 1999-2000 Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), 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:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+/* Modification history:
+   20020621: pa_unix_oss.c split into pa_unix.c, pa_unix.h, pa_unix_oss.c by
+   Augustus Saunders. See pa_unix.c for previous history. */
+
+/*
+ PROPOSED - should we add this to "portaudio.h". Problem with 
+ Pa_QueryDevice() not having same driver name os Pa_OpenStream().
+ 
+ A PaDriverInfo structure can be passed to the underlying device
+ on the Pa_OpenStream() call. The contents and interpretation of
+ the structure is determined by the PA implementation.
+*/
+typedef struct PaDriverInfo /* PROPOSED */
+{
+    /* Size of structure. Allows driver to extend the structure without breaking existing applications. */
+    int           size;
+    /* Can be used to request a specific device name. */
+    const char   *name;
+    unsigned long data;
+}
+PaDriverInfo;
+
+#include <stdio.h>
+#include <stdlib.h>
+//#include <malloc.h>
+#include <memory.h>
+#include <math.h>
+#include <sys/ioctl.h>
+#include <sys/time.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <signal.h>
+#include <sched.h>
+#include <pthread.h>
+#include <errno.h>
+
+#include "portaudio.h"
+#include "pa_host.h"
+#include "pa_trace.h"
+
+#define PRINT(x)   { printf x; fflush(stdout); }
+#define ERR_RPT(x) PRINT(x)
+#define DBUG(x)    /* PRINT(x) */
+#define DBUGX(x)   /* PRINT(x) */
+
+#define BAD_DEVICE_ID (-1)
+
+#define MIN_LATENCY_MSEC   (100)
+#define MIN_TIMEOUT_MSEC   (100)
+#define MAX_TIMEOUT_MSEC   (1000)
+
+/************************************************* Definitions ********/
+#ifdef __linux__
+ #define DEVICE_NAME_BASE            "/dev/dsp"
+#else
+ #define DEVICE_NAME_BASE            "/dev/audio"
+#endif
+
+#define MAX_CHARS_DEVNAME           (32)
+#define MAX_SAMPLE_RATES            (10)
+typedef struct internalPortAudioDevice
+{
+    struct internalPortAudioDevice *pad_Next; /* Singly linked list. */
+    double          pad_SampleRates[MAX_SAMPLE_RATES]; /* for pointing to from pad_Info */
+    char            pad_DeviceName[MAX_CHARS_DEVNAME];
+    PaDeviceInfo    pad_Info;
+}
+internalPortAudioDevice;
+
+/* Define structure to contain all OSS and Linux specific data. */
+typedef struct PaHostSoundControl
+{
+    int              pahsc_OutputHandle;
+    int              pahsc_InputHandle;
+    int              pahsc_AudioPriority;          /* priority of background audio thread */
+    pthread_t        pahsc_AudioThread;            /* background audio thread */
+    int              pahsc_IsAudioThreadValid;     /* Is pahsc_AudioThread valid?*/    pid_t            pahsc_AudioThreadPID;         /* background audio thread */
+    pthread_t        pahsc_WatchDogThread;         /* highest priority thread that protects system */
+    int              pahsc_IsWatchDogThreadValid;  /* Is pahsc_WatchDogThread valid?*/
+    int              pahsc_WatchDogRun;            /* Ask WatchDog to stop. */
+    pthread_t        pahsc_CanaryThread;           /* low priority thread that detects abuse by audio */
+    int              pahsc_IsCanaryThreadValid;    /* Is pahsc_CanaryThread valid?*/
+    struct timeval   pahsc_CanaryTime;
+    int              pahsc_CanaryRun;              /* Ask Canary to stop. */
+    short           *pahsc_NativeInputBuffer;
+    short           *pahsc_NativeOutputBuffer;
+    unsigned int     pahsc_BytesPerInputBuffer;    /* native buffer size in bytes */
+    unsigned int     pahsc_BytesPerOutputBuffer;   /* native buffer size in bytes */
+    /* For measuring CPU utilization. */
+    struct timeval   pahsc_EntryTime;
+    double           pahsc_InverseMicrosPerBuffer; /* 1/Microseconds of real-time audio per user buffer. */
+
+   /* For calculating stream time */
+    int              pahsc_LastPosPtr;
+    double           pahsc_LastStreamBytes;
+}
+PaHostSoundControl;
+
+/************************************************* Prototypes **********/
+
+internalPortAudioDevice *Pa_GetInternalDevice( PaDeviceID id );
+PaError Pa_QueryDevices( void );
+PaError Pa_QueryDevice( const char *deviceName, internalPortAudioDevice *pad );
+PaError Pa_SetupDeviceFormat( int devHandle, int numChannels, int sampleRate );
+PaError Pa_SetupInputDeviceFormat( int devHandle, int numChannels, int sampleRate );
+PaError Pa_SetupOutputDeviceFormat( int devHandle, int numChannels, int sampleRate );
+void Pa_SetLatency( int devHandle, int numBuffers, int framesPerBuffer, int channelsPerFrame  );
+void Pa_UpdateStreamTime(PaHostSoundControl *pahsc);
+int Pa_FlushStream(int devHandle);
diff --git a/src/portaudio/pa_unix_oss.c b/src/portaudio/pa_unix_oss.c
new file mode 100644
index 0000000..06a3fda
--- /dev/null
+++ b/src/portaudio/pa_unix_oss.c
@@ -0,0 +1,468 @@
+/*
+ * PortAudio Portable Real-Time Audio Library
+ * Latest Version at: http://www.portaudio.com
+ * Linux OSS Implementation by douglas repetto and Phil Burk
+ *
+ * Copyright (c) 1999-2000 Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), 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:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+/* Modification history:
+   20020621: pa_unix_oss.c split into pa_unix.c, pa_unix.h, pa_unix_oss.c by
+       Augustus Saunders. See pa_unix.c for previous history. Pa_FlushStream
+       added by Augustus Saunders for Solaris compatibility.
+   PLB20021018 - Fill device info table with actual sample rates instead of wished for rates.
+               - Allow stream to open if sample rate within 10% of desired rate.
+   20030630 - Thomas Richter - eliminated unused variable warnings.
+*/
+
+#include "pa_unix.h"
+
+#ifdef __linux__
+#include <linux/soundcard.h>
+#else
+#include <machine/soundcard.h> /* JH20010905 */
+#endif
+
+
+#ifndef AFMT_S16_NE
+#define AFMT_S16_NE  Get_AFMT_S16_NE()
+/*********************************************************************
+ * Some versions of OSS do not define AFMT_S16_NE. So check CPU.
+ * PowerPC is Big Endian. X86 is Little Endian.
+ */
+int Get_AFMT_S16_NE( void )
+{
+    long testData = 1; 
+    char *ptr = (char *) &testData;
+    int isLittle = ( *ptr == 1 ); /* Does address point to least significant byte? */
+    return isLittle ? AFMT_S16_LE : AFMT_S16_BE;
+}
+#endif /* AFMT_S16_NE */
+
+
+/*********************************************************************
+ * Try to open the named device.
+ * If it opens, try to set various rates and formats and fill in 
+ * the device info structure.
+ */
+PaError Pa_QueryDevice( const char *deviceName, internalPortAudioDevice *pad )
+{
+    int result = paHostError;
+    int tempDevHandle;
+    int numChannels, maxNumChannels;
+    int format;
+    int numSampleRates;
+    int sampleRate;
+    int numRatesToTry;
+    int lastRate;
+    int ratesToTry[9] = {96000, 48000, 44100, 32000, 24000, 22050, 16000, 11025, 8000};
+    int i;
+
+    /* douglas:
+     we have to do this querying in a slightly different order. apparently
+     some sound cards will give you different info based on their settings. 
+     e.g. a card might give you stereo at 22kHz but only mono at 44kHz.
+     the correct order for OSS is: format, channels, sample rate
+     
+    */
+    if ( (tempDevHandle = open(deviceName,O_WRONLY|O_NONBLOCK))  == -1 )
+    {
+        DBUG(("Pa_QueryDevice: could not open %s\n", deviceName ));
+        return paHostError;
+    }
+
+    /*  Ask OSS what formats are supported by the hardware. */
+    pad->pad_Info.nativeSampleFormats = 0;
+
+    if (ioctl(tempDevHandle, SNDCTL_DSP_GETFMTS, &format) == -1)
+    {
+        ERR_RPT(("Pa_QueryDevice: could not get format info\n" ));
+        goto error;
+    }
+    if( format & AFMT_U8 )     pad->pad_Info.nativeSampleFormats |= paUInt8;
+    if( format & AFMT_S16_NE ) pad->pad_Info.nativeSampleFormats |= paInt16;
+
+    /* Negotiate for the maximum number of channels for this device. PLB20010927
+     * Consider up to 16 as the upper number of channels.
+     * Variable numChannels should contain the actual upper limit after the call.
+     * Thanks to John Lazzaro and Heiko Purnhagen for suggestions.
+     */
+    maxNumChannels = 0;
+    for( numChannels = 1; numChannels <= 16; numChannels++ )
+    {
+        int temp = numChannels;
+        DBUG(("Pa_QueryDevice: use SNDCTL_DSP_CHANNELS, numChannels = %d\n", numChannels ))
+        if(ioctl(tempDevHandle, SNDCTL_DSP_CHANNELS, &temp) < 0 )
+        {
+            /* ioctl() failed so bail out if we already have stereo */
+            if( numChannels > 2 ) break;
+        }
+        else
+        {
+            /* ioctl() worked but bail out if it does not support numChannels.
+             * We don't want to leave gaps in the numChannels supported.
+             */
+            if( (numChannels > 2) && (temp != numChannels) ) break;
+            DBUG(("Pa_QueryDevice: temp = %d\n", temp ))
+            if( temp > maxNumChannels ) maxNumChannels = temp; /* Save maximum. */
+        }
+    }
+
+    /* The above negotiation may fail for an old driver so try this older technique. */
+    if( maxNumChannels < 1 )
+    {
+        int stereo = 1;
+        if(ioctl(tempDevHandle, SNDCTL_DSP_STEREO, &stereo) < 0)
+        {
+            maxNumChannels = 1;
+        }
+        else
+        {
+            maxNumChannels = (stereo) ? 2 : 1;
+        }
+        DBUG(("Pa_QueryDevice: use SNDCTL_DSP_STEREO, maxNumChannels = %d\n", maxNumChannels ))
+    }
+
+    pad->pad_Info.maxOutputChannels = maxNumChannels;
+    DBUG(("Pa_QueryDevice: maxNumChannels = %d\n", maxNumChannels))
+
+    /* During channel negotiation, the last ioctl() may have failed. This can
+     * also cause sample rate negotiation to fail. Hence the following, to return
+     * to a supported number of channels. SG20011005 */
+    {
+        int temp = maxNumChannels;
+        if( temp > 2 ) temp = 2; /* use most reasonable default value */
+        ioctl(tempDevHandle, SNDCTL_DSP_CHANNELS, &temp);
+    }
+
+    /* FIXME - for now, assume maxInputChannels = maxOutputChannels.
+     *    Eventually do separate queries for O_WRONLY and O_RDONLY
+    */
+    pad->pad_Info.maxInputChannels = pad->pad_Info.maxOutputChannels;
+
+    DBUG(("Pa_QueryDevice: maxInputChannels = %d\n",
+          pad->pad_Info.maxInputChannels))
+
+
+    /* Determine available sample rates by trying each one and seeing result.
+     * OSS often supports funky rates such as 44188 instead of 44100!
+     */
+    numSampleRates = 0;
+    lastRate = 0;
+    numRatesToTry = sizeof(ratesToTry)/sizeof(int);
+    for (i = 0; i < numRatesToTry; i++)
+    {
+        sampleRate = ratesToTry[i];
+
+        if (ioctl(tempDevHandle, SNDCTL_DSP_SPEED, &sampleRate) >= 0 ) /* PLB20010817 */
+        {
+            /* Use whatever rate OSS tells us. PLB20021018 */
+            if (sampleRate != lastRate)
+            {
+                DBUG(("Pa_QueryDevice: adding sample rate: %d\n", sampleRate))
+                pad->pad_SampleRates[numSampleRates] = (float)sampleRate;
+                numSampleRates++;
+                lastRate = sampleRate;
+            }
+            else
+            {
+                DBUG(("Pa_QueryDevice: dang - got sample rate %d again!\n", sampleRate))
+            }
+        }
+    }
+
+    DBUG(("Pa_QueryDevice: final numSampleRates = %d\n", numSampleRates))
+    if (numSampleRates==0)   /* HP20010922 */
+    {
+        /* Desparate attempt to keep running even though no good rates found! */
+        ERR_RPT(("Pa_QueryDevice: no supported sample rate (or SNDCTL_DSP_SPEED ioctl call failed). Force 44100 Hz\n" ));
+        pad->pad_SampleRates[numSampleRates++] = 44100;
+    }
+
+    pad->pad_Info.numSampleRates = numSampleRates;
+    pad->pad_Info.sampleRates = pad->pad_SampleRates; /* use pointer to embedded array */
+
+    pad->pad_Info.name = deviceName;
+
+    result = paNoError;
+
+error:
+    /* We MUST close the handle here or we won't be able to reopen it later!!!  */
+    close(tempDevHandle);
+
+    return result;
+}
+
+/*******************************************************************************************/
+PaError Pa_SetupDeviceFormat( int devHandle, int numChannels, int sampleRate )
+{
+    PaError result = paNoError;
+    int     tmp;
+
+    /* Set format, channels, and rate in this order to keep OSS happy. */
+    /* Set data format. FIXME - handle more native formats. */
+    tmp = AFMT_S16_NE;
+    if( ioctl(devHandle,SNDCTL_DSP_SETFMT,&tmp) == -1)
+    {
+        ERR_RPT(("Pa_SetupDeviceFormat: could not SNDCTL_DSP_SETFMT\n" ));
+        return paHostError;
+    }
+    if( tmp != AFMT_S16_NE )
+    {
+        ERR_RPT(("Pa_SetupDeviceFormat: HW does not support AFMT_S16_NE\n" ));
+        return paHostError;
+    }
+
+
+    /* Set number of channels. */
+    tmp = numChannels;
+    if (ioctl(devHandle, SNDCTL_DSP_CHANNELS, &numChannels) == -1)
+    {
+        ERR_RPT(("Pa_SetupDeviceFormat: could not SNDCTL_DSP_CHANNELS\n" ));
+        return paHostError;
+    }
+    if( tmp != numChannels)
+    {
+        ERR_RPT(("Pa_SetupDeviceFormat: HW does not support %d channels\n", numChannels ));
+        return paHostError;
+    }
+
+    /* Set playing frequency. */
+    tmp = sampleRate;
+    if( ioctl(devHandle,SNDCTL_DSP_SPEED,&tmp) == -1)
+    {
+        ERR_RPT(("Pa_SetupDeviceFormat: could not SNDCTL_DSP_SPEED\n" ));
+        return paHostError;
+    }
+    else if( tmp != sampleRate )
+    {
+        int percentError = abs( (100 * (sampleRate - tmp)) / sampleRate );
+        PRINT(("Pa_SetupDeviceFormat: warning - requested sample rate = %d Hz - closest = %d\n",
+            sampleRate, tmp ));
+        /* Allow sample rate within 10% off of requested rate. PLB20021018
+        * Sometimes OSS uses a funky rate like 44188 instead of 44100.
+        */
+        if( percentError > 10 )
+        {
+            ERR_RPT(("Pa_SetupDeviceFormat: HW does not support %d Hz sample rate\n",sampleRate ));
+           return paHostError;
+        }
+    }
+    
+    return result;
+}
+
+PaError Pa_SetupOutputDeviceFormat( int devHandle, int numChannels, int sampleRate )
+{
+  return Pa_SetupDeviceFormat(devHandle, numChannels, sampleRate);
+}
+
+PaError Pa_SetupInputDeviceFormat( int devHandle, int numChannels, int sampleRate )
+{
+  return Pa_SetupDeviceFormat(devHandle, numChannels, sampleRate);
+}
+
+
+/*******************************************************************************************
+** Set number of fragments and size of fragments to achieve desired latency.
+*/
+
+static int CalcHigherLogTwo( int n )
+{
+    int log2 = 0;
+    while( (1<<log2) < n ) log2++;
+    return log2;
+}
+
+void Pa_SetLatency( int devHandle, int numBuffers, int framesPerBuffer, int channelsPerFrame  )
+{
+    int     tmp;
+    int     bufferSize, powerOfTwo;
+
+    /* Increase size of buffers and reduce number of buffers to reduce latency inside driver. */
+    while( numBuffers > 8 )
+    {
+        numBuffers = (numBuffers + 1) >> 1;
+        framesPerBuffer = framesPerBuffer << 1;
+    }
+
+    /* calculate size of buffers in bytes */
+    bufferSize = framesPerBuffer * channelsPerFrame * sizeof(short); /* FIXME - other sizes? */
+
+    /* Calculate next largest power of two */
+    powerOfTwo = CalcHigherLogTwo( bufferSize );
+    DBUG(("Pa_SetLatency: numBuffers = %d, framesPerBuffer = %d, powerOfTwo = %d\n",
+          numBuffers, framesPerBuffer, powerOfTwo ));
+
+    /* Encode info into a single int */
+    tmp=(numBuffers<<16) + powerOfTwo;
+
+    if(ioctl(devHandle,SNDCTL_DSP_SETFRAGMENT,&tmp) == -1)
+    {
+        ERR_RPT(("Pa_SetLatency: could not SNDCTL_DSP_SETFRAGMENT\n" ));
+        /* Don't return an error. Best to just continue and hope for the best. */
+        ERR_RPT(("Pa_SetLatency: numBuffers = %d, framesPerBuffer = %d, powerOfTwo = %d\n",
+                 numBuffers, framesPerBuffer, powerOfTwo ));
+    }
+}
+
+/***********************************************************************/
+PaTimestamp Pa_StreamTime( PortAudioStream *stream )
+{
+    internalPortAudioStream *past = (internalPortAudioStream *) stream;
+    PaHostSoundControl *pahsc;
+
+    count_info    info;
+    int           delta;
+
+    if( past == NULL ) return paBadStreamPtr;
+    
+    pahsc = (PaHostSoundControl *) past->past_DeviceData;
+
+    if( pahsc->pahsc_NativeOutputBuffer )
+    {
+       ioctl(pahsc->pahsc_OutputHandle, SNDCTL_DSP_GETOPTR, &info);
+       delta = (info.bytes - pahsc->pahsc_LastPosPtr) & 0x000FFFFF;
+       return (pahsc->pahsc_LastStreamBytes + delta) / (past->past_NumOutputChannels * sizeof(short));
+    }
+    else
+    {
+       ioctl(pahsc->pahsc_InputHandle, SNDCTL_DSP_GETIPTR, &info);
+       delta = (info.bytes - pahsc->pahsc_LastPosPtr) & 0x000FFFFF;
+       return (pahsc->pahsc_LastStreamBytes + delta) / (past->past_NumInputChannels * sizeof(short));
+    }
+}
+
+void Pa_UpdateStreamTime(PaHostSoundControl *pahsc)
+{
+    count_info   info;
+    int          delta;
+
+  /* Update current stream time (using a double so that
+     we don't wrap around like info.bytes does) */
+  if( pahsc->pahsc_NativeOutputBuffer )
+  {
+    ioctl(pahsc->pahsc_OutputHandle, SNDCTL_DSP_GETOPTR, &info);
+  }
+  else
+  {
+    ioctl(pahsc->pahsc_InputHandle, SNDCTL_DSP_GETIPTR, &info);
+  }
+  delta = (info.bytes - pahsc->pahsc_LastPosPtr) & 0x000FFFFF;
+  pahsc->pahsc_LastStreamBytes += delta;
+  pahsc->pahsc_LastPosPtr = info.bytes;
+}
+
+PaError Pa_FlushStream(int devHandle)
+{
+  /* AS: This doesn't do anything under OSS; it was added for Solaris.*/
+  devHandle = devHandle; /* unused */
+  return paNoError;
+}
+/* Extension for LinPsk/ DarwinPsk */
+/**
+PaError PaHost_SetInputVolume(PaDeviceID DeviceID,uint32 channel,int Volume)
+{
+int fd;
+int ii;
+char * c;
+char DeviceName[12] ={"/dev/mixer "};
+c = Pa_GetDeviceInfo(DeviceID )->name;
+ii=strlen(c)-1;
+if((c[ii]-'0') > 0 && (c[ii]-'0') < 10 )
+ DeviceName[10]=c[ii];
+else 
+ DeviceName[10]=0;
+fd=open(DeviceName,O_RDWR);
+
+if  (fd >0)
+ {
+  int flags;
+  flags=-1;
+  
+  ioctl(fd,SOUND_MIXER_READ_RECSRC,&ii);
+  if ( ii & ( 1 << SOUND_MIXER_LINE) )
+   flags = SOUND_MIXER_LINE;
+  else
+   if ( ii & ( 1 << SOUND_MIXER_MIC) )
+    flags = SOUND_MIXER_MIC;
+  if ( flags == -1 )
+      flags=SOUND_MIXER_MIC;
+   Volume = Volume & 0x7f;
+   ioctl(fd,MIXER_WRITE(flags),&Volume);            
+   close(fd);
+   return paNoError;
+  
+ }
+ else
+ return paDeviceUnavailable;
+}
+PaError PaHost_SetOutputVolume(PaDeviceID DeviceID,uint32 channel,int Volume)
+{
+int fd;
+int ii;
+char * c;
+char DeviceName[12] ={"/dev/mixer "};
+c = Pa_GetDeviceInfo(DeviceID )->name;
+ii=strlen(c)-1;
+if((c[ii]-'0') > 0 && (c[ii]-'0') < 10 )
+ DeviceName[10]=c[ii];
+else 
+ DeviceName[10]=0; 
+
+//printf("Opening %s\nDevicename %s\n",DeviceName,c); 
+fd=open(DeviceName,O_RDWR);
+
+if  (fd >0)
+ {
+  //Check the channles VOLUME and PCM
+  int flags;
+  flags=-1;
+  ioctl(fd,SOUND_MIXER_READ_DEVMASK,&ii);
+  if ( ii & ( 1 << SOUND_MIXER_VOLUME) )
+   flags = SOUND_MIXER_VOLUME;
+  else
+   if ( ii & ( 1 << SOUND_MIXER_PCM) )
+    flags = SOUND_MIXER_PCM;
+  if ( flags != -1 )
+  {    
+   Volume = Volume & 0x7f;
+   ioctl(fd,MIXER_WRITE(flags),&Volume);            
+   close(fd);
+   return paNoError;
+  }
+  else
+  {
+   close(fd);
+   return paDeviceUnavailable;
+  }   
+ }
+ else
+ return paDeviceUnavailable;
+ 
+}
+**/
\ No newline at end of file
diff --git a/src/portaudio/portaudio.h b/src/portaudio/portaudio.h
new file mode 100644
index 0000000..b730afe
--- /dev/null
+++ b/src/portaudio/portaudio.h
@@ -0,0 +1,468 @@
+#ifndef PORT_AUDIO_H
+#define PORT_AUDIO_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+/*
+ * $Id: portaudio.h,v 1.5 2002/03/26 18:04:22 philburk Exp $
+ * PortAudio Portable Real-Time Audio Library
+ * PortAudio API Header File
+ * Latest version available at: http://www.audiomulch.com/portaudio/
+ *
+ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), 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:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+typedef int PaError;
+typedef enum {
+    paNoError = 0,
+
+    paHostError = -10000,
+    paInvalidChannelCount,
+    paInvalidSampleRate,
+    paInvalidDeviceId,
+    paInvalidFlag,
+    paSampleFormatNotSupported,
+    paBadIODeviceCombination,
+    paInsufficientMemory,
+    paBufferTooBig,
+    paBufferTooSmall,
+    paNullCallback,
+    paBadStreamPtr,
+    paTimedOut,
+    paInternalError,
+    paDeviceUnavailable
+} PaErrorNum;
+
+/*
+ Pa_Initialize() is the library initialisation function - call this before
+ using the library.
+
+*/
+
+PaError Pa_Initialize( void );
+
+/*
+ Pa_Terminate() is the library termination function - call this after
+ using the library.
+
+*/
+
+PaError Pa_Terminate( void );
+
+/*
+ Pa_GetHostError() returns a host specific error code.
+ This can be called after receiving a PortAudio error code of paHostError.
+
+*/
+
+long Pa_GetHostError( void );
+
+/*
+ Pa_GetErrorText() translates the supplied PortAudio error number
+ into a human readable message.
+ 
+*/
+
+const char *Pa_GetErrorText( PaError errnum );
+
+/*
+ Sample formats
+ 
+ These are formats used to pass sound data between the callback and the
+ stream. Each device has a "native" format which may be used when optimum
+ efficiency or control over conversion is required.
+ 
+ Formats marked "always available" are supported (emulated) by all 
+ PortAudio implementations.
+ 
+ The floating point representation (paFloat32) uses +1.0 and -1.0 as the 
+ maximum and minimum respectively.
+
+ paUInt8 is an unsigned 8 bit format where 128 is considered "ground"
+
+*/
+
+typedef unsigned long PaSampleFormat;
+#define paFloat32      ((PaSampleFormat) (1<<0)) /*always available*/
+#define paInt16        ((PaSampleFormat) (1<<1)) /*always available*/
+#define paInt32        ((PaSampleFormat) (1<<2)) /*always available*/
+#define paInt24        ((PaSampleFormat) (1<<3))
+#define paPackedInt24  ((PaSampleFormat) (1<<4))
+#define paInt8         ((PaSampleFormat) (1<<5))
+#define paUInt8        ((PaSampleFormat) (1<<6))
+#define paCustomFormat ((PaSampleFormat) (1<<16))
+
+/*
+ Device enumeration mechanism.
+ 
+ Device ids range from 0 to Pa_CountDevices()-1.
+ 
+ Devices may support input, output or both.
+
+*/
+
+typedef int PaDeviceID;
+#define paNoDevice -1
+
+int Pa_CountDevices( void );
+
+typedef struct
+{
+    int structVersion;
+    const char *name;
+    int maxInputChannels;
+    int maxOutputChannels;
+    /* Number of discrete rates, or -1 if range supported. */
+    int numSampleRates;
+    /* Array of supported sample rates, or {min,max} if range supported. */
+    const double *sampleRates;
+    PaSampleFormat nativeSampleFormats;
+}
+PaDeviceInfo;
+
+/*
+ Pa_GetDefaultInputDeviceID(), Pa_GetDefaultOutputDeviceID() return the
+ default device ids for input and output respectively, or paNoDevice if
+ no device is available.
+ The result can be passed to Pa_OpenStream().
+ 
+ On the PC, the user can specify a default device by
+ setting an environment variable. For example, to use device #1.
+ 
+  set PA_RECOMMENDED_OUTPUT_DEVICE=1
+ 
+ The user should first determine the available device ids by using
+ the supplied application "pa_devs".
+
+*/
+
+PaDeviceID Pa_GetDefaultInputDeviceID( void );
+PaDeviceID Pa_GetDefaultOutputDeviceID( void );
+
+
+
+/*
+ Pa_GetDeviceInfo() returns a pointer to an immutable PaDeviceInfo structure
+ for the device specified.
+ If the device parameter is out of range the function returns NULL.
+
+ PortAudio manages the memory referenced by the returned pointer, the client
+ must not manipulate or free the memory. The pointer is only guaranteed to be
+ valid between calls to Pa_Initialize() and Pa_Terminate().
+
+*/
+
+const PaDeviceInfo* Pa_GetDeviceInfo( PaDeviceID device );
+
+/*
+ PaTimestamp is used to represent a continuous sample clock with arbitrary
+ start time that can be used for syncronization. The type is used for the
+ outTime argument to the PortAudioCallback and as the result of Pa_StreamTime()
+
+*/
+
+typedef double PaTimestamp;
+
+/*
+ PortAudioCallback is implemented by PortAudio clients.
+ 
+ inputBuffer and outputBuffer are arrays of interleaved samples,
+ the format, packing and number of channels used by the buffers are
+ determined by parameters to Pa_OpenStream() (see below).
+ 
+ framesPerBuffer is the number of sample frames to be processed by the callback.
+ 
+ outTime is the time in samples when the buffer(s) processed by
+ this callback will begin being played at the audio output.
+ See also Pa_StreamTime()
+ 
+ userData is the value of a user supplied pointer passed to Pa_OpenStream()
+ intended for storing synthesis data etc.
+ 
+ return value:
+ The callback can return a non-zero value to stop the stream. This may be
+ useful in applications such as soundfile players where a specific duration
+ of output is required. However, it is not necessary to utilise this mechanism
+ as StopStream() will also terminate the stream. A callback returning a
+ non-zero value must fill the entire outputBuffer.
+ 
+ NOTE: None of the other stream functions may be called from within the
+ callback function except for Pa_GetCPULoad().
+
+*/
+
+typedef int (PortAudioCallback)(
+    void *inputBuffer, void *outputBuffer,
+    unsigned long framesPerBuffer,
+    PaTimestamp outTime, void *userData );
+
+
+/*
+ Stream flags
+ 
+ These flags may be supplied (ored together) in the streamFlags argument to
+ the Pa_OpenStream() function.
+
+*/
+
+#define   paNoFlag      (0)
+#define   paClipOff     (1<<0)   /* disable default clipping of out of range samples */
+#define   paDitherOff   (1<<1)   /* disable default dithering */
+#define   paPlatformSpecificFlags (0x00010000)
+typedef   unsigned long PaStreamFlags;
+
+/*
+ A single PortAudioStream provides multiple channels of real-time
+ input and output audio streaming to a client application.
+ Pointers to PortAudioStream objects are passed between PortAudio functions.
+*/
+
+typedef void PortAudioStream;
+#define PaStream PortAudioStream
+
+/*
+ Pa_OpenStream() opens a stream for either input, output or both.
+ 
+ stream is the address of a PortAudioStream pointer which will receive
+ a pointer to the newly opened stream.
+ 
+ inputDevice is the id of the device used for input (see PaDeviceID above.)
+ inputDevice may be paNoDevice to indicate that an input device is not required.
+ 
+ numInputChannels is the number of channels of sound to be delivered to the
+ callback. It can range from 1 to the value of maxInputChannels in the
+ PaDeviceInfo record for the device specified by the inputDevice parameter.
+ If inputDevice is paNoDevice numInputChannels is ignored.
+ 
+ inputSampleFormat is the sample format of inputBuffer provided to the callback
+ function. inputSampleFormat may be any of the formats described by the
+ PaSampleFormat enumeration (see above). PortAudio guarantees support for
+ the device's native formats (nativeSampleFormats in the device info record)
+ and additionally 16 and 32 bit integer and 32 bit floating point formats.
+ Support for other formats is implementation defined.
+ 
+ inputDriverInfo is a pointer to an optional driver specific data structure
+ containing additional information for device setup or stream processing.
+ inputDriverInfo is never required for correct operation. If not used
+ inputDriverInfo should be NULL.
+ 
+ outputDevice is the id of the device used for output (see PaDeviceID above.)
+ outputDevice may be paNoDevice to indicate that an output device is not required.
+ 
+ numOutputChannels is the number of channels of sound to be supplied by the
+ callback. See the definition of numInputChannels above for more details.
+ 
+ outputSampleFormat is the sample format of the outputBuffer filled by the
+ callback function. See the definition of inputSampleFormat above for more
+ details.
+ 
+ outputDriverInfo is a pointer to an optional driver specific data structure
+ containing additional information for device setup or stream processing.
+ outputDriverInfo is never required for correct operation. If not used
+ outputDriverInfo should be NULL.
+ 
+ sampleRate is the desired sampleRate. For full-duplex streams it is the
+ sample rate for both input and output
+ 
+ framesPerBuffer is the length in sample frames of all internal sample buffers
+ used for communication with platform specific audio routines. Wherever
+ possible this corresponds to the framesPerBuffer parameter passed to the
+ callback function.
+ 
+ numberOfBuffers is the number of buffers used for multibuffered communication
+ with the platform specific audio routines. If you pass zero, then an optimum
+ value will be chosen for you internally. This parameter is provided only
+ as a guide - and does not imply that an implementation must use multibuffered
+ i/o when reliable double buffering is available (such as SndPlayDoubleBuffer()
+ on the Macintosh.)
+ 
+ streamFlags may contain a combination of flags ORed together.
+ These flags modify the behaviour of the streaming process. Some flags may only
+ be relevant to certain buffer formats.
+ 
+ callback is a pointer to a client supplied function that is responsible
+ for processing and filling input and output buffers (see above for details.)
+ 
+ userData is a client supplied pointer which is passed to the callback
+ function. It could for example, contain a pointer to instance data necessary
+ for processing the audio buffers.
+ 
+ return value:
+ Upon success Pa_OpenStream() returns PaNoError and places a pointer to a
+ valid PortAudioStream in the stream argument. The stream is inactive (stopped).
+ If a call to Pa_OpenStream() fails a non-zero error code is returned (see
+ PaError above) and the value of stream is invalid.
+ 
+*/
+
+PaError Pa_OpenStream( PortAudioStream** stream,
+                       PaDeviceID inputDevice,
+                       int numInputChannels,
+                       PaSampleFormat inputSampleFormat,
+                       void *inputDriverInfo,
+                       PaDeviceID outputDevice,
+                       int numOutputChannels,
+                       PaSampleFormat outputSampleFormat,
+                       void *outputDriverInfo,
+                       double sampleRate,
+                       unsigned long framesPerBuffer,
+                       unsigned long numberOfBuffers,
+                       PaStreamFlags streamFlags,
+                       PortAudioCallback *callback,
+                       void *userData );
+
+
+/*
+ Pa_OpenDefaultStream() is a simplified version of Pa_OpenStream() that opens
+ the default input and/or output devices. Most parameters have identical meaning
+ to their Pa_OpenStream() counterparts, with the following exceptions:
+ 
+ If either numInputChannels or numOutputChannels is 0 the respective device
+ is not opened. This has the same effect as passing paNoDevice in the device
+ arguments to Pa_OpenStream().
+ 
+ sampleFormat applies to both the input and output buffers.
+
+*/
+
+PaError Pa_OpenDefaultStream( PortAudioStream** stream,
+                              int numInputChannels,
+                              int numOutputChannels,
+                              PaSampleFormat sampleFormat,
+                              double sampleRate,
+                              unsigned long framesPerBuffer,
+                              unsigned long numberOfBuffers,
+                              PortAudioCallback *callback,
+                              void *userData );
+
+/*
+ Pa_CloseStream() closes an audio stream, flushing any pending buffers.
+
+*/
+
+PaError Pa_CloseStream( PortAudioStream* );
+
+/*
+ Pa_StartStream() and Pa_StopStream() begin and terminate audio processing.
+ Pa_StopStream() waits until all pending audio buffers have been played.
+ Pa_AbortStream() stops playing immediately without waiting for pending
+ buffers to complete.
+    
+*/
+
+PaError Pa_StartStream( PortAudioStream *stream );
+
+PaError Pa_StopStream( PortAudioStream *stream );
+
+PaError Pa_AbortStream( PortAudioStream *stream );
+
+/*
+ Pa_StreamActive() returns one (1) when the stream is active (ie playing
+ or recording audio), zero (0) when not playing, or a negative error number
+ if the stream is invalid.
+ The stream is active between calls to Pa_StartStream() and Pa_StopStream(),
+ but may also become inactive if the callback returns a non-zero value.
+ In the latter case, the stream is considered inactive after the last
+ buffer has finished playing.
+ 
+*/
+
+PaError Pa_StreamActive( PortAudioStream *stream );
+
+/*
+ Pa_StreamTime() returns the current output time in samples for the stream.
+ This time may be used as a time reference (for example synchronizing audio to
+ MIDI).
+ 
+*/
+
+PaTimestamp Pa_StreamTime( PortAudioStream *stream );
+
+/*
+ Pa_GetCPULoad() returns the CPU Load for the stream.
+ The "CPU Load" is a fraction of total CPU time consumed by the stream's
+ audio processing routines including, but not limited to the client supplied
+ callback.
+ A value of 0.5 would imply that PortAudio and the sound generating
+ callback was consuming roughly 50% of the available CPU time.
+ This function may be called from the callback function or the application.
+ 
+*/
+
+double Pa_GetCPULoad( PortAudioStream* stream );
+
+/*
+ Pa_GetMinNumBuffers() returns the minimum number of buffers required by
+ the current host based on minimum latency.
+ On the PC, for the DirectSound implementation, latency can be optionally set
+ by user by setting an environment variable.
+ For example, to set latency to 200 msec, put:
+ 
+    set PA_MIN_LATENCY_MSEC=200
+ 
+ in the AUTOEXEC.BAT file and reboot.
+ If the environment variable is not set, then the latency will be determined
+ based on the OS. Windows NT has higher latency than Win95.
+ 
+*/
+
+int Pa_GetMinNumBuffers( int framesPerBuffer, double sampleRate );
+
+/*
+ Pa_Sleep() puts the caller to sleep for at least 'msec' milliseconds.
+ You may sleep longer than the requested time so don't rely on this for
+ accurate musical timing.
+ 
+ Pa_Sleep() is provided as a convenience for authors of portable code (such as
+ the tests and examples in the PortAudio distribution.)
+ 
+*/
+
+void Pa_Sleep( long msec );
+
+/*
+ Pa_GetSampleSize() returns the size in bytes of a single sample in the
+ supplied PaSampleFormat, or paSampleFormatNotSupported if the format is
+ no supported.
+  
+*/
+
+PaError Pa_GetSampleSize( PaSampleFormat format );
+/*****************************Extension for LinPSK / DarwinPSK *******/
+/*
+Pa_SetxxxVolume ( ) sets the volume for an PaDevice
+
+*/
+PaError Pa_SetInputVolume(PaDeviceID DeviceID,int channel,float Volume);
+PaError Pa_SetOutputVolume(PaDeviceID DeviceID,int channel,float Volume);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* PORT_AUDIO_H */
diff --git a/linpsk/pskmodulator.cpp b/src/pskmodulator.cpp
similarity index 97%
rename from linpsk/pskmodulator.cpp
rename to src/pskmodulator.cpp
index 1462989..edff932 100644
--- a/linpsk/pskmodulator.cpp
+++ b/src/pskmodulator.cpp
@@ -48,9 +48,9 @@
 #define SYMBOL_RATE 31.25		// 31.25 Symbols per Second
 
 #define MAXRAMP_SIZE (((100*11100)/3125)+1) // max number of envelope ramp steps per symbol
-
+/** Not needed any longer 
 #define TX_CONSTANT 23000.0		// TX Amplitude Factor
-
+**/
 #define CW_SPEED 1		//bigger is slower. 1 is fastest.
 
 // The use of static's here preclude having multiple instantiations
@@ -469,24 +469,26 @@ int PSKModulator::CalcSignal(double *pData, int n)
 int symbol;
 int i;
 
-		m_RMSConstant = TX_CONSTANT;
+//		m_RMSConstant = TX_CONSTANT;
 
 	for( i=0; i<n; i++ )		//calculate n samples of tx data stream
 	{
-		m_t += m_PSKPhaseInc;			// increment radian phase count
+	 m_t += m_PSKPhaseInc;		// increment radian phase count
 		
 // create sample from sin/cos and shape tables
-		pData[i] = m_RMSConstant*( m_pPSKtxI[m_Ramp]*sin( m_t ) + m_pPSKtxQ[m_Ramp++]*cos( m_t ) );
+//		pData[i] = m_RMSConstant*( m_pPSKtxI[m_Ramp]*sin( m_t ) + m_pPSKtxQ[m_Ramp++]*cos( m_t ) );
+	pData[i] = 0.49 * ( m_pPSKtxI[m_Ramp]*sin( m_t ) + m_pPSKtxQ[m_Ramp++]*cos( m_t ) );
+
 		m_PSKTime += m_PSKSecPerSamp;
 		if( m_PSKTime >= m_PSKPeriodUpdate )//if time to update envelope ramp index
 		{
 			m_PSKTime -= m_PSKPeriodUpdate;	//keep time bounded
 			m_Ramp = 0;						// time to update symbol
 			m_t = fmod(m_t,PI2);			//keep radian counter bounded
-      if (status == TX_CWID_STATE)
-					symbol = GetNextCWSymbol();
+                        if (status == TX_CWID_STATE)
+                            symbol = GetNextCWSymbol();
 			else
-        symbol = GetNextSymbol();
+                            symbol = GetNextSymbol();
 
 			//get new I/Q ramp tables and next phase
 			m_pPSKtxI = PSKPhaseLookupTable[symbol][m_PresentPhase].iptr;
diff --git a/linpsk/pskmodulator.h b/src/pskmodulator.h
similarity index 96%
rename from linpsk/pskmodulator.h
rename to src/pskmodulator.h
index 7bc3855..4a2e477 100644
--- a/linpsk/pskmodulator.h
+++ b/src/pskmodulator.h
@@ -27,15 +27,12 @@
 #define PSKMOD_H
 
 #include <qobject.h>
-//#include "constants.h"
-//#include "parameter.h"
 #include <ctype.h>
 
 #include "ctxdisplay.h"
 #include "ctxwindow.h"
 #include "cmodulator.h"
 
-//extern Parameter settings;
 
 
 class CTxBuffer;
@@ -65,7 +62,7 @@ private:
 // PSK31 and CW generator variables
 	double m_t;
 	int m_Ramp;
-	double m_RMSConstant;
+///	double m_RMSConstant;
 
 	double m_PSKSecPerSamp;
 	double m_PSKTime;
diff --git a/linpsk/psktable.h b/src/psktable.h
similarity index 100%
rename from linpsk/psktable.h
rename to src/psktable.h
diff --git a/linpsk/qpskdemodulator.cpp b/src/qpskdemodulator.cpp
similarity index 99%
rename from linpsk/qpskdemodulator.cpp
rename to src/qpskdemodulator.cpp
index 9be4759..c51cd27 100644
--- a/linpsk/qpskdemodulator.cpp
+++ b/src/qpskdemodulator.cpp
@@ -65,7 +65,8 @@ int bit;
 char ch =0;
 	CalcQuality(angle);
 	v->decode( angle);
-	bit = v->getbit(32);		
+	bit = v->getbitinvers(32);
+   
 	if( (bit==0) && m_LastBitZero )	//if character delimiter
 	{
 		if(m_BitAcc != 0 )
diff --git a/linpsk/qpskdemodulator.h b/src/qpskdemodulator.h
similarity index 100%
rename from linpsk/qpskdemodulator.h
rename to src/qpskdemodulator.h
diff --git a/linpsk/qpskmodulator.cpp b/src/qpskmodulator.cpp
similarity index 100%
rename from linpsk/qpskmodulator.cpp
rename to src/qpskmodulator.cpp
diff --git a/linpsk/qpskmodulator.h b/src/qpskmodulator.h
similarity index 100%
rename from linpsk/qpskmodulator.h
rename to src/qpskmodulator.h
diff --git a/src/qsodata.cpp b/src/qsodata.cpp
new file mode 100644
index 0000000..6b3d2d7
--- /dev/null
+++ b/src/qsodata.cpp
@@ -0,0 +1,237 @@
+/****************************************************************************
+** Form implementation generated from reading ui file 'qsodata.ui'
+**
+** Created: Wed Aug 25 14:54:55 2004
+**      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.2   edited Nov 24 13:47 $)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+
+#include "qsodata.h"
+
+#include <qvariant.h>
+#include <qlabel.h>
+#include <qframe.h>
+#include <qlineedit.h>
+#include <qpushbutton.h>
+#include <qlayout.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+#include "qsodata.ui.h"
+
+/*
+ *  Constructs a QSOData which is a child of 'parent', with the
+ *  name 'name'.' 
+ */
+QSOData::QSOData( QWidget* parent,  const char* name )
+    : QGroupBox( parent, name )
+{
+    if ( !name )
+	setName( "QSOData" );
+    setMinimumSize( QSize( 200, 190 ) );
+    setMaximumSize( QSize( 250, 200 ) );
+    setBaseSize( QSize( 190, 180 ) );
+    setAlignment( int( QGroupBox::AlignHCenter ) );
+
+    Date = new QLabel( this, "Date" );
+    Date->setGeometry( QRect( 5, 140, 35, 15 ) );
+    Date->setMaximumSize( QSize( 60, 15 ) );
+
+    Time = new QLabel( this, "Time" );
+    Time->setGeometry( QRect( 135, 140, 40, 15 ) );
+
+    His = new QLabel( this, "His" );
+    His->setGeometry( QRect( 5, 120, 55, 15 ) );
+    His->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, His->sizePolicy().hasHeightForWidth() ) );
+    His->setMaximumSize( QSize( 60, 15 ) );
+    His->setTextFormat( QLabel::PlainText );
+
+    Frequency = new QLabel( this, "Frequency" );
+    Frequency->setGeometry( QRect( 10, 97, 70, 15 ) );
+    Frequency->setMaximumSize( QSize( 80, 15 ) );
+
+    QTH = new QLabel( this, "QTH" );
+    QTH->setGeometry( QRect( 10, 56, 33, 16 ) );
+
+    line3 = new QFrame( this, "line3" );
+    line3->setGeometry( QRect( 1, 52, 255, 5 ) );
+    line3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, line3->sizePolicy().hasHeightForWidth() ) );
+    line3->setFrameShape( QFrame::HLine );
+    line3->setFrameShadow( QFrame::Sunken );
+    line3->setFrameShape( QFrame::HLine );
+
+    line5 = new QFrame( this, "line5" );
+    line5->setGeometry( QRect( 1, 93, 255, 5 ) );
+    line5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, line5->sizePolicy().hasHeightForWidth() ) );
+    line5->setFrameShape( QFrame::HLine );
+    line5->setFrameShadow( QFrame::Sunken );
+    line5->setFrameShape( QFrame::HLine );
+
+    line4 = new QFrame( this, "line4" );
+    line4->setGeometry( QRect( 1, 115, 255, 5 ) );
+    line4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, line4->sizePolicy().hasHeightForWidth() ) );
+    line4->setFrameShape( QFrame::HLine );
+    line4->setFrameShadow( QFrame::Sunken );
+    line4->setFrameShape( QFrame::HLine );
+
+    Locator = new QLabel( this, "Locator" );
+    Locator->setGeometry( QRect( 10, 75, 50, 15 ) );
+
+    QsoDate = new QLineEdit( this, "QsoDate" );
+    QsoDate->setGeometry( QRect( 45, 140, 80, 15 ) );
+    QsoDate->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, QsoDate->sizePolicy().hasHeightForWidth() ) );
+    QsoDate->setMaximumSize( QSize( 80, 15 ) );
+
+    HisRST = new QLineEdit( this, "HisRST" );
+    HisRST->setGeometry( QRect( 73, 120, 50, 15 ) );
+    HisRST->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 60, 20, HisRST->sizePolicy().hasHeightForWidth() ) );
+    HisRST->setMaximumSize( QSize( 60, 15 ) );
+
+    Mine = new QLabel( this, "Mine" );
+    Mine->setGeometry( QRect( 130, 120, 60, 15 ) );
+    Mine->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, Mine->sizePolicy().hasHeightForWidth() ) );
+    Mine->setMaximumSize( QSize( 60, 15 ) );
+    Mine->setTextFormat( QLabel::PlainText );
+
+    Name = new QLabel( this, "Name" );
+    Name->setGeometry( QRect( 10, 35, 50, 16 ) );
+    Name->setFrameShape( QLabel::NoFrame );
+    Name->setFrameShadow( QLabel::Plain );
+
+    RemoteCall = new QLabel( this, "RemoteCall" );
+    RemoteCall->setGeometry( QRect( 10, 18, 50, 15 ) );
+    RemoteCall->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, RemoteCall->sizePolicy().hasHeightForWidth() ) );
+    RemoteCall->setTextFormat( QLabel::PlainText );
+    RemoteCall->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignLeft ) );
+
+    Refresh = new QPushButton( this, "Refresh" );
+    Refresh->setGeometry( QRect( 95, 170, 67, 29 ) );
+    QFont Refresh_font(  Refresh->font() );
+    Refresh->setFont( Refresh_font ); 
+
+    Clear = new QPushButton( this, "Clear" );
+    Clear->setGeometry( QRect( 180, 170, 60, 30 ) );
+    QFont Clear_font(  Clear->font() );
+    Clear->setFont( Clear_font ); 
+
+    Save = new QPushButton( this, "Save" );
+    Save->setGeometry( QRect( 10, 170, 61, 30 ) );
+    Save->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, Save->sizePolicy().hasHeightForWidth() ) );
+    Save->setMinimumSize( QSize( 30, 20 ) );
+    QFont Save_font(  Save->font() );
+    Save->setFont( Save_font ); 
+    Save->setFlat( FALSE );
+
+    MyRST = new QLineEdit( this, "MyRST" );
+    MyRST->setGeometry( QRect( 185, 120, 50, 15 ) );
+    MyRST->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 60, 20, MyRST->sizePolicy().hasHeightForWidth() ) );
+    MyRST->setMaximumSize( QSize( 50, 15 ) );
+
+    Loc = new QLineEdit( this, "Loc" );
+    Loc->setGeometry( QRect( 75, 75, 165, 15 ) );
+    Loc->setMaximumSize( QSize( 200, 15 ) );
+
+    QsoFrequency = new QLineEdit( this, "QsoFrequency" );
+    QsoFrequency->setGeometry( QRect( 105, 97, 100, 15 ) );
+    QsoFrequency->setMaximumSize( QSize( 100, 15 ) );
+
+    QsoTime = new QLineEdit( this, "QsoTime" );
+    QsoTime->setGeometry( QRect( 185, 140, 50, 15 ) );
+    QsoTime->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, QsoTime->sizePolicy().hasHeightForWidth() ) );
+    QsoTime->setMaximumSize( QSize( 50, 15 ) );
+
+    RemoteCallsign = new QLineEdit( this, "RemoteCallsign" );
+    RemoteCallsign->setGeometry( QRect( 75, 18, 165, 15 ) );
+    RemoteCallsign->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, 0, 0, RemoteCallsign->sizePolicy().hasHeightForWidth() ) );
+    RemoteCallsign->setMaximumSize( QSize( 200, 15 ) );
+
+    OpName = new QLineEdit( this, "OpName" );
+    OpName->setGeometry( QRect( 75, 35, 165, 15 ) );
+    OpName->setMaximumSize( QSize( 200, 15 ) );
+
+    Qth = new QLineEdit( this, "Qth" );
+    Qth->setGeometry( QRect( 75, 56, 165, 15 ) );
+    Qth->setMaximumSize( QSize( 200, 15 ) );
+    languageChange();
+    resize( QSize(250, 200).expandedTo(minimumSizeHint()) );
+    clearWState( WState_Polished );
+
+    // signals and slots connections
+    connect( Clear, SIGNAL( clicked() ), this, SLOT( clear() ) );
+    connect( Refresh, SIGNAL( clicked() ), this, SLOT( refreshDateTime() ) );
+    connect( RemoteCallsign, SIGNAL( returnPressed() ), this, SLOT( Callsignchanged() ) );
+    connect( OpName, SIGNAL( returnPressed() ), this, SLOT( Namechanged() ) );
+    connect( Qth, SIGNAL( returnPressed() ), this, SLOT( QTHchanged() ) );
+    connect( Loc, SIGNAL( returnPressed() ), this, SLOT( Locatorchanged() ) );
+    connect( QsoFrequency, SIGNAL( returnPressed() ), this, SLOT( Frequencychanged() ) );
+    connect( HisRST, SIGNAL( returnPressed() ), this, SLOT( HisRSTchanged() ) );
+    connect( MyRST, SIGNAL( returnPressed() ), this, SLOT( MyRSTchanged() ) );
+    connect( QsoDate, SIGNAL( returnPressed() ), this, SLOT( Datechanged() ) );
+    connect( QsoTime, SIGNAL( returnPressed() ), this, SLOT( Timechanged() ) );
+    connect( RemoteCallsign, SIGNAL( lostFocus() ), this, SLOT( Callsignchanged() ) );
+    connect( OpName, SIGNAL( lostFocus() ), this, SLOT( Namechanged() ) );
+    connect( Qth, SIGNAL( lostFocus() ), this, SLOT( QTHchanged() ) );
+    connect( Loc, SIGNAL( lostFocus() ), this, SLOT( Locatorchanged() ) );
+    connect( QsoFrequency, SIGNAL( lostFocus() ), this, SLOT( Frequencychanged() ) );
+    connect( HisRST, SIGNAL( lostFocus() ), this, SLOT( HisRSTchanged() ) );
+    connect( MyRST, SIGNAL( lostFocus() ), this, SLOT( MyRSTchanged() ) );
+    connect( QsoDate, SIGNAL( lostFocus() ), this, SLOT( Datechanged() ) );
+    connect( QsoTime, SIGNAL( lostFocus() ), this, SLOT( Timechanged() ) );
+    connect( RemoteCallsign, SIGNAL( returnPressed() ), this, SLOT( Callsignchanged() ) );
+    connect( OpName, SIGNAL( returnPressed() ), this, SLOT( Namechanged() ) );
+    connect( Qth, SIGNAL( returnPressed() ), this, SLOT( QTHchanged() ) );
+    connect( Loc, SIGNAL( returnPressed() ), this, SLOT( Locatorchanged() ) );
+    connect( QsoFrequency, SIGNAL( returnPressed() ), this, SLOT( Frequencychanged() ) );
+    connect( HisRST, SIGNAL( returnPressed() ), this, SLOT( HisRSTchanged() ) );
+    connect( MyRST, SIGNAL( returnPressed() ), this, SLOT( MyRSTchanged() ) );
+    connect( QsoDate, SIGNAL( returnPressed() ), this, SLOT( Datechanged() ) );
+    connect( QsoTime, SIGNAL( returnPressed() ), this, SLOT( Timechanged() ) );
+    connect( Save, SIGNAL( clicked() ), this, SLOT( save() ) );
+    connect( RemoteCallsign, SIGNAL( lostFocus() ), this, SLOT( Callsignchanged() ) );
+
+    // tab order
+    setTabOrder( RemoteCallsign, OpName );
+    setTabOrder( OpName, Qth );
+    setTabOrder( Qth, Loc );
+    setTabOrder( Loc, QsoFrequency );
+    setTabOrder( QsoFrequency, HisRST );
+    setTabOrder( HisRST, MyRST );
+    setTabOrder( MyRST, QsoDate );
+    setTabOrder( QsoDate, QsoTime );
+    setTabOrder( QsoTime, Save );
+    setTabOrder( Save, Refresh );
+    setTabOrder( Refresh, Clear );
+    init();
+}
+
+/*
+ *  Destroys the object and frees any allocated resources
+ */
+QSOData::~QSOData()
+{
+    destroy();
+    // no need to delete child widgets, Qt does it all for us
+}
+
+/*
+ *  Sets the strings of the subwidgets using the current
+ *  language.
+ */
+void QSOData::languageChange()
+{
+    setCaption( tr( "QSOData" ) );
+    setTitle( tr( "QSOData" ) );
+    Date->setText( tr( "Date" ) );
+    Time->setText( tr( "Time" ) );
+    His->setText( tr( "His RST" ) );
+    Frequency->setText( tr( "Frequency" ) );
+    QTH->setText( tr( "QTH" ) );
+    Locator->setText( tr( "Locator" ) );
+    Mine->setText( tr( "My RST" ) );
+    Name->setText( tr( "Name" ) );
+    RemoteCall->setText( tr( "Callsign" ) );
+    Refresh->setText( tr( "Refresh" ) );
+    Clear->setText( tr( "Clear" ) );
+    Save->setText( tr( "Save" ) );
+}
+
diff --git a/linpsk/qsoinfo.cpp b/src/qsoinfo.cpp
similarity index 99%
rename from linpsk/qsoinfo.cpp
rename to src/qsoinfo.cpp
index 48a2e5c..f453977 100644
--- a/linpsk/qsoinfo.cpp
+++ b/src/qsoinfo.cpp
@@ -19,6 +19,7 @@
 
 QsoInfo::QsoInfo()
 {
+/** 
 TheirCall="";
 TheirName="";
 QTH="";
@@ -26,7 +27,7 @@ Locator="";
 Frequency="";
 HisRst="";
 MyRst="";
-
+**/
 
   
 }
diff --git a/linpsk/qsoinfo.h b/src/qsoinfo.h
similarity index 97%
rename from linpsk/qsoinfo.h
rename to src/qsoinfo.h
index c047dd0..f93d8ef 100644
--- a/linpsk/qsoinfo.h
+++ b/src/qsoinfo.h
@@ -28,7 +28,8 @@ public:
 	QsoInfo();
 	~QsoInfo();
 
-QString TheirCall;
+QString *TheirCall;
+/**
 QString TheirName;
 QString QTH;
 QString Locator;
@@ -37,6 +38,8 @@ QString HisRst;
 QString MyRst;
 QString QsoDate;
 QString QsoTime;
+**/
+        
 };
 
 #endif
diff --git a/src/rttydemodulator.cpp b/src/rttydemodulator.cpp
new file mode 100644
index 0000000..16bb73a
--- /dev/null
+++ b/src/rttydemodulator.cpp
@@ -0,0 +1,509 @@
+/***************************************************************************
+                          rttydemodulator.cpp  -  description
+                             -------------------
+    begin                : Mon Jun 4 2001
+    copyright            : (C) 2001 by Volker Schroer
+    email                : dl1ksv at gmx.de
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) any later version.                                   *
+ ***************************************************************************/
+
+#include "rttydemodulator.h"
+#include "firfilter.h"
+#include "constants.h"
+
+//#define CC1 0.9491 //   0.875 0.125 0.9125 0.0875 0.2 0.8
+//#define CC3 0.05518// 0.9 0.02
+//#define B1 0.932
+#define CC1 0.95    /// 1. 0.1 0.7 , 0.775 0.1 0.7 , 0.8 0.08 0.575
+#define CC3 0.15     /// 0.975 0.05 0.55 , 0.95 0.06 0.4 , 0.975 0.2 0.625
+#define B1  0.625
+#define DOWN 2
+#define HoldLimit 3
+RTTYDemodulator::RTTYDemodulator():FSKDemodulator(2)
+{
+ShiftOn = false;
+BufferPointer=0;
+BufferCount=0;
+StopBit1Length=0;
+RxFrequency=0.0; // Will be set correctly in setFrequency !
+//Initialize ExtraParameter
+extraParameter.stopbits=Onepoint5;
+extraParameter.parity=None;
+extraParameter.reverse=true;
+extraParameter.offset=170;
+
+C1=CC1;
+C3=CC3;
+}
+RTTYDemodulator::~RTTYDemodulator()
+{
+ /**
+ if (Lp0 != 0)
+  delete Lp0;
+ if (Lp1 != 0)
+  delete Lp1;
+ if (Lp2 != 0)
+  delete Lp2;
+
+ Lp0=0;
+ Lp1=0;
+ Lp2=0;
+ **/
+}
+/** returns the asci char corresponding to the baudot code */
+char RTTYDemodulator::baudot_code(char data)
+{
+/** Table of letters */
+
+static const char letters[32] =	{0x00,'E','\r','A',' ','S','I','U',
+				 '\n','D','R','J','N','F','C','K',
+				 'T','Z','L','W','H','Y','P','Q',
+				 'O','B','G','^','M','X','V','^'};
+
+
+/** Table of symbols */
+static const char symbols[32] = {0x00,'3','\r','-',' ','\'','8','7',
+                                  '\n','$','4','#',',','!',':','(',
+                                   '5','"',')','2','#','6','0','1',
+                                   '9','?','&','^','.','/',';','^'};
+
+char c;
+
+ switch (data)
+ {
+  case 0x1f :
+   ShiftOn = false;  //LTRS
+   c = 0;
+   break;
+  case 0x1b :
+   ShiftOn = true;   //FIGS
+   c = 0;
+   break;
+  default:
+   if (!ShiftOn)
+    c=letters[(int) data];
+   else
+    c=symbols[(int) data];
+    break;
+ }
+
+
+if ( c == ' ')	// Unshift on Space
+ ShiftOn =false;	
+
+return c;
+}
+
+bool RTTYDemodulator::Init(double FS,int NumberofSamples)
+{
+ double coeffs[NumberofProbes], x0;
+ int i;
+FSKDemodulator::Init(FS,NumberofSamples);
+Baudrate=45.45;
+NumberOfBits=5;
+SymbolLength=int (FS/Baudrate+0.5);
+Status = WaitingForMark;
+FrequencyChanged = false;
+ave1=0.5;
+ave2=0.0;
+setFilter(Baudrate,SymbolLength,Distance);
+setRxFrequency(1000.);
+DisplayPointer=0;
+
+x0 = PI2*85./(11025./Distance);
+for(i=0; i < NumberofProbes; i++)
+ {
+  if( i != (NumberofProbes-1)/2 )
+   coeffs[i]=sin(x0*(i-(NumberofProbes-1)/2))/(i-(NumberofProbes-1)/2);
+  else
+   coeffs[i]=x0;
+  coeffs[i] *=(0.42-0.5*cos((PI2*i)/(NumberofProbes-1))
+                +0.08*cos((PI2*(i+i))/(NumberofProbes-1)));
+ }
+  // Normalize for unity at DC
+  x0=0.;
+  for(i=0;i<NumberofProbes;i++) 
+   x0 +=coeffs[i];
+  for(i=0;i<NumberofProbes;i++) 
+   coeffs[i] /=x0;
+DiscriminatorThreshold=0.;
+MarkMax=0.05;
+SpaceMax=0.05;
+holdCount1=0;
+holdCount2=0;
+return true;
+}
+
+void RTTYDemodulator::ProcessInput(double *input, double *)
+{
+char c1;
+int i,j,count;
+int StartBitCount,StopBit2Length, StartBitLength;
+int StopBit2Count;
+int actSample;
+int SamplestoProcess;
+actSample = 0;
+double F0in[MaxSamplestoProcess], F1in[MaxSamplestoProcess];
+ //, F0out[MaxSamplestoProcess], F1out[MaxSamplestoProcess];
+//double ThresholdInput[MaxSamplestoProcess],ThresholdOutput[MaxSamplestoProcess];
+
+float xx,xSum,StartBitValue, StopBit2Value;
+
+mixer(input);
+SamplestoProcess=lpDownSample();
+for(i=0;i <SamplestoProcess;i++)
+{
+ F0in[i]=abs(FilterOutput[0][i]);
+ F1in[i]=abs(FilterOutput[1][i]); 
+}
+
+
+while ( actSample < SamplestoProcess )
+{
+ if( (BufferCount < SampleBufferLength ) )
+ { 
+  while ( (BufferCount < SampleBufferLength ) && ( actSample < SamplestoProcess ) )
+  {
+    BufferCount++;
+
+    ellipseDisplay[DisplayPointer]=complex<float>(0.,5.);
+    DisplayPointer = (DisplayPointer +1 )% 512;
+    if (extraParameter.reverse)
+    {
+     MarkBuffer[BufferPointer]=F1in[actSample];
+     SpaceBuffer[BufferPointer]=F0in[actSample];
+    } 
+    else
+    { 
+     MarkBuffer[BufferPointer]=F0in[actSample];
+     SpaceBuffer[BufferPointer]=F1in[actSample];
+    } 
+    if(MarkMax < MarkBuffer[BufferPointer] )
+    {
+     MarkMax = MarkMax + C1 * ( MarkBuffer[BufferPointer]-MarkMax);
+     holdCount1=0;
+    }
+    else
+    {
+     if ( holdCount1 == HoldLimit )
+      MarkMax = MarkMax - C3 * ( MarkMax -MarkBuffer[BufferPointer]);
+     else
+      holdCount1++;
+    }
+    if(SpaceMax < SpaceBuffer[BufferPointer] )
+    {
+     SpaceMax = SpaceMax + C1 * ( SpaceBuffer[BufferPointer]-SpaceMax);
+     holdCount2=0;
+    }
+    else
+    {
+     if ( holdCount2 == HoldLimit )
+      SpaceMax = SpaceMax - C3 * ( SpaceMax -SpaceBuffer[BufferPointer]);
+     else
+      holdCount2++; 
+    }
+    MarkBuffer[BufferPointer] -= MarkMax/2;
+    SpaceBuffer[BufferPointer] -= SpaceMax/2;
+    
+    CharacterData[BufferPointer]=MarkBuffer[BufferPointer]-SpaceBuffer[BufferPointer];
+    BufferPointer++;
+    BufferPointer=BufferPointer%SampleBufferLength;
+    actSample ++;
+  } // End of filling CharacterData
+ }
+ while (BufferCount == SampleBufferLength)
+ {  
+  switch (Status)  // Now let's analyze the data
+  {
+   case WaitingForMark:        // Waiting for Stopbit, previous state undefined 
+
+    switch(extraParameter.stopbits)
+    {
+     case One:
+      StopBit1Length=NumberofProbes;
+      break;
+     case Onepoint5:
+      StopBit1Length =(3*NumberofProbes)/2;
+      break;
+      
+     case Two:
+      StopBit1Length=2*NumberofProbes;
+      break;  
+    }
+    // Check, if we are possibly at the beginning of a stop bit
+    
+    i = 0;
+    while ( (i < BufferCount ) && (CharacterData[(BufferPointer + i) % SampleBufferLength] <= DiscriminatorThreshold ) )
+     i++;
+    if ( i == 0 ) // At the beginning
+    {
+     StopBit1Count=0;
+     xSum=0.;
+     StopBit1Value=0.;
+     while ( i < StopBit1Length )
+     {
+      if (CharacterData[(BufferPointer + i) % SampleBufferLength] > DiscriminatorThreshold )
+       StopBit1Count++;
+      StopBit1Value +=MarkBuffer[(BufferPointer + i) % SampleBufferLength];
+      xSum += CharacterData[(BufferPointer + i) % SampleBufferLength];
+      i++;
+     }
+     StopBit1Value= StopBit1Value/StopBit1Length;
+     xSum = xSum / StopBit1Length;
+     if ( xSum > DiscriminatorThreshold  ) 
+      Status = WaitingForSpace;
+     else
+      BufferCount -= StopBit1Count;
+    }
+    else         // Refill the buffer
+     BufferCount -=i;
+   break;
+    
+    case WaitingForSpace:      // Stopbit seems to be found, now waiting for transition
+    
+     i = StopBit1Length  ;
+     while( (i < SampleBufferLength) && (CharacterData[(BufferPointer + i) % SampleBufferLength ]
+                                         > DiscriminatorThreshold ) )
+      i++;
+     if (i == SampleBufferLength )
+     {
+      BufferCount= StopBit1Length;   // No Space found, keep only StopBit1Length Samples
+      DiscriminatorThreshold /=DOWN;
+      CalcQuality((float)0.);
+     }
+     else
+     {
+      Status=CheckingStartBit;
+      i = i - StopBit1Length; 
+      BufferCount -=i;              // Refill buffer
+     }
+     break;
+     
+    case CheckingStartBit:
+     
+     j = StopBit1Length + BufferPointer;
+     xSum =0.;
+     StartBitValue = 0.;
+     StartBitCount=0;
+     StartBitLength = NumberofProbes;
+     for ( i= 0; i < NumberofProbes; i++)
+     { 
+      if (CharacterData[( i + j ) % SampleBufferLength]  < DiscriminatorThreshold )
+       StartBitCount++;
+      StartBitValue += SpaceBuffer[( i + j ) % SampleBufferLength];
+      xSum += CharacterData[( i + j ) % SampleBufferLength];
+     }
+     
+     StartBitValue= StartBitValue / StartBitLength; 
+     xSum = xSum/StartBitLength;
+     if ( xSum < DiscriminatorThreshold ) // Super, Startbit fits very well
+     {
+      Status = CheckingStopBits;
+      DiscriminatorThreshold = B1 * DiscriminatorThreshold + (1.-B1) * (StopBit1Value - StartBitValue ) /2; 
+     if(abs(xSum) > 0.01)
+      CalcQuality(abs(StartBitValue/xSum));
+     else
+      CalcQuality(abs(xSum));
+     }
+     else
+     {
+       Status = WaitingForMark;           // Was'nt the correct start bit, neither number nor value fits
+       BufferCount -= StopBit1Length;
+       CalcQuality((float)0.);
+     } 
+     
+     break;
+     
+     case CollectingByte:
+      c1=0;
+      for(i=0;i < NumberOfBits; i++)  
+      {
+       j=(BufferPointer + StopBit1Length + StartBitLength + i * NumberofProbes ) % SampleBufferLength;
+       xx =0.;
+       count = 0;
+       for(int j1=j;j1 <j + NumberofProbes; j1++)
+        xx += CharacterData[j1];
+       xx /= NumberofProbes;
+       
+       if ( xx > DiscriminatorThreshold )
+       {
+        c1 |= ( 1 << i);
+        DiscriminatorThreshold =B1 * DiscriminatorThreshold + (1.-B1) * (xx - StopBit1Value)/2 ;
+        StopBit1Value=xx;
+       }
+       else 
+       {
+        DiscriminatorThreshold =B1 * DiscriminatorThreshold + (1.-B1) * (StartBitValue-xx)/2 ;
+        StartBitValue=xx;
+       }
+      }  
+      if ( (c1 > 0 ) && (!Squelch || (Squelch && ( (unsigned int)(100.*ave1)>CDemodulator::Threshold))))
+      {
+       c1 = baudot_code(c1);
+       if ( c1 > 0)           // FIGS or LTRS result in c1 = 0 !
+        emit newSymbol( c1 );
+      } 
+     
+      if (extraParameter.parity != None)
+       Status = CheckingParity;
+      else
+      {
+       if ( xSum > DiscriminatorThreshold ) //|| (StopBit2Value > DiscriminatorThreshold) )
+        Status = WaitingForSpace;
+       else
+        Status=WaitingForMark;
+       BufferCount -= (StopBit1Length + StartBitLength + 5*NumberofProbes  );
+       StopBit1Length=StopBit2Length;
+       StopBit1Count=StopBit2Count;
+       StopBit1Value=StopBit2Value;
+      }
+     break;
+      
+     case CheckingParity: // Here we need BitsInData
+     break;
+      
+     case CheckingStopBits:
+      switch(extraParameter.stopbits)
+      {
+       case One:
+        StopBit2Length=NumberofProbes;
+        break;
+       case Onepoint5:
+        StopBit2Length =(3*NumberofProbes)/2;
+        break;
+        
+       case Two:
+        StopBit2Length=2*NumberofProbes;
+        break;  
+      }
+      
+      xSum=0.;
+      StopBit2Count=0;
+      StopBit2Value=0.;
+      j = BufferPointer+StopBit1Length + StartBitLength + NumberOfBits*NumberofProbes;
+      for ( i=0; i < StopBit2Length;i++)
+      { 
+       xx = CharacterData[(j+i)%SampleBufferLength];
+       StopBit2Value += MarkBuffer[(j+i)%SampleBufferLength];
+       if ( xx > DiscriminatorThreshold)
+        StopBit2Count++;
+       xSum +=xx;
+      }
+      StopBit2Value = StopBit2Value/StopBit2Length; 
+      xSum /= StopBit2Length;
+      if ( xSum > DiscriminatorThreshold ) //|| ( StopBit2avgThreshold > DiscriminatorThreshold ) )
+       Status = CollectingByte; 
+      else
+      {
+       if (StartBitValue < DiscriminatorThreshold ) 
+       {
+        
+       Status = CollectingByte; 
+       }
+       else
+       {
+       // StartBit was not Ok, can we correct ?
+        Status = WaitingForMark;
+        BufferCount -= (StopBit1Length+ StartBitLength/2);
+       }
+      }
+     break; 
+  }  // end of switch
+ }
+ }
+}
+void RTTYDemodulator::setRxFrequency(double freq)
+{
+ if ( freq != RxFrequency)
+ {
+  RxFrequency=freq; 
+  mixerfreqinc[0]=PI2*(RxFrequency)/SampleRate;
+  mixerfreqinc[1]=PI2*(RxFrequency+extraParameter.offset)/SampleRate;
+ }
+}
+void RTTYDemodulator::CalcQuality(float x)
+{
+ ave2=ave1;
+ ave1=0.3*ave1 + 0.15 *ave2 + 0.55 * x;
+// ave1 = 0.4899*ave1 + 0.9165 *ave2 + 0.916572 *x;
+}
+void RTTYDemodulator::CalcQuality(int pointer)
+{
+ave2=ave1;
+float sum,diff;
+pointer = pointer % SampleBufferLength;
+diff=abs(CharacterData[pointer]);
+sum=MarkBuffer[pointer]+SpaceBuffer[pointer];
+
+//if ( sum > 0.1 )
+ ave1=0.7*ave1 + 0.25 * ave2 + 0.05 * diff/sum;
+//else
+// ave1 = 0.5*ave1 + 0.3 *ave2;
+}
+
+int RTTYDemodulator::getSquelchValue()
+{
+return (int)(100.*ave1);
+}
+
+double RTTYDemodulator::get2RxFrequency()
+{
+ return RxFrequency+extraParameter.offset;
+
+}
+void RTTYDemodulator::setParameter(RxTxParameterType Type,void *Value)
+{
+switch (Type)
+ {
+ case Reverse:
+        extraParameter.reverse =  * (bool *) Value;
+        break;
+ case Offset:
+        extraParameter.offset = * (int *) Value;
+        break;
+case Parity:
+        extraParameter.parity = * (Paritaet *) Value;
+        break;
+case Extra:
+       extraParameter = * (ExtraParameter *) Value;
+       break; 
+ default:
+        break;
+ }
+}
+void *RTTYDemodulator::getParameter(RxTxParameterType Type)
+{
+switch (Type)
+ {
+ case Reverse:
+        return (void *) &extraParameter.reverse; 
+        break;
+ case Offset:
+        return (void *) &extraParameter.offset;
+        break;
+case Parity:
+        return (void *) &extraParameter.parity;
+        break;
+case Extra:
+        return (void *) &extraParameter;
+        break;        
+ default:
+        return 0;
+        break;
+  }      
+}
+void *RTTYDemodulator::getBuffer()
+{
+return (void *) ellipseDisplay;
+}
+AfcMode RTTYDemodulator::AfcProperties()
+{
+return Off;
+}
diff --git a/src/rttydemodulator.h b/src/rttydemodulator.h
new file mode 100644
index 0000000..cb3f740
--- /dev/null
+++ b/src/rttydemodulator.h
@@ -0,0 +1,112 @@
+/***************************************************************************
+                          rtty2demodulator.h  -  description
+                             -------------------
+    begin                : Mon Jun 4 2001
+    copyright            : (C) 2001 by Volker Schroer
+    email                : dl1ksv at gmx.de
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) any later version.                                   *
+ ***************************************************************************/
+
+#ifndef RTTYDEMODULATOR_H
+#define RTTYDEMODULATOR_H
+
+#define Distance 22 
+#define NumberofProbes 11  // (11025 / 45.45 ) / Distance
+
+#define SampleBufferLength  110  // Mindestens (1.5 Stop + 1Start + NumberOfBits Data +1.5 Stop) * NumberofProbes
+#define MaxSamplestoProcess 200 // >=4096 / Distance
+
+#include "fskdemodulator.h"
+#include <complex>
+#include "constants.h"
+using namespace std;
+/**Decodes RTTY 
+  *@author Volker Schroer
+  */
+class FIRFilter;
+
+class RTTYDemodulator : public FSKDemodulator  {
+public: 
+ RTTYDemodulator();
+ ~RTTYDemodulator();
+
+/** Prozess the input */
+ void ProcessInput(double * input, double *);
+ int getSquelchValue();
+ bool Init(double,int);
+ virtual double get2RxFrequency();
+ virtual void setParameter(RxTxParameterType,void * );
+ virtual void *getParameter(RxTxParameterType);
+ virtual void *getBuffer();
+ AfcMode AfcProperties();
+
+public slots: // Public slots
+/** Set RxFrequencies for RTTY */
+ void setRxFrequency(double);
+
+private: 	//Private Variables
+ enum StateOfReception { WaitingForMark,WaitingForSpace, 
+                         CheckingStartBit,CollectingByte,
+                         CheckingParity, CheckingStopBits};
+
+float CharacterData[SampleBufferLength];
+float MarkBuffer[SampleBufferLength],SpaceBuffer[SampleBufferLength];
+float DiscriminatorThreshold, StopBit1Value;
+float MarkMax,SpaceMax;
+float C1,C3;
+
+int BufferPointer;
+int BufferCount;
+int holdCount1,holdCount2;
+/** Filter for Integration (Lp) **/
+//FIRFilter *Lp0,*Lp1,*Lp2;
+/** Pointer for storing Data in the ellipse Display **/
+int DisplayPointer;
+/** Ellipse Display Data **/
+complex<float> ellipseDisplay[512];
+
+
+/** Status of Shift */
+bool ShiftOn;
+
+/** Baudrate */
+float Baudrate;
+
+/** Samples per bit */
+
+unsigned int NumberOfBits;
+/** Length of first Stopbit can't be local, as it might cross 
+    input buffer boundary **/
+int StopBit1Length,StopBit1Count;
+/** Status of reception*/
+StateOfReception Status;
+
+
+/** Look at FSKDemodulator **/
+unsigned int SymbolLength;
+
+/** has detected Frequency changed ? */
+bool FrequencyChanged;
+
+/** Variables for Squelch computing */
+float ave1,ave2;
+ // Some extra paramters 
+ ExtraParameter extraParameter;      
+
+private: // Private methods
+ /** returns the asci char coresponding to the baudot code */
+ char baudot_code(char);
+  
+ /** Calc the quality of the signal for squelch */
+ void CalcQuality(int);
+ void CalcQuality(float);
+ };
+
+#endif
diff --git a/linpsk/rttymodulator.cpp b/src/rttymodulator.cpp
similarity index 87%
rename from linpsk/rttymodulator.cpp
rename to src/rttymodulator.cpp
index 3698e0c..2a34c1a 100644
--- a/linpsk/rttymodulator.cpp
+++ b/src/rttymodulator.cpp
@@ -25,7 +25,7 @@ RTTYModulator::RTTYModulator(int FS,double frequency,CTxBuffer *TxBuffer) : CMod
 
 {
 Baudrate=45;
-NumberofStopBits=onepoint5;
+NumberofStopBits=Onepoint5;
 SamplesPerBit=SampleRate/Baudrate;
 f0=frequency;
 f1=frequency+170.;
@@ -48,6 +48,11 @@ status=TX_PREAMBLE_STATE;
 actCharacterStatus=IGNORE;
 secondchar =0;
 
+//Initialize ExtraParameter
+extraParameter.stopbits=Onepoint5;
+extraParameter.parity=None;
+extraParameter.reverse=true;
+extraParameter.offset=170;
 }
 RTTYModulator::~RTTYModulator()
 {
@@ -58,18 +63,18 @@ int RTTYModulator::CalcSignal(double *data,int BUFSIZE)
 {
 int i;
 for(i=0;i<BUFSIZE;i++)
-	{
-		if ( NxSamples >= SamplesPerBit) // get next bit , NxSamples will be reset in getNextBit
-					actBit = getNextBit();
-		if ( status == TX_END_STATE)
-			  {
-					if (i >0) i--;
-    			return -i;
-				}
-		// Calculate next Sample
-		data[i] = calcNextSample(actBit);
-		NxSamples++;
-	}
+{
+ if ( NxSamples >= SamplesPerBit) // get next bit , NxSamples will be reset in getNextBit
+    actBit = getNextBit();
+ if ( status == TX_END_STATE)
+ {
+  if (i >0) i--;
+   return -i;
+ }
+ // Calculate next Sample
+ data[i] = calcNextSample(actBit);
+ NxSamples++;
+}
 return BUFSIZE;
 }
 
@@ -82,7 +87,8 @@ switch(status)
 	{
 	case TX_PREAMBLE_STATE:       							
   	bit = 1;
-		if (BitinChar++ >= Baudrate)
+//		if (BitinChar++ >= Baudrate)
+		if (BitinChar++ >= 1)
 				{
 				status = TX_SENDING_STATE;
 				TX_Status = Startbit;
@@ -132,13 +138,13 @@ switch(status)
 				case Stopbit:
 					switch (NumberofStopBits)
 						{
-						case one:
+						case One:
 							NxSamples=0;
 							break;
-						case onepoint5:
+						case Onepoint5:
 							NxSamples=-SamplesPerBit/2;
 							break;
-						case two:
+						case Two:
 							NxSamples= - SamplesPerBit;
 							break;
 						}
@@ -181,7 +187,7 @@ temp = 2.0 -(xr*xr+xi*xi);
 xr *=temp;
 xi *=temp;
 
-return  40000.*xr;
+return  xr;
 }
 
 int RTTYModulator::Char2Baudot(int character)
@@ -423,3 +429,42 @@ if (ch > 0)
 	emit charSend(ch);
 return value;
 }
+
+void RTTYModulator::setParameter(RxTxParameterType Type,void *Value)
+{
+ switch (Type)
+ {
+  case Reverse:
+   extraParameter.reverse =  * (bool *) Value;
+   break;
+  case Offset:
+   extraParameter.offset = * (int *) Value;
+   break;
+  case Parity:
+   extraParameter.parity = * (Paritaet *) Value;
+   break;
+  case Extra:
+   extraParameter = * (ExtraParameter *) Value;
+   break; 
+  default:
+   break;
+ }
+ init(); 
+}
+void RTTYModulator::init()
+{
+ f1=f0+extraParameter.offset;
+ if (!extraParameter.reverse)
+ {
+  float x; //Change Mark and Space Frequency
+  x=f0;
+  f0=f1;
+  f1=x;
+ }
+ xr=1.0;
+ xi=0.0;
+ dr[0]=cos(f0*2.0*M_PI/SampleRate);
+ di[0]=sin(f0*2.0*M_PI/SampleRate);
+ dr[1]=cos(f1*2.0*M_PI/SampleRate);
+ di[1]=sin(f1*2.0*M_PI/SampleRate); 
+}
diff --git a/linpsk/rttymodulator.h b/src/rttymodulator.h
similarity index 94%
rename from linpsk/rttymodulator.h
rename to src/rttymodulator.h
index 5758b4a..98960b7 100644
--- a/linpsk/rttymodulator.h
+++ b/src/rttymodulator.h
@@ -19,13 +19,13 @@
 
 #include "cmodulator.h"
 #include "parameter.h"
+#include "constants.h"
 
 /**Implementation of the RTTY Modulator
   *@author Volker Schroer
   */
 enum CharacterStatus {IGNORE,LTRS,FIGS};
 enum RTTYStates {Startbit,SendChar,Stopbit,WaitingforChar};
-enum StopBits{one,onepoint5,two};
 class CTxBuffer;
 class RTTYModulator : public CModulator
 {
@@ -34,9 +34,11 @@ public:
 	RTTYModulator(int FS,double freq,CTxBuffer *);
 	~RTTYModulator();
 int CalcSignal(double *data,int BufferSize);
+virtual void setParameter(RxTxParameterType,void * );
 
 private:
 enum Status {TX_PREAMBLE_STATE,TX_SENDING_STATE,TX_END_STATE,TX_TUNE_STATE};
+
 Status status;
 unsigned int Baudrate;
 StopBits NumberofStopBits;
@@ -50,6 +52,7 @@ double xr,xi;
 double dr[2],di[2];
 
 double f0,f1; // Mark and Space frequencies
+ExtraParameter extraParameter;
 CharacterStatus actCharacterStatus;
 RTTYStates TX_Status;
 int secondchar;
@@ -59,6 +62,7 @@ double calcNextSample(unsigned int bit);
 /** calculates the next Sample value depending on bit */
 int Char2Baudot(int);
 int getChar();
+void init();
 };
 
 #endif
diff --git a/src/spectrumdisplay.cpp b/src/spectrumdisplay.cpp
new file mode 100644
index 0000000..c817042
--- /dev/null
+++ b/src/spectrumdisplay.cpp
@@ -0,0 +1,360 @@
+/***************************************************************************
+                          spectrumdisplay.cpp  -  description
+                             -------------------
+    begin                : Fr March 19 2004
+    copyright            : (C) 2004 by Volker Schroer
+    email                : dl1ksv at gmx.de
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) any later version.                                   *
+ ***************************************************************************/
+
+
+#include <qradiobutton.h>
+#include <qspinbox.h>
+#include <qpixmap.h>
+#include <qpainter.h>
+#include <qsplitter.h>
+
+#include "spectrumdisplay.h"
+#include "crxchannel.h"
+#include "parameter.h"
+#include "color.h"
+
+#define SPECTRUMHEIGHT 80
+#define WATERFALLHEIGHT 20
+#define LABELHEIGHT 10
+#define distance 3
+
+extern Parameter settings;
+
+SpectrumDisplay::SpectrumDisplay( QWidget* parent, const char* name): QSplitter(QSplitter::Vertical,parent, name)
+{
+
+    setBackgroundColor(white);
+    setFrameStyle(QFrame::Box | QFrame::Sunken);
+    
+    setChildrenCollapsible (false);
+    LineSpectrum=new QWidget(this);
+    LineSpectrum->setBackgroundColor(white); 
+    pdisplay = new QPixmap(LineSpectrum->width(),LineSpectrum->height());
+    
+    ColorSpectrum=new QWidget(this);
+    ColorSpectrum->setBackgroundColor(black); 
+    pwaterfall = new QPixmap(ColorSpectrum->width(),ColorSpectrum->height());    
+    pwaterfall->fill(black);
+    MaxFreq = new QSpinBox( parent, "MaxFreq" );
+    MaxFreq->setMaxValue( 2500 );
+    MaxFreq->setMinValue( 1300 );
+    MaxFreq->setValue( 2500 );
+    MaxFreq->setLineStep(100);
+
+    MinFreq = new QSpinBox( parent, "MinFreq" );
+    MinFreq->setButtonSymbols( QSpinBox::UpDownArrows );
+    MinFreq->setMaxValue( 1200 );
+    MinFreq->setMinValue( 100 );
+    MinFreq->setLineStep( 100);
+
+    languageChange();
+
+
+    inputdata=0;
+
+
+    Phase=0;
+    Farbe=0;
+// Connections
+   connect(this,SIGNAL(frequencyChanged(int)),this,SLOT(setnewFrequency(int)));
+ 
+}
+
+/*
+ *  Destroys the object and frees any allocated resources
+ */
+SpectrumDisplay::~SpectrumDisplay()
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+
+/*
+ *  Sets the strings of the subwidgets using the current
+ *  language.
+ */
+void SpectrumDisplay::languageChange()
+{
+
+    MaxFreq->setSuffix(" Hz");
+    MinFreq->setSuffix(" Hz");
+}
+void SpectrumDisplay::resizeEvent( QResizeEvent *)
+{
+ 
+calculateSizeofComponents();
+translate();
+calcFFT();
+plotspectrum(false);
+
+}
+
+void SpectrumDisplay::calculateSizeofComponents()
+{
+int xpos,ypos,width,height,innerheight,innerwidth;
+width=this->width();
+height=this->height();
+/** Display **/
+xpos=0;
+ypos=height*distance/100;
+innerwidth=width-2*this->frameWidth()-2*this->margin();
+innerwidth=width;
+innerheight=height*SPECTRUMHEIGHT/100;
+
+LineSpectrum->setMinimumHeight(height/2);
+LineSpectrum->setMaximumHeight(innerheight);
+//LineSpectrum->setMinimumWidth(innerwidth);
+//LineSpectrum->setMaximumWidth(innerwidth);
+//LineSpectrum->setFixedWidth(innerwidth);
+
+ColorSpectrum->setMinimumHeight(height-innerheight);
+ColorSpectrum->setMaximumHeight(height/2);
+//ColorSpectrum->setFixedWidth(innerwidth);
+//ColorSpectrum->setMinimumWidth(innerwidth);
+//ColorSpectrum->setMaximumWidth(innerwidth);
+
+/** Controlelements of the display **/
+ypos=ypos+height+distance*height/100;
+innerheight=height*LABELHEIGHT/100;
+innerwidth=(width-2*xpos)/3;
+xpos=x();
+MinFreq->setGeometry(xpos,ypos,innerwidth,innerheight);
+//xpos=this->width()-innerwidth;
+xpos=xpos+width-innerwidth;
+MaxFreq->setGeometry(xpos,ypos,innerwidth,innerheight);
+
+}
+
+// Plot Spectrum of decimated Input
+void SpectrumDisplay::plotspectrum(bool overload)
+{
+
+QPainter p;
+
+
+int dist,y,z,ymax,xmax;
+int minfreq,maxfreq;
+
+double scale;
+
+if ( (pwaterfall->width() != ColorSpectrum->width() ) || ( pwaterfall->height() != ColorSpectrum->height()))
+ {  
+ pdisplay->resize(LineSpectrum->width(),LineSpectrum->height());
+ pwaterfall->resize(ColorSpectrum->width(),ColorSpectrum->height());
+ pwaterfall->fill(black);
+ }
+//scale = (pdisplay->height())/512.;
+scale=(pdisplay->height()-15)/100.;  
+
+
+minfreq=MinFreq->value();
+maxfreq=MaxFreq->value();
+ymax=pdisplay->height();
+dist=ymax/10;
+y=ymax-dist;
+xmax=pdisplay->width();
+
+pdisplay->fill();
+p.begin(pdisplay);
+p.setBrush(white);
+
+//Plot Frequencylines for the different Rx- Windows
+
+  for (CRxChannel *pRx=settings.ChannelChain;pRx != 0;pRx= pRx->getNextChannel())
+  {
+    if ( Farbe > 0)
+     {
+       int ID = pRx->getID();
+       if ( ID >= 0 && ID < Farbe->size() )
+         p.setPen(Farbe->at(ID));
+     } 
+    // Calculate Centerfrequency Coordinates
+    z=(( (int) pRx->getRxFrequency()-minfreq)*xmax)/(maxfreq-minfreq);
+    p.drawLine(z,0,z,ymax);
+
+    if ( (z =  pRx->get2RxFrequency()) != 0 ) // RTTY demands to lines
+      {
+        z=(( z-minfreq)*xmax)/(maxfreq-minfreq);
+        p.drawLine(z,0,z,ymax);
+      }
+ }
+
+
+if(overload)
+	p.setPen(red);
+else
+	p.setPen(blue);
+  
+if ( inputdata != 0)
+  {
+    p.moveTo(0,ymax-(int)(scale*fftdata[0])-15);
+    for(int i=1;i<xmax;i++)
+     {
+     
+      y=ymax-(int)(scale*fftdata[i])-15;
+      p.lineTo(i,y);
+     }
+
+    if (Phase !=0)
+  	plotVector(&p);
+  }
+// Plot Lineal and grid
+ p.setPen(black);
+ paintLineal(&p,xmax,ymax);
+ p.end();
+
+ bitBlt(pwaterfall,0,2,pwaterfall);
+
+ if ( inputdata != 0 )
+ {
+  p.begin(pwaterfall);
+// p.setBrush(white);
+
+  for (int i=0;i<xmax;i++)
+  {
+   y=3*fftdata[i];
+   if ( y > 255)
+    y = 255;
+   p.setPen(color[y]);
+   p.drawPoint(i,0);
+   p.drawPoint(i,1);
+  }
+  p.end(); 
+ }
+
+ bitBlt(LineSpectrum,0,0,pdisplay);
+ bitBlt(ColorSpectrum,0,0,pwaterfall);
+}
+void SpectrumDisplay::calcFFT()
+{
+
+if (inputdata == 0)
+  return;          // No data available
+for(int i=0;i<LineSpectrum->width();i++)     
+//18.4 scales to a range from 0 - 100, as max(inputdata ) =  fft_length/4 ^ 2
+ fftdata[i]=(int)(18.4*(log10(inputdata[xtranslate[i]]+100.)-2.)); 
+// For Color scale should be 18.4 *2.55
+}
+
+void SpectrumDisplay::translate(void)
+{
+int i,to,minfreq,maxfreq,displaywidth;
+minfreq=MinFreq->value();
+maxfreq=MaxFreq->value();
+to=int(maxfreq*1024/2756.25);
+displaywidth=LineSpectrum->width();
+for (i=0;i<displaywidth;i++)
+  xtranslate[i]=(((maxfreq-minfreq)*i*to/displaywidth)+minfreq*to)/maxfreq;
+}
+
+void SpectrumDisplay::startPlot(double *x,bool overload)
+{
+inputdata=x;  
+translate();
+calcFFT();
+plotspectrum(overload);
+}
+
+void SpectrumDisplay::setnewFrequency(int position)
+{
+double freq;
+int ii;
+ii=LineSpectrum->width();
+freq= (position*(MaxFreq->value()-MinFreq->value()))/ii+MinFreq->value();
+settings.ActChannel->setRxFrequency(freq);
+emit FrequencyChanged(freq);
+}
+
+void SpectrumDisplay::paintLineal(QPainter* p,int xmax,int ymax)
+{
+
+int stepfrequency;
+float stepwidth;
+int i,ix,NumberofFreqs,diff;
+int y;
+QString frequency;
+QFontMetrics fm(this->font());
+int minfreq=MinFreq->value();
+// Calcalute Frequency- Steps
+diff=(MaxFreq->value()-minfreq);
+NumberofFreqs=7;
+while(NumberofFreqs >4)
+  {
+    stepfrequency=diff/NumberofFreqs;
+    if ( stepfrequency * NumberofFreqs != diff )
+      NumberofFreqs--;
+    else
+      break;
+  }
+stepwidth=float(xmax)/NumberofFreqs;
+
+diff=ymax/10;
+y=ymax-diff;
+
+
+for( i=1; i < NumberofFreqs; i++)
+{
+  ix=(int) (i*stepwidth+0.5);
+  p->drawLine(ix,y,ix,y+2);
+  frequency.setNum(minfreq+stepfrequency*i);
+  ix=ix-fm.width(frequency)/2;
+  p->drawText(ix,ymax,frequency);
+  
+}
+
+// Plot Grid
+for (i=1;i<10; i++)
+{
+
+   p->drawLine(0,y,xmax,y);
+   y -=diff;
+  }
+}
+
+void SpectrumDisplay::plotVector(QPainter *p)
+{
+int xc,yc;
+double mag;
+
+xc=LineSpectrum->width()/8;
+yc=LineSpectrum->height()/8;
+p->drawEllipse(xc,yc,40,40);
+xc=xc+20;
+yc=yc+20;
+p->setPen(green);
+
+for(int i=0; i< 11; i++)
+ {
+   p->moveTo( xc,yc);
+   mag=abs(Phase[i]);
+   if ( mag > 0.001)
+     p->lineTo(xc - (int)(20.*Phase[i].imag()/mag), yc - (int)(20.*Phase[i].real()/mag) );
+ }  
+}
+
+void SpectrumDisplay::setPhasePointer(std::complex<float> *p)
+{
+Phase=p;
+}
+void SpectrumDisplay::setColorList(std::vector<QColor> *c)
+{
+  Farbe=c;
+}
+void SpectrumDisplay::mousePressEvent(QMouseEvent *e)
+
+{
+emit frequencyChanged(e->x()-lineWidth());
+}
+
diff --git a/linpsk/cspectrumdisplay.h b/src/spectrumdisplay.h
similarity index 63%
rename from linpsk/cspectrumdisplay.h
rename to src/spectrumdisplay.h
index 0196362..bc61682 100644
--- a/linpsk/cspectrumdisplay.h
+++ b/src/spectrumdisplay.h
@@ -1,8 +1,8 @@
 /***************************************************************************
-                          cspectrumdisplay.h  -  description
+                          spectrumdisplay.h  -  description
                              -------------------
-    begin                : Son Dez 8 2002
-    copyright            : (C) 2002 by Volker Schroer
+    begin                : Fr March 19 2004
+    copyright            : (C) 2004 by Volker Schroer
     email                : dl1ksv at gmx.de
  ***************************************************************************/
 
@@ -12,80 +12,87 @@
  *   it under the terms of the GNU General Public License as published by  *
  *   the Free Software Foundation; either version 2 of the License, or     *
  *   (at your option) any later version.                                   *
- *   The PSK part is based on WinPSK 1.0 by Moe Wheatley, AE4JY            *              
  ***************************************************************************/
 
-#ifndef CSPECTRUMDISPLAY_H
-#define CSPECTRUMDISPLAY_H
+#ifndef SPECTRUMDISPLAY_H
+#define SPECTRUMDISPLAY_H
 
 
 #include <qobject.h>
-#include <rfftw.h>
-#include <qwidget.h>
+
+#include <qsplitter.h>
 #include <complex>
 #include <qcolor.h>
 #include <vector>
+using namespace std;
 
 class QRadioButton;
 class QSpinBox;
 class QPixmap;
-class CDisplay;
+class QWidget;
+
 /**
   *@author Volker Schroer
   */
 
-class CSpectrumDisplay : public QWidget  {
+class SpectrumDisplay : public QSplitter  {
  Q_OBJECT
 public: 
-  CSpectrumDisplay( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
-  ~CSpectrumDisplay();
-  void setInputPointer(double *);
+  SpectrumDisplay( QWidget* parent = 0, const char* name = 0);
+  ~SpectrumDisplay();
+  
   void setColorList(std::vector<QColor> *);
+   
+  void mousePressEvent(QMouseEvent *);
+
 
 
 public slots:
-  void startPlot();
+  void startPlot(double *,bool);
   void setPhasePointer(std::complex<float> *);
 
 
+
 protected:
     void resizeEvent( QResizeEvent * );
+//    void paintEvent(QPaintEvent *);
 
 protected slots:
     virtual void languageChange();
   void setnewFrequency(int);
 private:
-    void calculateSizeofComponents();
-    QSpinBox* MaxFreq;
-    QSpinBox* MinFreq;
+ void calculateSizeofComponents();
+ QSpinBox* MaxFreq;
+ QSpinBox* MinFreq;
+
+ QWidget* LineSpectrum;
+ QWidget* ColorSpectrum;
 
-    CDisplay *Display;
 
-  void plotspectrum();
-/** Pointer to the Input for the FFT **/
-  double *inputdata;
-  std::complex<float> *Phase;
+ void plotspectrum(bool);
+ /** Pointer to the Input for the FFT **/
+ double *inputdata; 
+ complex<float> *Phase;
  void translate(void);
-void paintLineal(QPainter* p,int y1,int y2);
-void plotVector(QPainter *p);
+ void paintLineal(QPainter* ,int,int);
+ void plotVector(QPainter *p);
   /** Results of FFT */
-
   void calcFFT();
-  fftw_real* output;
-  rfftw_plan plan;
 
   int fftdata[1024];    // Not all elements are used, it differs 
 	int xtranslate[1024]; // depending on the display width
-  double power_spectrum[1024];
+
 // Pointer to the different Colors
 std::vector<QColor> *Farbe;
 
 QPixmap *pdisplay;   // Pixmap for Display for double buffering
 QPixmap *pwaterfall; // Pixmap for Waterfall Display
-bool overload;
+QPixmap *pellipse;   // Pixmap for crossed ellipse in RTTY(2) Mode
+
 signals:
 void FrequencyChanged(double);
-void new_IMD(float);
+
+void frequencyChanged(int);
 
 };
 
diff --git a/linpsk/textinput.cpp b/src/textinput.cpp
similarity index 68%
rename from linpsk/textinput.cpp
rename to src/textinput.cpp
index 5c5a5cb..6863d8e 100644
--- a/linpsk/textinput.cpp
+++ b/src/textinput.cpp
@@ -15,8 +15,11 @@
  ***************************************************************************/
 
 #include "textinput.h"
+#include <qobject.h>
 #include <errno.h>
+#include "parameter.h"
 
+extern Parameter settings;
 extern int errno;
 
 TextInput::TextInput(int ptt = -1):Input(ptt)
@@ -27,18 +30,18 @@ TextInput::~TextInput()
 }
 
 /** Opens the Device for writting, for Textfiles this means write nothing ! */
-bool TextInput::open_Device_write(QString )
+bool TextInput::open_Device_write(QString *errorstring)
 {
-int j;
-const char name[]="RTTY.out";
-		fd=open(name,O_RDWR|O_CREAT|O_TRUNC,S_IRWXU);
-		if (fd >= 0)
-			return true;
-			else
-			{
-      j= errno;
-			return false;
-			}
+
+const char name[]="Demo.out";
+fd=open(name,O_RDWR|O_CREAT|O_TRUNC,S_IRWXU);
+if (fd >= 0)
+  return true;
+else
+ {
+  *errorstring= QString(QObject::tr("Could not open Demo.out"));
+   return false;
+ }
 }
 
 /** gets the samples from the device */
@@ -63,7 +66,7 @@ while (j<anzahl)
     pos--;
 	  Buf[pos]=0;
     x = atof(Buf);
-	  *(sample++)=x/8.;
+	  *(sample++)=x;
     j++;
 		pos=0;
     }
@@ -84,8 +87,9 @@ char c;
 QString s;
 for(i=0;i<anzahl;i++)
 	{
-		s.setNum((int) sample[i]);
-				write(fd,s.latin1(),s.length());
+	 
+                s.setNum(sample[i],'f',6);
+                write(fd,s.latin1(),s.length());
 		c='\n';
 		write(fd,&c,1);
 	}
@@ -97,7 +101,29 @@ void TextInput::PTT(bool )
 {
 }
 /** Dummy */
-bool TextInput::setParams(QString *)
+bool TextInput::open_Device_read(QString *errorstring)
 {
+*errorstring=QString("");
+if (settings.inputFilename == "" )
+ {
+   *errorstring= QString(QObject::tr("Error, no Demofile selected")); 
+    return false;
+  }
+fd = open(settings.inputFilename,O_RDONLY);
+if (fd > 0)
+        return true;
+else
+ {
+    *errorstring= QString(QObject::tr("Error, Could not open Demofile "));
+    return false;
+  }
+   
+}
+bool TextInput::close_Device()
+{
+if (fd >= 0)
+        close(fd);
+fd = -1;
 return true;
 }
+
diff --git a/linpsk/textinput.h b/src/textinput.h
similarity index 86%
rename from linpsk/textinput.h
rename to src/textinput.h
index 5a9c5b7..a0d18b9 100644
--- a/linpsk/textinput.h
+++ b/src/textinput.h
@@ -30,8 +30,12 @@ public:
 	TextInput(int ptt);
 	~TextInput();
 
-	/** Opens the Device for writting */	
-	bool open_Device_write(QString Device);
+	/** Opens the Device for writting **/	
+	bool open_Device_write(QString *);
+        /** Opens the Device for Reading **/
+        bool open_Device_read(QString *);
+        /** Close the Device **/
+        virtual bool close_Device();
 	/** gets the samples from the device */
 	int getSamples(double *sample,int anzahl);
 	/** puts the Samples onto the Device, for a Textmode Device nothing happens */
@@ -40,6 +44,8 @@ public:
 	void PTT(bool mode);
 	/** Dummy */
 	bool setParams(QString *errorstring);
+private:
+int fd;        
 };
 
 #endif
diff --git a/linpsk/viterbi.cpp b/src/viterbi.cpp
similarity index 92%
rename from linpsk/viterbi.cpp
rename to src/viterbi.cpp
index fdad94c..1161f46 100644
--- a/linpsk/viterbi.cpp
+++ b/src/viterbi.cpp
@@ -35,14 +35,18 @@ Metric[0]=0.0;
 
 for(i=1; i < NumberofStates/2; i++)
   Metric[i]=10000.;
-
+for(i=0; i < NumberofStates/2;i++)
+ {
+  PathMem[i]=0;
+  bitestimate[i]=0;
+ } 
 
 /** Calculate State Table **/
 for(i=0; i < NumberofStates; i++)
   {
     unsigned int k,count;
-     k = PolyA & (~i);
-//     k = PolyA & i;
+//     k = PolyA & (~i);
+     k = PolyA & i;
 
      count = 0;
      while ( k > 0)
@@ -52,8 +56,8 @@ for(i=0; i < NumberofStates; i++)
       }
       StateTable[i]=  (count &1) << 1;
  
-     k = PolyB & (~i);
-//     k = PolyB & i;
+//     k = PolyB & (~i);
+     k = PolyB & i;
      count = 0;
      while ( k > 0)
       {
@@ -124,8 +128,10 @@ for(i=0;i < NumberofStates/2;i++)
 }
 int Viterbi::getbit(unsigned int i)
 {
-
-
 return ( PathMem[MinimumPath] >> i ) & 1;
 }
+int Viterbi::getbitinvers(unsigned int i)
+{
+return (~( PathMem[MinimumPath] >> i )) & 1;
+}
 
diff --git a/linpsk/viterbi.h b/src/viterbi.h
similarity index 97%
rename from linpsk/viterbi.h
rename to src/viterbi.h
index c00bef4..c15d7f0 100644
--- a/linpsk/viterbi.h
+++ b/src/viterbi.h
@@ -32,7 +32,7 @@ public:
   void decode(double);
 
   int getbit(unsigned int i);
-
+  int getbitinvers(unsigned int i);
 
 private:
 unsigned *StateTable;
diff --git a/src/waveinput.cpp b/src/waveinput.cpp
new file mode 100644
index 0000000..e497ea6
--- /dev/null
+++ b/src/waveinput.cpp
@@ -0,0 +1,291 @@
+/***************************************************************************
+                          waveinput.cpp  -  description
+                             -------------------
+    begin                : Sat May 5 2001
+    copyright            : (C) 2001 by Volker Schroer
+    email                : DL1KSV at gmx.de
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) any later version.                                   *
+ ***************************************************************************/
+
+#include "waveinput.h"
+#include "parameter.h"
+
+extern Parameter settings;
+
+WaveInput::WaveInput(int ptt = -1): Input(ptt)
+{
+ EightBits=false;
+}
+WaveInput::~WaveInput(){
+}
+
+/** Opens the Device for writting, for Wavefiles this means write nothing ! */
+bool WaveInput::open_Device_write(QString *)
+{
+return true;
+}
+/** Open Device for reading **/
+/** puts the Samples onto the Device, for a Wavemode Device nothing happens */
+int WaveInput::putSamples(double *,int anzahl)
+{
+return anzahl;
+}
+	
+/** Dummy */
+void WaveInput::PTT(bool )
+{
+}
+
+ /** Opens the Device named Device for reading */
+
+bool WaveInput::open_Device_read(QString *errorstring)
+{
+ char header[5];
+ unsigned char header1[3]; 
+ char c;
+ QString s;
+ int i;
+ *errorstring=QString("");
+ if (settings.inputFilename == "" )
+  {
+   *errorstring= QString(QObject::tr("Error, no Demofile selected")); 
+    return false;
+  }
+ fd = open(settings.inputFilename,O_RDONLY);
+ if ( fd < 0)
+  {
+    *errorstring= QString(QObject::tr("Error, Could not open Demofile "));
+    return false;
+  }
+
+
+// Check for RIFF
+i =read(fd,&header[0],4*sizeof(header[0]));
+if ( i != 4)
+ {
+  close(fd);
+  *errorstring= QString(QObject::tr("Header mismatch"));		
+  return false;
+ }
+header[4]=0;	
+s=QString(header);
+
+if  ( s != "RIFF")
+ {
+  close(fd);
+  *errorstring = settings.inputFilename + QString(QObject::tr(  " is not a RIFF File\n"));
+  return false;
+ }
+
+//Check for Wave
+lseek(fd,8,SEEK_SET);
+i =read(fd,&header[0],4*sizeof(header[0]));
+header[4]=0;
+if ( i != 4)
+ {
+  close(fd);
+  *errorstring= QString(QObject::tr("SubType mismatch\n"));
+  return false;
+ }
+s=QString(header);
+
+if  ( s != "WAVE")
+ {
+  close(fd);
+  *errorstring =settings.inputFilename + QString(QObject::tr(" is not a WAVE File\n"));
+  return false;
+ }
+//Check for fmt
+
+i =read(fd,&header[0],4*sizeof(header[0]));
+header[4]=0;
+if ( i != 4)
+{
+ close(fd);
+ *errorstring= QString(QObject::tr("File is too short\n"));
+ return false;
+}
+s=QString(header);
+if  ( s != "fmt ")
+{
+ close(fd);
+ *errorstring =settings.inputFilename + QString(QObject::tr(" does not have a fmt chunk\n"));
+ return false;
+}
+// Read length of fmt chunk
+i=read(fd,&header[0],4*sizeof(header[0]));
+if ( i != 4)
+{
+ close(fd);
+ *errorstring= QString(QObject::tr("File is too short, while reading fmt chunk\n"));
+ return false;
+}
+Length=header[0] | (header[1] << 8) |(header[2] << 16) | (header[3] << 24 );
+// To distinguish between the two versions of wav ( canonical and new)
+if ((Length -16) >0)
+ offset = Length-16;
+else 
+ offset = 0;
+//Check  for format
+lseek(fd,20,SEEK_SET);
+i=read(fd,&header[0],2*sizeof(header[0]));
+if ( i != 2)
+ {
+  close(fd);
+  *errorstring= QString(QObject::tr("File is too short, while reading format info in fmt chunk\n"));
+  return false;
+ }
+ Length=header[0] | ( header[1] << 8 );
+ if (Length != 1 )
+  {
+   close(fd);
+   *errorstring= QString(QObject::tr("File is too short, while reading format info in fmt chunk\n"));
+   return false;
+  }
+       
+//check for mono 
+lseek(fd,22,SEEK_SET);
+i=read(fd,&header[0],2*sizeof(header[0]));
+if ( i != 2)
+ {
+  close(fd);
+  *errorstring= QString(QObject::tr("File is too short, while reading channel info in fmt chunk\n"));
+  return false;
+ }
+Length=header[0] | ( header[1] << 8 );
+if ( Length != 1)
+{
+ close(fd);
+ *errorstring= QString(QObject::tr("Only mono is supported at the moment\n"));
+ return false;
+} 
+// Check for sample rate
+lseek(fd,24,SEEK_SET);
+i=read(fd,&header[0],4*sizeof(header[0]));
+if ( i != 4)
+ {
+  close(fd);
+  *errorstring= QString(QObject::tr("File is too short, while reading sample rate in fmt chunk\n"));
+  return false;
+ }
+Length=header[0] | ( header[1] << 8 ) | (header[2] << 16) | (header[3] << 24 );
+       
+if ( Length != 11025)
+{
+ close(fd);
+ *errorstring= QString(QObject::tr("Only a sample rate of 11025Hz is supported at the moment\n"));
+ return false;
+}
+//let's check for 8 / 16 bit samples
+lseek(fd,34,SEEK_SET);
+i=read(fd,&c,1);
+if (c == 8)
+ EightBits=true;
+else
+ EightBits=false;
+offset +=36;
+// Now find data
+lseek(fd,offset,SEEK_SET);
+i=read(fd,&header[0],4*sizeof(header[0]));
+
+header[5]=0;
+s=QString(header);
+// Checking for fact chunk
+if ( s == "fact")
+{
+ lseek(fd,8,SEEK_CUR);
+ i=read(fd,&header[0],4*sizeof(header[0]));
+ header[5]=0;
+ s=QString(header);
+
+} 
+if ( (i != 4) || s != "data" )		
+{
+ close(fd);
+ *errorstring= QString(QObject::tr("No data found\n"));
+	return false;
+}
+
+// got it
+// Read 4 byte Length info
+i=read(fd,&header1[0],4*sizeof(header1[0]));
+if ( i != 4)
+{
+ close(fd);
+ *errorstring= QString(QObject::tr("File is too short, while reading length of data chunk\n"));
+ return false;
+}
+Length=0;
+Length=header1[0] | (header1[1] << 8) |(header1[2] << 16) | (header1[3] << 24 );
+Bytesread=0;
+offset = lseek(fd,0,SEEK_CUR);		
+i=lseek(fd,offset,SEEK_SET); 
+return true;	
+}
+
+int WaveInput::getSamples(double *sample,int anzahl)
+{
+unsigned char c[2];
+int i,j;
+j=0;
+double x;
+while (j<anzahl)
+ {
+  if (!EightBits)
+   {
+    i= read(fd,&c[0],2*sizeof(c[0]));
+    if (i == 2)
+     {
+      if ( c[1] < 128 )
+       i =  c[0]+ c[1]* 256 ;
+      else
+       i = ( c[1]- 256) *256 +c[0];
+      x= i;
+      *(sample++)=x/32767.;
+      j++;
+      Bytesread +=2;
+     }		
+   else		
+   // lseek(fd,offset,SEEK_SET);
+    printf("Error reading data chunk\n"); 
+   }
+  else
+  {
+   i=read(fd,&c[0],sizeof(c[0]));
+   if ( i==1 )
+    {
+    if ( c[0] < 128 )
+     x = float(c[0])/128.;
+    else
+     x = float(c[0]-256)/128;
+    *(sample++)=x;
+    j++;
+    Bytesread++;
+    }
+   else		
+   // lseek(fd,offset,SEEK_SET);
+    printf("Error reading data chunk\n");        
+  }
+ if (Bytesread >= Length )
+ {
+  lseek(fd,offset,SEEK_SET);  
+  Bytesread=0;
+ }
+  
+ } // End while
+return j;
+
+}
+
+bool WaveInput::close_Device()
+{
+return true;
+}
+
diff --git a/linpsk/waveinput.h b/src/waveinput.h
similarity index 67%
rename from linpsk/waveinput.h
rename to src/waveinput.h
index 67a19fa..846b474 100644
--- a/linpsk/waveinput.h
+++ b/src/waveinput.h
@@ -29,23 +29,31 @@ The class doesn't produce output at the moment
 
 class WaveInput : public Input  {
 public: 
-	WaveInput(int ptt);
-	~WaveInput();
-	/** Opens the Device for writting */	
-	bool open_Device_write(QString Device);
-	/** gets the samples from the device */
-	int getSamples(double *sample,int anzahl);
-	/** puts the Samples onto the Device, for a Textmode Device nothing happens */
-	int putSamples(double *sample,int anzahl);
-	/** Dummy */
-	void PTT(bool mode);
-	/** Dummy */
-	bool setParams(QString *errorstring);	
-  /** Opens the Device named Device for reading */
-  bool open_Device_read(QString Device);
-	
-protected:
- int offset;	
+ WaveInput(int ptt);
+ ~WaveInput();
+ /** Opens the Device for writting **/	
+ bool open_Device_write(QString *);
+ /** Opens the Device for reading **/
+ bool open_Device_read(QString *);
+ /** Close the Device **/
+ virtual bool close_Device();
+ /** gets the samples from the device */
+ int getSamples(double *sample,int anzahl);
+ /** puts the Samples onto the Device, for a Textmode Device nothing happens */
+ int putSamples(double *sample,int anzahl);
+  /** Dummy */
+  void PTT(bool mode);
+  /** Dummy */
+  bool setParams(QString *errorstring);	
+  
+private:	
+         
+ int offset;
+ unsigned long int Length, Bytesread;
+ bool EightBits;
+        
+
+ int fd; 	
 };
 
 #endif
diff --git a/subdirs b/subdirs
deleted file mode 100644
index c33e57e..0000000
--- a/subdirs
+++ /dev/null
@@ -1,3 +0,0 @@
-admin
-autom4te.cache
-linpsk

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/linpsk.git



More information about the pkg-hamradio-commits mailing list