[Pkg-gtkpod-devel] r397 - in libgpod/trunk: . libgpod libgpod/branches libgpod/branches/upstream libgpod/branches/upstream/current libgpod/branches/upstream/current/bindings libgpod/branches/upstream/current/bindings/python libgpod/branches/upstream/current/bindings/python/examples libgpod/branches/upstream/current/bindings/python/tests libgpod/branches/upstream/current/bindings/python/tests/resources libgpod/branches/upstream/current/bindings/python/tests/resources/Artwork libgpod/branches/upstream/current/bindings/python/tests/resources/iTunes libgpod/branches/upstream/current/docs libgpod/branches/upstream/current/docs/reference libgpod/branches/upstream/current/docs/reference/html libgpod/branches/upstream/current/docs/reference/tmpl libgpod/branches/upstream/current/docs/reference/xml libgpod/branches/upstream/current/m4 libgpod/branches/upstream/current/po libgpod/branches/upstream/current/src libgpod/branches/upstream/current/tests libgpod/branches/upstream/current/tools

Frank Lichtenheld djpig at alioth.debian.org
Mon Oct 26 20:11:55 UTC 2009


Author: djpig
Date: 2009-10-26 20:11:55 +0000 (Mon, 26 Oct 2009)
New Revision: 397

Added:
   libgpod/trunk/libgpod/
   libgpod/trunk/libgpod/branches/
   libgpod/trunk/libgpod/branches/upstream/
   libgpod/trunk/libgpod/branches/upstream/current/
   libgpod/trunk/libgpod/branches/upstream/current/AUTHORS
   libgpod/trunk/libgpod/branches/upstream/current/COPYING
   libgpod/trunk/libgpod/branches/upstream/current/ChangeLog
   libgpod/trunk/libgpod/branches/upstream/current/INSTALL
   libgpod/trunk/libgpod/branches/upstream/current/Makefile.am
   libgpod/trunk/libgpod/branches/upstream/current/Makefile.in
   libgpod/trunk/libgpod/branches/upstream/current/NEWS
   libgpod/trunk/libgpod/branches/upstream/current/README
   libgpod/trunk/libgpod/branches/upstream/current/README.SysInfo
   libgpod/trunk/libgpod/branches/upstream/current/TROUBLESHOOTING
   libgpod/trunk/libgpod/branches/upstream/current/aclocal.m4
   libgpod/trunk/libgpod/branches/upstream/current/bindings/
   libgpod/trunk/libgpod/branches/upstream/current/bindings/Makefile.am
   libgpod/trunk/libgpod/branches/upstream/current/bindings/Makefile.in
   libgpod/trunk/libgpod/branches/upstream/current/bindings/python/
   libgpod/trunk/libgpod/branches/upstream/current/bindings/python/Makefile.am
   libgpod/trunk/libgpod/branches/upstream/current/bindings/python/Makefile.in
   libgpod/trunk/libgpod/branches/upstream/current/bindings/python/README
   libgpod/trunk/libgpod/branches/upstream/current/bindings/python/README.in
   libgpod/trunk/libgpod/branches/upstream/current/bindings/python/__init__.py
   libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/
   libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/Makefile.am
   libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/Makefile.in
   libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/add_song.py
   libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/coverart_fetch.py
   libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/create_mp3_tags_from_itdb.py
   libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/fix_empty_artist_field.py
   libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/play_with_ipod_api.py
   libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/play_with_smart_playlists.py
   libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/save_photos.py
   libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/tag_genre_from_audioscrobber.py
   libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/toy_around.py
   libgpod/trunk/libgpod/branches/upstream/current/bindings/python/gpod.i.in
   libgpod/trunk/libgpod/branches/upstream/current/bindings/python/gpod_doc.i.in
   libgpod/trunk/libgpod/branches/upstream/current/bindings/python/gtkdoc-to-swig.xsl
   libgpod/trunk/libgpod/branches/upstream/current/bindings/python/gtkpod.py
   libgpod/trunk/libgpod/branches/upstream/current/bindings/python/ipod.py
   libgpod/trunk/libgpod/branches/upstream/current/bindings/python/tests/
   libgpod/trunk/libgpod/branches/upstream/current/bindings/python/tests/Makefile.am
   libgpod/trunk/libgpod/branches/upstream/current/bindings/python/tests/Makefile.in
   libgpod/trunk/libgpod/branches/upstream/current/bindings/python/tests/resources/
   libgpod/trunk/libgpod/branches/upstream/current/bindings/python/tests/resources/Artwork/
   libgpod/trunk/libgpod/branches/upstream/current/bindings/python/tests/resources/Artwork/ArtworkDB
   libgpod/trunk/libgpod/branches/upstream/current/bindings/python/tests/resources/iTunes/
   libgpod/trunk/libgpod/branches/upstream/current/bindings/python/tests/resources/iTunes/iTunesDB
   libgpod/trunk/libgpod/branches/upstream/current/bindings/python/tests/resources/iTunes/iTunesDB.ext
   libgpod/trunk/libgpod/branches/upstream/current/bindings/python/tests/resources/tiny.mp3
   libgpod/trunk/libgpod/branches/upstream/current/bindings/python/tests/resources/tiny.png
   libgpod/trunk/libgpod/branches/upstream/current/bindings/python/tests/tests.py
   libgpod/trunk/libgpod/branches/upstream/current/compile
   libgpod/trunk/libgpod/branches/upstream/current/config.guess
   libgpod/trunk/libgpod/branches/upstream/current/config.h.in
   libgpod/trunk/libgpod/branches/upstream/current/config.sub
   libgpod/trunk/libgpod/branches/upstream/current/configure
   libgpod/trunk/libgpod/branches/upstream/current/configure.ac
   libgpod/trunk/libgpod/branches/upstream/current/depcomp
   libgpod/trunk/libgpod/branches/upstream/current/docs/
   libgpod/trunk/libgpod/branches/upstream/current/docs/Makefile.am
   libgpod/trunk/libgpod/branches/upstream/current/docs/Makefile.in
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/Makefile.am
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/Makefile.in
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/ch01.html
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/home.png
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/index.html
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/index.sgml
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/itunesdb.html
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/left.png
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-Artwork.html
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-Chapter-Data.html
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-Device.html
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-File-handling-functions.html
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-Low-level-functions.html
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-Photo-database.html
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-Playlists.html
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-Smart-Playlists.html
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-The-Itdb-iTunesDB-structure.html
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-Time-handling.html
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-Tracks.html
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod.devhelp
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod.devhelp2
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/photodb.html
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/right.png
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/style.css
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/up.png
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/libgpod-docs.xml
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/libgpod-overrides.txt
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/libgpod-sections.txt
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/Internal.sgml
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/artwork.sgml
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/chapterdata.sgml
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/device.sgml
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/itunesdb-copying.sgml
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/itunesdb-db.sgml
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/itunesdb-lowlevel.sgml
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/itunesdb-time.sgml
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/libgpod-unused.sgml
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/photodb.sgml
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/playlists.sgml
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/smart-playlists.sgml
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/track.sgml
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/version.xml.in
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/Internal.xml
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/artwork.xml
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/chapterdata.xml
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/device.xml
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/itunesdb-copying.xml
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/itunesdb-db.xml
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/itunesdb-lowlevel.xml
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/itunesdb-time.xml
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/photodb.xml
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/playlists.xml
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/smart-playlists.xml
   libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/track.xml
   libgpod/trunk/libgpod/branches/upstream/current/gtk-doc.make
   libgpod/trunk/libgpod/branches/upstream/current/install-sh
   libgpod/trunk/libgpod/branches/upstream/current/intltool-extract.in
   libgpod/trunk/libgpod/branches/upstream/current/intltool-merge.in
   libgpod/trunk/libgpod/branches/upstream/current/intltool-update.in
   libgpod/trunk/libgpod/branches/upstream/current/libgpod-1.0.pc.in
   libgpod/trunk/libgpod/branches/upstream/current/ltmain.sh
   libgpod/trunk/libgpod/branches/upstream/current/m4/
   libgpod/trunk/libgpod/branches/upstream/current/m4/Makefile.am
   libgpod/trunk/libgpod/branches/upstream/current/m4/Makefile.in
   libgpod/trunk/libgpod/branches/upstream/current/m4/gtk-doc.m4
   libgpod/trunk/libgpod/branches/upstream/current/m4/intltool.m4
   libgpod/trunk/libgpod/branches/upstream/current/m4/python.m4
   libgpod/trunk/libgpod/branches/upstream/current/m4/swig.m4
   libgpod/trunk/libgpod/branches/upstream/current/missing
   libgpod/trunk/libgpod/branches/upstream/current/mkinstalldirs
   libgpod/trunk/libgpod/branches/upstream/current/po/
   libgpod/trunk/libgpod/branches/upstream/current/po/ChangeLog
   libgpod/trunk/libgpod/branches/upstream/current/po/Makefile.in.in
   libgpod/trunk/libgpod/branches/upstream/current/po/POTFILES.in
   libgpod/trunk/libgpod/branches/upstream/current/po/POTFILES.skip
   libgpod/trunk/libgpod/branches/upstream/current/po/de.po
   libgpod/trunk/libgpod/branches/upstream/current/po/es.po
   libgpod/trunk/libgpod/branches/upstream/current/po/fr.po
   libgpod/trunk/libgpod/branches/upstream/current/po/he.po
   libgpod/trunk/libgpod/branches/upstream/current/po/it.po
   libgpod/trunk/libgpod/branches/upstream/current/po/ja.po
   libgpod/trunk/libgpod/branches/upstream/current/po/ro.po
   libgpod/trunk/libgpod/branches/upstream/current/po/sv.po
   libgpod/trunk/libgpod/branches/upstream/current/po/zh_CN.po
   libgpod/trunk/libgpod/branches/upstream/current/py-compile
   libgpod/trunk/libgpod/branches/upstream/current/src/
   libgpod/trunk/libgpod/branches/upstream/current/src/Makefile.am
   libgpod/trunk/libgpod/branches/upstream/current/src/Makefile.in
   libgpod/trunk/libgpod/branches/upstream/current/src/db-artwork-debug.c
   libgpod/trunk/libgpod/branches/upstream/current/src/db-artwork-debug.h
   libgpod/trunk/libgpod/branches/upstream/current/src/db-artwork-parser.c
   libgpod/trunk/libgpod/branches/upstream/current/src/db-artwork-parser.h
   libgpod/trunk/libgpod/branches/upstream/current/src/db-artwork-writer.c
   libgpod/trunk/libgpod/branches/upstream/current/src/db-image-parser.c
   libgpod/trunk/libgpod/branches/upstream/current/src/db-image-parser.h
   libgpod/trunk/libgpod/branches/upstream/current/src/db-itunes-parser.h
   libgpod/trunk/libgpod/branches/upstream/current/src/db-parse-context.c
   libgpod/trunk/libgpod/branches/upstream/current/src/db-parse-context.h
   libgpod/trunk/libgpod/branches/upstream/current/src/gchecksum.c
   libgpod/trunk/libgpod/branches/upstream/current/src/gchecksum.h
   libgpod/trunk/libgpod/branches/upstream/current/src/itdb.h
   libgpod/trunk/libgpod/branches/upstream/current/src/itdb_artwork.c
   libgpod/trunk/libgpod/branches/upstream/current/src/itdb_chapterdata.c
   libgpod/trunk/libgpod/branches/upstream/current/src/itdb_device.c
   libgpod/trunk/libgpod/branches/upstream/current/src/itdb_device.h
   libgpod/trunk/libgpod/branches/upstream/current/src/itdb_endianness.h
   libgpod/trunk/libgpod/branches/upstream/current/src/itdb_itunesdb.c
   libgpod/trunk/libgpod/branches/upstream/current/src/itdb_photoalbum.c
   libgpod/trunk/libgpod/branches/upstream/current/src/itdb_playlist.c
   libgpod/trunk/libgpod/branches/upstream/current/src/itdb_plist.c
   libgpod/trunk/libgpod/branches/upstream/current/src/itdb_plist.h
   libgpod/trunk/libgpod/branches/upstream/current/src/itdb_private.h
   libgpod/trunk/libgpod/branches/upstream/current/src/itdb_sha1.c
   libgpod/trunk/libgpod/branches/upstream/current/src/itdb_sha1.h
   libgpod/trunk/libgpod/branches/upstream/current/src/itdb_sysinfo_extended_parser.c
   libgpod/trunk/libgpod/branches/upstream/current/src/itdb_sysinfo_extended_parser.h
   libgpod/trunk/libgpod/branches/upstream/current/src/itdb_thumb.c
   libgpod/trunk/libgpod/branches/upstream/current/src/itdb_thumb.h
   libgpod/trunk/libgpod/branches/upstream/current/src/itdb_track.c
   libgpod/trunk/libgpod/branches/upstream/current/src/ithumb-writer.c
   libgpod/trunk/libgpod/branches/upstream/current/src/pixmaps.c
   libgpod/trunk/libgpod/branches/upstream/current/src/pixmaps.h
   libgpod/trunk/libgpod/branches/upstream/current/src/sha1.c
   libgpod/trunk/libgpod/branches/upstream/current/src/sha1.h
   libgpod/trunk/libgpod/branches/upstream/current/tests/
   libgpod/trunk/libgpod/branches/upstream/current/tests/Makefile.am
   libgpod/trunk/libgpod/branches/upstream/current/tests/Makefile.in
   libgpod/trunk/libgpod/branches/upstream/current/tests/get-timezone.c
   libgpod/trunk/libgpod/branches/upstream/current/tests/itdb_main.c
   libgpod/trunk/libgpod/branches/upstream/current/tests/test-checksum.c
   libgpod/trunk/libgpod/branches/upstream/current/tests/test-covers.c
   libgpod/trunk/libgpod/branches/upstream/current/tests/test-fw-id.c
   libgpod/trunk/libgpod/branches/upstream/current/tests/test-init-ipod.c
   libgpod/trunk/libgpod/branches/upstream/current/tests/test-ls.c
   libgpod/trunk/libgpod/branches/upstream/current/tests/test-photos.c
   libgpod/trunk/libgpod/branches/upstream/current/tests/test-rebuild-db.cc
   libgpod/trunk/libgpod/branches/upstream/current/tests/test-sysinfo-extended-parsing.c
   libgpod/trunk/libgpod/branches/upstream/current/tests/test-write-covers.c
   libgpod/trunk/libgpod/branches/upstream/current/tools/
   libgpod/trunk/libgpod/branches/upstream/current/tools/20-libgpod-sysinfo-extended.fdi
   libgpod/trunk/libgpod/branches/upstream/current/tools/Makefile.am
   libgpod/trunk/libgpod/branches/upstream/current/tools/Makefile.in
   libgpod/trunk/libgpod/branches/upstream/current/tools/hal-callout.c
   libgpod/trunk/libgpod/branches/upstream/current/tools/ipod-scsi.c
   libgpod/trunk/libgpod/branches/upstream/current/tools/ipod-time-sync.c
   libgpod/trunk/libgpod/branches/upstream/current/tools/read-sysinfoextended-sgutils.c
Log:
[svn-inject] Installing original source of libgpod

Added: libgpod/trunk/libgpod/branches/upstream/current/AUTHORS
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/AUTHORS	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/AUTHORS	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,2 @@
+Jorg Schuler <jcsjcs at users.sourceforge.net> (original gtkpod code)
+Christophe Fergeau <teuf at gnome.org> (libraryfication)

Added: libgpod/trunk/libgpod/branches/upstream/current/COPYING
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/COPYING	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/COPYING	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,482 @@
+		  GNU LIBRARY GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+    		    59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL.  It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Library General Public License, applies to some
+specially designated Free Software Foundation software, and to any
+other libraries whose authors decide to use it.  You can use it for
+your libraries, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if
+you distribute copies of the library, or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link a program with the library, you must provide
+complete object files to the recipients so that they can relink them
+with the library, after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  Our method of protecting your rights has two steps: (1) copyright
+the library, and (2) offer you this license which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this free
+library.  If the library is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original
+version, so that any problems introduced by others will not reflect on
+the original authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that companies distributing free
+software will individually obtain patent licenses, thus in effect
+transforming the program into proprietary software.  To prevent this,
+we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+  Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License, which was designed for utility programs.  This
+license, the GNU Library General Public License, applies to certain
+designated libraries.  This license is quite different from the ordinary
+one; be sure to read it in full, and don't assume that anything in it is
+the same as in the ordinary license.
+
+  The reason we have a separate public license for some libraries is that
+they blur the distinction we usually make between modifying or adding to a
+program and simply using it.  Linking a program with a library, without
+changing the library, is in some sense simply using the library, and is
+analogous to running a utility program or application program.  However, in
+a textual and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General Public License
+treats it as such.
+
+  Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote software
+sharing, because most developers did not use the libraries.  We
+concluded that weaker conditions might promote sharing better.
+
+  However, unrestricted linking of non-free programs would deprive the
+users of those programs of all benefit from the free status of the
+libraries themselves.  This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while
+preserving your freedom as a user of such programs to change the free
+libraries that are incorporated in them.  (We have not seen how to achieve
+this as regards changes in header files, but we have achieved it as regards
+changes in the actual functions of the Library.)  The hope is that this
+will lead to faster development of free libraries.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, while the latter only
+works together with the library.
+
+  Note that it is possible for a library to be covered by the ordinary
+General Public License rather than by this special one.
+
+		  GNU LIBRARY GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library which
+contains a notice placed by the copyright holder or other authorized
+party saying it may be distributed under the terms of this Library
+General Public License (also called "this License").  Each licensee is
+addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+  
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+  6. As an exception to the Sections above, you may also compile or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    c) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    d) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the source code distributed need not include anything that is normally
+distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Library General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+			    NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This library 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; if not, write to the 
+    Free Software Foundation, Inc., 59 Temple Place - Suite 330, 
+    Boston, MA  02111-1307  USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!

Added: libgpod/trunk/libgpod/branches/upstream/current/ChangeLog
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/ChangeLog	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/ChangeLog	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,4164 @@
+2009-04-15  Todd Zullinger  <tmz at pobox.com>
+
+	* configure.ac: Bump version for 0.7.2 final
+
+2009-04-05  Christophe Fergeau  <cfergeau at mandriva.com>
+
+	* configure.ac: time for a rc2 since we had forgotten a few
+	interesting patches.
+
+2009-04-05  Christophe Fergeau  <cfergeau at mandriva.com>
+
+	Patch from: Javier Kohen:
+
+	* src/itdb_itunesdb.c: avoid O(N^2) behaviour in main tracklist
+	parsing.
+
+2009-04-05  Christophe Fergeau  <cfergeau at mandriva.com>
+
+	Patch from: Javier Kohen:
+
+	* src/itdb_itunesdb.c: avoid O(N^2) behaviour in playcount reading
+
+2009-04-05  Christophe Fergeau  <cfergeau at mandriva.com>
+
+	Patch from: Javier Kohen:
+
+	* src/itdb_itunesdb.c: rename playcount_get_next to
+	playcount_take_next which is a more descriptive name
+
+2009-04-05  Christophe Fergeau  <cfergeau at mandriva.com>
+
+	Patch from: Erik Hovland
+
+	* src/itdb_thumb.c: don't shadow itdb_thumb_to_pixbuf_at_size
+	parameter with a local variable.
+
+2009-04-04  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* configure.ac: Bump version and soname for 0.7.2rc1
+
+2009-04-03  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* docs/reference/libgpod-sections.txt
+	  docs/reference/tmpl/device.sgml
+	  src/itdb_device.c: Update documenation.  Add new
+	itdb_device_supports_{chapter_image,podcast} functions and
+	mark some other additions as private.
+
+	* po/de.po
+	  po/es.po
+	  po/fr.po
+	  po/he.po
+	  po/it.po
+	  po/ja.po
+	  po/libgpod.pot
+	  po/ro.po
+	  po/sv.po
+	  po/zh_CN.po: Update po files
+
+	* po/POTFILES.in: Add tools/ipod-time-sync.c
+
+2009-03-29  Christophe Fergeau  <cfergeau at mandriva.com>
+
+	* src/itdb_device.c: don't call tzset even when calling localtime_r
+	since we aren't interested in its side effects.
+
+2009-03-26  Christophe Fergeau  <cfergeau at mandriva.com>
+
+	* tools/ipod-scsi.c:
+	* tools/ipod-time-sync.c: add ipod time sync support using
+	information from the rockbox project. It's still preliminary.
+
+2009-03-22  Christophe Fergeau  <cfergeau at mandriva.com>
+
+	* src/itdb_device.c: add warning about itdb_set_mountpoint use,
+	describe model_number parameter of itdb_init_ipod
+	* src/itdb_itunesdb.c: add warning about itdb_device_read_sysinfo
+	and itdb_device_set_mountpoint use, explain when
+	itdb_device_get_ipod_info_table can be useful.
+	* doc/reference/libgpod-sections.txt: move around a few functions
+	(mainly itdb_init_ipod and itdb_device_*_sysinfo_*)
+
+2009-03-21  Christophe Fergeau  <cfergeau at mandriva.com>
+
+	Patch from: Andrew W. Nosenko  <andrew.nosenko at toatech.com>
+
+	Avoid using of the global variable 'timezone' in favor of struct
+	tm.tm_gmtoff (if available).
+
+	* src/itdb_device.c (get_local_timezone): Use struct tm.tm_gmtoff
+	if available (through localtime_r() or localtime(), depending on
+	the localtime_r() existence) if available and fallback to the
+	'timezone' or _timezone global variables if struct tm.tm_gmtoff
+	field is not available.
+
+	* configure.ac: Check for existence of localtime_r() function and
+	struct tm.tm_gmtoff field.
+
+	Avoid using of the global variable 'timezone' in favor of struct
+	tm.tm_gmtoff (if available).
+
+	* src/itdb_device.c (get_local_timezone): Use struct tm.tm_gmtoff
+	if available (through localtime_r() or localtime(), depending on
+	the localtime_r() existence) if available and fallback to the
+	'timezone' or _timezone global variables if struct tm.tm_gmtoff
+	field is not available.
+
+	* configure.ac: Check for existence of localtime_r() function and
+	struct tm.tm_gmtoff field.
+
+2009-03-21  Christophe Fergeau  <cfergeau at mandriva.com>
+
+	Patch from: Jorg Schuller
+
+	* src/itdb_itunesdb.c: simplify pos_comp, make get_playlist more
+	efficient
+
+2009-03-21  Christophe Fergeau  <cfergeau at mandriva.com>
+
+	* src/itdb_itunesdb.c: remove commented out code
+	(g_return_val_if_fail)
+
+2009-03-14  Christophe Fergeau  <cfergeau at mandriva.com>
+
+	* src/itdb_device.c: directly read firewire ID from SysInfoExtended
+	when it's available.
+
+2009-03-14  Christophe Fergeau  <cfergeau at mandriva.com>
+
+	* src/itdb.h
+	* src/itdb_device.c
+	* src/itdb_device.h: add itdb_device_supports_chapter_image method
+	to test if an iPod support chapter images or not.
+
+2009-03-14  Christophe Fergeau  <cfergeau at mandriva.com>
+
+	* src/itdb_device.c: factorize some code in legacy artwork
+	handling
+
+2009-03-14  Christophe Fergeau  <cfergeau at mandriva.com>
+
+	* src/itdb.h:
+	* src/itdb_device.c:
+	* src/itdb_sysinfo_extended_parser.c:
+	* src/itdb_sysinfo_extended_parser.h: add
+	itdb_device_supports_podcast method to test if an iPod supports
+	podcasts or not.
+
+2009-03-14  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_itunesdb.c
+	  src/itdb_private.h
+
+	  Implement reading of big/little endian integers/floats using
+	  references to the respective functions rather than if/then
+	  statements. Thanks to Javier Kohen for the patch.
+
+2009-03-01  Christophe Fergeau <cfergeau at mandriva.com>
+
+	* src/itdb_device.c: fix nano3g/ipod classic artwork information
+
+2009-02-28  Christophe Fergeau <cfergeau at mandriva.com>
+
+	* src/itdb_itunesdb.c: Set field at offset 0x70 in the mhbd to 2
+	        
+	If this field isn't set to 2, iTunes thinks databases written 
+	to the iPhone are corrupted
+
+2009-02-28  Javier Kohen <jkohen at users.sourceforge.net>
+
+	* src/itdb_itunesdb.c:
+	* src/itdb_private.h: avoid linked list scans in get_playlist/get_mhip.
+
+	Replaced code that scanned the linked list twice on each
+	insertion (once for sorting, once for finding the previous
+	insert position) by a single sort and scan at the end.
+	        
+	As a side-effect removed dependency of get_mhip on Itdb
+	structures (easier to unittest, etc.).
+
+2009-02-28  Javier Kohen <jkohen at users.sourceforge.net>
+
+	* src/db-artwork-parser: replace linear look-up of songs with
+	local hashtable.
+
+2009-02-09  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_itunesdb.c: fix crash when generating the album list
+	when a track has a NULL album. Thanks to Peter and Todd for
+	reporting that bug and pinpointing what was wrong.
+
+2009-01-31  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* README.SysInfo: Add info on determining FirewireGUID on
+	FreeBSD. Also reformat the text to make the example commands
+	stand out more.
+
+2009-01-31  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* configure.ac: Remove unused expanded_libdir definition. This
+	was only used when setting the hal callout dir, and is no
+	longer needed.
+
+2009-01-31  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* Makefile.am, configure.ac, tools/Makefile.am,	TROUBLESHOOTING:
+	Improve the default hal callout path. The search path hal uses
+	for its callouts differs on various platforms. The new path
+	should work on more systems out of the box. The fdi file now
+	also defaults to a path more likely to work by default.
+
+2009-01-31  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* bindings/python/Makefile.am, configure.ac:
+	Only use PYGOBJECT_{CFLAGS,LIBS} in bindings/python.  Thanks
+	to Frank Lichtenheld (fixes Debian bug #452829).
+
+2009-01-21  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: fix itdb_device_new prototype
+
+2009-01-21  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: itdb_device_get_checksum_type can be static
+
+2009-01-21  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: itdb_device_write_hash58 should only be called
+	on devices supporting this hash type, it's a programming error to
+	call it with something else
+
+2009-01-21  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: set the hashing scheme in
+	itdb_device_write_checksum instead of doing it in itdb_itunesdb,
+	allows more flexibility if we ever add different checksumming
+	methods
+
+2009-01-21  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c:
+	* src/itdb_private.h: get rid of itdb_device_requires_checksum
+	which is now unused
+
+2009-01-21  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c:
+	* src/itdb_device.h:
+	* src/itdb_itunesdb.c: move checksumming function from
+	itdb_itunesdb.c to itdb_device.c to make it easier to support
+	different checksumming methods depending on the ipod model
+
+2009-01-21  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/db-itunes-parser.h: add tons of new fields to struct MhbdHeader 
+
+2009-01-20  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_itunesdb.c: generate list of albums and write it in a
+	MHLA header in the iTunesDB
+	* src/itdb_private.h: store album list in FExport
+
+2009-01-20  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_itunesdb.c: add new enum value for MHOD types found as
+	children of the MHLA header (list of albums)
+
+2009-01-18  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* configure.ac: Bump version to 0.7.1SVN for further development
+
+	* configure.ac: Bump version for 0.7.0 final
+
+	* src/db-artwork-parser.c: Quiet artwork mhii_link warning
+
+2009-01-17  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: Silver iPod Classic 160GB is B145, not B155
+	(noticed thanks to a Banshee bug report, verified on ebay sales of
+	such iPods)
+
+2009-01-14  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* po/ro.po: updated Romanian translation. Thanks to Alex
+          Eftimie.
+
+2009-01-13  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* README.SysInfo, TROUBLESHOOTING: Add some notes on the hal
+	callout
+
+	* TROUBLESHOOTING: Minor grammatical fixes
+
+2009-01-13  Christophe Fergeau  <teuf at gnome.org>
+
+	* itdb_sysinfo_extended_parser.c: use a gint instead of a gchar as a
+	loop index since we are comparing against >= 0
+
+2009-01-11  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_itunesdb.c (itdb_rename_files): remove the
+	  "iTunesStats" file used by Shuffles instead of the "Play Counts"
+	  file after writing the iTunesSD -- otherwise the playcounts are
+	  never reset. Thanks to Peter Maydell for pointing this
+	  out. Fixes tracker item #2481322.
+
+2009-01-06  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* po/zh_CN.po: Add simple Chinese translation (Tan Zhixin)
+
+2009-01-05  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* po/de.po: Update German translation (Jonas Cleve)
+
+2009-01-02  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* configure.ac: Bump version for 0.7.0rc2
+
+	* docs/reference/tmpl/track.sgml, src/itdb.h:
+	Document Itdb_Track->album_id
+
+	* bindings/python/ipod.py:
+	Make Track.get_coverart() return None if artwork is absent
+
+2009-01-02  Christophe Fergeau  <teuf at gnome.org>
+
+	* NEWS: more news, hope the packagers will notice the new
+	libxml2-devel dependency...
+
+2009-01-02  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/Makefile.am: we need to link with -lm since ithumb-writer.c
+	uses round and ceil
+
+2009-01-02  Christophe Fergeau  <teuf at gnome.org>
+
+	* NEWS: update NEWS file, I probably forgot some things, feel free
+	to update it :)
+
+2009-01-01  Christophe Fergeau  <teuf at gnome.org>
+	
+	* src/itdb_device.c: fix static artwork formats for the nano4g, C&P
+	is really a bad thing ;)
+
+2009-01-01  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb.h: add album_id field to Itdb_Track. It's unused yet but
+	will be used later and adding it now will avoid ABI breakage later
+	;)
+
+2008-12-29  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: add serial number for silver and pink
+	16GB nano 4g, the last missing ones :)
+
+2008-12-28  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* bindings/python/gtkpod.py:
+	Python: fix sha DeprecationWarning with python-2.6 (thanks to
+	Alex Ghitza)
+
+2008-12-26  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* po/es.po: Update Spanish translation (Alejandro Lamas Daviña)
+
+2008-12-22  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: I didn't mean to commit that hunk
+	from Neil's patch, adding a model name here with no
+	matching entry in the model enum would break building
+	a user visible list of known ipod models
+
+2008-12-22  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: add ipod shuffle info from Neil Campbell
+
+2008-12-22  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: add serial number for yellow and green
+	16GB nano 4g.
+
+2008-12-18  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: add serial number for purple 16GB nano 4g,
+	thanks to Ronald for providing the information
+
+2008-12-16  Daniele Forsi <dforsi at users.sourceforge.net>
+
+        * po/it.po: updated Italian translation
+
+2008-12-15  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_plist.c: substitute g_base64_decode() between version
+	  2.8 and 2.11 of glib.
+
+	* src/itdb_device.c: handle timezone correctly on CYGWIN
+
+	  Patches courtesy of Éric Lassauge.
+
+2008-12-13  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* po/fr.po: Update French translation (Éric Lassauge)
+
+2008-12-12  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: add hardcoded table for nano4g artwork
+	formats. I haven't tested I got everything perfectly right so there
+	might be issues with them. Thanks to Tijs van Roon for pinpointing
+	these missing tables
+
+2008-12-12  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: add serial number for 16GB Orange Nano 4g,
+	thanks to Tijs van Roon for providing the data
+
+2008-12-10  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* po/he.po: Update Hebrew translation (Assaf Gillat)
+
+	* po/sv.po: Update Swedish translation (Stefan Asserhäll)
+
+2008-12-08  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* configure.ac: Bump version and soname for 0.7.0rc1
+
+	* po/de.po
+	  po/es.po
+	  po/fr.po
+	  po/he.po
+	  po/it.po
+	  po/ja.po
+	  po/libgpod.pot
+	  po/ro.po
+	  po/sv.po: Update po files
+
+2008-12-07  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* docs/reference/libgpod-docs.xml
+	  docs/reference/libgpod-sections.txt
+	  docs/reference/tmpl/artwork.sgml
+	  docs/reference/tmpl/chapterdata.sgml
+	  docs/reference/tmpl/device.sgml
+	  docs/reference/tmpl/itunesdb-copying.sgml
+	  docs/reference/tmpl/itunesdb-db.sgml
+	  docs/reference/tmpl/itunesdb-lowlevel.sgml
+	  docs/reference/tmpl/itunesdb-time.sgml
+	  docs/reference/tmpl/libgpod-unused.sgml
+	  docs/reference/tmpl/photodb.sgml
+	  docs/reference/tmpl/track.sgml
+	  src/itdb.h
+	  src/itdb_artwork.c
+	  src/itdb_chapterdata.c
+	  src/itdb_device.c
+	  src/itdb_device.h
+	  src/itdb_itunesdb.c
+	  src/itdb_photoalbum.c
+	  src/itdb_playlist.c
+	  src/itdb_plist.c
+	  src/itdb_sysinfo_extended_parser.c
+	  src/itdb_thumb.c
+	  src/itdb_thumb.h
+	  src/itdb_track.c
+	  src/ithumb-writer.c:
+	  Update API documentation
+
+	  Add new functions and missing enums, macros, and structs to the proper
+	  places in the documentation, remove old/unused functions, and clean up
+	  various minor issues.
+
+2008-12-07  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* itdb_itunesdb.c (jump_table_letter): don't terminate when
+	  an invalid utf8 string is encountered (replaced g_assert() with
+	  g_return_val_if_fail()).
+
+2008-11-30  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* configure.ac: don't add "-Wall" to CFLAGS
+	  unconditionally. I believe this line was overlooked when this
+	  issue was fixed earlier. Thanks to Tim Mooney.
+
+2008-11-30  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/db-parse-context.h: remove unneeded G_GNUC_INTERNAL at the
+	  end of a declaration as this can cause problems with some
+	  compilers (and doesn't seem to make sense in the first
+	  place). Thanks to Tim Mooney.
+
+2008-11-17  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/ithumb-writer.c: rework the way we calculate that thumbnails
+	must be resized to when being transferred to the ipod. The old way
+	had rounding errors which led to display bugs on the nano4g (in the
+	album list)
+
+2008-11-17  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/ithumb-writer.c: stricter sanity check 
+
+2008-11-17  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/ithumb-writer.c: add checks for int overflows on malloc args
+
+2008-11-14  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* docs/reference/tmpl/track.sgml
+	  src/itdb.h:
+	  Remove chapterdata_raw and chapterdata_raw_length from
+	  Itdb_Track
+
+	  These are no longer needed now that proper Chapter Data
+	  support is available (since svn revision 1936/1937).
+
+2008-10-21  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: SN YX6 corresponds to a Shuffle model B225
+	according to a report on #gtkpod
+
+2008-10-21  Christophe Fergeau  <teuf at gnome.org>
+	
+	* src/itdb_device.c: use information from SysInfoExtended to tell
+	if an ipod supports photos or not instead of only using the
+	hard-coded tables in libgpod
+
+2008-10-21  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: add serial number for 16GB blue ipod nano,
+	thanks to Thomas Pani for providing that SN.
+
+2008-10-13  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: add serial number for 16GB black ipod nano,
+	thanks to Doug Larrick for providing that SN :)
+
+2008-10-07  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/db-artwork-debug.c: use %z modifier to print size_t values
+	and G_GINT64_MODIFIER to print 64 bit values, fix compilation
+	on 64 bit systems when artwork debugging is enabled
+
+2008-10-08  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.h: switch members in Itdb_ArtworkFormat from
+	guint16 to gint since the SysInfoExtended parser will assume 
+	they are gint value and will try to write to them through a 
+	gint* pointer (ie it will overwrite whatever is around the 
+	guint16 value if we don't change it)
+
+2008-10-07  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: fix itdb_device_supports_artwork to properly
+	take into account data from SysInfoExtended if available
+
+2008-10-07  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_sysinfoextended_parser.c: artwork is stored in <array>
+	nodes (which are parsed to a GValueArray), reflect that in the
+	SysInfoExtended parsing code.
+
+2008-10-07  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_plist.c: fix handling on blank nodes (ie nodes
+	containing only white spaces), fixes parsing of SysInfoExtended files
+	as well ;)
+
+2008-10-07  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_plist.c: add support for <array> tags to the plist
+	parser, this is needed to support SysInfoExtended files as found on
+	on the 4g nanos
+
+2008-10-05  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: add serial number for the 8GB Silver Nano 4g
+	and model number for the 4GB Blue Nano 4g
+
+2008-10-01  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: a few more fixes in device model
+	numbers/serials
+
+2008-10-01  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: add missing name for the yellow ipod nano
+
+2008-10-01  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: and add SN for the 8GB Red Nano
+
+2008-10-01  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: add SN for 16GB Red Nano
+
+2008-10-01  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb.h: add enum entries for the new ipod classic and the new
+	nanos
+	* src/itdb_device.c: add entries for the new nanos and the new ipod
+	classic, add some serial numbers for older ipod models
+
+2008-09-11  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: add missing string description for the red ipod
+	shuffle that was added some time ago, without it gtkpod was badly
+	broken wrt ipod model selection :-/
+
+2008-08-23  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* bindings/python/ipod.py
+	  bindings/python/tests/tests.py:
+	  Add a quiet parameter to Database.remove() and use it in
+	  tests
+
+	* bindings/python/ipod.py:
+	  Be more consistent with other python container objects and
+	  classes
+
+	  This enables testing whether a key exists in an object (e.g.
+	  "'title' in track") as well as iterating over a Track or
+	  Photo object's keys, values, or items.  The items() and
+	  pairs() methods were renamed to values() and items(),
+	  respectively, in the Track and Photo classes.
+
+	* bindings/python/tests/tests.py:
+	  Whitespace cleanup
+
+	* bindings/python/ipod.py:
+	  Set the mediatype field for Track objects
+
+2008-08-20  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* bindings/python/examples/save_photos.py
+	  bindings/python/gpod.i.in
+	  bindings/python/ipod.py
+	  bindings/python/tests/tests.py:
+	  Update python bindings to work with the new thumbnail API.
+
+	  This removes sw_get_artwork_thumbnails() and the Thumbnail
+	  class from the python bindings.  The get_pixbuf() function
+	  is now in the Photo class.
+
+2008-08-09  Paul Richardson  <phantom_sf at users.sourceforge.net>
+
+	* Added eclipse project related files to svn:ignore
+	* src/db-artwork-parser.c
+	  src/itdb.h
+	  src/itdb_photoalbum.c:
+	  Added to Itdb_PhotoAlbum, a reference to its parent Photo DB.
+	  When albums are constructed upon loading of the Photo DB, the
+	  reference is added as part of initialisation.
+
+2008-08-09  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* src/itdb_playlist.c
+	  tests/test-ls.c: Remove uses of deprecated itdb_time_* functions
+
+2008-08-03  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+        * src/ithumb-writer (ithumb_writer_handle_pixbuf_transform):
+	  handle rotation correctly: don't interchange width and height
+	  for the thumbnail on the iPod.
+
+2008-08-02  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* src/itdb_track.c: Fix typo in itdb_track_get_thumbnail() doc
+	  comment
+
+2008-07-31  Christophe Fergeau <teuf at gnome.org>
+
+	* configure.ac: s/test -a/test -e/ since this is what I really
+	meant, thanks tmz
+
+2008-07-31  Christophe Fergeau <teuf at gnome.org>
+
+	* configure.ac: instead of looking for .svn or {arch}, look for
+	autogen.sh to decide if we are compiling a version checked out from
+	svn or a release tarball.
+
+2008-07-31  Christophe Fergeau <teuf at gnome.org>
+
+	* src/itdb_device.h:
+	* src/itdb_plist.h: move itdb_device_error_quark from itdb_plist.h
+	to itdb_device.h 
+
+2008-07-30  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* docs/reference/tmpl/track.sgml
+	  src/itdb.h
+	  src/itdb_itunesdb.c: Rename unk146 to explicit_flag in
+	  Itdb_Track now that it's purpose is known
+
+2008-07-27  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_sysinfo_extended_parser.c:
+	* src/itdb_plist.c: add gtk-doc documentation
+
+2008-07-27  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_sysinfo_extended_parser.c: 
+	* src/itdb_sysinfo_extended_parser.h: add a GError argument to
+	SysInfoExtended parsing functions
+	* src/itdb_device.c: pass NULL GError argument to call to
+	SysInfoExtended functions
+	* tests/test-sysinfo-extended.c: add a GError argument when calling
+	SysInfoExtended parsing functions
+
+2008-07-27  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: add itdb_device_error_quark()
+	* src/itdb_plist.h:
+	* src/itdb_plist.c: add error handling to XML parsing (using
+	GError)
+	* src/itdb_sysinfo_extended_parser.c: pass a NULL GError to call to
+	plist parsing function
+
+2008-07-26  Christophe Fergeau  <teuf at gnome.org>
+
+	* tests/test-fw-id.c: (main): add missing call to g_type_init
+
+2008-07-20  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/ithumb-writer.c (pack_RGB_565), (pack_RGB_555)
+          (pack_RGB_888): handle horizontal padding correctly
+          (affected pictures in portrait format).
+
+	* src/itdb_device.c: added some comments.
+
+2008-07-18  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_device.c (itdb_device_set_timezone_info): avoid g_stat
+	  on NULL filename. Thanks to Andrea.
+
+2008-07-18  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_device.c: assume the following generations do not
+	  support sparse artwork:
+            ITDB_IPOD_GENERATION_NANO_1:
+            ITDB_IPOD_GENERATION_NANO_2:
+            ITDB_IPOD_GENERATION_VIDEO_1:
+            ITDB_IPOD_GENERATION_VIDEO_2:
+
+2008-07-17  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* README
+	  bindings/python/gpod.i.in
+	  bindings/python/ipod.py
+	  docs/reference/libgpod-sections.txt
+	  docs/reference/tmpl/artwork.sgml
+	  docs/reference/tmpl/itunesdb-db.sgml
+	  src/itdb.h: Remove references to itdb_thumb_get_gdk_pixbuf()
+
+2008-07-10  Christophe Fergeau <teuf at gnome.org>
+
+	* src/db-artwork-writer.c: if we fail to write ithmb files for some
+	reason, don't go on trying to write the ArtworkDB/PhotoDB as well
+
+2008-07-09  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* po/POTFILES.in: add src/itdb_thumb.c
+
+2008-07-09  Christophe Fergeau  <teuf at gnome.org>
+
+	* configure.ac: properly detect newer libsgutils (the so name was
+	changed)
+	* tools/ipod-scsi-inquiry.c: add missing include
+	Based on a patch from Dan Horák (dan at danny.cz)
+
+2008-07-06  Christophe Fergeau <teuf at gnome.org>
+
+	* src/itdb_device.c: fix model number information grabbed from
+	podsleuth
+
+2008-07-06  Christophe Fergeau <teuf at gnome.org>
+
+	* src/itdb_device.c: add a mapping from serial numbers to model
+	numbers to make it easy to go from a serial number read from
+	SysInfoExtended to an Itdb_IpodInfo
+
+2008-07-06  Christophe Fergeau <teuf at gnome.org>
+
+	* src/itdb_device.c:
+	* src/itdb_device.h: add missing red ipod shuffles as well as 2GB
+	shuffles to the list of known ipod models
+
+2008-07-06  Christophe Fergeau <teuf at gnome.org>
+
+	* src/itdb_device.c:
+	* src/itdb_device.h: add itdb_device_get_storage_info method
+	* src/itdb_itunesdb.c: use that method instead of directly using
+	statvfs, makes it easier to port things over to MSVC8
+
+2008-07-05  Christophe Fergeau <teuf at gnome.org>
+
+	Patch from: Songbird (http://getsongbird.com/)
+
+	* src/db-itunes-parser.h: remove unused constant
+	* src/db-parse-context.c:
+	* src/db-parse-context.h: use GMappedFile instead of directly using
+	mmap, it's needed for MSVC8 portability
+
+2008-07-05  Christophe Fergeau <teuf at gnome.org>
+
+	Patch from: Songbird (http://getsongbird.com/)
+
+	* src/itdb_itunesdb.c
+	* src/itdb_track.c: get rid of inner functions since it is a gcc
+	specific extension and MSVC8 doesn't like that
+
+2008-07-05  Christophe Fergeau <teuf at gnome.org>
+
+	Patch from: Songbird (http://getsongbird.com/)
+
+	* src/db-artwork-parser.c
+	* src/db-parse-context.c
+	* src/db-parse-context.h: get rid of unused argument to
+	db_parse_context_destroy (it was always set to TRUE)
+
+2008-07-06  Christophe Fergeau <teuf at gnome.org>
+
+	* src/ithumb-writer.c: fix bug in the function scaling and cropping
+	thumbnails, in the non-cropping case, the returned pixbuf size
+	didn't reflect the size of the scaled pixbuf
+
+2008-07-05  Christophe Fergeau <teuf at gnome.org>
+
+	* src/db-artwork-parser.c: fix small memory leak
+
+2008-07-05  Christophe Fergeau <teuf at gnome.org>
+
+	* src/ithumb-writer.c: fix typo in thumbnail rearranging code, we
+	were wrongly appending Itdb_Thumb_Ipod instances to lists of
+	Itdb_Thumb_Ipod_Item
+
+2008-07-05  Christophe Fergeau <teuf at gnome.org>
+
+	* src/db-artwork-writer.c: properly set padding to 0 in mhods type 3
+
+2008-07-05  Christophe Fergeau <teuf at gnome.org>
+
+	Patch from: Songbird (http://getsongbird.com/)
+
+	* src/ithumb-writer.c: don't leak the list of image formats we get
+	from the ItdbDevice
+
+2008-06-29  Daniele Forsi <dforsi at users.sourceforge.net>
+
+        * src/itdb_itunesdb.c src/itdb_thumb.c src/itdb_device.c 
+	  src/itdb_photoalbum.c: fix typos in comments
+
+2008-06-29  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/ithumb-writer.c (itdb_write_ithumb_files): fix bug when
+	  writing photos (loop variable "it" re-used inside loop).
+	  Rename loop variable to "itw" also in case of writing artwork.
+
+	* src/itdb_thumb.c (itdb_thumb_to_pixbuf_at_size):
+
+	  If requesting a thumb from the iPod smaller than available, none
+	  would be returned. Fixed. Thumbs from the iPod would not be
+	  scaled even if requested. Fixed.
+
+	  If requesting a thumb from a file or existing pixbuf, scaling
+	  was done even if none was requested (width/height =
+	  0/-1). Fixed.
+
+	  Introduced selection of smallest available thumbnail
+	  (width/height = 0) besides largest available thumbnail
+	  (width/height = -1).
+
+	  TODO: consider aspect ratio of requested picture (currently it
+	  is very likely that some of the square thumbs are returned...)
+	
+	  src/itdb_artwork.c (itdb_artwork_get_thumbnail):
+	  Introduced selection of smallest available thumbnail
+	  (width/height = 0) besides largest available thumbnail
+	  (width/height = -1). (Only necessary documentation.)
+
+2008-06-28  Christophe Fergeau  <teuf at gnome.org>
+
+	patch by: Mike Heffner <mikeh at fesnel.com>
+
+	* src/Makefile.am:
+	* src/db-artwork-writer.c: fix compilation with older glib (without
+	GChecksum)
+
+2008-06-24  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: rework timezone handling: handle timezones as
+	stored on 5g ipods (hopefully) and fallback to using the computer
+	timezone if we can't figure out the ipod timezone
+	* tests/get-timezone.c: use functions from libgpod to get the
+	timezone instead of duplicating some itdb_device code
+
+2008-06-15  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: oops, forgot a ','
+
+2008-06-14  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: fix some entries in the ipod_model_table by
+	using libipoddevice and podsleuth as a reference
+
+2008-06-14  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_track.c: remove bogus function to check if the ipod
+	supports video: it didn't take into account the new ipods released
+	after the 1st ipod video
+
+2008-06-09  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.h:
+	* src/itdb_sysinfo_extended_parser.c:
+	* src/ithumb-writer.c: use background color and alignement
+	information from SysInfoExtended if available
+
+2008-06-09  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/db-artwork-writer.c:
+	* src/itdb_device.c:
+	* src/itdb_device.h:
+	* src/itdb_sysinfo_extended_parser.c:
+	* src/itdb_sysinfo_extended_parser.h: implements
+	itdb_device_supports_sparse_artwork (instead of the old stub always
+	returning TRUE). Use data from SysInfoExtended if it's available,
+	use hardcoded table from libgpod if not.
+
+2008-06-09  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c:
+	* src/itdb_device.h:
+	* src/itdb_sysinfo_extended_parser.c:
+	* src/itdb_sysinfo_extended_parser.h: merge Itdb_ArtworkFormat and
+	SysInfoImageFormat, use artwork formats from SysInfoExtended when
+	it's available instead of using the hardcoded tables from libgpod
+
+2008-06-09  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/db-artwork-writer.c:
+	* src/db-image-parser.h:
+	* src/itdb.h:
+	* src/itdb_device.c:
+	* src/itdb_device.h:
+	* src/ithumb-writer.c: get rid of ItdbThumbType, it's replaced by
+	pointers to the appropriate Itdb_ArtworkFormat for the thumbnail
+	type when it's needed
+
+2008-06-09  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/db-artwork-parser.c: remove duplicated artwork/photo support
+	testing functions
+	* src/db-artwork-parser.h: ditto
+	* src/itdb_itunesdb.c: s/ipod_supports_XXX/itdb_device_supports_XXX
+	* src/itdb_photoalbum.c: ditto
+	* src/itdb.h: use a const Itdb_Device argument for
+	itdb_device_supports_*, add  ITDB_IPOD_GENERATION_IPHONE_1 to
+	Itdb_IpodGeneration, get rid of ITDB_IPOD_GENERATION_FIFTH and 
+	ITDB_IPOD_GENERATION_SIXTH
+	* src/itdb_device.c: split functions to get artwork format from the
+	ipod in 2 separate functions: instead of
+	itdb_device_get_artwork_formats we now have
+	itdb_device_get_photo_formats and itdb_device_get_cover_art_formats
+	* src/itdb_device.h:
+	* src/db-image-parser.c: use the separate
+	get_cover_art_formats/get_photos_formats functions
+	* src/db-artwork-writer.c: ditto
+	* src/ithumb-writer.c: ditto
+
+2008-06-09  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/gchecksum.c: fix compilation (it's only compiled on system with
+	older glib versions)
+
+2008-06-09  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/db-artwork-writer.c:
+	* src/itdb_artwork.c:
+	* src/itdb_thumb.c:
+	* src/itdb_thumb.h: fix compilation when gdk-pixbuf isn't present
+
+2008-06-02  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_track.c (itdb_track_remove_thumbnails): set mhii_link
+	  to 0.
+
+	* src/db-artwork-parser.c (mhfd_associate_itunesdb_artwork):
+	  remove thumbnails if mhii_link is invalid.
+
+2008-06-02  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/gchecksum.c
+	  src/gchecksum.h
+	  src/Makefile.am
+	  configure.ac: copied gchecksum from glib 2.16.3. It's used if we
+	  compile on a system that does not have glib 2.16 or
+	  higher. Testing is needed whether it's really pulled in in those
+	  cases -- I'm using 2.16.3 myself.
+
+	* src/itdb_itunesdb.c (mk_mhit): write mhii_link.
+
+	* src/db-artwork-writer.c: code to handle sparse artwork
+	  correctly. 
+	  
+	  (ipod_supports_sparse_artwork): currently hard-coded to
+	  TRUE. Will be changed in the future to reflect the information
+	  given in the SysInfoExtended. Change yourself if your iPod does
+	  not support Sparse Artwork (sharing of thumbnails between
+	  several tracks).
+
+2008-06-01  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_thumb.c
+	  remove some unnecessary checks for NULL pointer
+	  (itdb_thumb_duplicate): move g_list_reverse() outside the loop
+	  modifying the list.
+	
+2008-05-30  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_thumb.c
+	  src/itdb_thumb.h
+	  src/ithumb-writer.c
+	  src/itdb_photoalbum.c: fixed a number of compile-time warnings.
+
+2008-05-30  Christophe Fergeau  <teuf at gnome.org>
+
+	Patch from Ian Stewart
+
+	* src/itdb_itunesdb.c: don't pass NULL sort_composer names down to
+	jump_table_letter, fixes a crash reported by Andy Busch
+
+2008-05-30  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/Makefile.am:
+	* src/db-artwork-parser.c:
+	* src/db-artwork-writer.c:
+	* src/db-image-parser.c:
+	* src/db-image-parser.h:
+	* src/itdb.h:
+	* src/itdb_artwork.c:
+	* src/itdb_device.h:
+	* src/itdb_photoalbum.c:
+	* src/itdb_track.c:
+	* src/ithumb-writer.c:
+	* tests/test-covers.c:
+	* tests/test-photos.c: rework Itdb_Thumb type. Now it's split into
+	different subtypes depending on what it represents (GdkPixbuf,
+	thumbnail read from the ipod, ...). Itdb_Artwork now contains only a
+	pointer to a single Itdb_Thumb (it used to contain a GList * of
+	Itdb_Thumb) since the only time when the list is useful is for thumbs
+	read from the ipod. Using a list for the other types of thumbnails
+	created some complications when trying to set art on an Itdb_Track that
+	wasn't attached to an Itdb_iTunesDB.
+
+2008-05-29  Christophe Fergeau <teuf at gnome.org>
+
+	* src/itunesdb.c:
+	* src/ithumb-writer.c: add missing static to internal functions
+
+2008-05-28  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+        * src/db-artwork-parser.c (parse_mhii): removed artwork_fallback
+	  variable upon Christophe's suggestion and streamlined code.
+
+2008-05-28  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_track.c (itdb_track_set_thumbnails_internal): set
+	  artwork ID to 0 after removing thumbnails.
+
+	* src/db-artwork-parser.c (parse_mhii): move out dbid association
+	  to a separate function.
+
+	  (mhfd_associate_itunesdb_artwork): handle dbid and mhii_link
+	  association of artwork to track
+
+	  (parse_mhfd): loop over the number of mhsd hunks instead of
+	  hardcoding it. Call mhfd_associate_itunesdb_artwork().
+
+	* src/itdb_itunesdb.c (get_mhit): read the mhii_link field.
+
+	* src/db-artwork-writer.c (write_mhli): handle unset artwork
+	  correctly.
+
+	  (itdb_track_filter_thumbnails): remove thumbnails correctly.
+
+	* src/db-parse-context.c (db_parse_context_get_sub_context): copy
+	  newly introduced artwork field.
+
+	* tests/test-covers.c: print mhii_link.
+
+	* src/itdb.h: (Itdb_Track) added mhii_link. (Itdb_Artwork): added
+	  dbid.
+
+	* src/itdb.h, src/db-artwork-parser.c, src/db-artwork-writer.c,
+	  src/itdb_device.c, src/ithumb-writer.c, src/itdb_artwork.c:
+	  added ITDB_THUMB_CHAPTER_SMALL/LARGE.
+
+	* src/itdb_device.c: ipod_classic_1_artwork_info: correct
+	  ITDB_THUMB_COVER_SMALL/LARGE entries.
+	
+2008-05-25  Christophe Fergeau <teuf at gnome.org>
+
+	* configure.ac: libxml presence is mandatory unless
+	--disable-libxml is passed to configure
+
+2008-05-25  Christophe Fergeau <teuf at gnome.org>
+
+	* src/itdb_device.c: don't insert NULL firewire IDs in the SysInfo
+	hash table
+
+2008-05-25  Christophe Fergeau <teuf at gnome.org>
+
+	* configure.ac: rework libxml detection
+	* src/Makefile.am: remove LIBXML_CFLAGS/LIBXML_LIBS since they are
+	no longer used
+	* src/itdb_plist.c: add stub functions when libxml isn't available
+	* src/itdb_sysinfo_extended_parser.c: include config.h
+
+2008-05-25  Christophe Fergeau <teuf at gnome.org>
+
+	* src/db-artwork-debug.c:
+	* src/db-artwork-writer.c:
+	* src/db-image-parser.c:
+	* src/db-itunes-parser.h:
+	* src/itdb_device.h:
+	* src/ithumb-writer.c: rename correlation_id to format_id (this is
+	how that value is called in SysInfoExtended)
+
+2008-05-25  Christophe Fergeau <teuf at gnome.org>
+
+	* configure.ac: check libxml presence
+	* src/Makefile.am: add new files, remove obsolete ones
+	* src/itdb_plist.h: 
+	* src/itdb_plist.c: plist parser, this parses a plist XML file to a
+	GHashTable of GValue *. This parser should be generic, ie it
+	doesn't know it's parsing SysInfoExtended, it only cares about it
+	being a plist file
+	* src/itdb_sysinfo_extended_parser.h:
+	* src/itdb_sysinfo_extended_parser.c: convert the parsed plist data
+	to data structures usable by libgpod
+	* src/itdb_device.h:
+	* src/itdb_device.c: parses SysInfoExtended in addition to SysInfo
+	* src/itdb_sysinfo.c: this hacky parser is obsoleted by the new
+	(much more complete) SysInfoExtended parser, so it's removed
+	* tests/Makefile.am:
+	* tests/test-sysinfo-extended-parsing.c: small test program for the
+	new parser
+
+2008-05-25  Christophe Fergeau <teuf at gnome.org>
+
+	Patch from Ian Stewart <ian.stewart at ozemail.com.au>
+
+	* src/itdb_itunesdb.c: add jump letter support (mhod53)
+
+2008-05-24  Christophe Fergeau <teuf at gnome.org>
+
+	* src/ithumb-writer.c: factor some code out of
+	ithumb_writer_write_thumbnail into separate functions to make the
+	code more readable
+
+2008-05-24  Christophe Fergeau <teuf at gnome.org>
+
+	Patch from Jacob Hoffman-Andrews <jsha at newview.org>
+	
+	* src/itdb_device.h: add 'crop' field to Itdb_ArtworkFormat
+	* src/itdb_device.c: fill this 'crop' field for the iphone
+	* src/ithumb-writer.c: use that new 'crop' field to crop the
+	thumbnails when the Itdb_ArtworkFormat requires it.
+
+2008-05-24  Christophe Fergeau <teuf at gnome.org>
+
+	Patch from Jacob Hoffman-Andrews <jsha at newview.org>
+
+	* tools/hal-callout.c: add missing #include <unistd.h>
+
+2008-05-17  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* tests/test-covers.c: print more info (marginally)
+
+2008-05-11  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+        * src/itdb_photoalbum.c
+	  src/itdb_private.h
+	  src/db-artwork-writer.c: renamed itdb_get_free_photo_id() to
+	  itdb_get_max_photo_id() and implemented Jacob Hoffman-Andrew's
+	  patch about the photo_ids and album_ids being shared.
+
+	* tests/test-covers.c: print more info (marginally)
+
+2008-05-10  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* tests/test-covers.c: print more status messages.
+
+2008-05-01  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* configure.ac:
+	  Bump version to 0.6.1SVN
+
+	* bindings/python/ipod.py: write shuffle data (thanks to Diogo
+	  Dutra)
+
+2008-04-19  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+        * bindings/python/examples/Makefile.am
+	  Added fix_empty_artist_field.py provided by Thomas Perl.
+
+2008-03-29  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* bindings/python/Makefile.am
+	  docs/reference/Makefile.am
+	  src/Makefile.am: cleanup more of our dirs with make uninstall
+
+	* tests/test-rebuild-db.cc: include string.h to fix builds
+	  with gcc 4.3 (fixes SF tracker #1928618)
+
+2008-03-02  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* configure.ac
+	  m4/python.m4: shell portability fixes (courtesy of Klaus Heinz)
+
+2008-02-13  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* bindings/python/ipod.py: Track.set_thumbnail() was renamed
+	  to Track.set_coverart_from_file() a long time ago
+
+2008-02-03  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/db-artwork-debug.c:
+	* src/db-artwork-debug.h: fix mhod type1 and mhod type3 dumping
+	when debugging is enabled
+
+2008-02-03  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/db-artwork-debug.h: merge mhod type1 and mhod type3 dumping
+	functions
+	* src/db-artwork-writer.c: adjust to the change above
+	* src/db-artwork-parser.c: merge mhod type1 and mhod type3 parsing
+	* src/db-itunes-parser.h: remove obsolete comment
+
+2008-02-03  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/db-artwork-parser.c: use enum name instead of hardcoded int
+	* src/db-artwork-writer.c: add comments about values that aren't
+	swapped because they are 8 bit values
+
+2008-02-03  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/db-itunes-parser.h: merge ArtworkDB_MhodHeaderArtworkType3
+	and MhodHeaderArtworkType1 into a single struct called
+	ArtworkDB_MhodHeaderString
+	* src/db-artwork-parser.c: 
+	* src/db-artwork-writer.c: adjust to the above change
+
+2008-02-03  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/db-artwork-parser.c: add missing g_free that could cause
+	memory leaks
+
+2008-01-30  Christophe Fergeau  <teuf at gnome.org>
+
+	Patch by Martin Aumueller 	
+
+	* tests/test-ls.c: make sure the various fields we are trying to
+	print aren't NULL, this fixes a crash that was observed with
+	iphones
+
+2007-11-15  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_itunesdb.c: don't use itdb_filename_ipod2fs to generate
+	the filename to put on the shuffle since on windows that would use
+	\ as a path separator instead of the correct /
+
+2007-11-15  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_private.h:
+	* src/itdb_itunesdb.c: add itdb_file_set_contents to workaround a
+	rename issue on sshfs (existing files on the FS can't be
+	atomatically erased during a rename). Use it in wcontents_write
+	* src/db-artwork-writer.c: use itdb_file_set_contents to write the
+	ArtworkDB
+
+2007-11-15  Christophe Fergeau  <teuf at gnome.org>
+	
+	* src/db-artwork-writer.c:
+	* src/db-parse-context.c:
+	* src/itdb_device.c:
+	* src/itdb_itunesdb.c:
+	* src/ithumb-writer.c: don't include unistd.h on systems which
+	don't have it
+
+2007-11-16  Christophe Fergeau <teuf at gnome.org>
+
+	* src/itdb_itunesdb.c: rework itdb_cp for MacOSX/Windows
+	portability
+
+2008-01-26  Michael Tiffany <tiffman at users.sourceforge.net>
+
+        * src/itdb_chapterdata.c: file missed being added in
+	previous checkin
+
+2008-01-26  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+        * src/itdb_track.c
+	* src/itdb_itunesdb.c
+	* src/itdb_chapterdata
+	* src/itdb.h
+	* src/Makefile.am: applied chapterdata patch by Michael Tiffany.
+
+2008-01-02  Christophe Fergeau <teuf at gnome.org>
+
+	* src/itdb_device.c: fix ITDB_THUMB_PHOTO_FULL_SCREEN format on
+	ipod classic and nano video, thanks to Tomas Carnecky for pointing
+	that out
+
+2007-12-13  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* Makefile.am: add ACLOCAL_AMFLAGS to fix some autoreconf
+	  issues (thanks to Frank Lichtenheld at Debian)
+
+2007-11-26  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* configure.ac
+	  libgpod-1.0.pc.in:
+	  conditionally add gdk-pixbuf to pkg-config Requires.
+	  exit with an error if gdk-pixbuf or pygobject are explicitly
+	  requested and not found.
+	  add AM_PROG_CC_C_O to make automake happy about per-target
+	  flags in tests/Makefile.am
+
+2007-11-25  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* autogen.sh: pass any user-specified options to configure
+
+2007-11-17  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_playlist.c (itdb_splr_eval): track length in rules for
+	  smart playlists was treated as seconds, but the iPod treats them
+	  as milliseconds. If you told libgpod to create a smart playlist
+	  with tracks less than 100 secs in length, but the life update of
+	  the iPod would interpret that rule as "tracks less than 100 msec
+	  in length", giving a vastly different result. Tested with iPod
+	  Nano 1G and iPod nano Video (3G).
+
+	  Requires corresponding fix in GUIs using this function.
+
+2007-11-16  Christophe Fergeau <teuf at gnome.org>
+
+	* src/itdb_device.c: fix typoes in iPod Touch model lists
+
+2007-11-14  Christophe <teuf at gnome.org>
+
+	* src/itdb_itunesdb.c: use libgpod as the prefix of music files to
+	be copied to the ipod instead of gtkpod
+
+2007-11-14  Christophe <teuf at gnome.org>
+
+	* src/itdb_itunesdb.c: get rid of local g_mkdir_with_parents copy
+	since we now depend on glib 2.8 which have it. Replace mkdir with
+	g_mkdir
+
+2007-11-14  Christophe <teuf at gnome.org>
+
+	* src/itdb_itunesdb.c: ignore invalid UTF-8 paths which might have
+	been added to the iPod by the user
+
+2007-11-14  Christophe <teuf at gnome.org>
+
+	* src/itdb_photoalbum.c: use g_list_remove all instead of an
+	inefficient combination of g_list_find + g_list_remove
+
+2007-11-14  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_photoalbum.c (itdb_photodb_photoalbum_remove): make
+	  sure same photo isn't freed multiple times if it was added in an
+	  album multiple times.
+
+2007-11-13  Christophe Fergeau <teuf at gnome.org>
+
+	* src/itdb_photoalbum.c: fix bug in itdb_photodb_photoalbum_remove,
+	when removing all the photos from the photodatabase, we were
+	erasing elements and iterating over the list at the same time,
+	which resulted in the function not working properly
+
+2007-11-10  Christophe Fergeau <teuf at gnome.org>
+
+	* Makefile.am: add README.SysInfo to EXTRADIST
+
+2007-11-10  Christophe Fergeau <teuf at gnome.org>
+
+	* NEWS: update for 0.6.0 release
+	* README.SysInfo: explain how to get the firewire id from an iPod Touch
+
+2007-11-10  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/db-artwork-parser.c (parse_mhba): fix double g_free on mhba
+	  chunks with multiple mhods. Currently only mhods of type 1 are
+	  handled, the rest (type 2: image transition style) are being
+	  discarded.
+
+	* src/itdb_device.c: added photo thumbnail definitions for iPod
+	  Touch. I'm not sure how reasonable the "PHOTO_LARGE,
+	  _FULL_SCREEN, _TV_SCREEN" classification is, however...
+
+	* src/itdb_device.c: use the same photo thumbnail definitions for
+	  the iPhone as well as the iPod Touch until further input is
+	  received.
+
+2007-11-09  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/db-parse-context.c (db_parse_context_get_m_header_internal):
+	  fixed memory leak.
+
+2007-11-08  Christophe Fergeau <teuf at gnome.org>
+
+	* src/itdb_device.c: (itdb_device_requires_checksum): the iPod Touch
+	needs a firewire id as well
+
+2007-11-08  Christophe Fergeau  <teuf at gnome.org>
+
+	* tools/hal-callout.c: (mount_ipod): use g_get_tmp_dir instead of
+	hardcoding /tmp
+
+2007-11-07  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* tools/hal-callout.c (mount_ipod): fix bug that prevented
+	  creation of the SysInfoExtended file if it hadn't already
+	  existed.
+	  Add copyright header.
+
+	* tools/ipod-scsi-inquiry.c: added project name to the copyright
+	  header. 
+
+2007-11-06  Christophe Fergeau  <teuf at gnome.org>
+
+	* configure.ac: raise version number and soname in preparation for a
+	0.6.0 release
+
+2007-11-06  Christophe Fergeau  <teuf at gnome.org>
+
+	* configure.ac:
+	* tools/20-libgpod-sysinfo-extended.fdi:
+	* tools/Makefile.am:
+	* tools/hal-callout.c: 
+	* tools/ipod-scsi-inquiry.c: 
+	* tools/read-sysinfoextended-sgutils.c: add hal callout which
+	automatically write SysinfoExtended to iPods when they are plugged
+	if it's properly installed
+
+2007-11-06  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* itdb_itunesdb.c (itdb_create_directories): Add support for
+	  iPod Touch (wrong directories were created).
+
+2007-11-04  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* itdb_itunesdb.c (itdb_create_directories): Add support for
+	  iPhones (wrong directories were created). Thanks to Jesse
+	  Bouwman for the patch.
+	
+	Added support for video output of photos for iPod Nano Videos and
+	iPod Classics.
+
+	* src/ithumb-writer.c
+	  (pack_I420): added packer for iPod Nano Video and iPod Classic
+	  TV output photo format.
+	  (itdb_write_ithumb_files): make sure only valid thumbnail types
+	  are written.
+
+	* src/db-image-parser.h: added declaration for
+	  itdb_thumb_type_is_valid_for_db() 
+
+	* src/itdb_photoalbum.c (itdb_photodb_add_photo_internal): make
+	  sure only photo thumbnails are added.
+
+	* src/db-artwork-writer.c
+
+	  (write_mhii): correctly skip unneeded thumbnails (thumbnails not
+	  relevant for the current iPod type).
+
+	  (should_write): renamed to itdb_thumb_type_is_valid_for_db()
+
+	  src/itdb.h
+	  src/itdb_artwork.c: minor formatting.
+
+2007-10-30  Christophe Fergeau  <christophe at anevia.com>
+
+	Additional clean-ups after the glib requirement bumping pointed out by
+	tmz on IRC
+
+	* libgpod-1.0.pc.in: bump glib requirement there as well
+	* src/Makefile.am:
+	* src/db-parse-context.c:
+	* src/glib-compat.h:
+	* src/itdb_artwork.c:
+	* src/itdb_itunesdb.c:
+	* src/itdb_photoalbum.c:
+	* src/itdb_private.h:
+	* src/ithumb-writer.c: get rid of glib-compat.h since we raised the
+	  minimum version to 2.8
+
+2007-10-30  Christophe Fergeau <teuf at gnome.org>
+
+	Patch from Filippo Giunchedi <filippo at esaurito.net>
+
+	* src/db-artwork-debug.c: (dump_mhni): another endianness fix
+
+2007-10-29  Christophe Fergeau <teuf at gnome.org>
+
+	* src/itdb_artwork.c:
+	* src/ithumb-writer.c: replace // comments with /* */ pairs, fixes
+	  compilation on my machine
+
+2007-10-29  Christophe Fergeau <teuf at gnome.org>
+
+	Patch from Filippo Giunchedi <filippo at esaurito.net>
+
+	* src/itdb_artwork.c: add I420 unpacker
+	* src/itdb_device.c: iPod classic full screen photo format is I420
+	* src/itdb_device.h: add I420 format
+	* src/ithumb-writer.c: add stub for an I420 packer
+
+2007-10-29  Christophe Fergeau <teuf at gnome.org>
+
+	* src/itdb_device.c: the iPod Touch probably uses the same image format
+	  as the iPhone
+
+2007-10-29  Christophe Fergeau <teuf at gnome.org>
+
+	* configure.ac: raise glib requirement to 2.8 (because of
+	  g_file_set_contents)
+
+2007-10-29  Christophe Fergeau <teuf at gnome.org>
+
+	* configure.ac: remove mremap check
+	* src/db-artwork-writer.c: get rid mmap/mremap use
+
+2007-10-29  Christophe Fergeau <teuf at gnome.org>
+
+	* src/db-artwork-writer.c: reread the pointer for memory mapped
+	  buffers when it may have changed
+	    
+	  Artwork writing works by mapping structs to memory and by
+	  directly accessing/modifying it. This works until we need to
+	  move the mmap base address. This patch makes sure we reset the
+	  struct mapping every time the mmap base pointer may have changed
+
+2007-10-27 Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+        * src/itdb_device.c (ipod_classic_1_artwork_info)
+	  src/ithumb-writer.c (pack_RGB_888, pack_RGB_565, pack_RGB_555,
+	                       pack_rec_RGB_555, ithumb_writer_write_thumbnail)
+	  src/db-image-parser.h (_888 definitions)
+	  src/itdb_device.h (RGB888 thumb format enum definitions)
+	  src/itdb_artwork.c (unpack_RGB_888, unpack_experimental,
+	                      itdb_thumb_get_rgb_data)
+
+	  Partial support for photos on new iPod Nano 3G and iPod
+	  Classics.
+
+	  Photos should be displayed correctly on the iPod but the video
+	  output will show garbage (couldn't try video output per se, but
+	  from the data iTunes produces this is clear).
+
+2007-10-24  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/db-artwork-writer.c: (write_mhif), (should_write),
+	  (write_mhlf): don't hardcode the number of mhif entries we
+	  write, but write as many entries as the number of thumbnail
+	  formats supported by the device
+
+2007-10-24  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/db-artwork-writer.c: (write_mhla): yet another missing endianness
+	conversion
+
+2007-10-24  Christophe Fergeau  <teuf at gnome.org>
+
+	Patch from Filippo Giunchedi <filippo at esaurito.net>
+
+	* src/db-artwork-parser.c: (parse_mhba): another missing endianness
+	conversion
+
+2007-10-21  Christophe Fergeau  <teuf at gnome.org>
+
+	Patch from Filippo Giunchedi <filippo at esaurito.net>
+
+	* src/db-artwork-debug.c: (dump_mhod_type_3): add missing byte-swap
+	which resulted in over huge allocation
+
+2007-10-21  Christophe Fergeau  <teuf at gnome.org>
+
+	Patch from Filippo Giunchedi <filippo at esaurito.net>
+
+	* src/db-artwork-debug.c: (dump_mhba): fix dumping function in debug
+	mode
+	* src/db-itunes-parser.h: indentation fixes
+
+2007-10-21  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_photoalbum.c: (itdb_get_photos_dir):
+	* src/ithumb-writer.c: (ipod_image_get_ithmb_filename):
+
+2007-10-16  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* autogen.sh: add --enable-gtk-doc to the gnome-autogen.sh
+	call. This allows make distcheck to work correctly and to use
+	an unmodified copy of gnome-autogen.sh from the upstream
+	gnome-common package.
+
+2007-10-16  Christophe Fergeau  <teuf at gnome.org>
+
+	* gnome-autogen.sh: switch to newer version of that file 
+	(with automake 1.10 support)
+
+2007-10-09  Christophe Fergeau <teuf at gnome.org>
+
+	* src/itdb_device.c: (itdb_device_requires_checksum): add missing 
+	(unreachable) return
+
+2007-10-07  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: (itdb_device_requires_checksum):
+	* src/itdb_itunesdb.c: (write_db_checksum):
+	* src/itdb_private.h: add an itdb_device_requires_checksum function so 
+	that we only error out because of checksum writing issues on ipods which 
+	require a checksum. Ideally, we should restore the old file when there is
+	a fatal checksum writing error, but libgpod isn't currently doing that
+
+2007-10-05  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_sha1.c: (generate_key): move cryptic calculations 
+	into the precomputed tables. Patch by Simon Schulz.
+
+2007-10-05  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c:
+          Remove duplicate reference to ithmb file
+
+          The iPod classic artwork formats contained two references to an 
+	  ithmb file using 1060 as its filename. This confuses the ithumb 
+	  writing code which can't handle that properly. Fixes that for now by
+	  removing the entry. We could probably be more clever in 
+	  itdb_write_ithumb_files and generate two lists of iThumbWriters,
+	  one for artwork and another one for photos. This would fix that bug 
+	  as well
+
+2007-10-05  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/db-artwork-writer.c: (itdb_track_filter_thumbnails),
+	(itdb_filter_thumbnails), (ipod_write_artwork_db):
+	* src/itdb_track.c: (itdb_track_set_thumbnails_internal):
+         Set thumbnails for all known cover types in itdb_track_set_thumbnails
+
+         itdb_track_set_thumbnails can be called when the track isn't attached
+	 to any device (eg it's natural to create a track, fill its metadata 
+	 including the cover art, and then add it to an iTunesDB and its 
+	 associated device). This means we can't know which artwork types the
+	 iPod corresponding to the iTunesDB will be able to handle. i
+	 Consequently, we create Itdb_Thumb objects for all known cover types,
+	 and we filter that list when we don't have a choice (ie when we're 
+	 about to write the ArtworkDB and the thumbnails)
+
+2007-10-05  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_itunesdb.c: (itdb_write_file): set Itdb_Track::id
+	before writing the artwork since artwork writing uses them
+
+2007-10-01  Christophe Fergeau <teuf at gnome.org>
+
+	* README.SysInfo: add explanations about how the iPod needs to be 
+	set up so that libgpod can read the firewire id
+
+2007-10-01  Christophe Fergeau <teuf at gnome.org>
+
+	* src/itdb_itunesdb.c: get rid of unused headers
+
+2007-09-26 Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+        * src/itdb_itunesdb.c (mk_mhit): write extended mhit header for
+	  new iPod Nanos and Classics so they display artwork (Christophe)
+
+	* src/db-artwork-writer (ipod_artwork_set_ids): modify the
+	  assignment of IDs for artwork (Christophe)
+
+	* src/itdb_device.c: added artwork definition file (cover only)
+	  for iPod Nano Videos (3G). Thanks to Simon Schulz.
+
+	* src/itdb_itunesdb.c: integrate checksum writing into the
+	  creation of the iTunesDB instead of modifying the iTunesDB file
+	  in place (Christophe)
+
+	* src/itdb_device.c: re-use artwork definition for iPod classic
+	  also for iPod Nanos 3G.
+
+2007-09-30  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_itunesdb.c: (itdb_write_checksum): remove debugging g_print
+
+2007-09-30  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: fix typo and don't mark iPod Classic as read-only
+
+2007-09-28  Christophe Fergeau  <teuf at gnome.org>
+
+	* tools/read-sysinfoextended-sgutils.c: (main): use g_build_filename
+	instead of itdb_resolve_filename since the latter will fail if
+	SysInfoExtended does not already exist
+
+2007-09-27  Christophe Fergeau  <teuf at gnome.org>
+
+	* configure.ac: build tool to generate the iPod SysInfoExtended file
+	if sgutils is detected
+	* Makefile.am:
+	* tools/
+	* tools/Makefile.am: changes to optionally build the sgutils-based tool
+	* tools/read-sysinfoextended-sgutils.c: (do_sg_inquiry),
+	(read_sysinfo_extended), (main): new file, reads the SysInfoExtended
+	file from the iPod using SCSI queries
+
+2007-09-27  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_itunesdb.c: (calculate_db_checksum),
+	(itdb_write_checksum):
+	* src/itdb_sha1.c: (itdb_compute_hash):
+	* src/itdb_sha1.h: propagate the calculated checksum length as an out
+	parameter to the checksumming functions, fixes a bug where a partial 
+	checksum would be written if it contained a \0
+	* tests/test-checksum.c: (calculate_db_checksum): update test program
+	to that API change
+
+2007-09-26 Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_device.c: remove "read only" notice on Nano Video
+          description.
+
+	* ChangeLog: explained better about SysInfo* files.
+
+2007-09-24 Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	** code courtesy of Christophe Fergeau **
+
+	* src/itdb_itunesdb.c (mk_mhbd): write extended header needed
+          for new iPod Nanos (3G Video) and iPod Classics (must fill
+          in SysInfo or SysInfoFileExtended -- see below).
+
+	  src/itdb_sysinfo.c
+	  src/itdb_device.c
+	  src/itdb_device.h: Code to parse SysInfoExtended and SysInfo
+	  for the FireWireGUID. You must either copy the iPod
+	  description XML file to Device/SysInfoExtended or add a line
+	  'FirewireGuid: 000A27....' to Device/SysInfo. You can get
+	  your FirewireGuid by looking at /proc/bus/usb/devices and
+	  search for a serial number close to the "Apple" entry. The
+	  serial number will probably start with 000A27.
+
+	* src/sha1.c
+	  src/sha1.h
+	  src/itdb_sha1.c
+	  src/itdb_sha1.h
+	  New files for obscure hash generation code.
+
+	* src/Makefile.am: added new files.
+
+        * tests/test-checksum.c
+	  tests/test-fw-id.c
+	  tests/Makefile.am: test programs to retrieve the
+	  FirewireGuid and calculate/write the obscure hash.
+
+2007-09-15 Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_device.c:
+	  Re-organized the representation of iPod models -- instead of 1st
+	  to 7th generation more well-known names like "iPod Nano 1G",
+	  "iPod Nano 2G"... are used.
+
+	  Added untested support for iPod Classic Artwork. Not clear which
+	  thumbnail type is used for what.
+
+	  src/itdb_track.c (itdb_track_set_thumbnails_internal):
+	  Please note: itdb_track_set_thumbnails() needs to be thought
+	  over to make sure all thumbnail types are added properly. Please
+	  see note in itdb_track.c for details.
+
+	  src/itdb.h: Added symbols for the new representation indicated
+	  above: ITDB_IPOD_GENERATION_*, ITDB_IPOD_MODEL_*
+
+2007-09-08 Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/db-image-parser.c
+	  src/itdb_device.c
+	  src/ithumb-writer.c
+	  src/db-image-parser.h
+	  src/itdb_device.h
+	  src/itdb.h
+	  src/itdb_artwork.c
+	  tests/test-covers.c: added support to read and write coverart on
+	  iPhones. New cover formats are: MEDIUM, XLARGE, XSMALL, SMEDIUM
+	  -- should be renamed if function becomes clearer.
+
+	  Introduced New image formats for the thumbnails
+	  (THUMB_FORMAT_RGB555, THUMB_FORMAT_REC_RGB555). Coding/decoding
+	  functions are pack_/unpack_RGB_555() and
+	  pack_/unpack_REC_RGB_555().
+
+	  Introduced possible padding for thumbnail files
+	  (Itdb_ArtworkFormat).
+
+	  * src/db-artwork-parser.c: make output filename unique.
+
+2007-09-04 Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* itdb_itunesdb.c (itdb_get_control_dir):
+	  added support for iPhones
+
+	* itdb.h: added ITDB_IPOD_MODEL_IPHONE_1 enum
+
+	* itdb_device.c: added iPhone description
+	
+	TODO: define artwork definition in itdb_device.c -- currently
+	artwork is not supported.
+
+2007-08-18 Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/db-artwork-writer.c (write_mhod_type_3): don't assume that
+	  length of a utf16 string is twice the length of a utf8 string
+	  (even though this was safe here because the strings in question
+	  were ASCII). Thanks to Javier Kohen for the patch.
+
+	  (write_mhod_type_1), (write_mhod_type_3):
+	  Don't pad by 4 bytes as this achieves nothing. Thanks to Javier
+	  Kohen to point this out.
+
+	* src/itdb_itunesdb.c: make calls to utf16_strlen()
+	  unnecessary. Thanks to Javier Kohen for the patch.
+
+	* src/itdb_itunesdb (itdb_parse): don't call
+	  ipod_parse_artwork_db() if iTunesDB was not read successfully.
+
+	* src/itdb_artwork.c (itdb_thumb_get_filename): check
+          returnvalue of strchr(). Thanks to Javier Kohen.
+
+2007-08-07  Nicholas Piper  <nicholas at users.sourceforge.net>
+
+	* bindings/python/gpod.i.in: Return an integer for time_t (note,
+	no to/from mac timestamp mapping required), accept an integer or
+	datetime object for a time_t
+
+	* bindings/python/ipod.py (Track.__getitem__): for the Python OO
+	interface, map reading time_* attributes in Tracks to a datetime
+	object
+
+	* bindings/python/tests/tests.py (TestiPodFunctions.testDatestampSetting): 
+	test reading/writing the Track timestamp attributes
+
+2007-08-04  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* src/db-parse-context.h:
+	  remove duplicate copyright header
+
+2007-07-31  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* bindings/python
+	  bindings/python/examples/coverart_fetch.py
+	  bindings/python/examples/save_photos.py
+	  bindings/python/gpod.i.in
+	  bindings/python/ipod.py
+	  bindings/python/tests
+	  bindings/python/tests/resources/tiny.png
+	  bindings/python/tests/tests.py
+	  configure.ac
+	  m4/python.m4
+	  TROUBLESHOOTING:
+	  merge changes from the bug-1723660 branch
+
+	* bindings/python/ipod.py:
+	  ignore reserved (and chapterdata) attributes which are
+	  returned as gpointers
+	  cleanup some trailing whitespace
+
+2007-07-27  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+	* bindings/python/gpod.i.in:
+	  s/top_srcdir/top_builddir to fix make distcheck
+
+	* configure.ac
+	  m4/python.m4:
+	  don't make the python gtk module a hard requirement
+
+	* TROUBLESHOOTING:
+	  note additional requirements for full python photo/thumbnail
+	  support
+
+2007-07-13  Nicholas Piper  <nicholas at users.sourceforge.net>
+
+	* bindings/python/ipod.py (Track.set_coverart_from_file): Rename
+	set_thumbnail function to set_coverart_from_file
+
+	* bindings/python/ipod.py Improve support for adding
+	Photos. Thanks to John Carr.
+
+	* bindings/python/examples/coverart_fetch.py: Adjust to
+	demonstrate new gtk pixbuf based coverart API
+
+2007-07-13  Todd Zullinger <tmzullinger at users.sourceforge.net>
+
+	* bindings/python/examples/Makefile.am:
+	  add save_photos.py to EXTRA_DIST
+
+2007-07-12 Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* po/ro.po: nobody told me I forgot to actually add this file to
+	  the repository...
+
+2007-07-12  Nicholas Piper  <nicholas at users.sourceforge.net>
+
+	* bindings/python/gpod.i.in: Add version and version_info
+	attributes to the Python bindings
+
+2007-07-11  Todd Zullinger <tmzullinger at users.sourceforge.net>
+
+	* bindings/python/Makefile.am:
+	  try to convert the xml docs into python docstrings even when
+	  ENABLE_GTK_DOC isn't set so that tarball builds can get the
+	  full documentation in python.
+
+2007-07-07 Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* configure.ac
+	  po/ro.po: added Romanian catalog. Thanks to Alex Eftimie.
+
+2007-07-05  Todd Zullinger <tmzullinger at users.sourceforge.net>
+
+	* configure.ac:
+	  s/PACKAGE_/LIBGPOD_/ in configuration output
+
+	* src/itdb.h:
+	  remove references to Mac type timestamps
+
+	* README
+	  docs/reference/tmpl/itunesdb-db.sgml:
+	  fix a few typos
+
+2007-07-04  Todd Zullinger <tmzullinger at users.sourceforge.net>
+
+	* po/fr.po:
+	  updated French translation (thanks to Eric Lassauge)
+
+2007-07-02  Todd Zullinger <tmzullinger at users.sourceforge.net>
+
+	* TROUBLESHOOTING:
+	  python bindings now use the mutagen module instead of eyeD3
+
+2007-06-29 Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+        * po/libgpod.pot: added to SVN repository (new translators may be
+	  looking for it -- like yesterday).
+
+	* po/*.po: run 'make update-po'.
+
+2007-06-29  Todd Zullinger <tmzullinger at users.sourceforge.net>
+
+	* bindings/python/tests/Makefile.am:
+	  include tests.py in EXTRA_DIST
+
+2007-06-29 Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_artwork.c (itdb_thumb_free, itdb_thumb_duplicate): fix
+	  compile time error when compiling without GDKPIXBUF. Alternative
+	  fix: add '#include <glib-object.h>'. Thanks to Olivier Crête.
+
+2007-06-28  Nicholas Piper  <nicholas at users.sourceforge.net>
+
+	* bindings/python/ipod.py: Remove hard-coding of
+	  Track/Artwork/Album attributes
+
+2007-06-23  Todd Zullinger <tmzullinger at users.sourceforge.net>
+
+	* configure.ac:
+	  bump version to 0.5.3SVN for further development
+
+	* configure.ac:
+	  bump version for 0.5.2 release
+
+2007-06-23 Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_itunesdb.c (mhod52_make_collate_keys): ignore empty
+	  sort strings -- fixes multiple display of same album on the
+	  iPod.
+
+2007-06-18 Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* TROUBLESHOOTING: comment concerning namespace cleanup
+
+2007-06-17  Todd Zullinger <tmzullinger at users.sourceforge.net>
+
+	* configure.ac:
+	  bump version and soname for 0.5.0 release
+
+	* libgpod-1.0.pc.in:
+	  add glib version and gobject-2.0 to 'Requires:'
+
+2007-06-17  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_itunesdb.c
+	  src/itdb.h: libgpod will not change the values for sort_artist.
+	  Furthermore, libgpod reads the stored values of
+	  sort_artist/_album... from the iTunesDB and makes them available
+	  through the Itdb_Track structure. Applications should modify
+	  these values along with the corresponding artist/album... fields
+	  if a particular sort order is required.
+
+	* src/itdb.h: corrected description for "BPM" (beats per minute)
+
+2007-06-14  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* po/es.po: new version updated by Alejandro Lamas Daviña.
+
+2007-06-11  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* po/ja.po
+	  po/sv.po
+	  po/it.po: Changed license to "same as gtkpod" to "same as
+	  libgpod" after consulting with translators. Waiting for response
+	  from the Hebrew and Spanish translators.
+
+2007-06-02  Daniele Forsi <dforsi at users.sourceforge.net>
+
+        * po/it.po: updated Italian translation
+
+2007-05-27  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+        * src/db-artwork-parser.c (parse_mhba): non-zero terminated
+	  string was copied using g_strdup() instead of g_strndup(). This
+	  affected album names of the Photo Database.
+
+	  src/db-artwork-writer.c (write_mhod_type_1): convert 'type' as
+	  16 bit integer, not 32 bit integer. Potential problem on
+	  non-standard endian system (iPod side).
+
+	  src/db-itunes-parser.h: '#if 0' unused structure to avoid
+	  confusion.
+
+	* src/itdb_photoalbum.c (itdb_photodb_parse): return a valid
+	  photodb structure including the main Photo Library album if no
+	  database existed, analogous to itdb_photodb_create(). Without
+	  this the test-photos script won't work as expected and other
+	  applications also would have to add extra checks for presence of
+	  the main Photo Libarary.
+
+2007-05-30  Todd Zullinger <tmzullinger at users.sourceforge.net>
+
+        * bindings/python/tests/resources/iTunes/iTunesDB.ext
+          docs/reference/libgpod-docs.xml
+          docs/reference/tmpl/photodb.sgml
+          m4/python.m4:
+          change CVS references and links to SVN
+
+2007-05-27  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/db-artwork-parser.c
+	  src/db-artwork-writer.c
+	  src/itdb_device.c
+	  src/itdb_itunesdb.c
+	  src/itdb_private.h:
+	  Fixed segfault when parsing photo databases introduced by the
+	  new handling of timestamps (all timestamps exported are
+	  host-local time_t).
+	  itdb_time_time_t_to_mac() and itdb_time_mac_to_time_t() were
+	  renamed to device_*() and take a pointer to an Itdb_Device
+	  instead of a pointer to an Itdb_iTunesDB structure as the latter
+	  does not exist in case of photo databases. All references to
+	  those two functions were changed accordingly and the functions
+	  themselves were moved from itdb_itunesdb.c to itdb_device.c.
+
+2007-05-23  Todd Zullinger <tmzullinger at users.sourceforge.net>
+
+	* src/itdb_itunesdb.c (get_playlist): fix a potential crasher
+	  (Raymond Walsh)
+
+2007-05-19  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_itunesdb.c (playcounts_init): C&P error stat'ing the
+	  wrong file. Thanks to Raymond Walsh.
+
+	* src/itdb_device.c (itdb_set_sysinfo): Corrected comment. Thanks
+	  to Daniele Forsi.
+
+2007-05-17  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb.h: warning about adding string fields
+	  src/itdb_track_duplicate: duplicate new string fields
+	  (sort_*). Thanks to Raymond Walsh.
+
+2007-05-10  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+        * TROUBLESHOOTING: added a note about the 'padding[]'
+	  incompatibility with older versions of gcc.
+
+2007-05-12  Todd Zullinger <tmzullinger at users.sourceforge.net>
+
+	* bindings/python/gpod.i.in: treat time_t as long
+
+	* docs/reference/Makefile.am
+	  docs/reference/libgpod-sections.txt
+	  docs/reference/tmpl/device.sgml
+	  docs/reference/tmpl/itunesdb-lowlevel.sgml
+	  docs/reference/tmpl/itunesdb-time.sgml
+	  docs/reference/tmpl/libgpod-unused.sgml
+	  docs/reference/tmpl/smart-playlists.sgml
+	  src/itdb_itunesdb.c
+	  src/itdb.h:
+	  Minor documentation cleanups.
+
+2007-05-10  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+        * src/itdb_itunesdb.c: remove non-sense check (itdb != NULL) when
+	  itdb can never be NULL. Thanks to Raymond Walsh.
+
+2007-05-07  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+        * src/itdb_artwork.c
+	  src/itdb_itunesdb.c
+	  tests/test-photos.c:
+	  Corrected some typos. Thanks to Daniele Forsi.
+
+	* src/itdb_itunesdb.c:
+	  Fix for 64 bit systems: don't show "last played" data as played
+	  in the last century... Thanks to Christophe.
+
+2007-05-06  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_itunesdb.c
+	  src/itdb_device.c
+	  src/itdb_private.h
+	  src/itdb.h:
+	  New API functions to facilitate copying to the iPod in a
+	  background thread and implementation of own copying code.
+
+	  itdb_cp_get_dest_filename(): obtain a valid filename on the iPod
+	  to where a track can be copied. This function can be used in a
+	  thread-safe way.
+
+	  itdb_cp_finalize(): to be called after the track was
+	  copied to the iPod to update some fields in the Itdb_Track
+	  structure. This function can also be used in a thread-safe way.
+
+	  You can use the already existing function itdb_cp() to copy a
+	  track to the iPod and itdb_cp_track_to_ipod() remains available
+	  unchanged in functionality.
+
+2007-05-01  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_itunesdb.c (itdb_cp_track_to_ipod): removed static
+	  variable "dir_num" which was initialized once and cycled through
+	  for each track transfered. This doesn't seem right since
+	  different iPods with different number of music directories may
+	  be connected at the same time, and itdb_cp_track_to_ipod() may
+	  be called for different iTunesDBs at the same in in a threaded
+	  environment. Since there is no inherent value in cycling through
+	  the directories, a random directory is selected each time.
+
+2007-04-30  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_itunesdb (itdb_parse_internal): fixed compile warning
+	  (thanks to Daniele Forsi).
+
+	* tests/test-ls.c (display_recently_played): fixed compile warning
+	  (thanks to Daniele Forsi).
+
+	* tests/get-timezone.c: added to CVS (thanks to Daniele Forsi).
+
+	* src/itdb_playlist.c (compMostOftenPlayed, compLeastOftenPlayed):
+	  compaered time_added instead of playcount (thanks to Daniele
+	  Forsi).
+
+2007-04-28  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb.h: added padding to exported structures so new entries
+	  can be added without loosing backward run-time compatibility.
+
+	* docs/reference/tmpl/track.sgml
+	  src/itdb.h
+	  src/itdb_itunesdb.c
+	  src/itdb_track.c: Added the following fields to Itdb_Track:
+
+	  sort_artist
+	  sort_title
+	  sort_album
+	  sort_albumartist
+	  sort_composer
+	  sort_tvshow
+
+	  These fields can (theoretically) be used to force a certain sort
+	  order on the iPod when displaying by artist, album...
+
+	  Even though these fields are present in the iTunesDB, they are
+	  discarded when reading the iTunesDB and applications must always
+	  set them before writing the iTunesDB again. This is to avoid
+	  that the fields 'artist' and 'sort_artist' accidentially get out
+	  of sync.
+
+	  libgpod will automatically create a sort_artist key for you if
+	  artist is of the type 'The Artist' and sort_artist is not
+	  set. The sort key used in that case is 'Artist, The' (followed
+	  by five time 0x01), even though sort_artist itself will not be
+	  touched.
+
+2007-04-27  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+ 	* src/itdb.h
+ 	  src/itdb_itunesdb.c
+ 	  src/itdb_playlist.c
+ 	  src/itdb_private.h
+	  bindings/python/gpod.i.in
+	  bindings/python/gpod_doc.i.in
+	  docs/reference/libgpod-sections.txt
+	  docs/reference/tmpl/libgpod-unused.sgml
+	  docs/reference/tmpl/smart-playlists.sgml:
+
+	  Namespace cleanup. Applications supporting smart playlists will
+	  have to be adapted. The following changes were implemented to
+	  make sure all exported symbols start with ITDB or Itdb:
+ 
+ 	  structs:
+ 	      SPLPref -> Itdb_SPLPref
+ 	      SPLRules -> Itdb_SPLRules
+ 	      SPLRule -> Itdb_SPLRule
+ 	      SPL_* -> ITDB_SPL_*
+ 	  enums, #defines:
+ 	      LIMITTYPE_* -> ITDB_LIMITTYPE_*
+ 	      LIMITSORT_* -> ITDB_LIMITSORT_*
+ 	      SPLMATCH_* -> ITDB_SPLMATCH_*
+ 	      SPLACTION_* -> ITDB_SPLACTION_*
+ 	      SPLFIELD_* -> ITDB_SPLFIELD_*
+ 	      SPLDATE_IDENTIFIER -> ITDB_SPL_DATE_IDENTIFIER
+ 	      splft_* -> ITDB_SPLFT_*
+ 	      splat_* -> ITDB_SPLAT_*
+ 	      enum SPLAction -> ItdbSPLAction
+ 	      enum SPLActionType -> ItdbSPLActionType
+ 	      enum SPLField -> ItdbSPLField
+ 	      enum SPLFieldType -> ItdbSPLFieldType
+ 	      enum ItdbLimitType (new)
+ 	      enum ItdbLimitSort (new)
+ 	      enum ItdbSPLMatch (new)
+ 	      removed SPL_MAXSTRINGLENGTH (use ITDB_SPL_STRING_MAXLEN)
+
+
+	* docs/reference/tmpl/device.sgml
+	  docs/reference/tmpl/itunesdb-time.sgml
+	  docs/reference/tmpl/libgpod-unused.sgml
+	  docs/reference/tmpl/track.sgml
+	  src/db-artwork-parser.c
+	  src/db-artwork-writer.c
+	  src/db-itunes-parser.h
+	  src/itdb.h
+	  src/itdb_device.c
+	  src/itdb_device.h
+	  src/itdb_itunesdb.c
+	  src/itdb_private.h
+	  tests/Makefile.am:
+
+	  Christophe's patch for automatic correction of timestamps
+	  depending on which timezone the iPod is set to.
+
+	  ATTENTION DEVELOPERS: as a consequence all exported timestamps
+	  are no longer guint32 mac-type timestamps but standard time_t
+	  timestamps. This also includes the 64 bit timestamps in smart
+	  playlists. The following functions are therefore no longer
+	  needed and are deprecated:
+
+	  itdb_time_mac_to_host(), itdb_time_host_to_mac(): simply return
+	  the argument without changing it. Argument and return value are
+	  now both of type 'time_t'.
+
+	  itunesdb_time_get_mac_time(): returns the seconds passed since
+	  Epoch in seconds and is equivalent to time(NULL).
+
+	  These functions may be removed in a future version of
+	  libgpod. Programs linking to libgpod may need to be changed
+	  slightly if they made any assumptions on the type of timestamps
+	  used. This should be obvious through compile-time warnings.
+
+	  tests/test-ls.c: print a list of recently played tracks.
+
+
+2007-04-15  Todd Zullinger <tmzullinger at users.sourceforge.net>
+
+	* bindings/python/ipod.py: use the mac-style path for
+	  filename_ipod in the extended info file, like gtkpod does
+
+2007-04-14  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.c: add itdb_device_supports_artwork and
+	idb_device_supports_photo functions
+	* docs/reference/tmpl/device.sgml: update api doc
+	* src/itdb_itunesdb.c: don't try to write artwork database if the iPod
+	model doesn't support artwork.
+
+2007-04-08  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb.h: changed 'gchar *chapterdata' to 'gpointer
+	  chapterdata' with note that chapterdata is not yet supported.
+
+	* src/itdb_track.c (itdb_track_duplicate): arrange the strings in
+	  the same order as in Itdb_Track for easier error-checking.
+
+2007-03-26  Nicholas Piper  <nicholas at users.sourceforge.net>
+
+	* bindings/python/Makefile.am
+	  bindings/python/tests/Makefile.am
+	  bindings/python/tests/tests.py: Causes tests to run with the
+	  libraries from the build tree rather than currently installed
+	  version (Todd Zullinger)
+
+2007-03-26  Nicholas Piper  <nicholas at users.sourceforge.net>
+
+	* bindings/python/gpod.i.in: Add basic PhotoDB reading facility
+
+2007-03-25  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_itunesdb.c: streamline MHOD52 patch (remove mk_mhod52()
+	  and let mk_mhod() handle the sorting of mhod52 directly).
+
+2007-03-23  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_itunesdb.c: Write out MHOD52 hunks after master
+	  playlist. This speeds up the iPod interface when browsing titles
+	  or albums etc. because the iPod won't have to sort through the
+	  track list.
+
+2007-03-22  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_itunesdb.c (write_playlist): corrected what is written
+	  into the mhyp header according to the iTunesDB wiki (mhod count /
+	  libmhod count)
+
+2007-03-21  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_artwork.c (itdb_artwork_remove_thumbnail): memory used
+	  by thumbnail to be removed will be freed now. ATTENTION: this
+	  changes the previous API description that stated that the
+	  thumbnail will not be freed. This behaviour was inconsistent
+	  with all other _remove functions in libgpod and caused a memory
+	  hole.
+
+	* src/itdb_itunesdb.c (itdb_cp_track_to_ipod): cast filename
+	  extension to lowercase because some people reported new iPod
+	  models choking on filenames with uppercase extensions like
+	  test.MP3. Not sure if it helps, though.
+
+	* src/itdb.h
+	  src/itdb_artwork.c
+	  src/itdb_photoalbum.c
+	  src/itdb_track.c
+	  src/ithumb-writer.c:
+	  Added new API functions: itdb_photodb_add_photo_from_pixbuf
+	  function(), itdb_track_set_thumbnails_from_pixbuf() and
+	  itdb_artwork_add_thumbnail_from_pixbuf(). Thanks to Christophe
+	  Fergeau.
+
+	* docs/reference/libgpod-sections.txt: added descriptions by
+	  Christophe Fergeau.
+	
+2007-03-02  Todd Zullinger <tmzullinger at users.sourceforge.net>
+
+	* bindings/Makefile.am: only descend into the python subdir if
+	  HAVE_PYTHON is set, this avoids some problems with the
+	  Makefiles created by automake 1.7
+
+2007-02-27  Todd Zullinger <tmzullinger at users.sourceforge.net>
+
+	* INSTALL_CVS
+	  docs/reference/Makefile.am: build docs when creating
+	  tarballs
+
+	* docs/reference/libgpod-sections.txt: include missing and
+	  newly added declarations, remove unused declarations
+
+	* configure.ac
+	  m4/python.m4: allow the use of nicer version strings in
+	  AM_CHECK_PYMOD
+
+2007-02-25  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb.h
+	  src/itdb_itunesdb.c
+	  src/itdb_playlist.c: introduced splft_binary_and as separate
+	  field type as this will simplify handling in applications.
+
+	* src/itdb_itunesdb.c (get_mhod, mk_mhod): replaced
+          if()... with a switch()... to catch changes made to
+          SPLFieldType more easily.
+
+	* src/itdb.h: introduced Itdb_Mediatype enum.
+
+2007-02-24  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/db-itunes-parser.h
+	  src/artwork-writer.c: Set unknown2 of mhfd header to 2 instead
+	  of 1, otherwise iTunes7 wipes the ArtworkDB.
+
+	* src/itdb.h
+	  src/itdb_itunesdb.c
+	  src/itdb_playlist.c:
+	  Updated smart playlist handling to recognize album artist, tv
+	  show, last skipped, season number, skipcount and video kind
+	  fields.
+
+	* src/itdb_itunesdb.c (get_mhod): don't skip unknown action types
+	  in smart rules to avoid writing illegal smart playlist rules
+	  corrupting the iTunesDB in the process.
+	
+2007-02-09  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* ChangeLog
+	  INSTALL_CVS
+	  configure.ac
+	  bindings/python/gtkpod.py
+	  bindings/python/ipod.py
+	  bindings/python/examples/add_song.py
+	  bindings/python/examples/create_mp3_tags_from_itdb.py:
+
+	  updates and fixes from Nicholas Piper.
+
+2007-02-11  Nicholas Piper  <nick-gtkpod at nickpiper.co.uk>
+
+	* bindings/python: Corrections to text encoding in the extended
+	  database and switch to python-mutagen from python-eyeD3 Thanks
+	  to Stalwart for his help clearing up handling broken filenames.
+
+2007-02-09  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/ithumb-writer.c: reduced maximum size for ithmb files from
+	  500 MB to 256 MB after reports of slow iPod interface behavior.
+
+2007-01-18  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+        * src/itdb.h
+	  src/itdb_itunesdb.c (itdb_cp_track_to_ipod): changed declaration
+	  of 'filename' from "gchar *" to "const gchar *".
+
+2007-01-16  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+        * po/fr.po: updated French catalog -- thanks to Éric Lassauge
+
+2007-01-15  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* configure.ac: bumped version to 0.4.3-CVS for further development
+
+	* configure.ac: bumped version to 0.4.2 for release
+
+	* po/sv.po: updated Swedish catalog -- thanks to Stefan Asserhall
+
+	* po/ja.po: updated Japanese catalog -- thanks to Kentaro Fukuchi
+
+	* po/de.po: updated German catalog
+
+	* .cvsignore
+	  po/.cvsignore
+	  tests/.cvsignore: updated with additional files to ignore.
+
+	* bindings/.cvsignore:
+	  bindings/python/.cvsignore
+	  bindings/python/examples/.cvsignore
+	  bindings/python/docs/.cvsignore
+	  docs/.cvsignore
+	  docs/reference/.cvsignore
+	  m4/.cvsignore: created new ignore files
+
+	* tests/test-photos.c: change "error" to "warning" in warning
+	  message.
+
+	* INSTALL_CVS:
+	  TROUBLESHOOTING: short note about the python packages required to
+	  build the python bindings.
+
+	* Makefile.am: added TROUBLESHOOTING to EXTRA_DIST
+
+2007-01-15  Todd Zullinger <tmzullinger at users.sourceforge.net>
+
+	* Makefile.am
+	  bindings/python/Makefile.am
+	  bindings/python/__init__.py
+	  bindings/python/gpod.i.in
+	  bindings/python/gpod_doc.i.in
+	  bindings/python/gtkdoc-to-swig.xsl
+	  bindings/python/gtkpod.py
+	  bindings/python/ipod.py: add builtin documentation to the python
+	  bindings using the gtk-docs for all of the wrapped libgpod
+	  functions (with much help from Nicolas Piper)
+
+	* bindings/python/gtkpod.py: fix encoding issue in
+	  write_pair() (Nicolas Piper)
+	  handle gtkpod extended info files with either md5_hash or
+	  sha1_hash fields (Nicolas Piper)
+
+	* bindings/python/ipod.py: ensure the db object doesn't get
+	  garbage collected at the wrong time (Nicolas Piper)
+
+2007-01-14  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* tests/test-photos.c:
+	  src/itdb_photoalbum.c: fixed two typos in message strings.
+
+	* po/es.po: updated Spanish catalog -- thanks to Alejandro Lamas
+	  Daviña
+
+	* po/*.po: run 'make update-po'
+
+	* src/itdb_itunesdb.c: added instructions on how to add new string
+	  fields like 'tvepisode', 'tvshow' without forgetting half of the
+	  places that need to be touched.
+
+2007-01-13  Todd Zullinger <tmzullinger at users.sourceforge.net>
+
+	* bindings/python/Makefile.am: don't include any swig built
+	  files in the tarballs.
+	  s/SWIG_SOURCES/SWIG_INTERFACES/ to avoid a warning from
+	  automake about unused sources.
+
+	* src/itdb_itunesdb.c: add a few more MHOD types that Jorg
+	  suggested
+
+        * src/itdb_track.c: add more tv show fixes from Mario Rossi.
+	  add missing albumartist and keywords pointed out by Jorg.
+
+2007-01-12  Todd Zullinger <tmzullinger at users.sourceforge.net>
+
+	* src/itdb_itunesdb.c: TV shows patch from Mario Rossi
+
+	* bindings/python/Makefile.am: fix more make distcheck issues
+
+2007-01-11  Todd Zullinger <tmzullinger at users.sourceforge.net>
+
+	* README
+	  docs/reference/libgpod-docs.xml
+	  docs/reference/libgpod-sections.txt
+	  docs/reference/tmpl/artwork.sgml
+	  docs/reference/tmpl/device.sgml
+	  docs/reference/tmpl/itunesdb-db.sgml
+	  docs/reference/tmpl/itunesdb-lowlevel.sgml
+	  docs/reference/tmpl/photodb.sgml
+	  docs/reference/tmpl/track.sgml
+	  src/itdb.h
+	  src/itdb_photoalbum.c: Add PhotoDB functions to the docs.
+	  Incorporate usage overviews from README into the docs.
+	  Fix a few doc comments to allow gtk-doc to parse them.
+
+2007-01-10  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* bindings/python/Makefile.am: correct 'make dist' failure (patch
+	  by Todd Zullinger)
+
+	* docs/reference/libgpod-docs.xml
+          docs/reference/libgpod-sections.txt
+          docs/reference/tmpl/Internal.sgml
+          docs/reference/tmpl/artwork.sgml
+          docs/reference/tmpl/device.sgml
+          docs/reference/tmpl/itunesdb-copying.sgml
+          docs/reference/tmpl/itunesdb-db.sgml
+          docs/reference/tmpl/itunesdb-lowlevel.sgml
+          docs/reference/tmpl/itunesdb-time.sgml
+          docs/reference/tmpl/playlists.sgml
+          docs/reference/tmpl/smart-playlists.sgml
+          docs/reference/tmpl/track.sgml
+          src/itdb.h
+          src/itdb_device.c
+          src/itdb_itunesdb.c
+          src/itdb_photoalbum.c: applied Todd Zullinger's patch fixing
+	  warnings when building the documentation.
+
+2007-01-09  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/pixmaps.c
+	  src/pixmaps.h: New files containing last-resort pixmap in case
+	  thumbnail/photo could not be added. Will not produce code
+	  if the gdk-pixubf library is not present.
+
+	* src/ithumb-writer.c: use above pixmap instead of red canvas.
+
+	* src/Makefile.am: added pixmaps.[ch]
+
+	* src/itdb.h
+	  src/itdb_itunesdb.c: added tvshow, tvepisode, tvnetwork,
+	  albumartist, keywords, reseved to Itdb_Track. 'reserved' can
+	  later be used to support 'Artist, The'.
+
+2007-01-08  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* README: updated information about photo support
+
+	* po/fr.po: updated French catalog (thanks to Eric Lassauge)
+
+	* src/itdb.h: added 2 pointers for future extension to
+	  Itdb_Playlist (MHOD100).
+
+2007-01-06  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* tests/Makefile.am: cleanup
+
+	* src/itdb.h
+	  src/itdb_itunesdb.c: renamed unk156 to skipcount and unk160 to
+	  last_skipped.
+	  Added unk244, gapless_data, unk252, gapless_track_flag,
+	  gapless_album_flag, recent_skipcount.
+	  Added handling of skipcount and last_skipped to playount file
+	  handling.
+
+	* src/itdb_private.h: added skipcount and last_skipped to struct
+	  playcount.
+
+2007-01-04  Todd Zullinger <tmzullinger at users.sourceforge.net>
+
+	* configure.ac
+	  gnome-autogen.sh
+	  bindings/python/Makefile.am
+	  docs/reference/libgpod-overrides.txt
+	  docs/reference/Makefile.am: fix make distcheck, minor automake
+	  cleanups.
+
+	* bindings/python/gpod.i
+	  bindings/python/gpod.i.in: rename gpod.i -> gpod.i.in.  it is now
+	  generated by autoconf.
+
+2006-11-26  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/ithumb-writer.c (ithumb_writer_write_thumbnail): handle
+	  corrupted image data in a way that does not crash libgpod nor
+	  causes the ArtworkDB or PhotoDB to be corrupted. Currently a
+	  completely red pixmap is created as a substitute. Somewhat more
+	  artistic than I am may want to create a "corrupted image data"
+	  pixmap we can imbed into the code.
+
+	* src/itdb_artwork.c (itdb_thumb_get_gdk_pixbuf): fix failed
+	  assertion when image data is illegal.
+
+2006-11-24  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb.h
+	  src/itdb_photoalbum.c (itdb_photodb_add_photo,
+	  itdb_photodb_add_photo_from_data,
+	  itdb_photodb_photoalbum_add_photo): add 'position' where photo
+	  should be inserted.
+
+	* tests/test-photos.c: implemented new API (append at the end).
+
+	* src/itdb.h
+	  src/itdb_itunesdb.c: removed mhodcount and libmhodcount from
+	  Itdb_Playlist as these are only used internally and reset during
+	  syncing.
+
+2006-11-23  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* When adding photos to the iPod the user may or may not want to
+	  rotate the picture shown on the iPod screen, for example
+	  deending on EXIF rotation value. This can now be achieved by
+	  passing a new parameter 'rotation' to itdb_photodb_add_photo()
+	  or itdb_photodb_add_photo_from_data(). (Valid values: 0, 90, 180,
+	  270, rotation is counter-clockwise). These two functions now
+	  also accept a GError pointer. As a consequence Itdb_Thumb had to
+	  be extended with a field for the rotation value and
+	  itdb_artwork_add_thumbnail have been extended to accept
+	  @rotation and @error as well.
+
+	  The actual rotation is carried out in
+	  ithumb-writer.c/ithumb_writer_write_thumbnail() using
+	  gdk_pixbuf_rotate_simple() and require gdk-pixbuf V2.6 or
+	  higher.
+
+	  In contrast, itdb_track_set_thumbnails() and
+	  itdb_track_set_thumbnails_from_data have been left unchanged,
+	  even though they could be extended to accept @rotation and
+	  @error easily. Please let me know if this is wanted.
+
+	* configure.ac
+	  src/itdb.h
+	  src/itdb_artwork.c
+	  src/itdb_photoalbum.c
+	  src/itdb_track.c
+	  src/ithumb-writer.c: implemented changes outlined above.
+
+	* tests/test-photos.c: added @rotation and @error to the
+	  itdb_photodb_add_photo() call.
+
+2006-11-12  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* ithumb-writer.c (itdb_write_ithumb_files):
+	  ITDB_THUMB_PHOTO_TV_SCREEN type thumbnails were not "rearranged"
+	  (i.e. deleted photos were not removed).
+
+	  (ipod_image_get_ithmb_filename, ithmb_writer_write_thumbnail):
+	  changed "F%u04_%d.ithmb" to "F%d_%d.ithmb" as this format string
+	  is used by the iPod.
+
+	  NEW: start new thumbnail file F%d_2/3/4... if the size of the
+	  current thumbnail file is larger than ITHUMB_MAX_SIZE (currently
+	  500 MB). Existing thumbnail files with a length larger than this
+	  will NOT be truncated. Patches are welcome (probably add code at
+	  the end of ithumb_rearrange_thumbnail_file()) :-) 
+
+	* itdb_artwork.c: added support for UYVY format for iPod Video and
+	  iPod Photo TV output. Code adapted from the GPixPod project.
+
+	  (itdb_thumb_get_byteorder): return the byte order for the
+	  current thumbnail (internal function).
+
+	* itdb_device.[hc]: added thumbnail storage format to the
+	  Itdb_ArtworkFormat image information. Currently the following
+	  are defined:
+	    THUMB_FORMAT_UYVY
+	    THUMB_FORMAT_RGB565_LE
+	    THUMB_FORMAT_RGB565_BE
+	    THUMB_FORMAT_RGB565_BE_90
+	    THUMB_FORMAT_RGB565_LE_90
+	  THUMB_FORMAT_RGB565_LE_90 does not appear to be used by any iPod
+	  model. THUMB_FORMAT_RGB565_BE_90 is used for full screen iPod
+	  Photo photos but currently is handeled the same as
+	  THUMB_FORMAT_RGB565_BE pending input from iPod Photo users.
+
+	* ithumb-writer.c: added support for UYVY format for iPod Video and
+	  iPod Photo TV output. Code adapted from the GPixPod project.
+
+2006-11-11  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* itdb.h: Itdb_Artwork:
+	  - added unk028, unk036 and rating
+	  - added digitized_data timestamp
+	  - changed creation_date from gint32 to guint32
+
+	* db-itunes-parser.h:
+	  db-artwork-debug.c: MhiiHeader:
+	  - renamed unknown5 to rating
+	  - renamed digitised_date to digitized_date for conformity
+
+	* db-artwork-writer.c (write_mhli): sanity check to avoid access
+	  of NULL pointer.
+	  (write_mhii): write unk028, rating, unk036, digitized_data
+
+	* db-artwork_parser.c (parse_mhii):
+	  - parse unk028, rating, unk036, digitized data.
+	  - unified reading of DB_TYPE_PHOTO and DB_TYPE_ITUNES, got rid
+	    of parse_mhod() and parse_mhni().
+
+
+	
+2006-11-08  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* itdb.h:
+	  itdb_itunesdb.c:
+	  itdb_track.c:
+	  renamed some formerly unknown Itdb_Track entries and added
+	  comments:
+	   - unk184->pregap
+	   - samplecount: guint32 -> guint64.
+	   - unk192->(removed)
+	   - unk200->postgap
+	   - unk208->mediatype
+	   - unk212->season_nr
+	   - unk216->episode_nr
+
+2006-10-29  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+        * src/itdb_photoalbum.c: fixed typo (Libarary -> Library).
+
+	* configure.ac, src/Makefile.am: new soname versioning
+	  scheme. Thanks to Todd Zullinger and Frank Lichtenheld.
+
+2006-10-29  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	Major rework of picture support.
+	
+	* src/db-artwork-parser.c, src/db-artwork-writer.c, src/itdb.h,
+	  src/db-itunes-parser.h: renamed 'master' to 'album_type' in
+	  MhbaHeader and Itdb_PhotoAlbum.
+
+	* src/db-artwork-parser.c, src/db-artwork-writer.c,
+	  src/itdb_photoalbum.c: Itdb_Photoalbum->members are now pointers
+	  to the corresponding Itdb_Artwork instead of image_ids.
+
+	* src/itdb_photoalbum.c: album_ids and image_ids are set just
+	  before writing the PhotoDB in itdb_photodb_write().
+
+	* src/itdb_photoalbum.c: new interface, basically use as follows:
+
+	  itdb_photodb_parse():
+	    Read an existing PhotoDB.
+
+          itdb_photodb_create():
+            Create a new Itdb_PhotoDB structure. The Photo Library Album is
+	    (first album) is created automatically.
+
+          itdb_photodb_add_photo(), itdb_photodb_add_photo_from_data():
+	    Add a photo to the PhotoDB (from file or from a chunk of
+	    memory). It is automatically added to the Photo Library Album
+	    (first album), which is created if it does not exist already.
+
+	  itdb_photodb_photoalbum_craete():
+	    Create and add a new photoalbum.
+
+	  itdb_photodb_photoalbum_add_photo():
+	    Add a photo (Itdb_Artwork) to an existing photoalbum.
+
+	  itdb_photodb_photoalbum_remove():
+	    Remove an existing photoalbum. Pictures can be kept in the
+	    Photo Library or automatically removed as well.
+
+	  itdb_photodb_remove_photo():
+	    Remove a photo either from a photoalbum or completely from the
+	    database.
+
+	  itdb_photodb_write():
+	    Write out your PhotoDB.
+
+	  itdb_photodb_free():
+	    Free all memory taken by the PhotoDB.
+
+	  itdb_photodb_photoalbum_by_name():
+	    Find the first photoalbum with a given name.
+
+        * src/itdb_playlist.c (itdb_playlist_add, itdb_playlist_add_track):
+	  src/itdb_track.c (itdb_track_add): simplify code by using
+	  g_list_insert().
+
+	* tests/test-photos.c: change to new interface, add new commands
+	  'list' to list photo IDs in the database, 'remove' to remove IDs
+	  from an album or the iPod, or remove entire photoalbums from the
+	  iPod.
+
+	* src/db-itunes-parser.h: added comments to _MhbaHeader definition.
+
+	Added additional functionality for photo albums
+
+	* src/db-artwork-parser.c
+	  src/db-artwork-writer.c
+	  src/db-itunes-parser.c:
+	  src/itdb.h: added additional fields to MhbaHeader and
+	  Itdb_PhotoAlbum (playmusic, repeat, random, show_titles,
+	  transition_direction, slide duration, transition_duration,
+	  unk024, unk028, unk044, unk048, song_id. These fields are read
+	  and written from the PhotoDB now. Also corrected error for
+	  "album type" which was read and written as int32 even though it
+	  was a int8. Removed num_images from Itdb_PhotoAlbum -- instead
+	  count images at time of writing.
+	
+2006-10-02  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* tests/Makefile.am
+	  tests/test-init-ipod.c: fix compilation error when building with
+	  --disable-gdk-pixbuf. Thanks to David Philippi and Christophe
+	  Fergeau.
+
+2006-09-26  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* po/sv.po: updated version by Stefan Asserhall
+
+2006-09-24  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* po/es.po: updated version by Alejandro Lamas Daviña
+
+	* configure.ac: bumped to 0.4.0 for release
+
+	* configure.ac: bumped to 0.4.1 as new CVS version
+
+2006-09-23  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb.h: explain 'checked' field in Itdb_Track declaration
+
+	* src/itdb_playlist.c (itdb_spl_update): in SPLs with 'match
+	  checked tracks only" set, all unchecked tracks were matched.
+
+2006-09-21  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_itunesdb.c: time_added and time_modified where
+	  interchanged.
+
+	* src/itdb_device.c: changed number of directories for 6G 8GB iPod
+	  Nano to 14 after user report.
+
+	* src/ithumb-writer.c: removed re-using of thumbnail data in order
+	  to avoid incompatibility with iTunes (even though our way was
+	  more efficient...)
+	
+2006-09-18  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb.h
+	  src/itdb_artwork.c: added itdb_artwork_add_thumbnail_from_data().
+
+	* src/itdb.h
+	  src/itdb_track.c: added itdb_track_set_thumbnails_from_data().
+
+	* src/itdb.h
+	  src/itdb_photoalbum.c: added itdb_photodb_add_photo_from_data().
+
+	* src/itdb_artwork.c (itdb_thumb_get_gdk_pixbuf): added support to
+	  retreive thumbnail from raw data instead of file.
+
+	* src/ithumb-writer.c (ithumb_writer_write_thumbnail): added
+	  support to write thumbnail from raw data instead of file.
+
+2006-09-17  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb.h
+	  src/itdb_device.c: added definitions for new sixth generation
+	  iPod Videos, iPod Nanos and iPod Shuffle.
+
+2006-08-21  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* tests/test-ls.c: added option to list contents of local
+	  repository and specified playlist. Thanks to Richard Hyde for
+	  the patch.
+
+2006-08-18  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/db-artwork-writer.c (ipod_buffer_grow_file): printf(3) type
+	  warnings caused compile error with FreeBSD 6.0-stable/GCC
+	  3.4.4. Thanks to Mike Heffner for the patch.
+
+2006-07-08  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_itunesdb.c (itdb_write): don't crash if error ==
+          NULL (SF tracker bugs item #1519048)
+
+2006-07-02  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_itunesdb.c (itdb_init_ipod): only write iTunesSD
+	  (shuffle database) when initializing shuffle. Thanks to
+	  James Joyce for the patch.
+
+2006-06-28  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_itunesdb.c (wcontents_write): added g_strerror in error
+	  messages.
+
+2006-06-27  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_device.c: fixed endianness autodetection for big endian
+	  mobile phones. Thanks to Rached Ben Mustapha for the patch.
+
+2006-06-24  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_itunesdb.c
+	  src/itdb.h:
+	  Added itdb_get_itunessd_path ().
+	  itdb_init_ipod() will no longer overwrite existing iTunesDB and
+	  iTunesSD.
+
+2006-06-10  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_device.c (itdb_device_get_ipod_info): compare more than
+	  4 characters of iPod model if the stored model number is more
+	  than 4 characters long.
+
+2006-06-07  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb.h
+	  src/itdb_device.c:
+	  Added itdb_device_write_sysinfo() and itdb_device_set_sysinfo().
+
+	* src/itdb_itunesdb.c (itdb_create_directories):
+	  Use functions introduced above.
+
+	  (itdb_write): Write SynsInfo file when writing the iTunesDB if
+	  SysInfo hash has been changed by application.
+
+	* src/itdb_device.[ch]: mark sysinfo hash as changed/unchanged.
+
+	* src/itdb_photoalbum.c (itdb_photodb_write): Write SynsInfo file
+	  when writing the iTunesDB if SysInfo hash has been changed by
+	  application.
+
+
+2006-06-05  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+        * src/db-artwork-parser.h
+	  src/db-artwork-parserc (ipod_supports_cover_art): made
+	  available G_GNUC_INTERNAL.
+	  Added ipod_supports_photos().
+
+	* src/itdb_itunesdb.c (itdb_create_directories):
+	  Create Photos directory.
+
+	* src/itdb.h
+	  src/itdb_device.c
+	  Rename itdb_info_get_ipod_model_name() ->
+	         itdb_info_get_ipod_model_name_string()
+		 itdb_info_get_ipod_generation_name() ->
+		 itdb_info_get_ipod_generation_string()
+
+        * src/itdb_itunesdb.c (itdb_create_directories): add space after
+	  ":" when writing SysInfo file, only write SysInfo file if
+	  model_number was given, write original model number, not
+	  abbreviated model number from info->model_number.
+
+2006-06-04  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/db-image-parser.c
+	  src/itdb_artwork.c
+	  src/itdb_device.c
+	  src/itdb_photoalbum.c
+	  src/itdb_track.c
+	  src/ithumb-writer.c: Phased out private
+	  IPOD_COVER_SMALL... enum in favor of identical public enum
+	  "ItdbThumbType" ITDB_THUMB_COVER_SMALL...
+
+	* src/db-image-parser.c (ipod_image_new_from_mhni):
+	  Accept all thumbnail types we know about (i.e. type != -1).
+
+	* src/db-artwork-debug.h
+	  src/db-artwork-parser.h
+	  src/db-image-parser.h
+	  src/db-parse-context.h
+	  src/glib-compat.h
+	  src/itdb_endianness.h: Added CVS "$Id:" line, added copyright
+	  notices where missing, added explanations to itdb_endianess.h
+	  ;-)
+
+	* src/itdb_itunesdb.c
+	  src/itdb_track.c
+	  src/itdb_device.c
+	  src/itdb_device.h
+	  Made naming consistent and suitable for export:
+	    Itdb_IpodModel -> Itdb_IpodInfo
+	    ipod_model_table -> ipod_info_table
+	    itdb_device_get_model_info() -> itdb_device_get_ipod_info()
+	    MODEL_TYPE_... -> ITDB_IPOD_MODEL_...
+	    nth_GENERATION -> ITDB_IPOD_GENERATION_nth
+
+	  Exported Itdb_IpodModel, Itdb_IpodGeneration, Itdb_IpodInfo,
+	  itdb_device_get_ipod_info().
+
+	* src/itdb_device.c: new API:
+	  itdb_info_get_ipod_info_table(),
+	  itdb_info_get_ipod_model_name()
+
+	* src/itdb.h
+	  src/itdb_artwork.c:
+	  Removed unused field ->type in Itdb_Artwork and corresponding
+	  enum ItdbArtworkType.
+
+2006-06-03  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_artwork.c (itdb_thumb_get_gdk_pixbuf): handle thumbnail
+	  padding correctly -- who would have thought that iTunes
+	  indicates _negative_ padding at times... Please use the
+	  test-photos program to check out whether or not your photos show
+	  up correctly without black bars or funny colors.
+
+        * src/db-artwork-writer.c
+	  src/db-image-parser.c
+	  src/itdb.h
+	  src/ithumb-writer.c: Hopefully do padding right:
+
+	   - read padding fields from mhni header and store them with
+	     each thumbnail 
+	   - calculate padding for PhotoDB only (padding for iTunesDB
+	     Artwork does not seem to be necessary)
+	   - include the padding into the total width/height
+
+	   It seems to work well on my iPod Nano -- feedback appreciated.
+
+	* tests/test-photos.c: added possibility to dump all photos into
+	  a directory:
+
+	  tests/test-photos dump <mountpoint> <output_dir>
+
+	* src/itdb_artwork.c: changed byte order for full screen iPod
+	  Nanos. 
+
+2006-06-01  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/db-artwork-writer.c (write_mhni): fix segfault caused by
+	  wrong access of enum inside Itdb_DB
+
+	* src/itdb.h:
+	  src/itdb_private.h:
+	  moved Itdb_DB to private part.
+
+	* src/itdb.h:
+	  src/itdb_private.h:
+	  src/itdb_itunesdb:
+	  New: db_get_itunesdb(), db_get_photodb()
+
+	* src/db-artwork-parser.c
+	  src/db-artwork-writer.c
+	  src/db-image-parser.c
+	  src/db-image-parser.h
+	  src/db-parse-context.c
+	  src/db-parse-context.h
+	  src/itdb_endianness.h
+	  src/itdb_itunesdb.c
+	  src/ithumb-writer.c:
+	  Remove all direct access to Itdb_DB->db. enum
+
+2006-05-31  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* configure.ac:
+	  m4/python: check for eyeD3 (Todd Zullinger)
+
+2006-05-30  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_itunesdb.c (itdb_create_directories): applied
+	  Christophe's cleanup-patch, 'normalized' indenting. Function
+	  made 'static'.
+
+	* src/itdb_itunesdb.c (itdb_init_ipod): fixed segfault.
+
+	* m4/python: default configure option --with_python to 'yes'
+	  (Nicholas Piper)
+
+	***** merged photo-support branch back to MAIN. branch is tagged
+	      photo-support-merged_00
+
+2006-05-29  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+        * tests/test-photos.c: removed unneeded #include.
+
+	* configure.ac: print configuration summary -- thanks to Todd
+	  Zullinger
+
+	* itdb.h:
+	  itdb_itunesdb.c:
+	  added itdb_init_ipod() -- thanks to P.G. Richardson.
+
+	* src/itdb_itunesdb.c (itdb_write_file): only write artwork if
+	  supported by the iPod -- thanks to P.G. Richardson.
+
+	* src/itdb_itunesdb.c:
+	  src/itdb_photoalbum.c:
+	  src/itdb_playlist.c:
+	
+	  fixed some comments so the doc subsystem won't complain.
+
+	* tests/Makefile.am:
+	  tests/test-init-ipod.c
+
+	  added new test for itdb_init_ipod(). The test also demonstrates
+	  how to 'autodetect' the iPod model number.
+
+	* src/itdb_photoalbum.c:
+	  src/ithumb-writer.c:
+	  src/itdb_artwork.c:
+	  src/itdb.h:
+	  src/db-itunes-parser.h:
+	  src/db-artwork-writer.c:
+	  src/db-artwork-parser.c:
+	  src/db-artwork-debug.c:
+
+	  Patch by Michael McLellan:
+	  
+	  Doesn't automatically make the first photoalbum the
+	  'master'. However, if a master already exists it will remain the
+	  master.
+
+	  Sets the creation date of a new image to the modification time
+	  of the image file.
+
+	  Centers new images.
+
+	  Introduces itdb_photodb_remove_photo().
+
+	
+2006-05-29  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb.h:
+	  src/itunesdb.c: (Itdb_Track)
+	      flag2 -> skip_when_shuffling
+	      flag3 -> remember_playback_position
+
+	* src/itunesdb.c: playlist flags 1,2,3 were not read correctly.
+
+2006-05-28  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/db-parse-context.c (db_parse_context_new_from_file):
+	  Detect endianess if not already set.
+
+	* src/itdb_device.c (itdb_device_autodetect_endianess): try
+	  reading the first for bytes of iTunesDB, ArtworkDB or Photos
+	  Database in order to reliably detect the endianess of the
+	  connected iPod.
+
+	* src/itdb_photoalbum.c: (itdb_photodb_parse): will fail again if
+	  no photos dir is available.
+
+	* tests/test-photos.c: takes into consideration the possibility
+	  that an iPod does not have a Photos Database and creates a new
+	  one in that case. (I think it's safer that way -- the
+	  application is forced to 'think' about the fact that no database
+	  is available and either warn the user or create one. If
+	  itdb_photodb_parse() simply returns an empty database in case
+	  none could be found, the application might not become aware of
+	  the fact.)
+
+	* renamed itdb_get_mountpoint_photo to
+	  itdb_photodb_get_mountpoint.
+
+	* tests/test-photos.c: added g_error_free()
+
+	* src/itdb_device.c
+	  src/itdb_device.h: added number of musicdirs (Fnn dirs) to the
+	  model descriptions. The exact number seems to be version
+	  dependent. Therefore, the numbers here represent a mixture of
+	  reported values and common sense.
+
+2006-05-27  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_photoalbum.c: itdb_photodb_parse() would fail if no
+	  photos dir is available. Quick fix for now (I mean, why
+	  SHOULDN'T it fail if no photos dir is available??).
+
+2006-05-26  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb.h:
+	  src/itdb_photoalbum.c:
+	  src/itdb_artwork.c:
+	  Added userdata/usertype fields to Itdb_PhotoDB, Itdb_PhotoAlbum,
+	  Itdb_Artwork.
+
+2006-05-25  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+        * Slight cleanup, make PhotoDB API more consistent with iTunesDB
+	  API:
+
+	* src/db-artwork-parser.h: declared ipod_write_photo_db() as
+	  G_GNUC_INTERNAL
+
+	* src/db-artwork-writer.c (ipod_write_photo_db for non-gdk):
+	  Itdb_iTunesDB -> Itdb_PhotoDB
+
+	* src/itdb.h:
+	  Itdb_ItunesDB: removed photoalbums and photos.
+	  renamed:
+	  	 itdb_parse_photo -> itdb_photodb_parse
+		 itdb_add_photo_to_photoalbum -> itdb_photodb_add_photo
+		 itdb_create_new_photoalbum -> itdb_photodb_photoalbum_new
+		 itdb_free_photodb -> itdb_photodb_free
+		 itdb_write_photo_db -> itdb_photodb_write
+	  new:   itdb_photodb_new()
+
+	* src/itdb_itunesdb.c (itdb_parse_photo, itdb_get_photos_dir,
+	  itdb_get_photodb_path, itdb_get_photos_thumb_dir): moved to
+	  itdb_photoalbum.c
+
+	* src/itdb_photoalbum.c:
+	  new:   error_no_photos_dir, itdb_photodb_new, itdb_photodb_write
+	  moved: itdb_get_photos_dir, itdb_get_photodb_path,
+	         itdb_get_photos_thumb_dir
+	  rewrote: 
+	         itdb_photodb_parse
+	  (itdb_photodb_free): free device struct as well.
+
+	* tests/test-photos.c: change to new API.
+
+	* src/itdb.h: applied Christophe's patch to fix compile time
+	  error.
+
+	* po/sv.po: updated Swedish translation (thanks to Stefan
+	  Asserhall)
+
+2006-05-20  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* po/POTFILES.in: updated file list -> updated .po files.
+
+2006-05-15  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/db-image-parser.c
+	* src/itdb_photoalbum.c
+	* src/ithumb-writer.c
+	  Michael McLellan patch for photo support on iPod Videos
+
+2006-05-11  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb.h
+	* src/itdb_itunesdb.c
+	* src/itdb_private.h
+	* src/db-artwork-parser.c
+	* src/db-artwork-parser.h
+	* src/db-itunes-parser.h
+	* src/db-artwork-writer.c
+	* src/itdb_photoalbum.c
+	  Make sure Photos and Photos/Thumbs directories are created. New:
+	  itdb_get_photodb_path().
+
+
+2006-05-06  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/db-artwork-parser.c:
+	* src/db-itunes-parser.h:
+	* src/db-artwork-writer.c:
+	* src/itdb_photoalbum.c:
+	* src/itdb.h:
+	* src/itdb_private.h:
+	* tests/test-photos.c:
+	  Applied Mikey's second patch for photo support. test-photos now
+	  comes with support for photo albums!
+
+2006-05-07  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* Created new branch "photo-support" for testing of photo
+	  support. Comes complete with a test program to add photos to
+	  your iPod. Works great for me -- thanks to Mikey!
+
+	  --- 2006-05-30: merged back to MAIN.
+
+2006-05-06  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+        * Applied Mikey's patch for photo support.
+
+	* src/itdb_photoalbum.c: new.
+
+	* tests/test-photo.c: test program to add photos to your iPod.
+
+	* Created branch for this patch: 'photo-support'.
+
+2006-05-05  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_itunesdb.c: avoid segfault if album field of podcasts
+	  is not set (NULL).
+
+2006-05-02  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_itunesdb.c: smart playlists: avoid assertion
+	  when writing rules with empty strings.
+
+2006-04-26  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+        * tests/Makefile.am: removed 'test-rebuild-db' from
+	  'noinst_PROGRAM' declaration (bug reported by Jens
+	  Taprogge). 'test-rebuild-db' is only added when the taglib is
+	  detected.
+
+2006-04-12  Christophe Fergeau  <teuf at gnome.org>
+
+	* tests/test-rebuild-db.cc: forgot to propagate a GError
+
+2006-04-10  Christophe Fergeau  <teuf at gnome.org>
+
+	* tests/test-ls.c: new test program reading and displaying the iPod 
+	content 
+	* tests/test-rebuild-db.cc: new test program which looks for mp3 files
+	on the iPod in the Music dir and rebuild an iPod database from that
+	(it uses taglib to parse the tags, so it's conditionnally built
+	depending on taglib's availability)
+	* configure.ac:
+	* tests/Makefile.am: build system changes to accomodate the 2 new test
+	programs
+	
+2006-04-10  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_device.h: removed dead code
+	* src/itdb_playlist.c: make spl_update2 static, kill spl_update
+
+2006-04-10  Christophe Fergeau  <teuf at gnome.org>
+
+	* docs/Makefile.am:
+	* docs/reference/Makefile.am:
+	* docs/reference/libgpod-docs.xml:
+	* docs/reference/libgpod-sections.txt:
+	* docs/reference/tmpl/Internal.sgml:
+	* docs/reference/tmpl/artwork.sgml:
+	* docs/reference/tmpl/device.sgml:
+	* docs/reference/tmpl/itunesdb-copying.sgml:
+	* docs/reference/tmpl/itunesdb-db.sgml:
+	* docs/reference/tmpl/itunesdb-lowlevel.sgml:
+	* docs/reference/tmpl/itunesdb-time.sgml:
+	* docs/reference/tmpl/libgpod-unused.sgml:
+	* docs/reference/tmpl/playlists.sgml:
+	* docs/reference/tmpl/smart-playlists.sgml:
+	* docs/reference/tmpl/track.sgml:
+	* docs/reference/version.xml.in: all the files below are new files
+	needed for gtk-doc support
+	* Makefile.am:
+	* configure.ac: add gtk-doc support to build system
+	* src/itdb_artwork.c:
+	* src/itdb_device.c:
+	* src/itdb_itunesdb.c:
+	* src/itdb_playlist.c:
+	* src/itdb_track.c: update inline comments in those files so that
+	gtk-doc can pick them up to build documentation
+	
+2006-04-08  Christophe Fergeau  <teuf at gnome.org>
+
+	* configure.ac: generate Makefile for bindings/python/examples
+
+2006-04-03  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* itdb.h: flag1 -> has_artwork
+
+	* itdb_track.c: (itdb_track_set_thumbnails,
+	  itdb_remove_thumbnails) set has_artwork flag correctly.
+
+2006-04-01  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* itdb.h: unk178 -> mark_unplayed
+
+	* itdb_itunesdb.c: reset the mark_unplayed flag when playcount is
+	  detected.
+
+2006-03-31  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+        * po/es.po: replaced with version from Alejandro Lamas who
+	  maintains the gtkpod translation as well.
+
+2006-03-29  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+        * itunesdb.c: set filetype identifier when transfering track to
+	  the iPod.
+
+2006-03-24  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	Alpha version of reversed-endian Artwork writing. Status: iTunesDB
+	can be written and is accepted on mobile phones, ArtworkDB can be
+	read and be written as well, but newly added artwork will not yet
+	display.
+
+	* itdb.h: adjusted a couple of field lengths (4 byte -> 2 byte or
+	  even 1 byte) to address endian issues.
+
+2006-03-18  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* itdb_itunesdb.c (mk_mhod): fixed bug when writing podcast urls.
+
+	* itdb_itunesdb.c (itdb_write_file): move endianess autodetection
+	  to a place before calling ipod_write_artwork_db().
+
+2006-03-17  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* itdb_device.[ch]: rewrote ipod-device.c, removed all hal-code,
+	  removed all code irrelevant to writing the iTunesDB and
+	  ArtworkDB.
+
+	* autodetect iControl directory now also works for ArtworkDB.
+
+	* db-artwork-parser.c (ipod_db_get_artwork_db_path): create
+	  Artwork directory if not already present.
+
+	* itdb.h: Itdb_iTunesDB: moved mountpoint and musicdirs into
+	  private Itdb_Device. Use itdb_set_mountpoint() and
+	  itdb_get_mountpoint() to access the mountpoint.
+
+	* simplified some code by using itdb_get_path() instead of
+	  itdb_resolve_path().
+
+	* itdb_itunesdb.c (itdb_get_path): fixed bug.
+
+2006-03-12  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+        * itdb.h, itdb_itunesdb.c: added functions for autodetection of
+	  iControl directory (currently either <mp>/iPod_Control or
+	  <mp>/iTunes/iTunes_Control): itdb_get_control_dir() and
+	  itdb_get_itunes_dir()
+
+2006-02-12  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* itdb.h: added movie_flag and lyrics_flag to Itdb_Track
+
+	* itdb.h, itdb_itunesdb.c, itdb_private.h: added support for
+	  mobile phone reversed-endian iTunesDB. Please note that you have
+	  to rename the folder iTunes_Control to iPod_Control manually. to
+	  write reversed-endian files, itdb->reversed must be set to
+	  TRUE. When reading an iTunesDB the endianess is detected
+	  automatically and itdb->reversed set appropriately.  Only the
+	  inversed iTunesDBs, 'Play Counts', and OTG playlist files are
+	  read yet. The ArtworkDB and thumbnail files cannot be parsed
+	  yet.
+
+2006-02-04  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* ipod-device.c: added entries for iPod Nano 1 GB black and white
+	  (thanks to Leonhard Gruenschlos)
+
+2006-02-04  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* configure.ac: enable/disable switches for gdk and hal. Thanks to
+	  Olivier Crête
+
+2006-02-04  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* configure.ac: bumped version to 0.3.3 for new CVS version.
+
+	* RELEASED libgpod 0.3.2
+
+	* configure.ac: bumped version to 0.3.2 for release.
+
+	* db-artwork-writer.c: increased IPOD_MMAP_SIZE from 2 to 16 MB as
+	  a temporary workaround until a propoer solution can be
+	  implemented.
+
+	* db-itunes-parser.h: replaced the #pragma pack(4) with an
+	  'packed' attribute on _MhiiHeader only.
+
+2006-02-28  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* ipod-device.c: (ipod_device_set_property): fixed possible
+	  segfault when hald is present.
+
+2006-02-24  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* configure.ac, po/es.po: added Spanish translation catalog
+	  (thanks to Azael Avalos)
+
+2006-02-19  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+        * libgpod-1.0.pc: added gobject-2.0 to 'Requires:' list
+
+	* src/db-itunes-parser.h: add '#pragma pack(4)' to fix 64bit issue
+	  with padding (at least as a temporary fix).
+
+	* src/ipod-device.c: added HP type color photo ipod 'S492'. Thanks
+	  to David Desrosiers.
+	
+2006-02-14  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* po/ja.po: updated Japanese catalog -- thanks to Kentaro Fukuchi
+
+	* src/ipod-device.c: (ipod_device_set_property): fixed bug that
+	  caused ipod-detection to fail if hal daemon was not running. As
+	  a consequence cover art was not written to the iPod.
+
+2006-02-04  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_itunesdb.c: (itunesstats_read) Fixed error when reading
+	  the Shuffle's stat file (0x18 was used as minimal record length
+	  instead of decimal '18').
+
+2006-02-03  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_itunesdb.c, src/itdb_playlist.c, src/ithumb-writer.c:
+	  removed nested-functions. Thanks to Brian Jackson for the patch
+	  (he was not the only to send patches -- please, nobody feel
+	  offended that I didn't act sooner).
+
+2006-01-03  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/ipod-device.c: (ipod_device_set_property) check hal_context
+	  before accessing it to avoid segfault when hald is not running.
+
+	  (ipod_device_hal_initialize) fixed memory leak: 'error' was not
+	  freed if libhal_ctx_init() failed.
+
+	  (ipod_device_get_model_index_from_table): fix warning about
+	  unused computed value (thanks to Martin Aumueller)
+	
+2005-12-18  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+        * src/ipod-device.c: don't ignore return value of
+	  fread/fwrite/ftell because of possible compiler warnings.
+
+2005-12-11  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_artwork.c: (itdb_thumb_get_gdk_pixbuf) allow to get
+	  pixbuf even if no iPod is present if the thumbnail points to a
+	  local filename. This way artwork support is also possible on the
+	  'Local' repository in gtkpod (or any other application).
+
+	* README: added quick HOWTO use libgpod
+
+	* bumped version to 0.3.0 for release.
+
+	* bumped version to 0.3.1 for CVS version.
+
+2005-12-10  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/ithumb-writer.c: fixed typo leading to segfault.
+
+2005-12-09  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/ithumb-writer.c: create Artwork directory when attempting to
+	  write to it.
+
+	* src/itdb_artwork.c: fix compilation problem when gdkpixbuf is
+	  not present.
+
+	* src/hal-common.c: reverse order of include statements to fix
+	  compilation error on some systems.
+
+2005-12-06  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_itunesdb.c: change g_assert to g_return_if_fail (don't
+	  terminate the application just because the iTunesDB was
+	  manipulated).
+
+	* src/db-artwork-parser.c: change g_assert to g_return_if_fail
+	  (don't terminate the application just because the ArtworkDB was
+	  manipulated).
+
+	* src/itdb_artwork.c: change g_assert to g_return_if_fail
+	  (don't terminate the application just because the ithmb file was
+	  manipulated).
+	
+2005-12-05  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/db-artwork-writer/parser.c: Create ArtworkDB when it does
+	  not exist.
+
+	* src/db-artwork-writer.c, src/itdb_itunesdb.c,
+	  src/itdb_track.c, src/ithumb-writer.c: handle artwork size and
+	  count self-consistently.
+
+	* src/itdb_track.c: take care of artwork_size/_count a little
+	  better, take care of dbid2 a little better.
+
+	* src/ithumb-writer.c: new ithumb_rearrange_thumbnail_file()
+	  taking into account multiple references to the same slot.
+	  ithumb-writer now cleans up 0 Byte files.
+
+	
+2005-11-30  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/db-artwork-parser.c: (parse_mhni): don't crash if
+	ipod_image_new_from_mhni returns NULL
+
+2005-11-28  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_artwork.c: (unpack_RGB_565), (get_pixel_data):
+	* src/itdb_itunesdb.c: (get_mhod):
+	* src/ithumb-writer.c: (pack_RGB_565),
+	(ithumb_rearrange_thumbnail_file): added some paranoia checks before
+	doing some mallocs to prevent potential int overflows in some mallocs
+	which could be triggered by using forged iTunesDB files
+
+2005-11-28  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	New API for thumbnail support: see src/itdb.h for details.
+
+	* src/itdb.h: Introduced Itdb_Artwork and ItdbThumbType and
+	changed Itdb_Image to Itdb_Thumb throughout the source.
+
+	* src/itdb_artwork.c: new file as backend for Itdb_Artwork support
+	(new, free, duplicate, get_thumb_by_type, add_thumbnail,
+	remove_thumbnail, remove_thumbnails), as well as for the
+	Itdb_Thumb support (new, free, duplicate, get_gdk_pixbuf,
+	get_filename)
+
+	* src/itdb_track.c: new functions for artwork support
+	(set_thumbnails, remove_thumbnails)
+
+	* src/ithumb-writer.c: added support to write thumbnails in
+	addition to existing thumbnails
+
+	* src/db-artwork-parcer.c: (mhod3_get_ithmb_filename)
+
+	* src/itdb_itunesdb.c: (update_artwork_info)
+
+	* tests/test-covers.c: updated to new API.
+
+	* tests/test-write-covers.c: updated to new API.
+
+	Known issues: iTunes wipes off our thumbnails.
+	
+2005-11-24  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* overall changes to support itdb_image_get_gdk_pixbuf(). Run
+	"tests/test-thumbnails <ipod_mount> to copy all thumbnails into
+	the current directory.
+
+	* configure.ac: bumped version to 0.2.2
+
+	
+2005-11-23  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/db-artwork-debug.c: (get_utf16_string):
+	* src/db-artwork-parser.c: (get_utf16_string), (parse_mhod_3),
+	(parse_mhni), (ipod_supports_cover_art), (ipod_parse_artwork_db):
+	* src/db-artwork-parser.h:
+	* src/db-artwork-writer.c: (get_artwork_info), (write_mhod_type_3),
+	(write_mhni), (write_mhod), (write_mhii), (write_mhif):
+	* src/db-image-parser.c: (unpack_RGB_565),
+	(image_type_from_corr_id), (ipod_image_new_from_mhni):
+	* src/db-image-parser.h:
+	* src/itdb.h:
+	* src/ithumb-writer.c: (pack_RGB_565),
+	(ithumb_writer_write_thumbnail), (ipod_image_get_ithmb_filename),
+	(ithumb_writer_new), (ithumb_writer_free), (write_thumbnail),
+	(itdb_write_ithumb_files):
+	* tests/test-covers.c: (save_song_thumbnails): rework artwork code in 
+	an attempt to properly support artwork on all the iPod models
+
+2005-11-23  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/hal-common.c:
+	* tests/test-covers.c: (ipod_image_to_gdk_pixbuf): more glib 2.4
+	changes
+
+2005-11-23  Christophe Fergeau  <teuf at gnome.org>
+
+	* configure.ac: bumped version number
+
+==== libgpod 0.2.0 ====
+
+2005-11-23  Christophe Fergeau  <teuf at gnome.org>
+
+	* configure.ac: set version number to 0.2.0
+
+2005-11-22  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/ipod-device.c: fix compilation issue when hal isn't available
+
+2005-11-22  Christophe Fergeau  <teuf at gnome.org>
+
+	* configure.ac: fix .so versioning
+
+2005-11-22  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/glib-compat.h: include stdio.h in the glib 2.4 compat code
+
+2005-11-21  Christophe Fergeau  <teuf at gnome.org>
+
+	* COPYING: libgpod really is LGPL
+
+2005-11-21  Christophe Fergeau  <teuf at gnome.org>
+
+	* configure.ac: set version number to 0.2.0
+	* src/Makefile.am: added glib-compat.h
+
+2005-11-21  Christophe Fergeau  <teuf at gnome.org>
+
+	* configure.ac:
+	* src/Makefile.am:
+
+2005-11-21  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/glib-compat.h: added a missing helper file for glib 2.4
+	compilation
+
+2005-11-21  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/hal-common.c:
+	* src/ipod-device.c: marked some functions as static
+
+2005-11-21  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/ipod-device.c: fix g_mkdir_with_parents use (don't use it with
+	glib 2.8, and mark it static)
+
+2005-11-21  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/db-artwork-writer.c: (write_mhod_type_3):
+	* src/db-parse-context.c:
+	* src/ipod-device.c:
+	* src/itdb_private.h:
+	* src/itdb_track.c:
+	* src/ithumb-writer.c: (ithumb_writer_write_thumbnail): commit some
+	changes which should help compiling with glib 2.4
+
+2005-11-21  Christophe Fergeau  <teuf at gnome.org>
+
+	* autogen.sh:
+	* gnome-autogen.sh: use autogen.sh script from gnome-common since the
+	custom libgpod one keep having issues (this doesn't add a dependency
+	on gnome-common since I imported the necessary script to our CVS)
+
+2005-11-21  Christophe Fergeau  <teuf at gnome.org>
+
+	* INSTALL:
+	* autogen.sh:
+	* gnome-autogen.sh:
+
+2005-11-21  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/hal-common.h: mark hal stubs (for when hal isn't available) as 
+	G_GNUC_INTERNAL to avoid namespace clashes
+	* src/ipod-device.c:
+	* src/ipod-device.h: move hal header inclusion in the .c instead of
+	having it in the .h
+
+2005-11-19  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* itdb_playlist.c: simplified API for itdb_spl_update() and
+	  itdb_splr_eval()
+
+	* itdb_playlist.c: added itdb_spl_update_live() for convenience
+
+	* itdb_itunesdb.c: (itdb_rename_files) also remove "iTunesShuffle"
+	  as this file might confuse iPod Shuffles.
+	
+2005-11-17  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+        * configure.ac: check for version 2.4 of glib -- now we need to
+	  make sure that libgpod actually works with 2.4...
+
+2005-11-15  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_itunesdb.c: (itdb_new): initialise glib type system before
+	calling ipod_device_new (which creates a gobject)
+
+2005-11-13  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_itunesdb.c: when new rating is set on the iPod, backup
+	  the old rating to app_rating. Not sure what it's for, but iTunes
+	  seem to do it.
+
+	* src/itdb_itunesdb.c:
+	* src/itdb.h: split unk164 into flag1, flag2, flag3, and flag4.
+
+2005-11-12  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_track.c: (itdb_track_set_defaults) only change unk208
+	(audio/video) if not already set to non-zero.
+
+2005-11-11  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_itunesdb.c: (itdb_set_mountpoint) do not call
+	  itdb_device_new() with NULL pointer (no mountpoint == local
+	  repository) to avoid critical warning.
+
+2005-11-09  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb.h src/itdb_itunesdb.c: change API for
+	  itdb_shuffle_write() to be identical to itdb_itunesdb_write()
+
+2005-11-08  Christophe Fergeau  <teuf at gnome.org>
+
+	* configure.ac: fixed hal detection, stole a bit more autoconf-fu from 
+	libipoddevice so that ipod-device.c compiles when hal is detected
+
+2005-11-08  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/hal-common.c:
+	* src/hal-common.h: more #if => #ifdef changes
+
+2005-11-08  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/ipod-device.c:
+	* src/ipod-device.h: update comments to reflect the fact we are using
+	#ifdef HAVE_LIBHAL instead of #if HAVE_LIBHAL now
+
+2005-11-08  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/hal-common.c:
+	* src/hal-common.h:
+	* src/ipod-device.c: (ipod_device_set_property),
+	(ipod_device_hal_initialize), (ipod_device_detect_volume_info),
+	(ipod_device_new), (ipod_device_eject): sync with libipoddevice CVS,
+	use #ifdef HAVE_LIBHAL instead of #if HAVE_LIBHAL
+
+2005-11-06  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/ipod-device.h:
+	* src/itdb.h: added missing G_BEGIN_DECLS and G_END_DECLS
+
+2005-11-05  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_track.c: (is_video_ipod), (itdb_track_set_defaults): deal
+	with unk208 differently on iPod video (it's used to indicate if the
+	current track must be shown in the video or audio menu or both)
+
+2005-11-05  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/ipod-device.c: (ipod_device_get_property),
+	(ipod_device_class_init):
+	* src/ipod-device.h: sync with libipoddevice CVS to get information
+	about artwork formats supported by the various iPod models
+	
+
+2005-11-04  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/ipod-device.c: (ipod_device_new):
+	* src/ipod-device.h:
+	* src/itdb.h:
+	* src/itdb_itunesdb.c: (itdb_free), (itdb_parse),
+	(itdb_shuffle_write), (itdb_set_mountpoint): added an IpodDevice
+	element to Itdb_iTunesDB. This makes it possible for libgpod to know
+	the type (regular/nano/mini/video/...) of the iPod it's currently 
+	dealing with (which is necessary for proper cover art support for 
+	example)
+
+2005-11-04  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/Makefile.am: db-itunes-parser.h was missing from the source file
+	list, this made "make dist" generate uncompilable tarballs
+
+2005-11-04  Christophe Fergeau  <teuf at gnome.org>
+
+	* autogen.sh: add missing call to glib-gettextize, this has the nice
+	side-effect of adding mkinstalldirs if automake didn't copy it for us.
+
+2005-11-02  Christophe Fergeau  <teuf at gnome.org>
+
+	* configure.ac:
+	* src/db-artwork-writer.c: (ipod_buffer_grow_mapping),
+	(ipod_buffer_maybe_grow): added fallback code for systems not having
+	mremap (pretty much all non-linux systems actually)
+
+2005-11-02  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/db-artwork-writer.c: (ipod_buffer_destroy):
+	* src/itdb_track.c: (itdb_track_set_defaults): applied patch from 
+	Uwe Hermann <uwe at hermann-uwe.de> to add video support to libgpod,
+	removed spurious g_print
+
+2005-11-01  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* itdb_itunesdb.c (get16lint): fixed bug affecting big endian
+          systems. Thanks to Martin Aumueller for spotting this.
+
+	* itdb_itunesdb.c: used GUINTxx_TO/FROM_xE() instead of "#if
+          ..." constructions.
+
+2005-10-25  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* itdb_itunesdb.c (itdb_parse): added comment, check for itdb
+	  before calling ipod_pars_artwork_db()
+
+	* db-artwork_parser.c (ipod_parse_artwork_db): added assertion
+          to avoid segfault if called NULL parameter.
+
+	* itdb_itunesdb.c (get_mhip): fixed handling for iTunesDB
+          versions 4.7 and smaller.
+
+2005-10-24  Christophe Fergeau  <teuf at gnome.org>
+
+	* (itdb_write): remove mountpoint as parameter as not used.
+
+2005-10-20  Christophe Fergeau  <teuf at gnome.org>
+
+	* tests/test-covers.c: (save_song_thumbnails): fix warning on amd64
+
+2005-10-19  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* configure.ac: print warning and hint if ./mkinstalldirs is not
+	  created (incompatibility between automake > 1.8 and all gettext
+	  at least up to 0.14.4.
+
+	* TROUBLESHOOTING: added tips for missing ./mkinstalldirs and
+	  po/Makefile.in.in
+
+2005-10-17  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/db-image-parser.c: (get_pixel_data),
+	(ipod_image_new_from_mhni):
+	* src/itdb.h:
+	* src/itdb_itunesdb.c: (get_mhod): Changed type of the various fields 
+	in the ItdbImage structures so that they match what they are in the
+	database on the iPod.
+
+2005-10-15  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_itunesdb.c,itdb_private.h: fixes for 64 bit systems
+	* src/ipod-device.c: fixes for 64 bit systems (patch provided by
+	  Bodo Bauer)
+	* TROUBLESHOOTING: hint for 64 bit compilation
+
+2005-10-12  Christophe Fergeau  <teuf at gnome.org>
+
+	* configure.ac:
+	* src/Makefile.am:
+	* tests/Makefile.am: fix compilation when hal is available, needs to
+	be tested on systems without hal
+
+2005-10-11  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_itunesdb.c: (get_mhip): added missing parameter to
+	a g_warning call, this broke compilation on FC4
+
+	* src/itdb_track.c: (itdb_track_add/itdb_track_set_defaults): set
+	  dbid if not set (thanks to Guilherme Salgado for pointing this
+	  out)
+
+	* tests/.cvsignore: updated
+
+2005-10-09  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* bindings/python/gpod.i: applied Kelvin Lawson's patch to query
+	  integers.
+
+	* src/ipod-device.[ch],hal-common.[ch],Makefile.am: code ported
+	  from libipoddevice to retrieve information about the iPod
+	  without libhal dependence.
+
+	* tests/test-ipod-device.c: small script to show how to to query
+	  the iPod for information.
+
+	* tests/Makefile.am: initialize <LIBS> with better default
+
+	* configure.ac: add dependency for libgobject
+
+2005-10-02  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* Makefile.am: added bindings/... to EXTRA_DIST
+
+	* src/itdb.h, src/itdb_playlist.h, src/itdb_private.h: made enum
+	  ItdbPlType and enum ItdbPlFlag private and introduced
+	  itdb_playlist_set_mpl/_podcast() in addition to the existing
+	  itdb_playlist_is_mpl/_podcast() which make the public enums
+	  unecessary.
+
+	* bumped to version 107
+
+	* src/ithumb-writer.c: itdb_write_ithumb_files (): commented out
+	  g_print() statement as this produced an empty line in gtkpod's
+	  warning window.
+
+	* src/Makefile.am: GDKPIXPUF dependency solved inside source files
+	  -- db-artwork-writer-dummy.c no longer required. Now compiles
+	  with and without gdkpixbuf.
+
+	* configure.ac: fixed error in AC_DEFINE_UNQUOTED(HAVE_GDKPIXBUF). 
+	* tests/test-covers.c: attached Flavio Stanchina size-patch
+
+2005-09-29  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* applied Chrisophe's patch to make libgdk optional
+
+2005-09-27  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* src/itdb_track.c: include thumbnails into itdb_track_duplicate()
+	  (Christophe Fergeau)
+
+	* src/db-image-parser.c: support for iPod nano (Christophe
+	  Fergeau)
+
+	* configure.c: make MacOS compatible (Tristan O'Tierney)
+
+2005-09-27  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* .cvsignore: added reasonable defaults in ./ ./src/ ./tests ./po
+
+	* po/Makefile.in.in: removed, as it should be created by configure
+
+        * itdb.h, itdb_itunesdb.c, itdb_private.h: moved next_id from
+	  Itdb_iTunesDB to FExport.
+
+	* bindings/phython/examples/tag-genrr-from-audioscrobber.py: added
+	  (thanks to Nicholas Piper)
+
+2005-09-27  Christophe Fergeau  <teuf at gnome.org>
+
+	* src/itdb_itunesdb.c: (write_mhsd_tracks), (write_playlist_mhips),
+	(write_podcast_mhips): move variable declaration before code to fix 
+	compilation
+	* src/db-artwork-parser.c: (ipod_parse_artwork_db):
+	* src/db-artwork-writer.c: (ipod_write_artwork_db):
+	* src/ithumb-writer.c: (ithumb_writer_new): added some sanity checks
+	to detect better when the iPod doesn't have any artwork data
+
+2005-09-24  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+        * itdb.h/itdb_playlist.c: new functions: itdb_playlist_is_mpl()
+	  and itdb_playlist_is_podcasts()
+
+	* itdb_track.c: update itdb_track_duplicate()
+
+	* itdb_itunesdb.c: read/write timestamp in playlists. Set
+	  timestamp if previously unset.
+
+	* itdb_playlist.c: set timestamp when creating playlist, set
+	  timestamp when adding playlist and no timestamp was set.
+
+	* Release of version 0.1.6
+
+2005-09-23  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* bindings/: added python bindings provided by Nicholas Piper
+	  <nick at nickpiper co uk>
+
+	* itdb.h: added enum ItdbPlFlag and Itdb_Playlist->podcastflag
+	  field.
+
+	* itdb.h/itdb_itunesdb.c: added time_released field
+
+	* itdb_itunesdb.c: rewrote write_playlist() for easier
+	  maintenance. 
+
+	* itdb_itunesdb.c: read/write support for podcast playlists
+	  including chapterdata (but only in raw format)
+
+2005-09-22  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* applied Christophe Fergeau's patch which adds cover art writing
+	  support to libgpod -> bump to version 104
+
+2005-09-21  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* itdb_itunesdb.c: streamline parse_fimp() for more
+	  flexibility. Please report if formerly readable iTunesDB cannot
+	  be read any more :-/
+
+2005-09-20  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* Release of 0.1.3
+
+2005-09-19  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+        * added additional fields to Itdb_Track that are present since
+	  version 0x0c of the iTunesDB. Write long mhit version.
+
+	* applied patch provided by Christophe Fergeau <teuf at gnome.org>
+	  for artwork database support (read-only).
+
+	* itdb_itunesdb.c: read iTunesStats file if present (corresponds
+	  to Play Counts file on the Shuffle).
+
+	* itdb.h: implemented sortorder in playlists (new enum)
+
+2005-09-17  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+        * renamed fdesc to filetype
+
+	* po/it.po: updated (thanks to Edward Matteucci)
+
+
+2005-09-16  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* itdb.h/itdb_itunesdb.c: changed 'static void
+	  itdb_count_musicdirs()' to 'gint itdb_musicdirs_number()'
+
+2005-09-14  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* autogen.sh: automatically call ./configure
+	* configure.ac: added supported languages de fr he it ja sv
+	* po/: added language files from gtkpod project
+
+2005-09-13  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* itdb_itunesdb: changed API for itdb_filename_on_ipod ()
+	* itdb.h: added 'gint musicdirs' to Itdb_iTunesDB (number of
+	  F.. dirs available)
+	* itdb_itunesdb: itdb_cp_track_to_ipod() will now determine the
+	  number of available F.. dirs before copying by calling new
+	  function itdb_count_musicdirs()
+
+2005-09-11  Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+	* configure.ac: changed position of AC_GNU_SOURCE (caused error
+	  strange error messages) 
+        * autogen.sh: replace so it works without gnome-common
+	* src/itdb.h: replaced '//' by '/* ... */' to avoid strange error
+	  message during compile.
+	* src/itdb_playlist.c: (itdb_splr_validate)
+	  Guilherme Salgado <salgado at freeshell.org> patch to make
+	  'inthelast' SPL work.
+	* README: added some notes.
+	
+2005-09-10  Christophe Fergeau  <teuf at gnome.org>
+
+	* configure.ac:
+	* src/itdb_itunesdb.c: (get_mhod_type), (get_mhod),
+	(get_mhod_string), (get_playlist), (get_mhit),
+	(itdb_shuffle_write_file):
+	* src/itdb_playlist.c: (itdb_spl_update_all):
+	* tests/itdb_main.c: (main): fixed compilation warnings to be able
+	to compile with -Werror
+
+2005-09-10  Christophe Fergeau  <teuf at gnome.org>
+
+	* README: added quick description of the library purpose
+
+2005-09-10  Christophe Fergeau  <teuf at gnome.org>
+
+	* AUTHORS:
+	* COPYING:
+	* INSTALL:
+	* Makefile.am:
+	* autogen.sh:
+	* configure.ac:
+	* libgpod-1.0.pc.in:
+	* po/Makefile.in.in:
+	* po/POTFILES.in:
+	* src/Makefile.am:
+	* src/itdb.h:
+	* src/itdb_itunesdb.c: 
+	* src/itdb_playlist.c:
+	* src/itdb_private.h:
+	* src/itdb_track.c: 
+	* tests/Makefile.am:
+	* tests/itdb_main.c: initial import

Added: libgpod/trunk/libgpod/branches/upstream/current/INSTALL
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/INSTALL	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/INSTALL	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,229 @@
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
+Foundation, Inc.
+
+   This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+   These are generic installation instructions.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  (Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.)
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You only need
+`configure.ac' if you want to change it or regenerate `configure' using
+a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.  If you're
+     using `csh' on an old version of System V, you might need to type
+     `sh ./configure' instead to prevent `csh' from trying to execute
+     `configure' itself.
+
+     Running `configure' takes awhile.  While running, it prints some
+     messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.
+
+  5. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+Compilers and Options
+=====================
+
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+   You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+   If you have to use a `make' that does not support the `VPATH'
+variable, you have to compile the package for one architecture at a
+time in the source code directory.  After you have installed the
+package for one architecture, use `make distclean' before reconfiguring
+for another architecture.
+
+Installation Names
+==================
+
+   By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc.  You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PATH'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+give `configure' the option `--exec-prefix=PATH', the package will use
+PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=PATH' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+   Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+   There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on.  Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+     CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+     OS KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the `--target=TYPE' option to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+   Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+will cause the specified gcc to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+`configure' Invocation
+======================
+
+   `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+     Print a summary of the options to `configure', and exit.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
+

Added: libgpod/trunk/libgpod/branches/upstream/current/Makefile.am
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/Makefile.am	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/Makefile.am	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,26 @@
+SUBDIRS=src tools tests po m4 docs bindings 
+
+# build documentation when doing a distcheck.
+DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc		\
+	--with-hal-callouts-dir="`pwd`/hal/scripts"	\
+	--with-hal-fdi-dir="`pwd`/hal/fdi"
+
+ACLOCAL_AMFLAGS = -I m4
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libgpod-1.0.pc
+
+EXTRA_DIST =                    \
+	TROUBLESHOOTING		\
+	README.SysInfo		\
+        intltool-merge.in       \
+        intltool-update.in      \
+        intltool-extract.in     \
+        libgpod-1.0.pc.in
+
+
+DISTCLEANFILES =                \
+        intltool-extract        \
+        intltool-merge          \
+        intltool-update
+

Added: libgpod/trunk/libgpod/branches/upstream/current/Makefile.in
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/Makefile.in	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/Makefile.in	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,771 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  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@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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 = .
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in $(srcdir)/config.h.in \
+	$(srcdir)/libgpod-1.0.pc.in $(top_srcdir)/configure AUTHORS \
+	COPYING ChangeLog INSTALL NEWS compile config.guess config.sub \
+	depcomp install-sh ltmain.sh missing mkinstalldirs py-compile
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \
+	$(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/python.m4 \
+	$(top_srcdir)/m4/swig.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES = libgpod-1.0.pc
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
+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)$(pkgconfigdir)"
+pkgconfigDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(pkgconfig_DATA)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-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@
+ACLOCAL_AMFLAGS = -I m4
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+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@
+GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@
+GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@
+GDKPIXBUF_REQ = @GDKPIXBUF_REQ@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+HALCALLOUTSDIR = @HALCALLOUTSDIR@
+HALFDIDIR = @HALFDIDIR@
+HAL_CFLAGS = @HAL_CFLAGS@
+HAL_LIBS = @HAL_LIBS@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
+INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
+INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
+INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
+INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
+INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
+INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
+INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
+INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@
+INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
+INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
+INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
+INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
+INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
+INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
+LDFLAGS = @LDFLAGS@
+LIBGPOD_CFLAGS = @LIBGPOD_CFLAGS@
+LIBGPOD_LIBS = @LIBGPOD_LIBS@
+LIBGPOD_MAJOR_VERSION = @LIBGPOD_MAJOR_VERSION@
+LIBGPOD_MICRO_VERSION = @LIBGPOD_MICRO_VERSION@
+LIBGPOD_MINOR_VERSION = @LIBGPOD_MINOR_VERSION@
+LIBGPOD_SO_VERSION = @LIBGPOD_SO_VERSION@
+LIBGPOD_VERSION = @LIBGPOD_VERSION@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_LIBS = @LIBXML_LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+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@
+PKG_CONFIG = @PKG_CONFIG@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+PYGOBJECT_CFLAGS = @PYGOBJECT_CFLAGS@
+PYGOBJECT_LIBS = @PYGOBJECT_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SGUTILS_LIBS = @SGUTILS_LIBS@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SWIG = @SWIG@
+SWIG_LIB = @SWIG_LIB@
+TAGLIB_CFLAGS = @TAGLIB_CFLAGS@
+TAGLIB_LIBS = @TAGLIB_LIBS@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+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@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = src tools tests po m4 docs bindings 
+
+# build documentation when doing a distcheck.
+DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc		\
+	--with-hal-callouts-dir="`pwd`/hal/scripts"	\
+	--with-hal-fdi-dir="`pwd`/hal/fdi"
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libgpod-1.0.pc
+EXTRA_DIST = \
+	TROUBLESHOOTING		\
+	README.SysInfo		\
+        intltool-merge.in       \
+        intltool-update.in      \
+        intltool-extract.in     \
+        libgpod-1.0.pc.in
+
+DISTCLEANFILES = \
+        intltool-extract        \
+        intltool-merge          \
+        intltool-update
+
+all: config.h
+	$(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+am--refresh:
+	@:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
+	      cd $(srcdir) && $(AUTOMAKE) --gnu  \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  Makefile
+.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
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+
+config.h: stamp-h1
+	@if test ! -f $@; then \
+	  rm -f stamp-h1; \
+	  $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
+	else :; fi
+
+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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 
+	cd $(top_srcdir) && $(AUTOHEADER)
+	rm -f stamp-h1
+	touch $@
+
+distclean-hdr:
+	-rm -f config.h stamp-h1
+libgpod-1.0.pc: $(top_builddir)/config.status $(srcdir)/libgpod-1.0.pc.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+install-pkgconfigDATA: $(pkgconfig_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
+	@list='$(pkgconfig_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
+	  $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \
+	done
+
+uninstall-pkgconfigDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(pkgconfig_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \
+	done
+
+# 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):
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	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) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	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) \
+	  || eval $$failcom; \
+	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; nonemtpy = 1; } \
+	      END { if (nonempty) { 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 $$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS) config.h.in $(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; nonempty = 1; } \
+	      END { if (nonempty) { 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) config.h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	list='$(SOURCES) $(HEADERS) config.h.in $(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; nonempty = 1; } \
+	      END { if (nonempty) { 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)
+	$(am__remove_distdir)
+	test -d $(distdir) || mkdir $(distdir)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    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" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+	-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 $(install_sh) -c -m a+r {} {} \; \
+	|| chmod -R a+r $(distdir)
+dist-gzip: distdir
+	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-lzma: distdir
+	tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+	$(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
+	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
+	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.lzma*) \
+	  unlzma -c $(distdir).tar.lzma | $(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
+	chmod a-w $(distdir)
+	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+	  && cd $(distdir)/_build \
+	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+	    $(DISTCHECK_CONFIGURE_FLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
+	  && $(MAKE) $(AM_MAKEFLAGS) check \
+	  && $(MAKE) $(AM_MAKEFLAGS) install \
+	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+	        distuninstallcheck \
+	  && chmod -R a-w "$$dc_install_base" \
+	  && ({ \
+	       (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 \
+	  && rm -rf $(DIST_ARCHIVES) \
+	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+	$(am__remove_distdir)
+	@(echo "$(distdir) archives ready for distribution: "; \
+	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+	  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+	@cd $(distuninstallcheck_dir) \
+	&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+	   || { echo "ERROR: files left after uninstall:" ; \
+	        if test -n "$(DESTDIR)"; then \
+	          echo "  (check DESTDIR support)"; \
+	        fi ; \
+	        $(distuninstallcheck_listfiles) ; \
+	        exit 1; } >&2
+distcleancheck: distclean
+	@if test '$(srcdir)' = . ; then \
+	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+	  exit 1 ; \
+	fi
+	@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+	  || { echo "ERROR: files left in build directory after distclean:" ; \
+	       $(distcleancheck_listfiles) ; \
+	       exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(DATA) config.h
+installdirs: installdirs-recursive
+installdirs-am:
+	for dir in "$(DESTDIR)$(pkgconfigdir)"; 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)
+	-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
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-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:
+
+install-data-am: install-pkgconfigDATA
+
+install-dvi: install-dvi-recursive
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-info: install-info-recursive
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-ps: install-ps-recursive
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -rf $(top_srcdir)/autom4te.cache
+	-rm -f Makefile
+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-pkgconfigDATA
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+	install-strip
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am am--refresh check check-am clean clean-generic \
+	clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
+	dist-gzip dist-lzma dist-shar dist-tarZ dist-zip distcheck \
+	distclean distclean-generic distclean-hdr distclean-libtool \
+	distclean-tags distcleancheck distdir distuninstallcheck dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-pdf \
+	install-pdf-am install-pkgconfigDATA install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	installdirs-am maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+	ps ps-am tags tags-recursive uninstall uninstall-am \
+	uninstall-pkgconfigDATA
+
+# 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:

Added: libgpod/trunk/libgpod/branches/upstream/current/NEWS
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/NEWS	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/NEWS	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,154 @@
+Overview of changes in libgpod 0.7.2
+====================================
+
+* Performance work (thanks a lot to Javier Kohen for his patches)
+
+* Add itdb_device_supports_podcast and itdb_device_supports_chapter_image
+  methods
+
+* Fix static iPod Classic/Nano 3G artwork formats
+
+* Change installation directory for the HAL callout in the hope that it
+  will work out of the box on more systems
+
+* BSD portability fixes (courtesy of Andrew Nosenko)
+
+* Write MHLA (list of albums) headers to iTunesDB
+
+* Small improvements for iPhone support though iPhone 3G are still
+  unsupported because we can't checksum the iPhone iTunesDB.
+
+
+Overview of changes in libgpod 0.7.0
+====================================
+
+* support for iPod Nano 4th generation
+
+This includes support for cover art.
+Please note that this release DOES NOT support iPhones and iPod Touch
+with firmware 2.x
+
+* support for "sparse artwork" writing
+
+This lets us write more compact artwork files to the iPod, which in turn makes
+the UI more responsive (and saves disk space on the iPod).
+
+* jump table support
+
+These are the big letters that show up in the album/artist list when someone
+quickly scrolls through them. Thanks a lot to Ian Stewart for implementing it.
+
+* chapter data support
+
+Chapter data allows large files (movies, audio books, podcasts) to be divided
+into smaller sections.  Thanks to Michael Tiffany for this feature.
+
+* improved timezone handling
+
+This should now work up to 5G iPods, for newer iPods, libgpod will assume 
+timestamps are in UTC.
+
+* translation updates
+
+Thanks to all of our translators :)
+
+* much more complete API doc
+
+All of the public API is now documented with gtk-doc.
+
+* simplification of the cover art handling API
+
+The API for artwork for developers using libgpod should be more
+straightforward, if things are missing, don't hesitate to get in touch
+with us ;)
+
+* extensive plist parser
+
+In libgpod 0.6.0, libgpod got a very basic parser for the SysInfoExtended file
+(which is a XML plist description). This parser was rewritten for this release
+to parse the whole file. This parser depends on libxml2 but its compilation
+will be disabled if libxml2 and its development headers can't be found.
+
+* add mapping from iPod serial numbers to iPod models
+
+The iPod serial number can be obtained programmatically, and its last 3 digits
+are characteristic of an iPod (type, generation, color, capacity). libgpod
+can now find out an iPod model using this serial number.
+
+* portability improvements to windows and macosx
+
+This is probably not perfect yet, but the goal is to improve it as much as
+possible so don't hesitate to send bug reports if some things are still not
+working. Thanks to the songbird project and Éric Lassauge.
+
+* reworked handling of artwork formats
+
+libgpod can now automatically use the artwork formats described in
+SysInfoExtended even if the iPod model is unknown, this should make it possible
+for libgpod to support artwork on newly released iPod models without the need
+to upgrade.
+
+* python bindings are more consistent with other python container objects
+
+This enables testing whether a key exists in an object (e.g. "'title' in track")
+as well as iterating over a Track or Photo object's keys, values, or items.
+
+* bug fixes and code cleanup all over the place
+
+
+Overview of changes in libgpod 0.6.0
+====================================
+
+* support for iPod Classics and Video Nanos
+
+The database from these models is protected by a checksum. When this checksum 
+doesn't match the content of the iPod database, the iPod won't show any 
+track (ie it will look empty). Support for writing this checksum has been 
+implemented in this release thanks to the awesome work of a few people in
+#gtkpod. However, to calculate this checksum, a so called "firewire ID" is 
+needed which is different from iPod to iPod. Since reading it from the iPod
+requires special permissions, the firewire ID must be written in a regular 
+file on the iPod so that libgpod can find it and use it to generate the
+checksum. 
+
+libgpod installs a HAL callout to do that automatically when 
+everything is installed in an appropriate place. It can also be done manually,
+see README.SysInfo for more information.
+
+Cover art should be working except for non square covers, preliminary photo 
+support but this hasn't been widely tested yet.
+
+
+* support for iPhone and iPod Touch
+
+This requires manual user intervention: the devices must be jailbroken and 
+mounted through sshfs. The iPod Touch also needs a firewire ID which must be
+manually set, see README.SysInfo
+
+Cover art is implemented but not tested at all, ditto for photo support on 
+the iPod Touch
+
+
+* additional tools to get the firewire id from new iPods including a HAL
+  callout which will make the process totally automatic when it's properly 
+  installed. These tools need libsgutils to be installed.
+
+* endianness fixes in the artwork writing code
+* now depends on glib 2.8 or newer
+
+Huge thanks to wtbw and Simon Schulz without whom that release wouldn't have 
+been possible. Thanks as well to the people on #gtkpod for the testing they 
+provided.
+
+Other contributors to the release:
+- Jesse Bouwman
+- Alex Eftimie
+- Christophe Fergeau
+- Filippo Giunchedi
+- Javier Kohen
+- Tobias Kreisel
+- Eric Lassauge
+- Nicholas Piper
+- Jorg Schuler
+- Simon Schulz
+- Todd Zullinger

Added: libgpod/trunk/libgpod/branches/upstream/current/README
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/README	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/README	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,140 @@
+libgpod is a library meant to abstract access to an iPod content. It
+provides an easy to use API to retrieve the list of files and playlist
+stored on an iPod, to modify them and to save them back to the iPod.
+
+This code was originally part of gtkpod (www.gtkpod.org). When the iPod
+content parsing code was made to be self-contained with gtkpod 0.93,
+we chose to put this code in a separate library so that other project
+can benefit from it without duplicating code.
+
+If you decide to make improvements, like support for cover art or
+photos please contact us so we can work together. Just drop a mail to
+Gtkpod-devel at lists.sourceforge.net (you may ask to be CC in the
+answer).
+
+----------------------------------------------------------------------
+
+Quick HOWTO use libgpod for audio
+
+itdb_parse(): read the iTunesDB and ArtworkDB
+itdb_write(): write the iTunesDB and ArtworkDB
+
+itdb_parse() will return a Itdb_iTunesDB structure with GLists
+containing all tracks (each track is represented by a Itdb_Track
+structure) and the playlists (each playlist is represented by a
+Itdb_Playlist structure).
+
+A number of functions for adding, removing, duplicating tracks are
+available. Please see itdb.h for details (itdb_track_*()).
+
+In each Itdb_Playlist structure you can find a GList called 'members'
+with listing all member tracks. Each track referenced in a playlist
+must also be present in the tracks GList of the iTunesDB.
+
+The iPod must contain one master playlist (MPL) containing all tracks
+accessible on the iPod through the
+Music->Tracks/Albums/Artists... menu. Besides the MPL there can be a
+number of normal playlists accessible through the Music->Playlists
+menu on the iPod. Tracks that are a member of one of these normal
+playlists must also be a member of the MPL.
+
+The Podcasts playlist is just another playlist with some internal
+flags set differently. Also, member tracks in the Podcasts playlist
+are not normally members of the MPL (so on the iPod they will only
+show up under the Podcasts menu). All tracks referenced must be in the
+tracklist of the Itdb_iTunesDB, however.
+
+A number of functions to add/remove playlists, or add/remove tracks
+are available. Please see itdb.h for details (itdb_playlist_*()).
+
+Each track can have a thumbnail associated with it. You can retrieve a
+GdkPixmap of the thumbnail using itdb_artwork_get_pixbuf().  You can
+remove a thumbnail with itdb_track_remove_thumbnails(). And finally,
+you can set a new thumbnail using itdb_track_set_thumbnails().
+
+Please note that iTunes additionally stores the artwork as tags in the
+original music file. That's also from where the data is read when
+artwork is displayed in iTunes, and there can be more than one piece
+of artwork. libgpod does not store the artwork as tags in the original
+music file. As a consequence, if iTunes attempts to access the
+artwork, it will find none, and remove libgpod's artwork. Luckily,
+iTunes will only attempt to access the artwork if you select a track
+in iTunes. (To work around this, gtkpod keeps a list of the original
+filename of all artwork and silently adds the thumbnails if they were
+'lost'. Your application might want to do something similar, or you
+can supply patches for (optionally!) adding tags to the original music
+files.)
+
+The Itdb_iTunesDB, Itdb_Playlist and Itdb_Track structures each have a
+userdata and a usertype field that can be used by the application to
+store application-specific additional data. If userdata is a pointer
+to an external structure, you can supply a ItdbUserDataDuplicateFunc
+and a ItdbUserDataDestroyFunc so that this data can be duplicated
+or freed automatically with a call to the library _duplicate()/_free()
+functions.
+
+For more information I would advice to have a look at gtkpod's source
+code. You can also ask questions on the developer's mailing list:
+gtkpod-devel at lists dot sourceforge dot net
+
+
+Jörg Schuler (jcsjcs at users dot sourceforge dot net)
+
+----------------------------------------------------------------------
+
+Quick HOWTO use libgpod for photos
+
+   itdb_photodb_parse():
+       Read an existing PhotoDB.
+
+   itdb_photodb_create():
+       Create a new Itdb_PhotoDB structure. The Photo Library Album is
+       (first album) is created automatically.
+
+   itdb_photodb_add_photo(), itdb_photodb_add_photo_from_data():
+       Add a photo to the PhotoDB (from file or from a chunk of
+       memory). It is automatically added to the Photo Library Album
+       (first album), which is created if it does not exist already.
+
+   itdb_photodb_photoalbum_create():
+       Create and add a new photoalbum.
+
+   itdb_photodb_photoalbum_add_photo():
+       Add a photo (Itdb_Artwork) to an existing photoalbum.
+
+   itdb_photodb_photoalbum_remove():
+       Remove an existing photoalbum. Pictures can be kept in the
+       Photo Library or automatically removed as well.
+
+   itdb_photodb_remove_photo():
+       Remove a photo either from a photoalbum or completely from the database.
+
+   itdb_photodb_write():
+       Write out your PhotoDB.
+
+   itdb_photodb_free():
+       Free all memory taken by the PhotoDB.
+
+   itdb_photodb_photoalbum_by_name():
+       Find the first photoalbum with a given name or the Photo
+       Library Album if called with no name.
+
+
+If you cannot add photos because your iPod is not recognized, you may
+have to set the iPod model by calling
+
+itdb_device_set_sysinfo (db->device, "ModelNumStr", model);
+
+For example, "MA450" would stand for an 80 GB 6th generation iPod
+Video. See itdb_device.c for a list of supported models.
+
+This information will be written to the iPod when the PhotoDB is saved
+(itdb_device_write_sysinfo() is called).
+
+Have a look at the following test-photos test program in the tests/
+subdirectory for an example of how to use the interface.
+
+
+Jörg Schuler (jcsjcs at users dot sourceforge dot net)
+
+----------------------------------------------------------------------

Added: libgpod/trunk/libgpod/branches/upstream/current/README.SysInfo
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/README.SysInfo	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/README.SysInfo	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,65 @@
+Starting with the iPod Classics and the Video Nanos, libgpod needs an 
+additional configuration step to correctly modify the iPod content. libgpod 
+needs to know the so-called iPod "firewire id", otherwise the iPod won't 
+recognize what libgpod wrote to it and will behave as if it's empty.
+
+There are several ways to set up an iPod so libgpod can find its firewire id.
+
+The preferred method is automatic. Make sure you have hal and libsgutils
+installed before running configure/autogen.sh. If you built libgpod without
+them, run configure/make/make install after you install them.
+
+A hal callout and .fdi file will be built and installed. This will query an
+iPod when it is plugged in and save the SysInfoExtended file in the proper
+place. This should be entirely automatic. If you have trouble with this, see
+the TROUBLESHOOTING file for some hints.
+
+If you build with libsgutils but without hal, the next best method is mostly
+automatic. You should have an ipod-read-sysinfo-extended tool available. Run
+it with the iPod device path and the iPod mount point /mnt/ipod) as arguments.
+For example:
+
+    $ ipod-read-sysinfo-extended /dev/sda /mnt/ipod
+
+This may require root privileges. It reads an XML file from the iPod and
+writes it as /mnt/ipod/iPod_Control/Device/SysInfoExtended. More details on
+this method can be found at http://ipodlinux.org/Device_Information.
+
+Having the SysInfoExtended file created by ipod-read-sysinfo-extended or the
+hal callout is enough for libgpod to figure out the iPod firewire id.
+
+The last method requires more manual intervention. First, you need to
+determine the firewire id of the iPod. To do that on Linux, plug in the iPod
+in and run (with root privileges):
+
+    $ lsusb -v | grep -i Serial
+
+This should print a 16 character long string like 00A1234567891231. For an
+iPod Touch, this number will be much longer than 16 characters, the firewire
+ID is constituted by the first 16 characters.
+
+On FreeBSD, there is a tool to get the serial number at:
+
+    http://50hz.ws/dev/getserial.c
+
+Once you have the serial number, edit /mnt/ipod/iPod_Control/Device/SysInfo,
+creating the file if it does not exist. (Replace /mnt/ipod with the path to
+where the iPod is mounted). Add a line like this to the SysInfo file:
+
+FirewireGuid: 0xffffffffffffffff
+
+Replace ffffffffffffffff with the serial number you obtained in the previous
+step. Don't forget the 0x before the string. After you add the FirewireGuid to
+the SysInfo file you need to rewrite the iTunesDB for the change to take
+effect. For example, add a new song or adjust the playcount of an existing
+song and save the changes in gtkpod.
+
+Be careful when using applications which let you manually specify the iPod
+model. They may overwrite the SysInfo file and undo the changes.
+
+Finally, if you compiled libgpod from source, you can test that libgpod can
+find the firewire ID on the iPod using the test-firewire-id program in the
+tests/ dir of the libgpod source. For example:
+
+    $ cd ~/src/libgpod/tests
+    $ ./test-firewire-id /ipod/mount/point

Added: libgpod/trunk/libgpod/branches/upstream/current/TROUBLESHOOTING
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/TROUBLESHOOTING	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/TROUBLESHOOTING	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,109 @@
+Possible problems:
+------------------
+
+* Compilation of applications that compiled fine with libgpod 0.4.2
+  fail with libgpod 0.5.0 or later because of unknown symbols.
+
+With version 0.5.0 of libgpod the namespace has been cleaned up. All
+exported symbols now start with either ITDB or Itdb. Applications
+using the old symbols will have to be adapted. Please see the
+ChangeLog entry from 27 April 2007 for details on the renaming.
+
+------------------------------------------------------------
+
+* If you get an error stating
+
+"possibly undefined macro: AC_PROG_INTLTOOL"
+
+when running ./autogen.sh you need to install the "intltool"
+package. On Debian
+
+"apt-get install intltool"
+
+will do that for you.
+
+
+------------------------------------------------------------
+
+* If you get an error stating
+
+"checking for XML::Parser... configure: error: XML::Parser perl module is required for intltool"
+
+you need to install the libxml-parser package. On Debian
+
+"apt-get install libxml-parser-perl"
+
+will do that for you.
+
+
+------------------------------------------------------------
+
+* "/bin/sh: ../mkinstalldirs: No such file or directory"
+
+If you get this error, you are probably using automake >= 1.8.
+Automake 1.8 does no longer install the mkinstalldirs file, and
+gettext 0.14.4 does still depend on it... (automake 1.9.6 seems
+to work fine, btw.)
+
+Do a 'locate gettext/mkinstalldirs' and copy it over, then run
+./autogen.sh again for good measure.
+
+------------------------------------------------------------
+
+* "config.status: error: cannot find input file: po/Makefile.in.in"
+
+Upgrade intltool. 0.33 seems to work.
+
+------------------------------------------------------------
+
+* "array size missing in `padding'"
+
+Older versions of gcc don't seem to understand the construct. You can
+either change the 'padding[]' strings to 'padding[0]' (not tested) or
+upgrade your gcc to a more recent version (gcc-3.2 has been reported
+to work) fine.
+
+------------------------------------------------------------
+
+* Compiling for 64bit systems
+
+The current autoconf/automake setup doesn't set the correct
+installation path on 64bit systems. To work around this issue and to
+get the libraries installed in the correct locations you need to
+specify a couple extra parameters to autogen.sh (or configure). If your
+installation prefix is '/opt/gnome' use the following:
+
+./autogen.sh --prefix=/opt/gnome --enable-libsuffix=64 --libdir=/opt/gnome/lib64
+
+If you use a different prefix, replace '/opt/gnome' accordingly.
+
+Added on 2007/1/15: Note that I don't have any problems on my Debian
+4.1.1-13 system and won't have to do any of this.
+
+------------------------------------------------------------
+
+* Packages required to build python bindings
+
+On Debian the following packages are required:
+
+python (e.g. python2.4)
+python-dev (e.g. python2.4-dev)
+python-mutagen
+
+These are needed for full photo/thumbnail support:
+python-gtk2-dev (and python-gobject-dev, if using python-gtk2-dev >= 2.10)
+
+------------------------------------------------------------
+
+* The hal callout doesn't run automatically to setup SysInfoExtended
+
+If you have hal and libsgutils installed before running autogen.sh or configure,
+a hal callout and .fdi file will be built and installed. This will query an iPod
+when it is plugged in and save the SysInfoExtended file in the proper place.
+This should be completely automatic. However, for this to work, the callout must
+be installed in hal's callout path. $libdir/hal/scripts is the most portable
+location (hal's $libdir can be found using pkg-config). If the default paths for
+the callout or fdi file are not detected properly, you can specify the proper
+locations manually, via configure:
+
+    $ ./configure --with-hal-callouts-dir=DIR --with-hal-fdi-dir=DIR

Added: libgpod/trunk/libgpod/branches/upstream/current/aclocal.m4
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/aclocal.m4	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/aclocal.m4	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,8285 @@
+# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# This file 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.
+
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(AC_AUTOCONF_VERSION, [2.61],,
+[m4_warning([this file was generated for autoconf 2.61.
+You have another version of autoconf.  It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
+
+# Copyright (C) 1995-2002 Free Software Foundation, Inc.
+# Copyright (C) 2001-2003,2004 Red Hat, Inc.
+#
+# This file is free software, distributed under the terms of the GNU
+# General Public License.  As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+#
+# This file can be copied and used freely without restrictions.  It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+#
+# Macro to add for using GNU gettext.
+# Ulrich Drepper <drepper at cygnus.com>, 1995, 1996
+#
+# Modified to never use included libintl. 
+# Owen Taylor <otaylor at redhat.com>, 12/15/1998
+#
+# Major rework to remove unused code
+# Owen Taylor <otaylor at redhat.com>, 12/11/2002
+#
+# Added better handling of ALL_LINGUAS from GNU gettext version 
+# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
+#
+# Modified to require ngettext
+# Matthias Clasen <mclasen at redhat.com> 08/06/2004
+#
+# We need this here as well, since someone might use autoconf-2.5x
+# to configure GLib then an older version to configure a package
+# using AM_GLIB_GNU_GETTEXT
+AC_PREREQ(2.53)
+
+dnl
+dnl We go to great lengths to make sure that aclocal won't 
+dnl try to pull in the installed version of these macros
+dnl when running aclocal in the glib directory.
+dnl
+m4_copy([AC_DEFUN],[glib_DEFUN])
+m4_copy([AC_REQUIRE],[glib_REQUIRE])
+dnl
+dnl At the end, if we're not within glib, we'll define the public
+dnl definitions in terms of our private definitions.
+dnl
+
+# GLIB_LC_MESSAGES
+#--------------------
+glib_DEFUN([GLIB_LC_MESSAGES],
+  [AC_CHECK_HEADERS([locale.h])
+    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 defines LC_MESSAGES.])
+    fi
+  fi])
+
+# GLIB_PATH_PROG_WITH_TEST
+#----------------------------
+dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
+[# 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 ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
+  AC_MSG_RESULT([$]$1)
+else
+  AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
+
+# GLIB_WITH_NLS
+#-----------------
+glib_DEFUN([GLIB_WITH_NLS],
+  dnl NLS is obligatory
+  [USE_NLS=yes
+    AC_SUBST(USE_NLS)
+
+    gt_cv_have_gettext=no
+
+    CATOBJEXT=NONE
+    XGETTEXT=:
+    INTLLIBS=
+
+    AC_CHECK_HEADER(libintl.h,
+     [gt_cv_func_dgettext_libintl="no"
+      libintl_extra_libs=""
+
+      #
+      # First check in libc
+      #
+      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
+        [AC_TRY_LINK([
+#include <libintl.h>
+],
+         [return !ngettext ("","", 1)],
+	  gt_cv_func_ngettext_libc=yes,
+          gt_cv_func_ngettext_libc=no)
+        ])
+  
+      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
+	      AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
+        	[AC_TRY_LINK([
+#include <libintl.h>
+],
+	          [return !dgettext ("","")],
+		  gt_cv_func_dgettext_libc=yes,
+	          gt_cv_func_dgettext_libc=no)
+        	])
+      fi
+  
+      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
+        AC_CHECK_FUNCS(bind_textdomain_codeset)
+      fi
+
+      #
+      # If we don't have everything we want, check in libintl
+      #
+      if test "$gt_cv_func_dgettext_libc" != "yes" \
+	 || test "$gt_cv_func_ngettext_libc" != "yes" \
+         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
+        
+        AC_CHECK_LIB(intl, bindtextdomain,
+	    [AC_CHECK_LIB(intl, ngettext,
+		    [AC_CHECK_LIB(intl, dgettext,
+			          gt_cv_func_dgettext_libintl=yes)])])
+
+	if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
+	  AC_MSG_CHECKING([if -liconv is needed to use gettext])
+	  AC_MSG_RESULT([])
+  	  AC_CHECK_LIB(intl, ngettext,
+          	[AC_CHECK_LIB(intl, dcgettext,
+		       [gt_cv_func_dgettext_libintl=yes
+			libintl_extra_libs=-liconv],
+			:,-liconv)],
+		:,-liconv)
+        fi
+
+        #
+        # If we found libintl, then check in it for bind_textdomain_codeset();
+        # we'll prefer libc if neither have bind_textdomain_codeset(),
+        # and both have dgettext and ngettext
+        #
+        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
+          glib_save_LIBS="$LIBS"
+          LIBS="$LIBS -lintl $libintl_extra_libs"
+          unset ac_cv_func_bind_textdomain_codeset
+          AC_CHECK_FUNCS(bind_textdomain_codeset)
+          LIBS="$glib_save_LIBS"
+
+          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
+            gt_cv_func_dgettext_libc=no
+          else
+            if test "$gt_cv_func_dgettext_libc" = "yes" \
+		&& test "$gt_cv_func_ngettext_libc" = "yes"; then
+              gt_cv_func_dgettext_libintl=no
+            fi
+          fi
+        fi
+      fi
+
+      if test "$gt_cv_func_dgettext_libc" = "yes" \
+	|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
+        gt_cv_have_gettext=yes
+      fi
+  
+      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
+        INTLLIBS="-lintl $libintl_extra_libs"
+      fi
+  
+      if test "$gt_cv_have_gettext" = "yes"; then
+	AC_DEFINE(HAVE_GETTEXT,1,
+	  [Define if the GNU gettext() function is already present or preinstalled.])
+	GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+	  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
+	if test "$MSGFMT" != "no"; then
+          glib_save_LIBS="$LIBS"
+          LIBS="$LIBS $INTLLIBS"
+	  AC_CHECK_FUNCS(dcgettext)
+	  MSGFMT_OPTS=
+	  AC_MSG_CHECKING([if msgfmt accepts -c])
+	  GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
+msgid ""
+msgstr ""
+"Content-Type: text/plain; charset=UTF-8\n"
+"Project-Id-Version: test 1.0\n"
+"PO-Revision-Date: 2007-02-15 12:01+0100\n"
+"Last-Translator: test <foo at bar.xx>\n"
+"Language-Team: C <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Transfer-Encoding: 8bit\n"
+], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
+	  AC_SUBST(MSGFMT_OPTS)
+	  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+	  GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+	    [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+	  AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
+			 return _nl_msg_cat_cntr],
+	    [CATOBJEXT=.gmo 
+             DATADIRNAME=share],
+	    [case $host in
+	    *-*-solaris*)
+	    dnl On Solaris, if bind_textdomain_codeset is in libc,
+	    dnl GNU format message catalog is always supported,
+            dnl since both are added to the libc all together.
+	    dnl Hence, we'd like to go with DATADIRNAME=share and
+	    dnl and CATOBJEXT=.gmo in this case.
+            AC_CHECK_FUNC(bind_textdomain_codeset,
+	      [CATOBJEXT=.gmo 
+               DATADIRNAME=share],
+	      [CATOBJEXT=.mo
+               DATADIRNAME=lib])
+	    ;;
+	    *)
+	    CATOBJEXT=.mo
+            DATADIRNAME=lib
+	    ;;
+	    esac])
+          LIBS="$glib_save_LIBS"
+	  INSTOBJEXT=.mo
+	else
+	  gt_cv_have_gettext=no
+	fi
+      fi
+    ])
+
+    if test "$gt_cv_have_gettext" = "yes" ; then
+      AC_DEFINE(ENABLE_NLS, 1,
+        [always defined to indicate that i18n is enabled])
+    fi
+
+    dnl Test whether we really found GNU xgettext.
+    if test "$XGETTEXT" != ":"; then
+      dnl If it is not 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 program is not GNU xgettext; ignore it])
+        XGETTEXT=":"
+      fi
+    fi
+
+    # We need to process the po/ directory.
+    POSUB=po
+
+    AC_OUTPUT_COMMANDS(
+      [case "$CONFIG_FILES" in *po/Makefile.in*)
+        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
+      esac])
+
+    dnl These rules are solely for the distribution goal.  While doing this
+    dnl we only have to keep exactly one list of the available catalogs
+    dnl in configure.in.
+    for lang in $ALL_LINGUAS; do
+      GMOFILES="$GMOFILES $lang.gmo"
+      POFILES="$POFILES $lang.po"
+    done
+
+    dnl Make all variables we use known to autoconf.
+    AC_SUBST(CATALOGS)
+    AC_SUBST(CATOBJEXT)
+    AC_SUBST(DATADIRNAME)
+    AC_SUBST(GMOFILES)
+    AC_SUBST(INSTOBJEXT)
+    AC_SUBST(INTLLIBS)
+    AC_SUBST(PO_IN_DATADIR_TRUE)
+    AC_SUBST(PO_IN_DATADIR_FALSE)
+    AC_SUBST(POFILES)
+    AC_SUBST(POSUB)
+  ])
+
+# AM_GLIB_GNU_GETTEXT
+# -------------------
+# Do checks necessary for use of gettext. If a suitable implementation 
+# of gettext is found in either in libintl or in the C library,
+# it will set INTLLIBS to the libraries needed for use of gettext
+# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
+# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
+# on various variables needed by the Makefile.in.in installed by 
+# glib-gettextize.
+dnl
+glib_DEFUN([GLIB_GNU_GETTEXT],
+  [AC_REQUIRE([AC_PROG_CC])dnl
+   AC_REQUIRE([AC_HEADER_STDC])dnl
+   
+   GLIB_LC_MESSAGES
+   GLIB_WITH_NLS
+
+   if test "$gt_cv_have_gettext" = "yes"; then
+     if test "x$ALL_LINGUAS" = "x"; then
+       LINGUAS=
+     else
+       AC_MSG_CHECKING(for catalogs to be installed)
+       NEW_LINGUAS=
+       for presentlang in $ALL_LINGUAS; do
+         useit=no
+         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
+           desiredlanguages="$LINGUAS"
+         else
+           desiredlanguages="$ALL_LINGUAS"
+         fi
+         for desiredlang in $desiredlanguages; do
+ 	   # Use the presentlang catalog if desiredlang is
+           #   a. equal to presentlang, or
+           #   b. a variant of presentlang (because in this case,
+           #      presentlang can be used as a fallback for messages
+           #      which are not translated in the desiredlang catalog).
+           case "$desiredlang" in
+             "$presentlang"*) useit=yes;;
+           esac
+         done
+         if test $useit = yes; then
+           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
+         fi
+       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
+
+   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
+   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
+   dnl Try to locate is.
+   MKINSTALLDIRS=
+   if test -n "$ac_aux_dir"; then
+     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
+   fi
+   if test -z "$MKINSTALLDIRS"; then
+     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+   fi
+   AC_SUBST(MKINSTALLDIRS)
+
+   dnl Generate list of files to be processed by xgettext which will
+   dnl be included in po/Makefile.
+   test -d po || mkdir po
+   if test "x$srcdir" != "x."; then
+     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
+       posrcprefix="$srcdir/"
+     else
+       posrcprefix="../$srcdir/"
+     fi
+   else
+     posrcprefix="../"
+   fi
+   rm -f po/POTFILES
+   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+	< $srcdir/po/POTFILES.in > po/POTFILES
+  ])
+
+# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
+# -------------------------------
+# Define VARIABLE to the location where catalog files will
+# be installed by po/Makefile.
+glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
+[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
+glib_save_prefix="$prefix"
+glib_save_exec_prefix="$exec_prefix"
+glib_save_datarootdir="$datarootdir"
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+test "x$exec_prefix" = xNONE && exec_prefix=$prefix
+datarootdir=`eval echo "${datarootdir}"`
+if test "x$CATOBJEXT" = "x.mo" ; then
+  localedir=`eval echo "${libdir}/locale"`
+else
+  localedir=`eval echo "${datadir}/locale"`
+fi
+prefix="$glib_save_prefix"
+exec_prefix="$glib_save_exec_prefix"
+datarootdir="$glib_save_datarootdir"
+AC_DEFINE_UNQUOTED($1, "$localedir",
+  [Define the location where the catalogs will be installed])
+])
+
+dnl
+dnl Now the definitions that aclocal will find
+dnl
+ifdef(glib_configure_in,[],[
+AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
+AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
+])dnl
+
+# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
+# 
+# Create a temporary file with TEST-FILE as its contents and pass the
+# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
+# 0 and perform ACTION-IF-FAIL for any other exit status.
+AC_DEFUN([GLIB_RUN_PROG],
+[cat >conftest.foo <<_ACEOF
+$2
+_ACEOF
+if AC_RUN_LOG([$1 conftest.foo]); then
+  m4_ifval([$3], [$3], [:])
+m4_ifvaln([$4], [else $4])dnl
+echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
+sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
+fi])
+
+
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+
+# serial 51 AC_PROG_LIBTOOL
+
+
+# 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])])])
+
+
+# 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 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_F77])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'
+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([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 1s/^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 MSVC,
+# 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(AR, ar, false)
+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 "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+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_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+    ;;
+  *)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    ;;
+  esac
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+_LT_CC_BASENAME([$compiler])
+
+# 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
+
+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)
+
+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"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _LT_AC_SYS_COMPILER
+
+
+# _LT_CC_BASENAME(CC)
+# -------------------
+# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+AC_DEFUN([_LT_CC_BASENAME],
+[for cc_temp in $1""; do
+  case $cc_temp in
+    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+])
+
+
+# _LT_COMPILER_BOILERPLATE
+# ------------------------
+# Check for compiler boilerplate output or warnings with
+# the simple compiler test code.
+AC_DEFUN([_LT_COMPILER_BOILERPLATE],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+])# _LT_COMPILER_BOILERPLATE
+
+
+# _LT_LINKER_BOILERPLATE
+# ----------------------
+# Check for linker boilerplate output or warnings with
+# the simple link test code.
+AC_DEFUN([_LT_LINKER_BOILERPLATE],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$rm conftest*
+])# _LT_LINKER_BOILERPLATE
+
+
+# _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_REQUIRE([LT_AC_PROG_SED])dnl
+AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# 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 "$lt_aix_libpath_sed"`
+fi],[])
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+])# _LT_AC_SYS_LIBPATH_AIX
+
+
+# _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
+
+
+# _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}
+
+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.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+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)
+])])# _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
+   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-*kfreebsd*-gnu|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-*kfreebsd*-gnu)
+          LD="${LD-ld} -m elf_i386_fbsd"
+          ;;
+        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*)
+      libsuff=64
+      case $host in
+        x86_64-*kfreebsd*-gnu)
+          LD="${LD-ld} -m elf_x86_64_fbsd"
+          ;;
+        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*
+  ;;
+
+*-*-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
+  ;;
+sparc*-*solaris*)
+  # 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
+    *64-bit*)
+      case $lt_cv_prog_gnu_ld in
+      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      *)    LD="${LD-ld} -64" ;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+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
+
+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_REQUIRE([LT_AC_PROG_SED])
+AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+   echo "$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}\{0,1\} :&$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 other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       $2=yes
+     fi
+   fi
+   $rm conftest*
+])
+
+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_REQUIRE([LT_AC_PROG_SED])dnl
+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 linker 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
+       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         $2=yes
+       fi
+     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
+  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
+    ;;
+
+  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;
+    ;;
+
+  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;
+    ;;
+
+  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;
+    ;;
+
+  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+    # 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 all BSDs
+    fi
+    # And add a safety zone
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    ;;
+
+  interix*)
+    # We know the value 262144 and hardcode it with a safety zone (like BSD)
+    lt_cv_sys_max_cmd_len=196608
+    ;;
+
+  osf*)
+    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+    # nice to cause kernel panics so lets avoid the loop below.
+    # First set a reasonable default.
+    lt_cv_sys_max_cmd_len=16384
+    #
+    if test -x /sbin/sysconfig; then
+      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+        *1*) lt_cv_sys_max_cmd_len=-1 ;;
+      esac
+    fi
+    ;;
+  sco3.2v5*)
+    lt_cv_sys_max_cmd_len=102400
+    ;;
+  sysv5* | sco5v6* | sysv4.2uw2*)
+    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+    if test -n "$kargmax"; then
+      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
+    else
+      lt_cv_sys_max_cmd_len=32768
+    fi
+    ;;
+  *)
+    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+    if test -n "$lt_cv_sys_max_cmd_len"; then
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    else
+      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`
+    fi
+    ;;
+  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); */
+    }
+  else
+    puts (dlerror ());
+
+    exit (status);
+}]
+EOF
+  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) $1 ;;
+      x$lt_dlneed_uscore) $2 ;;
+      x$lt_dlunknown|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
+    ;;
+
+  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
+    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
+    ])
+   ;;
+
+  *)
+    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"
+    wl=$lt_prog_compiler_wl 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
+      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+      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_PROG_SED])dnl
+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
+   echo "$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}\{0,1\} :&$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
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+     fi
+   fi
+   chmod u+w . 2>&AS_MESSAGE_LOG_FD
+   $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_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)" || \
+   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; 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
+# 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"
+         old_striplib="$STRIP -S"
+         AC_MSG_RESULT([yes])
+       else
+  AC_MSG_RESULT([no])
+fi
+       ;;
+   *)
+  AC_MSG_RESULT([no])
+    ;;
+  esac
+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_REQUIRE([LT_AC_PROG_SED])dnl
+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"
+m4_if($1,[],[
+if test "$GCC" = yes; then
+  case $host_os in
+    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+    *) lt_awk_arg="/^libraries:/" ;;
+  esac
+  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$lt_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.
+    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+  # Ok, now we have the path, separated by spaces, we can step through it
+  # and add multilib dir if necessary.
+  lt_tmp_lt_search_path_spec=
+  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  for lt_sys_path in $lt_search_path_spec; do
+    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+    else
+      test -d "$lt_sys_path" && \
+	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+    fi
+  done
+  lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+  lt_foo="";
+  lt_count=0;
+  for (lt_i = NF; lt_i > 0; lt_i--) {
+    if ($lt_i != "" && $lt_i != ".") {
+      if ($lt_i == "..") {
+        lt_count++;
+      } else {
+        if (lt_count == 0) {
+          lt_foo="/" $lt_i lt_foo;
+        } else {
+          lt_count--;
+        }
+      }
+    }
+  }
+  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
+  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
+}'`
+  sys_lib_search_path_spec=`echo $lt_search_path_spec`
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi])
+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
+
+  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~
+      chmod a+x \$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
+    ;;
+
+  *)
+    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
+  ;;
+
+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`'
+  m4_if([$1], [],[
+  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 
+  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}${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
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[[123]]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  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
+    ;;
+  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
+  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+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'
+  ;;
+
+interix[[3-9]]*)
+  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'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+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
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-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'
+  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
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ 	]*hwcap[ 	]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
+  fi
+
+  # 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}${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
+  ;;
+
+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
+  ;;
+
+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
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+    *)                         need_version=no  ;;
+  esac
+  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
+  ;;
+
+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
+  ;;
+
+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"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+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'
+  ;;
+
+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.3*)
+  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
+  ;;
+
+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
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+    shlibpath_overrides_runpath=no
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    shlibpath_overrides_runpath=yes
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+	;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+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
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+AC_MSG_RESULT([$dynamic_linker])
+test "$dynamic_linker" = 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
+])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
+
+
+# _LT_AC_TAGCONFIG
+# ----------------
+AC_DEFUN([_LT_AC_TAGCONFIG],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+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
+
+  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
+  if test -z "$LTCFLAGS"; then
+    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
+  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)
+	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
+	;;
+
+      F77)
+	if test -n "$F77" && test "X$F77" != "Xno"; then
+	  AC_LIBTOOL_LANG_F77_CONFIG
+	else
+	  tagname=""
+	fi
+	;;
+
+      GCJ)
+	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
+	  AC_LIBTOOL_LANG_GCJ_CONFIG
+	else
+	  tagname=""
+	fi
+	;;
+
+      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.
+      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_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 DLLs
+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_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])
+])])
+
+
+# AC_PATH_TOOL_PREFIX
+# -------------------
+# find a file program which can recognize 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
+
+*** 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 recognize 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 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 variants of GNU ld 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_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 lds 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
+
+
+# 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='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+    else
+      reload_cmds='$LD$reload_flag -o $output$reload_objs'
+    fi
+    ;;
+esac
+])# 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 recognize 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.
+
+case $host_os in
+aix4* | aix5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+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'
+  ;;
+
+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',
+  # unless we find 'file', for example because we are cross-compiling.
+  if ( file / ) >/dev/null 2>&1; then
+    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+    lt_cv_file_magic_cmd='func_win32_libid'
+  else
+    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+    lt_cv_file_magic_cmd='$OBJDUMP -f'
+  fi
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+freebsd* | dragonfly*)
+  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|DragonFly)/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
+  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
+  ;;
+
+interix[[3-9]]*)
+  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
+  ;;
+
+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
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  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
+  ;;
+
+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
+  ;;
+
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+rdos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv4 | sysv4.3*)
+  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
+    ;;
+  pc)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  esac
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | 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 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_nm_to_check="${ac_tool_prefix}nm"
+  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+    lt_nm_to_check="$lt_nm_to_check nm"
+  fi
+  for lt_tmp_nm in $lt_nm_to_check; do
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+      IFS="$lt_save_ifs"
+      test -z "$ac_dir" && ac_dir=.
+      tmp_nm="$ac_dir/$lt_tmp_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"
+  done
+  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* | *-*-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
+
+
+# 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
+# AC_CONFIG_SUBDIRS is not called here.  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
+# AC_CONFIG_SUBDIRS is not called here.  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 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_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_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([_LT_AC_PROG_CXXCPP])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
+])# _LT_AC_LANG_CXX
+
+# _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
+
+# AC_LIBTOOL_F77
+# --------------
+# enable support for Fortran 77 libraries
+AC_DEFUN([AC_LIBTOOL_F77],
+[AC_REQUIRE([_LT_AC_LANG_F77])
+])# AC_LIBTOOL_F77
+
+
+# _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_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_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
+])# _LT_AC_LANG_GCJ
+
+
+# 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
+
+
+# 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='int main(){return(0);}'
+
+_LT_AC_SYS_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+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
+
+# Report which library types will 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* | aix5*)
+  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([_LT_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_flag_spec_ld, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+_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
+
+# 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=cpp
+
+# 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
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# 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
+  $as_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
+  $as_unset lt_cv_path_LD
+fi
+test -z "${LDCXX+set}" || LD=$LDCXX
+CC=${CXX-"c++"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+
+# 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_PROG_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 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'
+
+    _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" | \
+	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
+  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 -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 | grep "\-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
+      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
+
+    # 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
+	  :
+	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'
+      if test "$aix_use_runtimelinking" = yes; then
+	shared_flag="$shared_flag "'${wl}-G'
+      fi
+    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.
+    _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 '"\${wl}$no_entry_flag"' $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 '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_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'
+	# Exported symbols can be pulled into shared objects from archives
+	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+	# This is similar to how AIX traditionally builds its shared libraries.
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+      fi
+    fi
+    ;;
+
+  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(ld_shlibs, $1)=no
+    fi
+    ;;
+
+  chorus*)
+    case $cc_basename in
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+
+  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 $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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $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
+
+    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
+       _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 lds
+          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` $xlcverstring'
+          _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 lds
+          _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 $xlcverstring~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
+        ;;
+
+  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* | dragonfly*)
+    # 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.
+
+    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
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+      case $host_cpu in
+      hppa*64*|ia64*) ;;
+      *)
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+        ;;
+      esac
+    fi
+    case $host_cpu in
+    hppa*64*|ia64*)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+    *)
+      _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
+
+    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*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  ;;
+	ia64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  ;;
+	*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $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
+	    hppa*64*)
+	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      ;;
+	    ia64*)
+	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      ;;
+	    *)
+	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $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
+    ;;
+  interix[[3-9]]*)
+    _LT_AC_TAGVAR(hardcode_direct, $1)=no
+    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+    # Instead, shared libraries are loaded at an image base (0x10000000 by
+    # default) and relocated if they conflict, which is a slow very memory
+    # consuming and fragmenting process.  To avoid this, we pick a random,
+    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+    ;;
+  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 ${output_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}${output_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* | k*bsd*-gnu)
+    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)='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'
+
+	_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'
+	;;
+      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
+	  tmp_idyn=
+	  case $host_cpu in
+	    ia64*) tmp_idyn=' -i_dynamic';;
+	  esac
+  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $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'
+	;;
+      pgCC*)
+        # Portland Group C++ compiler
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+  	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $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'
+	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_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'
+
+	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'
+	;;
+      *)
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)
+	  # Sun C++ 5.9
+	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+
+	  # Not sure whether something based on
+	  # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+	  # would be better.
+	  output_verbose_link_cmd='echo'
+
+	  # 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'
+	  ;;
+	esac
+	;;
+    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*)
+    if test -f /usr/libexec/ld.so; then
+      _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'
+    else
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    fi
+    ;;
+  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)='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(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 ${output_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}${output_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 | grep "\-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)='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(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 ${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~
+	  $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 ${output_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}${output_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 | grep "\-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
+    ;;
+  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(archive_cmds_need_lc,$1)=yes
+	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -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}  ${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 compiler driver will combine and reorder linker options,
+	    # but understands `-z linker_flag'.
+	    # 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
+
+	output_verbose_link_cmd='echo'
+
+	# 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 | 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'
+
+	    # 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'
+
+	    # 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
+
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+	  case $host_os in
+	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+	  *)
+	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	    ;;
+	  esac
+	fi
+	;;
+    esac
+    ;;
+  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    runpath_var='LD_RUN_PATH'
+
+    case $cc_basename in
+      CC*)
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+      *)
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+    esac
+    ;;
+  sysv5* | sco3.2v5* | sco5v6*)
+    # Note: We can NOT use -z defs as we might desire, because we do not
+    # link with -lc, and that would cause any symbols used from libc to
+    # always be unresolved, which means just about no library would
+    # ever link correctly.  If we're not using GNU ld we use -z text
+    # though, which does catch some bad symbols but isn't as heavy-handed
+    # as -z defs.
+    # For security reasons, it is highly recommended that you always
+    # use absolute paths for naming shared libraries, and exclude the
+    # DT_RUNPATH tag from executables and libraries.  But doing so
+    # requires that you compile everything twice, which is a pain.
+    # So that behaviour is only enabled if SCOABSPATH is set to a
+    # non-empty value in the environment.  Most likely only useful for
+    # creating official distributions of packages.
+    # This is a hack until libtool officially supports absolute path
+    # names for shared libraries.
+    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+    runpath_var='LD_RUN_PATH'
+
+    case $cc_basename in
+      CC*)
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+      *)
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+    esac
+    ;;
+  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
+
+_LT_AC_TAGVAR(GCC, $1)="$GXX"
+_LT_AC_TAGVAR(LD, $1)="$LD"
+
+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_CONFIG($1)
+
+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
+
+# 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.
+
+  # 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)
+       # 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 a.exe
+else
+  echo "libtool.m4: error: problem compiling $1 test program"
+fi
+
+$rm -f confest.$objext
+
+# PORTME: override above test on systems where it is broken
+ifelse([$1],[CXX],
+[case $host_os in
+interix[[3-9]]*)
+  # Interix 3.5 installs completely hosed .la files for C++, so rather than
+  # hack all around it, let's just trust "g++" to DTRT.
+  _LT_AC_TAGVAR(predep_objects,$1)=
+  _LT_AC_TAGVAR(postdep_objects,$1)=
+  _LT_AC_TAGVAR(postdeps,$1)=
+  ;;
+
+linux*)
+  case `$CC -V 2>&1 | sed 5q` in
+  *Sun\ C*)
+    # Sun C++ 5.9
+    #
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+    if test "$solaris_use_stlport4" != yes; then
+      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+
+solaris*)
+  case $cc_basename in
+  CC*)
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+
+    # Adding this requires a known-good setup of shared libraries for
+    # Sun compiler versions before 5.6, else PIC objects from an old
+    # archive will be linked into the output, leading to subtle bugs.
+    if test "$solaris_use_stlport4" != yes; then
+      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+esac
+])
+
+case " $_LT_AC_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+])# AC_LIBTOOL_POSTDEP_PREDEP
+
+# 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)
+
+_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
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="\
+      subroutine t
+      return
+      end
+"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="\
+      program t
+      end
+"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${F77-"f77"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+
+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* | aix5*)
+  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])
+
+_LT_AC_TAGVAR(GCC, $1)="$G77"
+_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_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_F77_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 Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java 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
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${GCJ-"gcj"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+
+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_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
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# 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_CC_BASENAME([$compiler])
+_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
+  # 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 LTCFLAGS 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(fix_srcfile_path, $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(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
+
+  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, 2002, 2003, 2004, 2005, 2006, 2007
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# 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 1s/^X//"
+
+# 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
+
+# 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 disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# 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
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
+# 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)
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# 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 symbol stripping program
+STRIP=$lt_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"
+
+# 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_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 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)
+
+# 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)
+
+# 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)
+
+# 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)
+
+# 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)
+
+# 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)
+
+# 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_fix_srcfile_path
+
+# 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
+    ;;
+  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
+])# 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], [],
+    [_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([LT_AC_PROG_SED])
+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 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'"
+  ;;
+linux* | k*bsd*-gnu)
+  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*)
+  symcode='[[BDRT]]'
+  ;;
+sco3.2v5*)
+  symcode='[[DT]]'
+  ;;
+sysv4.2uw2*)
+  symcode='[[DT]]'
+  ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+  symcode='[[ABDT]]'
+  ;;
+sysv4)
+  symcode='[[DFNSTU]]'
+  ;;
+esac
+
+# 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
+
+# Try without a prefix undercore, then with it.
+for ac_symprfx in "" "_"; do
+
+  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+  symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+  # 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 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'
+
+	  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.
+      ;;
+    mingw* | cygwin* | 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).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      _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)=
+      ;;
+    interix[[3-9]]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+    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 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* | dragonfly*)
+	# 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)='${wl}-a ${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)='${wl}-a ${wl}archive'
+	    case $host_cpu in
+	    hppa*64*|ia64*)
+	      # +Z the default
+	      ;;
+	    *)
+	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	      ;;
+	    esac
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      interix*)
+	# This is c89, which is MS Visual C++ (no shared libs)
+	# Anyone wants to do a port?
+	;;
+      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* | k*bsd*-gnu)
+	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* | ecpc*)
+	    # 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'
+	    ;;
+	  pgCC*)
+	    # Portland Group C++ compiler.
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	  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'
+	    ;;
+	  *)
+	    case `$CC -V 2>&1 | sed 5q` in
+	    *Sun\ C*)
+	      # Sun C++ 5.9
+	      _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 '
+	      ;;
+	    esac
+	    ;;
+	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*)
+	;;
+      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
+	;;
+      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+	case $cc_basename in
+	  CC*)
+	    _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'
+	    ;;
+	esac
+	;;
+      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.
+      ;;
+
+    mingw* | cygwin* | 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).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      _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'
+      ;;
+
+    interix[[3-9]]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+
+    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 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)='-fPIC'
+	;;
+      esac
+      ;;
+
+    *)
+      _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
+      ;;
+      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
+       ;;
+
+    mingw* | cygwin* | 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,'
+      # 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'
+      ;;
+
+    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'
+      ;;
+
+    linux* | k*bsd*-gnu)
+      case $cc_basename 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'
+        ;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+        ;;
+      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'
+        ;;
+      *)
+        case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)
+	  # Sun C 5.9
+	  _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)='-Wl,'
+	  ;;
+	*Sun\ F*)
+	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
+	  _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)=''
+	  ;;
+	esac
+	;;
+      esac
+      ;;
+
+    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'
+      ;;
+
+    rdos*)
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    solaris*)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+      esac
+      ;;
+
+    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*)
+      _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'
+      ;;
+
+    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
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      _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'
+      ;;
+
+    unicos*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
+
+    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)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
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
+AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
+  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
+  $lt_tmp_static_flag,
+  [],
+  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
+])
+
+
+# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
+# ------------------------------------
+# See if the linker supports building shared libraries.
+AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+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 '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[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=
+  # Just being paranoid about ensuring that cc_basename is set.
+  _LT_CC_BASENAME([$compiler])
+  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
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  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}'
+
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    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
+    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
+
+    # 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 | 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(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)=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 '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    interix[[3-9]]*)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
+
+    gnu* | linux* | k*bsd*-gnu)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	tmp_addflag=
+	case $cc_basename,$host_cpu in
+	pgcc*)				# Portland Group C compiler
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag -Mnomain' ;;
+	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
+	  tmp_addflag=' -i_dynamic' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	esac
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)			# Sun C 5.9
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_sharedflag='-G' ;;
+	*Sun\ F*)			# Sun Fortran 8.3
+	  tmp_sharedflag='-G' ;;
+	*)
+	  tmp_sharedflag='-shared' ;;
+	esac
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+	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 '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+	fi
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    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 $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
+      ;;
+
+    solaris*)
+      if $LD -v 2>&1 | grep '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 | 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
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+	;;
+	*)
+	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
+	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
+	  else
+	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+	  fi
+	;;
+      esac
+      ;;
+
+    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 | 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
+
+    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
+      runpath_var=
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+    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 "$lt_prog_compiler_static"; 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 | 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
+
+	# 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
+
+      # 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
+  	  :
+	  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'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+      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.
+      _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 '"\${wl}$no_entry_flag"' $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 '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_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'
+	  # Exported symbols can be pulled into shared objects from archives
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+	  # This is similar to how AIX traditionally builds its shared libraries.
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${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
+      ;;
+
+    bsdi[[45]]*)
+      _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
+      # 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'
+      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
+      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      ;;
+
+    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 lds
+      _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` $xlcverstring'
+         _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 lds
+         _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 $xlcverstring~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
+      ;;
+
+    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* | dragonfly*)
+      _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*)
+      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
+
+      # 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'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+	_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'
+
+	# 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
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case $host_cpu in
+	hppa*64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -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*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
+	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+	  ;;
+	*)
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+	  # 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
+      ;;
+
+    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
+      ;;
+
+    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*)
+      if test -f /usr/libexec/ld.so; then
+	_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
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      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 "%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 ${output_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)=:
+      ;;
+
+    solaris*)
+      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
+      if test "$GCC" = yes; then
+	wlarc='${wl}'
+	_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
+	wlarc=''
+	_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]].*) ;;
+      *)
+	# The compiler driver will combine and reorder linker options,
+	# but understands `-z linker_flag'.  GCC discards it without `$wl',
+	# but is careful enough not to reorder.
+ 	# Supported since Solaris 2.6 (maybe 2.5.1?)
+	if test "$GCC" = yes; then
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	else
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+	fi
+	;;
+      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)
+      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
+      ;;
+
+    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*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    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
+
+#
+# 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*
+      echo "$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)
+	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $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
+
+
+# _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_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)
+])
+
+
+# Cheap backport of AS_EXECUTABLE_P and required macros
+# from Autoconf 2.59; we should not use $as_executable_p directly.
+
+# _AS_TEST_PREPARE
+# ----------------
+m4_ifndef([_AS_TEST_PREPARE],
+[m4_defun([_AS_TEST_PREPARE],
+[if test -x / >/dev/null 2>&1; then
+  as_executable_p='test -x'
+else
+  as_executable_p='test -f'
+fi
+])])# _AS_TEST_PREPARE
+
+# AS_EXECUTABLE_P
+# ---------------
+# Check whether a file is executable.
+m4_ifndef([AS_EXECUTABLE_P],
+[m4_defun([AS_EXECUTABLE_P],
+[AS_REQUIRE([_AS_TEST_PREPARE])dnl
+$as_executable_p $1[]dnl
+])])# AS_EXECUTABLE_P
+
+# 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
+IFS=$as_save_IFS
+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 && continue
+  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_SUBST([SED])
+AC_MSG_RESULT([$SED])
+])
+
+# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
+# 
+# Copyright © 2004 Scott James Remnant <scott at netsplit.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 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.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+	_pkg_min_version=m4_default([$1], [0.9.0])
+	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+		AC_MSG_RESULT([yes])
+	else
+		AC_MSG_RESULT([no])
+		PKG_CONFIG=""
+	fi
+		
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists.  Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+#
+# Similar to PKG_CHECK_MODULES, make sure that the first instance of
+# this or PKG_CHECK_MODULES is called, or make sure to call
+# PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+  m4_ifval([$2], [$2], [:])
+m4_ifvaln([$3], [else
+  $3])dnl
+fi])
+
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+    pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+    PKG_CHECK_EXISTS([$3],
+                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+		     [pkg_failed=yes])
+ else
+    pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
+
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
+
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+        _PKG_SHORT_ERRORS_SUPPORTED
+        if test $_pkg_short_errors_supported = yes; then
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
+        else 
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+	ifelse([$4], , [AC_MSG_ERROR(dnl
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT
+])],
+		[AC_MSG_RESULT([no])
+                $4])
+elif test $pkg_failed = untried; then
+	ifelse([$4], , [AC_MSG_FAILURE(dnl
+[The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
+		[$4])
+else
+	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+        AC_MSG_RESULT([yes])
+	ifelse([$3], , :, [$3])
+fi[]dnl
+])# PKG_CHECK_MODULES
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007  Free Software Foundation, Inc.
+#
+# This file 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.
+
+# 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.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.10'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version.  Point them to the right macro.
+m4_if([$1], [1.10.1], [],
+      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too.  Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.10.1])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
+
+# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file 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.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+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_CONDITIONAL                                            -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 8
+
+# 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])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+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])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 9
+
+# 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...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[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_$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.
+    : > 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)
+      # 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/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       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_$1_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --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='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+])
+
+# Generate code to set up dependency tracking.              -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+#serial 3
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  # Check whether this is an Automake generated Makefile or not.
+  # We used to match only the files named `Makefile.in', but
+  # some people rename them; so instead we look at the file content.
+  # Grep'ing the first line is not enough: some people post-process
+  # each Makefile.in and add a new line on top of each file to say so.
+  # Grep'ing the whole file is not good either: AIX grep has a line
+  # limit of 2048, but all sed's we know have understand at least 4000.
+  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+    dirpart=`AS_DIRNAME("$mf")`
+  else
+    continue
+  fi
+  # 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 '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=`AS_DIRNAME(["$file"])`
+    AS_MKDIR_P([$dirpart/$fdir])
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+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"])
+])
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 8
+
+# 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 -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 13
+
+# 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.
+
+# 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.60])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
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+  fi
+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
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+  [m4_fatal([AC_INIT should be called with package and version arguments])])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
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+                  [_AM_DEPENDENCIES(OBJC)],
+                  [define([AC_PROG_OBJC],
+                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])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_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file 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.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 2
+
+# 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])])
+
+# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
+# From Jim Meyering
+
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 4
+
+AC_DEFUN([AM_MAINTAINER_MODE],
+[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+  dnl maintainer-mode is disabled by default
+  AC_ARG_ENABLE(maintainer-mode,
+[  --enable-maintainer-mode  enable make rules and dependencies not useful
+			  (and sometimes confusing) to the casual installer],
+      USE_MAINTAINER_MODE=$enableval,
+      USE_MAINTAINER_MODE=no)
+  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
+  MAINT=$MAINTAINER_MODE_TRUE
+  AC_SUBST(MAINT)dnl
+]
+)
+
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+
+# Check to see how 'make' treats includes.	            -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 3
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+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])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 5
+
+# AM_PROG_CC_C_O
+# --------------
+# Like AC_PROG_CC_C_O, but changed for automake.
+AC_DEFUN([AM_PROG_CC_C_O],
+[AC_REQUIRE([AC_PROG_CC_C_O])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
+if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
+fi
+dnl Make sure AC_PROG_CC is never called again, or it will override our
+dnl setting of CC.
+m4_define([AC_PROG_CC],
+          [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
+])
+
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 5
+
+# 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)])
+
+
+# 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
+AC_REQUIRE_AUX_FILE([missing])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
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+#
+# This file 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.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+  [[\\/$]]* | ?:[[\\/]]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling.                     -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 3
+
+# _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])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# ---------------------------------------------------------------------------
+# Adds support for distributing Python modules and packages.  To
+# install modules, copy them to $(pythondir), using the python_PYTHON
+# automake variable.  To install a package with the same name as the
+# automake package, install to $(pkgpythondir), or use the
+# pkgpython_PYTHON automake variable.
+#
+# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
+# locations to install python extension modules (shared libraries).
+# Another macro is required to find the appropriate flags to compile
+# extension modules.
+#
+# If your package is configured with a different prefix to python,
+# users will have to add the install directory to the PYTHONPATH
+# environment variable, or create a .pth file (see the python
+# documentation for details).
+#
+# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
+# cause an error if the version of python installed on the system
+# doesn't meet the requirement.  MINIMUM-VERSION should consist of
+# numbers and dots only.
+AC_DEFUN([AM_PATH_PYTHON],
+ [
+  dnl Find a Python interpreter.  Python versions prior to 1.5 are not
+  dnl supported because the default installation locations changed from
+  dnl $prefix/lib/site-python in 1.4 to $prefix/lib/python1.5/site-packages
+  dnl in 1.5.
+  m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
+                    [python python2 python2.5 python2.4 python2.3 python2.2 dnl
+python2.1 python2.0 python1.6 python1.5])
+
+  m4_if([$1],[],[
+    dnl No version check is needed.
+    # Find any Python interpreter.
+    if test -z "$PYTHON"; then
+      AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
+    fi
+    am_display_PYTHON=python
+  ], [
+    dnl A version check is needed.
+    if test -n "$PYTHON"; then
+      # If the user set $PYTHON, use it and don't search something else.
+      AC_MSG_CHECKING([whether $PYTHON version >= $1])
+      AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
+			      [AC_MSG_RESULT(yes)],
+			      [AC_MSG_ERROR(too old)])
+      am_display_PYTHON=$PYTHON
+    else
+      # Otherwise, try each interpreter until we find one that satisfies
+      # VERSION.
+      AC_CACHE_CHECK([for a Python interpreter with version >= $1],
+	[am_cv_pathless_PYTHON],[
+	for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
+	  test "$am_cv_pathless_PYTHON" = none && break
+	  AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
+	done])
+      # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
+      if test "$am_cv_pathless_PYTHON" = none; then
+	PYTHON=:
+      else
+        AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
+      fi
+      am_display_PYTHON=$am_cv_pathless_PYTHON
+    fi
+  ])
+
+  if test "$PYTHON" = :; then
+  dnl Run any user-specified action, or abort.
+    m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
+  else
+
+  dnl Query Python for its version number.  Getting [:3] seems to be
+  dnl the best way to do this; it's what "site.py" does in the standard
+  dnl library.
+
+  AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
+    [am_cv_python_version=`$PYTHON -c "import sys; print sys.version[[:3]]"`])
+  AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
+
+  dnl Use the values of $prefix and $exec_prefix for the corresponding
+  dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX.  These are made
+  dnl distinct variables so they can be overridden if need be.  However,
+  dnl general consensus is that you shouldn't need this ability.
+
+  AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
+  AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
+
+  dnl At times (like when building shared libraries) you may want
+  dnl to know which OS platform Python thinks this is.
+
+  AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
+    [am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"`])
+  AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
+
+
+  dnl Set up 4 directories:
+
+  dnl pythondir -- where to install python scripts.  This is the
+  dnl   site-packages directory, not the python standard library
+  dnl   directory like in previous automake betas.  This behavior
+  dnl   is more consistent with lispdir.m4 for example.
+  dnl Query distutils for this directory.  distutils does not exist in
+  dnl Python 1.5, so we fall back to the hardcoded directory if it
+  dnl doesn't work.
+  AC_CACHE_CHECK([for $am_display_PYTHON script directory],
+    [am_cv_python_pythondir],
+    [am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null ||
+     echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`])
+  AC_SUBST([pythondir], [$am_cv_python_pythondir])
+
+  dnl pkgpythondir -- $PACKAGE directory under pythondir.  Was
+  dnl   PYTHON_SITE_PACKAGE in previous betas, but this naming is
+  dnl   more consistent with the rest of automake.
+
+  AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
+
+  dnl pyexecdir -- directory for installing python extension modules
+  dnl   (shared libraries)
+  dnl Query distutils for this directory.  distutils does not exist in
+  dnl Python 1.5, so we fall back to the hardcoded directory if it
+  dnl doesn't work.
+  AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
+    [am_cv_python_pyexecdir],
+    [am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null ||
+     echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"`])
+  AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
+
+  dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
+
+  AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
+
+  dnl Run any user-specified action.
+  $2
+  fi
+
+])
+
+
+# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
+# ---------------------------------------------------------------------------
+# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
+# Run ACTION-IF-FALSE otherwise.
+# This test uses sys.hexversion instead of the string equivalent (first
+# word of sys.version), in order to cope with versions such as 2.2c1.
+# hexversion has been introduced in Python 1.5.2; it's probably not
+# worth to support older versions (1.5.1 was released on October 31, 1998).
+AC_DEFUN([AM_PYTHON_CHECK_VERSION],
+ [prog="import sys, string
+# split strings by '.' and convert to numeric.  Append some zeros
+# because we need at least 4 digits for the hex conversion.
+minver = map(int, string.split('$2', '.')) + [[0, 0, 0]]
+minverhex = 0
+for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[[i]]
+sys.exit(sys.hexversion < minverhex)"
+  AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file 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.
+
+# AM_RUN_LOG(COMMAND)
+# -------------------
+# Run COMMAND, save the exit status in ac_status, and log it.
+# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
+AC_DEFUN([AM_RUN_LOG],
+[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
+   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   (exit $ac_status); }])
+
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 4
+
+# 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
+
+      # 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
+
+   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)])
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file 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.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# 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="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006  Free Software Foundation, Inc.
+#
+# This file 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.
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# Check how to create a tarball.                            -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 2
+
+# _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([m4/gtk-doc.m4])
+m4_include([m4/intltool.m4])
+m4_include([m4/python.m4])
+m4_include([m4/swig.m4])

Added: libgpod/trunk/libgpod/branches/upstream/current/bindings/Makefile.am
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/bindings/Makefile.am	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/bindings/Makefile.am	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,3 @@
+if HAVE_PYTHON
+SUBDIRS=python
+endif

Added: libgpod/trunk/libgpod/branches/upstream/current/bindings/Makefile.in
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/bindings/Makefile.in	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/bindings/Makefile.in	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,564 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  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@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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 = bindings
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \
+	$(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/python.m4 \
+	$(top_srcdir)/m4/swig.m4 $(top_srcdir)/configure.ac
+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 =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = python
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+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@
+GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@
+GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@
+GDKPIXBUF_REQ = @GDKPIXBUF_REQ@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+HALCALLOUTSDIR = @HALCALLOUTSDIR@
+HALFDIDIR = @HALFDIDIR@
+HAL_CFLAGS = @HAL_CFLAGS@
+HAL_LIBS = @HAL_LIBS@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
+INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
+INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
+INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
+INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
+INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
+INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
+INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
+INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@
+INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
+INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
+INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
+INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
+INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
+INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
+LDFLAGS = @LDFLAGS@
+LIBGPOD_CFLAGS = @LIBGPOD_CFLAGS@
+LIBGPOD_LIBS = @LIBGPOD_LIBS@
+LIBGPOD_MAJOR_VERSION = @LIBGPOD_MAJOR_VERSION@
+LIBGPOD_MICRO_VERSION = @LIBGPOD_MICRO_VERSION@
+LIBGPOD_MINOR_VERSION = @LIBGPOD_MINOR_VERSION@
+LIBGPOD_SO_VERSION = @LIBGPOD_SO_VERSION@
+LIBGPOD_VERSION = @LIBGPOD_VERSION@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_LIBS = @LIBXML_LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+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@
+PKG_CONFIG = @PKG_CONFIG@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+PYGOBJECT_CFLAGS = @PYGOBJECT_CFLAGS@
+PYGOBJECT_LIBS = @PYGOBJECT_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SGUTILS_LIBS = @SGUTILS_LIBS@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SWIG = @SWIG@
+SWIG_LIB = @SWIG_LIB@
+TAGLIB_CFLAGS = @TAGLIB_CFLAGS@
+TAGLIB_LIBS = @TAGLIB_LIBS@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+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@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+ at HAVE_PYTHON_TRUE@SUBDIRS = python
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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) --gnu  bindings/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  bindings/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+# 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):
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	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) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	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) \
+	  || eval $$failcom; \
+	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; nonemtpy = 1; } \
+	      END { if (nonempty) { 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; nonempty = 1; } \
+	      END { if (nonempty) { 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=; \
+	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; nonempty = 1; } \
+	      END { if (nonempty) { 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)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    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" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+	        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_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-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-info: install-info-recursive
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-ps: install-ps-recursive
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f Makefile
+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:
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+	install-strip
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am check check-am clean clean-generic clean-libtool \
+	ctags ctags-recursive distclean 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-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-man install-pdf install-pdf-am \
+	install-ps install-ps-am install-strip installcheck \
+	installcheck-am installdirs installdirs-am maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+	uninstall uninstall-am
+
+# 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:

Added: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/Makefile.am
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/bindings/python/Makefile.am	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/bindings/python/Makefile.am	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,66 @@
+SUBDIRS = examples tests
+
+EXTRA_DIST =                \
+        README.in           \
+        __init__.py         \
+        gpod.i.in           \
+        gpod_doc.i.in       \
+        gtkdoc-to-swig.xsl  \
+        gtkpod.py           \
+        ipod.py
+
+CLEANFILES =                \
+        *.pyc               \
+        *.pyo               \
+        _gpod.so            \
+        gpod.py             \
+        gpod_doc.i          \
+        gpod_wrap.*
+
+DISTCLEANFILES =            \
+        README              \
+        gpod.i
+
+README: README.in gpod.i
+	WRAPPER_LIST=`grep 'PyObject\* sw_[^_].*;' gpod.i | awk -F "[ (]" '{ print $$2 }' | sort -u | tr '\n' ' '`; \
+	sed \
+	    -e "s/@WRAPPER_LIST@/$${WRAPPER_LIST}/" \
+	    -e "/^sw_/ s/ $$//" \
+	    -e "/^sw_/ s/ /\n/g" \
+	    $< > $@
+
+if HAVE_PYTHON
+BUILT_SOURCES = gpod_wrap.c
+SWIG_INTERFACES = gpod.i gpod_doc.i
+LIBGPOD_CFLAGS += -fno-strict-aliasing
+INCLUDES = -I$(top_srcdir)/src
+
+gpoddir = $(pyexecdir)/gpod
+gpod_PYTHON =  __init__.py gtkpod.py ipod.py
+nodist_gpod_PYTHON = gpod.py
+gpod_LTLIBRARIES = _gpod.la
+nodist__gpod_la_SOURCES = gpod_wrap.c
+_gpod_la_CPPFLAGS = $(PYTHON_INCLUDES) $(LIBGPOD_CFLAGS) $(PYGOBJECT_CFLAGS) $(INCLUDES)
+_gpod_la_LDFLAGS = -module -avoid-version
+_gpod_la_LIBADD = $(LIBGPOD_LIBS) $(PYGOBJECT_LIBS) $(top_builddir)/src/libgpod.la
+
+gpod_doc.i: $(srcdir)/gpod_doc.i.in $(srcdir)/gtkdoc-to-swig.xsl
+	cat $< > $@
+	-if test -x "`which xsltproc 2>/dev/null`"; then \
+	    for xml in $(top_srcdir)/docs/reference/xml/*.xml; do \
+		xsltproc $(srcdir)/gtkdoc-to-swig.xsl $$xml; \
+	    done >> $@; \
+	fi
+
+gpod_wrap.c: $(SWIG_INTERFACES) $(nodist_gpod_PYTHON)
+	$(SWIG) -python $(INCLUDES) -o $@ $<
+
+gpod.py: $(SWIG_INTERFACES)
+	$(SWIG) -python -o $@ $<
+
+test:
+	$(MAKE) -C tests test
+
+uninstall-hook:
+	-rmdir --ignore-fail-on-non-empty $(DESTDIR)$(gpoddir)
+endif

Added: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/Makefile.in
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/bindings/python/Makefile.in	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/bindings/python/Makefile.in	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,810 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  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@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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@
+ at HAVE_PYTHON_TRUE@am__append_1 = -fno-strict-aliasing
+subdir = bindings/python
+DIST_COMMON = README $(am__gpod_PYTHON_DIST) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in $(srcdir)/gpod.i.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \
+	$(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/python.m4 \
+	$(top_srcdir)/m4/swig.m4 $(top_srcdir)/configure.ac
+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 = gpod.i
+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)$(gpoddir)" "$(DESTDIR)$(gpoddir)" \
+	"$(DESTDIR)$(gpoddir)"
+gpodLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(gpod_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+ at HAVE_PYTHON_TRUE@_gpod_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ at HAVE_PYTHON_TRUE@	$(am__DEPENDENCIES_1) \
+ at HAVE_PYTHON_TRUE@	$(top_builddir)/src/libgpod.la
+ at HAVE_PYTHON_TRUE@nodist__gpod_la_OBJECTS = _gpod_la-gpod_wrap.lo
+_gpod_la_OBJECTS = $(nodist__gpod_la_OBJECTS)
+_gpod_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(_gpod_la_LDFLAGS) \
+	$(LDFLAGS) -o $@
+ at HAVE_PYTHON_TRUE@am__gpod_la_rpath = -rpath $(gpoddir)
+DEFAULT_INCLUDES = -I. at am__isrc@ -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 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(nodist__gpod_la_SOURCES)
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
+am__gpod_PYTHON_DIST = __init__.py gtkpod.py ipod.py
+gpodPYTHON_INSTALL = $(INSTALL_DATA)
+nodist_gpodPYTHON_INSTALL = $(INSTALL_DATA)
+py_compile = $(top_srcdir)/py-compile
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+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@
+GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@
+GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@
+GDKPIXBUF_REQ = @GDKPIXBUF_REQ@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+HALCALLOUTSDIR = @HALCALLOUTSDIR@
+HALFDIDIR = @HALFDIDIR@
+HAL_CFLAGS = @HAL_CFLAGS@
+HAL_LIBS = @HAL_LIBS@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
+INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
+INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
+INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
+INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
+INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
+INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
+INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
+INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@
+INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
+INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
+INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
+INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
+INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
+INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
+LDFLAGS = @LDFLAGS@
+LIBGPOD_CFLAGS = @LIBGPOD_CFLAGS@ $(am__append_1)
+LIBGPOD_LIBS = @LIBGPOD_LIBS@
+LIBGPOD_MAJOR_VERSION = @LIBGPOD_MAJOR_VERSION@
+LIBGPOD_MICRO_VERSION = @LIBGPOD_MICRO_VERSION@
+LIBGPOD_MINOR_VERSION = @LIBGPOD_MINOR_VERSION@
+LIBGPOD_SO_VERSION = @LIBGPOD_SO_VERSION@
+LIBGPOD_VERSION = @LIBGPOD_VERSION@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_LIBS = @LIBXML_LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+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@
+PKG_CONFIG = @PKG_CONFIG@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+PYGOBJECT_CFLAGS = @PYGOBJECT_CFLAGS@
+PYGOBJECT_LIBS = @PYGOBJECT_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SGUTILS_LIBS = @SGUTILS_LIBS@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SWIG = @SWIG@
+SWIG_LIB = @SWIG_LIB@
+TAGLIB_CFLAGS = @TAGLIB_CFLAGS@
+TAGLIB_LIBS = @TAGLIB_LIBS@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+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@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = examples tests
+EXTRA_DIST = \
+        README.in           \
+        __init__.py         \
+        gpod.i.in           \
+        gpod_doc.i.in       \
+        gtkdoc-to-swig.xsl  \
+        gtkpod.py           \
+        ipod.py
+
+CLEANFILES = \
+        *.pyc               \
+        *.pyo               \
+        _gpod.so            \
+        gpod.py             \
+        gpod_doc.i          \
+        gpod_wrap.*
+
+DISTCLEANFILES = \
+        README              \
+        gpod.i
+
+ at HAVE_PYTHON_TRUE@BUILT_SOURCES = gpod_wrap.c
+ at HAVE_PYTHON_TRUE@SWIG_INTERFACES = gpod.i gpod_doc.i
+ at HAVE_PYTHON_TRUE@INCLUDES = -I$(top_srcdir)/src
+ at HAVE_PYTHON_TRUE@gpoddir = $(pyexecdir)/gpod
+ at HAVE_PYTHON_TRUE@gpod_PYTHON = __init__.py gtkpod.py ipod.py
+ at HAVE_PYTHON_TRUE@nodist_gpod_PYTHON = gpod.py
+ at HAVE_PYTHON_TRUE@gpod_LTLIBRARIES = _gpod.la
+ at HAVE_PYTHON_TRUE@nodist__gpod_la_SOURCES = gpod_wrap.c
+ at HAVE_PYTHON_TRUE@_gpod_la_CPPFLAGS = $(PYTHON_INCLUDES) $(LIBGPOD_CFLAGS) $(PYGOBJECT_CFLAGS) $(INCLUDES)
+ at HAVE_PYTHON_TRUE@_gpod_la_LDFLAGS = -module -avoid-version
+ at HAVE_PYTHON_TRUE@_gpod_la_LIBADD = $(LIBGPOD_LIBS) $(PYGOBJECT_LIBS) $(top_builddir)/src/libgpod.la
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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) --gnu  bindings/python/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  bindings/python/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+gpod.i: $(top_builddir)/config.status $(srcdir)/gpod.i.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-gpodLTLIBRARIES: $(gpod_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	test -z "$(gpoddir)" || $(MKDIR_P) "$(DESTDIR)$(gpoddir)"
+	@list='$(gpod_LTLIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    f=$(am__strip_dir) \
+	    echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(gpodLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(gpoddir)/$$f'"; \
+	    $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(gpodLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(gpoddir)/$$f"; \
+	  else :; fi; \
+	done
+
+uninstall-gpodLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(gpod_LTLIBRARIES)'; for p in $$list; do \
+	  p=$(am__strip_dir) \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(gpoddir)/$$p'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(gpoddir)/$$p"; \
+	done
+
+clean-gpodLTLIBRARIES:
+	-test -z "$(gpod_LTLIBRARIES)" || rm -f $(gpod_LTLIBRARIES)
+	@list='$(gpod_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+_gpod.la: $(_gpod_la_OBJECTS) $(_gpod_la_DEPENDENCIES) 
+	$(_gpod_la_LINK) $(am__gpod_la_rpath) $(_gpod_la_OBJECTS) $(_gpod_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/_gpod_la-gpod_wrap.Plo at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ 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@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ 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@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ 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 $@ $<
+
+_gpod_la-gpod_wrap.lo: gpod_wrap.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_gpod_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT _gpod_la-gpod_wrap.lo -MD -MP -MF $(DEPDIR)/_gpod_la-gpod_wrap.Tpo -c -o _gpod_la-gpod_wrap.lo `test -f 'gpod_wrap.c' || echo '$(srcdir)/'`gpod_wrap.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/_gpod_la-gpod_wrap.Tpo $(DEPDIR)/_gpod_la-gpod_wrap.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='gpod_wrap.c' object='_gpod_la-gpod_wrap.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_gpod_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o _gpod_la-gpod_wrap.lo `test -f 'gpod_wrap.c' || echo '$(srcdir)/'`gpod_wrap.c
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-gpodPYTHON: $(gpod_PYTHON)
+	@$(NORMAL_INSTALL)
+	test -z "$(gpoddir)" || $(MKDIR_P) "$(DESTDIR)$(gpoddir)"
+	@list='$(gpod_PYTHON)'; dlist=''; for p in $$list; do\
+	  if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
+	  if test -f $$b$$p; then \
+	    f=$(am__strip_dir) \
+	    dlist="$$dlist $$f"; \
+	    echo " $(gpodPYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(gpoddir)/$$f'"; \
+	    $(gpodPYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(gpoddir)/$$f"; \
+	  else :; fi; \
+	done; \
+	if test -n "$$dlist"; then \
+	  if test -z "$(DESTDIR)"; then \
+	    PYTHON=$(PYTHON) $(py_compile) --basedir "$(gpoddir)" $$dlist; \
+	  else \
+	    PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(gpoddir)" $$dlist; \
+	  fi; \
+	else :; fi
+
+uninstall-gpodPYTHON:
+	@$(NORMAL_UNINSTALL)
+	@list='$(gpod_PYTHON)'; dlist=''; for p in $$list; do\
+	  f=$(am__strip_dir) \
+	  rm -f "$(DESTDIR)$(gpoddir)/$$f"; \
+	  rm -f "$(DESTDIR)$(gpoddir)/$${f}c"; \
+	  rm -f "$(DESTDIR)$(gpoddir)/$${f}o"; \
+	done
+install-nodist_gpodPYTHON: $(nodist_gpod_PYTHON)
+	@$(NORMAL_INSTALL)
+	test -z "$(gpoddir)" || $(MKDIR_P) "$(DESTDIR)$(gpoddir)"
+	@list='$(nodist_gpod_PYTHON)'; dlist=''; for p in $$list; do\
+	  if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
+	  if test -f $$b$$p; then \
+	    f=$(am__strip_dir) \
+	    dlist="$$dlist $$f"; \
+	    echo " $(nodist_gpodPYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(gpoddir)/$$f'"; \
+	    $(nodist_gpodPYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(gpoddir)/$$f"; \
+	  else :; fi; \
+	done; \
+	if test -n "$$dlist"; then \
+	  if test -z "$(DESTDIR)"; then \
+	    PYTHON=$(PYTHON) $(py_compile) --basedir "$(gpoddir)" $$dlist; \
+	  else \
+	    PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(gpoddir)" $$dlist; \
+	  fi; \
+	else :; fi
+
+uninstall-nodist_gpodPYTHON:
+	@$(NORMAL_UNINSTALL)
+	@list='$(nodist_gpod_PYTHON)'; dlist=''; for p in $$list; do\
+	  f=$(am__strip_dir) \
+	  rm -f "$(DESTDIR)$(gpoddir)/$$f"; \
+	  rm -f "$(DESTDIR)$(gpoddir)/$${f}c"; \
+	  rm -f "$(DESTDIR)$(gpoddir)/$${f}o"; \
+	done
+
+# 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):
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	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) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	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) \
+	  || eval $$failcom; \
+	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; nonemtpy = 1; } \
+	      END { if (nonempty) { 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; nonempty = 1; } \
+	      END { if (nonempty) { 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=; \
+	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; nonempty = 1; } \
+	      END { if (nonempty) { 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)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    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" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-recursive
+all-am: Makefile $(LTLIBRARIES)
+installdirs: installdirs-recursive
+installdirs-am:
+	for dir in "$(DESTDIR)$(gpoddir)" "$(DESTDIR)$(gpoddir)" "$(DESTDIR)$(gpoddir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) 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:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(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."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+ at HAVE_PYTHON_FALSE@uninstall-hook:
+clean: clean-recursive
+
+clean-am: clean-generic clean-gpodLTLIBRARIES clean-libtool \
+	mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-gpodLTLIBRARIES install-gpodPYTHON \
+	install-nodist_gpodPYTHON
+
+install-dvi: install-dvi-recursive
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-info: install-info-recursive
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-ps: install-ps-recursive
+
+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-gpodLTLIBRARIES uninstall-gpodPYTHON \
+	uninstall-nodist_gpodPYTHON
+	@$(NORMAL_INSTALL)
+	$(MAKE) $(AM_MAKEFLAGS) uninstall-hook
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+	install-strip uninstall-am
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am check check-am clean clean-generic \
+	clean-gpodLTLIBRARIES clean-libtool ctags ctags-recursive \
+	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-dvi install-dvi-am install-exec \
+	install-exec-am install-gpodLTLIBRARIES install-gpodPYTHON \
+	install-html install-html-am install-info install-info-am \
+	install-man install-nodist_gpodPYTHON install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs installdirs-am \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+	uninstall-gpodLTLIBRARIES uninstall-gpodPYTHON uninstall-hook \
+	uninstall-nodist_gpodPYTHON
+
+
+README: README.in gpod.i
+	WRAPPER_LIST=`grep 'PyObject\* sw_[^_].*;' gpod.i | awk -F "[ (]" '{ print $$2 }' | sort -u | tr '\n' ' '`; \
+	sed \
+	    -e "s/@WRAPPER_LIST@/$${WRAPPER_LIST}/" \
+	    -e "/^sw_/ s/ $$//" \
+	    -e "/^sw_/ s/ /\n/g" \
+	    $< > $@
+
+ at HAVE_PYTHON_TRUE@gpod_doc.i: $(srcdir)/gpod_doc.i.in $(srcdir)/gtkdoc-to-swig.xsl
+ at HAVE_PYTHON_TRUE@	cat $< > $@
+ at HAVE_PYTHON_TRUE@	-if test -x "`which xsltproc 2>/dev/null`"; then \
+ at HAVE_PYTHON_TRUE@	    for xml in $(top_srcdir)/docs/reference/xml/*.xml; do \
+ at HAVE_PYTHON_TRUE@		xsltproc $(srcdir)/gtkdoc-to-swig.xsl $$xml; \
+ at HAVE_PYTHON_TRUE@	    done >> $@; \
+ at HAVE_PYTHON_TRUE@	fi
+
+ at HAVE_PYTHON_TRUE@gpod_wrap.c: $(SWIG_INTERFACES) $(nodist_gpod_PYTHON)
+ at HAVE_PYTHON_TRUE@	$(SWIG) -python $(INCLUDES) -o $@ $<
+
+ at HAVE_PYTHON_TRUE@gpod.py: $(SWIG_INTERFACES)
+ at HAVE_PYTHON_TRUE@	$(SWIG) -python -o $@ $<
+
+ at HAVE_PYTHON_TRUE@test:
+ at HAVE_PYTHON_TRUE@	$(MAKE) -C tests test
+
+ at HAVE_PYTHON_TRUE@uninstall-hook:
+ at HAVE_PYTHON_TRUE@	-rmdir --ignore-fail-on-non-empty $(DESTDIR)$(gpoddir)
+# 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:

Added: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/README
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/bindings/python/README	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/bindings/python/README	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,106 @@
+There are two ways to use the python libgpod bindings.  Both methods use the
+same namespace (gpod) for convenience.  Just "import gpod" to get started using
+either of them.
+
+The first method provides a 'Pythonic' API.  Most uses of this API will start by
+opening the database with gpod.Database() and then calling methods on the
+returned object.  For example, to read an iTunesDB from an iPod at /mnt/ipod
+and print the title for the tracks in the database:
+
+    import gpod
+    db = gpod.Database('/mnt/ipod')
+    for track in db:
+        print track['title']
+
+Please see ipod.py for the implementation details and the scripts in the
+examples directory for some ideas on how to use the bindings.
+
+
+The second method uses the same API as the C implementation.  Prefix the C
+function names with gpod.  For example, to read an iTunesDB from an iPod at
+/mnt/ipod and display the titles for each track:
+
+    import gpod
+    db = gpod.itdb_parse('/mnt/ipod', None)
+    tracks = gpod.sw_get_tracks(db)
+    for track in tracks:
+        print track.title
+
+See the libgpod C API documentation for the details and available functions.
+
+Note: The C API is translated to Python using SWIG (Simplified Wrapper and
+Interface Generator).  This automated translation sometimes exposes functions
+which return data types that are not useful in Python and require helper
+functions in the bindings.  An example is listing playlists; the C API would
+return a GList which means nothing to Python, so a helper function is provided
+that returns a Python list.  These helper functions are prefixed with sw_ to
+denote that they are not native libgpod functions.
+
+The current helper functions are:
+
+sw_get_list_len
+sw_get_photo
+sw_get_photoalbum
+sw_get_photoalbum_members
+sw_get_photoalbums
+sw_get_photos
+sw_get_playlist
+sw_get_playlists
+sw_get_playlist_tracks
+sw_get_rule
+sw_get_track
+sw_get_tracks
+sw_get_track_userdata
+sw_ipod_device_to_dict
+sw_set_track_userdata
+
+Please see the example scripts for ideas on how to use these functions.
+
+
+The time_t mapping has changed recently:
+
++------------------------+-------------+-------------+
+|Version                 | Reading     | Writing     |
+|                        |             |             |
++------------------------+-------------+-------------+
+|libgpod >= 0.5.4        |C style API: |C style API: |
+|(SVN >= r1672)          |As a unix    |As a unix    |
+|                        |timestamp    |timestamp    |
+|                        |integer      |integer or a |
+|                        |             |Python       |
+|                        |OO style API:|datetime     |
+|                        |As a Python  |instance     |
+|                        |datetime     |             |
+|                        |             |OO style API:|
+|                        |             |As a unix    |
+|                        |             |timestamp    |
+|                        |             |integer or a |
+|                        |             |Python       |
+|                        |             |datetime     |
+|                        |             |instance     |
+|                        |             |             |
++------------------------+-------------+-------------+
+|libgpod 0.5.0 - 0.5.2   |As a unix    |As a unix    |
+|(SVN r1433 - r1669)     |timestamp    |timestamp    |
+|                        |integer      |integer      |
+|                        |             |             |
++------------------------+-------------+-------------+
+|libgpod <= 0.4.2        |As an integer|As an integer|
+|(SVN < r1417)           |with a       |with a       |
+|                        |2082844800   |2082844800   |
+|                        |offset       |offset       |
++------------------------+-------------+-------------+
+
+This table means that as a user of the Python bindings, you likely
+want to detect libgpod < 0.5.0. One way would be to test for the
+presence of some of the renamed constants in libgpod >= 0.5.0:
+
+    # libgpod >= 0.5.0 doesn't use mac-type timestamps anymore.  check
+    # if we're using a newer version by looking for a renamed constant.
+    if hasattr(gpod, 'ITDB_SPL_STRING_MAXLEN'):
+        track.time_released = int(time.mktime(ipod_date)
+    else:
+        track.time_release = int(time.mktime(ipod_date) + 2082844800
+
+(Since libgpod 0.5.4 (SVN r1633) there exists a gpod.version_info
+tuple, which will make such things easier to cope with in the future.)

Added: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/README.in
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/bindings/python/README.in	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/bindings/python/README.in	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,92 @@
+There are two ways to use the python libgpod bindings.  Both methods use the
+same namespace (gpod) for convenience.  Just "import gpod" to get started using
+either of them.
+
+The first method provides a 'Pythonic' API.  Most uses of this API will start by
+opening the database with gpod.Database() and then calling methods on the
+returned object.  For example, to read an iTunesDB from an iPod at /mnt/ipod
+and print the title for the tracks in the database:
+
+    import gpod
+    db = gpod.Database('/mnt/ipod')
+    for track in db:
+        print track['title']
+
+Please see ipod.py for the implementation details and the scripts in the
+examples directory for some ideas on how to use the bindings.
+
+
+The second method uses the same API as the C implementation.  Prefix the C
+function names with gpod.  For example, to read an iTunesDB from an iPod at
+/mnt/ipod and display the titles for each track:
+
+    import gpod
+    db = gpod.itdb_parse('/mnt/ipod', None)
+    tracks = gpod.sw_get_tracks(db)
+    for track in tracks:
+        print track.title
+
+See the libgpod C API documentation for the details and available functions.
+
+Note: The C API is translated to Python using SWIG (Simplified Wrapper and
+Interface Generator).  This automated translation sometimes exposes functions
+which return data types that are not useful in Python and require helper
+functions in the bindings.  An example is listing playlists; the C API would
+return a GList which means nothing to Python, so a helper function is provided
+that returns a Python list.  These helper functions are prefixed with sw_ to
+denote that they are not native libgpod functions.
+
+The current helper functions are:
+
+ at WRAPPER_LIST@
+
+Please see the example scripts for ideas on how to use these functions.
+
+
+The time_t mapping has changed recently:
+
++------------------------+-------------+-------------+
+|Version                 | Reading     | Writing     |
+|                        |             |             |
++------------------------+-------------+-------------+
+|libgpod >= 0.5.4        |C style API: |C style API: |
+|(SVN >= r1672)          |As a unix    |As a unix    |
+|                        |timestamp    |timestamp    |
+|                        |integer      |integer or a |
+|                        |             |Python       |
+|                        |OO style API:|datetime     |
+|                        |As a Python  |instance     |
+|                        |datetime     |             |
+|                        |             |OO style API:|
+|                        |             |As a unix    |
+|                        |             |timestamp    |
+|                        |             |integer or a |
+|                        |             |Python       |
+|                        |             |datetime     |
+|                        |             |instance     |
+|                        |             |             |
++------------------------+-------------+-------------+
+|libgpod 0.5.0 - 0.5.2   |As a unix    |As a unix    |
+|(SVN r1433 - r1669)     |timestamp    |timestamp    |
+|                        |integer      |integer      |
+|                        |             |             |
++------------------------+-------------+-------------+
+|libgpod <= 0.4.2        |As an integer|As an integer|
+|(SVN < r1417)           |with a       |with a       |
+|                        |2082844800   |2082844800   |
+|                        |offset       |offset       |
++------------------------+-------------+-------------+
+
+This table means that as a user of the Python bindings, you likely
+want to detect libgpod < 0.5.0. One way would be to test for the
+presence of some of the renamed constants in libgpod >= 0.5.0:
+
+    # libgpod >= 0.5.0 doesn't use mac-type timestamps anymore.  check
+    # if we're using a newer version by looking for a renamed constant.
+    if hasattr(gpod, 'ITDB_SPL_STRING_MAXLEN'):
+        track.time_released = int(time.mktime(ipod_date)
+    else:
+        track.time_release = int(time.mktime(ipod_date) + 2082844800
+
+(Since libgpod 0.5.4 (SVN r1633) there exists a gpod.version_info
+tuple, which will make such things easier to cope with in the future.)

Added: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/__init__.py
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/bindings/python/__init__.py	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/bindings/python/__init__.py	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,12 @@
+"""Manage tracks and playlists on an iPod.
+
+The gpod module allows you to add and remove tracks, create and edit
+playlists, and other iPod tasks.
+
+"""
+
+from gpod import *
+from ipod import *
+
+__all__ = ["DatabaseException", "TrackException",
+           "Database","Track","Playlist"]

Added: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/Makefile.am
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/Makefile.am	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/Makefile.am	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,10 @@
+EXTRA_DIST =                            \
+        add_song.py                     \
+        coverart_fetch.py               \
+        create_mp3_tags_from_itdb.py    \
+	fix_empty_artist_field.py	\
+        play_with_ipod_api.py           \
+        play_with_smart_playlists.py    \
+        save_photos.py                  \
+        tag_genre_from_audioscrobber.py \
+        toy_around.py

Added: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/Makefile.in
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/Makefile.in	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/Makefile.in	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,416 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  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@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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 = bindings/python/examples
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \
+	$(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/python.m4 \
+	$(top_srcdir)/m4/swig.m4 $(top_srcdir)/configure.ac
+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 =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+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@
+GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@
+GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@
+GDKPIXBUF_REQ = @GDKPIXBUF_REQ@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+HALCALLOUTSDIR = @HALCALLOUTSDIR@
+HALFDIDIR = @HALFDIDIR@
+HAL_CFLAGS = @HAL_CFLAGS@
+HAL_LIBS = @HAL_LIBS@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
+INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
+INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
+INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
+INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
+INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
+INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
+INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
+INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@
+INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
+INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
+INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
+INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
+INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
+INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
+LDFLAGS = @LDFLAGS@
+LIBGPOD_CFLAGS = @LIBGPOD_CFLAGS@
+LIBGPOD_LIBS = @LIBGPOD_LIBS@
+LIBGPOD_MAJOR_VERSION = @LIBGPOD_MAJOR_VERSION@
+LIBGPOD_MICRO_VERSION = @LIBGPOD_MICRO_VERSION@
+LIBGPOD_MINOR_VERSION = @LIBGPOD_MINOR_VERSION@
+LIBGPOD_SO_VERSION = @LIBGPOD_SO_VERSION@
+LIBGPOD_VERSION = @LIBGPOD_VERSION@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_LIBS = @LIBXML_LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+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@
+PKG_CONFIG = @PKG_CONFIG@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+PYGOBJECT_CFLAGS = @PYGOBJECT_CFLAGS@
+PYGOBJECT_LIBS = @PYGOBJECT_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SGUTILS_LIBS = @SGUTILS_LIBS@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SWIG = @SWIG@
+SWIG_LIB = @SWIG_LIB@
+TAGLIB_CFLAGS = @TAGLIB_CFLAGS@
+TAGLIB_LIBS = @TAGLIB_LIBS@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+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@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+EXTRA_DIST = \
+        add_song.py                     \
+        coverart_fetch.py               \
+        create_mp3_tags_from_itdb.py    \
+	fix_empty_artist_field.py	\
+        play_with_ipod_api.py           \
+        play_with_smart_playlists.py    \
+        save_photos.py                  \
+        tag_genre_from_audioscrobber.py \
+        toy_around.py
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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) --gnu  bindings/python/examples/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  bindings/python/examples/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    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_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-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+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:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	distclean distclean-generic distclean-libtool distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-pdf \
+	install-pdf-am install-ps install-ps-am 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
+
+# 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:

Added: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/add_song.py
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/add_song.py	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/add_song.py	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,120 @@
+#!/usr/bin/python
+
+##  Copyright (C) 2006 Nick Piper <nick-gtkpod at nickpiper co uk>
+##  Part of the gtkpod project.
+ 
+##  URL: http://www.gtkpod.org/
+##  URL: http://gtkpod.sourceforge.net/
+
+##  The code contained in this file is free software; you can redistribute
+##  it and/or modify it under the terms of the GNU Lesser General Public
+##  License as published by the Free Software Foundation; either version
+##  2.1 of the License, or (at your option) any later version.
+
+##  This file 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
+##  Lesser General Public License for more details.
+
+##  You should have received a copy of the GNU Lesser General Public
+##  License along with this code; if not, write to the Free Software
+##  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+# this file is just a little example to see how you could add music
+
+import os, os.path
+import gpod
+import sys
+from optparse import OptionParser
+import urlparse, urllib2
+import tempfile
+import shutil
+
+def download(path):
+    print "Downloading %s" % path
+    remotefile = urllib2.urlopen(path)
+    try:
+        size = int(remotefile.info()['Content-Length'])
+    except KeyError:
+        size = None
+    hndl, tempfilename = tempfile.mkstemp('.mp3')
+    temp = open(tempfilename,"wb")
+    fetched = 0
+    while 1:
+        buf = remotefile.read(1024*20)
+        if not buf: break
+        temp.write(buf)
+        fetched += len(buf)
+        if size:
+            sys.stdout.write("%.02f%% of %s Bytes\r" % (100*fetched / float(size), size))
+        else:
+            sys.stdout.write(" Fetched %d bytes\r" % fetched)
+        sys.stdout.flush()
+    temp.close()
+    remotefile.close()
+    return tempfilename
+
+
+parser = OptionParser()
+parser.add_option("-m", "--mountpoint", dest="mountpoint",
+                  default="/mnt/ipod",
+                  help="use iPod at MOUNTPOINT", metavar="MOUNTPOINT")
+parser.add_option("-l", "--playlist", dest="playlist",
+                  help="add tracks to PLAYLIST", metavar="PLAYLIST")
+parser.add_option("-p", "--podcast",
+                  dest="ispodcast",
+                  action="store_true",
+                  default=False,
+                  help="add to podcast playlist")
+(options, args) = parser.parse_args()
+
+if len(args) == 0:
+    parser.error("Requires an mp3 to add.")
+
+db = gpod.Database(options.mountpoint)
+
+
+playlist = None
+if options.playlist:
+    for pl in db.Playlists:
+        if pl.name == options.playlist:
+            playlist = pl
+    if not playlist:
+        playlist = db.new_Playlist(title=options.playlist)
+        print "Created new playlist %s" % playlist
+
+
+deleteWhenDone = []
+
+for path in args:
+    transport = urlparse.urlsplit(path)[0]
+    if transport:
+        path = download(path)
+        deleteWhenDone.append(path)
+
+    try:
+        track = db.new_Track(filename=path, podcast=options.ispodcast)
+    except gpod.TrackException, e:
+        print "Exception handling %s: %s" % (path, e)
+        continue # skip this track
+
+    print "Added %s to database" % track
+
+    if playlist:
+        print " adding to playlist %s" % playlist
+        playlist.add(track)
+
+def print_progress(database, track, i, total):
+    sys.stdout.write("Copying to iPod %04d/%d: %s\r" % (i,total,track))
+    sys.stdout.flush()
+        
+print "Copying to iPod"
+db.copy_delayed_files(callback=print_progress)
+
+[os.unlink(f) for f in deleteWhenDone]
+
+print "Saving database"
+db.close()
+print "Saved db"
+
+


Property changes on: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/add_song.py
___________________________________________________________________
Added: svn:executable
   + 

Added: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/coverart_fetch.py
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/coverart_fetch.py	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/coverart_fetch.py	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,104 @@
+#!/usr/bin/python
+
+##  Copyright (C) 2005 Nick Piper <nick-gtkpod at nickpiper co uk>
+##  Part of the gtkpod project.
+ 
+##  URL: http://www.gtkpod.org/
+##  URL: http://gtkpod.sourceforge.net/
+
+##  The code contained in this file is free software; you can redistribute
+##  it and/or modify it under the terms of the GNU Lesser General Public
+##  License as published by the Free Software Foundation; either version
+##  2.1 of the License, or (at your option) any later version.
+
+##  This file 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
+##  Lesser General Public License for more details.
+
+##  You should have received a copy of the GNU Lesser General Public
+##  License along with this code; if not, write to the Free Software
+##  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+##  $Id: coverart_fetch.py 1662 2007-07-31 20:42:54Z tmzullinger $
+
+import os, os.path
+import gpod
+import sys
+import amazon
+import urllib
+import gtk
+from optparse import OptionParser
+
+parser = OptionParser()
+parser.add_option("-m", "--mountpoint", dest="mountpoint",
+                  default="/mnt/ipod",
+                  help="use iPod at MOUNTPOINT", metavar="MOUNTPOINT")
+(options, args) = parser.parse_args()
+
+db = gpod.Database(options.mountpoint)
+
+# set your key here, or see amazon.py for a list of other places to
+# store it.
+amazon.setLicense('')
+
+images = {}
+
+for track in db:
+    if track.get_coverart().thumbnails:
+        #print " Already has artwork, skipping."
+        # note we could remove it with track.set_coverart(None)
+        continue
+
+    print "%(artist)s, %(album)s, %(title)s" % track
+
+    if not (track['artist'] and track['album']):
+        print " Need an artist AND album name, skipping."       
+        continue
+    
+    # avoid fetching again if we already had a suitable image
+    if not images.has_key((track['album'],track['artist'])):
+        query = "%(album)s + %(artist)s" % track
+        # nasty hacks to get better hits. Is there a library out there
+        # for this?  Note we take out double quotes too: Amazon place 
+        # this string literally into their XML response, so can end up 
+        # giving us back: <Arg value="search"term" 
+        # name="KeywordSearch"> which is not well formed :-( 
+        for term in ["Disk 1", "Disk 2", '12"', '12 "','"','&']: 
+            query = query.replace(term,"") 
+        print " Searching for %s: " % query
+        try:
+            albums = amazon.searchByKeyword(query,
+                                            type="lite",
+                                            product_line="music")
+        except amazon.AmazonError, e:
+            print e
+            albums = []
+                
+        if len(albums) == 0:
+            continue
+        album = albums[0]
+
+        try:
+            image_data = urllib.urlopen(album.ImageUrlLarge).read()
+        except:
+            print " Failed to download from %s" % album.ImageUrlLarge
+            continue
+        loader = gtk.gdk.PixbufLoader()
+        loader.write(image_data)
+        loader.close()
+        pixbuf = loader.get_pixbuf()
+        if (pixbuf.get_width() > 10 or pixbuf.get_height() > 10):
+            print " Fetched image"
+            images[(track['album'],track['artist'])] = pixbuf
+
+    try:
+        track.set_coverart(images[(track['album'],track['artist'])])
+        print " Added thumbnails"
+    except KeyError:
+        print " No image available"
+
+
+print "Saving database"
+db.close()
+print "Saved db"


Property changes on: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/coverart_fetch.py
___________________________________________________________________
Added: svn:executable
   + 

Added: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/create_mp3_tags_from_itdb.py
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/create_mp3_tags_from_itdb.py	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/create_mp3_tags_from_itdb.py	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,77 @@
+#!/usr/bin/env python
+# create_mp3_tags_from_itdb.py (Populate iPod's MP3 tags with data from iTunesDB)
+# Copyright (c) 20060423 Thomas Perl <thp at perli.net>
+#
+# I wrote this small script to populate MP3 files on my iPod that have set 
+# artist/title/album data in their iTunesDB entry, but not in their ID3 tag.
+#
+# This makes it possible to import your iPod_Control folder with any tool
+# you like or even import it into Rockbox' (www.rockbox.org) nifty TagCache.
+#
+# This file comes with no warranty. It might even kill your iPod, delete all
+# your songs, or do some other nasty stuff. Then again, it might just work ;)
+#
+# Release under the terms of the GNU LGPL.
+#
+#  The code contained in this file is free software; you can redistribute
+#  it and/or modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either version
+#  2.1 of the License, or (at your option) any later version.
+#
+#  This file 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
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this code; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+#
+
+import gpod
+import mutagen.mp3
+
+# please specify your iPod mountpoint here..
+IPOD_MOUNT = '/mnt/ipod/'
+
+itdb = gpod.itdb_parse( IPOD_MOUNT, None)
+
+if not itdb:
+    print 'Cannot open iPod at %s' % ( IPOD_MOUNT )
+    sys.exit( 2)
+
+# just for some stats..
+counter_upd = 0
+counter_left = 0
+
+for track in gpod.sw_get_tracks( itdb):
+    if track.artist is None or track.title is None or track.album is None:
+        # silently ignore
+        continue
+
+    filename = gpod.itdb_filename_on_ipod( track)
+    try:
+        mp3 = mutagen.mp3.MP3(filename)
+        if not mp3.tags:
+            print ''
+            print '%s has no id3 tags' % ( filename )
+            print 'iTDB says: AR = %s, TI = %s, AL = %s' % ( track.artist, track.title, track.album )
+            mp3.add_tags() # create header
+            mp3.tags.add(mutagen.id3.TPE1(3,track.artist))
+            mp3.tags.add(mutagen.id3.TALB(3,track.album))
+            mp3.tags.add(mutagen.id3.TIT2(3,track.title))
+            mp3.tags.add(mutagen.id3.TXXX(3,"Taggger","tagged from itdb with libgpod"))
+            mp3.save()
+            counter_upd += 1
+            print 'wrote tags to: %s' % ( filename )
+        else:
+            counter_left += 1            
+    except Exception, e:
+        print 'informative debug output: something went wrong.. : %s' % e
+        counter_left = counter_left + 1
+
+print ''
+print ' ++ results ++'
+print "updated: %d\nleft as-is: %d" % ( counter_upd, counter_left )
+print ''
+


Property changes on: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/create_mp3_tags_from_itdb.py
___________________________________________________________________
Added: svn:executable
   + 

Added: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/fix_empty_artist_field.py
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/fix_empty_artist_field.py	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/fix_empty_artist_field.py	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,52 @@
+#!/usr/bin/python
+"""
+Fix iTunesDB tracks that have filename-like titles, but no artist
+-----------------------------------------------------------------
+
+Edit tracks that have no artist, but a title that looks like a 
+MP3 filename, by trying to split the title into Artist and Title 
+fields and then updating the fields in the iTunesDB.
+
+Author: Thomas Perl <thpinfo.com>, 2008-03-28
+"""
+
+import gpod
+import os.path
+import sys
+
+if len(sys.argv) == 1:
+    print 'Usage: python %s /path/to/ipod' % os.path.basename(sys.argv[0])
+    print __doc__
+    sys.exit(-1)
+else:
+    mount_point = sys.argv[-1]
+
+try:
+    db = gpod.Database(mount_point)
+except gpod.ipod.DatabaseException, dbe:
+    print 'Error opening your iPod database: %s' % dbe
+    sys.exit(-2)
+
+(updated, count) = (0, len(db))
+
+print 'Database opened: %d tracks to consider' % count
+for track in db:
+    # If the track has a ".mp3" title and no artist, try to fix it
+    if track['title'].lower().endswith('.mp3') and track['artist'] is None:
+        # Assume "Artist - Title.mp3" file names
+        items = os.path.splitext(track['title'])[0].split(' - ')
+        if len(items) == 2:
+            (artist, title) = items
+            print 'Correcting: %s' % track['title']
+            track['artist'] = artist
+            track['title'] = artist
+            updated += 1
+        else:
+            # Doesn't look like "Artist - Title.mp3", leave untouched
+            print 'Leaving untouched: %s' % repr(items)
+
+print 'Saving iPod database...'
+db.close()
+
+print 'Finished. %d tracks updated, %d tracks untouched' % (updated, count-updated)
+

Added: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/play_with_ipod_api.py
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/play_with_ipod_api.py	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/play_with_ipod_api.py	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,16 @@
+#!/usr/bin/python
+
+import gpod
+
+db = gpod.Database()
+
+print db
+
+for track in db[4:20]:
+    print track
+    print track['title']
+
+for pl in db.Playlists:
+    print pl
+    for track in pl:
+        print " ", track


Property changes on: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/play_with_ipod_api.py
___________________________________________________________________
Added: svn:executable
   + 

Added: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/play_with_smart_playlists.py
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/play_with_smart_playlists.py	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/play_with_smart_playlists.py	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,55 @@
+#!/usr/bin/python
+
+##  Copyright (C) 2006 Nick Piper <nick-gtkpod at nickpiper co uk>
+##  Part of the gtkpod project.
+ 
+##  URL: http://www.gtkpod.org/
+##  URL: http://gtkpod.sourceforge.net/
+
+##  The code contained in this file is free software; you can redistribute
+##  it and/or modify it under the terms of the GNU Lesser General Public
+##  License as published by the Free Software Foundation; either version
+##  2.1 of the License, or (at your option) any later version.
+
+##  This file 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
+##  Lesser General Public License for more details.
+
+##  You should have received a copy of the GNU Lesser General Public
+##  License along with this code; if not, write to the Free Software
+##  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+import gpod
+import time
+from optparse import OptionParser
+
+parser = OptionParser()
+parser.add_option("-m", "--mountpoint", dest="mountpoint",
+                  default="/mnt/ipod",
+                  help="use iPod at MOUNTPOINT", metavar="MOUNTPOINT")
+(options, args) = parser.parse_args()
+
+
+itdb = gpod.itdb_parse(options.mountpoint, None)
+if not itdb:
+    print "Failed to read iPod at %s" % options.mountpoint
+    sys.exit(2)
+itdb.mountpoint = options.mountpoint
+
+for playlist in gpod.sw_get_playlists(itdb):
+  if playlist.is_spl:
+      n = gpod.sw_get_list_len(playlist.splrules.rules)
+      splrules = [gpod.sw_get_rule(playlist.splrules.rules,i) for i in xrange(n)]
+      print "Playlist: %s" % playlist.name
+      for i in xrange(gpod.sw_get_list_len(playlist.splrules.rules)):
+          rule = gpod.sw_get_rule(playlist.splrules.rules, i)
+          print "|  field: %4d          action: %4d    |"  % (rule.field,rule.action)
+          print "|  string: %25s    |"                     % rule.string
+          print "|  fromvalue: %4d    fromdate: %4d    |"  % (rule.fromvalue,rule.fromdate)
+          print "|  fromunits: %4d                      |" % rule.fromunits
+      print "Contains:"
+      for track in gpod.sw_get_playlist_tracks(playlist):
+          print track.title, track.artist, time.strftime("%c",
+                                                         time.localtime(track.time_added - 2082844800))


Property changes on: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/play_with_smart_playlists.py
___________________________________________________________________
Added: svn:executable
   + 

Added: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/save_photos.py
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/save_photos.py	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/save_photos.py	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,41 @@
+#!/usr/bin/python
+
+##  Copyright (C) 2007 Nick Piper <nick-gtkpod at nickpiper co uk>
+##  Part of the gtkpod project.
+ 
+##  URL: http://www.gtkpod.org/
+##  URL: http://gtkpod.sourceforge.net/
+
+##  The code contained in this file is free software; you can redistribute
+##  it and/or modify it under the terms of the GNU Lesser General Public
+##  License as published by the Free Software Foundation; either version
+##  2.1 of the License, or (at your option) any later version.
+
+##  This file 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
+##  Lesser General Public License for more details.
+
+##  You should have received a copy of the GNU Lesser General Public
+##  License along with this code; if not, write to the Free Software
+##  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+# this file is just a little example to see how you could read photos
+
+import gpod
+
+if not hasattr(gpod.Photo, 'get_pixbuf'):
+    print 'Sorry, gpod was built without pixbuf support.'
+    raise SystemExit
+
+photodb = gpod.PhotoDatabase("/mnt/ipod")
+
+print photodb
+for album in photodb.PhotoAlbums:
+    print " ", album
+    for photo in album:
+        print "  ", photo
+        for w,h,s in ((0,0,'small'), (-1,-1,'large')):
+            photo.get_pixbuf(w,h).save("/tmp/%d-%s.png" % (photo['id'],s),"png")
+
+photodb.close()


Property changes on: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/save_photos.py
___________________________________________________________________
Added: svn:executable
   + 

Added: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/tag_genre_from_audioscrobber.py
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/tag_genre_from_audioscrobber.py	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/tag_genre_from_audioscrobber.py	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,79 @@
+#!/usr/bin/python
+
+##  Copyright (C) 2005 Nick Piper <nick-gtkpod at nickpiper co uk>
+##  Part of the gtkpod project.
+ 
+##  URL: http://www.gtkpod.org/
+##  URL: http://gtkpod.sourceforge.net/
+
+##  The code contained in this file is free software; you can redistribute
+##  it and/or modify it under the terms of the GNU Lesser General Public
+##  License as published by the Free Software Foundation; either version
+##  2.1 of the License, or (at your option) any later version.
+
+##  This file 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
+##  Lesser General Public License for more details.
+
+##  You should have received a copy of the GNU Lesser General Public
+##  License along with this code; if not, write to the Free Software
+##  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+##  $Id: tag_genre_from_audioscrobber.py 1228 2006-04-07 14:51:40Z nicholas $
+
+
+import os, os.path
+import gpod
+import sys
+from xml import xpath
+from xml.dom import minidom
+from xml.parsers.expat import ExpatError
+import urllib2, urllib
+
+TRUST_LIMIT = 10
+dbname = os.path.join(os.environ['HOME'],".gtkpod/local_0.itdb")
+
+
+itdb = gpod.itdb_parse_file(dbname, None)
+if not itdb:
+    print "Failed to read %s" % dbname
+    sys.exit(2)
+    
+cache={}
+for track in gpod.sw_get_tracks(itdb):
+    if track.artist is None:
+        continue
+
+    key = track.artist.upper()
+    if not cache.has_key(key):
+        url = "http://ws.audioscrobbler.com/1.0/artist/%s/toptags.xml" % urllib.quote(track.artist)
+        
+        try:
+            reply    = urllib2.urlopen(url).read()
+            xmlreply = minidom.parseString(reply)
+            attlist  = xpath.Evaluate("//toptags/tag[1]/@name",xmlreply)
+            count    = xpath.Evaluate("//toptags/tag[1]/@count",xmlreply)
+            if attlist and count and int(count[0].value) > TRUST_LIMIT:
+                cache[key] = str(attlist[0].value.title()) # no unicode please :-)
+        except urllib2.HTTPError, e:
+            pass
+            #print "Urllib failed.", e
+        except ExpatError, e:
+            print "Failed to parse,", e
+            print reply
+
+    if cache.has_key(key):
+        track.genre = cache[key]
+        print "%-25s %-20s %-20s --> %s" % (track.title,
+                                            track.album,
+                                            track.artist,
+                                            track.genre)
+    else:
+        print "%-25s %-20s %-20s === %s" % (track.title,
+                                            track.album,
+                                            track.artist,
+                                            track.genre)
+        
+
+gpod.itdb_write_file(itdb, dbname, None)


Property changes on: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/tag_genre_from_audioscrobber.py
___________________________________________________________________
Added: svn:executable
   + 

Added: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/toy_around.py
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/toy_around.py	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/toy_around.py	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,93 @@
+#!/usr/bin/python
+
+##  Copyright (C) 2005 Nick Piper <nick-gtkpod at nickpiper co uk>
+##  Part of the gtkpod project.
+ 
+##  URL: http://www.gtkpod.org/
+##  URL: http://gtkpod.sourceforge.net/
+
+##  The code contained in this file is free software; you can redistribute
+##  it and/or modify it under the terms of the GNU Lesser General Public
+##  License as published by the Free Software Foundation; either version
+##  2.1 of the License, or (at your option) any later version.
+
+##  This file 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
+##  Lesser General Public License for more details.
+
+##  You should have received a copy of the GNU Lesser General Public
+##  License along with this code; if not, write to the Free Software
+##  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+##  $Id: toy_around.py 1228 2006-04-07 14:51:40Z nicholas $
+
+
+# this file is just a little example I use for testing, it doesn't
+# play the music, but plays with the database ;-)
+
+import os, os.path
+import gpod
+import sys
+
+ipod_mount = '/mnt/ipod'
+
+remove_track = "The Dancer"
+
+#dbname = os.path.join(os.environ['HOME'],".gtkpod/iTunesDB")
+#dbname = os.path.join(os.environ['HOME'],".gtkpod/local_0.itdb")
+dbname = os.path.join(ipod_mount,"iPod_Control/iTunes/iTunesDB")
+
+#itdb = gpod.itdb_parse_file(dbname, None)
+# the image related functions require us to use parse and give it the
+# mount point; and they won't work without an actual ipod.
+itdb = gpod.itdb_parse(ipod_mount, None)
+if not itdb:
+    print "Failed to read %s" % dbname
+    sys.exit(2)
+itdb.mountpoint = ipod_mount
+
+if True:
+    for playlist in gpod.sw_get_playlists(itdb):
+        print playlist.name
+        print type(playlist.name)
+        print gpod.itdb_playlist_tracks_number(playlist)
+        for track in gpod.sw_get_playlist_tracks(playlist):
+            print track.title
+    
+for track in gpod.sw_get_tracks(itdb):
+    lists = []
+    for playlist in gpod.sw_get_playlists(itdb):
+        if gpod.itdb_playlist_contains_track(playlist, track):
+            lists.append(playlist)
+
+    print track.artist
+    print track.tracklen
+    print track.size
+    if track.artist == "Placebo":
+        print u"%-25s %-20s %-20s %-30s %s" % (track.title,
+                                               track.album,
+                                               track.artist,
+                                               gpod.itdb_filename_on_ipod(track),
+                                               repr(u",".join([l.name for l in lists])))
+
+        if gpod.itdb_track_set_thumbnail(track,"/tmp/placebo.jpg") != 0:
+            print "Failed to save image thumbnail"
+        print track.orig_image_filename
+
+    if track.title == remove_track:
+        print "Removing track.."
+        print "..disk"
+        os.unlink(gpod.itdb_filename_on_ipod(track))
+        for l in lists:
+            print u"..playlist %s" % l.name
+            gpod.itdb_playlist_remove_track(l, track)
+        print "..db"
+        gpod.itdb_track_unlink(track)
+        print "Track removed."
+
+gpod.itdb_write(itdb, None)
+print "Saved db"
+
+
+


Property changes on: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/examples/toy_around.py
___________________________________________________________________
Added: svn:executable
   + 

Added: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/gpod.i.in
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/bindings/python/gpod.i.in	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/bindings/python/gpod.i.in	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,509 @@
+/* File : gpod.i.in */
+
+/*
+ Copyright (C) 2007 Nick Piper <nick-gtkpod at nickpiper co uk>
+ Part of the gtkpod project.
+ 
+ URL: http://www.gtkpod.org/
+ URL: http://gtkpod.sourceforge.net/
+
+ The code contained in this file is free software; you can redistribute
+ it and/or modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either version
+ 2.1 of the License, or (at your option) any later version.
+
+ This file 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this code; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+ $Id: gpod.i.in 2108 2008-08-20 17:37:32Z tmzullinger $
+
+Please send any fixes, improvements or suggestions to
+<nick-gtkpod at nickpiper co uk>.
+
+*/
+
+%define DOCSTRING
+"This module gives access to an iPod's content. It provides an easy to
+use API to retrieve the list of files and playlists stored on an iPod,
+modify them, and save them back to the iPod.
+
+This module implements the libgpod C API as directly as possible in
+Python.  See the main gpod module for a more traditional Python
+interface."
+%enddef
+
+%pythoncode %{
+version_info = (@LIBGPOD_MAJOR_VERSION@, 
+		@LIBGPOD_MINOR_VERSION@, 
+		@LIBGPOD_MICRO_VERSION@)
+version = '.'.join(map(str, version_info))  
+%}
+
+%module(docstring=DOCSTRING) gpod
+%{
+#include "@top_builddir@/config.h"
+#include "db-artwork-debug.h" 
+#include "db-artwork-parser.h" 
+#include "db-image-parser.h" 
+#include "db-itunes-parser.h" 
+#include "db-parse-context.h" 
+#include "itdb.h" 
+#include "itdb_device.h" 
+#include "itdb_private.h"
+#include <time.h>
+#include <datetime.h>
+#ifdef HAVE_GDKPIXBUF
+#ifdef HAVE_PYGOBJECT
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <pygobject.h>
+#endif
+#endif
+
+
+/* include prototypes for all functions so builds using
+ * -Wmissing-prototypes don't fail. */
+PyObject* sw_get_tracks(Itdb_iTunesDB *itdb);
+PyObject* sw_get_track(GList *list, gint index);
+PyObject* sw_get_rule(GList *list, gint index);
+PyObject* sw_get_playlist(GList *list, gint index);
+PyObject* sw_get_list_len(GList *list);
+PyObject* sw_get_playlists(Itdb_iTunesDB *itdb);
+PyObject* sw_get_playlist_tracks(Itdb_Playlist *pl);
+PyObject* sw_set_track_userdata(Itdb_Track *track, PyObject *data);
+PyObject* sw_get_track_userdata(Itdb_Track *track);
+PyObject* sw__track_extra_duplicate (PyObject *data);
+PyObject* sw_get_photoalbums(Itdb_PhotoDB *db);
+PyObject* sw_get_photoalbum(GList *list, gint index);
+PyObject* sw_get_photos(Itdb_PhotoDB *db);
+PyObject* sw_get_photo(GList *list, gint index);
+PyObject* sw_get_photoalbum_members(Itdb_PhotoAlbum *album);
+PyObject* sw_ipod_device_to_dict(Itdb_Device *device);
+void sw__track_extra_destroy (PyObject *data);
+void hash_table_to_pydict(gpointer key, gpointer value, gpointer user_data);
+void SWIG_init(void);
+
+PyObject* sw_get_tracks(Itdb_iTunesDB *itdb) {
+  PyObject    *list;
+  gint        i;
+  GList       *l;
+  list = PyList_New(g_list_length(itdb->tracks));
+  for (l = itdb->tracks, i = 0; l; l = l->next, ++i) {
+    PyList_SET_ITEM(list, i, SWIG_NewPointerObj((void*)(l->data), SWIGTYPE_p__Itdb_Track, 0));
+  }
+  return list;
+ }
+
+PyObject* sw_get_track(GList *list, gint index) {
+  GList *position;
+  if ( (index >= g_list_length(list)) || index < 0 ) {
+   PyErr_SetString(PyExc_IndexError, "Value out of range");
+   return NULL;
+  }
+  position = g_list_nth(list, index);
+  return SWIG_NewPointerObj((void*)(position->data), SWIGTYPE_p__Itdb_Track, 0);
+ }
+
+PyObject* sw_get_rule(GList *list, gint index) {
+  GList *position;
+  if ( (index >= g_list_length(list)) || index < 0 ) {
+   PyErr_SetString(PyExc_IndexError, "Value out of range");
+   return NULL;
+  }
+  position = g_list_nth(list, index);
+  return SWIG_NewPointerObj((void*)(position->data), SWIGTYPE_p__Itdb_SPLRule, 0);
+ }
+
+PyObject* sw_get_playlist(GList *list, gint index) {
+  GList *position;
+  if ( (index >= g_list_length(list)) || index < 0 ) {
+   PyErr_SetString(PyExc_IndexError, "Value out of range");
+   return NULL;
+  }
+  position = g_list_nth(list, index);
+  return SWIG_NewPointerObj((void*)(position->data), SWIGTYPE_p__Itdb_Playlist, 0);
+ }
+
+PyObject* sw_get_list_len(GList *list) {
+   return PyInt_FromLong(g_list_length(list));
+ }
+
+PyObject* sw_get_playlist_tracks(Itdb_Playlist *pl) {
+  PyObject    *list;
+  gint        i;
+  GList       *l;
+  list = PyList_New(g_list_length(pl->members));
+  for (l = pl->members, i = 0; l; l = l->next, ++i) {
+    PyList_SET_ITEM(list, i, SWIG_NewPointerObj((void*)(l->data), SWIGTYPE_p__Itdb_Track, 0));
+  }
+  return list;
+ }
+
+PyObject* sw_get_playlists(Itdb_iTunesDB *itdb) {
+  PyObject    *list;
+  gint        i;
+  GList       *l;
+  list = PyList_New(g_list_length(itdb->playlists));
+  for (l = itdb->playlists, i = 0; l; l = l->next, ++i) {
+    PyList_SET_ITEM(list, i, SWIG_NewPointerObj((void*)(l->data), SWIGTYPE_p__Itdb_Playlist, 0));
+  }
+  return list;
+ }
+ 
+ void sw__track_extra_destroy (PyObject *data) {
+   Py_XDECREF(data);   
+ }
+
+ PyObject *sw__track_extra_duplicate (PyObject *data) {
+   if (data == Py_None) {
+     Py_INCREF(Py_None);
+     return Py_None;
+   } else {
+     return PyDict_Copy(data);
+   }
+ }
+
+ PyObject *sw_set_track_userdata(Itdb_Track *track, PyObject *data) {
+   Py_INCREF(data);
+   if ((PyDict_Check(data)) || (data == Py_None)) {
+     if (track->userdata) {
+       Py_DECREF((PyObject *)track->userdata);
+     }
+     track->userdata = (gpointer) data;
+     track->userdata_duplicate = (ItdbUserDataDuplicateFunc)sw__track_extra_duplicate;
+     track->userdata_destroy   = (ItdbUserDataDestroyFunc)sw__track_extra_destroy;
+     Py_INCREF(Py_None);
+     return Py_None;
+   } else {
+     PyErr_SetString(PyExc_TypeError, "userdata must be a Dictionary");
+     return NULL;
+   }
+ }
+ 
+ PyObject* sw_get_track_userdata(Itdb_Track *track) {
+   if (track->userdata) {
+     Py_INCREF((PyObject *)track->userdata);
+     return (PyObject *)track->userdata;
+   } else {
+     Py_INCREF(Py_None);
+     return Py_None;
+   }
+ }
+
+ PyObject* sw_get_photoalbums(Itdb_PhotoDB *db) {
+  PyObject    *list;
+  gint        i;
+  GList       *l;
+  list = PyList_New(g_list_length(db->photoalbums));
+  for (l = db->photoalbums, i = 0; l; l = l->next, ++i) {
+    PyList_SET_ITEM(list, i, SWIG_NewPointerObj((void*)(l->data),
+SWIGTYPE_p__Itdb_PhotoAlbum, 0));
+  }
+  return list;
+ }
+
+PyObject* sw_get_photoalbum(GList *list, gint index) {
+  GList *position;
+  if ( (index >= g_list_length(list)) || index < 0 ) {
+   PyErr_SetString(PyExc_IndexError, "Value out of range");
+   return NULL;
+  }
+  position = g_list_nth(list, index);
+  return SWIG_NewPointerObj((void*)(position->data), SWIGTYPE_p__Itdb_PhotoAlbum, 0);
+ }
+
+ PyObject* sw_get_photoalbum_members(Itdb_PhotoAlbum *album) {
+  PyObject    *list;
+  gint        i;
+  GList       *l;
+  list = PyList_New(g_list_length(album->members));
+  for (l = album->members, i = 0; l; l = l->next, ++i) {
+    gint photo_id = GPOINTER_TO_INT(l->data);
+    PyList_SET_ITEM(list, i, PyInt_FromLong((long)photo_id));
+  }
+  return list;
+ }
+
+ PyObject* sw_get_photos(Itdb_PhotoDB *db) {
+  PyObject    *list;
+  gint        i;
+  GList       *l;
+  list = PyList_New(g_list_length(db->photos));
+  for (l = db->photos, i = 0; l; l = l->next, ++i) {
+    PyList_SET_ITEM(list, i, SWIG_NewPointerObj((void*)(l->data),
+SWIGTYPE_p__Itdb_Artwork, 0));
+  }
+  return list;
+ }
+
+PyObject* sw_get_photo(GList *list, gint index) {
+  GList *position;
+  if ( (index >= g_list_length(list)) || index < 0 ) {
+   PyErr_SetString(PyExc_IndexError, "Value out of range");
+   return NULL;
+  }
+  position = g_list_nth(list, index);
+  return SWIG_NewPointerObj((void*)(position->data), SWIGTYPE_p__Itdb_Artwork, 0);
+ }
+
+ void hash_table_to_pydict(gpointer key,
+			   gpointer value,
+			   gpointer user_data) {
+   PyDict_SetItemString((PyObject *)user_data, 
+			(char *)key,
+			PyString_FromString(value));
+ }
+
+ PyObject* sw_ipod_device_to_dict(Itdb_Device *device) {
+   PyObject* sysinfo;
+   if (device == NULL) {
+     Py_INCREF(Py_None);
+     return Py_None;
+   } else {
+     sysinfo = PyDict_New();
+     g_hash_table_foreach(device->sysinfo, 
+			  hash_table_to_pydict, 
+			  (gpointer) sysinfo);
+     return Py_BuildValue("{s:s,s:i,s:i,s:O}",
+			  "mountpoint",
+			  device->mountpoint,
+			  "musicdirs",
+			  device->musicdirs,
+			  "byte_order",
+			  device->byte_order,
+			  "sysinfo",
+			  sysinfo);
+   }
+ }
+
+%}
+
+%init %{
+#ifdef HAVE_GDKPIXBUF
+#ifdef HAVE_PYGOBJECT
+   g_type_init ();
+   init_pygobject ();
+#endif
+#endif
+   PyDateTime_IMPORT;
+%}
+
+%include "gpod_doc.i"
+%include "@top_builddir@/config.h"
+
+# be nicer to decode these utf8 strings into Unicode objects in the C
+# layer. Here we are leaving it to the Python side, and just giving
+# them utf8 encoded Strings.
+typedef char gchar;
+
+%typemap(in) time_t {
+  struct tm tmvalue;
+  PyObject* pydatetime = NULL;
+  if (PyDateTime_Check($input)) {
+    pydatetime = $input;
+    Py_INCREF(pydatetime);
+  } else if  ((PyInt_Check($input)) || (PyLong_Check($input)) || (PyFloat_Check($input))) {
+    PyObject* pyargs;
+    Py_INCREF($input);
+    pyargs = PyTuple_Pack(1, $input);
+    if ((pydatetime = PyDateTime_FromTimestamp(pyargs)) == NULL) {
+      Py_DECREF(pyargs);
+      Py_DECREF($input);
+      SWIG_fail;
+    }
+    Py_DECREF(pyargs);
+    Py_DECREF($input);
+  } else {
+    PyErr_SetString(PyExc_ValueError, "$symname: Value must be a datetime.datetime, int or float");
+    SWIG_fail;
+  }
+  tmvalue.tm_year = PyDateTime_GET_YEAR(pydatetime)  - 1900;
+  tmvalue.tm_mon  = PyDateTime_GET_MONTH(pydatetime) - 1;
+  tmvalue.tm_mday = PyDateTime_GET_DAY(pydatetime);
+  tmvalue.tm_hour = PyDateTime_DATE_GET_HOUR(pydatetime);
+  tmvalue.tm_min  = PyDateTime_DATE_GET_MINUTE(pydatetime);
+  tmvalue.tm_sec  = PyDateTime_DATE_GET_SECOND(pydatetime);
+
+  Py_DECREF(pydatetime);
+  
+  $1 = mktime(&tmvalue);
+  if ($1 == -1) {
+    PyErr_SetString(PyExc_ValueError, "$symname: Failed to parse provided time");	
+    SWIG_fail;    
+  }
+}
+
+%typemap(out) time_t {
+#ifdef 0
+  /* for libgpod 0.6.x.. maybe ? */
+  struct tm *tmvalue;
+  tmvalue = localtime(&$1);
+  $result = PyDateTime_FromDateAndTime(tmvalue->tm_year + 1900,
+				       tmvalue->tm_mon  + 1,
+				       tmvalue->tm_mday,
+				       tmvalue->tm_hour,
+				       tmvalue->tm_min,
+				       tmvalue->tm_sec,
+				       0);
+#else
+  $result = PyLong_FromUnsignedLong((unsigned long) $1);
+#endif
+}
+
+%typemap(in) guint8 {
+   unsigned long ival;
+   ival = PyInt_AsUnsignedLongMask($input);
+   if (PyErr_Occurred())
+        SWIG_fail;
+   if (ival > 255) {
+      PyErr_SetString(PyExc_ValueError, "$symname: Value must be between 0 and 255");
+      SWIG_fail;
+   } else {
+      $1 = (guint8) ival;
+   }
+}
+
+%typemap(in) gint8 {
+   long ival;
+   ival = PyInt_AsInt($input);
+   if (PyErr_Occurred())
+        SWIG_fail;
+   if ((ival < -128) || (ival > 127)) {
+      PyErr_SetString(PyExc_ValueError, "$symname: Value must be between -128 and 127");
+      SWIG_fail;
+   } else {
+      $1 = (gint8) ival;
+   }
+}
+
+%typemap(in) guint16 {
+   unsigned long ival;
+   ival = PyInt_AsUnsignedLongMask($input);
+   if (PyErr_Occurred())
+        SWIG_fail;
+   if (ival > 65535) {
+      PyErr_SetString(PyExc_ValueError, "$symname: Value must be between 0 and 65535");
+      SWIG_fail;
+   } else {
+      $1 = (guint16) ival;
+   }
+}
+
+%typemap(in) gint16 {
+   long ival;
+   ival = PyInt_AsLong($input);
+   if (PyErr_Occurred())
+        SWIG_fail;
+   if ((ival < -32768) || (ival > 32767)) {
+      PyErr_SetString(PyExc_ValueError, "$symname: Value must be between -32,768 and 32,767");
+      SWIG_fail;
+   } else {
+      $1 = (gint16) ival;
+   }
+}
+
+%typemap(in) guint32 {
+   unsigned long ival;
+   ival = PyInt_AsUnsignedLongMask($input);
+   if (PyErr_Occurred())
+        SWIG_fail;
+   $1 = (guint32) ival;
+}
+
+%typemap(in) gint32 {
+   long ival;
+   ival = PyInt_AsLong($input);
+   if (PyErr_Occurred())
+        SWIG_fail;
+   $1 = (gint32) ival;
+}
+
+%typemap(in) guint64 {
+  if (PyInt_CheckExact($input))
+    $1 = PyInt_AsUnsignedLongLongMask($input);
+  else
+    $1 = PyLong_AsUnsignedLongLong($input);
+  if (PyErr_Occurred())
+    SWIG_fail;
+}
+
+%typemap(in) gint64 {
+  if (PyInt_CheckExact($input))
+    $1 = PyInt_AsLong($input);
+  else
+    $1 = PyLong_AsLongLong($input);
+  if (PyErr_Occurred())
+    SWIG_fail;
+}
+
+%typemap(out) guint64 {
+   $result = PyLong_FromUnsignedLongLong($1);
+}
+
+%typemap(out) gint64 {
+   $result = PyLong_FromLongLong($1);
+}
+
+%typemap(out) guint32 {
+   $result = PyLong_FromUnsignedLong($1);
+}
+
+%typemap(out) gint32 {
+   $result = PyLong_FromLong($1);
+}
+
+%typemap(out) guint16 {
+   $result = PyLong_FromUnsignedLong($1);
+}
+
+%typemap(out) gint16 {
+   $result = PyLong_FromLong($1);
+}
+
+%typemap(out) guint8 {
+   $result = PyInt_FromLong($1);
+}
+
+typedef int gboolean;
+typedef int gint;
+
+#ifdef HAVE_GDKPIXBUF
+#ifdef HAVE_PYGOBJECT
+%typemap(out) gpointer itdb_artwork_get_pixbuf {
+  $result = pygobject_new((GObject *)$1);
+  if ($1) {
+      g_object_unref($1);
+  }
+}
+
+%typemap(in) gpointer pixbuf {
+  $1 = GDK_PIXBUF(pygobject_get($input));
+}
+#endif
+#endif
+
+#define G_BEGIN_DECLS
+#define G_END_DECLS
+
+PyObject* sw_get_tracks(Itdb_iTunesDB *itdb);
+PyObject* sw_get_track(GList *list, gint index);
+PyObject* sw_get_rule(GList *list, gint index);
+PyObject* sw_get_playlist(GList *list, gint index);
+PyObject* sw_get_list_len(GList *list);
+PyObject* sw_get_playlists(Itdb_iTunesDB *itdb);
+PyObject* sw_get_playlist_tracks(Itdb_Playlist *pl);
+PyObject* sw_set_track_userdata(Itdb_Track *track, PyObject *data);
+PyObject* sw_get_track_userdata(Itdb_Track *track);
+PyObject* sw_get_photoalbums(Itdb_PhotoDB *db);
+PyObject* sw_get_photoalbum(GList *list, gint index);
+PyObject* sw_get_photos(Itdb_PhotoDB *db);
+PyObject* sw_get_photo(GList *list, gint index);
+PyObject* sw_get_photoalbum_members(Itdb_PhotoAlbum *album);
+PyObject* sw_ipod_device_to_dict(Itdb_Device *device);
+
+%include "@top_srcdir@/src/itdb.h"

Added: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/gpod_doc.i.in
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/bindings/python/gpod_doc.i.in	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/bindings/python/gpod_doc.i.in	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,86 @@
+%feature("autodoc", "1");
+
+%feature("autodoc", "sw_get_tracks(Itdb_iTunesDB itdb) -> [Itdb_Track, ...]") sw_get_tracks;
+%feature("docstring", "
+Get tracks in itdb.
+
+Parameters
+itdb: an Itdb_iTunesDB
+Returns: a list of Itdb_Track objects
+") sw_get_tracks;
+
+%feature("autodoc", "sw_get_track(GList list, gint index) -> Itdb_Track") sw_get_track;
+%feature("docstring", "
+Get a track
+
+Parameters
+list: a GList
+index: position of the track
+Returns: an Itdb_Track
+") sw_get_track;
+
+%feature("autodoc", "sw_get_rule(GList list, gint index) -> Itdb_SPLRule") sw_get_rule;
+%feature("docstring", "
+Get a rule
+
+Parameters
+list: a GList
+index: position of the rule
+Returns: an Itdb_SPLRule
+") sw_get_rule;
+
+%feature("autodoc", "sw_get_playlist(GList list, gint index) -> Itdb_Playlist") sw_get_playlist;
+%feature("docstring", "
+Get a playlist
+
+Parameters
+list: a GList
+index: position of the playlist
+Returns: an Itdb_Playlist
+") sw_get_playlist;
+
+%feature("autodoc", "sw_get_list_len(GList list) -> Int") sw_get_list_len;
+%feature("docstring", "
+Get the length of list
+
+Parameters
+list: a GList
+Returns: length of list
+") sw_get_list_len;
+
+%feature("autodoc", "sw_get_playlists(Itdb_iTunesDB itdb) -> [Itdb_Playlist, ...]") sw_get_playlists;
+%feature("docstring", "
+Get playlists
+
+Parameters
+itdb: an Itdb_iTunesDB
+Returns: a list of Itdb_Playlist objects
+") sw_get_playlists;
+
+%feature("autodoc", "sw_get_playlist_tracks(Itdb_Playlist pl) -> [Itdb_Track, ...]") sw_get_playlist_tracks;
+%feature("docstring", "
+Get tracks in playlist
+
+pl: an Itdb_Playlist
+Returns: a list of Itdb_Track objects
+") sw_get_playlist_tracks;
+
+%feature("autodoc", "sw_set_track_userdata(Itdb_Track track, Dictionary userdata)") sw_set_track_userdata;
+%feature("docstring", "
+Set a tracks userdata
+
+Parameters
+track: an Itdb_Track
+userdata: a dictionary.  Note that userdata can be None, in order to
+clear all userdata.
+") sw_set_track_userdata;
+
+%feature("autodoc", "sw_get_track_userdata(Itdb_Track track) -> Dictionary") sw_get_track_userdata;
+%feature("docstring", "
+Get track userdata
+
+Parameters
+track: an Itdb_Track
+Returns: a dictionary containing any userdata for track
+") sw_get_track_userdata;
+

Added: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/gtkdoc-to-swig.xsl
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/bindings/python/gtkdoc-to-swig.xsl	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/bindings/python/gtkdoc-to-swig.xsl	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output 
+      encoding="ASCII"
+      method="text"/>
+
+  <xsl:template match="/">
+    <xsl:for-each select="//refsect2[./title/anchor/@role='function']">
+      <xsl:text>%feature("docstring", "</xsl:text>
+      <xsl:call-template name="CleanQuotes">
+        <xsl:with-param name="body" select="para"/>
+      </xsl:call-template>
+      <xsl:if test="variablelist[@role='params']">
+	<xsl:text>&#10;&#10;Parameters&#10;</xsl:text>
+	<xsl:for-each select="variablelist[@role='params']/varlistentry">
+	  <xsl:call-template name="CleanQuotes">
+	    <!-- We're going to remove the nbsp chars as we're rendering to python docstrings -->
+	    <xsl:with-param name="body" select="translate(term,'&#160;','')"/>
+	  </xsl:call-template>
+	  <xsl:call-template name="CleanQuotes">
+	    <xsl:with-param name="body" select="translate(listitem,'&#160;','')"/>
+	  </xsl:call-template>
+	</xsl:for-each>
+      </xsl:if>
+      <xsl:text>") </xsl:text>
+      <xsl:value-of select="substring-before(./title[./anchor/@role='function'],' ')"/>
+      <xsl:text>; &#10;</xsl:text>
+    </xsl:for-each>
+  </xsl:template>
+
+  <!-- recursive cleaner, matches string to first quote then recurses to
+       process the rest
+       Note how it uses a When to test if the termination condition of no
+       quotes has been reached
+       -->
+
+
+  <xsl:template name="CleanQuotes"><xsl:param name="body"/>
+  <xsl:choose>
+    <xsl:when test="contains($body, '&quot;')">
+      <xsl:value-of select="substring-before($body, '&quot;')" />
+        <xsl:text>\&quot;</xsl:text>
+        <xsl:call-template name="CleanQuotes">
+          <xsl:with-param name="body" select="substring-after($body,'&quot;')"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$body"/><!-- finished recursing -->
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  
+</xsl:stylesheet>

Added: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/gtkpod.py
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/bindings/python/gtkpod.py	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/bindings/python/gtkpod.py	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,130 @@
+"""Read and write Gtkpod extended info files."""
+
+import os
+import types
+
+# The hashlib module is only available in python >= 2.5,
+# while the sha module is deprecated in 2.6.
+try:
+    import hashlib
+    sha1 = hashlib.sha1
+except ImportError:
+    import sha
+    sha1 = sha.sha
+
+# This file is originally stolen from pypod-0.5.0
+# http://superduper.net/index.py?page=pypod
+# and reworked significantly since then.
+
+class ParseError(Exception):
+    """Exception for parse errors."""
+    pass
+
+class SyncError(Exception):
+    """Exception for sync errors."""
+    pass
+
+def sha1_hash(filename):
+    """Return an SHA1 hash on the first 16k of a file."""
+    import struct
+    # only hash the first 16k
+    hash_len = 4*4096
+    hash = sha1()
+    size = os.path.getsize(filename)
+    hash.update(struct.pack("<L", size))
+    hash.update(open(filename).read(hash_len))
+    return hash.hexdigest()
+
+def write(filename, db, itunesdb_file):
+    """Save extended info to a file.
+
+    db is a gpod.Database instance
+
+    Extended info is written for the iTunesDB specified in
+    itunesdb_file
+
+    """
+
+    file = open(filename, "w")
+
+    def write_pair(name, value):
+        if type(value) not in (types.StringType, types.UnicodeType):
+            # e.g., an integer
+            value = str(value)
+        file.write("=".join([name, value]))
+        file.write('\n')
+
+    write_pair("itunesdb_hash", sha1_hash(itunesdb_file))
+    write_pair("version", "0.99.9")
+
+    for track in db:
+        write_pair("id", track['id'])
+        if not track['userdata']:
+            track['userdata'] = {}
+        [write_pair(i[0],i[1]) for i in track['userdata'].items()]
+
+    write_pair("id", "xxx")
+
+def parse(filename, db, itunesdb_file=None):
+    """Load extended info from a file.
+
+    db is a gpod.Database instance
+
+    If itunesdb_file is set and it's hash is valid some expensive
+    checks are skipped.
+
+    """
+
+    ext_hash_valid = False
+    ext_data = {}
+    
+    for line in open(filename).readlines():
+        parts = line.strip().split("=", 1)
+        if len(parts) != 2:
+            print parts
+        name, value = parts
+        if name == "id":
+            if value == 'xxx':
+                break
+            id = int(value)
+            ext_data[id] = {}
+        elif name == "version":
+            pass
+        elif name == "itunesdb_hash":
+            if itunesdb_file and sha1_hash(itunesdb_file) == value:
+                ext_hash_valid = True
+        else:
+            # value is a string of undetermined encoding at the moment
+            ext_data[id][name] = value
+
+    # now add each extended info block to the track it goes with
+    # equiv. of fill_in_extended_info()
+    if ext_hash_valid:
+        # the normal case
+        for track in db:
+            try:
+                track['userdata'] = ext_data[track['id']]
+            except KeyError:
+                # no userdata available...
+                track['userdata'] = {}
+    else:
+        # the iTunesDB was changed, so id's will be wrong.
+        # match up using hash instead
+        tracks_by_sha = {}    
+        for track in db:
+            # make a dict to allow us to find each track by the sha1_hash
+            tracks_by_sha[sha1_hash(track.ipod_filename())] = track
+        for ext_block in ext_data.values():
+            try:
+                if ext_block.has_key('sha1_hash'):
+                    track = tracks_by_sha[ext_block['sha1_hash']]
+                elif ext_block.has_key('md5_hash'):
+                    # recent gpod uses sha1_hash, older uses md5_hash
+                    track = tracks_by_sha[ext_block['md5_hash']]                    
+            except KeyError:
+                # what should we do about this?
+                print "Failed to match hash from extended information file with one that we just calculated:"
+                print ext_block
+                continue
+            track['userdata'] = ext_block
+

Added: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/ipod.py
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/bindings/python/ipod.py	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/bindings/python/ipod.py	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,1044 @@
+"""Manage tracks and playlists on an iPod.
+
+You should normally just import the gpod module which will import the
+classes and methods provided here.
+
+"""
+
+import gpod
+import types
+from mutagen.mp3 import MP3
+import mutagen.id3
+import gtkpod
+import os
+import locale
+import socket
+import datetime
+
+if hasattr(gpod, 'HAVE_GDKPIXBUF') and hasattr(gpod, 'HAVE_PYGOBJECT'):
+    try:
+        import gtk
+        pixbuf_support = True
+    except ImportError:
+        pixbuf_support = False
+else:
+    pixbuf_support = False
+
+defaultencoding = locale.getpreferredencoding()
+
+class DatabaseException(RuntimeError):
+    """Exception for database errors."""
+    pass
+
+class TrackException(RuntimeError):
+    """Exception for track errors."""
+    pass
+
+class PhotoException(RuntimeError):
+    """Exception for track errors."""
+    pass
+
+class Database:
+    """An iTunes database.
+
+    A database contains playlists and tracks.
+
+    """
+
+    def __init__(self, mountpoint="/mnt/ipod", local=False, localdb=None):
+        """Create a Database object.
+
+        You can create the object from a mounted iPod or from a local
+        database file.
+
+        To use a mounted iPod:
+
+            db = gpod.Database('/mnt/ipod')
+
+        To use a local database file:
+
+            db = gpod.Database(localdb='/path/to/iTunesDB')
+
+        If you specify local=True then the default local database from
+        gtkpod will be used (~/.gtkpod/local_0.itdb):
+
+            db = gpod.Database(local=True)
+
+        """
+
+        if local or localdb:
+            if localdb:
+                self._itdb_file = localdb
+            else:
+                self._itdb_file = os.path.join(os.environ['HOME'],
+                                               ".gtkpod",
+                                               "local_0.itdb")
+            self._itdb = gpod.itdb_parse_file(self._itdb_file, None)
+        else:
+            self._itdb = gpod.itdb_parse(mountpoint, None)
+            if not self._itdb:
+                raise DatabaseException("Unable to parse iTunes database at mount point %s" % mountpoint)
+            else:
+                self._itdb.mountpoint = mountpoint
+            self._itdb_file    = os.path.join(self._itdb.mountpoint,
+                                              "iPod_Control","iTunes","iTunesDB")
+        self._load_gtkpod_extended_info()
+
+    def __str__(self):
+        return self.__repr__()
+
+    def __repr__(self):
+        return "<Database Filename:%s Playlists:%s Tracks:%s>" % (
+            repr(self._itdb.filename),
+            gpod.sw_get_list_len(self._itdb.playlists),
+            len(self))
+
+    def _load_gtkpod_extended_info(self):
+        """Read extended information from a gtkpod .ext file."""
+        itdbext_file = "%s.ext" % (self._itdb_file)
+
+        if os.path.exists(self._itdb_file) and os.path.exists(itdbext_file):
+            gtkpod.parse(itdbext_file, self, self._itdb_file)
+
+    def close(self):
+        """Save and close the database.
+
+        Note: If you are working with an iPod you should normally call
+        copy_delayed_files() prior to close() to ensure that newly
+        added or updated tracks are transferred to the iPod.
+
+        """
+
+        if not gpod.itdb_write_file(self._itdb, self._itdb_file, None):
+            raise DatabaseException("Unable to save iTunes database %s" % self)
+        if gpod.itdb_get_mountpoint(self._itdb):
+            if not gpod.itdb_shuffle_write(self._itdb, None):
+                raise DatabaseException("Unable to save shuffle database on %s" % self._itdb.mountpoint)
+        itdbext_file = "%s.ext" % (self._itdb_file)
+        gtkpod.write(itdbext_file, self, self._itdb_file)
+
+    def __getitem__(self, index):
+        if type(index) == types.SliceType:
+            return [self[i] for i in xrange(*index.indices(len(self)))]
+        else:
+            if index < 0:
+                index += len(self)
+            return Track(proxied_track=gpod.sw_get_track(self._itdb.tracks, index),
+                         ownerdb=self)
+
+    def __len__(self):
+        return gpod.sw_get_list_len(self._itdb.tracks)
+
+    def import_file(self, filename):
+        """Import a file.
+
+        filename is added to the end of the master playlist.
+
+        """
+        track = Track(filename)
+        track.copy_to_ipod()
+        gpod.itdb_playlist_add_track(gpod.itdb_playlist_mpl(self._itdb),
+                                     track._track, -1)
+        track.__database = self # so the db doesn't get gc'd
+
+    def __del__(self):
+        gpod.itdb_free(self._itdb)
+
+    def add(self, track, pos=-1):
+        """Add a track to a database.
+
+        If pos is set the track will be inserted at that position.  By
+        default the track will be added at the end of the database.
+
+        """
+
+        gpod.itdb_track_add(self._itdb, track._track, pos)
+        track.__database = self # so the db doesn't get gc'd
+
+    def remove(self, item, harddisk=False, ipod=True, quiet=False):
+        """Remove a playlist or track from a database.
+
+        item is either a playlist or track object.
+
+        If harddisk is True the item will be removed from the the hard drive.
+
+        If ipod is True the item will be removed from the iPod.
+
+        If quiet is True no message will be printed for removed tracks
+
+        """
+
+        if isinstance(item, Playlist):
+            if ipod or harddisk:
+                # remove all the tracks that were in this playlist
+                for track in item:
+                    self.remove(track, ipod=ipod, harddisk=harddisk)
+            if gpod.itdb_playlist_exists(self._itdb, item._pl):
+                gpod.itdb_playlist_remove(item._pl)
+            else:
+                raise DatabaseException("Playlist %s was not in %s" % (item, self))
+        elif isinstance(item, Track):
+            for pl in self.Playlists:
+                if item in pl:
+                    pl.remove(item)
+            if harddisk:
+                try:
+                    filename = item._userdata_into_default_locale('filename')
+                except KeyError, e:
+                    raise TrackException("Unable to remove %s from hard disk, no filename available." % item)
+                os.unlink(filename)
+            if ipod:
+                filename = item.ipod_filename()
+                if filename and os.path.exists(filename):
+                    os.unlink(filename)
+                    if not quiet:
+                        print "unlinked %s" % filename
+            gpod.itdb_track_unlink(item._track)
+        else:
+            raise DatabaseException("Unable to remove a %s from database" % type(item))
+
+    def get_master(self):
+        """Get the Master playlist."""
+        return Playlist(self,proxied_playlist=gpod.itdb_playlist_mpl(self._itdb))
+
+    def get_podcasts(self):
+        """Get the podcasts playlist."""
+        return Playlist(self,proxied_playlist=gpod.itdb_playlist_podcasts(self._itdb))
+
+    def get_playlists(self):
+        """Get all playlists."""
+        return _Playlists(self)
+
+    Master   = property(get_master)
+    Podcasts = property(get_podcasts)
+    Playlists= property(get_playlists)
+
+    def smart_update(self):
+        """Update all smart playlists."""
+        gpod.itdb_spl_update_all(self._itdb)
+
+    def new_Playlist(self,*args,**kwargs):
+        """Create a new Playlist.
+
+        See Playlist.__init__() for details.
+
+        """
+
+        return Playlist(self, *args,**kwargs)
+
+    def new_Track(self,**kwargs):
+        """Create a new Track.
+
+        See Track.__init__() for details.
+
+        """
+
+        track = Track(**kwargs)
+        self.add(track)
+        if kwargs.has_key('podcast') and kwargs['podcast'] == True:
+            self.Podcasts.add(track)
+        else:
+            self.Master.add(track)
+        track.__database = self # so the db doesn't get gc'd
+        return track
+
+    def copy_delayed_files(self,callback=False):
+        """Copy files not marked as transferred to the iPod.
+
+        callback is an optional function that will be called for each
+        track that is copied.  It will be passed the following
+        arguments:
+
+            database -> the database object
+            track    -> the track being copied
+            iterator -> the current track number being copied
+            total    -> the total tracks to be copied
+
+        """
+
+        if not gpod.itdb_get_mountpoint(self._itdb):
+            # we're not working with a real ipod.
+            return
+        to_copy=[]
+        for track in self:
+            try:
+                transferred = int(track['userdata']['transferred'])
+            except (KeyError, TypeError):
+                transferred = 1
+            if not transferred:
+                to_copy.append(track)
+        i = 0
+        total = len(to_copy)
+        for track in to_copy:
+            if callback:
+                i=i+1
+                callback(self,track, i, total)
+            track.copy_to_ipod()
+
+class Track:
+    """A track in an iTunes database.
+
+    A track contains information like the artist, title, album, etc.
+    It also contains data like the location on the iPod, whether there
+    is artwork stored, the track has lyrics, etc.
+
+    Information from a gtkpod extended info file (if one exists for
+    the iTunesDB) is also available in Track['userdata'].
+
+    The information is stored in a dictionary.
+
+    """
+
+    # Note we don't free the underlying structure, as it's still used
+    # by the itdb.
+
+    _proxied_attributes = [k for k in gpod._Itdb_Track.__dict__.keys()
+                            if not (k.startswith("_") or
+                                    k.startswith("reserved") or
+                                    k == "chapterdata")]
+
+    def __init__(self, filename=None, mediatype=gpod.ITDB_MEDIATYPE_AUDIO,
+                 proxied_track=None, podcast=False, ownerdb=None):
+        """Create a Track object.
+
+        If from_file or filename is set, the file specified will be
+        used to create the track.
+
+        The mediatype parameter sets the mediatype for the track.  It
+        defaults to audio, unless 'podcast' is True, in which case it
+        is set to podcast.  See gpod.ITDB_MEDIATYPE_* for other valid
+        mediatypes.
+
+        If proxied_track is set, it is expected to be an Itdb_Track
+        object.
+
+        If podcast is True then the track will be setup as a Podcast,
+        unless proxied_track is set.
+
+        """
+
+        if filename:
+            self._track = gpod.itdb_track_new()
+            self['userdata'] = {'transferred': 0,
+                                'hostname': socket.gethostname(),
+                                'charset':defaultencoding}
+            self['userdata']['pc_mtime'] = os.stat(filename).st_mtime
+            self._set_userdata_utf8('filename',filename)
+            possible_image = os.path.join(os.path.split(filename)[0],'folder.jpg')
+            if os.path.exists(possible_image):
+                self.set_coverart_from_file(possible_image)
+            try:
+                audiofile = MP3(self._userdata_into_default_locale('filename'))
+            except Exception, e:
+                raise TrackException(str(e))
+            for tag, attrib in (('TPE1','artist'),
+                                ('TIT2','title'),
+                                ('TBPM','BPM'),
+                                ('TCON','genre'),
+                                ('TALB','album'),
+                                ('TPOS',('cd_nr','cds')),
+                                ('TRCK',('track_nr','tracks'))):
+                try:
+                    value = audiofile[tag]
+                    if isinstance(value,mutagen.id3.NumericPartTextFrame):
+                        parts = map(int,value.text[0].split("/"))
+                        if len(parts) == 2:
+                            self[attrib[0]], self[attrib[1]] = parts
+                        elif len(parts) == 1:
+                            self[attrib[0]] = parts[0]
+                    elif isinstance(value,mutagen.id3.TextFrame):
+                        self[attrib] = value.text[0].encode('UTF-8','replace')
+                except KeyError:
+                    pass
+            if self['title'] is None:
+                self['title'] = os.path.splitext(
+                    os.path.split(filename)[1])[0].decode(
+                    defaultencoding).encode('UTF-8')
+            self['tracklen'] = int(audiofile.info.length * 1000)
+            self.set_podcast(podcast)
+        elif proxied_track:
+            self._track = proxied_track
+            self.__database = ownerdb # so the db doesn't get gc'd
+        else:
+            self._track = gpod.itdb_track_new()
+            self.set_podcast(podcast)
+        if not 'mediatype' in self:
+            self['mediatype'] = mediatype
+
+    def _set_userdata_utf8(self, key, value):
+        self['userdata']['%s_locale' % key] = value
+        try:
+            self['userdata']['%s_utf8'   % key] = value.decode(self['userdata']['charset']).encode('UTF-8')
+        except UnicodeDecodeError, e:
+            # string clearly isn't advertised charset.  I prefer to
+            # not add the _utf8 version as we can't actually generate
+            # it. Maybe we'll have to populate a close-fit though.
+            pass
+
+    def _userdata_into_default_locale(self, key):
+        # to cope with broken filenames, we should trust the _locale version more,
+        # an even that may not really be in self['userdata']['charset']
+        if self['userdata']['charset'] == defaultencoding:
+            # don't try translate it or check it's actually valid, in case it isn't.
+            return self['userdata']['%s_locale' % key]
+        # our filesystem is in a different encoding to the filename, so
+        # try to convert it. The UTF-8 version is likely best to try first?
+        if self['userdata'].has_key('%s_utf8' % key):
+            unicode_value = self['userdata']['%s_utf8' % key].decode('UTF-8')
+        else:
+            unicode_value = self['userdata']['%s_locale' % key].decode(self['userdata']['charset'])
+        return unicode_value.encode(defaultencoding)
+
+    def set_coverart_from_file(self, filename):
+        gpod.itdb_track_set_thumbnails(self._track, filename)
+        self._set_userdata_utf8('thumbnail', filename)
+
+    def set_coverart(self, pixbuf):
+        if pixbuf == None:
+            gpod.itdb_track_remove_thumbnails(self._track)
+        elif isinstance(pixbuf, Photo):
+            raise NotImplemented("Can't set coverart from existing coverart yet")
+        else:
+            gpod.itdb_track_set_thumbnails_from_pixbuf(self._track,
+                                                       pixbuf)
+
+    def get_coverart(self):
+        if gpod.itdb_track_has_thumbnails(self._track):
+            return Photo(proxied_photo=self._track.artwork,
+                         ownerdb=self._track.itdb)
+        return None
+
+    def copy_to_ipod(self):
+        """Copy the track to the iPod."""
+        self['userdata']['sha1_hash'] = gtkpod.sha1_hash(self._userdata_into_default_locale('filename'))
+        mp = gpod.itdb_get_mountpoint(self._track.itdb)
+        if not mp:
+            return False
+        if gpod.itdb_cp_track_to_ipod(self._track,
+                                      self._userdata_into_default_locale('filename'),
+                                      None) != 1:
+            raise TrackException('Unable to copy %s to iPod as %s' % (
+                self._userdata_into_default_locale('filename'),
+                self))
+        fname = self.ipod_filename().replace(mp, '').replace(os.path.sep, ':')
+        self['userdata']['filename_ipod'] = fname
+        self['userdata']['transferred'] = 1
+        return True
+
+    def ipod_filename(self):
+        """Get the full path to the track on the iPod.
+
+        Note (from the libgpod documentation): This code works around
+        a problem on some systems and might return a filename with
+        different case than the original filename. Don't copy it back
+        to track unless you must.
+
+        """
+
+        return gpod.itdb_filename_on_ipod(self._track)
+
+    def set_podcast(self, value):
+        """Mark the track as a podcast.
+
+        If value is True flags appropriate for podcasts are set,
+        otherwise those flags are unset.
+
+        """
+
+        if value:
+            self['skip_when_shuffling'] = 0x01
+            self['remember_playback_position'] = 0x01
+            self['flag4'] = 0x01 # Show Title/Album on the 'Now Playing' page
+            self['mediatype'] = gpod.ITDB_MEDIATYPE_PODCAST
+        else:
+            self['skip_when_shuffling'] = 0x00
+            self['remember_playback_position'] = 0x00
+            self['flag4'] = 0x00 # Show Title/Album/Artist on the 'Now Playing' page
+
+    def __str__(self):
+        return self.__repr__()
+
+    def __repr__(self):
+        return "<Track Artist:%s Title:%s Album:%s>" % (
+            repr(self['artist']),
+            repr(self['title']),
+            repr(self['album']))
+
+    def __iter__(self):
+        for k in self.keys():
+            yield k
+
+    def has_key(self, key):
+        try:
+            value = self[key]
+        except KeyError:
+            return False
+        return True
+
+    def __contains__(self, key):
+        return self.has_key(key)
+
+    def iteritems(self):
+        for k in self:
+            yield (k, self[k])
+
+    def iterkeys(self):
+        return self.__iter__()
+
+    def itervalues(self):
+        for _, v in self.iteritems():
+            yield v
+
+    def keys(self):
+        return list(self._proxied_attributes)
+
+    def values(self):
+        return [self[k] for k in self._proxied_attributes]
+
+    def items(self):
+        return [(k, self[k]) for k in self._proxied_attributes]
+
+    def __getitem__(self, item):
+        if item == "userdata":
+            return gpod.sw_get_track_userdata(self._track)
+        elif item in self._proxied_attributes:
+            if item.startswith("time_"):
+                return datetime.datetime.fromtimestamp(getattr(self._track, item))
+            else:
+                return getattr(self._track, item)
+        else:
+            raise KeyError('No such key: %s' % item)
+
+    def __setitem__(self, item, value):
+        if item == "userdata":
+            gpod.sw_set_track_userdata(self._track, value)
+            return
+        if type(value) == types.UnicodeType:
+            value = value.encode('UTF-8','replace')
+        if item in self._proxied_attributes:
+            return setattr(self._track, item, value)
+        else:
+            raise KeyError('No such key: %s' % item)
+
+playlist_sorting = {
+    1:'playlist',
+    2:'unknown2',
+    3:'songtitle',
+    4:'album',
+    5:'artist',
+    6:'bitrate',
+    7:'genre',
+    8:'kind',
+    9:'modified',
+    10:'track',
+    11:'size',
+    12:'time',
+    13:'year',
+    14:'rate',
+    15:'comment',
+    16:'added',
+    17:'equalizer',
+    18:'composer',
+    19:'unknown19',
+    20:'count',
+    21:'last',
+    22:'disc',
+    23:'rating',
+    24:'release',
+    25:'BPM',
+    26:'grouping',
+    27:'category',
+    28:'description'}
+
+class _Playlists:
+    def __init__(self, db):
+        self._db = db
+
+    def __len__(self):
+        return gpod.sw_get_list_len(self._db._itdb.playlists)
+
+    def __nonzero__(self):
+        return True
+
+    def __getitem__(self, index):
+        if type(index) == types.SliceType:
+            return [self[i] for i in xrange(*index.indices(len(self)))]
+        else:
+            if index < 0:
+                index += len(self)
+            return Playlist(self._db,
+                            proxied_playlist=gpod.sw_get_playlist(self._db._itdb.playlists,
+                                                                  index))
+
+    def __repr__(self):
+        return "<Playlists from %s>" % self._db
+
+    def __call__(self, id=None, number=None, name=None):
+        if ((id and (number or name)) or (number and name)):
+            raise ValueError("Only specify id, number OR name")
+        if id:
+            if type(id) in (types.TupleType, types.ListType):
+                return [self.__call__(id=i) for i in id]
+            else:
+                pl = gpod.itdb_playlist_by_id(self._db._itdb,
+                                              id)
+                if pl:
+                    return Playlist(self._db,
+                                    proxied_playlist=pl)
+                else:
+                    raise KeyError("Playlist with id %s not found." % repr(id))
+        if name:
+            if type(name) in (types.TupleType, types.ListType):
+                return [self.__call__(name=i) for i in name]
+            else:
+                pl = gpod.itdb_playlist_by_name(self._db._itdb,
+                                                name)
+                if pl:
+                    return Playlist(self._db,
+                                    proxied_playlist=pl)
+                else:
+                    raise KeyError("Playlist with name %s not found." % repr(name))
+        if number:
+            if type(number) in (types.TupleType, types.ListType):
+                return [self.__call__(number=i) for i in number]
+            else:
+                pl = gpod.itdb_playlist_by_nr(self._db._itdb,
+                                                number)
+                if pl:
+                    return Playlist(self._db,
+                                    proxied_playlist=pl)
+                else:
+                    raise KeyError("Playlist with number %s not found." % repr(number))
+
+class Playlist:
+    """A playlist in an iTunes database."""
+
+    def __init__(self, parent_db, title="New Playlist",
+                 smart=False, pos=-1, proxied_playlist=None):
+        """Create a playlist object.
+
+        parent_db is the database object to which the playlist
+        belongs.
+
+        title is a string that provides a name for the playlist.
+
+        If smart is true the playlist will be a smart playlist.
+
+        If pos is set the track will be inserted at that position.  By
+        default the playlist will be added at the end of the database.
+
+        If proxied_playlist is set it is expected to be an
+        Itdb_Playlist object (as returned by gpod.sw_get_playlist() or
+        similar functions).
+
+        """
+
+        self._db = parent_db
+        if proxied_playlist:
+            self._pl = proxied_playlist
+        else:
+            if smart:
+                smart = 1
+            else:
+                smart = 0
+            self._pl = gpod.itdb_playlist_new(title, smart)
+            gpod.itdb_playlist_add(self._db._itdb, self._pl, pos)
+
+    def smart_update(self):
+        """Update the content of the smart playlist."""
+        gpod.itdb_spl_update(self._pl)
+
+    def randomize(self):
+        """Randomizes the playlist."""
+        gpod.itdb_playlist_randomize(self._pl)
+
+    def get_name(self):
+        """Get the name of the playlist."""
+        return self._pl.name
+
+    def set_name(self, name):
+        """Set the name for the playlist."""
+        self._pl.name = name
+
+    def get_id(self):
+        """Get the id of the playlist."""
+        return self._pl.id
+
+    # XXX would this be more aptly named is_smart?  If it was, I think
+    # the docstring could skip the explanation of the return value.
+    # (Same question for get_master and get_podcast.)
+    def get_smart(self):
+        """Check if the playlist is smart or not.
+
+        Returns True for a smart playlist, False for a regular
+        playlist.
+
+        """
+
+        if self._pl.is_spl == 1:
+            return True
+        return False
+
+    def get_master(self):
+        """Check if the playlist is the master playlist (MPL).
+
+        Returns True if the playlist is the MPL, False if not.
+
+        """
+
+        if gpod.itdb_playlist_is_mpl(self._pl) == 1:
+            return True
+        return False
+
+    def get_podcast(self):
+        """Check if the playlist is the podcasts playlist.
+
+        Returns True if the playlist is the podcasts playlist, False
+        if not.
+
+        """
+
+        if gpod.itdb_playlist_is_podcasts(self._pl) == 1:
+            return True
+        return False
+
+    def get_sort(self):
+        """Get the sort order for the playlist."""
+        return playlist_sorting[self._pl.sortorder]
+
+    def set_sort(self, order):
+        """Set the sort order for the playlist."""
+        order = order.lower()
+        for k, v in playlist_sorting.items():
+            if v == order:
+                self._pl.sortorder = v
+                return
+        return ValueError("Unknown playlist sorting '%s'" % order)
+
+    name   = property(get_name, set_name)
+    id     = property(get_id)
+    smart  = property(get_smart)
+    master = property(get_master)
+    podcast= property(get_podcast)
+    order  = property(get_sort, set_sort)
+
+    def __str__(self):
+        return self.__repr__()
+
+    def __repr__(self):
+        return "<Playlist Title:%s Sort:%s Smart:%s Master:%s Podcast:%s Tracks:%d>" % (
+            repr(self.name),
+            repr(self.order),
+            repr(self.smart),
+            repr(self.master),
+            repr(self.podcast),
+            len(self))
+
+    def __getitem__(self, index):
+        if type(index) == types.SliceType:
+            return [self[i] for i in xrange(*index.indices(len(self)))]
+        else:
+            if index < 0:
+                index += len(self)
+            return Track(proxied_track=gpod.sw_get_track(self._pl.members, index),
+                         ownerdb=self)
+
+    def __len__(self):
+        #return self._pl.num # Always 0 ?
+        return gpod.sw_get_list_len(self._pl.members)
+
+    def __nonzero__(self):
+        return True
+
+    def __contains__(self, track):
+        if gpod.itdb_playlist_contains_track(self._pl, track._track):
+            return True
+        else:
+            return False
+
+    def add(self, track, pos=-1):
+        """Add a track to the playlist.
+
+        track is a track object to add.
+
+        If pos is set the track will be inserted at that position.  By
+        default the track will be added at the end of the playlist.
+
+        """
+
+        gpod.itdb_playlist_add_track(self._pl, track._track, pos)
+
+    def remove(self, track):
+        """Remove a track from the playlist.
+
+        track is a track object to remove.
+
+        """
+
+        if self.__contains__(track):
+            gpod.itdb_playlist_remove_track(self._pl, track._track)
+        else:
+            raise DatabaseException("Playlist %s does not contain %s" % (self, track))
+
+class PhotoDatabase:
+    """An iTunes Photo database"""
+    def __init__(self, mountpoint="/mnt/ipod"):
+        """Create a Photo database object"""
+        self._itdb = gpod.itdb_photodb_parse(mountpoint, None)
+        if self._itdb == None:
+            self._itdb = gpod.itdb_photodb_create(mountpoint)
+
+    def __str__(self):
+        return self.__repr__()
+
+    def __repr__(self):
+        return "<PhotoDatabase Mountpoint:%s Albums:%s Photos:%s>" % (
+            repr(self.device['mountpoint']),
+            gpod.sw_get_list_len(self._itdb.photoalbums),
+            len(self))
+
+    def close(self):
+        gpod.itdb_photodb_write(self._itdb, None)
+        gpod.itdb_photodb_free(self._itdb)
+
+    def __len__(self):
+        return gpod.sw_get_list_len(self._itdb.photos)
+
+    def __getitem__(self, index):
+        if type(index) == types.SliceType:
+            return [self[i] for i in xrange(*index.indices(len(self)))]
+        else:
+            if index < 0:
+                index += len(self)
+            return Photo(proxied_photo=gpod.sw_get_photo(self._itdb.photos, index),
+                         ownerdb=self)
+
+    def new_PhotoAlbum(self,**kwargs):
+        """Create a new PhotoAlbum.
+        """
+        album = PhotoAlbum(self, **kwargs)
+        return album
+
+    def new_Photo(self,**kwargs):
+        """Create a new Photo.
+        """
+        kwargs['ownerdb'] = self
+        photo = Photo(**kwargs)
+        return photo
+
+    def remove(self, item):
+        """Remove a photo or album from a database.
+
+        item is either a Photo or PhotoAlbum object.
+        """
+
+        if isinstance(item, PhotoAlbum):
+            gpod.itdb_photodb_photoalbum_remove(self._itdb, item._pa, False)
+        elif isinstance(item, Photo):
+            gpod.itdb_photodb_remove_photo(self._itdb, None, item._photo)
+        else:
+            raise DatabaseException("Unable to remove a %s from database" % type(item))
+
+    def get_device(self):
+        return gpod.sw_ipod_device_to_dict(self._itdb.device)
+
+    def get_photoalbums(self):
+        """Get all photo albums."""
+        return _PhotoAlbums(self)
+
+    PhotoAlbums = property(get_photoalbums)
+    device      = property(get_device)
+
+class _PhotoAlbums:
+    def __init__(self, db):
+        self._db = db
+
+    def __len__(self):
+        return gpod.sw_get_list_len(self._db._itdb.photoalbums)
+
+    def __nonzero__(self):
+        return True
+
+    def __getitem__(self, index):
+        if type(index) == types.SliceType:
+            return [self[i] for i in xrange(*index.indices(len(self)))]
+        else:
+            if index < 0:
+                index += len(self)
+            return PhotoAlbum(self._db,
+                              proxied_photoalbum=gpod.sw_get_photoalbum(self._db._itdb.photoalbums,
+                                                                        index))
+
+    def __repr__(self):
+        return "<PhotoAlbums from %s>" % self._db
+
+    def __call__(self, name):
+        if type(name) in (types.TupleType, types.ListType):
+            return [self.__call__(name=i) for i in name]
+        else:
+            pa = gpod.itdb_photodb_photoalbum_by_name(self._db._itdb,
+                                                      name)
+            if pa:
+                return PhotoAlbum(self._db,
+                                  proxied_playlist=pa)
+            else:
+                raise KeyError("Album with name %s not found." % repr(name))
+
+
+class PhotoAlbum:
+    """A Photo Album in an iTunes database."""
+
+    def __init__(self, parent_db, title="New Album",
+                 pos=-1, proxied_photoalbum=None):
+
+        self._db = parent_db
+        if proxied_photoalbum:
+            self._pa = proxied_photoalbum
+        else:
+            self._pa = gpod.itdb_photodb_photoalbum_create(self._db._itdb, title, pos)
+
+    def add(self, photo):
+        """Add photo to photo album."""
+        gpod.itdb_photodb_photoalbum_add_photo(self._db._itdb, self._pa, photo._photo, -1)
+
+    def remove(self, photo):
+        gpod.itdb_photodb_remove_photo(self._db._itdb, self._pa, photo._photo)
+
+    def get_name(self):
+        """Get the name of the photo album."""
+        return self._pa.name
+
+    def set_name(self, name):
+        """Set the name for the photo album."""
+        self._pa.name = name
+
+    def get_album_type(self):
+        return self._pa.album_type
+
+    name       = property(get_name, set_name)
+    album_type = property(get_album_type)
+
+    def __str__(self):
+        return self.__repr__()
+
+    def __repr__(self):
+        return "<PhotoAlbum Title:%s Photos:%d Type:%d>" % (
+            repr(self.name),
+            len(self),
+            self.album_type)
+
+    def __getitem__(self, index):
+        if type(index) == types.SliceType:
+            return [self[i] for i in xrange(*index.indices(len(self)))]
+        else:
+            if index < 0:
+                index += len(self)
+            return Photo(proxied_photo=gpod.sw_get_photo(self._pa.members, index),
+                         ownerdb=self._db)
+
+    def __len__(self):
+        return gpod.sw_get_list_len(self._pa.members)
+
+    def __nonzero__(self):
+        return True
+
+class Photo:
+    """A photo in an iTunes Photo database."""
+
+    _proxied_attributes = [k for k in gpod._Itdb_Artwork.__dict__.keys()
+                            if not (k.startswith("_") or k.startswith("reserved"))]
+
+    def __init__(self, filename=None,
+                 proxied_photo=None, ownerdb=None):
+        """Create a Photo object."""
+        error = None
+
+        if filename:
+            self._photo = gpod.itdb_photodb_add_photo(ownerdb._itdb, filename, -1, 0, error)
+            self._database = ownerdb
+        elif proxied_photo:
+            self._photo = proxied_photo
+            self._database = ownerdb
+        else:
+            self._photo = gpod.itdb_artwork_new()
+
+    def __str__(self):
+        return self.__repr__()
+
+    def __repr__(self):
+        return "<Photo ID:%s Creation:'%s' Digitized:'%s' Size:%s>" % (
+            repr(self['id']),
+            self['creation_date'].strftime("%c"),
+            self['digitized_date'].strftime("%c"),
+            repr(self['artwork_size']))
+
+    def __iter__(self):
+        for k in self.keys():
+            yield k
+
+    def has_key(self, key):
+        try:
+            value = self[key]
+        except KeyError:
+            return False
+        return True
+
+    def __contains__(self, key):
+        return self.has_key(key)
+
+    def iteritems(self):
+        for k in self:
+            yield (k, self[k])
+
+    def iterkeys(self):
+        return self.__iter__()
+
+    def itervalues(self):
+        for _, v in self.iteritems():
+            yield v
+
+    def keys(self):
+        return list(self._proxied_attributes)
+
+    def values(self):
+        return [self[k] for k in self._proxied_attributes]
+
+    def items(self):
+        return [(k, self[k]) for k in self._proxied_attributes]
+
+    def __getitem__(self, item):
+        if item in self._proxied_attributes:
+            attr = getattr(self._photo, item)
+            if item.endswith("_date"):
+                try:
+                    return datetime.datetime.fromtimestamp(attr)
+                except:
+                    return datetime.datetime.fromtimestamp(0)
+            else:
+                return attr
+        else:
+            raise KeyError('No such key: %s' % item)
+
+    def __setitem__(self, item, value):
+        if type(value) == types.UnicodeType:
+            value = value.encode('UTF-8','replace')
+        if item in self._proxied_attributes:
+            return setattr(self._photo, item, value)
+        else:
+            raise KeyError('No such key: %s' % item)
+
+    if pixbuf_support:
+        def get_pixbuf(self, width=-1, height=-1):
+            """Get a pixbuf from a Photo.
+
+            width: the width of the pixbuf to retrieve, -1 for the biggest
+            possible size and 0 for the smallest possible size (with no scaling)
+
+            height: the height of the pixbuf to retrieve, -1 for the biggest
+            possible size and 0 for the smallest possible size (with no scaling)
+            """
+            device = self._database.device
+            if hasattr(self._database,"_itdb"):
+                device = self._database._itdb.device
+            return gpod.itdb_artwork_get_pixbuf(device, self._photo,
+                                                width, height)

Added: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/tests/Makefile.am
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/bindings/python/tests/Makefile.am	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/bindings/python/tests/Makefile.am	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,13 @@
+EXTRA_DIST =            \
+        resources       \
+        tests.py
+
+dist-hook:
+	rm -rf `find $(distdir)/resources -type d -name .svn`
+
+if HAVE_PYTHON
+test:
+	LD_LIBRARY_PATH=$(top_builddir)/src/.libs \
+	PYTHONPATH=$(top_builddir)/bindings/python:$(top_builddir)/bindings/python/.libs  \
+	$(PYTHON) tests.py
+endif

Added: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/tests/Makefile.in
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/bindings/python/tests/Makefile.in	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/bindings/python/tests/Makefile.in	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,421 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  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@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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 = bindings/python/tests
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \
+	$(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/python.m4 \
+	$(top_srcdir)/m4/swig.m4 $(top_srcdir)/configure.ac
+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 =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+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@
+GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@
+GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@
+GDKPIXBUF_REQ = @GDKPIXBUF_REQ@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+HALCALLOUTSDIR = @HALCALLOUTSDIR@
+HALFDIDIR = @HALFDIDIR@
+HAL_CFLAGS = @HAL_CFLAGS@
+HAL_LIBS = @HAL_LIBS@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
+INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
+INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
+INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
+INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
+INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
+INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
+INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
+INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@
+INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
+INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
+INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
+INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
+INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
+INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
+LDFLAGS = @LDFLAGS@
+LIBGPOD_CFLAGS = @LIBGPOD_CFLAGS@
+LIBGPOD_LIBS = @LIBGPOD_LIBS@
+LIBGPOD_MAJOR_VERSION = @LIBGPOD_MAJOR_VERSION@
+LIBGPOD_MICRO_VERSION = @LIBGPOD_MICRO_VERSION@
+LIBGPOD_MINOR_VERSION = @LIBGPOD_MINOR_VERSION@
+LIBGPOD_SO_VERSION = @LIBGPOD_SO_VERSION@
+LIBGPOD_VERSION = @LIBGPOD_VERSION@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_LIBS = @LIBXML_LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+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@
+PKG_CONFIG = @PKG_CONFIG@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+PYGOBJECT_CFLAGS = @PYGOBJECT_CFLAGS@
+PYGOBJECT_LIBS = @PYGOBJECT_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SGUTILS_LIBS = @SGUTILS_LIBS@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SWIG = @SWIG@
+SWIG_LIB = @SWIG_LIB@
+TAGLIB_CFLAGS = @TAGLIB_CFLAGS@
+TAGLIB_LIBS = @TAGLIB_LIBS@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+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@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+EXTRA_DIST = \
+        resources       \
+        tests.py
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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) --gnu  bindings/python/tests/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  bindings/python/tests/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    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
+	$(MAKE) $(AM_MAKEFLAGS) \
+	  top_distdir="$(top_distdir)" distdir="$(distdir)" \
+	  dist-hook
+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_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-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+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:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	dist-hook distclean distclean-generic distclean-libtool \
+	distdir dvi dvi-am html html-am info info-am install \
+	install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	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
+
+
+dist-hook:
+	rm -rf `find $(distdir)/resources -type d -name .svn`
+
+ at HAVE_PYTHON_TRUE@test:
+ at HAVE_PYTHON_TRUE@	LD_LIBRARY_PATH=$(top_builddir)/src/.libs \
+ at HAVE_PYTHON_TRUE@	PYTHONPATH=$(top_builddir)/bindings/python:$(top_builddir)/bindings/python/.libs  \
+ at HAVE_PYTHON_TRUE@	$(PYTHON) tests.py
+# 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:

Added: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/tests/resources/Artwork/ArtworkDB
===================================================================
(Binary files differ)


Property changes on: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/tests/resources/Artwork/ArtworkDB
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/tests/resources/iTunes/iTunesDB
===================================================================
(Binary files differ)


Property changes on: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/tests/resources/iTunes/iTunesDB
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/tests/resources/iTunes/iTunesDB.ext
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/bindings/python/tests/resources/iTunes/iTunesDB.ext	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/bindings/python/tests/resources/iTunes/iTunesDB.ext	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,3 @@
+itunesdb_hash=1d28bd4e9ec0980d34f36f9d39cdafd163e5cd36
+version=0.99.6DEV
+id=xxx

Added: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/tests/resources/tiny.mp3
===================================================================
(Binary files differ)


Property changes on: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/tests/resources/tiny.mp3
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/tests/resources/tiny.png
===================================================================
(Binary files differ)


Property changes on: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/tests/resources/tiny.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: libgpod/trunk/libgpod/branches/upstream/current/bindings/python/tests/tests.py
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/bindings/python/tests/tests.py	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/bindings/python/tests/tests.py	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,196 @@
+import unittest
+import shutil
+import tempfile
+import os
+import datetime
+import time
+import types
+
+gpod = __import__('__init__')
+
+class TestiPodFunctions(unittest.TestCase):
+    def setUp(self):
+        self.mp = tempfile.mkdtemp()
+        control_dir = os.path.join(self.mp,'iPod_Control')
+        music_dir = os.path.join(control_dir, 'Music')
+        shutil.copytree('resources',
+                        control_dir)
+        os.mkdir(music_dir)
+        for i in range(0,20):
+            os.mkdir(os.path.join(music_dir,"f%02d" % i))
+        self.db = gpod.Database(self.mp)
+
+    def tearDown(self):
+        shutil.rmtree(self.mp)
+
+    def testClose(self):
+        self.db.close()
+
+    def testListPlaylists(self):
+        [p for p in self.db.Playlists]
+
+    def testCreatePlaylist(self):
+        self.assertEqual(len(self.db.Playlists),2)
+        pl = self.db.new_Playlist('my title')
+        self.assertEqual(len(self.db.Playlists),3)
+
+    def testPopulatePlaylist(self):
+        trackname = os.path.join(self.mp,
+                                 'iPod_Control',
+                                 'tiny.mp3')
+
+        pl = self.db.new_Playlist('my title')
+        self.assertEqual(len(pl),0)
+        t = self.db.new_Track(filename=trackname)
+        pl.add(t)
+        self.assertEqual(len(pl),1)
+
+    def testAddTrack(self):
+        trackname = os.path.join(self.mp,
+                                 'iPod_Control',
+                                 'tiny.mp3')
+        for n in range(1,5):
+            t = self.db.new_Track(filename=trackname)
+            self.assertEqual(len(self.db),n)
+        self.db.copy_delayed_files()
+        for track in self.db:
+            self.failUnless(os.path.exists(track.ipod_filename()))
+
+    def testAddRemoveTrack(self):
+        self.testAddTrack()
+        for n in range(4,0,-1):
+            track = self.db[0]
+            track_file = track.ipod_filename()
+            self.assertEqual(len(self.db),n)
+            self.db.remove(track, ipod=True, quiet=True)
+            self.failIf(os.path.exists(track_file))
+
+    def testDatestampSetting(self):
+        trackname = os.path.join(self.mp,
+                                 'iPod_Control',
+                                 'tiny.mp3')
+        t = self.db.new_Track(filename=trackname)
+        date = datetime.datetime.now()
+        t['time_added'] = date
+        self.assertEqual(date.year, t['time_added'].year)
+        self.assertEqual(date.second, t['time_added'].second)
+        # microsecond won't match, that's lost in the itdb
+        date = datetime.datetime.now()
+        t['time_added'] = time.mktime(date.timetuple())
+        self.assertEqual(date.year, t['time_added'].year)
+        self.assertEqual(date.second, t['time_added'].second)
+
+    def testTrackContainerMethods(self):
+        self.testAddTrack()
+        track = self.db[0]
+        self.failUnless('title' in track)
+
+    def testVersion(self):
+        self.assertEqual(type(gpod.version_info),
+                         types.TupleType)
+
+class TestPhotoDatabase(unittest.TestCase):
+    def setUp(self):
+        self.mp = tempfile.mkdtemp()
+        control_dir = os.path.join(self.mp,'iPod_Control')
+        photo_dir = os.path.join(control_dir, 'Photos')
+        shutil.copytree('resources',
+                        control_dir)
+        os.mkdir(photo_dir)
+        self.db = gpod.PhotoDatabase(self.mp)
+        gpod.itdb_device_set_sysinfo (self.db._itdb.device, "ModelNumStr", "MA450");
+
+    def tearDown(self):
+        shutil.rmtree(self.mp)
+
+    def testClose(self):
+        self.db.close()
+
+    def testAddPhotoAlbum(self):
+        """ Test adding 5 photo albums to the database """
+        for i in range(0, 5):
+            count = len(self.db.PhotoAlbums)
+            album = self.db.new_PhotoAlbum(title="Test %s" % i)
+            self.failUnless(len(self.db.PhotoAlbums) == (count + 1))
+
+    def testAddRemovePhotoAlbum(self):
+        """ Test removing all albums but "Photo Library" """
+        self.testAddPhotoAlbum()
+        pas = [x for x in self.db.PhotoAlbums if x.name != "Photo Library"]
+        for pa in pas:
+            self.db.remove(pa)
+        self.assertEqual(len(self.db.PhotoAlbums), 1)
+
+    def testRenamePhotoAlbum(self):
+        bad = []
+        good = []
+
+        self.testAddPhotoAlbum()
+        pas = [x for x in self.db.PhotoAlbums if x.name != "Photo Library"]
+        for pa in pas:
+            bad.append(pa.name)
+            pa.name = "%s (renamed)" % pa.name
+            good.append(pa.name)
+
+        pas = [x for x in self.db.PhotoAlbums if x.name != "Photo Library"]
+        for pa in pas:
+            self.failUnless(pa.name in bad)
+            self.failUnless(pa.name not in good)
+
+    def testEnumeratePhotoAlbums(self):
+        [photo for photo in self.db.PhotoAlbums]
+
+    def testAddPhoto(self):
+        photoname = os.path.join(self.mp,
+                                 'iPod_Control',
+                                 'tiny.png')
+        self.failUnless(os.path.exists(photoname))
+        for n in range(1,5):
+            t = self.db.new_Photo(filename=photoname)
+            self.assertEqual(len(self.db), n)
+
+    def testAddPhotoToAlbum(self):
+        self.testAddPhoto()
+        pa = self.db.new_PhotoAlbum(title="Add To Album Test")
+        count = len(pa)
+        for p in self.db.PhotoAlbums[0]:
+            pa.add(p)
+        self.assertEqual(len(pa), len(self.db.PhotoAlbums[0]))
+        self.failUnless(len(pa) > count)
+
+    def testRemovePhotoFromAlbum(self):
+        self.testAddPhotoToAlbum()
+        pa = self.db.PhotoAlbums[1]
+        for p in pa[:]:
+            pa.remove(p)
+        # make sure we didn't delete the photo
+        self.failUnless(len(self.db.PhotoAlbums[0]) > 0)
+        # but that we did remove them from album
+        self.assertEqual(len(pa), 0)
+
+    def testAddRemovePhoto(self):
+        self.testAddPhoto()
+        self.failUnless(len(self.db) > 0)
+        for photo in self.db.PhotoAlbums[0][:]:
+            self.db.remove(photo)
+        self.assertEqual(len(self.db), 0)
+
+    def testAddCountPhotos(self):
+        count = len(self.db)
+        self.testAddPhoto()
+        self.failUnless(len(self.db) > count)
+
+    def testEnumeratePhotoAlbums(self):
+        [photo for photo in self.db.PhotoAlbums]
+
+    def testEnumeratePhotos(self):
+        for album in self.db.PhotoAlbums:
+            [photo for photo in album]
+
+    def testPhotoContainerMethods(self):
+        self.testAddPhoto()
+        photo = self.db[0]
+        self.failUnless('id' in photo)
+
+if __name__ == '__main__':
+    unittest.main()

Added: libgpod/trunk/libgpod/branches/upstream/current/compile
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/compile	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/compile	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,142 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand `-c -o'.
+
+scriptversion=2005-05-14.22
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake at gnu.org> or send patches to
+# <automake-patches at gnu.org>.
+
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand `-c -o'.
+Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file `INSTALL'.
+
+Report bugs to <bug-automake at gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "compile $scriptversion"
+    exit $?
+    ;;
+esac
+
+ofile=
+cfile=
+eat=
+
+for arg
+do
+  if test -n "$eat"; then
+    eat=
+  else
+    case $1 in
+      -o)
+	# configure might choose to run compile as `compile cc -o foo foo.c'.
+	# So we strip `-o arg' only if arg is an object.
+	eat=1
+	case $2 in
+	  *.o | *.obj)
+	    ofile=$2
+	    ;;
+	  *)
+	    set x "$@" -o "$2"
+	    shift
+	    ;;
+	esac
+	;;
+      *.c)
+	cfile=$1
+	set x "$@" "$1"
+	shift
+	;;
+      *)
+	set x "$@" "$1"
+	shift
+	;;
+    esac
+  fi
+  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 "$@"
+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.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+  mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+  mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:


Property changes on: libgpod/trunk/libgpod/branches/upstream/current/compile
___________________________________________________________________
Added: svn:executable
   + 

Added: libgpod/trunk/libgpod/branches/upstream/current/config.guess
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/config.guess	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/config.guess	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,1526 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+#   Free Software Foundation, Inc.
+
+timestamp='2008-01-08'
+
+# 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
+# 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., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner <per at bothner.com>.
+# Please send patches to <config-patches at gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub.  If it succeeds, it prints the system name on stdout, and
+# exits with 0.  Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches at gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+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 "$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
+	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+	     CC_FOR_BUILD="$c"; break ;
+	  fi ;
+	done ;
+	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 ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi at noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+	PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+	# NetBSD (nbsd) targets should (where applicable) match one or
+	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+	# switched to ELF, *-*-netbsd* would select the old
+	# object file format.  This provides both forward
+	# compatibility and a consistent mechanism for selecting the
+	# object file format.
+	#
+	# Note: NetBSD doesn't particularly care about the vendor
+	# portion of the name.  We always set it to "unknown".
+	sysctl="sysctl -n hw.machine_arch"
+	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+	case "${UNAME_MACHINE_ARCH}" in
+	    armeb) machine=armeb-unknown ;;
+	    arm*) machine=arm-unknown ;;
+	    sh3el) machine=shl-unknown ;;
+	    sh3eb) machine=sh-unknown ;;
+	    sh5el) machine=sh5le-unknown ;;
+	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+	esac
+	# The Operating System including object format, if it has switched
+	# to ELF recently, or will in the future.
+	case "${UNAME_MACHINE_ARCH}" in
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+		eval $set_cc_for_build
+		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+			| grep __ELF__ >/dev/null
+		then
+		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+		    # Return netbsd for either.  FIX?
+		    os=netbsd
+		else
+		    os=netbsdelf
+		fi
+		;;
+	    *)
+	        os=netbsd
+		;;
+	esac
+	# The OS release
+	# 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 ;;
+    *:OpenBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+	exit ;;
+    *:ekkoBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+	exit ;;
+    *:SolidBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+	exit ;;
+    macppc:MirBSD:*:*)
+	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
+    *:MirBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
+    alpha:OSF1:*:*)
+	case $UNAME_RELEASE in
+	*4.0)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+		;;
+	*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.
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	exit ;;
+    Alpha\ *:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# Should we change UNAME_MACHINE based on the output of uname instead
+	# of the specific Alpha model?
+	echo alpha-pc-interix
+	exit ;;
+    21064:Windows_NT:50:3)
+	echo alpha-dec-winnt3.5
+	exit ;;
+    Amiga*:UNIX_System_V:4.0:*)
+	echo m68k-unknown-sysv4
+	exit ;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-amigaos
+	exit ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-morphos
+	exit ;;
+    *:OS/390:*:*)
+	echo i370-ibm-openedition
+	exit ;;
+    *:z/VM:*:*)
+	echo s390-ibm-zvmoe
+	exit ;;
+    *:OS400:*:*)
+        echo powerpc-ibm-os400
+	exit ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+	echo arm-acorn-riscix${UNAME_RELEASE}
+	exit ;;
+    arm:riscos:*:*|arm:RISCOS:*:*)
+	echo arm-unknown-riscos
+	exit ;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+	echo hppa1.1-hitachi-hiuxmpp
+	exit ;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+	# akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+	if test "`(/bin/universe) 2>/dev/null`" = att ; then
+		echo pyramid-pyramid-sysv3
+	else
+		echo pyramid-pyramid-bsd
+	fi
+	exit ;;
+    NILE*:*:*:dcosx)
+	echo pyramid-pyramid-svr4
+	exit ;;
+    DRS?6000:unix:4.0:6*)
+	echo sparc-icl-nx6
+	exit ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+	case `/usr/bin/uname -p` in
+	    sparc) echo sparc-icl-nx7; exit ;;
+	esac ;;
+    sun4H:SunOS:5.*:*)
+	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:6*:*)
+	# According to config.sub, this is the proper way to canonicalize
+	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+	# it's likely to be more like Solaris than SunOS4.
+	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:*:*)
+	case "`/usr/bin/arch -k`" in
+	    Series*|S4*)
+		UNAME_RELEASE=`uname -v`
+		;;
+	esac
+	# Japanese Language versions have a version number like `4.1.3-JL'.
+	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+	exit ;;
+    sun3*:SunOS:*:*)
+	echo m68k-sun-sunos${UNAME_RELEASE}
+	exit ;;
+    sun*:*:4.2BSD:*)
+	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+	case "`/bin/arch`" in
+	    sun3)
+		echo m68k-sun-sunos${UNAME_RELEASE}
+		;;
+	    sun4)
+		echo sparc-sun-sunos${UNAME_RELEASE}
+		;;
+	esac
+	exit ;;
+    aushp:SunOS:*:*)
+	echo sparc-auspex-sunos${UNAME_RELEASE}
+	exit ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+        exit ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+        echo m68k-milan-mint${UNAME_RELEASE}
+        exit ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+        echo m68k-hades-mint${UNAME_RELEASE}
+        exit ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+        echo m68k-unknown-mint${UNAME_RELEASE}
+        exit ;;
+    m68k:machten:*:*)
+	echo m68k-apple-machten${UNAME_RELEASE}
+	exit ;;
+    powerpc:machten:*:*)
+	echo powerpc-apple-machten${UNAME_RELEASE}
+	exit ;;
+    RISC*:Mach:*:*)
+	echo mips-dec-mach_bsd4.3
+	exit ;;
+    RISC*:ULTRIX:*:*)
+	echo mips-dec-ultrix${UNAME_RELEASE}
+	exit ;;
+    VAX*:ULTRIX*:*:*)
+	echo vax-dec-ultrix${UNAME_RELEASE}
+	exit ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+	echo clipper-intergraph-clix${UNAME_RELEASE}
+	exit ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
+	#if defined (host_mips) && defined (MIPSEB)
+	#if defined (SYSTYPE_SYSV)
+	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_SVR4)
+	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+	#endif
+	#endif
+	  exit (-1);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c &&
+	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+	  SYSTEM_NAME=`$dummy $dummyarg` &&
+	    { echo "$SYSTEM_NAME"; exit; }
+	echo mips-mips-riscos${UNAME_RELEASE}
+	exit ;;
+    Motorola:PowerMAX_OS:*:*)
+	echo powerpc-motorola-powermax
+	exit ;;
+    Motorola:*:4.3:PL8-*)
+	echo powerpc-harris-powermax
+	exit ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+	echo powerpc-harris-powermax
+	exit ;;
+    Night_Hawk:Power_UNIX:*:*)
+	echo powerpc-harris-powerunix
+	exit ;;
+    m88k:CX/UX:7*:*)
+	echo m88k-harris-cxux7
+	exit ;;
+    m88k:*:4*:R4*)
+	echo m88k-motorola-sysv4
+	exit ;;
+    m88k:*:3*:R3*)
+	echo m88k-motorola-sysv3
+	exit ;;
+    AViiON:dgux:*:*)
+        # DG/UX returns AViiON for all architectures
+        UNAME_PROCESSOR=`/usr/bin/uname -p`
+	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+	then
+	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+	       [ ${TARGET_BINARY_INTERFACE}x = x ]
+	    then
+		echo m88k-dg-dgux${UNAME_RELEASE}
+	    else
+		echo m88k-dg-dguxbcs${UNAME_RELEASE}
+	    fi
+	else
+	    echo i586-dg-dgux${UNAME_RELEASE}
+	fi
+ 	exit ;;
+    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
+	echo m88k-dolphin-sysv3
+	exit ;;
+    M88*:*:R3*:*)
+	# Delta 88k system running SVR3
+	echo m88k-motorola-sysv3
+	exit ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+	echo m88k-tektronix-sysv3
+	exit ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+	echo m68k-tektronix-bsd
+	exit ;;
+    *:IRIX*:*:*)
+	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+	exit ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+	echo i386-ibm-aix
+	exit ;;
+    ia64:AIX:*:*)
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+	exit ;;
+    *:AIX:2:3)
+	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+		eval $set_cc_for_build
+		sed 's/^		//' << EOF >$dummy.c
+		#include <sys/systemcfg.h>
+
+		main()
+			{
+			if (!__power_pc())
+				exit(1);
+			puts("powerpc-ibm-aix3.2.5");
+			exit(0);
+			}
+EOF
+		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+		then
+			echo "$SYSTEM_NAME"
+		else
+			echo rs6000-ibm-aix3.2.5
+		fi
+	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+		echo rs6000-ibm-aix3.2.4
+	else
+		echo rs6000-ibm-aix3.2
+	fi
+	exit ;;
+    *:AIX:*:[456])
+	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+		IBM_ARCH=rs6000
+	else
+		IBM_ARCH=powerpc
+	fi
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+	exit ;;
+    *:AIX:*:*)
+	echo rs6000-ibm-aix
+	exit ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+	echo romp-ibm-bsd4.4
+	exit ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+	exit ;;                             # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+	echo rs6000-bull-bosx
+	exit ;;
+    DPX/2?00:B.O.S.:*:*)
+	echo m68k-bull-sysv3
+	exit ;;
+    9000/[34]??:4.3bsd:1.*:*)
+	echo m68k-hp-bsd
+	exit ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+	echo m68k-hp-bsd4.4
+	exit ;;
+    9000/[34678]??:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	case "${UNAME_MACHINE}" in
+	    9000/31? )            HP_ARCH=m68000 ;;
+	    9000/[34]?? )         HP_ARCH=m68k ;;
+	    9000/[678][0-9][0-9])
+		if [ -x /usr/bin/getconf ]; then
+		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                    case "${sc_cpu_version}" in
+                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                      532)                      # CPU_PA_RISC2_0
+                        case "${sc_kernel_bits}" in
+                          32) HP_ARCH="hppa2.0n" ;;
+                          64) HP_ARCH="hppa2.0w" ;;
+			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+                        esac ;;
+                    esac
+		fi
+		if [ "${HP_ARCH}" = "" ]; then
+		    eval $set_cc_for_build
+		    sed 's/^              //' << EOF >$dummy.c
+
+              #define _HPUX_SOURCE
+              #include <stdlib.h>
+              #include <unistd.h>
+
+              int main ()
+              {
+              #if defined(_SC_KERNEL_BITS)
+                  long bits = sysconf(_SC_KERNEL_BITS);
+              #endif
+                  long cpu  = sysconf (_SC_CPU_VERSION);
+
+                  switch (cpu)
+              	{
+              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+              	case CPU_PA_RISC2_0:
+              #if defined(_SC_KERNEL_BITS)
+              	    switch (bits)
+              		{
+              		case 64: puts ("hppa2.0w"); break;
+              		case 32: puts ("hppa2.0n"); break;
+              		default: puts ("hppa2.0"); break;
+              		} break;
+              #else  /* !defined(_SC_KERNEL_BITS) */
+              	    puts ("hppa2.0"); break;
+              #endif
+              	default: puts ("hppa1.0"); break;
+              	}
+                  exit (0);
+              }
+EOF
+		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+		    test -z "$HP_ARCH" && HP_ARCH=hppa
+		fi ;;
+	esac
+	if [ ${HP_ARCH} = "hppa2.0w" ]
+	then
+	    eval $set_cc_for_build
+
+	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+	    # generating 64-bit code.  GNU and HP use different nomenclature:
+	    #
+	    # $ CC_FOR_BUILD=cc ./config.guess
+	    # => hppa2.0w-hp-hpux11.23
+	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+	    # => hppa64-hp-hpux11.23
+
+	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+		grep __LP64__ >/dev/null
+	    then
+		HP_ARCH="hppa2.0w"
+	    else
+		HP_ARCH="hppa64"
+	    fi
+	fi
+	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+	exit ;;
+    ia64:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	echo ia64-hp-hpux${HPUX_REV}
+	exit ;;
+    3050*:HI-UX:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <unistd.h>
+	int
+	main ()
+	{
+	  long cpu = sysconf (_SC_CPU_VERSION);
+	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+	     results, however.  */
+	  if (CPU_IS_PA_RISC (cpu))
+	    {
+	      switch (cpu)
+		{
+		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+		  default: puts ("hppa-hitachi-hiuxwe2"); break;
+		}
+	    }
+	  else if (CPU_IS_HP_MC68K (cpu))
+	    puts ("m68k-hitachi-hiuxwe2");
+	  else puts ("unknown-hitachi-hiuxwe2");
+	  exit (0);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+		{ echo "$SYSTEM_NAME"; exit; }
+	echo unknown-hitachi-hiuxwe2
+	exit ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+	echo hppa1.1-hp-bsd
+	exit ;;
+    9000/8??:4.3bsd:*:*)
+	echo hppa1.0-hp-bsd
+	exit ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+	echo hppa1.0-hp-mpeix
+	exit ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+	echo hppa1.1-hp-osf
+	exit ;;
+    hp8??:OSF1:*:*)
+	echo hppa1.0-hp-osf
+	exit ;;
+    i*86:OSF1:*:*)
+	if [ -x /usr/sbin/sysversion ] ; then
+	    echo ${UNAME_MACHINE}-unknown-osf1mk
+	else
+	    echo ${UNAME_MACHINE}-unknown-osf1
+	fi
+	exit ;;
+    parisc*:Lites*:*:*)
+	echo hppa1.1-hp-lites
+	exit ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+	echo c1-convex-bsd
+        exit ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+        exit ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+	echo c34-convex-bsd
+        exit ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+	echo c38-convex-bsd
+        exit ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+	echo c4-convex-bsd
+        exit ;;
+    CRAY*Y-MP:*:*:*)
+	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*[A-Z]90:*:*:*)
+	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+	      -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*TS:*:*:*)
+	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*T3E:*:*:*)
+	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*SV1:*:*:*)
+	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    *:UNICOS/mp:*:*)
+	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+        exit ;;
+    5000:UNIX_System_V:4.*:*)
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	exit ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+	exit ;;
+    sparc*:BSD/OS:*:*)
+	echo sparc-unknown-bsdi${UNAME_RELEASE}
+	exit ;;
+    *:BSD/OS:*:*)
+	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+	exit ;;
+    *:FreeBSD:*:*)
+	case ${UNAME_MACHINE} in
+	    pc98)
+		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	    amd64)
+		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	    *)
+		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	esac
+	exit ;;
+    i*:CYGWIN*:*)
+	echo ${UNAME_MACHINE}-pc-cygwin
+	exit ;;
+    *:MINGW*:*)
+	echo ${UNAME_MACHINE}-pc-mingw32
+	exit ;;
+    i*:windows32*:*)
+    	# uname -m includes "-pc" on this system.
+    	echo ${UNAME_MACHINE}-mingw32
+	exit ;;
+    i*:PW*:*)
+	echo ${UNAME_MACHINE}-pc-pw32
+	exit ;;
+    *:Interix*:[3456]*)
+    	case ${UNAME_MACHINE} in
+	    x86)
+		echo i586-pc-interix${UNAME_RELEASE}
+		exit ;;
+	    EM64T | authenticamd)
+		echo x86_64-unknown-interix${UNAME_RELEASE}
+		exit ;;
+	    IA64)
+		echo ia64-unknown-interix${UNAME_RELEASE}
+		exit ;;
+	esac ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+	echo i${UNAME_MACHINE}-pc-mks
+	exit ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+	# UNAME_MACHINE based on the output of uname instead of i386?
+	echo i586-pc-interix
+	exit ;;
+    i*:UWIN*:*)
+	echo ${UNAME_MACHINE}-pc-uwin
+	exit ;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+	echo x86_64-unknown-cygwin
+	exit ;;
+    p*:CYGWIN*:*)
+	echo powerpcle-unknown-cygwin
+	exit ;;
+    prep*:SunOS:5.*:*)
+	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    *:GNU:*:*)
+	# the GNU system
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	exit ;;
+    *:GNU/*:*:*)
+	# other systems with GNU libc and userland
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+	exit ;;
+    i*86:Minix:*:*)
+	echo ${UNAME_MACHINE}-pc-minix
+	exit ;;
+    arm*:Linux:*:*)
+	eval $set_cc_for_build
+	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+	    | grep -q __ARM_EABI__
+	then
+	    echo ${UNAME_MACHINE}-unknown-linux-gnu
+	else
+	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+	fi
+	exit ;;
+    avr32*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    cris:Linux:*:*)
+	echo cris-axis-linux-gnu
+	exit ;;
+    crisv32:Linux:*:*)
+	echo crisv32-axis-linux-gnu
+	exit ;;
+    frv:Linux:*:*)
+    	echo frv-unknown-linux-gnu
+	exit ;;
+    ia64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    m32r*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    m68*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    mips:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef mips
+	#undef mipsel
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=mipsel
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=mips
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+	    /^CPU/{
+		s: ::g
+		p
+	    }'`"
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+	;;
+    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 | sed -n '
+	    /^CPU/{
+		s: ::g
+		p
+	    }'`"
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+	;;
+    or32:Linux:*:*)
+	echo or32-unknown-linux-gnu
+	exit ;;
+    ppc:Linux:*:*)
+	echo powerpc-unknown-linux-gnu
+	exit ;;
+    ppc64:Linux:*:*)
+	echo powerpc64-unknown-linux-gnu
+	exit ;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+	exit ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+	# Look for CPU level
+	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
+	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
+	  *)    echo hppa-unknown-linux-gnu ;;
+	esac
+	exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-unknown-linux-gnu
+	exit ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+	echo ${UNAME_MACHINE}-ibm-linux
+	exit ;;
+    sh64*:Linux:*:*)
+    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    sh*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    vax:Linux:*:*)
+	echo ${UNAME_MACHINE}-dec-linux-gnu
+	exit ;;
+    x86_64:Linux:*:*)
+	echo x86_64-unknown-linux-gnu
+	exit ;;
+    xtensa*:Linux:*:*)
+    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    i*86:Linux:*:*)
+	# The BFD linker knows what the default object file format is, so
+	# first see if it will tell us. cd to the root directory to prevent
+	# problems with other programs or directories called `ld' in the path.
+	# Set LC_ALL=C to ensure ld outputs messages in English.
+	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+			 | sed -ne '/supported targets:/!d
+				    s/[ 	][ 	]*/ /g
+				    s/.*supported targets: *//
+				    s/ .*//
+				    p'`
+        case "$ld_supported_targets" in
+	  elf32-i386)
+		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+		;;
+	  a.out-i386-linux)
+		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+		exit ;;
+	  coff-i386)
+		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+		exit ;;
+	  "")
+		# Either a pre-BFD a.out linker (linux-gnuoldld) or
+		# one that does not give us useful --help.
+		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+		exit ;;
+	esac
+	# Determine whether the default compiler is a.out or elf
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <features.h>
+	#ifdef __ELF__
+	# ifdef __GLIBC__
+	#  if __GLIBC__ >= 2
+	LIBC=gnu
+	#  else
+	LIBC=gnulibc1
+	#  endif
+	# else
+	LIBC=gnulibc1
+	# endif
+	#else
+	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+	LIBC=gnu
+	#else
+	LIBC=gnuaout
+	#endif
+	#endif
+	#ifdef __dietlibc__
+	LIBC=dietlibc
+	#endif
+EOF
+	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+	    /^LIBC/{
+		s: ::g
+		p
+	    }'`"
+	test x"${LIBC}" != x && {
+		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+		exit
+	}
+	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+	;;
+    i*86:DYNIX/ptx:4*:*)
+	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+	# earlier versions are messed up and put the nodename in both
+	# sysname and nodename.
+	echo i386-sequent-sysv4
+	exit ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+        # Unixware is an offshoot of SVR4, but it has its own version
+        # number series starting with 2...
+        # I am not positive that other SVR4 systems won't match this,
+	# I just have to hope.  -- rms.
+        # Use sysv4.2uw... so that sysv4* matches it.
+	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+	exit ;;
+    i*86:OS/2:*:*)
+	# If we were able to find `uname', then EMX Unix compatibility
+	# is probably installed.
+	echo ${UNAME_MACHINE}-pc-os2-emx
+	exit ;;
+    i*86:XTS-300:*:STOP)
+	echo ${UNAME_MACHINE}-unknown-stop
+	exit ;;
+    i*86:atheos:*:*)
+	echo ${UNAME_MACHINE}-unknown-atheos
+	exit ;;
+    i*86:syllable:*:*)
+	echo ${UNAME_MACHINE}-pc-syllable
+	exit ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+	echo i386-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    i*86:*DOS:*:*)
+	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+	exit ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+	else
+		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+	fi
+	exit ;;
+    i*86:*:5:[678]*)
+    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
+	case `/bin/uname -X | grep "^Machine"` in
+	    *486*)	     UNAME_MACHINE=i486 ;;
+	    *Pentium)	     UNAME_MACHINE=i586 ;;
+	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+	esac
+	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	exit ;;
+    i*86:*:3.2:*)
+	if test -f /usr/options/cb.name; then
+		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+	elif /bin/uname -X 2>/dev/null >/dev/null ; then
+		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+			&& UNAME_MACHINE=i586
+		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+	else
+		echo ${UNAME_MACHINE}-pc-sysv32
+	fi
+	exit ;;
+    pc:*:*:*)
+	# Left here for compatibility:
+        # uname -m prints for DJGPP always 'pc', but it prints nothing about
+        # the processor, so we play safe by assuming i386.
+	echo i386-pc-msdosdjgpp
+        exit ;;
+    Intel:Mach:3*:*)
+	echo i386-pc-mach3
+	exit ;;
+    paragon:*:*:*)
+	echo i860-intel-osf1
+	exit ;;
+    i860:*:4.*:*) # i860-SVR4
+	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+	else # Add other i860-SVR4 vendors below as they are discovered.
+	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+	fi
+	exit ;;
+    mini*:CTIX:SYS*5:*)
+	# "miniframe"
+	echo m68010-convergent-sysv
+	exit ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+	echo m68k-convergent-sysv
+	exit ;;
+    M680?0:D-NIX:5.3:*)
+	echo m68k-diab-dnix
+	exit ;;
+    M68*:*:R3V[5678]*:*)
+	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+	OS_REL=''
+	test -r /etc/.relid \
+	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+          && { echo i486-ncr-sysv4; exit; } ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+	echo m68k-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    mc68030:UNIX_System_V:4.*:*)
+	echo m68k-atari-sysv4
+	exit ;;
+    TSUNAMI:LynxOS:2.*:*)
+	echo sparc-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    rs6000:LynxOS:2.*:*)
+	echo rs6000-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+	echo powerpc-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    SM[BE]S:UNIX_SV:*:*)
+	echo mips-dde-sysv${UNAME_RELEASE}
+	exit ;;
+    RM*:ReliantUNIX-*:*:*)
+	echo mips-sni-sysv4
+	exit ;;
+    RM*:SINIX-*:*:*)
+	echo mips-sni-sysv4
+	exit ;;
+    *:SINIX-*:*:*)
+	if uname -p 2>/dev/null >/dev/null ; then
+		UNAME_MACHINE=`(uname -p) 2>/dev/null`
+		echo ${UNAME_MACHINE}-sni-sysv4
+	else
+		echo ns32k-sni-sysv
+	fi
+	exit ;;
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                      # says <Richard.M.Bartel at ccMail.Census.GOV>
+        echo i586-unisys-sysv4
+        exit ;;
+    *:UNIX_System_V:4*:FTX*)
+	# From Gerald Hewes <hewes at openmarket.com>.
+	# How about differentiating between stratus architectures? -djm
+	echo hppa1.1-stratus-sysv4
+	exit ;;
+    *:*:*:FTX*)
+	# From seanf at swdc.stratus.com.
+	echo i860-stratus-sysv4
+	exit ;;
+    i*86:VOS:*:*)
+	# From Paul.Green at stratus.com.
+	echo ${UNAME_MACHINE}-stratus-vos
+	exit ;;
+    *:VOS:*:*)
+	# From Paul.Green at stratus.com.
+	echo hppa1.1-stratus-vos
+	exit ;;
+    mc68*:A/UX:*:*)
+	echo m68k-apple-aux${UNAME_RELEASE}
+	exit ;;
+    news*:NEWS-OS:6*:*)
+	echo mips-sony-newsos6
+	exit ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+	if [ -d /usr/nec ]; then
+	        echo mips-nec-sysv${UNAME_RELEASE}
+	else
+	        echo mips-unknown-sysv${UNAME_RELEASE}
+	fi
+        exit ;;
+    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+	echo powerpc-be-beos
+	exit ;;
+    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
+	echo powerpc-apple-beos
+	exit ;;
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+	echo i586-pc-beos
+	exit ;;
+    SX-4:SUPER-UX:*:*)
+	echo sx4-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-5:SUPER-UX:*:*)
+	echo sx5-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-6:SUPER-UX:*:*)
+	echo sx6-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-7:SUPER-UX:*:*)
+	echo sx7-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8:SUPER-UX:*:*)
+	echo sx8-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8R:SUPER-UX:*:*)
+	echo sx8r-nec-superux${UNAME_RELEASE}
+	exit ;;
+    Power*:Rhapsody:*:*)
+	echo powerpc-apple-rhapsody${UNAME_RELEASE}
+	exit ;;
+    *:Rhapsody:*:*)
+	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+	exit ;;
+    *:Darwin:*:*)
+	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+	case $UNAME_PROCESSOR in
+	    unknown) UNAME_PROCESSOR=powerpc ;;
+	esac
+	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+	exit ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+	UNAME_PROCESSOR=`uname -p`
+	if test "$UNAME_PROCESSOR" = "x86"; then
+		UNAME_PROCESSOR=i386
+		UNAME_MACHINE=pc
+	fi
+	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+	exit ;;
+    *:QNX:*:4*)
+	echo i386-pc-qnx
+	exit ;;
+    NSE-?:NONSTOP_KERNEL:*:*)
+	echo nse-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
+	echo nsr-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    *:NonStop-UX:*:*)
+	echo mips-compaq-nonstopux
+	exit ;;
+    BS2000:POSIX*:*:*)
+	echo bs2000-siemens-sysv
+	exit ;;
+    DS/*:UNIX_System_V:*:*)
+	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+	exit ;;
+    *:Plan9:*:*)
+	# "uname -m" is not consistent, so use $cputype instead. 386
+	# is converted to i386 for consistency with other x86
+	# operating systems.
+	if test "$cputype" = "386"; then
+	    UNAME_MACHINE=i386
+	else
+	    UNAME_MACHINE="$cputype"
+	fi
+	echo ${UNAME_MACHINE}-unknown-plan9
+	exit ;;
+    *:TOPS-10:*:*)
+	echo pdp10-unknown-tops10
+	exit ;;
+    *:TENEX:*:*)
+	echo pdp10-unknown-tenex
+	exit ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+	echo pdp10-dec-tops20
+	exit ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+	echo pdp10-xkl-tops20
+	exit ;;
+    *:TOPS-20:*:*)
+	echo pdp10-unknown-tops20
+	exit ;;
+    *:ITS:*:*)
+	echo pdp10-unknown-its
+	exit ;;
+    SEI:*:*:SEIUX)
+        echo mips-sei-seiux${UNAME_RELEASE}
+	exit ;;
+    *:DragonFly:*:*)
+	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	exit ;;
+    *:*VMS:*:*)
+    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	case "${UNAME_MACHINE}" in
+	    A*) echo alpha-dec-vms ; exit ;;
+	    I*) echo ia64-dec-vms ; exit ;;
+	    V*) echo vax-dec-vms ; exit ;;
+	esac ;;
+    *:XENIX:*:SysV)
+	echo i386-pc-xenix
+	exit ;;
+    i*86:skyos:*:*)
+	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+	exit ;;
+    i*86:rdos:*:*)
+	echo ${UNAME_MACHINE}-pc-rdos
+	exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+          "4"
+#else
+	  ""
+#endif
+         ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+  printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+  printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+    struct utsname un;
+
+    uname(&un);
+
+    if (strncmp(un.version, "V2", 2) == 0) {
+	printf ("i386-sequent-ptx2\n"); exit (0);
+    }
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+	printf ("i386-sequent-ptx1\n"); exit (0);
+    }
+    printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+#  include <sys/param.h>
+#  if defined (BSD)
+#   if BSD == 43
+      printf ("vax-dec-bsd4.3\n"); exit (0);
+#   else
+#    if BSD == 199006
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#    else
+      printf ("vax-dec-bsd\n"); exit (0);
+#    endif
+#   endif
+#  else
+    printf ("vax-dec-bsd\n"); exit (0);
+#  endif
+# else
+    printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+	{ echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+    case `getsysinfo -f cpu_type` in
+    c1*)
+	echo c1-convex-bsd
+	exit ;;
+    c2*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit ;;
+    c34*)
+	echo c34-convex-bsd
+	exit ;;
+    c38*)
+	echo c38-convex-bsd
+	exit ;;
+    c4*)
+	echo c4-convex-bsd
+	exit ;;
+    esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+and
+  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches at gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:


Property changes on: libgpod/trunk/libgpod/branches/upstream/current/config.guess
___________________________________________________________________
Added: svn:executable
   + 

Added: libgpod/trunk/libgpod/branches/upstream/current/config.h.in
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/config.h.in	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/config.h.in	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,107 @@
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* always defined to indicate that i18n is enabled */
+#undef ENABLE_NLS
+
+/* Gettext package. */
+#undef GETTEXT_PACKAGE
+
+/* Define to 1 if you have the `bind_textdomain_codeset' function. */
+#undef HAVE_BIND_TEXTDOMAIN_CODESET
+
+/* Define to 1 if you have the `dcgettext' function. */
+#undef HAVE_DCGETTEXT
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Whether gdk-pixbuf is installed, ArtworkDB writing support will be disabled
+   if it can't be found */
+#undef HAVE_GDKPIXBUF
+
+/* Define if the GNU gettext() function is already present or preinstalled. */
+#undef HAVE_GETTEXT
+
+/* Define if you have HAL support */
+#undef HAVE_HAL
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define if your <locale.h> file defines LC_MESSAGES. */
+#undef HAVE_LC_MESSAGES
+
+/* Whether libxml is installed, it's used to parse SysInfoExtended */
+#undef HAVE_LIBXML
+
+/* Define to 1 if you have the <locale.h> header file. */
+#undef HAVE_LOCALE_H
+
+/* Define to 1 if you have the `localtime_r' function. */
+#undef HAVE_LOCALTIME_R
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Whether pygobject is installed, Python API will lack GdkPixbuf support
+   without PyGOBJECT */
+#undef HAVE_PYGOBJECT
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if `tm_gmtoff' is member of `struct tm'. */
+#undef HAVE_STRUCT_TM_TM_GMTOFF
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Whether TagLib is installed, it's only used in a test program */
+#undef HAVE_TAGLIB
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+#undef NO_MINUS_C_MINUS_O
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
+
+/* Enable GNU extensions on systems that have them.  */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif

Added: libgpod/trunk/libgpod/branches/upstream/current/config.sub
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/config.sub	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/config.sub	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,1658 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+#   Free Software Foundation, Inc.
+
+timestamp='2008-01-16'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine.  It does not imply ALL GNU software can.
+#
+# 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
+# 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., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Please send patches to <config-patches at gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches at gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit ;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# 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* | linux-dietlibc | linux-newlib* | 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/'`
+    ;;
+  *)
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+	-sun*os*)
+		# Prevent following clause from handling this invalid input.
+		;;
+	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+	-apple | -axis | -knuth | -cray)
+		os=
+		basic_machine=$1
+		;;
+	-sim | -cisco | -oki | -wec | -winbond)
+		os=
+		basic_machine=$1
+		;;
+	-scout)
+		;;
+	-wrs)
+		os=-vxworks
+		basic_machine=$1
+		;;
+	-chorusos*)
+		os=-chorusos
+		basic_machine=$1
+		;;
+ 	-chorusrdb)
+ 		os=-chorusrdb
+		basic_machine=$1
+ 		;;
+	-hiux*)
+		os=-hiuxwe2
+		;;
+	-sco6)
+		os=-sco5v6
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco5)
+		os=-sco3.2v5
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco4)
+		os=-sco3.2v4
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2.[4-9]*)
+		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2v[4-9]*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco5v6*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco*)
+		os=-sco3.2v2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-udk*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-isc)
+		os=-isc2.2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-clix*)
+		basic_machine=clipper-intergraph
+		;;
+	-isc*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-lynx*)
+		os=-lynxos
+		;;
+	-ptx*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+		;;
+	-windowsnt*)
+		os=`echo $os | sed -e 's/windowsnt/winnt/'`
+		;;
+	-psos*)
+		os=-psos
+		;;
+	-mint | -mint[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+	# Recognize the basic CPU types without company name.
+	# Some are omitted here because they have special meanings below.
+	1750a | 580 \
+	| 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 | avr32 \
+	| bfin \
+	| c4x | clipper \
+	| d10v | d30v | dlx | dsp16xx \
+	| fido | fr30 | frv \
+	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| i370 | i860 | i960 | ia64 \
+	| ip2k | iq2000 \
+	| m32c | m32r | m32rle | m68000 | m68k | m88k \
+	| maxq | mb | microblaze | mcore | mep \
+	| mips | mipsbe | mipseb | mipsel | mipsle \
+	| mips16 \
+	| mips64 | mips64el \
+	| mips64vr | mips64vrel \
+	| mips64orion | mips64orionel \
+	| mips64vr4100 | mips64vr4100el \
+	| mips64vr4300 | mips64vr4300el \
+	| mips64vr5000 | mips64vr5000el \
+	| mips64vr5900 | mips64vr5900el \
+	| mipsisa32 | mipsisa32el \
+	| mipsisa32r2 | mipsisa32r2el \
+	| mipsisa64 | mipsisa64el \
+	| mipsisa64r2 | mipsisa64r2el \
+	| mipsisa64sb1 | mipsisa64sb1el \
+	| mipsisa64sr71k | mipsisa64sr71kel \
+	| mipstx39 | mipstx39el \
+	| mn10200 | mn10300 \
+	| mt \
+	| msp430 \
+	| nios | nios2 \
+	| ns16k | ns32k \
+	| or32 \
+	| pdp10 | pdp11 | pj | pjl \
+	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+	| pyramid \
+	| score \
+	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+	| sh64 | sh64le \
+	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+	| spu | strongarm \
+	| tahoe | thumb | tic4x | tic80 | tron \
+	| v850 | v850e \
+	| we32k \
+	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+	| z8k)
+		basic_machine=$basic_machine-unknown
+		;;
+	m6811 | m68hc11 | m6812 | m68hc12)
+		# Motorola 68HC11/12.
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+		;;
+	ms1)
+		basic_machine=mt-unknown
+		;;
+
+	# We use `pc' rather than `unknown'
+	# because (1) that's what they normally are, and
+	# (2) the word "unknown" tends to confuse beginning users.
+	i*86 | x86_64)
+	  basic_machine=$basic_machine-pc
+	  ;;
+	# Object if more than one company name word.
+	*-*-*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+	# Recognize the basic CPU types with company name.
+	580-* \
+	| a29k-* \
+	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+	| avr-* | avr32-* \
+	| bfin-* | bs2000-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+	| clipper-* | craynv-* | cydra-* \
+	| d10v-* | d30v-* | dlx-* \
+	| elxsi-* \
+	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+	| h8300-* | h8500-* \
+	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+	| i*86-* | i860-* | i960-* | ia64-* \
+	| ip2k-* | iq2000-* \
+	| m32c-* | m32r-* | m32rle-* \
+	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* \
+	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+	| mips16-* \
+	| mips64-* | mips64el-* \
+	| mips64vr-* | mips64vrel-* \
+	| mips64orion-* | mips64orionel-* \
+	| mips64vr4100-* | mips64vr4100el-* \
+	| mips64vr4300-* | mips64vr4300el-* \
+	| mips64vr5000-* | mips64vr5000el-* \
+	| mips64vr5900-* | mips64vr5900el-* \
+	| mipsisa32-* | mipsisa32el-* \
+	| mipsisa32r2-* | mipsisa32r2el-* \
+	| mipsisa64-* | mipsisa64el-* \
+	| mipsisa64r2-* | mipsisa64r2el-* \
+	| mipsisa64sb1-* | mipsisa64sb1el-* \
+	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+	| mipstx39-* | mipstx39el-* \
+	| mmix-* \
+	| mt-* \
+	| msp430-* \
+	| nios-* | nios2-* \
+	| none-* | np1-* | ns16k-* | ns32k-* \
+	| orion-* \
+	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+	| pyramid-* \
+	| romp-* | rs6000-* \
+	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+	| sparclite-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+	| tahoe-* | thumb-* \
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+	| tron-* \
+	| v850-* | v850e-* | vax-* \
+	| we32k-* \
+	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+	| xstormy16-* | xtensa*-* \
+	| ymp-* \
+	| z8k-*)
+		;;
+	# Recognize the basic CPU types without company name, with glob match.
+	xtensa*)
+		basic_machine=$basic_machine-unknown
+		;;
+	# Recognize the various machine names and aliases which stand
+	# for a CPU type and a company and sometimes even an OS.
+	386bsd)
+		basic_machine=i386-unknown
+		os=-bsd
+		;;
+	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+		basic_machine=m68000-att
+		;;
+	3b*)
+		basic_machine=we32k-att
+		;;
+	a29khif)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+    	abacus)
+		basic_machine=abacus-unknown
+		;;
+	adobe68k)
+		basic_machine=m68010-adobe
+		os=-scout
+		;;
+	alliant | fx80)
+		basic_machine=fx80-alliant
+		;;
+	altos | altos3068)
+		basic_machine=m68k-altos
+		;;
+	am29k)
+		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
+		;;
+	amiga | amiga-*)
+		basic_machine=m68k-unknown
+		;;
+	amigaos | amigados)
+		basic_machine=m68k-unknown
+		os=-amigaos
+		;;
+	amigaunix | amix)
+		basic_machine=m68k-unknown
+		os=-sysv4
+		;;
+	apollo68)
+		basic_machine=m68k-apollo
+		os=-sysv
+		;;
+	apollo68bsd)
+		basic_machine=m68k-apollo
+		os=-bsd
+		;;
+	aux)
+		basic_machine=m68k-apple
+		os=-aux
+		;;
+	balance)
+		basic_machine=ns32k-sequent
+		os=-dynix
+		;;
+	blackfin)
+		basic_machine=bfin-unknown
+		os=-linux
+		;;
+	blackfin-*)
+		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	c90)
+		basic_machine=c90-cray
+		os=-unicos
+		;;
+	convex-c1)
+		basic_machine=c1-convex
+		os=-bsd
+		;;
+	convex-c2)
+		basic_machine=c2-convex
+		os=-bsd
+		;;
+	convex-c32)
+		basic_machine=c32-convex
+		os=-bsd
+		;;
+	convex-c34)
+		basic_machine=c34-convex
+		os=-bsd
+		;;
+	convex-c38)
+		basic_machine=c38-convex
+		os=-bsd
+		;;
+	cray | j90)
+		basic_machine=j90-cray
+		os=-unicos
+		;;
+	craynv)
+		basic_machine=craynv-cray
+		os=-unicosmp
+		;;
+	cr16)
+		basic_machine=cr16-unknown
+		os=-elf
+		;;
+	crds | unos)
+		basic_machine=m68k-crds
+		;;
+	crisv32 | crisv32-* | etraxfs*)
+		basic_machine=crisv32-axis
+		;;
+	cris | cris-* | etrax*)
+		basic_machine=cris-axis
+		;;
+	crx)
+		basic_machine=crx-unknown
+		os=-elf
+		;;
+	da30 | da30-*)
+		basic_machine=m68k-da30
+		;;
+	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+		basic_machine=mips-dec
+		;;
+	decsystem10* | dec10*)
+		basic_machine=pdp10-dec
+		os=-tops10
+		;;
+	decsystem20* | dec20*)
+		basic_machine=pdp10-dec
+		os=-tops20
+		;;
+	delta | 3300 | motorola-3300 | motorola-delta \
+	      | 3300-motorola | delta-motorola)
+		basic_machine=m68k-motorola
+		;;
+	delta88)
+		basic_machine=m88k-motorola
+		os=-sysv3
+		;;
+	djgpp)
+		basic_machine=i586-pc
+		os=-msdosdjgpp
+		;;
+	dpx20 | dpx20-*)
+		basic_machine=rs6000-bull
+		os=-bosx
+		;;
+	dpx2* | dpx2*-bull)
+		basic_machine=m68k-bull
+		os=-sysv3
+		;;
+	ebmon29k)
+		basic_machine=a29k-amd
+		os=-ebmon
+		;;
+	elxsi)
+		basic_machine=elxsi-elxsi
+		os=-bsd
+		;;
+	encore | umax | mmax)
+		basic_machine=ns32k-encore
+		;;
+	es1800 | OSE68k | ose68k | ose | OSE)
+		basic_machine=m68k-ericsson
+		os=-ose
+		;;
+	fx2800)
+		basic_machine=i860-alliant
+		;;
+	genix)
+		basic_machine=ns32k-ns
+		;;
+	gmicro)
+		basic_machine=tron-gmicro
+		os=-sysv
+		;;
+	go32)
+		basic_machine=i386-pc
+		os=-go32
+		;;
+	h3050r* | hiux*)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	h8300hms)
+		basic_machine=h8300-hitachi
+		os=-hms
+		;;
+	h8300xray)
+		basic_machine=h8300-hitachi
+		os=-xray
+		;;
+	h8500hms)
+		basic_machine=h8500-hitachi
+		os=-hms
+		;;
+	harris)
+		basic_machine=m88k-harris
+		os=-sysv3
+		;;
+	hp300-*)
+		basic_machine=m68k-hp
+		;;
+	hp300bsd)
+		basic_machine=m68k-hp
+		os=-bsd
+		;;
+	hp300hpux)
+		basic_machine=m68k-hp
+		os=-hpux
+		;;
+	hp3k9[0-9][0-9] | hp9[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k2[0-9][0-9] | hp9k31[0-9])
+		basic_machine=m68000-hp
+		;;
+	hp9k3[2-9][0-9])
+		basic_machine=m68k-hp
+		;;
+	hp9k6[0-9][0-9] | hp6[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k7[0-79][0-9] | hp7[0-79][0-9])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k78[0-9] | hp78[0-9])
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][13679] | hp8[0-9][13679])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][0-9] | hp8[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hppa-next)
+		os=-nextstep3
+		;;
+	hppaosf)
+		basic_machine=hppa1.1-hp
+		os=-osf
+		;;
+	hppro)
+		basic_machine=hppa1.1-hp
+		os=-proelf
+		;;
+	i370-ibm* | ibm*)
+		basic_machine=i370-ibm
+		;;
+# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
+	i*86v32)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv32
+		;;
+	i*86v4*)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv4
+		;;
+	i*86v)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv
+		;;
+	i*86sol2)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-solaris2
+		;;
+	i386mach)
+		basic_machine=i386-mach
+		os=-mach
+		;;
+	i386-vsta | vsta)
+		basic_machine=i386-unknown
+		os=-vsta
+		;;
+	iris | iris4d)
+		basic_machine=mips-sgi
+		case $os in
+		    -irix*)
+			;;
+		    *)
+			os=-irix4
+			;;
+		esac
+		;;
+	isi68 | isi)
+		basic_machine=m68k-isi
+		os=-sysv
+		;;
+	m68knommu)
+		basic_machine=m68k-unknown
+		os=-linux
+		;;
+	m68knommu-*)
+		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	m88k-omron*)
+		basic_machine=m88k-omron
+		;;
+	magnum | m3230)
+		basic_machine=mips-mips
+		os=-sysv
+		;;
+	merlin)
+		basic_machine=ns32k-utek
+		os=-sysv
+		;;
+	mingw32)
+		basic_machine=i386-pc
+		os=-mingw32
+		;;
+	mingw32ce)
+		basic_machine=arm-unknown
+		os=-mingw32ce
+		;;
+	miniframe)
+		basic_machine=m68000-convergent
+		;;
+	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+	mips3*-*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+		;;
+	mips3*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+		;;
+	monitor)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	morphos)
+		basic_machine=powerpc-unknown
+		os=-morphos
+		;;
+	msdos)
+		basic_machine=i386-pc
+		os=-msdos
+		;;
+	ms1-*)
+		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+		;;
+	mvs)
+		basic_machine=i370-ibm
+		os=-mvs
+		;;
+	ncr3000)
+		basic_machine=i486-ncr
+		os=-sysv4
+		;;
+	netbsd386)
+		basic_machine=i386-unknown
+		os=-netbsd
+		;;
+	netwinder)
+		basic_machine=armv4l-rebel
+		os=-linux
+		;;
+	news | news700 | news800 | news900)
+		basic_machine=m68k-sony
+		os=-newsos
+		;;
+	news1000)
+		basic_machine=m68030-sony
+		os=-newsos
+		;;
+	news-3600 | risc-news)
+		basic_machine=mips-sony
+		os=-newsos
+		;;
+	necv70)
+		basic_machine=v70-nec
+		os=-sysv
+		;;
+	next | m*-next )
+		basic_machine=m68k-next
+		case $os in
+		    -nextstep* )
+			;;
+		    -ns2*)
+		      os=-nextstep2
+			;;
+		    *)
+		      os=-nextstep3
+			;;
+		esac
+		;;
+	nh3000)
+		basic_machine=m68k-harris
+		os=-cxux
+		;;
+	nh[45]000)
+		basic_machine=m88k-harris
+		os=-cxux
+		;;
+	nindy960)
+		basic_machine=i960-intel
+		os=-nindy
+		;;
+	mon960)
+		basic_machine=i960-intel
+		os=-mon960
+		;;
+	nonstopux)
+		basic_machine=mips-compaq
+		os=-nonstopux
+		;;
+	np1)
+		basic_machine=np1-gould
+		;;
+	nsr-tandem)
+		basic_machine=nsr-tandem
+		;;
+	op50n-* | op60c-*)
+		basic_machine=hppa1.1-oki
+		os=-proelf
+		;;
+	openrisc | openrisc-*)
+		basic_machine=or32-unknown
+		;;
+	os400)
+		basic_machine=powerpc-ibm
+		os=-os400
+		;;
+	OSE68000 | ose68000)
+		basic_machine=m68000-ericsson
+		os=-ose
+		;;
+	os68k)
+		basic_machine=m68k-none
+		os=-os68k
+		;;
+	pa-hitachi)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	paragon)
+		basic_machine=i860-intel
+		os=-osf
+		;;
+	parisc)
+		basic_machine=hppa-unknown
+		os=-linux
+		;;
+	parisc-*)
+		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	pbd)
+		basic_machine=sparc-tti
+		;;
+	pbb)
+		basic_machine=m68k-tti
+		;;
+	pc532 | pc532-*)
+		basic_machine=ns32k-pc532
+		;;
+	pc98)
+		basic_machine=i386-pc
+		;;
+	pc98-*)
+		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentium | p5 | k5 | k6 | nexgen | viac3)
+		basic_machine=i586-pc
+		;;
+	pentiumpro | p6 | 6x86 | athlon | athlon_*)
+		basic_machine=i686-pc
+		;;
+	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-* | pentiumiii-* | pentium3-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentium4-*)
+		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pn)
+		basic_machine=pn-gould
+		;;
+	power)	basic_machine=power-ibm
+		;;
+	ppc)	basic_machine=powerpc-unknown
+		;;
+	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppcle | powerpclittle | ppc-le | powerpc-little)
+		basic_machine=powerpcle-unknown
+		;;
+	ppcle-* | powerpclittle-*)
+		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64)	basic_machine=powerpc64-unknown
+		;;
+	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+		basic_machine=powerpc64le-unknown
+		;;
+	ppc64le-* | powerpc64little-*)
+		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ps2)
+		basic_machine=i386-ibm
+		;;
+	pw32)
+		basic_machine=i586-unknown
+		os=-pw32
+		;;
+	rdos)
+		basic_machine=i386-pc
+		os=-rdos
+		;;
+	rom68k)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	rm[46]00)
+		basic_machine=mips-siemens
+		;;
+	rtpc | rtpc-*)
+		basic_machine=romp-ibm
+		;;
+	s390 | s390-*)
+		basic_machine=s390-ibm
+		;;
+	s390x | s390x-*)
+		basic_machine=s390x-ibm
+		;;
+	sa29200)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	sb1)
+		basic_machine=mipsisa64sb1-unknown
+		;;
+	sb1el)
+		basic_machine=mipsisa64sb1el-unknown
+		;;
+	sde)
+		basic_machine=mipsisa32-sde
+		os=-elf
+		;;
+	sei)
+		basic_machine=mips-sei
+		os=-seiux
+		;;
+	sequent)
+		basic_machine=i386-sequent
+		;;
+	sh)
+		basic_machine=sh-hitachi
+		os=-hms
+		;;
+	sh5el)
+		basic_machine=sh5le-unknown
+		;;
+	sh64)
+		basic_machine=sh64-unknown
+		;;
+	sparclite-wrs | simso-wrs)
+		basic_machine=sparclite-wrs
+		os=-vxworks
+		;;
+	sps7)
+		basic_machine=m68k-bull
+		os=-sysv2
+		;;
+	spur)
+		basic_machine=spur-unknown
+		;;
+	st2000)
+		basic_machine=m68k-tandem
+		;;
+	stratus)
+		basic_machine=i860-stratus
+		os=-sysv4
+		;;
+	sun2)
+		basic_machine=m68000-sun
+		;;
+	sun2os3)
+		basic_machine=m68000-sun
+		os=-sunos3
+		;;
+	sun2os4)
+		basic_machine=m68000-sun
+		os=-sunos4
+		;;
+	sun3os3)
+		basic_machine=m68k-sun
+		os=-sunos3
+		;;
+	sun3os4)
+		basic_machine=m68k-sun
+		os=-sunos4
+		;;
+	sun4os3)
+		basic_machine=sparc-sun
+		os=-sunos3
+		;;
+	sun4os4)
+		basic_machine=sparc-sun
+		os=-sunos4
+		;;
+	sun4sol2)
+		basic_machine=sparc-sun
+		os=-solaris2
+		;;
+	sun3 | sun3-*)
+		basic_machine=m68k-sun
+		;;
+	sun4)
+		basic_machine=sparc-sun
+		;;
+	sun386 | sun386i | roadrunner)
+		basic_machine=i386-sun
+		;;
+	sv1)
+		basic_machine=sv1-cray
+		os=-unicos
+		;;
+	symmetry)
+		basic_machine=i386-sequent
+		os=-dynix
+		;;
+	t3e)
+		basic_machine=alphaev5-cray
+		os=-unicos
+		;;
+	t90)
+		basic_machine=t90-cray
+		os=-unicos
+		;;
+	tic54x | c54x*)
+		basic_machine=tic54x-unknown
+		os=-coff
+		;;
+	tic55x | c55x*)
+		basic_machine=tic55x-unknown
+		os=-coff
+		;;
+	tic6x | c6x*)
+		basic_machine=tic6x-unknown
+		os=-coff
+		;;
+	tile*)
+		basic_machine=tile-unknown
+		os=-linux-gnu
+		;;
+	tx39)
+		basic_machine=mipstx39-unknown
+		;;
+	tx39el)
+		basic_machine=mipstx39el-unknown
+		;;
+	toad1)
+		basic_machine=pdp10-xkl
+		os=-tops20
+		;;
+	tower | tower-32)
+		basic_machine=m68k-ncr
+		;;
+	tpf)
+		basic_machine=s390x-ibm
+		os=-tpf
+		;;
+	udi29k)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	ultra3)
+		basic_machine=a29k-nyu
+		os=-sym1
+		;;
+	v810 | necv810)
+		basic_machine=v810-nec
+		os=-none
+		;;
+	vaxv)
+		basic_machine=vax-dec
+		os=-sysv
+		;;
+	vms)
+		basic_machine=vax-dec
+		os=-vms
+		;;
+	vpp*|vx|vx-*)
+		basic_machine=f301-fujitsu
+		;;
+	vxworks960)
+		basic_machine=i960-wrs
+		os=-vxworks
+		;;
+	vxworks68)
+		basic_machine=m68k-wrs
+		os=-vxworks
+		;;
+	vxworks29k)
+		basic_machine=a29k-wrs
+		os=-vxworks
+		;;
+	w65*)
+		basic_machine=w65-wdc
+		os=-none
+		;;
+	w89k-*)
+		basic_machine=hppa1.1-winbond
+		os=-proelf
+		;;
+	xbox)
+		basic_machine=i686-pc
+		os=-mingw32
+		;;
+	xps | xps100)
+		basic_machine=xps100-honeywell
+		;;
+	ymp)
+		basic_machine=ymp-cray
+		os=-unicos
+		;;
+	z8k-*-coff)
+		basic_machine=z8k-unknown
+		os=-sim
+		;;
+	none)
+		basic_machine=none-none
+		os=-none
+		;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+	w89k)
+		basic_machine=hppa1.1-winbond
+		;;
+	op50n)
+		basic_machine=hppa1.1-oki
+		;;
+	op60c)
+		basic_machine=hppa1.1-oki
+		;;
+	romp)
+		basic_machine=romp-ibm
+		;;
+	mmix)
+		basic_machine=mmix-knuth
+		;;
+	rs6000)
+		basic_machine=rs6000-ibm
+		;;
+	vax)
+		basic_machine=vax-dec
+		;;
+	pdp10)
+		# there are many clones, so DEC is not a safe bet
+		basic_machine=pdp10-unknown
+		;;
+	pdp11)
+		basic_machine=pdp11-dec
+		;;
+	we32k)
+		basic_machine=we32k-att
+		;;
+	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+		basic_machine=sh-unknown
+		;;
+	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+		basic_machine=sparc-sun
+		;;
+	cydra)
+		basic_machine=cydra-cydrome
+		;;
+	orion)
+		basic_machine=orion-highlevel
+		;;
+	orion105)
+		basic_machine=clipper-highlevel
+		;;
+	mac | mpw | mac-mpw)
+		basic_machine=m68k-apple
+		;;
+	pmac | pmac-mpw)
+		basic_machine=powerpc-apple
+		;;
+	*-unknown)
+		# Make sure to match an already-canonicalized machine name.
+		;;
+	*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+	*-digital*)
+		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+		;;
+	*-commodore*)
+		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+		;;
+	*)
+		;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+        # First match some system type aliases
+        # that might get confused with valid system types.
+	# -solaris* is a basic system type, with this one exception.
+	-solaris1 | -solaris1.*)
+		os=`echo $os | sed -e 's|solaris1|sunos4|'`
+		;;
+	-solaris)
+		os=-solaris2
+		;;
+	-svr4*)
+		os=-sysv4
+		;;
+	-unixware*)
+		os=-sysv4.2uw
+		;;
+	-gnu/linux*)
+		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+		;;
+	# First accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST END IN A *, to match a version number.
+	# -sysv* is not here because it comes later, after sysvr4.
+	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+	      | -aos* \
+	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+	      | -openbsd* | -solidbsd* \
+	      | -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* | -linux-newlib* | -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* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
+	# Remember, each alternative MUST END IN *, to match a version number.
+		;;
+	-qnx*)
+		case $basic_machine in
+		    x86-* | i*86-*)
+			;;
+		    *)
+			os=-nto$os
+			;;
+		esac
+		;;
+	-nto-qnx*)
+		;;
+	-nto*)
+		os=`echo $os | sed -e 's|nto|nto-qnx|'`
+		;;
+	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+		;;
+	-mac*)
+		os=`echo $os | sed -e 's|mac|macos|'`
+		;;
+	-linux-dietlibc)
+		os=-linux-dietlibc
+		;;
+	-linux*)
+		os=`echo $os | sed -e 's|linux|linux-gnu|'`
+		;;
+	-sunos5*)
+		os=`echo $os | sed -e 's|sunos5|solaris2|'`
+		;;
+	-sunos6*)
+		os=`echo $os | sed -e 's|sunos6|solaris3|'`
+		;;
+	-opened*)
+		os=-openedition
+		;;
+        -os400*)
+		os=-os400
+		;;
+	-wince*)
+		os=-wince
+		;;
+	-osfrose*)
+		os=-osfrose
+		;;
+	-osf*)
+		os=-osf
+		;;
+	-utek*)
+		os=-bsd
+		;;
+	-dynix*)
+		os=-bsd
+		;;
+	-acis*)
+		os=-aos
+		;;
+	-atheos*)
+		os=-atheos
+		;;
+	-syllable*)
+		os=-syllable
+		;;
+	-386bsd)
+		os=-bsd
+		;;
+	-ctix* | -uts*)
+		os=-sysv
+		;;
+	-nova*)
+		os=-rtmk-nova
+		;;
+	-ns2 )
+		os=-nextstep2
+		;;
+	-nsk*)
+		os=-nsk
+		;;
+	# Preserve the version number of sinix5.
+	-sinix5.*)
+		os=`echo $os | sed -e 's|sinix|sysv|'`
+		;;
+	-sinix*)
+		os=-sysv4
+		;;
+        -tpf*)
+		os=-tpf
+		;;
+	-triton*)
+		os=-sysv3
+		;;
+	-oss*)
+		os=-sysv3
+		;;
+	-svr4)
+		os=-sysv4
+		;;
+	-svr3)
+		os=-sysv3
+		;;
+	-sysvr4)
+		os=-sysv4
+		;;
+	# This must come after -sysvr4.
+	-sysv*)
+		;;
+	-ose*)
+		os=-ose
+		;;
+	-es1800*)
+		os=-ose
+		;;
+	-xenix)
+		os=-xenix
+		;;
+	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+		os=-mint
+		;;
+	-aros*)
+		os=-aros
+		;;
+	-kaos*)
+		os=-kaos
+		;;
+	-zvmoe)
+		os=-zvmoe
+		;;
+	-none)
+		;;
+	*)
+		# Get rid of the `-' at the beginning of $os.
+		os=`echo $os | sed 's/[^-]*-//'`
+		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+		exit 1
+		;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+        score-*)
+		os=-elf
+		;;
+        spu-*)
+		os=-elf
+		;;
+	*-acorn)
+		os=-riscix1.2
+		;;
+	arm*-rebel)
+		os=-linux
+		;;
+	arm*-semi)
+		os=-aout
+		;;
+        c4x-* | tic4x-*)
+        	os=-coff
+		;;
+	# This must come before the *-dec entry.
+	pdp10-*)
+		os=-tops20
+		;;
+	pdp11-*)
+		os=-none
+		;;
+	*-dec | vax-*)
+		os=-ultrix4.2
+		;;
+	m68*-apollo)
+		os=-domain
+		;;
+	i386-sun)
+		os=-sunos4.0.2
+		;;
+	m68000-sun)
+		os=-sunos3
+		# This also exists in the configure program, but was not the
+		# default.
+		# os=-sunos4
+		;;
+	m68*-cisco)
+		os=-aout
+		;;
+        mep-*)
+		os=-elf
+		;;
+	mips*-cisco)
+		os=-elf
+		;;
+	mips*-*)
+		os=-elf
+		;;
+	or32-*)
+		os=-coff
+		;;
+	*-tti)	# must be before sparc entry or we get the wrong os.
+		os=-sysv3
+		;;
+	sparc-* | *-sun)
+		os=-sunos4.1.1
+		;;
+	*-be)
+		os=-beos
+		;;
+	*-haiku)
+		os=-haiku
+		;;
+	*-ibm)
+		os=-aix
+		;;
+    	*-knuth)
+		os=-mmixware
+		;;
+	*-wec)
+		os=-proelf
+		;;
+	*-winbond)
+		os=-proelf
+		;;
+	*-oki)
+		os=-proelf
+		;;
+	*-hp)
+		os=-hpux
+		;;
+	*-hitachi)
+		os=-hiux
+		;;
+	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+		os=-sysv
+		;;
+	*-cbm)
+		os=-amigaos
+		;;
+	*-dg)
+		os=-dgux
+		;;
+	*-dolphin)
+		os=-sysv3
+		;;
+	m68k-ccur)
+		os=-rtu
+		;;
+	m88k-omron*)
+		os=-luna
+		;;
+	*-next )
+		os=-nextstep
+		;;
+	*-sequent)
+		os=-ptx
+		;;
+	*-crds)
+		os=-unos
+		;;
+	*-ns)
+		os=-genix
+		;;
+	i370-*)
+		os=-mvs
+		;;
+	*-next)
+		os=-nextstep3
+		;;
+	*-gould)
+		os=-sysv
+		;;
+	*-highlevel)
+		os=-bsd
+		;;
+	*-encore)
+		os=-bsd
+		;;
+	*-sgi)
+		os=-irix
+		;;
+	*-siemens)
+		os=-sysv4
+		;;
+	*-masscomp)
+		os=-rtu
+		;;
+	f30[01]-fujitsu | f700-fujitsu)
+		os=-uxpv
+		;;
+	*-rom68k)
+		os=-coff
+		;;
+	*-*bug)
+		os=-coff
+		;;
+	*-apple)
+		os=-macos
+		;;
+	*-atari*)
+		os=-mint
+		;;
+	*)
+		os=-none
+		;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+	*-unknown)
+		case $os in
+			-riscix*)
+				vendor=acorn
+				;;
+			-sunos*)
+				vendor=sun
+				;;
+			-aix*)
+				vendor=ibm
+				;;
+			-beos*)
+				vendor=be
+				;;
+			-hpux*)
+				vendor=hp
+				;;
+			-mpeix*)
+				vendor=hp
+				;;
+			-hiux*)
+				vendor=hitachi
+				;;
+			-unos*)
+				vendor=crds
+				;;
+			-dgux*)
+				vendor=dg
+				;;
+			-luna*)
+				vendor=omron
+				;;
+			-genix*)
+				vendor=ns
+				;;
+			-mvs* | -opened*)
+				vendor=ibm
+				;;
+			-os400*)
+				vendor=ibm
+				;;
+			-ptx*)
+				vendor=sequent
+				;;
+			-tpf*)
+				vendor=ibm
+				;;
+			-vxsim* | -vxworks* | -windiss*)
+				vendor=wrs
+				;;
+			-aux*)
+				vendor=apple
+				;;
+			-hms*)
+				vendor=hitachi
+				;;
+			-mpw* | -macos*)
+				vendor=apple
+				;;
+			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+				vendor=atari
+				;;
+			-vos*)
+				vendor=stratus
+				;;
+		esac
+		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+		;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:


Property changes on: libgpod/trunk/libgpod/branches/upstream/current/config.sub
___________________________________________________________________
Added: svn:executable
   + 

Added: libgpod/trunk/libgpod/branches/upstream/current/configure
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/configure	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/configure	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,25356 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.61.
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  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) >/dev/null 2>&1 && $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+if test "x$CONFIG_SHELL" = x; then
+  if (eval ":") 2>/dev/null; then
+  as_have_required=yes
+else
+  as_have_required=no
+fi
+
+  if test $as_have_required = yes && 	 (eval ":
+(as_func_return () {
+  (exit \$1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0) || { (exit 1); exit 1; }
+
+(
+  as_lineno_1=\$LINENO
+  as_lineno_2=\$LINENO
+  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+") 2> /dev/null; then
+  :
+else
+  as_candidate_shells=
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  case $as_dir in
+	 /*)
+	   for as_base in sh bash ksh sh5; do
+	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+	   done;;
+       esac
+done
+IFS=$as_save_IFS
+
+
+      for as_shell in $as_candidate_shells $SHELL; do
+	 # Try only shells that exist, to save several forks.
+	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+		{ ("$as_shell") 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+_ASEOF
+}; then
+  CONFIG_SHELL=$as_shell
+	       as_have_required=yes
+	       if { "$as_shell" 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+(as_func_return () {
+  (exit $1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = "$1" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test $exitcode = 0) || { (exit 1); exit 1; }
+
+(
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
+
+_ASEOF
+}; then
+  break
+fi
+
+fi
+
+      done
+
+      if test "x$CONFIG_SHELL" != x; then
+  for as_var in BASH_ENV ENV
+        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+        done
+        export CONFIG_SHELL
+        exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+
+    if test $as_have_required = no; then
+  echo This script requires a shell more modern than all the
+      echo shells that I found on your system.  Please install a
+      echo modern shell, or manually run the script under such a
+      echo shell if you do have one.
+      { (exit 1); exit 1; }
+fi
+
+
+fi
+
+fi
+
+
+
+(eval "as_func_return () {
+  (exit \$1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0") || {
+  echo No shell found that supports shell functions.
+  echo Please tell autoconf at gnu.org about your system,
+  echo including any error possibly output before this
+  echo message
+}
+
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line after each line using $LINENO; the second 'sed'
+  # does the real work.  The second script uses 'N' to pair each
+  # line-number line with the line containing $LINENO, and appends
+  # trailing '-' during substitution so that $LINENO is not a special
+  # case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # scripts with optimization help from Paolo Bonzini.  Blame Lee
+  # E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+  case `echo 'x\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  *)   ECHO_C='\c';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir
+fi
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s='ln -s'
+  # ... but there are two gotchas:
+  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+  # In both cases, we have to default to `cp -p'.
+  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+    as_ln_s='cp -p'
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+        test -d "$1/.";
+      else
+	case $1 in
+        -*)set "./$1";;
+	esac;
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+	???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+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="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+
+
+# 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.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+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
+
+
+
+
+tagnames=${tagnames+${tagnames},}CXX
+
+tagnames=${tagnames+${tagnames},}F77
+
+exec 7<&0 </dev/null 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="src"
+ac_unique_file="configure.ac"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# 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
+datarootdir
+datadir
+sysconfdir
+sharedstatedir
+localstatedir
+includedir
+oldincludedir
+docdir
+infodir
+htmldir
+dvidir
+pdfdir
+psdir
+libdir
+localedir
+mandir
+DEFS
+ECHO_C
+ECHO_N
+ECHO_T
+LIBS
+build_alias
+host_alias
+target_alias
+LIBGPOD_SO_VERSION
+LIBGPOD_MAJOR_VERSION
+LIBGPOD_MINOR_VERSION
+LIBGPOD_MICRO_VERSION
+LIBGPOD_VERSION
+INSTALL_PROGRAM
+INSTALL_SCRIPT
+INSTALL_DATA
+am__isrc
+CYGPATH_W
+PACKAGE
+VERSION
+ACLOCAL
+AUTOCONF
+AUTOMAKE
+AUTOHEADER
+MAKEINFO
+install_sh
+STRIP
+INSTALL_STRIP_PROGRAM
+mkdir_p
+AWK
+SET_MAKE
+am__leading_dot
+AMTAR
+am__tar
+am__untar
+ACLOCAL_AMFLAGS
+MAINTAINER_MODE_TRUE
+MAINTAINER_MODE_FALSE
+MAINT
+CC
+CFLAGS
+LDFLAGS
+CPPFLAGS
+ac_ct_CC
+EXEEXT
+OBJEXT
+DEPDIR
+am__include
+am__quote
+AMDEP_TRUE
+AMDEP_FALSE
+AMDEPBACKSLASH
+CCDEPMODE
+am__fastdepCC_TRUE
+am__fastdepCC_FALSE
+CXX
+CXXFLAGS
+ac_ct_CXX
+CXXDEPMODE
+am__fastdepCXX_TRUE
+am__fastdepCXX_FALSE
+SED
+build
+build_cpu
+build_vendor
+build_os
+host
+host_cpu
+host_vendor
+host_os
+GREP
+EGREP
+CPP
+LN_S
+ECHO
+AR
+RANLIB
+CXXCPP
+F77
+FFLAGS
+ac_ct_F77
+LIBTOOL
+INTLTOOL_DESKTOP_RULE
+INTLTOOL_DIRECTORY_RULE
+INTLTOOL_KEYS_RULE
+INTLTOOL_PROP_RULE
+INTLTOOL_OAF_RULE
+INTLTOOL_PONG_RULE
+INTLTOOL_SERVER_RULE
+INTLTOOL_SHEET_RULE
+INTLTOOL_SOUNDLIST_RULE
+INTLTOOL_UI_RULE
+INTLTOOL_XAM_RULE
+INTLTOOL_KBD_RULE
+INTLTOOL_XML_RULE
+INTLTOOL_XML_NOMERGE_RULE
+INTLTOOL_CAVES_RULE
+INTLTOOL_SCHEMAS_RULE
+INTLTOOL_THEME_RULE
+INTLTOOL_SERVICE_RULE
+INTLTOOL_POLICY_RULE
+XGETTEXT
+MSGMERGE
+MSGFMT
+INTLTOOL_EXTRACT
+INTLTOOL_MERGE
+INTLTOOL_UPDATE
+INTLTOOL_PERL
+ALL_LINGUAS
+DATADIRNAME
+PKG_CONFIG
+LIBGPOD_CFLAGS
+LIBGPOD_LIBS
+GLIB_CFLAGS
+GLIB_LIBS
+WITH_INTERNAL_GCHECKSUM_TRUE
+WITH_INTERNAL_GCHECKSUM_FALSE
+SGUTILS_LIBS
+HAVE_SGUTILS_TRUE
+HAVE_SGUTILS_FALSE
+HALCALLOUTSDIR
+HALFDIDIR
+HAL_CFLAGS
+HAL_LIBS
+HAVE_HAL_TRUE
+HAVE_HAL_FALSE
+TAGLIB_CFLAGS
+TAGLIB_LIBS
+HAVE_TAGLIB_TRUE
+HAVE_TAGLIB_FALSE
+LIBXML_CFLAGS
+LIBXML_LIBS
+GDKPIXBUF_CFLAGS
+GDKPIXBUF_LIBS
+HAVE_GDKPIXBUF_TRUE
+HAVE_GDKPIXBUF_FALSE
+GDKPIXBUF_REQ
+PYGOBJECT_CFLAGS
+PYGOBJECT_LIBS
+HAVE_PYGOBJECT_TRUE
+HAVE_PYGOBJECT_FALSE
+GETTEXT_PACKAGE
+USE_NLS
+MSGFMT_OPTS
+GMSGFMT
+CATALOGS
+CATOBJEXT
+GMOFILES
+INSTOBJEXT
+INTLLIBS
+PO_IN_DATADIR_TRUE
+PO_IN_DATADIR_FALSE
+POFILES
+POSUB
+MKINSTALLDIRS
+HTML_DIR
+GTKDOC_CHECK
+ENABLE_GTK_DOC_TRUE
+ENABLE_GTK_DOC_FALSE
+GTK_DOC_USE_LIBTOOL_TRUE
+GTK_DOC_USE_LIBTOOL_FALSE
+PYTHON
+PYTHON_VERSION
+PYTHON_PREFIX
+PYTHON_EXEC_PREFIX
+PYTHON_PLATFORM
+pythondir
+pkgpythondir
+pyexecdir
+pkgpyexecdir
+PYTHON_INCLUDES
+PYTHON_LDFLAGS
+SWIG
+SWIG_LIB
+HAVE_PYTHON_TRUE
+HAVE_PYTHON_FALSE
+LIBOBJS
+LTLIBOBJS'
+ac_subst_files=''
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CXX
+CXXFLAGS
+CCC
+CPP
+CXXCPP
+F77
+FFLAGS
+PKG_CONFIG
+LIBGPOD_CFLAGS
+LIBGPOD_LIBS
+GLIB_CFLAGS
+GLIB_LIBS
+HAL_CFLAGS
+HAL_LIBS
+TAGLIB_CFLAGS
+TAGLIB_LIBS
+LIBXML_CFLAGS
+LIBXML_LIBS
+GDKPIXBUF_CFLAGS
+GDKPIXBUF_LIBS
+PYGOBJECT_CFLAGS
+PYGOBJECT_LIBS'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval $ac_prev=\$ac_option
+    ac_prev=
+    continue
+  fi
+
+  case $ac_option in
+  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *)	ac_optarg=yes ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
+    datadir=$ac_optarg ;;
+
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+    eval enable_$ac_feature=no ;;
+
+  -docdir | --docdir | --docdi | --doc | --do)
+    ac_prev=docdir ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+    eval enable_$ac_feature=\$ac_optarg ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst | --locals)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+    eval with_$ac_package=\$ac_optarg ;;
+
+  -without-* | --without-*)
+    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+    eval with_$ac_package=no ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; }
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+   { (exit 1); exit 1; }; }
+    eval $ac_envvar=\$ac_optarg
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  { echo "$as_me: error: missing argument to $ac_option" >&2
+   { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute directory names.
+for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
+		datadir sysconfdir sharedstatedir localstatedir includedir \
+		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+		libdir localedir mandir
+do
+  eval ac_val=\$$ac_var
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* )  continue;;
+    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+  esac
+  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; }
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used." >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+  { echo "$as_me: error: Working directory cannot be determined" >&2
+   { (exit 1); exit 1; }; }
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  { echo "$as_me: error: pwd does not report name of working directory" >&2
+   { (exit 1); exit 1; }; }
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then the parent directory.
+  ac_confdir=`$as_dirname -- "$0" ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$0" : 'X\(//\)[^/]' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$0" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r "$srcdir/$ac_unique_file"; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+   { (exit 1); exit 1; }; }
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+	cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
+   { (exit 1); exit 1; }; }
+	pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+			  [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+			  [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR           user executables [EPREFIX/bin]
+  --sbindir=DIR          system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR       program executables [EPREFIX/libexec]
+  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
+  --libdir=DIR           object code libraries [EPREFIX/lib]
+  --includedir=DIR       C header files [PREFIX/include]
+  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
+  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR          info documentation [DATAROOTDIR/info]
+  --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR           man documentation [DATAROOTDIR/man]
+  --docdir=DIR           documentation root [DATAROOTDIR/doc/PACKAGE]
+  --htmldir=DIR          html documentation [DOCDIR]
+  --dvidir=DIR           dvi documentation [DOCDIR]
+  --pdfdir=DIR           pdf documentation [DOCDIR]
+  --psdir=DIR            ps documentation [DOCDIR]
+_ACEOF
+
+  cat <<\_ACEOF
+
+Program names:
+  --program-prefix=PREFIX            prepend PREFIX to installed program names
+  --program-suffix=SUFFIX            append SUFFIX to installed program names
+  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-maintainer-mode  enable make rules and dependencies not useful
+			  (and sometimes confusing) to the casual installer
+  --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=yes]
+  --enable-fast-install[=PKGS]
+                          optimize for fast installation [default=yes]
+  --disable-libtool-lock  avoid locking (might break parallel builds)
+  --disable-libxml        SysInfoExtended won't be parsed
+  --disable-gdk-pixbuf    ArtworkDB will be disabled without gdk-pixbuf
+  --disable-pygobject     Python API will lack GdkPixbuf support without
+                          PyGOBJECT
+  --enable-gtk-doc        use gtk-doc to build documentation [default=no]
+  --enable-more-warnings  Maximum compiler warnings
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --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 [automatic]
+  --with-internal-gchecksum
+                          Build using internal copy of gchecksum
+  --without-hal           Disable HAL support
+  --with-hal-callouts-dir=DIR
+                          Directory where HAL expects its callout scripts to
+                          be located
+  --with-hal-fdi-dir=DIR  Directory where HAL expects its fdi files to be
+                          located
+  --with-html-dir=PATH    path to installed docs
+  --with-python=PATH      build python bindings [default=yes]
+
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  LIBS        libraries to pass to the linker, e.g. -l<library>
+  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+              you have headers in a nonstandard directory <include dir>
+  CXX         C++ compiler command
+  CXXFLAGS    C++ compiler flags
+  CPP         C preprocessor
+  CXXCPP      C++ preprocessor
+  F77         Fortran 77 compiler command
+  FFLAGS      Fortran 77 compiler flags
+  PKG_CONFIG  path to pkg-config utility
+  LIBGPOD_CFLAGS
+              C compiler flags for LIBGPOD, overriding pkg-config
+  LIBGPOD_LIBS
+              linker flags for LIBGPOD, overriding pkg-config
+  GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config
+  GLIB_LIBS   linker flags for GLIB, overriding pkg-config
+  HAL_CFLAGS  C compiler flags for HAL, overriding pkg-config
+  HAL_LIBS    linker flags for HAL, overriding pkg-config
+  TAGLIB_CFLAGS
+              C compiler flags for TAGLIB, overriding pkg-config
+  TAGLIB_LIBS linker flags for TAGLIB, overriding pkg-config
+  LIBXML_CFLAGS
+              C compiler flags for LIBXML, overriding pkg-config
+  LIBXML_LIBS linker flags for LIBXML, overriding pkg-config
+  GDKPIXBUF_CFLAGS
+              C compiler flags for GDKPIXBUF, overriding pkg-config
+  GDKPIXBUF_LIBS
+              linker flags for GDKPIXBUF, overriding pkg-config
+  PYGOBJECT_CFLAGS
+              C compiler flags for PYGOBJECT, overriding pkg-config
+  PYGOBJECT_LIBS
+              linker flags for PYGOBJECT, overriding pkg-config
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d "$ac_dir" || continue
+    ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested configure.
+    if test -f "$ac_srcdir/configure.gnu"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+    elif test -f "$ac_srcdir/configure"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure" --help=recursive
+    else
+      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
+  done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+  cat <<\_ACEOF
+configure
+generated by GNU Autoconf 2.61
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit
+fi
+cat >config.log <<_ACEOF
+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.61.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  echo "PATH: $as_dir"
+done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *\'*)
+      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    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.
+      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
+      fi
+      ac_configure_args="$ac_configure_args '$ac_arg'"
+      ;;
+    esac
+  done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      *) $as_unset $ac_var ;;
+      esac ;;
+    esac
+  done
+  (set) 2>&1 |
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      sed -n \
+	"s/'\''/'\''\\\\'\'''\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
+    *)
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+)
+    echo
+
+    cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      echo "$ac_var='\''$ac_val'\''"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      cat <<\_ASBOX
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
+_ASBOX
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=\$$ac_var
+	case $ac_val in
+	*\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+	esac
+	echo "$ac_var='\''$ac_val'\''"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+      echo
+      cat confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      echo "$as_me: caught signal $ac_signal"
+    echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core core.conftest.* &&
+    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -n "$CONFIG_SITE"; then
+  set x "$CONFIG_SITE"
+elif test "x$prefix" != xNONE; then
+  set x "$prefix/share/config.site" "$prefix/etc/config.site"
+else
+  set x "$ac_default_prefix/share/config.site" \
+	"$ac_default_prefix/etc/config.site"
+fi
+shift
+for ac_site_file
+do
+  if test -r "$ac_site_file"; then
+    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
+    esac
+  fi
+else
+  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; 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
+  eval ac_new_val=\$ac_env_${ac_var}_value
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      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: error: \`$ac_var' has changed since the previous run:" >&2;}
+	{ 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:   current value: $ac_new_val" >&2;}
+	ac_cache_corrupted=:
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&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
+
+
+
+
+
+ac_config_headers="$ac_config_headers config.h"
+
+
+# Making releases:
+#   LIBGPOD_MICRO_VERSION += 1;
+#   LIBGPOD_SO_VERSION - see comments
+#
+LIBGPOD_MAJOR_VERSION=0
+LIBGPOD_MINOR_VERSION=7
+LIBGPOD_MICRO_VERSION=2
+# If you need a modifier for the version number.
+# Normally empty, but can be used to make "fixup" releases.
+LIBGPOD_EXTRAVERSION=
+
+LIBGPOD_VERSION=$LIBGPOD_MAJOR_VERSION.$LIBGPOD_MINOR_VERSION.$LIBGPOD_MICRO_VERSION$LIBGPOD_EXTRAVERSION
+
+# +1 : 0 : +1  == adds new functions to the interface
+# +1 : 0 : 0   == changes or removes functions (changes include both
+#                 changes to the signature and the semantic)
+#  ? :+1 : ?   == just internal changes
+# CURRENT : REVISION : AGE
+LIBGPOD_SO_VERSION=5:0:1
+
+
+
+
+
+
+
+am__api_version='1.10'
+
+ac_aux_dir=
+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"
+    break
+  elif test -f "$ac_dir/install.sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f "$ac_dir/shtool"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { { 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
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+
+
+# 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
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# 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; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  # Account for people who put trailing slashes in PATH elements.
+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.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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
+    ;;
+esac
+done
+IFS=$as_save_IFS
+
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    INSTALL=$ac_install_sh
+  fi
+fi
+{ echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ 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
+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
+
+      # 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".
+      { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+{ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+test "$program_prefix" != NONE &&
+  program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.  echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm -f conftest.sed
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+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=
+  { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
+echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
+if test -z "$MKDIR_P"; then
+  if test "${ac_cv_path_mkdir+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_prog in mkdir gmkdir; do
+	 for ac_exec_ext in '' $ac_executable_extensions; do
+	   { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+	     'mkdir (GNU coreutils) '* | \
+	     'mkdir (coreutils) '* | \
+	     'mkdir (fileutils) '4.1*)
+	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+	       break 3;;
+	   esac
+	 done
+       done
+done
+IFS=$as_save_IFS
+
+fi
+
+  if test "${ac_cv_path_mkdir+set}" = set; then
+    MKDIR_P="$ac_cv_path_mkdir -p"
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for MKDIR_P within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    test -d ./--version && rmdir ./--version
+    MKDIR_P="$ac_install_sh -d"
+  fi
+fi
+{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5
+echo "${ECHO_T}$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+  [\\/$]* | ?:[\\/]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+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.
+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_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+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 x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+	@echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+  SET_MAKE=
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+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
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  am__isrc=' -I$(srcdir)'
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+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
+
+
+# Define the identity of the package.
+ PACKAGE=libgpod
+ VERSION=$LIBGPOD_VERSION
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
+
+# 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.
+if test "$cross_compiling" != no; then
+  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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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
+
+
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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 "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(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 -'
+
+
+
+
+
+
+ACLOCAL_AMFLAGS="$ACLOCAL_FLAGS"
+
+
+{ echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; }
+    # Check whether --enable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then
+  enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
+else
+  USE_MAINTAINER_MODE=no
+fi
+
+  { echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
+echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6; }
+   if test $USE_MAINTAINER_MODE = yes; then
+  MAINTAINER_MODE_TRUE=
+  MAINTAINER_MODE_FALSE='#'
+else
+  MAINTAINER_MODE_TRUE='#'
+  MAINTAINER_MODE_FALSE=
+fi
+
+  MAINT=$MAINTAINER_MODE_TRUE
+
+
+
+
+cat >>confdefs.h <<\_ACEOF
+#define _GNU_SOURCE 1
+_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
+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
+  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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+done
+done
+IFS=$as_save_IFS
+
+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 "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_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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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.exe
+  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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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.exe
+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.
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+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
+
+
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+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
+ac_compiler=`set X $ac_compile; echo $2`
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler --version >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -v >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -V >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+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;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+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 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[^ ]*//'`
+#
+# List of possible output files, starting from the most likely.
+# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
+# only as a last resort.  b.out is created by i960 compilers.
+ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
+#
+# The IRIX 6 linker writes into existing files which may not be
+# executable, retaining their permissions.  Remove them first so a
+# subsequent execution test works.
+ac_rmfiles=
+for ac_file in $ac_files
+do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+  esac
+done
+rm -f $ac_rmfiles
+
+if { (ac_try="$ac_link_default"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link_default") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile.  We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
+	;;
+    [ab].out )
+	# We found the default executable, but exeext='' is most
+	# certainly right.
+	break;;
+    *.* )
+        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+	then :; else
+	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	fi
+	# We set ac_cv_exeext here because the later test for it is not
+	# safe: cross compilers may not add the suffix if given an `-o'
+	# argument, so we may need to know it at that point already.
+	# Even if this section looks crufty: it has the advantage of
+	# actually working.
+	break;;
+    * )
+	break;;
+  esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+  ac_file=''
+fi
+
+{ echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6; }
+if test -z "$ac_file"; then
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { 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
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+
+# Check that 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; }
+# 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
+  if { ac_try='./$ac_file'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+	cross_compiling=yes
+    else
+	{ { 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.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+  fi
+fi
+{ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6; }
+
+{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	  break;;
+    * ) break;;
+  esac
+done
+else
+  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
+if test "${ac_cv_objext+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.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  for ac_file in conftest.o conftest.obj conftest.*; do
+  test -f "$ac_file" || continue;
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ 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
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; 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 core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_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
+{ 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
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   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;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	CFLAGS=""
+      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;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_c_werror_flag=$ac_save_c_werror_flag
+	 CFLAGS="-g"
+	 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;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+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"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_prog_cc_c89=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 -std 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 -std.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 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
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_c89=$ac_arg
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6; } ;;
+  xno)
+    { echo "$as_me:$LINENO: result: unsupported" >&5
+echo "${ECHO_T}unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+
+
+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
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+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
+echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
+
+
+{ echo "$as_me:$LINENO: result: $_am_result" >&5
+echo "${ECHO_T}$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+  enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
+
+
+
+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_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
+  # 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_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.
+    : > 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)
+      # 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/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       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_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_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
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+fi
+
+
+if test "x$CC" != xcc; then
+  { echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
+echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6; }
+else
+  { echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
+echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6; }
+fi
+set dummy $CC; ac_cc=`echo $2 |
+		      sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+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.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+# Make sure it works both with $CC and with simple cc.
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+rm -f conftest2.*
+if { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+   test -f conftest2.$ac_objext && { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); };
+then
+  eval ac_cv_prog_cc_${ac_cc}_c_o=yes
+  if test "x$CC" != xcc; then
+    # Test first that cc exists at all.
+    if { ac_try='cc -c conftest.$ac_ext >&5'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+      ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+      rm -f conftest2.*
+      if { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 test -f conftest2.$ac_objext && { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); };
+      then
+	# cc works too.
+	:
+      else
+	# cc exists but doesn't like -o.
+	eval ac_cv_prog_cc_${ac_cc}_c_o=no
+      fi
+    fi
+  fi
+else
+  eval ac_cv_prog_cc_${ac_cc}_c_o=no
+fi
+rm -f core conftest*
+
+fi
+if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
+  { 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; }
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_MINUS_C_MINUS_O 1
+_ACEOF
+
+fi
+
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
+fi
+
+
+
+# AC_PROG_CXX is only needed for the test program tests/test-rebuild-db.cc.
+# You can safely remove AC_PROG_CXX and the test program (edit tests/Makefile.am)
+# if you should run into problems.
+ac_ext=cpp
+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 -z "$CXX"; then
+  if test -n "$CCC"; then
+    CXX=$CCC
+  else
+    if test -n "$ac_tool_prefix"; then
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe 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
+  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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+fi
+fi
+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 "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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
+
+  if test "x$ac_ct_CXX" = x; then
+    CXX="g++"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    CXX=$ac_ct_CXX
+  fi
+fi
+
+  fi
+fi
+# Provide some information about the compiler.
+echo "$as_me:$LINENO: checking for C++ compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler --version >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -v >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -V >&5") 2>&5
+  ac_status=$?
+  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 $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.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; 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 core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_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
+{ 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_save_cxx_werror_flag=$ac_cxx_werror_flag
+   ac_cxx_werror_flag=yes
+   ac_cv_prog_cxx_g=no
+   CXXFLAGS="-g"
+   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;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cxx_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	CXXFLAGS=""
+      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;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+	 CXXFLAGS="-g"
+	 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;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cxx_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+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"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  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
+
+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
+
+    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/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       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
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CXX_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
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+  am__fastdepCXX_TRUE=
+  am__fastdepCXX_FALSE='#'
+else
+  am__fastdepCXX_TRUE='#'
+  am__fastdepCXX_FALSE=
+fi
+
+
+
+{ 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 { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+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 && continue
+  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; }
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+  { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
+echo "$as_me: error: cannot run $SHELL $ac_aux_dir/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_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+  { { 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=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+  { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_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; }
+case $ac_cv_build in
+*-*-*) ;;
+*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
+echo "$as_me: error: invalid value of canonical build" >&2;}
+   { (exit 1); exit 1; }; };;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ 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
+  if test "x$host_alias" = x; then
+  ac_cv_host=$ac_cv_build
+else
+  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+    { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
+echo "$as_me: error: invalid value of canonical host" >&2;}
+   { (exit 1); exit 1; }; };;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
+echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # Extract the first word of "grep ggrep" to use in msg output
+if test -z "$GREP"; then
+set dummy grep ggrep; ac_prog_name=$2
+if test "${ac_cv_path_GREP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_path_GREP_found=false
+# Loop through the user's path and test for each of PROGNAME-LIST
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_prog in grep ggrep; do
+  for ac_exec_ext in '' $ac_executable_extensions; do
+    ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+    { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+    # Check for GNU ac_path_GREP and select it if it is found.
+  # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+  ac_count=0
+  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    echo 'GREP' >> "conftest.nl"
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    ac_count=`expr $ac_count + 1`
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_GREP="$ac_path_GREP"
+      ac_path_GREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+
+    $ac_path_GREP_found && break 3
+  done
+done
+
+done
+IFS=$as_save_IFS
+
+
+fi
+
+GREP="$ac_cv_path_GREP"
+if test -z "$GREP"; then
+  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+else
+  ac_cv_path_GREP=$GREP
+fi
+
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
+echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
+if test "${ac_cv_path_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_path_EGREP="$GREP -E"
+   else
+     # Extract the first word of "egrep" to use in msg output
+if test -z "$EGREP"; then
+set dummy egrep; ac_prog_name=$2
+if test "${ac_cv_path_EGREP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_path_EGREP_found=false
+# Loop through the user's path and test for each of PROGNAME-LIST
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_prog in egrep; do
+  for ac_exec_ext in '' $ac_executable_extensions; do
+    ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+    { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+    # Check for GNU ac_path_EGREP and select it if it is found.
+  # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+  ac_count=0
+  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    echo 'EGREP' >> "conftest.nl"
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    ac_count=`expr $ac_count + 1`
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_EGREP="$ac_path_EGREP"
+      ac_path_EGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+
+    $ac_path_EGREP_found && break 3
+  done
+done
+
+done
+IFS=$as_save_IFS
+
+
+fi
+
+EGREP="$ac_cv_path_EGREP"
+if test -z "$EGREP"; then
+  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+else
+  ac_cv_path_EGREP=$EGREP
+fi
+
+
+   fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
+echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+
+# Check whether --with-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 variants of GNU ld 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 lds 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=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
+      # 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
+/* 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 { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.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 nonexistent 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 { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.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
+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
+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 { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.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 nonexistent 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 { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.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
+  :
+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
+
+
+{ 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
+  cat >conftest.$ac_ext <<_ACEOF
+/* 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 { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_header_stdc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_header_stdc=no
+fi
+
+rm -f core conftest.err 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
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <string.h>
+
+_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
+/* 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
+  :
+else
+  ac_cv_header_stdc=no
+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
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.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))
+      return 2;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+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 )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+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
+
+fi
+
+# 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
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# 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; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  # Account for people who put trailing slashes in PATH elements.
+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.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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
+    ;;
+esac
+done
+IFS=$as_save_IFS
+
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    INSTALL=$ac_install_sh
+  fi
+fi
+{ echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+# Check whether --enable-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 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 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
+
+
+{ 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'
+case $host_os in
+  darwin*)
+    if test "$GCC" = yes; then
+      reload_cmds='$LTCC $LTCFLAGS -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_nm_to_check="${ac_tool_prefix}nm"
+  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+    lt_nm_to_check="$lt_nm_to_check nm"
+  fi
+  for lt_tmp_nm in $lt_nm_to_check; do
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+      IFS="$lt_save_ifs"
+      test -z "$ac_dir" && ac_dir=.
+      tmp_nm="$ac_dir/$lt_tmp_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"
+  done
+  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 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; }
+else
+  { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+echo "${ECHO_T}no, using $LN_S" >&6; }
+fi
+
+{ echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5
+echo $ECHO_N "checking how to recognize 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
+  ;;
+
+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'
+  ;;
+
+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',
+  # unless we find 'file', for example because we are cross-compiling.
+  if ( file / ) >/dev/null 2>&1; then
+    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+    lt_cv_file_magic_cmd='func_win32_libid'
+  else
+    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+    lt_cv_file_magic_cmd='$OBJDUMP -f'
+  fi
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+freebsd* | dragonfly*)
+  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|DragonFly)/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
+  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
+  ;;
+
+interix[3-9]*)
+  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
+  ;;
+
+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
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  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
+  ;;
+
+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
+  ;;
+
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+rdos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv4 | sysv4.3*)
+  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
+    ;;
+  pc)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  esac
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | 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"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+# Check whether --enable-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 5613 "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-*kfreebsd*-gnu|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-*kfreebsd*-gnu)
+          LD="${LD-ld} -m elf_i386_fbsd"
+          ;;
+        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*)
+      libsuff=64
+      case $host in
+        x86_64-*kfreebsd*-gnu)
+          LD="${LD-ld} -m elf_x86_64_fbsd"
+          ;;
+        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*
+  ;;
+
+*-*-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
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      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
+{ 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
+  ;;
+sparc*-*solaris*)
+  # 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
+    *64-bit*)
+      case $lt_cv_prog_gnu_ld in
+      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      *)    LD="${LD-ld} -64" ;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+
+esac
+
+need_locks="$enable_libtool_lock"
+
+
+# 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 { as_var=$as_ac_Header; eval "test \"\${$as_var+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.  */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  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 core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&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
+
+
+
+for ac_header in dlfcn.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&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
+/* 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 { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; 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 core 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 { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.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:$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;}
+
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&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
+
+
+
+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=cpp
+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
+      # 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 { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.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 nonexistent 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 { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.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_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.
+  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 { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.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 nonexistent 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 { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.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
+  :
+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
+
+ac_ext=cpp
+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
+
+fi
+
+
+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 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn
+  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 -n "$F77"; then
+  ac_cv_prog_F77="$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_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+fi
+fi
+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 -n "$F77" && break
+  done
+fi
+if test -z "$F77"; then
+  ac_ct_F77=$F77
+  for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn
+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
+  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_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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
+
+
+  test -n "$ac_ct_F77" && break
+done
+
+  if test "x$ac_ct_F77" = x; then
+    F77=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    F77=$ac_ct_F77
+  fi
+fi
+
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler --version >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -v >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -V >&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
+  cat >conftest.$ac_ext <<_ACEOF
+      program main
+#ifndef __GNUC__
+       choke me
+#endif
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_f77_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; 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 core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_f77_compiler_gnu=$ac_compiler_gnu
+
+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
+  FFLAGS=-g
+cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_f77_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_f77_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_prog_f77_g=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+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
+
+G77=`test $ac_compiler_gnu = yes && echo yes`
+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
+
+
+
+# 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
+    ;;
+
+  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;
+    ;;
+
+  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;
+    ;;
+
+  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;
+    ;;
+
+  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+    # 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 all BSDs
+    fi
+    # And add a safety zone
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    ;;
+
+  interix*)
+    # We know the value 262144 and hardcode it with a safety zone (like BSD)
+    lt_cv_sys_max_cmd_len=196608
+    ;;
+
+  osf*)
+    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+    # nice to cause kernel panics so lets avoid the loop below.
+    # First set a reasonable default.
+    lt_cv_sys_max_cmd_len=16384
+    #
+    if test -x /sbin/sysconfig; then
+      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+        *1*) lt_cv_sys_max_cmd_len=-1 ;;
+      esac
+    fi
+    ;;
+  sco3.2v5*)
+    lt_cv_sys_max_cmd_len=102400
+    ;;
+  sysv5* | sco5v6* | sysv4.2uw2*)
+    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+    if test -n "$kargmax"; then
+      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ 	]//'`
+    else
+      lt_cv_sys_max_cmd_len=32768
+    fi
+    ;;
+  *)
+    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+    if test -n "$lt_cv_sys_max_cmd_len"; then
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    else
+      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`
+    fi
+    ;;
+  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; }
+fi
+
+
+
+
+
+# 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 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'"
+  ;;
+linux* | k*bsd*-gnu)
+  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*)
+  symcode='[BDRT]'
+  ;;
+sco3.2v5*)
+  symcode='[DT]'
+  ;;
+sysv4.2uw2*)
+  symcode='[DT]'
+  ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+  symcode='[ABDT]'
+  ;;
+sysv4)
+  symcode='[DFNSTU]'
+  ;;
+esac
+
+# 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
+
+# Try without a prefix undercore, then with it.
+for ac_symprfx in "" "_"; do
+
+  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+  symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+  # 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 { (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 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'
+
+	  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_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
+
+fi
+
+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
+
+{ 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
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e 1s/^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 MSVC,
+# 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
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  { echo "$as_me:$LINENO: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+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
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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
+
+  if test "x$ac_ct_AR" = x; then
+    AR="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    AR=$ac_ct_AR
+  fi
+else
+  AR="$ac_cv_prog_AR"
+fi
+
+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
+  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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+fi
+fi
+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
+
+
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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
+
+  if test "x$ac_ct_RANLIB" = x; then
+    RANLIB=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    RANLIB=$ac_ct_RANLIB
+  fi
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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
+
+
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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 "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+
+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 "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+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_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+    ;;
+  *)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    ;;
+  esac
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+# 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
+
+*** 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
+
+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 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 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
+
+# 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
+
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+objext=$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(){return(0);}'
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$rm conftest*
+
+
+
+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
+  lt_cv_prog_compiler_rtti_exceptions=no
+  ac_outfile=conftest.$ac_objext
+   echo "$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}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:7474: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:7478: \$? = $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 other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_rtti_exceptions=yes
+     fi
+   fi
+   $rm conftest*
+
+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.
+      ;;
+
+    mingw* | cygwin* | 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).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      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'
+      ;;
+
+    interix[3-9]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+
+    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 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
+      ;;
+
+    *)
+      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
+      ;;
+      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
+       ;;
+
+    mingw* | cygwin* | 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,'
+      # 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'
+      ;;
+
+    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'
+      ;;
+
+    linux* | k*bsd*-gnu)
+      case $cc_basename in
+      icc* | ecc*)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-KPIC'
+	lt_prog_compiler_static='-static'
+        ;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-fpic'
+	lt_prog_compiler_static='-Bstatic'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static='-non_shared'
+        ;;
+      *)
+        case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)
+	  # Sun C 5.9
+	  lt_prog_compiler_pic='-KPIC'
+	  lt_prog_compiler_static='-Bstatic'
+	  lt_prog_compiler_wl='-Wl,'
+	  ;;
+	*Sun\ F*)
+	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
+	  lt_prog_compiler_pic='-KPIC'
+	  lt_prog_compiler_static='-Bstatic'
+	  lt_prog_compiler_wl=''
+	  ;;
+	esac
+	;;
+      esac
+      ;;
+
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    rdos*)
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    solaris*)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+	lt_prog_compiler_wl='-Qoption ld ';;
+      *)
+	lt_prog_compiler_wl='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      lt_prog_compiler_wl='-Qoption ld '
+      lt_prog_compiler_pic='-PIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      lt_prog_compiler_wl='-Wl,'
+      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
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    unicos*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_can_build_shared=no
+      ;;
+
+    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
+   echo "$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}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:7764: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:7768: \$? = $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 other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_prog_compiler_pic_works=yes
+     fi
+   fi
+   $rm conftest*
+
+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
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag 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_tmp_static_flag"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker 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
+       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_prog_compiler_static_works=yes
+       fi
+     else
+       lt_prog_compiler_static_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; }
+
+if test x"$lt_prog_compiler_static_works" = xyes; then
+    :
+else
+    lt_prog_compiler_static=
+fi
+
+
+{ 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
+   echo "$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}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:7868: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:7872: \$? = $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
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $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" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; }
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o" = 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
+
+{ 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; }
+
+  runpath_var=
+  allow_undefined_flag=
+  enable_shared_with_static_runtimes=no
+  archive_cmds=
+  archive_expsym_cmds=
+  old_archive_From_new_cmds=
+  old_archive_from_expsyms_cmds=
+  export_dynamic_flag_spec=
+  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'
+  # 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 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="_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=
+  # Just being paranoid about ensuring that cc_basename is set.
+  for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+  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
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  ld_shlibs=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
+    export_dynamic_flag_spec='${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="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+  	whole_archive_flag_spec=
+    fi
+    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
+
+    # 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=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*)
+      archive_cmds='$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='-L$libdir'
+      hardcode_minus_L=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.
+      ld_shlibs=no
+      ;;
+
+    beos*)
+      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
+	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # _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=no
+      enable_shared_with_static_runtimes=yes
+      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $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;
+	  cat $export_symbols >> $output_objdir/$soname.def;
+	fi~
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    interix[3-9]*)
+      hardcode_direct=no
+      hardcode_shlibpath_var=no
+      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+      export_dynamic_flag_spec='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
+
+    gnu* | linux* | k*bsd*-gnu)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	tmp_addflag=
+	case $cc_basename,$host_cpu in
+	pgcc*)				# Portland Group C compiler
+	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
+	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag -Mnomain' ;;
+	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
+	  tmp_addflag=' -i_dynamic' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	esac
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)			# Sun C 5.9
+	  whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_sharedflag='-G' ;;
+	*Sun\ F*)			# Sun Fortran 8.3
+	  tmp_sharedflag='-G' ;;
+	*)
+	  tmp_sharedflag='-shared' ;;
+	esac
+	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+	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 '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+	fi
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	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*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+	ld_shlibs=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 | 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
+	ld_shlibs=no
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+	ld_shlibs=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+	;;
+	*)
+	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	    hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
+	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
+	  else
+	    ld_shlibs=no
+	  fi
+	;;
+      esac
+      ;;
+
+    sunos4*)
+      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    *)
+      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
+	ld_shlibs=no
+      fi
+      ;;
+    esac
+
+    if test "$ld_shlibs" = no; then
+      runpath_var=
+      hardcode_libdir_flag_spec=
+      export_dynamic_flag_spec=
+      whole_archive_flag_spec=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      allow_undefined_flag=unsupported
+      always_export_symbols=yes
+      archive_expsym_cmds='$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=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	hardcode_direct=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 | 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
+
+	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.
+
+      archive_cmds=''
+      hardcode_direct=yes
+      hardcode_libdir_separator=':'
+      link_all_deplibs=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
+  	  :
+	  else
+  	  # We have old collect2
+  	  hardcode_direct=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=yes
+  	  hardcode_libdir_flag_spec='-L$libdir'
+  	  hardcode_libdir_separator=
+	  fi
+	  ;;
+	esac
+	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+      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=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
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# 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 "$lt_aix_libpath_sed"`
+fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      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_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $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
+	  hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+	  allow_undefined_flag="-z nodefs"
+	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_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.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# 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 "$lt_aix_libpath_sed"`
+fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      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"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  no_undefined_flag=' ${wl}-bernotok'
+	  allow_undefined_flag=' ${wl}-berok'
+	  # Exported symbols can be pulled into shared objects from archives
+	  whole_archive_flag_spec='$convenience'
+	  archive_cmds_need_lc=yes
+	  # This is similar to how AIX traditionally builds its shared libraries.
+	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	fi
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds='$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='-L$libdir'
+      hardcode_minus_L=yes
+      # see comment about different semantics on the GNU ld section
+      ld_shlibs=no
+      ;;
+
+    bsdi[45]*)
+      export_dynamic_flag_spec=-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.
+      hardcode_libdir_flag_spec=' '
+      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='
+      # 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='${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
+      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 lds
+      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` $xlcverstring'
+         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 lds
+         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 $xlcverstring~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*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
+      ;;
+
+    freebsd1*)
+      ld_shlibs=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='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | dragonfly*)
+      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	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
+	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*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+	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
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -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*)
+	  archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+	hardcode_libdir_separator=:
+
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  hardcode_libdir_flag_spec_ld='+b $libdir'
+	  hardcode_direct=no
+	  hardcode_shlibpath_var=no
+	  ;;
+	*)
+	  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=:
+      link_all_deplibs=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    newsos6)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_shlibpath_var=no
+      ;;
+
+    openbsd*)
+      if test -f /usr/libexec/ld.so; then
+	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 $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
+	  case $host_os in
+	   openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+	     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	     hardcode_libdir_flag_spec='-R$libdir'
+	     ;;
+	   *)
+	     archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	     hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+	     ;;
+	  esac
+        fi
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    os2*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      allow_undefined_flag=unsupported
+      archive_cmds='$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='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds='$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=' -expect_unresolved \*'
+	archive_cmds='$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='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds='$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='${wl}-rpath ${wl}$libdir'
+      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 "%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 ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
+
+	# Both c and cxx compiler support -rpath directly
+	hardcode_libdir_flag_spec='-rpath $libdir'
+      fi
+      hardcode_libdir_separator=:
+      ;;
+
+    solaris*)
+      no_undefined_flag=' -z text'
+      if test "$GCC" = yes; then
+	wlarc='${wl}'
+	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~
+	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+      else
+	wlarc=''
+	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~
+  	$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'
+      hardcode_shlibpath_var=no
+      case $host_os in
+      solaris2.[0-5] | solaris2.[0-5].*) ;;
+      *)
+	# The compiler driver will combine and reorder linker options,
+	# but understands `-z linker_flag'.  GCC discards it without `$wl',
+	# but is careful enough not to reorder.
+ 	# Supported since Solaris 2.6 (maybe 2.5.1?)
+	if test "$GCC" = yes; then
+	  whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	else
+	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+	fi
+	;;
+      esac
+      link_all_deplibs=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='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv4)
+      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
+      ;;
+
+    sysv4.3*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var=no
+      export_dynamic_flag_spec='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	hardcode_shlibpath_var=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	ld_shlibs=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+      no_undefined_flag='${wl}-z,text'
+      archive_cmds_need_lc=no
+      hardcode_shlibpath_var=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      no_undefined_flag='${wl}-z,text'
+      allow_undefined_flag='${wl}-z,nodefs'
+      archive_cmds_need_lc=no
+      hardcode_shlibpath_var=no
+      hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+      export_dynamic_flag_spec='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
+      ;;
+
+    *)
+      ld_shlibs=no
+      ;;
+    esac
+  fi
+
+{ echo "$as_me:$LINENO: result: $ld_shlibs" >&5
+echo "${ECHO_T}$ld_shlibs" >&6; }
+test "$ld_shlibs" = no && can_build_shared=no
+
+#
+# Do we need to explicitly link libc?
+#
+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 "$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); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl
+	pic_flag=$lt_prog_compiler_pic
+        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
+        else
+	  archive_cmds_need_lc=yes
+        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
+echo "${ECHO_T}$archive_cmds_need_lc" >&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
+  case $host_os in
+    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+    *) lt_awk_arg="/^libraries:/" ;;
+  esac
+  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$lt_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.
+    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+  # Ok, now we have the path, separated by spaces, we can step through it
+  # and add multilib dir if necessary.
+  lt_tmp_lt_search_path_spec=
+  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  for lt_sys_path in $lt_search_path_spec; do
+    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+    else
+      test -d "$lt_sys_path" && \
+	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+    fi
+  done
+  lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+  lt_foo="";
+  lt_count=0;
+  for (lt_i = NF; lt_i > 0; lt_i--) {
+    if ($lt_i != "" && $lt_i != ".") {
+      if ($lt_i == "..") {
+        lt_count++;
+      } else {
+        if (lt_count == 0) {
+          lt_foo="/" $lt_i lt_foo;
+        } else {
+          lt_count--;
+        }
+      }
+    }
+  }
+  if (lt_foo != "") { lt_freq[lt_foo]++; }
+  if (lt_freq[lt_foo] == 1) { print lt_foo; }
+}'`
+  sys_lib_search_path_spec=`echo $lt_search_path_spec`
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+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
+
+  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~
+      chmod a+x \$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
+    ;;
+
+  *)
+    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
+  ;;
+
+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`'
+
+  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+  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}${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
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[123]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  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
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+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'
+  ;;
+
+interix[3-9]*)
+  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'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+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
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-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'
+  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
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ 	]*hwcap[ 	]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
+  fi
+
+  # 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}${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
+  ;;
+
+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
+  ;;
+
+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
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+    *)                         need_version=no  ;;
+  esac
+  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
+  ;;
+
+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
+  ;;
+
+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"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+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'
+  ;;
+
+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.3*)
+  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
+  ;;
+
+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
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+    shlibpath_overrides_runpath=no
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    shlibpath_overrides_runpath=yes
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+	;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+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
+  ;;
+
+*)
+  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
+
+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
+
+{ 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"
+         old_striplib="$STRIP -S"
+         { 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
+    ;;
+
+  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 GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      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; }
+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 GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+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
+#endif
+
+int
+main ()
+{
+return shl_load ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      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
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+int
+main ()
+{
+return shl_load ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_dld_shl_load=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_dld_shl_load=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      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
+/* 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 GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+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
+#endif
+
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_func_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_func_dlopen=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      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
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      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
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      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
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dld_link ();
+int
+main ()
+{
+return dld_link ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      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
+
+
+fi
+
+
+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"
+    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    { 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 10219 "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); */
+    }
+  else
+    puts (dlerror ());
+
+    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; ) >&5 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_dlunknown|x*) lt_cv_dlopen_self=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self" >&6; }
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+      { 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 10319 "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); */
+    }
+  else
+    puts (dlerror ());
+
+    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; ) >&5 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_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self_static=no
+  fi
+fi
+rm -fr conftest*
+
+
+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
+
+  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
+
+
+# Report which library types will actually be built
+{ 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; }
+
+{ 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
+
+# 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*)
+  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; }
+
+{ 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; }
+
+# 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 LTCFLAGS 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 \
+    CC \
+    LD \
+    lt_prog_compiler_wl \
+    lt_prog_compiler_pic \
+    lt_prog_compiler_static \
+    lt_prog_compiler_no_builtin_flag \
+    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 \
+    postdep_objects \
+    predeps \
+    postdeps \
+    compiler_lib_search_path \
+    archive_cmds \
+    archive_expsym_cmds \
+    postinstall_cmds \
+    postuninstall_cmds \
+    old_archive_from_expsyms_cmds \
+    allow_undefined_flag \
+    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 \
+    fix_srcfile_path \
+    exclude_expsyms \
+    include_expsyms; do
+
+    case $var in
+    old_archive_cmds | \
+    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 | \
+    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}T"
+  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
+  $rm -f "$cfgfile"
+  { echo "$as_me:$LINENO: creating $ofile" >&5
+echo "$as_me: creating $ofile" >&6;}
+
+  cat <<__EOF__ >> "$cfgfile"
+#! $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, 2002, 2003, 2004, 2005, 2006, 2007
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# 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 1s/^X//"
+
+# 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
+
+# The names of the tagged configurations supported by this script.
+available_tags=
+
+# ### BEGIN LIBTOOL CONFIG
+
+# 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
+
+# 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
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# 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
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
+# A language-specific compiler.
+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
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_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
+
+# Object file suffix (normally "o").
+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"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+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
+
+# 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
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec
+
+# 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
+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
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds
+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
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_predep_objects
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path
+
+# 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
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# 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
+
+# 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
+
+# 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${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# 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"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# 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_fix_srcfile_path
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# 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
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# ### END LIBTOOL CONFIG
+
+__EOF__
+
+
+  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
+    ;;
+  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
+
+
+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"
+
+
+# Check whether --with-tags was given.
+if test "${with_tags+set}" = set; then
+  withval=$with_tags; tagnames="$withval"
+fi
+
+
+if test -f "$ltmain" && test -n "$tagnames"; then
+  if test ! -f "${ofile}"; then
+    { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5
+echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
+  fi
+
+  if test -z "$LTCC"; then
+    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
+    if test -z "$LTCC"; then
+      { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5
+echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
+    else
+      { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
+echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
+    fi
+  fi
+  if test -z "$LTCFLAGS"; then
+    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
+  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
+    "") ;;
+    *)  { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5
+echo "$as_me: error: invalid tag name: $tagname" >&2;}
+   { (exit 1); exit 1; }; }
+	;;
+    esac
+
+    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
+    then
+      { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5
+echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+
+    # Update the list of available tags.
+    if test -n "$tagname"; then
+      echo appending configuration tag \"$tagname\" to $ofile
+
+      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_ext=cpp
+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
+
+
+
+
+archive_cmds_need_lc_CXX=no
+allow_undefined_flag_CXX=
+always_export_symbols_CXX=no
+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_shlibpath_var_CXX=unsupported
+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=
+postdep_objects_CXX=
+predeps_CXX=
+postdeps_CXX=
+compiler_lib_search_path_CXX=
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# 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;"
+
+# 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.
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$rm conftest*
+
+
+# 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
+  $as_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
+  $as_unset lt_cv_path_LD
+fi
+test -z "${LDCXX+set}" || LD=$LDCXX
+CC=${CXX-"c++"}
+compiler=$CC
+compiler_CXX=$CC
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+# We don't want -fno-exception wen compiling C++ code, so set the
+# no_builtin_flag separately
+if test "$GXX" = yes; then
+  lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
+else
+  lt_prog_compiler_no_builtin_flag_CXX=
+fi
+
+if test "$GXX" = yes; then
+  # Set up default GNU C++ configuration
+
+
+# Check whether --with-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 variants of GNU ld 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 lds 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 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'
+
+    hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
+    export_dynamic_flag_spec_CXX='${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" | \
+	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=
+    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.
+    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 | grep "\-L"'
+
+else
+  GXX=no
+  with_gnu_ld=no
+  wlarc=
+fi
+
+# PORTME: fill in a description of your system's C++ link characteristics
+{ 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; }
+ld_shlibs_CXX=yes
+case $host_os in
+  aix3*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=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
+
+      # 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
+
+    # 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.
+
+    archive_cmds_CXX=''
+    hardcode_direct_CXX=yes
+    hardcode_libdir_separator_CXX=':'
+    link_all_deplibs_CXX=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
+	  :
+	else
+	  # We have old collect2
+	  hardcode_direct_CXX=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_CXX=yes
+	  hardcode_libdir_flag_spec_CXX='-L$libdir'
+	  hardcode_libdir_separator_CXX=
+	fi
+	;;
+      esac
+      shared_flag='-shared'
+      if test "$aix_use_runtimelinking" = yes; then
+	shared_flag="$shared_flag "'${wl}-G'
+      fi
+    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_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
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# 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 "$lt_aix_libpath_sed"`
+fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      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_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $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
+	hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
+	allow_undefined_flag_CXX="-z nodefs"
+	archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_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.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# 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 "$lt_aix_libpath_sed"`
+fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      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"
+	# Warning - without using the other run time loading flags,
+	# -berok will link without error, but may produce a broken library.
+	no_undefined_flag_CXX=' ${wl}-bernotok'
+	allow_undefined_flag_CXX=' ${wl}-berok'
+	# Exported symbols can be pulled into shared objects from archives
+	whole_archive_flag_spec_CXX='$convenience'
+	archive_cmds_need_lc_CXX=yes
+	# This is similar to how AIX traditionally builds its shared libraries.
+	archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+      fi
+    fi
+    ;;
+
+  beos*)
+    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+      allow_undefined_flag_CXX=unsupported
+      # Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+      # support --undefined.  This deserves some investigation.  FIXME
+      archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+    else
+      ld_shlibs_CXX=no
+    fi
+    ;;
+
+  chorus*)
+    case $cc_basename in
+      *)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+    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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $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 lds
+          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` $xlcverstring'
+          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 lds
+          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 $xlcverstring~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++*)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      ghcx*)
+	# Green Hills C++ Compiler
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+    esac
+    ;;
+  freebsd[12]*)
+    # C++ shared libraries reported to be fairly broken before switch to ELF
+    ld_shlibs_CXX=no
+    ;;
+  freebsd-elf*)
+    archive_cmds_need_lc_CXX=no
+    ;;
+  freebsd* | dragonfly*)
+    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+    # conventions
+    ld_shlibs_CXX=yes
+    ;;
+  gnu*)
+    ;;
+  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
+      hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator_CXX=:
+
+      case $host_cpu in
+      hppa*64*|ia64*) ;;
+      *)
+	export_dynamic_flag_spec_CXX='${wl}-E'
+        ;;
+      esac
+    fi
+    case $host_cpu in
+    hppa*64*|ia64*)
+      hardcode_direct_CXX=no
+      hardcode_shlibpath_var_CXX=no
+      ;;
+    *)
+      hardcode_direct_CXX=yes
+      hardcode_minus_L_CXX=yes # Not in the search PATH,
+					      # but as the default
+					      # location of the library.
+      ;;
+    esac
+
+    case $cc_basename in
+      CC*)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      aCC*)
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  ;;
+	*)
+	  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
+	# 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
+	    hppa*64*)
+	      archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      ;;
+	    ia64*)
+	      archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      ;;
+	    *)
+	      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
+	else
+	  # FIXME: insert proper C++ library support
+	  ld_shlibs_CXX=no
+	fi
+	;;
+    esac
+    ;;
+  interix[3-9]*)
+    hardcode_direct_CXX=no
+    hardcode_shlibpath_var_CXX=no
+    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+    export_dynamic_flag_spec_CXX='${wl}-E'
+    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+    # Instead, shared libraries are loaded at an image base (0x10000000 by
+    # default) and relocated if they conflict, which is a slow very memory
+    # consuming and fragmenting process.  To avoid this, we pick a random,
+    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+    archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+    archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+    ;;
+  irix5* | irix6*)
+    case $cc_basename in
+      CC*)
+	# SGI C++
+	archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_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.
+	old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
+	;;
+      *)
+	if test "$GXX" = yes; then
+	  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}${output_objdir}/so_locations -o $lib'
+	  else
+	    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
+	;;
+    esac
+    hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+    hardcode_libdir_separator_CXX=:
+    ;;
+  linux* | k*bsd*-gnu)
+    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.
+	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.
+	#
+	# 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'
+
+	hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir'
+	export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+	# Archives containing C++ object files must be created using
+	# "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
+	  tmp_idyn=
+	  case $host_cpu in
+	    ia64*) tmp_idyn=' -i_dynamic';;
+	  esac
+  	  archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	  archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $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'
+	;;
+      pgCC*)
+        # Portland Group C++ compiler
+	archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+  	archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+
+	hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
+	export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+	whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_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'
+	archive_expsym_cmds_CXX='$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
+	hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+	hardcode_libdir_separator_CXX=:
+
+	# 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'
+	;;
+      *)
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)
+	  # Sun C++ 5.9
+	  no_undefined_flag_CXX=' -zdefs'
+	  archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+	  hardcode_libdir_flag_spec_CXX='-R$libdir'
+	  whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+
+	  # Not sure whether something based on
+	  # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+	  # would be better.
+	  output_verbose_link_cmd='echo'
+
+	  # 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.
+	  old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+	  ;;
+	esac
+	;;
+    esac
+    ;;
+  lynxos*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  m88k*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  mvs*)
+    case $cc_basename in
+      cxx*)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+    esac
+    ;;
+  netbsd*)
+    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*)
+    if test -f /usr/libexec/ld.so; then
+      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'
+    else
+      ld_shlibs_CXX=no
+    fi
+    ;;
+  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.
+	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=:
+
+	# Archives containing C++ object files must be created using
+	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
+
+	;;
+      RCC*)
+	# Rational C++ 2.4.1
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      cxx*)
+	allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds_CXX='$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 ${output_objdir}/so_locations -o $lib'
+
+	hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+	hardcode_libdir_separator_CXX=:
+
+	# 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
+	  allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+	  archive_cmds_CXX='$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}${output_objdir}/so_locations -o $lib'
+
+	  hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+	  hardcode_libdir_separator_CXX=:
+
+	  # 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
+	  ld_shlibs_CXX=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.
+	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=:
+
+	# Archives containing C++ object files must be created using
+	# the KAI C++ compiler.
+	old_archive_cmds_CXX='$CC -o $oldlib $oldobjs'
+	;;
+      RCC*)
+	# Rational C++ 2.4.1
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      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 ${output_objdir}/so_locations -o $lib'
+	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 ${output_objdir}/so_locations -o $lib~
+	  $rm $lib.exp'
+
+	hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+	hardcode_libdir_separator_CXX=:
+
+	# 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
+	  allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+	 archive_cmds_CXX='$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}${output_objdir}/so_locations -o $lib'
+
+	  hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+	  hardcode_libdir_separator_CXX=:
+
+	  # 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
+	  ld_shlibs_CXX=no
+	fi
+	;;
+    esac
+    ;;
+  psos*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  sunos4*)
+    case $cc_basename in
+      CC*)
+	# Sun C++ 4.x
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      lcc*)
+	# Lucid
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+    esac
+    ;;
+  solaris*)
+    case $cc_basename in
+      CC*)
+	# Sun C++ 4.2, 5.x and Centerline C++
+        archive_cmds_need_lc_CXX=yes
+	no_undefined_flag_CXX=' -zdefs'
+	archive_cmds_CXX='$CC -G${allow_undefined_flag}  -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~
+	$CC -G${allow_undefined_flag}  ${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'
+	hardcode_shlibpath_var_CXX=no
+	case $host_os in
+	  solaris2.[0-5] | solaris2.[0-5].*) ;;
+	  *)
+	    # The compiler driver will combine and reorder linker options,
+	    # but understands `-z linker_flag'.
+	    # Supported since Solaris 2.6 (maybe 2.5.1?)
+	    whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
+	    ;;
+	esac
+	link_all_deplibs_CXX=yes
+
+	output_verbose_link_cmd='echo'
+
+	# 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.
+	old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+	;;
+      gcx*)
+	# Green Hills C++ Compiler
+	archive_cmds_CXX='$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.
+	old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+	;;
+      *)
+	# 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 | 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 | 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 $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 | grep \"\-L\""
+	  fi
+
+	  hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
+	  case $host_os in
+	  solaris2.[0-5] | solaris2.[0-5].*) ;;
+	  *)
+	    whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	    ;;
+	  esac
+	fi
+	;;
+    esac
+    ;;
+  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+    no_undefined_flag_CXX='${wl}-z,text'
+    archive_cmds_need_lc_CXX=no
+    hardcode_shlibpath_var_CXX=no
+    runpath_var='LD_RUN_PATH'
+
+    case $cc_basename in
+      CC*)
+	archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+      *)
+	archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+    esac
+    ;;
+  sysv5* | sco3.2v5* | sco5v6*)
+    # Note: We can NOT use -z defs as we might desire, because we do not
+    # link with -lc, and that would cause any symbols used from libc to
+    # always be unresolved, which means just about no library would
+    # ever link correctly.  If we're not using GNU ld we use -z text
+    # though, which does catch some bad symbols but isn't as heavy-handed
+    # as -z defs.
+    # For security reasons, it is highly recommended that you always
+    # use absolute paths for naming shared libraries, and exclude the
+    # DT_RUNPATH tag from executables and libraries.  But doing so
+    # requires that you compile everything twice, which is a pain.
+    # So that behaviour is only enabled if SCOABSPATH is set to a
+    # non-empty value in the environment.  Most likely only useful for
+    # creating official distributions of packages.
+    # This is a hack until libtool officially supports absolute path
+    # names for shared libraries.
+    no_undefined_flag_CXX='${wl}-z,text'
+    allow_undefined_flag_CXX='${wl}-z,nodefs'
+    archive_cmds_need_lc_CXX=no
+    hardcode_shlibpath_var_CXX=no
+    hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+    hardcode_libdir_separator_CXX=':'
+    link_all_deplibs_CXX=yes
+    export_dynamic_flag_spec_CXX='${wl}-Bexport'
+    runpath_var='LD_RUN_PATH'
+
+    case $cc_basename in
+      CC*)
+	archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+      *)
+	archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+    esac
+    ;;
+  tandem*)
+    case $cc_basename in
+      NCC*)
+	# NonStop-UX NCC 3.20
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+    esac
+    ;;
+  vxworks*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  *)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+esac
+{ 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
+
+GCC_CXX="$GXX"
+LD_CXX="$LD"
+
+
+cat > conftest.$ac_ext <<EOF
+class Foo
+{
+public:
+  Foo (void) { a = 0; }
+private:
+  int a;
+};
+EOF
+
+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
+  # 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 "$compiler_lib_search_path_CXX"; then
+	     compiler_lib_search_path_CXX="${prev}${p}"
+	   else
+	     compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${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 "$postdeps_CXX"; then
+	   postdeps_CXX="${prev}${p}"
+	 else
+	   postdeps_CXX="${postdeps_CXX} ${prev}${p}"
+	 fi
+       fi
+       ;;
+
+    *.$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
+
+       if test "$pre_test_object_deps_done" = no; then
+	 if test -z "$predep_objects_CXX"; then
+	   predep_objects_CXX="$p"
+	 else
+	   predep_objects_CXX="$predep_objects_CXX $p"
+	 fi
+       else
+	 if test -z "$postdep_objects_CXX"; then
+	   postdep_objects_CXX="$p"
+	 else
+	   postdep_objects_CXX="$postdep_objects_CXX $p"
+	 fi
+       fi
+       ;;
+
+    *) ;; # Ignore the rest.
+
+    esac
+  done
+
+  # Clean up.
+  rm -f a.out a.exe
+else
+  echo "libtool.m4: error: problem compiling CXX test program"
+fi
+
+$rm -f confest.$objext
+
+# PORTME: override above test on systems where it is broken
+case $host_os in
+interix[3-9]*)
+  # Interix 3.5 installs completely hosed .la files for C++, so rather than
+  # hack all around it, let's just trust "g++" to DTRT.
+  predep_objects_CXX=
+  postdep_objects_CXX=
+  postdeps_CXX=
+  ;;
+
+linux*)
+  case `$CC -V 2>&1 | sed 5q` in
+  *Sun\ C*)
+    # Sun C++ 5.9
+    #
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+    if test "$solaris_use_stlport4" != yes; then
+      postdeps_CXX='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+
+solaris*)
+  case $cc_basename in
+  CC*)
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+
+    # Adding this requires a known-good setup of shared libraries for
+    # Sun compiler versions before 5.6, else PIC objects from an old
+    # archive will be linked into the output, leading to subtle bugs.
+    if test "$solaris_use_stlport4" != yes; then
+      postdeps_CXX='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+esac
+
+
+case " $postdeps_CXX " in
+*" -lc "*) archive_cmds_need_lc_CXX=no ;;
+esac
+
+lt_prog_compiler_wl_CXX=
+lt_prog_compiler_pic_CXX=
+lt_prog_compiler_static_CXX=
+
+{ 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; }
+
+  # C++ specific cases for pic, static, wl, etc.
+  if test "$GXX" = yes; then
+    lt_prog_compiler_wl_CXX='-Wl,'
+    lt_prog_compiler_static_CXX='-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_CXX='-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_CXX='-m68020 -resident32 -malways-restore-a4'
+      ;;
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+    mingw* | cygwin* | 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).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+      ;;
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic_CXX='-fno-common'
+      ;;
+    *djgpp*)
+      # DJGPP does not support shared libraries at all
+      lt_prog_compiler_pic_CXX=
+      ;;
+    interix[3-9]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic_CXX=-Kconform_pic
+      fi
+      ;;
+    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_prog_compiler_pic_CXX='-fPIC'
+	;;
+      esac
+      ;;
+    *)
+      lt_prog_compiler_pic_CXX='-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_prog_compiler_static_CXX='-Bstatic'
+	else
+	  lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
+	fi
+	;;
+      chorus*)
+	case $cc_basename in
+	cxch68*)
+	  # Green Hills C++ Compiler
+	  # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--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_prog_compiler_pic_CXX='-qnocommon'
+           lt_prog_compiler_wl_CXX='-Wl,'
+           ;;
+         esac
+       ;;
+      dgux*)
+	case $cc_basename in
+	  ec++*)
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    ;;
+	  ghcx*)
+	    # Green Hills C++ Compiler
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      freebsd* | dragonfly*)
+	# FreeBSD uses GNU C++
+	;;
+      hpux9* | hpux10* | hpux11*)
+	case $cc_basename in
+	  CC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+	    if test "$host_cpu" != ia64; then
+	      lt_prog_compiler_pic_CXX='+Z'
+	    fi
+	    ;;
+	  aCC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+	    case $host_cpu in
+	    hppa*64*|ia64*)
+	      # +Z the default
+	      ;;
+	    *)
+	      lt_prog_compiler_pic_CXX='+Z'
+	      ;;
+	    esac
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      interix*)
+	# This is c89, which is MS Visual C++ (no shared libs)
+	# Anyone wants to do a port?
+	;;
+      irix5* | irix6* | nonstopux*)
+	case $cc_basename in
+	  CC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    # CC pic flag -KPIC is the default.
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      linux* | k*bsd*-gnu)
+	case $cc_basename in
+	  KCC*)
+	    # KAI C++ Compiler
+	    lt_prog_compiler_wl_CXX='--backend -Wl,'
+	    lt_prog_compiler_pic_CXX='-fPIC'
+	    ;;
+	  icpc* | ecpc*)
+	    # Intel C++
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-static'
+	    ;;
+	  pgCC*)
+	    # Portland Group C++ compiler.
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-fpic'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    ;;
+	  cxx*)
+	    # Compaq C++
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    lt_prog_compiler_pic_CXX=
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    ;;
+	  *)
+	    case `$CC -V 2>&1 | sed 5q` in
+	    *Sun\ C*)
+	      # Sun C++ 5.9
+	      lt_prog_compiler_pic_CXX='-KPIC'
+	      lt_prog_compiler_static_CXX='-Bstatic'
+	      lt_prog_compiler_wl_CXX='-Qoption ld '
+	      ;;
+	    esac
+	    ;;
+	esac
+	;;
+      lynxos*)
+	;;
+      m88k*)
+	;;
+      mvs*)
+	case $cc_basename in
+	  cxx*)
+	    lt_prog_compiler_pic_CXX='-W c,exportall'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      netbsd*)
+	;;
+      osf3* | osf4* | osf5*)
+	case $cc_basename in
+	  KCC*)
+	    lt_prog_compiler_wl_CXX='--backend -Wl,'
+	    ;;
+	  RCC*)
+	    # Rational C++ 2.4.1
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  cxx*)
+	    # Digital/Compaq C++
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    lt_prog_compiler_pic_CXX=
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      psos*)
+	;;
+      solaris*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    lt_prog_compiler_wl_CXX='-Qoption ld '
+	    ;;
+	  gcx*)
+	    # Green Hills C++ Compiler
+	    lt_prog_compiler_pic_CXX='-PIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sunos4*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.x
+	    lt_prog_compiler_pic_CXX='-pic'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    ;;
+	  lcc*)
+	    # Lucid
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      tandem*)
+	case $cc_basename in
+	  NCC*)
+	    # NonStop-UX NCC 3.20
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+	case $cc_basename in
+	  CC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    ;;
+	esac
+	;;
+      vxworks*)
+	;;
+      *)
+	lt_prog_compiler_can_build_shared_CXX=no
+	;;
+    esac
+  fi
+
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5
+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 $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
+   echo "$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}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:12739: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:12743: \$? = $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 other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_prog_compiler_pic_works_CXX=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6; }
+
+if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then
+    case $lt_prog_compiler_pic_CXX in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
+     esac
+else
+    lt_prog_compiler_pic_CXX=
+     lt_prog_compiler_can_build_shared_CXX=no
+fi
+
+fi
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic_CXX=
+    ;;
+  *)
+    lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
+    ;;
+esac
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
+{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
+if test "${lt_prog_compiler_static_works_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_static_works_CXX=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker 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
+       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_prog_compiler_static_works_CXX=yes
+       fi
+     else
+       lt_prog_compiler_static_works_CXX=yes
+     fi
+   fi
+   $rm conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5
+echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6; }
+
+if test x"$lt_prog_compiler_static_works_CXX" = xyes; then
+    :
+else
+    lt_prog_compiler_static_CXX=
+fi
+
+
+{ 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_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_c_o_CXX=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$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}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:12843: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:12847: \$? = $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
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o_CXX=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $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_CXX" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; }
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_CXX" = 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
+
+{ 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'
+  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
+      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
+    ;;
+  pw32*)
+    export_symbols_cmds_CXX="$ltdll_cmds"
+  ;;
+  cygwin* | mingw*)
+    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+  ;;
+  *)
+    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  esac
+
+{ 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
+
+#
+# Do we need to explicitly link libc?
+#
+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 "$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); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl_CXX
+	pic_flag=$lt_prog_compiler_pic_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
+        else
+	  archive_cmds_need_lc_CXX=yes
+        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
+echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&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"
+
+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
+
+  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~
+      chmod a+x \$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
+    ;;
+
+  *)
+    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
+  ;;
+
+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`'
+
+  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}${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
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[123]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  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
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+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'
+  ;;
+
+interix[3-9]*)
+  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'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+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
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-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'
+  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
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ 	]*hwcap[ 	]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
+  fi
+
+  # 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}${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
+  ;;
+
+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
+  ;;
+
+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
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+    *)                         need_version=no  ;;
+  esac
+  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
+  ;;
+
+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
+  ;;
+
+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"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+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'
+  ;;
+
+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.3*)
+  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
+  ;;
+
+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
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+    shlibpath_overrides_runpath=no
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    shlibpath_overrides_runpath=yes
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+	;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+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
+  ;;
+
+*)
+  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
+
+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
+
+{ 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
+
+
+# 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 LTCFLAGS 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_CXX \
+    CC_CXX \
+    LD_CXX \
+    lt_prog_compiler_wl_CXX \
+    lt_prog_compiler_pic_CXX \
+    lt_prog_compiler_static_CXX \
+    lt_prog_compiler_no_builtin_flag_CXX \
+    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 \
+    postdep_objects_CXX \
+    predeps_CXX \
+    postdeps_CXX \
+    compiler_lib_search_path_CXX \
+    archive_cmds_CXX \
+    archive_expsym_cmds_CXX \
+    postinstall_cmds_CXX \
+    postuninstall_cmds_CXX \
+    old_archive_from_expsyms_cmds_CXX \
+    allow_undefined_flag_CXX \
+    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 \
+    fix_srcfile_path_CXX \
+    exclude_expsyms_CXX \
+    include_expsyms_CXX; do
+
+    case $var in
+    old_archive_cmds_CXX | \
+    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 | \
+    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_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
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# 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
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
+# A language-specific compiler.
+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
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_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_CXX
+
+# Object file suffix (normally "o").
+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"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_CXX
+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_CXX
+
+# 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_CXX
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX
+
+# 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_CXX
+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_CXX
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds_CXX
+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
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_predep_objects_CXX
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects_CXX
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps_CXX
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps_CXX
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
+
+# 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_CXX
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_CXX
+
+# 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_CXX
+
+# 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_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${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct_CXX
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L_CXX
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# 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"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_CXX
+
+# 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_fix_srcfile_path
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols_CXX
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_CXX
+
+# 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_CXX
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_CXX
+
+# ### END LIBTOOL TAG CONFIG: $tagname
+
+__EOF__
+
+
+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=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
+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
+	;;
+
+      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_F77=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="\
+      subroutine t
+      return
+      end
+"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="\
+      program t
+      end
+"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$rm conftest*
+
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${F77-"f77"}
+compiler=$CC
+compiler_F77=$CC
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+{ 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; }
+
+{ 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
+
+# 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*)
+  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; }
+
+{ 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; }
+
+GCC_F77="$G77"
+LD_F77="$LD"
+
+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_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_F77='-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_F77='-m68020 -resident32 -malways-restore-a4'
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | cygwin* | 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).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      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_F77='-fno-common'
+      ;;
+
+    interix[3-9]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+
+    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_F77=no
+      enable_shared=no
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic_F77=-Kconform_pic
+      fi
+      ;;
+
+    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_F77='-fPIC'
+	;;
+      esac
+      ;;
+
+    *)
+      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_F77='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_F77='-Bstatic'
+      else
+	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
+       ;;
+
+    mingw* | cygwin* | 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_F77='-DDLL_EXPORT'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      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_F77='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static_F77='-non_shared'
+      ;;
+
+    newsos6)
+      lt_prog_compiler_pic_F77='-KPIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    linux* | k*bsd*-gnu)
+      case $cc_basename in
+      icc* | ecc*)
+	lt_prog_compiler_wl_F77='-Wl,'
+	lt_prog_compiler_pic_F77='-KPIC'
+	lt_prog_compiler_static_F77='-static'
+        ;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	lt_prog_compiler_wl_F77='-Wl,'
+	lt_prog_compiler_pic_F77='-fpic'
+	lt_prog_compiler_static_F77='-Bstatic'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl_F77='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static_F77='-non_shared'
+        ;;
+      *)
+        case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)
+	  # Sun C 5.9
+	  lt_prog_compiler_pic_F77='-KPIC'
+	  lt_prog_compiler_static_F77='-Bstatic'
+	  lt_prog_compiler_wl_F77='-Wl,'
+	  ;;
+	*Sun\ F*)
+	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
+	  lt_prog_compiler_pic_F77='-KPIC'
+	  lt_prog_compiler_static_F77='-Bstatic'
+	  lt_prog_compiler_wl_F77=''
+	  ;;
+	esac
+	;;
+      esac
+      ;;
+
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static_F77='-non_shared'
+      ;;
+
+    rdos*)
+      lt_prog_compiler_static_F77='-non_shared'
+      ;;
+
+    solaris*)
+      lt_prog_compiler_pic_F77='-KPIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+	lt_prog_compiler_wl_F77='-Qoption ld ';;
+      *)
+	lt_prog_compiler_wl_F77='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      lt_prog_compiler_wl_F77='-Qoption ld '
+      lt_prog_compiler_pic_F77='-PIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      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_F77='-Kconform_pic'
+	lt_prog_compiler_static_F77='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      lt_prog_compiler_pic_F77='-KPIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    unicos*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      lt_prog_compiler_can_build_shared_F77=no
+      ;;
+
+    uts4*)
+      lt_prog_compiler_pic_F77='-pic'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    *)
+      lt_prog_compiler_can_build_shared_F77=no
+      ;;
+    esac
+  fi
+
+{ 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_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_F77=no
+  ac_outfile=conftest.$ac_objext
+   echo "$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}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:14407: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:14411: \$? = $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 other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_prog_compiler_pic_works_F77=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+{ 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_F77" = xyes; then
+    case $lt_prog_compiler_pic_F77 in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;;
+     esac
+else
+    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_F77=
+    ;;
+  *)
+    lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77"
+    ;;
+esac
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\"
+{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
+if test "${lt_prog_compiler_static_works_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_static_works_F77=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker 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
+       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_prog_compiler_static_works_F77=yes
+       fi
+     else
+       lt_prog_compiler_static_works_F77=yes
+     fi
+   fi
+   $rm conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5
+echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6; }
+
+if test x"$lt_prog_compiler_static_works_F77" = xyes; then
+    :
+else
+    lt_prog_compiler_static_F77=
+fi
+
+
+{ 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_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_c_o_F77=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$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}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:14511: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:14515: \$? = $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
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o_F77=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $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_F77" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; }
+
+
+hard_links="nottested"
+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; }
+  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
+
+{ 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; }
+
+  runpath_var=
+  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_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_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
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  extract_expsyms_cmds=
+  # Just being paranoid about ensuring that cc_basename is set.
+  for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+  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
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  ld_shlibs_F77=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    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
+    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
+
+    # 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_F77=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*)
+      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
+      # 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_F77=no
+      ;;
+
+    beos*)
+      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_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	ld_shlibs_F77=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # _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 '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $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;
+	  cat $export_symbols >> $output_objdir/$soname.def;
+	fi~
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      else
+	ld_shlibs_F77=no
+      fi
+      ;;
+
+    interix[3-9]*)
+      hardcode_direct_F77=no
+      hardcode_shlibpath_var_F77=no
+      hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+      export_dynamic_flag_spec_F77='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
+
+    gnu* | linux* | k*bsd*-gnu)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	tmp_addflag=
+	case $cc_basename,$host_cpu in
+	pgcc*)				# Portland Group C compiler
+	  whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
+	  whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag -Mnomain' ;;
+	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
+	  tmp_addflag=' -i_dynamic' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	esac
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)			# Sun C 5.9
+	  whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_sharedflag='-G' ;;
+	*Sun\ F*)			# Sun Fortran 8.3
+	  tmp_sharedflag='-G' ;;
+	*)
+	  tmp_sharedflag='-shared' ;;
+	esac
+	archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+	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 '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+	fi
+      else
+	ld_shlibs_F77=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	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*)
+      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
+*** 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 | 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_F77=no
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+	ld_shlibs_F77=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+	;;
+	*)
+	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	    hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+	    archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
+	    archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
+	  else
+	    ld_shlibs_F77=no
+	  fi
+	;;
+      esac
+      ;;
+
+    sunos4*)
+      archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    *)
+      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_F77=no
+      fi
+      ;;
+    esac
+
+    if test "$ld_shlibs_F77" = no; then
+      runpath_var=
+      hardcode_libdir_flag_spec_F77=
+      export_dynamic_flag_spec_F77=
+      whole_archive_flag_spec_F77=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      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_F77=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	hardcode_direct_F77=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 | 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_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
+
+	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.
+
+      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].*)
+	# 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
+  	  :
+	  else
+  	  # We have old collect2
+  	  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_F77=yes
+  	  hardcode_libdir_flag_spec_F77='-L$libdir'
+  	  hardcode_libdir_separator_F77=
+	  fi
+	  ;;
+	esac
+	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+      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_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_F77='-berok'
+       # Determine the default libpath from the value encoded in an empty executable.
+       cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_f77_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# 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 "$lt_aix_libpath_sed"`
+fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+       hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
+	archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $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
+	  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 '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_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
+      program main
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_f77_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# 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 "$lt_aix_libpath_sed"`
+fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+	 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_F77=' ${wl}-bernotok'
+	  allow_undefined_flag_F77=' ${wl}-berok'
+	  # Exported symbols can be pulled into shared objects from archives
+	  whole_archive_flag_spec_F77='$convenience'
+	  archive_cmds_need_lc_F77=yes
+	  # This is similar to how AIX traditionally builds its shared libraries.
+	  archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	fi
+      fi
+      ;;
+
+    amigaos*)
+      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_F77=no
+      ;;
+
+    bsdi[45]*)
+      export_dynamic_flag_spec_F77=-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.
+      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_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_F77='true'
+      # FIXME: Should let the user specify the lib program.
+      old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs'
+      fix_srcfile_path_F77='`cygpath -w "$srcfile"`'
+      enable_shared_with_static_runtimes_F77=yes
+      ;;
+
+    darwin* | rhapsody*)
+      case $host_os in
+        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
+      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 lds
+      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` $xlcverstring'
+         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 lds
+         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 $xlcverstring~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_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_F77=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_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_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* | dragonfly*)
+      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*)
+      if test "$GCC" = yes; then
+	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*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+	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
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -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_cpu in
+	hppa*64*)
+	  archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
+	hardcode_libdir_separator_F77=:
+
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  hardcode_libdir_flag_spec_ld_F77='+b $libdir'
+	  hardcode_direct_F77=no
+	  hardcode_shlibpath_var_F77=no
+	  ;;
+	*)
+	  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
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	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_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_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_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec_F77='-R$libdir'
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    newsos6)
+      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*)
+      if test -f /usr/libexec/ld.so; then
+	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_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_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	     hardcode_libdir_flag_spec_F77='-R$libdir'
+	     ;;
+	   *)
+	     archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	     hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+	     ;;
+	  esac
+        fi
+      else
+	ld_shlibs_F77=no
+      fi
+      ;;
+
+    os2*)
+      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_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_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_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_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_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 ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
+
+	# Both c and cxx compiler support -rpath directly
+	hardcode_libdir_flag_spec_F77='-rpath $libdir'
+      fi
+      hardcode_libdir_separator_F77=:
+      ;;
+
+    solaris*)
+      no_undefined_flag_F77=' -z text'
+      if test "$GCC" = yes; then
+	wlarc='${wl}'
+	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
+	wlarc=''
+	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_F77='-R$libdir'
+      hardcode_shlibpath_var_F77=no
+      case $host_os in
+      solaris2.[0-5] | solaris2.[0-5].*) ;;
+      *)
+	# The compiler driver will combine and reorder linker options,
+	# but understands `-z linker_flag'.  GCC discards it without `$wl',
+	# but is careful enough not to reorder.
+ 	# Supported since Solaris 2.6 (maybe 2.5.1?)
+	if test "$GCC" = yes; then
+	  whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	else
+	  whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract'
+	fi
+	;;
+      esac
+      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_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_direct_F77=yes
+      hardcode_minus_L_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    sysv4)
+      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_F77=no
+      ;;
+
+    sysv4.3*)
+      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_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_F77=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+      no_undefined_flag_F77='${wl}-z,text'
+      archive_cmds_need_lc_F77=no
+      hardcode_shlibpath_var_F77=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      no_undefined_flag_F77='${wl}-z,text'
+      allow_undefined_flag_F77='${wl}-z,nodefs'
+      archive_cmds_need_lc_F77=no
+      hardcode_shlibpath_var_F77=no
+      hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+      hardcode_libdir_separator_F77=':'
+      link_all_deplibs_F77=yes
+      export_dynamic_flag_spec_F77='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      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_F77=no
+      ;;
+    esac
+  fi
+
+{ 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
+
+#
+# Do we need to explicitly link libc?
+#
+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 "$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); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl_F77
+	pic_flag=$lt_prog_compiler_pic_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_F77=no
+        else
+	  archive_cmds_need_lc_F77=yes
+        fi
+        allow_undefined_flag_F77=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5
+echo "${ECHO_T}$archive_cmds_need_lc_F77" >&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"
+
+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
+
+  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~
+      chmod a+x \$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
+    ;;
+
+  *)
+    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
+  ;;
+
+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`'
+
+  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}${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
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[123]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  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
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+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'
+  ;;
+
+interix[3-9]*)
+  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'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+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
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-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'
+  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
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ 	]*hwcap[ 	]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
+  fi
+
+  # 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}${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
+  ;;
+
+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
+  ;;
+
+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
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+    *)                         need_version=no  ;;
+  esac
+  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
+  ;;
+
+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
+  ;;
+
+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"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+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'
+  ;;
+
+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.3*)
+  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
+  ;;
+
+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
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+    shlibpath_overrides_runpath=no
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    shlibpath_overrides_runpath=yes
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+	;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+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
+  ;;
+
+*)
+  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
+
+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
+
+{ 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
+  # 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
+
+
+# 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 LTCFLAGS 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 \
+    fix_srcfile_path_F77 \
+    exclude_expsyms_F77 \
+    include_expsyms_F77; do
+
+    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
+
+  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_F77
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# 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
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
+# A language-specific compiler.
+CC=$lt_compiler_F77
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC_F77
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD_F77
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_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_F77
+
+# Object file suffix (normally "o").
+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"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_F77
+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_F77
+
+# 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_F77
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77
+
+# 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
+
+# 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_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_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_F77
+
+# Commands used to build and install a shared archive.
+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_F77
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects_F77
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps_F77
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+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_F77
+
+# 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_F77
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_F77
+
+# 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_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_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_F77
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+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_F77
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+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_F77
+
+# 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_fix_srcfile_path
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols_F77
+
+# The commands to list exported symbols.
+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_F77
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_F77
+
+# ### END LIBTOOL TAG CONFIG: $tagname
+
+__EOF__
+
+
+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=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"
+
+	else
+	  tagname=""
+	fi
+	;;
+
+      GCJ)
+	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
+
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+objext_GCJ=$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.
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$rm conftest*
+
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${GCJ-"gcj"}
+compiler=$CC
+compiler_GCJ=$CC
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+archive_cmds_need_lc_GCJ=no
+
+old_archive_cmds_GCJ=$old_archive_cmds
+
+
+lt_prog_compiler_no_builtin_flag_GCJ=
+
+if test "$GCC" = yes; then
+  lt_prog_compiler_no_builtin_flag_GCJ=' -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
+  lt_cv_prog_compiler_rtti_exceptions=no
+  ac_outfile=conftest.$ac_objext
+   echo "$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}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:16700: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:16704: \$? = $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 other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_rtti_exceptions=yes
+     fi
+   fi
+   $rm conftest*
+
+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_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions"
+else
+    :
+fi
+
+fi
+
+lt_prog_compiler_wl_GCJ=
+lt_prog_compiler_pic_GCJ=
+lt_prog_compiler_static_GCJ=
+
+{ 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'
+
+    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
+      ;;
+
+    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'
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | cygwin* | 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).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      lt_prog_compiler_pic_GCJ='-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'
+      ;;
+
+    interix[3-9]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+
+    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
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic_GCJ=-Kconform_pic
+      fi
+      ;;
+
+    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
+      ;;
+
+    *)
+      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
+       ;;
+
+    mingw* | cygwin* | 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'
+      ;;
+
+    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'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static_GCJ='-non_shared'
+      ;;
+
+    newsos6)
+      lt_prog_compiler_pic_GCJ='-KPIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    linux* | k*bsd*-gnu)
+      case $cc_basename in
+      icc* | ecc*)
+	lt_prog_compiler_wl_GCJ='-Wl,'
+	lt_prog_compiler_pic_GCJ='-KPIC'
+	lt_prog_compiler_static_GCJ='-static'
+        ;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	lt_prog_compiler_wl_GCJ='-Wl,'
+	lt_prog_compiler_pic_GCJ='-fpic'
+	lt_prog_compiler_static_GCJ='-Bstatic'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl_GCJ='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static_GCJ='-non_shared'
+        ;;
+      *)
+        case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)
+	  # Sun C 5.9
+	  lt_prog_compiler_pic_GCJ='-KPIC'
+	  lt_prog_compiler_static_GCJ='-Bstatic'
+	  lt_prog_compiler_wl_GCJ='-Wl,'
+	  ;;
+	*Sun\ F*)
+	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
+	  lt_prog_compiler_pic_GCJ='-KPIC'
+	  lt_prog_compiler_static_GCJ='-Bstatic'
+	  lt_prog_compiler_wl_GCJ=''
+	  ;;
+	esac
+	;;
+      esac
+      ;;
+
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static_GCJ='-non_shared'
+      ;;
+
+    rdos*)
+      lt_prog_compiler_static_GCJ='-non_shared'
+      ;;
+
+    solaris*)
+      lt_prog_compiler_pic_GCJ='-KPIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+	lt_prog_compiler_wl_GCJ='-Qoption ld ';;
+      *)
+	lt_prog_compiler_wl_GCJ='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      lt_prog_compiler_wl_GCJ='-Qoption ld '
+      lt_prog_compiler_pic_GCJ='-PIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      lt_prog_compiler_pic_GCJ='-KPIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	lt_prog_compiler_pic_GCJ='-Kconform_pic'
+	lt_prog_compiler_static_GCJ='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      lt_prog_compiler_pic_GCJ='-KPIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    unicos*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      lt_prog_compiler_can_build_shared_GCJ=no
+      ;;
+
+    uts4*)
+      lt_prog_compiler_pic_GCJ='-pic'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    *)
+      lt_prog_compiler_can_build_shared_GCJ=no
+      ;;
+    esac
+  fi
+
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&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
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_pic_works_GCJ=no
+  ac_outfile=conftest.$ac_objext
+   echo "$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}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:16990: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:16994: \$? = $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 other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_prog_compiler_pic_works_GCJ=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6; }
+
+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
+
+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
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\"
+{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
+if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_static_works_GCJ=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker 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
+       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_prog_compiler_static_works_GCJ=yes
+       fi
+     else
+       lt_prog_compiler_static_works_GCJ=yes
+     fi
+   fi
+   $rm conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5
+echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6; }
+
+if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then
+    :
+else
+    lt_prog_compiler_static_GCJ=
+fi
+
+
+{ 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
+   echo "$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}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:17094: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:17098: \$? = $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
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o_GCJ=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $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; }
+
+
+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
+
+{ 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; }
+
+  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=
+  # Just being paranoid about ensuring that cc_basename is set.
+  for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+  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
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  ld_shlibs_GCJ=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    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
+    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
+
+    # 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
+
+*** 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*)
+      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
+
+      # 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
+      ;;
+
+    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
+      ;;
+
+    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 '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      else
+	ld_shlibs_GCJ=no
+      fi
+      ;;
+
+    interix[3-9]*)
+      hardcode_direct_GCJ=no
+      hardcode_shlibpath_var_GCJ=no
+      hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
+      export_dynamic_flag_spec_GCJ='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
+
+    gnu* | linux* | k*bsd*-gnu)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	tmp_addflag=
+	case $cc_basename,$host_cpu in
+	pgcc*)				# Portland Group C compiler
+	  whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
+	  whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag -Mnomain' ;;
+	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
+	  tmp_addflag=' -i_dynamic' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	esac
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)			# Sun C 5.9
+	  whole_archive_flag_spec_GCJ='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_sharedflag='-G' ;;
+	*Sun\ F*)			# Sun Fortran 8.3
+	  tmp_sharedflag='-G' ;;
+	*)
+	  tmp_sharedflag='-shared' ;;
+	esac
+	archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+	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 '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+	fi
+      else
+	ld_shlibs_GCJ=no
+      fi
+      ;;
+
+    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
+      ;;
+
+    solaris*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+	ld_shlibs_GCJ=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 | 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
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+	ld_shlibs_GCJ=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+	;;
+	*)
+	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	    hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+	    archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
+	    archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
+	  else
+	    ld_shlibs_GCJ=no
+	  fi
+	;;
+      esac
+      ;;
+
+    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
+      ;;
+
+    *)
+      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" = no; then
+      runpath_var=
+      hardcode_libdir_flag_spec_GCJ=
+      export_dynamic_flag_spec_GCJ=
+      whole_archive_flag_spec_GCJ=
+    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 "$lt_prog_compiler_static"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	hardcode_direct_GCJ=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 | 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
+
+	# 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
+
+      # 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.
+
+      archive_cmds_GCJ=''
+      hardcode_direct_GCJ=yes
+      hardcode_libdir_separator_GCJ=':'
+      link_all_deplibs_GCJ=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
+  	  :
+	  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'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+      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.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# 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 "$lt_aix_libpath_sed"`
+fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      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 '"\${wl}$no_entry_flag"' $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
+	  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 '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_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.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# 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 "$lt_aix_libpath_sed"`
+fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      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'
+	  # Exported symbols can be pulled into shared objects from archives
+	  whole_archive_flag_spec_GCJ='$convenience'
+	  archive_cmds_need_lc_GCJ=yes
+	  # This is similar to how AIX traditionally builds its shared libraries.
+	  archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${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
+      ;;
+
+    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_GCJ='`cygpath -w "$srcfile"`'
+      enable_shared_with_static_runtimes_GCJ=yes
+      ;;
+
+    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 lds
+      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` $xlcverstring'
+         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 lds
+         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 $xlcverstring~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
+      ;;
+
+    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* | dragonfly*)
+      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
+
+      # 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'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+	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
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -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*)
+	  archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
+	hardcode_libdir_separator_GCJ=:
+
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  hardcode_libdir_flag_spec_ld_GCJ='+b $libdir'
+	  hardcode_direct_GCJ=no
+	  hardcode_shlibpath_var_GCJ=no
+	  ;;
+	*)
+	  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
+      ;;
+
+    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
+      ;;
+
+    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
+      ;;
+
+    openbsd*)
+      if test -f /usr/libexec/ld.so; then
+	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
+      else
+	ld_shlibs_GCJ=no
+      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'
+      ;;
+
+    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 ${output_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=:
+      ;;
+
+    solaris*)
+      no_undefined_flag_GCJ=' -z text'
+      if test "$GCC" = yes; then
+	wlarc='${wl}'
+	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
+	wlarc=''
+	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].*) ;;
+      *)
+	# The compiler driver will combine and reorder linker options,
+	# but understands `-z linker_flag'.  GCC discards it without `$wl',
+	# but is careful enough not to reorder.
+ 	# Supported since Solaris 2.6 (maybe 2.5.1?)
+	if test "$GCC" = yes; then
+	  whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	else
+	  whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract'
+	fi
+	;;
+      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*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+      no_undefined_flag_GCJ='${wl}-z,text'
+      archive_cmds_need_lc_GCJ=no
+      hardcode_shlibpath_var_GCJ=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      no_undefined_flag_GCJ='${wl}-z,text'
+      allow_undefined_flag_GCJ='${wl}-z,nodefs'
+      archive_cmds_need_lc_GCJ=no
+      hardcode_shlibpath_var_GCJ=no
+      hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+      hardcode_libdir_separator_GCJ=':'
+      link_all_deplibs_GCJ=yes
+      export_dynamic_flag_spec_GCJ='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    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
+
+#
+# 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*
+      echo "$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); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl_GCJ
+	pic_flag=$lt_prog_compiler_pic_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
+	  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"
+
+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
+
+  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~
+      chmod a+x \$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
+    ;;
+
+  *)
+    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
+  ;;
+
+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`'
+
+  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}${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
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[123]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  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
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+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'
+  ;;
+
+interix[3-9]*)
+  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'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+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
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-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'
+  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
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ 	]*hwcap[ 	]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
+  fi
+
+  # 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}${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
+  ;;
+
+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
+  ;;
+
+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
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+    *)                         need_version=no  ;;
+  esac
+  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
+  ;;
+
+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
+  ;;
+
+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"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+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'
+  ;;
+
+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.3*)
+  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
+  ;;
+
+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
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+    shlibpath_overrides_runpath=no
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    shlibpath_overrides_runpath=yes
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+	;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+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
+  ;;
+
+*)
+  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
+
+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
+
+{ 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
+  # 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
+
+
+# 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 LTCFLAGS 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 \
+    fix_srcfile_path_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
+
+  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 disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# 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
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
+# A language-specific compiler.
+CC=$lt_compiler_GCJ
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC_GCJ
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# 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 symbol stripping program
+STRIP=$lt_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"
+
+# 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
+
+# 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
+
+# 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
+
+# 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
+
+# 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
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_predep_objects_GCJ
+
+# 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
+
+# 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
+
+# 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_GCJ
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_GCJ
+
+# 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_GCJ
+
+# 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
+
+# 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
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct_GCJ
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L_GCJ
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ
+
+# 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
+
+# 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
+
+# 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_fix_srcfile_path
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols_GCJ
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_GCJ
+
+# 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
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_GCJ
+
+# ### END LIBTOOL TAG CONFIG: $tagname
+
+__EOF__
+
+
+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=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"
+
+	else
+	  tagname=""
+	fi
+	;;
+
+      RC)
+
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# 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 }'
+
+# 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.
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$rm conftest*
+
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${RC-"windres"}
+compiler=$CC
+compiler_RC=$CC
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+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
+  # 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 LTCFLAGS 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 \
+    fix_srcfile_path_RC \
+    exclude_expsyms_RC \
+    include_expsyms_RC; do
+
+    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
+
+  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_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
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# 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
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
+# 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
+
+# The linker used to build libraries.
+LD=$lt_LD_RC
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_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_RC
+
+# Object file suffix (normally "o").
+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"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_RC
+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_RC
+
+# 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_RC
+
+# 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
+
+# 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_RC
+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_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
+
+# 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
+
+# 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_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
+
+# 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
+
+# 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
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
+
+# 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
+
+# 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=$lt_fix_srcfile_path
+
+# 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
+
+# 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__
+
+
+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=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"
+
+	;;
+
+      *)
+	{ { 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"
+
+  # 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'
+
+# Prevent multiple expansion
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ 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; }
+else
+  { 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 ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
+set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+	@echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+  SET_MAKE=
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+
+case "$am__api_version" in
+    1.01234)
+	{ { echo "$as_me:$LINENO: error: Automake 1.5 or newer is required to use intltool" >&5
+echo "$as_me: error: Automake 1.5 or newer is required to use intltool" >&2;}
+   { (exit 1); exit 1; }; }
+    ;;
+    *)
+    ;;
+esac
+
+if test -n "0.21"; then
+    { echo "$as_me:$LINENO: checking for intltool >= 0.21" >&5
+echo $ECHO_N "checking for intltool >= 0.21... $ECHO_C" >&6; }
+
+    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo 0.21 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
+    INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
+    INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in`
+
+    { echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
+echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found" >&6; }
+    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
+	{ { echo "$as_me:$LINENO: error: Your intltool is too old.  You need intltool 0.21 or later." >&5
+echo "$as_me: error: Your intltool is too old.  You need intltool 0.21 or later." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< $@'
+     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< $@'
+      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check the gettext tools to make sure they are GNU
+# Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; 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_path_XGETTEXT+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $XGETTEXT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_XGETTEXT="$XGETTEXT" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+XGETTEXT=$ac_cv_path_XGETTEXT
+if test -n "$XGETTEXT"; then
+  { echo "$as_me:$LINENO: result: $XGETTEXT" >&5
+echo "${ECHO_T}$XGETTEXT" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+# Extract the first word of "msgmerge", so it can be a program name with args.
+set dummy msgmerge; 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_path_MSGMERGE+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $MSGMERGE in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_MSGMERGE="$MSGMERGE" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+MSGMERGE=$ac_cv_path_MSGMERGE
+if test -n "$MSGMERGE"; then
+  { echo "$as_me:$LINENO: result: $MSGMERGE" >&5
+echo "${ECHO_T}$MSGMERGE" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+# Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; 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_path_MSGFMT+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $MSGFMT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_MSGFMT="$MSGFMT" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+MSGFMT=$ac_cv_path_MSGFMT
+if test -n "$MSGFMT"; then
+  { echo "$as_me:$LINENO: result: $MSGFMT" >&5
+echo "${ECHO_T}$MSGFMT" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
+    { { echo "$as_me:$LINENO: error: GNU gettext tools not found; required for intltool" >&5
+echo "$as_me: error: GNU gettext tools not found; required for intltool" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
+mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
+mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
+if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
+    { { echo "$as_me:$LINENO: error: GNU gettext tools not found; required for intltool" >&5
+echo "$as_me: error: GNU gettext tools not found; required for intltool" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+# Use the tools built into the package, not the ones that are installed.
+INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
+
+INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
+
+INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
+
+
+# Extract the first word of "perl", so it can be a program name with args.
+set dummy perl; 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_path_INTLTOOL_PERL+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $INTLTOOL_PERL in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
+if test -n "$INTLTOOL_PERL"; then
+  { echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
+echo "${ECHO_T}$INTLTOOL_PERL" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+if test -z "$INTLTOOL_PERL"; then
+   { { echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5
+echo "$as_me: error: perl not found; required for intltool" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
+   { { echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5
+echo "$as_me: error: perl 5.x required for intltool" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test "x" != "xno-xml"; then
+   { echo "$as_me:$LINENO: checking for XML::Parser" >&5
+echo $ECHO_N "checking for XML::Parser... $ECHO_C" >&6; }
+   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
+       { echo "$as_me:$LINENO: result: ok" >&5
+echo "${ECHO_T}ok" >&6; }
+   else
+       { { echo "$as_me:$LINENO: error: XML::Parser perl module is required for intltool" >&5
+echo "$as_me: error: XML::Parser perl module is required for intltool" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+fi
+
+# Substitute ALL_LINGUAS so we can use it in po/Makefile
+
+
+# Set DATADIRNAME correctly if it is not set yet
+# (copied from glib-gettext.m4)
+if test -z "$DATADIRNAME"; then
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+extern int _nl_msg_cat_cntr;
+                       return _nl_msg_cat_cntr
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  DATADIRNAME=share
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	case $host in
+    *-*-solaris*)
+                        { echo "$as_me:$LINENO: checking for bind_textdomain_codeset" >&5
+echo $ECHO_N "checking for bind_textdomain_codeset... $ECHO_C" >&6; }
+if test "${ac_cv_func_bind_textdomain_codeset+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 bind_textdomain_codeset to an innocuous variant, in case <limits.h> declares bind_textdomain_codeset.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define bind_textdomain_codeset innocuous_bind_textdomain_codeset
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char bind_textdomain_codeset (); 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 bind_textdomain_codeset
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char bind_textdomain_codeset ();
+/* 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_bind_textdomain_codeset || defined __stub___bind_textdomain_codeset
+choke me
+#endif
+
+int
+main ()
+{
+return bind_textdomain_codeset ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_func_bind_textdomain_codeset=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_func_bind_textdomain_codeset=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_bind_textdomain_codeset" >&5
+echo "${ECHO_T}$ac_cv_func_bind_textdomain_codeset" >&6; }
+if test $ac_cv_func_bind_textdomain_codeset = yes; then
+  DATADIRNAME=share
+else
+  DATADIRNAME=lib
+fi
+
+    ;;
+    *)
+    DATADIRNAME=lib
+    ;;
+    esac
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+
+
+
+ac_config_commands="$ac_config_commands intltool"
+
+
+
+
+
+for ac_func in localtime_r
+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 { as_var=$as_ac_var; eval "test \"\${$as_var+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 $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* 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
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+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
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+{ echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
+echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6; }
+if test "${ac_cv_member_struct_tm_tm_gmtoff+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.  */
+#include <time.h>
+
+int
+main ()
+{
+static struct tm ac_aggr;
+if (ac_aggr.tm_gmtoff)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_member_struct_tm_tm_gmtoff=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <time.h>
+
+int
+main ()
+{
+static struct tm ac_aggr;
+if (sizeof ac_aggr.tm_gmtoff)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_member_struct_tm_tm_gmtoff=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_member_struct_tm_tm_gmtoff=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
+echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6; }
+if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_TM_TM_GMTOFF 1
+_ACEOF
+
+
+fi
+
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+	if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; 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_path_PKG_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+echo "${ECHO_T}$PKG_CONFIG" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+  ac_pt_PKG_CONFIG=$PKG_CONFIG
+  # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; 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_path_ac_pt_PKG_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $ac_pt_PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+  { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
+echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  if test "x$ac_pt_PKG_CONFIG" = x; then
+    PKG_CONFIG=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    PKG_CONFIG=$ac_pt_PKG_CONFIG
+  fi
+else
+  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+fi
+if test -n "$PKG_CONFIG"; then
+	_pkg_min_version=0.9.0
+	{ echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
+echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; }
+	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+		{ 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; }
+		PKG_CONFIG=""
+	fi
+
+fi
+
+pkg_failed=no
+{ echo "$as_me:$LINENO: checking for LIBGPOD" >&5
+echo $ECHO_N "checking for LIBGPOD... $ECHO_C" >&6; }
+
+if test -n "$LIBGPOD_CFLAGS"; then
+    pkg_cv_LIBGPOD_CFLAGS="$LIBGPOD_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.8.0 gobject-2.0\"") >&5
+  ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.8.0 gobject-2.0") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_LIBGPOD_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.8.0 gobject-2.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$LIBGPOD_LIBS"; then
+    pkg_cv_LIBGPOD_LIBS="$LIBGPOD_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.8.0 gobject-2.0\"") >&5
+  ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.8.0 gobject-2.0") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_LIBGPOD_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.8.0 gobject-2.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        LIBGPOD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0 >= 2.8.0 gobject-2.0" 2>&1`
+        else
+	        LIBGPOD_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0 >= 2.8.0 gobject-2.0" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$LIBGPOD_PKG_ERRORS" >&5
+
+	{ { echo "$as_me:$LINENO: error: Package requirements (glib-2.0 >= 2.8.0 gobject-2.0) were not met:
+
+$LIBGPOD_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables LIBGPOD_CFLAGS
+and LIBGPOD_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&5
+echo "$as_me: error: Package requirements (glib-2.0 >= 2.8.0 gobject-2.0) were not met:
+
+$LIBGPOD_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables LIBGPOD_CFLAGS
+and LIBGPOD_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&2;}
+   { (exit 1); exit 1; }; }
+elif test $pkg_failed = untried; then
+	{ { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables LIBGPOD_CFLAGS
+and LIBGPOD_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&5
+echo "$as_me: error: The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables LIBGPOD_CFLAGS
+and LIBGPOD_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+	LIBGPOD_CFLAGS=$pkg_cv_LIBGPOD_CFLAGS
+	LIBGPOD_LIBS=$pkg_cv_LIBGPOD_LIBS
+        { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+	:
+fi
+
+
+
+# Check whether --with-internal-gchecksum was given.
+if test "${with_internal_gchecksum+set}" = set; then
+  withval=$with_internal_gchecksum;
+else
+  with_internal_gchecksum=no
+fi
+
+
+if test "x$with_internal_gchecksum" = "xno"; then
+
+pkg_failed=no
+{ echo "$as_me:$LINENO: checking for GLIB" >&5
+echo $ECHO_N "checking for GLIB... $ECHO_C" >&6; }
+
+if test -n "$GLIB_CFLAGS"; then
+    pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.16.0\"") >&5
+  ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.16.0") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.16.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$GLIB_LIBS"; then
+    pkg_cv_GLIB_LIBS="$GLIB_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.16.0\"") >&5
+  ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.16.0") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.16.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0 >= 2.16.0" 2>&1`
+        else
+	        GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0 >= 2.16.0" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$GLIB_PKG_ERRORS" >&5
+
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+                with_internal_gchecksum=yes
+elif test $pkg_failed = untried; then
+	with_internal_gchecksum=yes
+else
+	GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS
+	GLIB_LIBS=$pkg_cv_GLIB_LIBS
+        { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+	with_internal_gchecksum=no
+fi
+fi
+
+ if test "x$with_internal_gchecksum" = "xyes"; then
+  WITH_INTERNAL_GCHECKSUM_TRUE=
+  WITH_INTERNAL_GCHECKSUM_FALSE='#'
+else
+  WITH_INTERNAL_GCHECKSUM_TRUE='#'
+  WITH_INTERNAL_GCHECKSUM_FALSE=
+fi
+
+
+{ echo "$as_me:$LINENO: checking for sg_ll_inquiry in -lsgutils2" >&5
+echo $ECHO_N "checking for sg_ll_inquiry in -lsgutils2... $ECHO_C" >&6; }
+if test "${ac_cv_lib_sgutils2_sg_ll_inquiry+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsgutils2  $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 GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sg_ll_inquiry ();
+int
+main ()
+{
+return sg_ll_inquiry ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_sgutils2_sg_ll_inquiry=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_sgutils2_sg_ll_inquiry=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_sgutils2_sg_ll_inquiry" >&5
+echo "${ECHO_T}$ac_cv_lib_sgutils2_sg_ll_inquiry" >&6; }
+if test $ac_cv_lib_sgutils2_sg_ll_inquiry = yes; then
+  SGUTILS_LIBS="-lsgutils2"; have_sgutils=yes
+else
+  have_sgutils=no
+fi
+
+if test "x$have_sgutils" != xyes; then
+    { echo "$as_me:$LINENO: checking for sg_ll_inquiry in -lsgutils" >&5
+echo $ECHO_N "checking for sg_ll_inquiry in -lsgutils... $ECHO_C" >&6; }
+if test "${ac_cv_lib_sgutils_sg_ll_inquiry+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsgutils  $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 GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sg_ll_inquiry ();
+int
+main ()
+{
+return sg_ll_inquiry ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_sgutils_sg_ll_inquiry=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_sgutils_sg_ll_inquiry=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_sgutils_sg_ll_inquiry" >&5
+echo "${ECHO_T}$ac_cv_lib_sgutils_sg_ll_inquiry" >&6; }
+if test $ac_cv_lib_sgutils_sg_ll_inquiry = yes; then
+  SGUTILS_LIBS="-lsgutils"; have_sgutils=yes
+else
+  have_sgutils=no
+fi
+
+fi
+
+ if test x"$have_sgutils" = xyes; then
+  HAVE_SGUTILS_TRUE=
+  HAVE_SGUTILS_FALSE='#'
+else
+  HAVE_SGUTILS_TRUE='#'
+  HAVE_SGUTILS_FALSE=
+fi
+
+
+
+# Check whether --with-hal was given.
+if test "${with_hal+set}" = set; then
+  withval=$with_hal;
+fi
+
+
+hal_callouts_dir="`$PKG_CONFIG --variable libdir hal`/hal/scripts"
+
+# Check whether --with-hal_callouts_dir was given.
+if test "${with_hal_callouts_dir+set}" = set; then
+  withval=$with_hal_callouts_dir;
+else
+  with_hal_callouts_dir="$hal_callouts_dir"
+fi
+
+HALCALLOUTSDIR="$with_hal_callouts_dir"
+
+
+hal_fdi_dir="`$PKG_CONFIG --variable prefix hal`/share/hal/fdi"
+
+# Check whether --with-hal_fdi_dir was given.
+if test "${with_hal_fdi_dir+set}" = set; then
+  withval=$with_hal_fdi_dir;
+else
+  with_hal_fdi_dir="$hal_fdi_dir"
+fi
+
+HALFDIDIR="$with_hal_fdi_dir"
+
+
+if test "x$with_hal" != "xno"; then
+
+pkg_failed=no
+{ echo "$as_me:$LINENO: checking for HAL" >&5
+echo $ECHO_N "checking for HAL... $ECHO_C" >&6; }
+
+if test -n "$HAL_CFLAGS"; then
+    pkg_cv_HAL_CFLAGS="$HAL_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"hal >= 0.5 hal < 0.6\"") >&5
+  ($PKG_CONFIG --exists --print-errors "hal >= 0.5 hal < 0.6") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_HAL_CFLAGS=`$PKG_CONFIG --cflags "hal >= 0.5 hal < 0.6" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$HAL_LIBS"; then
+    pkg_cv_HAL_LIBS="$HAL_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"hal >= 0.5 hal < 0.6\"") >&5
+  ($PKG_CONFIG --exists --print-errors "hal >= 0.5 hal < 0.6") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_HAL_LIBS=`$PKG_CONFIG --libs "hal >= 0.5 hal < 0.6" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        HAL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "hal >= 0.5 hal < 0.6" 2>&1`
+        else
+	        HAL_PKG_ERRORS=`$PKG_CONFIG --print-errors "hal >= 0.5 hal < 0.6" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$HAL_PKG_ERRORS" >&5
+
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+                enable_hal=no
+elif test $pkg_failed = untried; then
+	enable_hal=no
+else
+	HAL_CFLAGS=$pkg_cv_HAL_CFLAGS
+	HAL_LIBS=$pkg_cv_HAL_LIBS
+        { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+	enable_hal=yes
+fi
+  if test "x$enable_hal" != "xyes" -a "x$with_hal" = "xyes"; then
+      { { echo "$as_me:$LINENO: error: HAL support explicitly requested but HAL couldn't be found" >&5
+echo "$as_me: error: HAL support explicitly requested but HAL couldn't be found" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+
+  if test "x$enable_hal" = "xyes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_HAL 1
+_ACEOF
+
+
+
+  fi
+fi
+ if test x"$enable_hal" = xyes; then
+  HAVE_HAL_TRUE=
+  HAVE_HAL_FALSE='#'
+else
+  HAVE_HAL_TRUE='#'
+  HAVE_HAL_FALSE=
+fi
+
+
+
+
+
+pkg_failed=no
+{ echo "$as_me:$LINENO: checking for TAGLIB" >&5
+echo $ECHO_N "checking for TAGLIB... $ECHO_C" >&6; }
+
+if test -n "$TAGLIB_CFLAGS"; then
+    pkg_cv_TAGLIB_CFLAGS="$TAGLIB_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"taglib\"") >&5
+  ($PKG_CONFIG --exists --print-errors "taglib") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_TAGLIB_CFLAGS=`$PKG_CONFIG --cflags "taglib" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$TAGLIB_LIBS"; then
+    pkg_cv_TAGLIB_LIBS="$TAGLIB_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"taglib\"") >&5
+  ($PKG_CONFIG --exists --print-errors "taglib") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_TAGLIB_LIBS=`$PKG_CONFIG --libs "taglib" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        TAGLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "taglib" 2>&1`
+        else
+	        TAGLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "taglib" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$TAGLIB_PKG_ERRORS" >&5
+
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+                have_taglib=no
+elif test $pkg_failed = untried; then
+	have_taglib=no
+else
+	TAGLIB_CFLAGS=$pkg_cv_TAGLIB_CFLAGS
+	TAGLIB_LIBS=$pkg_cv_TAGLIB_LIBS
+        { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+	have_taglib=yes
+fi
+if test x"$have_taglib" = xyes; then
+
+
+   cat >>confdefs.h <<_ACEOF
+#define HAVE_TAGLIB 1
+_ACEOF
+
+fi
+
+
+ if test x"$have_taglib" = xyes; then
+  HAVE_TAGLIB_TRUE=
+  HAVE_TAGLIB_FALSE='#'
+else
+  HAVE_TAGLIB_TRUE='#'
+  HAVE_TAGLIB_FALSE=
+fi
+
+
+# Check whether --enable-libxml was given.
+if test "${enable_libxml+set}" = set; then
+  enableval=$enable_libxml; case "${enableval}" in
+  no) enable_libxml=no ;;
+  *) enable_libxml=yes;;
+esac
+fi
+
+
+
+if test x$enable_libxml != xno; then
+
+pkg_failed=no
+{ echo "$as_me:$LINENO: checking for LIBXML" >&5
+echo $ECHO_N "checking for LIBXML... $ECHO_C" >&6; }
+
+if test -n "$LIBXML_CFLAGS"; then
+    pkg_cv_LIBXML_CFLAGS="$LIBXML_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\"") >&5
+  ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_LIBXML_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$LIBXML_LIBS"; then
+    pkg_cv_LIBXML_LIBS="$LIBXML_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\"") >&5
+  ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_LIBXML_LIBS=`$PKG_CONFIG --libs "libxml-2.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        LIBXML_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libxml-2.0" 2>&1`
+        else
+	        LIBXML_PKG_ERRORS=`$PKG_CONFIG --print-errors "libxml-2.0" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$LIBXML_PKG_ERRORS" >&5
+
+	{ { echo "$as_me:$LINENO: error: Package requirements (libxml-2.0) were not met:
+
+$LIBXML_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables LIBXML_CFLAGS
+and LIBXML_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&5
+echo "$as_me: error: Package requirements (libxml-2.0) were not met:
+
+$LIBXML_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables LIBXML_CFLAGS
+and LIBXML_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&2;}
+   { (exit 1); exit 1; }; }
+elif test $pkg_failed = untried; then
+	{ { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables LIBXML_CFLAGS
+and LIBXML_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&5
+echo "$as_me: error: The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables LIBXML_CFLAGS
+and LIBXML_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+	LIBXML_CFLAGS=$pkg_cv_LIBXML_CFLAGS
+	LIBXML_LIBS=$pkg_cv_LIBXML_LIBS
+        { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+	:
+fi
+   cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBXML 1
+_ACEOF
+
+   LIBGPOD_CFLAGS="$LIBGPOD_CFLAGS $LIBXML_CFLAGS"
+   LIBGPOD_LIBS="$LIBGPOD_LIBS $LIBXML_LIBS"
+fi
+
+# Check whether --enable-gdk-pixbuf was given.
+if test "${enable_gdk_pixbuf+set}" = set; then
+  enableval=$enable_gdk_pixbuf; case "${enableval}" in
+  no) enable_gdkpixbuf=no ;;
+  *) enable_gdkpixbuf=yes;;
+esac
+fi
+
+
+
+if test x$enable_gdkpixbuf != xno; then
+   GDKPIXBUF_REQ="gdk-pixbuf-2.0"
+
+pkg_failed=no
+{ echo "$as_me:$LINENO: checking for GDKPIXBUF" >&5
+echo $ECHO_N "checking for GDKPIXBUF... $ECHO_C" >&6; }
+
+if test -n "$GDKPIXBUF_CFLAGS"; then
+    pkg_cv_GDKPIXBUF_CFLAGS="$GDKPIXBUF_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$GDKPIXBUF_REQ >= 2.6.0\"") >&5
+  ($PKG_CONFIG --exists --print-errors "$GDKPIXBUF_REQ >= 2.6.0") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_GDKPIXBUF_CFLAGS=`$PKG_CONFIG --cflags "$GDKPIXBUF_REQ >= 2.6.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$GDKPIXBUF_LIBS"; then
+    pkg_cv_GDKPIXBUF_LIBS="$GDKPIXBUF_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$GDKPIXBUF_REQ >= 2.6.0\"") >&5
+  ($PKG_CONFIG --exists --print-errors "$GDKPIXBUF_REQ >= 2.6.0") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_GDKPIXBUF_LIBS=`$PKG_CONFIG --libs "$GDKPIXBUF_REQ >= 2.6.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        GDKPIXBUF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$GDKPIXBUF_REQ >= 2.6.0" 2>&1`
+        else
+	        GDKPIXBUF_PKG_ERRORS=`$PKG_CONFIG --print-errors "$GDKPIXBUF_REQ >= 2.6.0" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$GDKPIXBUF_PKG_ERRORS" >&5
+
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+                have_gdkpixbuf=no
+elif test $pkg_failed = untried; then
+	have_gdkpixbuf=no
+else
+	GDKPIXBUF_CFLAGS=$pkg_cv_GDKPIXBUF_CFLAGS
+	GDKPIXBUF_LIBS=$pkg_cv_GDKPIXBUF_LIBS
+        { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+	have_gdkpixbuf=yes
+fi
+   if test x"$enable_gdkpixbuf" = xyes -a x"$have_gdkpixbuf" = xno; then
+      { { echo "$as_me:$LINENO: error: gdk-pixbuf support explicitly requested but gdk-pixbuf couldn't be found" >&5
+echo "$as_me: error: gdk-pixbuf support explicitly requested but gdk-pixbuf couldn't be found" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+fi
+if test x"$have_gdkpixbuf" = xyes; then
+   cat >>confdefs.h <<_ACEOF
+#define HAVE_GDKPIXBUF 1
+_ACEOF
+
+   LIBGPOD_CFLAGS="$LIBGPOD_CFLAGS $GDKPIXBUF_CFLAGS"
+   LIBGPOD_LIBS="$LIBGPOD_LIBS $GDKPIXBUF_LIBS"
+else
+   have_gdkpixbuf=no
+   GDKPIXBUF_REQ=""
+fi
+ if test x"$have_gdkpixbuf" = xyes; then
+  HAVE_GDKPIXBUF_TRUE=
+  HAVE_GDKPIXBUF_FALSE='#'
+else
+  HAVE_GDKPIXBUF_TRUE='#'
+  HAVE_GDKPIXBUF_FALSE=
+fi
+
+
+
+
+# Check whether --enable-pygobject was given.
+if test "${enable_pygobject+set}" = set; then
+  enableval=$enable_pygobject; case "${enableval}" in
+  no) enable_pygobject=no ;;
+  *) enable_pygobject=yes;;
+esac
+fi
+
+
+
+if test x$enable_pygobject != xno; then
+
+pkg_failed=no
+{ echo "$as_me:$LINENO: checking for PYGOBJECT" >&5
+echo $ECHO_N "checking for PYGOBJECT... $ECHO_C" >&6; }
+
+if test -n "$PYGOBJECT_CFLAGS"; then
+    pkg_cv_PYGOBJECT_CFLAGS="$PYGOBJECT_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"pygobject-2.0 >= 2.8.0\"") >&5
+  ($PKG_CONFIG --exists --print-errors "pygobject-2.0 >= 2.8.0") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_PYGOBJECT_CFLAGS=`$PKG_CONFIG --cflags "pygobject-2.0 >= 2.8.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$PYGOBJECT_LIBS"; then
+    pkg_cv_PYGOBJECT_LIBS="$PYGOBJECT_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"pygobject-2.0 >= 2.8.0\"") >&5
+  ($PKG_CONFIG --exists --print-errors "pygobject-2.0 >= 2.8.0") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  pkg_cv_PYGOBJECT_LIBS=`$PKG_CONFIG --libs "pygobject-2.0 >= 2.8.0" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        PYGOBJECT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "pygobject-2.0 >= 2.8.0" 2>&1`
+        else
+	        PYGOBJECT_PKG_ERRORS=`$PKG_CONFIG --print-errors "pygobject-2.0 >= 2.8.0" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$PYGOBJECT_PKG_ERRORS" >&5
+
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+                have_pygobject=no
+elif test $pkg_failed = untried; then
+	have_pygobject=no
+else
+	PYGOBJECT_CFLAGS=$pkg_cv_PYGOBJECT_CFLAGS
+	PYGOBJECT_LIBS=$pkg_cv_PYGOBJECT_LIBS
+        { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+	have_pygobject=yes
+fi
+   if test x"$enable_pygobject" = xyes -a x"$have_pygobject" = xno; then
+      { { echo "$as_me:$LINENO: error: pygobject support explicitly requested but pygobject couldn't be found" >&5
+echo "$as_me: error: pygobject support explicitly requested but pygobject couldn't be found" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+fi
+if test x"$have_pygobject" = xyes; then
+   cat >>confdefs.h <<_ACEOF
+#define HAVE_PYGOBJECT 1
+_ACEOF
+
+else
+   have_pygobject=no
+fi
+ if test x"$have_pygobject" = xyes; then
+  HAVE_PYGOBJECT_TRUE=
+  HAVE_PYGOBJECT_FALSE='#'
+else
+  HAVE_PYGOBJECT_TRUE='#'
+  HAVE_PYGOBJECT_FALSE=
+fi
+
+
+
+
+ALL_LINGUAS="de es fr he it ja ro sv zh_CN"
+
+GETTEXT_PACKAGE=libgpod
+
+
+cat >>confdefs.h <<_ACEOF
+#define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
+_ACEOF
+
+
+
+
+for ac_header in locale.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&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
+/* 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 { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; 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 core 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 { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.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:$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;}
+
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&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
+
+    if test $ac_cv_header_locale_h = yes; then
+    { echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
+echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6; }
+if test "${am_cv_val_LC_MESSAGES+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.  */
+#include <locale.h>
+int
+main ()
+{
+return LC_MESSAGES
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  am_cv_val_LC_MESSAGES=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	am_cv_val_LC_MESSAGES=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
+echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6; }
+    if test $am_cv_val_LC_MESSAGES = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LC_MESSAGES 1
+_ACEOF
+
+    fi
+  fi
+     USE_NLS=yes
+
+
+    gt_cv_have_gettext=no
+
+    CATOBJEXT=NONE
+    XGETTEXT=:
+    INTLLIBS=
+
+    if test "${ac_cv_header_libintl_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for libintl.h" >&5
+echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_libintl_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
+echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking libintl.h usability" >&5
+echo $ECHO_N "checking libintl.h 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.  */
+$ac_includes_default
+#include <libintl.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; 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 core 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 libintl.h presence" >&5
+echo $ECHO_N "checking libintl.h 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 <libintl.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.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:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for libintl.h" >&5
+echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_libintl_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_libintl_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
+echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; }
+
+fi
+if test $ac_cv_header_libintl_h = yes; then
+  gt_cv_func_dgettext_libintl="no"
+      libintl_extra_libs=""
+
+      #
+      # First check in libc
+      #
+      { echo "$as_me:$LINENO: checking for ngettext in libc" >&5
+echo $ECHO_N "checking for ngettext in libc... $ECHO_C" >&6; }
+if test "${gt_cv_func_ngettext_libc+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.  */
+
+#include <libintl.h>
+
+int
+main ()
+{
+return !ngettext ("","", 1)
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  gt_cv_func_ngettext_libc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	gt_cv_func_ngettext_libc=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ echo "$as_me:$LINENO: result: $gt_cv_func_ngettext_libc" >&5
+echo "${ECHO_T}$gt_cv_func_ngettext_libc" >&6; }
+
+      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
+	      { echo "$as_me:$LINENO: checking for dgettext in libc" >&5
+echo $ECHO_N "checking for dgettext in libc... $ECHO_C" >&6; }
+if test "${gt_cv_func_dgettext_libc+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.  */
+
+#include <libintl.h>
+
+int
+main ()
+{
+return !dgettext ("","")
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  gt_cv_func_dgettext_libc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	gt_cv_func_dgettext_libc=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
+echo "${ECHO_T}$gt_cv_func_dgettext_libc" >&6; }
+      fi
+
+      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
+
+for ac_func in bind_textdomain_codeset
+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 { as_var=$as_ac_var; eval "test \"\${$as_var+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 $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* 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
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+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
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+      fi
+
+      #
+      # If we don't have everything we want, check in libintl
+      #
+      if test "$gt_cv_func_dgettext_libc" != "yes" \
+	 || test "$gt_cv_func_ngettext_libc" != "yes" \
+         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
+
+        { echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
+echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6; }
+if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl  $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 GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char bindtextdomain ();
+int
+main ()
+{
+return bindtextdomain ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_intl_bindtextdomain=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_intl_bindtextdomain=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
+echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6; }
+if test $ac_cv_lib_intl_bindtextdomain = yes; then
+  { echo "$as_me:$LINENO: checking for ngettext in -lintl" >&5
+echo $ECHO_N "checking for ngettext in -lintl... $ECHO_C" >&6; }
+if test "${ac_cv_lib_intl_ngettext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl  $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 GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ngettext ();
+int
+main ()
+{
+return ngettext ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_intl_ngettext=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_intl_ngettext=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&5
+echo "${ECHO_T}$ac_cv_lib_intl_ngettext" >&6; }
+if test $ac_cv_lib_intl_ngettext = yes; then
+  { echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
+echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; }
+if test "${ac_cv_lib_intl_dgettext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl  $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 GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dgettext ();
+int
+main ()
+{
+return dgettext ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_intl_dgettext=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_intl_dgettext=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
+echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; }
+if test $ac_cv_lib_intl_dgettext = yes; then
+  gt_cv_func_dgettext_libintl=yes
+fi
+
+fi
+
+fi
+
+
+	if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
+	  { echo "$as_me:$LINENO: checking if -liconv is needed to use gettext" >&5
+echo $ECHO_N "checking if -liconv is needed to use gettext... $ECHO_C" >&6; }
+	  { echo "$as_me:$LINENO: result: " >&5
+echo "${ECHO_T}" >&6; }
+  	  { echo "$as_me:$LINENO: checking for ngettext in -lintl" >&5
+echo $ECHO_N "checking for ngettext in -lintl... $ECHO_C" >&6; }
+if test "${ac_cv_lib_intl_ngettext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl -liconv $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 GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ngettext ();
+int
+main ()
+{
+return ngettext ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_intl_ngettext=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_intl_ngettext=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&5
+echo "${ECHO_T}$ac_cv_lib_intl_ngettext" >&6; }
+if test $ac_cv_lib_intl_ngettext = yes; then
+  { echo "$as_me:$LINENO: checking for dcgettext in -lintl" >&5
+echo $ECHO_N "checking for dcgettext in -lintl... $ECHO_C" >&6; }
+if test "${ac_cv_lib_intl_dcgettext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl -liconv $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 GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dcgettext ();
+int
+main ()
+{
+return dcgettext ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_intl_dcgettext=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_intl_dcgettext=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dcgettext" >&5
+echo "${ECHO_T}$ac_cv_lib_intl_dcgettext" >&6; }
+if test $ac_cv_lib_intl_dcgettext = yes; then
+  gt_cv_func_dgettext_libintl=yes
+			libintl_extra_libs=-liconv
+else
+  :
+fi
+
+else
+  :
+fi
+
+        fi
+
+        #
+        # If we found libintl, then check in it for bind_textdomain_codeset();
+        # we'll prefer libc if neither have bind_textdomain_codeset(),
+        # and both have dgettext and ngettext
+        #
+        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
+          glib_save_LIBS="$LIBS"
+          LIBS="$LIBS -lintl $libintl_extra_libs"
+          unset ac_cv_func_bind_textdomain_codeset
+
+for ac_func in bind_textdomain_codeset
+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 { as_var=$as_ac_var; eval "test \"\${$as_var+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 $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* 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
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+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
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+          LIBS="$glib_save_LIBS"
+
+          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
+            gt_cv_func_dgettext_libc=no
+          else
+            if test "$gt_cv_func_dgettext_libc" = "yes" \
+		&& test "$gt_cv_func_ngettext_libc" = "yes"; then
+              gt_cv_func_dgettext_libintl=no
+            fi
+          fi
+        fi
+      fi
+
+      if test "$gt_cv_func_dgettext_libc" = "yes" \
+	|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
+        gt_cv_have_gettext=yes
+      fi
+
+      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
+        INTLLIBS="-lintl $libintl_extra_libs"
+      fi
+
+      if test "$gt_cv_have_gettext" = "yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETTEXT 1
+_ACEOF
+
+	# Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; 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_path_MSGFMT+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case "$MSGFMT" in
+  /*)
+  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+  ;;
+  *)
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+	ac_cv_path_MSGFMT="$ac_dir/$ac_word"
+	break
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
+  ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test "$MSGFMT" != "no"; then
+  { echo "$as_me:$LINENO: result: $MSGFMT" >&5
+echo "${ECHO_T}$MSGFMT" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+	if test "$MSGFMT" != "no"; then
+          glib_save_LIBS="$LIBS"
+          LIBS="$LIBS $INTLLIBS"
+
+for ac_func in dcgettext
+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 { as_var=$as_ac_var; eval "test \"\${$as_var+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 $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* 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
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+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
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+	  MSGFMT_OPTS=
+	  { echo "$as_me:$LINENO: checking if msgfmt accepts -c" >&5
+echo $ECHO_N "checking if msgfmt accepts -c... $ECHO_C" >&6; }
+	  cat >conftest.foo <<_ACEOF
+
+msgid ""
+msgstr ""
+"Content-Type: text/plain; charset=UTF-8\n"
+"Project-Id-Version: test 1.0\n"
+"PO-Revision-Date: 2007-02-15 12:01+0100\n"
+"Last-Translator: test <foo at bar.xx>\n"
+"Language-Team: C <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+_ACEOF
+if { (echo "$as_me:$LINENO: \$MSGFMT -c -o /dev/null conftest.foo") >&5
+  ($MSGFMT -c -o /dev/null conftest.foo) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  MSGFMT_OPTS=-c; { 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; }
+echo "$as_me: failed input was:" >&5
+sed 's/^/| /' conftest.foo >&5
+fi
+
+	  # Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; 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_path_GMSGFMT+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $GMSGFMT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_GMSGFMT="$GMSGFMT" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+  ;;
+esac
+fi
+GMSGFMT=$ac_cv_path_GMSGFMT
+if test -n "$GMSGFMT"; then
+  { echo "$as_me:$LINENO: result: $GMSGFMT" >&5
+echo "${ECHO_T}$GMSGFMT" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+	  # Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; 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_path_XGETTEXT+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case "$XGETTEXT" in
+  /*)
+  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+  ;;
+  *)
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+	ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+	break
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+  ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test "$XGETTEXT" != ":"; then
+  { echo "$as_me:$LINENO: result: $XGETTEXT" >&5
+echo "${ECHO_T}$XGETTEXT" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+	  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+extern int _nl_msg_cat_cntr;
+			 return _nl_msg_cat_cntr
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  CATOBJEXT=.gmo
+             DATADIRNAME=share
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	case $host in
+	    *-*-solaris*)
+	    	                	    	                { echo "$as_me:$LINENO: checking for bind_textdomain_codeset" >&5
+echo $ECHO_N "checking for bind_textdomain_codeset... $ECHO_C" >&6; }
+if test "${ac_cv_func_bind_textdomain_codeset+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 bind_textdomain_codeset to an innocuous variant, in case <limits.h> declares bind_textdomain_codeset.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define bind_textdomain_codeset innocuous_bind_textdomain_codeset
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char bind_textdomain_codeset (); 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 bind_textdomain_codeset
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char bind_textdomain_codeset ();
+/* 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_bind_textdomain_codeset || defined __stub___bind_textdomain_codeset
+choke me
+#endif
+
+int
+main ()
+{
+return bind_textdomain_codeset ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_func_bind_textdomain_codeset=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_func_bind_textdomain_codeset=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_bind_textdomain_codeset" >&5
+echo "${ECHO_T}$ac_cv_func_bind_textdomain_codeset" >&6; }
+if test $ac_cv_func_bind_textdomain_codeset = yes; then
+  CATOBJEXT=.gmo
+               DATADIRNAME=share
+else
+  CATOBJEXT=.mo
+               DATADIRNAME=lib
+fi
+
+	    ;;
+	    *)
+	    CATOBJEXT=.mo
+            DATADIRNAME=lib
+	    ;;
+	    esac
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+          LIBS="$glib_save_LIBS"
+	  INSTOBJEXT=.mo
+	else
+	  gt_cv_have_gettext=no
+	fi
+      fi
+
+fi
+
+
+
+    if test "$gt_cv_have_gettext" = "yes" ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_NLS 1
+_ACEOF
+
+    fi
+
+        if test "$XGETTEXT" != ":"; then
+                  if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+        : ;
+      else
+        { echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
+echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6; }
+        XGETTEXT=":"
+      fi
+    fi
+
+    # We need to process the po/ directory.
+    POSUB=po
+
+    ac_config_commands="$ac_config_commands default-1"
+
+
+                for lang in $ALL_LINGUAS; do
+      GMOFILES="$GMOFILES $lang.gmo"
+      POFILES="$POFILES $lang.po"
+    done
+
+
+
+
+
+
+
+
+
+
+
+
+
+   if test "$gt_cv_have_gettext" = "yes"; then
+     if test "x$ALL_LINGUAS" = "x"; then
+       LINGUAS=
+     else
+       { echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
+echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6; }
+       NEW_LINGUAS=
+       for presentlang in $ALL_LINGUAS; do
+         useit=no
+         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
+           desiredlanguages="$LINGUAS"
+         else
+           desiredlanguages="$ALL_LINGUAS"
+         fi
+         for desiredlang in $desiredlanguages; do
+ 	   # Use the presentlang catalog if desiredlang is
+           #   a. equal to presentlang, or
+           #   b. a variant of presentlang (because in this case,
+           #      presentlang can be used as a fallback for messages
+           #      which are not translated in the desiredlang catalog).
+           case "$desiredlang" in
+             "$presentlang"*) useit=yes;;
+           esac
+         done
+         if test $useit = yes; then
+           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
+         fi
+       done
+       LINGUAS=$NEW_LINGUAS
+       { echo "$as_me:$LINENO: result: $LINGUAS" >&5
+echo "${ECHO_T}$LINGUAS" >&6; }
+     fi
+
+          if test -n "$LINGUAS"; then
+       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+     fi
+   fi
+
+            MKINSTALLDIRS=
+   if test -n "$ac_aux_dir"; then
+     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
+   fi
+   if test -z "$MKINSTALLDIRS"; then
+     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+   fi
+
+
+         test -d po || mkdir po
+   if test "x$srcdir" != "x."; then
+     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
+       posrcprefix="$srcdir/"
+     else
+       posrcprefix="../$srcdir/"
+     fi
+   else
+     posrcprefix="../"
+   fi
+   rm -f po/POTFILES
+   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+	< $srcdir/po/POTFILES.in > po/POTFILES
+
+
+
+
+
+# Check whether --with-html-dir was given.
+if test "${with_html_dir+set}" = set; then
+  withval=$with_html_dir;
+else
+  with_html_dir='${datadir}/gtk-doc/html'
+fi
+
+  HTML_DIR="$with_html_dir"
+
+
+    # Check whether --enable-gtk-doc was given.
+if test "${enable_gtk_doc+set}" = set; then
+  enableval=$enable_gtk_doc;
+else
+  enable_gtk_doc=no
+fi
+
+
+  if test x$enable_gtk_doc = xyes; then
+    if test -n "$PKG_CONFIG" && \
+    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk-doc >= 1.0\"") >&5
+  ($PKG_CONFIG --exists --print-errors "gtk-doc >= 1.0") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: You need to have gtk-doc >= 1.0 installed to build gtk-doc" >&5
+echo "$as_me: error: You need to have gtk-doc >= 1.0 installed to build gtk-doc" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+  fi
+
+  { echo "$as_me:$LINENO: checking whether to build gtk-doc documentation" >&5
+echo $ECHO_N "checking whether to build gtk-doc documentation... $ECHO_C" >&6; }
+  { echo "$as_me:$LINENO: result: $enable_gtk_doc" >&5
+echo "${ECHO_T}$enable_gtk_doc" >&6; }
+
+  for ac_prog in gtkdoc-check
+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_path_GTKDOC_CHECK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $GTKDOC_CHECK in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_GTKDOC_CHECK="$GTKDOC_CHECK" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_GTKDOC_CHECK="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+GTKDOC_CHECK=$ac_cv_path_GTKDOC_CHECK
+if test -n "$GTKDOC_CHECK"; then
+  { echo "$as_me:$LINENO: result: $GTKDOC_CHECK" >&5
+echo "${ECHO_T}$GTKDOC_CHECK" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$GTKDOC_CHECK" && break
+done
+
+
+   if test x$enable_gtk_doc = xyes; then
+  ENABLE_GTK_DOC_TRUE=
+  ENABLE_GTK_DOC_FALSE='#'
+else
+  ENABLE_GTK_DOC_TRUE='#'
+  ENABLE_GTK_DOC_FALSE=
+fi
+
+   if test -n "$LIBTOOL"; then
+  GTK_DOC_USE_LIBTOOL_TRUE=
+  GTK_DOC_USE_LIBTOOL_FALSE='#'
+else
+  GTK_DOC_USE_LIBTOOL_TRUE='#'
+  GTK_DOC_USE_LIBTOOL_FALSE=
+fi
+
+
+
+
+PYTHON_MIN_VERSION=2.1.1
+PYTHON_MUTAGEN_MIN_VERSION=1.8
+SWIG_MIN_VERSION=1.3.24
+
+        am_display_PYTHON=python
+
+
+# Check whether --with-python was given.
+if test "${with_python+set}" = set; then
+  withval=$with_python; with_python=$withval
+else
+  with_python=yes
+fi
+
+
+    { echo "$as_me:$LINENO: checking whether to build python bindings" >&5
+echo $ECHO_N "checking whether to build python bindings... $ECHO_C" >&6; }
+    if test "X$with_python" != Xno; then
+        if test "X$with_python" != Xyes; then
+            PYTHON=$with_python
+        fi
+        with_python=yes
+    fi
+    { echo "$as_me:$LINENO: result: $with_python" >&5
+echo "${ECHO_T}$with_python" >&6; }
+
+    if test "X$with_python" = Xyes; then
+        if test -z "$PYTHON"; then
+            # Extract the first word of "python", so it can be a program name with args.
+set dummy python; 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_path_PYTHON+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PYTHON in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PYTHON="$PYTHON" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PYTHON=$ac_cv_path_PYTHON
+if test -n "$PYTHON"; then
+  { echo "$as_me:$LINENO: result: $PYTHON" >&5
+echo "${ECHO_T}$PYTHON" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+        fi
+
+        if test -n "$PYTHON"; then
+
+
+
+
+        if test -n "$PYTHON"; then
+      # If the user set $PYTHON, use it and don't search something else.
+      { echo "$as_me:$LINENO: checking whether $PYTHON version >= $PYTHON_MIN_VERSION" >&5
+echo $ECHO_N "checking whether $PYTHON version >= $PYTHON_MIN_VERSION... $ECHO_C" >&6; }
+      prog="import sys, string
+# split strings by '.' and convert to numeric.  Append some zeros
+# because we need at least 4 digits for the hex conversion.
+minver = map(int, string.split('$PYTHON_MIN_VERSION', '.')) + [0, 0, 0]
+minverhex = 0
+for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[i]
+sys.exit(sys.hexversion < minverhex)"
+  if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5
+   ($PYTHON -c "$prog") >&5 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; }
+else
+  { { echo "$as_me:$LINENO: error: too old" >&5
+echo "$as_me: error: too old" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+      am_display_PYTHON=$PYTHON
+    else
+      # Otherwise, try each interpreter until we find one that satisfies
+      # VERSION.
+      { echo "$as_me:$LINENO: checking for a Python interpreter with version >= $PYTHON_MIN_VERSION" >&5
+echo $ECHO_N "checking for a Python interpreter with version >= $PYTHON_MIN_VERSION... $ECHO_C" >&6; }
+if test "${am_cv_pathless_PYTHON+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+	for am_cv_pathless_PYTHON in python python2 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 none; do
+	  test "$am_cv_pathless_PYTHON" = none && break
+	  prog="import sys, string
+# split strings by '.' and convert to numeric.  Append some zeros
+# because we need at least 4 digits for the hex conversion.
+minver = map(int, string.split('$PYTHON_MIN_VERSION', '.')) + [0, 0, 0]
+minverhex = 0
+for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[i]
+sys.exit(sys.hexversion < minverhex)"
+  if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5
+   ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; then
+  break
+fi
+
+	done
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_pathless_PYTHON" >&5
+echo "${ECHO_T}$am_cv_pathless_PYTHON" >&6; }
+      # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
+      if test "$am_cv_pathless_PYTHON" = none; then
+	PYTHON=:
+      else
+        # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args.
+set dummy $am_cv_pathless_PYTHON; 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_path_PYTHON+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PYTHON in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PYTHON="$PYTHON" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PYTHON=$ac_cv_path_PYTHON
+if test -n "$PYTHON"; then
+  { echo "$as_me:$LINENO: result: $PYTHON" >&5
+echo "${ECHO_T}$PYTHON" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+      fi
+      am_display_PYTHON=$am_cv_pathless_PYTHON
+    fi
+
+
+  if test "$PYTHON" = :; then
+      { { echo "$as_me:$LINENO: error: no suitable Python interpreter found" >&5
+echo "$as_me: error: no suitable Python interpreter found" >&2;}
+   { (exit 1); exit 1; }; }
+  else
+
+
+  { echo "$as_me:$LINENO: checking for $am_display_PYTHON version" >&5
+echo $ECHO_N "checking for $am_display_PYTHON version... $ECHO_C" >&6; }
+if test "${am_cv_python_version+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  am_cv_python_version=`$PYTHON -c "import sys; print sys.version[:3]"`
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_python_version" >&5
+echo "${ECHO_T}$am_cv_python_version" >&6; }
+  PYTHON_VERSION=$am_cv_python_version
+
+
+
+  PYTHON_PREFIX='${prefix}'
+
+  PYTHON_EXEC_PREFIX='${exec_prefix}'
+
+
+
+  { echo "$as_me:$LINENO: checking for $am_display_PYTHON platform" >&5
+echo $ECHO_N "checking for $am_display_PYTHON platform... $ECHO_C" >&6; }
+if test "${am_cv_python_platform+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"`
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_python_platform" >&5
+echo "${ECHO_T}$am_cv_python_platform" >&6; }
+  PYTHON_PLATFORM=$am_cv_python_platform
+
+
+
+
+                { echo "$as_me:$LINENO: checking for $am_display_PYTHON script directory" >&5
+echo $ECHO_N "checking for $am_display_PYTHON script directory... $ECHO_C" >&6; }
+if test "${am_cv_python_pythondir+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null ||
+     echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_python_pythondir" >&5
+echo "${ECHO_T}$am_cv_python_pythondir" >&6; }
+  pythondir=$am_cv_python_pythondir
+
+
+
+  pkgpythondir=\${pythondir}/$PACKAGE
+
+
+            { echo "$as_me:$LINENO: checking for $am_display_PYTHON extension module directory" >&5
+echo $ECHO_N "checking for $am_display_PYTHON extension module directory... $ECHO_C" >&6; }
+if test "${am_cv_python_pyexecdir+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null ||
+     echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"`
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_python_pyexecdir" >&5
+echo "${ECHO_T}$am_cv_python_pyexecdir" >&6; }
+  pyexecdir=$am_cv_python_pyexecdir
+
+
+
+  pkgpyexecdir=\${pyexecdir}/$PACKAGE
+
+
+
+  fi
+
+
+
+{ echo "$as_me:$LINENO: checking for python development headers" >&5
+echo $ECHO_N "checking for python development headers... $ECHO_C" >&6; }
+py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
+py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
+PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
+if test "$py_prefix" != "$py_exec_prefix"; then
+  PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
+fi
+
+save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <Python.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  { echo "$as_me:$LINENO: result: found" >&5
+echo "${ECHO_T}found" >&6; }
+with_python="yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  { echo "$as_me:$LINENO: result: not found" >&5
+echo "${ECHO_T}not found" >&6; }
+with_python="no"
+fi
+
+rm -f conftest.err conftest.$ac_ext
+CPPFLAGS="$save_CPPFLAGS"
+
+
+            if test "X$with_python" = Xyes; then
+                                                if test `uname` = Darwin; then
+                    PYTHON_LDFLAGS="-Wl,-F. -Wl,-F. -bundle"
+                    if $PYTHON -c 'import sys, string; sys.exit(string.find(sys.prefix,"Framework")+1)'; then
+                        :
+                    else
+                        PYTHON_LDFLAGS="$PYTHON_LDFLAGS -framework Python"
+                    fi
+                else
+                    PYTHON_LDFLAGS="-shared"
+                fi
+
+
+
+py_mod_var=`echo mutagen`
+{ echo "$as_me:$LINENO: checking for python module mutagen >= $PYTHON_MUTAGEN_MIN_VERSION" >&5
+echo $ECHO_N "checking for python module mutagen >= $PYTHON_MUTAGEN_MIN_VERSION... $ECHO_C" >&6; }
+if { as_var=py_cv_mod_$py_mod_var; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+prog="
+import sys, string, mutagen
+curverstr = mutagen.version_string
+# use method from AM_PYTHON_CHECK_VERSION
+minver = map(int, string.split('$PYTHON_MUTAGEN_MIN_VERSION', '.'))
+length = len(minver)
+minver += [0, 0, 0]
+minverhex = 0
+for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[i]
+curver = map(int, string.split(curverstr, '.')[:length])
+curver += [0, 0, 0]
+curverhex = 0
+for i in xrange(0, 4): curverhex = (curverhex << 8) + curver[i]
+if (curverhex >= minverhex):
+        sys.exit(0)
+else:
+        sys.exit(1)
+sys.exit(0)"
+if $PYTHON -c "$prog" 1>&5 2>&5
+  then
+    eval "py_cv_mod_$py_mod_var=yes"
+  else
+    eval "py_cv_mod_$py_mod_var=no"
+  fi
+
+fi
+
+py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"`
+if test "x$py_val" != xno; then
+  { 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; }
+  with_python=no
+fi
+
+
+
+                                if test "X$with_python" = Xyes; then
+
+        # Extract the first word of "swig", so it can be a program name with args.
+set dummy swig; 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_path_SWIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $SWIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_SWIG="$SWIG" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+SWIG=$ac_cv_path_SWIG
+if test -n "$SWIG"; then
+  { echo "$as_me:$LINENO: result: $SWIG" >&5
+echo "${ECHO_T}$SWIG" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+        if test -z "$SWIG" ; then
+                { echo "$as_me:$LINENO: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&5
+echo "$as_me: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&2;}
+                SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
+        elif test -n "$SWIG_MIN_VERSION" ; then
+                { echo "$as_me:$LINENO: checking for SWIG version" >&5
+echo $ECHO_N "checking for SWIG version... $ECHO_C" >&6; }
+                swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`
+                { echo "$as_me:$LINENO: result: $swig_version" >&5
+echo "${ECHO_T}$swig_version" >&6; }
+                if test -n "$swig_version" ; then
+                        # Calculate the required version number components
+                        required=$SWIG_MIN_VERSION
+                        required_major=`echo $required | sed 's/[^0-9].*//'`
+                        if test -z "$required_major" ; then
+                                required_major=0
+                        fi
+                        required=`echo $required | sed 's/[0-9]*[^0-9]//'`
+                        required_minor=`echo $required | sed 's/[^0-9].*//'`
+                        if test -z "$required_minor" ; then
+                                required_minor=0
+                        fi
+                        required=`echo $required | sed 's/[0-9]*[^0-9]//'`
+                        required_patch=`echo $required | sed 's/[^0-9].*//'`
+                        if test -z "$required_patch" ; then
+                                required_patch=0
+                        fi
+                        # Calculate the available version number components
+                        available=$swig_version
+                        available_major=`echo $available | sed 's/[^0-9].*//'`
+                        if test -z "$available_major" ; then
+                                available_major=0
+                        fi
+                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
+                        available_minor=`echo $available | sed 's/[^0-9].*//'`
+                        if test -z "$available_minor" ; then
+                                available_minor=0
+                        fi
+                        available=`echo $available | sed 's/[0-9]*[^0-9]//'`
+                        available_patch=`echo $available | sed 's/[^0-9].*//'`
+                        if test -z "$available_patch" ; then
+                                available_patch=0
+                        fi
+                        if test $available_major -ne $required_major \
+                                -o $available_minor -ne $required_minor \
+                                -o $available_patch -lt $required_patch ; then
+                                { echo "$as_me:$LINENO: WARNING: SWIG version >= $SWIG_MIN_VERSION is required.  You have $swig_version.  You should look at http://www.swig.org" >&5
+echo "$as_me: WARNING: SWIG version >= $SWIG_MIN_VERSION is required.  You have $swig_version.  You should look at http://www.swig.org" >&2;}
+                                SWIG='echo "Error: SWIG version >= $SWIG_MIN_VERSION is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
+                                has_swig="no"
+                        else
+                                SWIG_LIB=`$SWIG -swiglib`
+                                has_swig="yes"
+                        fi
+                else
+                        { echo "$as_me:$LINENO: WARNING: cannot determine SWIG version" >&5
+echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
+                        SWIG='echo "Error: Cannot determine SWIG version.  You should look at http://www.swig.org" ; false'
+                        has_swig="no"
+                fi
+        fi
+
+
+                    with_python="$has_swig"
+                fi
+            fi
+        else
+            { echo "$as_me:$LINENO: WARNING: python not found.  try --with-python=/path/to/python" >&5
+echo "$as_me: WARNING: python not found.  try --with-python=/path/to/python" >&2;}
+            with_python="no"
+        fi
+    fi
+     if test x$with_python = xyes; then
+  HAVE_PYTHON_TRUE=
+  HAVE_PYTHON_FALSE='#'
+else
+  HAVE_PYTHON_TRUE='#'
+  HAVE_PYTHON_FALSE=
+fi
+
+
+
+
+
+# Check whether --enable-more-warnings was given.
+if test "${enable_more_warnings+set}" = set; then
+  enableval=$enable_more_warnings; set_more_warnings="$enableval"
+else
+
+if test -e "$srcdir/autogen.sh"; then
+	set_more_warnings=yes
+else
+	set_more_warnings=no
+fi
+
+fi
+
+{ echo "$as_me:$LINENO: checking for more warnings" >&5
+echo $ECHO_N "checking for more warnings... $ECHO_C" >&6; }
+if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
+	{ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+	CFLAGS="\
+	-Wall \
+	-Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
+	-Wnested-externs -Wpointer-arith \
+	-Wcast-align -Wsign-compare \
+	-Werror -std=c89 \
+	$CFLAGS"
+
+	for option in -Wno-strict-aliasing -Wno-sign-compare -Wdeclaration-after-statement; do
+		SAVE_CFLAGS="$CFLAGS"
+		CFLAGS="$CFLAGS $option"
+		{ echo "$as_me:$LINENO: checking whether gcc understands $option" >&5
+echo $ECHO_N "checking whether gcc understands $option... $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;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  has_option=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	has_option=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+		if test $has_option = no; then
+			CFLAGS="$SAVE_CFLAGS"
+		fi
+		{ echo "$as_me:$LINENO: result: $has_option" >&5
+echo "${ECHO_T}$has_option" >&6; }
+		unset has_option
+		unset SAVE_CFLAGS
+	done
+	unset option
+else
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+
+
+
+
+
+ac_config_files="$ac_config_files Makefile bindings/Makefile bindings/python/gpod.i bindings/python/Makefile bindings/python/examples/Makefile bindings/python/tests/Makefile docs/Makefile docs/reference/Makefile docs/reference/version.xml m4/Makefile po/Makefile.in src/Makefile tools/Makefile tests/Makefile libgpod-1.0.pc"
+
+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
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      *) $as_unset $ac_var ;;
+      esac ;;
+    esac
+  done
+
+  (set) 2>&1 |
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      # `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"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    test "x$cache_file" != "x/dev/null" &&
+      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
+echo "$as_me: updating cache $cache_file" >&6;}
+    cat confcache >$cache_file
+  else
+    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+  ac_i=`echo "$ac_i" | sed "$ac_script"`
+  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
+  #    will be set to the directory where LIBOBJS objects are built.
+  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+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__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
+echo "$as_me: error: conditional \"am__fastdepCC\" 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
+
+  ac_config_commands="$ac_config_commands po/stamp-it"
+
+
+if test -z "${WITH_INTERNAL_GCHECKSUM_TRUE}" && test -z "${WITH_INTERNAL_GCHECKSUM_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"WITH_INTERNAL_GCHECKSUM\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"WITH_INTERNAL_GCHECKSUM\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_SGUTILS_TRUE}" && test -z "${HAVE_SGUTILS_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"HAVE_SGUTILS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"HAVE_SGUTILS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_HAL_TRUE}" && test -z "${HAVE_HAL_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"HAVE_HAL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"HAVE_HAL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_TAGLIB_TRUE}" && test -z "${HAVE_TAGLIB_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"HAVE_TAGLIB\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"HAVE_TAGLIB\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_GDKPIXBUF_TRUE}" && test -z "${HAVE_GDKPIXBUF_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"HAVE_GDKPIXBUF\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"HAVE_GDKPIXBUF\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_PYGOBJECT_TRUE}" && test -z "${HAVE_PYGOBJECT_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"HAVE_PYGOBJECT\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"HAVE_PYGOBJECT\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${ENABLE_GTK_DOC_TRUE}" && test -z "${ENABLE_GTK_DOC_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"ENABLE_GTK_DOC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"ENABLE_GTK_DOC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${GTK_DOC_USE_LIBTOOL_TRUE}" && test -z "${GTK_DOC_USE_LIBTOOL_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"GTK_DOC_USE_LIBTOOL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"GTK_DOC_USE_LIBTOOL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"HAVE_PYTHON\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"HAVE_PYTHON\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  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) >/dev/null 2>&1 && $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line after each line using $LINENO; the second 'sed'
+  # does the real work.  The second script uses 'N' to pair each
+  # line-number line with the line containing $LINENO, and appends
+  # trailing '-' during substitution so that $LINENO is not a special
+  # case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # scripts with optimization help from Paolo Bonzini.  Blame Lee
+  # E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+  case `echo 'x\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  *)   ECHO_C='\c';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir
+fi
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s='ln -s'
+  # ... but there are two gotchas:
+  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+  # In both cases, we have to default to `cp -p'.
+  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+    as_ln_s='cp -p'
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+        test -d "$1/.";
+      else
+	case $1 in
+        -*)set "./$1";;
+	esac;
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+	???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+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="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+
+# Save the log message, to keep $[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.61.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number and configuration settings, then exit
+  -q, --quiet      do not print progress messages
+  -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
+  --header=FILE[:TEMPLATE]
+		   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf at gnu.org>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.61,
+  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2006 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value.  By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=*)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  *)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    echo "$ac_cs_version"; exit ;;
+  --debug | --debu | --deb | --de | --d | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+    ac_need_defaults=false;;
+  --he | --h)
+    # Conflict between --help and --header
+    { echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; };;
+  --help | --hel | -h )
+    echo "$ac_cs_usage"; exit ;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) { echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; } ;;
+
+  *) ac_config_targets="$ac_config_targets $1"
+     ac_need_defaults=false ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+  echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+  CONFIG_SHELL=$SHELL
+  export CONFIG_SHELL
+  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+  echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
+prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir"
+INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}'
+
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    "intltool") CONFIG_COMMANDS="$CONFIG_COMMANDS intltool" ;;
+    "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+    "bindings/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/Makefile" ;;
+    "bindings/python/gpod.i") CONFIG_FILES="$CONFIG_FILES bindings/python/gpod.i" ;;
+    "bindings/python/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/python/Makefile" ;;
+    "bindings/python/examples/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/python/examples/Makefile" ;;
+    "bindings/python/tests/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/python/tests/Makefile" ;;
+    "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;;
+    "docs/reference/Makefile") CONFIG_FILES="$CONFIG_FILES docs/reference/Makefile" ;;
+    "docs/reference/version.xml") CONFIG_FILES="$CONFIG_FILES docs/reference/version.xml" ;;
+    "m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;;
+    "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
+    "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+    "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
+    "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
+    "libgpod-1.0.pc") CONFIG_FILES="$CONFIG_FILES libgpod-1.0.pc" ;;
+    "po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;;
+
+  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+  tmp=
+  trap 'exit_status=$?
+  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} ||
+{
+   echo "$me: cannot create a temporary directory in ." >&2
+   { (exit 1); exit 1; }
+}
+
+#
+# Set up the sed scripts for CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "$CONFIG_FILES"; then
+
+_ACEOF
+
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  cat >conf$$subs.sed <<_ACEOF
+SHELL!$SHELL$ac_delim
+PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
+PACKAGE_NAME!$PACKAGE_NAME$ac_delim
+PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
+PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
+PACKAGE_STRING!$PACKAGE_STRING$ac_delim
+PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
+exec_prefix!$exec_prefix$ac_delim
+prefix!$prefix$ac_delim
+program_transform_name!$program_transform_name$ac_delim
+bindir!$bindir$ac_delim
+sbindir!$sbindir$ac_delim
+libexecdir!$libexecdir$ac_delim
+datarootdir!$datarootdir$ac_delim
+datadir!$datadir$ac_delim
+sysconfdir!$sysconfdir$ac_delim
+sharedstatedir!$sharedstatedir$ac_delim
+localstatedir!$localstatedir$ac_delim
+includedir!$includedir$ac_delim
+oldincludedir!$oldincludedir$ac_delim
+docdir!$docdir$ac_delim
+infodir!$infodir$ac_delim
+htmldir!$htmldir$ac_delim
+dvidir!$dvidir$ac_delim
+pdfdir!$pdfdir$ac_delim
+psdir!$psdir$ac_delim
+libdir!$libdir$ac_delim
+localedir!$localedir$ac_delim
+mandir!$mandir$ac_delim
+DEFS!$DEFS$ac_delim
+ECHO_C!$ECHO_C$ac_delim
+ECHO_N!$ECHO_N$ac_delim
+ECHO_T!$ECHO_T$ac_delim
+LIBS!$LIBS$ac_delim
+build_alias!$build_alias$ac_delim
+host_alias!$host_alias$ac_delim
+target_alias!$target_alias$ac_delim
+LIBGPOD_SO_VERSION!$LIBGPOD_SO_VERSION$ac_delim
+LIBGPOD_MAJOR_VERSION!$LIBGPOD_MAJOR_VERSION$ac_delim
+LIBGPOD_MINOR_VERSION!$LIBGPOD_MINOR_VERSION$ac_delim
+LIBGPOD_MICRO_VERSION!$LIBGPOD_MICRO_VERSION$ac_delim
+LIBGPOD_VERSION!$LIBGPOD_VERSION$ac_delim
+INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
+INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
+INSTALL_DATA!$INSTALL_DATA$ac_delim
+am__isrc!$am__isrc$ac_delim
+CYGPATH_W!$CYGPATH_W$ac_delim
+PACKAGE!$PACKAGE$ac_delim
+VERSION!$VERSION$ac_delim
+ACLOCAL!$ACLOCAL$ac_delim
+AUTOCONF!$AUTOCONF$ac_delim
+AUTOMAKE!$AUTOMAKE$ac_delim
+AUTOHEADER!$AUTOHEADER$ac_delim
+MAKEINFO!$MAKEINFO$ac_delim
+install_sh!$install_sh$ac_delim
+STRIP!$STRIP$ac_delim
+INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim
+mkdir_p!$mkdir_p$ac_delim
+AWK!$AWK$ac_delim
+SET_MAKE!$SET_MAKE$ac_delim
+am__leading_dot!$am__leading_dot$ac_delim
+AMTAR!$AMTAR$ac_delim
+am__tar!$am__tar$ac_delim
+am__untar!$am__untar$ac_delim
+ACLOCAL_AMFLAGS!$ACLOCAL_AMFLAGS$ac_delim
+MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim
+MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim
+MAINT!$MAINT$ac_delim
+CC!$CC$ac_delim
+CFLAGS!$CFLAGS$ac_delim
+LDFLAGS!$LDFLAGS$ac_delim
+CPPFLAGS!$CPPFLAGS$ac_delim
+ac_ct_CC!$ac_ct_CC$ac_delim
+EXEEXT!$EXEEXT$ac_delim
+OBJEXT!$OBJEXT$ac_delim
+DEPDIR!$DEPDIR$ac_delim
+am__include!$am__include$ac_delim
+am__quote!$am__quote$ac_delim
+AMDEP_TRUE!$AMDEP_TRUE$ac_delim
+AMDEP_FALSE!$AMDEP_FALSE$ac_delim
+AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim
+CCDEPMODE!$CCDEPMODE$ac_delim
+am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
+am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
+CXX!$CXX$ac_delim
+CXXFLAGS!$CXXFLAGS$ac_delim
+ac_ct_CXX!$ac_ct_CXX$ac_delim
+CXXDEPMODE!$CXXDEPMODE$ac_delim
+am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim
+am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim
+SED!$SED$ac_delim
+build!$build$ac_delim
+build_cpu!$build_cpu$ac_delim
+build_vendor!$build_vendor$ac_delim
+build_os!$build_os$ac_delim
+host!$host$ac_delim
+host_cpu!$host_cpu$ac_delim
+_ACEOF
+
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
+    break
+  elif $ac_last_try; then
+    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+  ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+CEOF$ac_eof
+_ACEOF
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  cat >conf$$subs.sed <<_ACEOF
+host_vendor!$host_vendor$ac_delim
+host_os!$host_os$ac_delim
+GREP!$GREP$ac_delim
+EGREP!$EGREP$ac_delim
+CPP!$CPP$ac_delim
+LN_S!$LN_S$ac_delim
+ECHO!$ECHO$ac_delim
+AR!$AR$ac_delim
+RANLIB!$RANLIB$ac_delim
+CXXCPP!$CXXCPP$ac_delim
+F77!$F77$ac_delim
+FFLAGS!$FFLAGS$ac_delim
+ac_ct_F77!$ac_ct_F77$ac_delim
+LIBTOOL!$LIBTOOL$ac_delim
+INTLTOOL_DESKTOP_RULE!$INTLTOOL_DESKTOP_RULE$ac_delim
+INTLTOOL_DIRECTORY_RULE!$INTLTOOL_DIRECTORY_RULE$ac_delim
+INTLTOOL_KEYS_RULE!$INTLTOOL_KEYS_RULE$ac_delim
+INTLTOOL_PROP_RULE!$INTLTOOL_PROP_RULE$ac_delim
+INTLTOOL_OAF_RULE!$INTLTOOL_OAF_RULE$ac_delim
+INTLTOOL_PONG_RULE!$INTLTOOL_PONG_RULE$ac_delim
+INTLTOOL_SERVER_RULE!$INTLTOOL_SERVER_RULE$ac_delim
+INTLTOOL_SHEET_RULE!$INTLTOOL_SHEET_RULE$ac_delim
+INTLTOOL_SOUNDLIST_RULE!$INTLTOOL_SOUNDLIST_RULE$ac_delim
+INTLTOOL_UI_RULE!$INTLTOOL_UI_RULE$ac_delim
+INTLTOOL_XAM_RULE!$INTLTOOL_XAM_RULE$ac_delim
+INTLTOOL_KBD_RULE!$INTLTOOL_KBD_RULE$ac_delim
+INTLTOOL_XML_RULE!$INTLTOOL_XML_RULE$ac_delim
+INTLTOOL_XML_NOMERGE_RULE!$INTLTOOL_XML_NOMERGE_RULE$ac_delim
+INTLTOOL_CAVES_RULE!$INTLTOOL_CAVES_RULE$ac_delim
+INTLTOOL_SCHEMAS_RULE!$INTLTOOL_SCHEMAS_RULE$ac_delim
+INTLTOOL_THEME_RULE!$INTLTOOL_THEME_RULE$ac_delim
+INTLTOOL_SERVICE_RULE!$INTLTOOL_SERVICE_RULE$ac_delim
+INTLTOOL_POLICY_RULE!$INTLTOOL_POLICY_RULE$ac_delim
+XGETTEXT!$XGETTEXT$ac_delim
+MSGMERGE!$MSGMERGE$ac_delim
+MSGFMT!$MSGFMT$ac_delim
+INTLTOOL_EXTRACT!$INTLTOOL_EXTRACT$ac_delim
+INTLTOOL_MERGE!$INTLTOOL_MERGE$ac_delim
+INTLTOOL_UPDATE!$INTLTOOL_UPDATE$ac_delim
+INTLTOOL_PERL!$INTLTOOL_PERL$ac_delim
+ALL_LINGUAS!$ALL_LINGUAS$ac_delim
+DATADIRNAME!$DATADIRNAME$ac_delim
+PKG_CONFIG!$PKG_CONFIG$ac_delim
+LIBGPOD_CFLAGS!$LIBGPOD_CFLAGS$ac_delim
+LIBGPOD_LIBS!$LIBGPOD_LIBS$ac_delim
+GLIB_CFLAGS!$GLIB_CFLAGS$ac_delim
+GLIB_LIBS!$GLIB_LIBS$ac_delim
+WITH_INTERNAL_GCHECKSUM_TRUE!$WITH_INTERNAL_GCHECKSUM_TRUE$ac_delim
+WITH_INTERNAL_GCHECKSUM_FALSE!$WITH_INTERNAL_GCHECKSUM_FALSE$ac_delim
+SGUTILS_LIBS!$SGUTILS_LIBS$ac_delim
+HAVE_SGUTILS_TRUE!$HAVE_SGUTILS_TRUE$ac_delim
+HAVE_SGUTILS_FALSE!$HAVE_SGUTILS_FALSE$ac_delim
+HALCALLOUTSDIR!$HALCALLOUTSDIR$ac_delim
+HALFDIDIR!$HALFDIDIR$ac_delim
+HAL_CFLAGS!$HAL_CFLAGS$ac_delim
+HAL_LIBS!$HAL_LIBS$ac_delim
+HAVE_HAL_TRUE!$HAVE_HAL_TRUE$ac_delim
+HAVE_HAL_FALSE!$HAVE_HAL_FALSE$ac_delim
+TAGLIB_CFLAGS!$TAGLIB_CFLAGS$ac_delim
+TAGLIB_LIBS!$TAGLIB_LIBS$ac_delim
+HAVE_TAGLIB_TRUE!$HAVE_TAGLIB_TRUE$ac_delim
+HAVE_TAGLIB_FALSE!$HAVE_TAGLIB_FALSE$ac_delim
+LIBXML_CFLAGS!$LIBXML_CFLAGS$ac_delim
+LIBXML_LIBS!$LIBXML_LIBS$ac_delim
+GDKPIXBUF_CFLAGS!$GDKPIXBUF_CFLAGS$ac_delim
+GDKPIXBUF_LIBS!$GDKPIXBUF_LIBS$ac_delim
+HAVE_GDKPIXBUF_TRUE!$HAVE_GDKPIXBUF_TRUE$ac_delim
+HAVE_GDKPIXBUF_FALSE!$HAVE_GDKPIXBUF_FALSE$ac_delim
+GDKPIXBUF_REQ!$GDKPIXBUF_REQ$ac_delim
+PYGOBJECT_CFLAGS!$PYGOBJECT_CFLAGS$ac_delim
+PYGOBJECT_LIBS!$PYGOBJECT_LIBS$ac_delim
+HAVE_PYGOBJECT_TRUE!$HAVE_PYGOBJECT_TRUE$ac_delim
+HAVE_PYGOBJECT_FALSE!$HAVE_PYGOBJECT_FALSE$ac_delim
+GETTEXT_PACKAGE!$GETTEXT_PACKAGE$ac_delim
+USE_NLS!$USE_NLS$ac_delim
+MSGFMT_OPTS!$MSGFMT_OPTS$ac_delim
+GMSGFMT!$GMSGFMT$ac_delim
+CATALOGS!$CATALOGS$ac_delim
+CATOBJEXT!$CATOBJEXT$ac_delim
+GMOFILES!$GMOFILES$ac_delim
+INSTOBJEXT!$INSTOBJEXT$ac_delim
+INTLLIBS!$INTLLIBS$ac_delim
+PO_IN_DATADIR_TRUE!$PO_IN_DATADIR_TRUE$ac_delim
+PO_IN_DATADIR_FALSE!$PO_IN_DATADIR_FALSE$ac_delim
+POFILES!$POFILES$ac_delim
+POSUB!$POSUB$ac_delim
+MKINSTALLDIRS!$MKINSTALLDIRS$ac_delim
+HTML_DIR!$HTML_DIR$ac_delim
+GTKDOC_CHECK!$GTKDOC_CHECK$ac_delim
+ENABLE_GTK_DOC_TRUE!$ENABLE_GTK_DOC_TRUE$ac_delim
+ENABLE_GTK_DOC_FALSE!$ENABLE_GTK_DOC_FALSE$ac_delim
+GTK_DOC_USE_LIBTOOL_TRUE!$GTK_DOC_USE_LIBTOOL_TRUE$ac_delim
+GTK_DOC_USE_LIBTOOL_FALSE!$GTK_DOC_USE_LIBTOOL_FALSE$ac_delim
+PYTHON!$PYTHON$ac_delim
+PYTHON_VERSION!$PYTHON_VERSION$ac_delim
+PYTHON_PREFIX!$PYTHON_PREFIX$ac_delim
+PYTHON_EXEC_PREFIX!$PYTHON_EXEC_PREFIX$ac_delim
+_ACEOF
+
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
+    break
+  elif $ac_last_try; then
+    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+  ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+CEOF$ac_eof
+_ACEOF
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  cat >conf$$subs.sed <<_ACEOF
+PYTHON_PLATFORM!$PYTHON_PLATFORM$ac_delim
+pythondir!$pythondir$ac_delim
+pkgpythondir!$pkgpythondir$ac_delim
+pyexecdir!$pyexecdir$ac_delim
+pkgpyexecdir!$pkgpyexecdir$ac_delim
+PYTHON_INCLUDES!$PYTHON_INCLUDES$ac_delim
+PYTHON_LDFLAGS!$PYTHON_LDFLAGS$ac_delim
+SWIG!$SWIG$ac_delim
+SWIG_LIB!$SWIG_LIB$ac_delim
+HAVE_PYTHON_TRUE!$HAVE_PYTHON_TRUE$ac_delim
+HAVE_PYTHON_FALSE!$HAVE_PYTHON_FALSE$ac_delim
+LIBOBJS!$LIBOBJS$ac_delim
+LTLIBOBJS!$LTLIBOBJS$ac_delim
+_ACEOF
+
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 13; then
+    break
+  elif $ac_last_try; then
+    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+  ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-3.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+:end
+s/|#_!!_#|//g
+CEOF$ac_eof
+_ACEOF
+
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# 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[	 ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@srcdir@:*/:/
+s/^\([^=]*=[	 ]*\):*/\1/
+s/:*$//
+s/^[^=]*=[	 ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+fi # test -n "$CONFIG_FILES"
+
+
+for ac_tag in  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
+  esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
+echo "$as_me: error: Invalid tag $ac_tag." >&2;}
+   { (exit 1); exit 1; }; };;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
+
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$tmp/stdin";;
+      *) # Look for the file first in the build tree, then in the source tree
+	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
+	 # because $ac_f cannot contain `:'.
+	 test -f "$ac_f" ||
+	   case $ac_f in
+	   [\\/$]*) false;;
+	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+	   esac ||
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
+echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+   { (exit 1); exit 1; }; };;
+      esac
+      ac_file_inputs="$ac_file_inputs $ac_f"
+    done
+
+    # Let's still pretend it is `configure' which instantiates (i.e., don't
+    # use $as_me), people would be surprised to read:
+    #    /* config.h.  Generated by config.status.  */
+    configure_input="Generated from "`IFS=:
+	  echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    fi
+
+    case $ac_tag in
+    *:-:* | *:-) cat >"$tmp/stdin";;
+    esac
+    ;;
+  esac
+
+  ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 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
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  { as_dir="$ac_dir"
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$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'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+echo "$as_me: error: cannot create directory $as_dir" >&2;}
+   { (exit 1); exit 1; }; }; }
+  ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+  esac
+  ac_MKDIR_P=$MKDIR_P
+  case $MKDIR_P in
+  [\\/$]* | ?:[\\/]* ) ;;
+  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+  esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+
+case `sed -n '/datarootdir/ {
+  p
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p
+' $ac_file_inputs` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+  { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+  ac_datarootdir_hack='
+  s&@datadir@&$datadir&g
+  s&@docdir@&$docdir&g
+  s&@infodir@&$infodir&g
+  s&@localedir@&$localedir&g
+  s&@mandir@&$mandir&g
+    s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF
+  sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s&@configure_input@&$configure_input&;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" | sed -f "$tmp/subs-3.sed" >$tmp/out
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+  { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined." >&5
+echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined." >&2;}
+
+  rm -f "$tmp/stdin"
+  case $ac_file in
+  -) cat "$tmp/out"; rm -f "$tmp/out";;
+  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
+  esac
+ ;;
+  :H)
+  #
+  # CONFIG_HEADER
+  #
+_ACEOF
+
+# Transform confdefs.h into a sed script `conftest.defines', that
+# substitutes the proper values into config.h.in to produce config.h.
+rm -f conftest.defines conftest.tail
+# First, append a space to every undef/define line, to ease matching.
+echo 's/$/ /' >conftest.defines
+# Then, protect against being on the right side of a sed subst, or in
+# an unquoted here document, in config.status.  If some macros were
+# called several times there might be several #defines for the same
+# symbol, which is useless.  But do not sort them, since the last
+# AC_DEFINE must be honored.
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
+# NAME is the cpp macro being defined, VALUE is the value it is being given.
+# PARAMS is the parameter list in the macro definition--in most cases, it's
+# just an empty string.
+ac_dA='s,^\\([	 #]*\\)[^	 ]*\\([	 ]*'
+ac_dB='\\)[	 (].*,\\1define\\2'
+ac_dC=' '
+ac_dD=' ,'
+
+uniq confdefs.h |
+  sed -n '
+	t rset
+	:rset
+	s/^[	 ]*#[	 ]*define[	 ][	 ]*//
+	t ok
+	d
+	:ok
+	s/[\\&,]/\\&/g
+	s/^\('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
+	s/^\('"$ac_word_re"'\)[	 ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
+  ' >>conftest.defines
+
+# Remove the space that was appended to ease matching.
+# Then replace #undef with comments.  This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+# (The regexp can be short, since the line contains either #define or #undef.)
+echo 's/ $//
+s,^[	 #]*u.*,/* & */,' >>conftest.defines
+
+# Break up conftest.defines:
+ac_max_sed_lines=50
+
+# First sed command is:	 sed -f defines.sed $ac_file_inputs >"$tmp/out1"
+# Second one is:	 sed -f defines.sed "$tmp/out1" >"$tmp/out2"
+# Third one will be:	 sed -f defines.sed "$tmp/out2" >"$tmp/out1"
+# et cetera.
+ac_in='$ac_file_inputs'
+ac_out='"$tmp/out1"'
+ac_nxt='"$tmp/out2"'
+
+while :
+do
+  # Write a here document:
+    cat >>$CONFIG_STATUS <<_ACEOF
+    # First, check the format of the line:
+    cat >"\$tmp/defines.sed" <<\\CEOF
+/^[	 ]*#[	 ]*undef[	 ][	 ]*$ac_word_re[	 ]*\$/b def
+/^[	 ]*#[	 ]*define[	 ][	 ]*$ac_word_re[(	 ]/b def
+b
+:def
+_ACEOF
+  sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
+  echo 'CEOF
+    sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
+  ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
+  sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
+  grep . conftest.tail >/dev/null || break
+  rm -f conftest.defines
+  mv conftest.tail conftest.defines
+done
+rm -f conftest.defines conftest.tail
+
+echo "ac_result=$ac_in" >>$CONFIG_STATUS
+cat >>$CONFIG_STATUS <<\_ACEOF
+  if test x"$ac_file" != x-; then
+    echo "/* $configure_input  */" >"$tmp/config.h"
+    cat "$ac_result" >>"$tmp/config.h"
+    if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
+      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      rm -f $ac_file
+      mv "$tmp/config.h" $ac_file
+    fi
+  else
+    echo "/* $configure_input  */"
+    cat "$ac_result"
+  fi
+  rm -f "$tmp/out12"
+# Compute $ac_file's index in $config_headers.
+_am_arg=$ac_file
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$_am_arg" : 'X\(//\)[^/]' \| \
+	 X"$_am_arg" : 'X\(//\)$' \| \
+	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$_am_arg" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+
+  :C)  { echo "$as_me:$LINENO: executing $ac_file commands" >&5
+echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+  esac
+
+
+  case $ac_file$ac_mode in
+    "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  # Check whether this is an Automake generated Makefile or not.
+  # We used to match only the files named `Makefile.in', but
+  # some people rename them; so instead we look at the file content.
+  # Grep'ing the first line is not enough: some people post-process
+  # each Makefile.in and add a new line on top of each file to say so.
+  # Grep'ing the whole file is not good either: AIX grep has a line
+  # limit of 2048, but all sed's we know have understand at least 4000.
+  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+    dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$mf" : 'X\(//\)[^/]' \| \
+	 X"$mf" : 'X\(//\)$' \| \
+	 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  else
+    continue
+  fi
+  # 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 '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=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$file" : 'X\(//\)[^/]' \| \
+	 X"$file" : 'X\(//\)$' \| \
+	 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+    { as_dir=$dirpart/$fdir
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$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'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+echo "$as_me: error: cannot create directory $as_dir" >&2;}
+   { (exit 1); exit 1; }; }; }
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+ ;;
+    "intltool":C)
+
+for file in intltool-extract intltool-merge intltool-update; do
+  sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
+      -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
+      -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
+	< ${ac_aux_dir}/${file}.in > ${file}.out
+  if cmp -s ${file} ${file}.out 2>/dev/null; then
+    rm -f ${file}.out
+  else
+    mv -f ${file}.out ${file}
+  fi
+  chmod ugo+x ${file}
+  chmod u+w ${file}
+done
+
+ ;;
+    "default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*)
+        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
+      esac ;;
+    "po/stamp-it":C)
+    rm -f "po/stamp-it" "po/stamp-it.tmp" "po/POTFILES" "po/Makefile.tmp"
+    >"po/stamp-it.tmp"
+    sed '/^#/d
+	 s/^[[].*] *//
+	 /^[ 	]*$/d
+	'"s|^|	$ac_top_srcdir/|" \
+      "$srcdir/po/POTFILES.in" | sed '$!s/$/ \\/' >"po/POTFILES"
+
+    if test ! -f "po/Makefile"; then
+      { { echo "$as_me:$LINENO: error: po/Makefile is not ready." >&5
+echo "$as_me: error: po/Makefile is not ready." >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+    mv "po/Makefile" "po/Makefile.tmp"
+    sed '/^POTFILES =/,/[^\\]$/ {
+		/^POTFILES =/!d
+		r po/POTFILES
+	  }
+	 ' "po/Makefile.tmp" >"po/Makefile"
+    rm -f "po/Makefile.tmp"
+    mv "po/stamp-it.tmp" "po/stamp-it"
+   ;;
+
+  esac
+done # for ac_tag
+
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || { (exit 1); exit 1; }
+fi
+
+
+echo "
+Configuration for $PACKAGE $VERSION :
+--------------------------------
+
+ Host System Type .....: $host
+ Install path .........: $prefix
+ Preprocessor .........: $CC $CPPFLAGS
+ Compiler .............: $CC $CFLAGS $LIBGPOD_CFLAGS
+ Linker ...............: $CC $LDFLAGS $LIBS $LIBGPOD_LIBS
+ Artwork support ......: $have_gdkpixbuf
+ Python bindings ......: $with_python
+ PyGObject support ....: $have_pygobject
+
+ Now type 'make' to build $PACKAGE $VERSION,
+ and then 'make install' for installation.
+"
+
+if test x"$enable_libxml" = xno; then
+        echo "
+**WARNING** libxml support is disabled, libgpod won't be able to
+parse SysInfoExtended. This means it can't take advantage of the
+extensive iPod description (image formats, features, ...)
+available from that file
+"
+fi
+
+if test x"$have_gdkpixbuf" = xno; then
+        echo "
+**WARNING** gdkpixbuf support is disabled. libgpod won't be able
+to read or write artwork (covers, photos, ...) from/to the iPod
+"
+fi


Property changes on: libgpod/trunk/libgpod/branches/upstream/current/configure
___________________________________________________________________
Added: svn:executable
   + 

Added: libgpod/trunk/libgpod/branches/upstream/current/configure.ac
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/configure.ac	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/configure.ac	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,338 @@
+AC_PREREQ(2.52)
+AC_INIT(src)
+AC_CONFIG_SRCDIR(configure.ac)
+AC_CONFIG_MACRO_DIR(m4)
+
+AM_CONFIG_HEADER(config.h)
+
+# Making releases:
+#   LIBGPOD_MICRO_VERSION += 1;
+#   LIBGPOD_SO_VERSION - see comments
+#
+LIBGPOD_MAJOR_VERSION=0
+LIBGPOD_MINOR_VERSION=7
+LIBGPOD_MICRO_VERSION=2
+# If you need a modifier for the version number. 
+# Normally empty, but can be used to make "fixup" releases.
+LIBGPOD_EXTRAVERSION=
+
+LIBGPOD_VERSION=$LIBGPOD_MAJOR_VERSION.$LIBGPOD_MINOR_VERSION.$LIBGPOD_MICRO_VERSION$LIBGPOD_EXTRAVERSION
+
+dnl libtool versioning
+# +1 : 0 : +1  == adds new functions to the interface
+# +1 : 0 : 0   == changes or removes functions (changes include both
+#                 changes to the signature and the semantic)
+#  ? :+1 : ?   == just internal changes
+# CURRENT : REVISION : AGE
+LIBGPOD_SO_VERSION=5:0:1
+
+AC_SUBST(LIBGPOD_SO_VERSION)
+AC_SUBST(LIBGPOD_MAJOR_VERSION)
+AC_SUBST(LIBGPOD_MINOR_VERSION)
+AC_SUBST(LIBGPOD_MICRO_VERSION)
+AC_SUBST(LIBGPOD_VERSION)
+
+AM_INIT_AUTOMAKE(libgpod, $LIBGPOD_VERSION)
+
+dnl make sure we keep ACLOCAL_FLAGS around for maintainer builds to work
+AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS")
+
+AM_MAINTAINER_MODE
+
+AC_GNU_SOURCE
+AC_PROG_CC
+AM_PROG_CC_C_O
+
+# AC_PROG_CXX is only needed for the test program tests/test-rebuild-db.cc.
+# You can safely remove AC_PROG_CXX and the test program (edit tests/Makefile.am)
+# if you should run into problems.
+AC_PROG_CXX
+
+AC_PROG_LD
+AC_STDC_HEADERS
+AC_PROG_INSTALL
+AC_PROG_LIBTOOL
+AC_PROG_LN_S
+AC_PROG_MAKE_SET
+AC_PROG_INTLTOOL([0.21])
+
+AC_CHECK_FUNCS([localtime_r])
+AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,,[#include <time.h>])
+PKG_CHECK_MODULES(LIBGPOD, glib-2.0 >= 2.8.0 gobject-2.0)
+
+dnl **************************************************
+dnl we've copied gchecksum from glib 2.16. Only use the
+dnl copy if the version of glib on the system does not
+dnl provide it.
+dnl **************************************************
+
+AC_ARG_WITH(internal-gchecksum,
+            AC_HELP_STRING([--with-internal-gchecksum],
+                           [Build using internal copy of gchecksum]),,
+                           with_internal_gchecksum=no)
+
+if test "x$with_internal_gchecksum" = "xno"; then
+        PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16.0, with_internal_gchecksum=no,
+                          with_internal_gchecksum=yes)
+fi
+
+AM_CONDITIONAL(WITH_INTERNAL_GCHECKSUM, test "x$with_internal_gchecksum" = "xyes")
+
+dnl **************************************************
+dnl * sgutils is necessary to get the xml device file from the ipod
+dnl **************************************************
+AC_CHECK_LIB(sgutils2, sg_ll_inquiry,
+             [SGUTILS_LIBS="-lsgutils2"; have_sgutils=yes],
+             have_sgutils=no)
+if test "x$have_sgutils" != xyes; then
+    AC_CHECK_LIB(sgutils, sg_ll_inquiry,
+                 [SGUTILS_LIBS="-lsgutils"; have_sgutils=yes],
+                 have_sgutils=no)
+fi
+AC_SUBST(SGUTILS_LIBS)
+AM_CONDITIONAL(HAVE_SGUTILS, test x"$have_sgutils" = xyes)
+
+dnl ***********************************************************************
+dnl * HAL is optional, but is required if you want things to "just work"
+dnl * when a recent iPod is plugged in
+dnl * libgpod by itself doesn't use HAL at all, HAL is just used to build a 
+dnl * helper program which is then installed as a HAL callout
+dnl ***********************************************************************
+AC_ARG_WITH(hal, AC_HELP_STRING([--without-hal],
+        [Disable HAL support]))
+
+hal_callouts_dir="`$PKG_CONFIG --variable libdir hal`/hal/scripts"
+AC_ARG_WITH(hal_callouts_dir, AC_HELP_STRING([--with-hal-callouts-dir=DIR],
+	[Directory where HAL expects its callout scripts to be located]),,
+	with_hal_callouts_dir="$hal_callouts_dir")
+HALCALLOUTSDIR="$with_hal_callouts_dir"
+AC_SUBST(HALCALLOUTSDIR)
+
+hal_fdi_dir="`$PKG_CONFIG --variable prefix hal`/share/hal/fdi"
+AC_ARG_WITH(hal_fdi_dir, AC_HELP_STRING([--with-hal-fdi-dir=DIR],
+	[Directory where HAL expects its fdi files to be located]),,
+	with_hal_fdi_dir="$hal_fdi_dir")
+HALFDIDIR="$with_hal_fdi_dir"
+AC_SUBST(HALFDIDIR)
+
+if test "x$with_hal" != "xno"; then
+  PKG_CHECK_MODULES(HAL, hal >= 0.5 hal < 0.6, enable_hal=yes, enable_hal=no)
+  if test "x$enable_hal" != "xyes" -a "x$with_hal" = "xyes"; then
+      AC_MSG_ERROR([HAL support explicitly requested but HAL couldn't be found])
+  fi
+
+  if test "x$enable_hal" = "xyes"; then
+        AC_DEFINE(HAVE_HAL, 1, [Define if you have HAL support])
+        AC_SUBST(HAL_CFLAGS)
+	AC_SUBST(HAL_LIBS)
+  fi
+fi
+AM_CONDITIONAL(HAVE_HAL, test x"$enable_hal" = xyes)
+
+
+
+dnl **************************************************
+dnl * TagLib is only used by test-rebuild-db 
+dnl **************************************************
+PKG_CHECK_MODULES(TAGLIB, taglib, have_taglib=yes, have_taglib=no)
+if test x"$have_taglib" = xyes; then
+   AH_TEMPLATE([HAVE_TAGLIB], [Whether TagLib is installed, it's only used in a test program])
+   AC_DEFINE_UNQUOTED(HAVE_TAGLIB, 1)
+fi
+AC_SUBST(TAGLIB_CFLAGS)
+AC_SUBST(TAGLIB_LIBS)
+AM_CONDITIONAL(HAVE_TAGLIB, test x"$have_taglib" = xyes)
+
+dnl **************************************************
+dnl * libxml is used to parse the plist files (aka SysInfoExtended)
+dnl **************************************************
+AC_ARG_ENABLE(libxml, [AC_HELP_STRING([--disable-libxml],[SysInfoExtended won't be parsed])], 
+[case "${enableval}" in
+  no) enable_libxml=no ;;
+  *) enable_libxml=yes;;
+esac])
+AH_TEMPLATE([HAVE_LIBXML], [Whether libxml is installed, it's used to parse SysInfoExtended])
+if test x$enable_libxml != xno; then
+   PKG_CHECK_MODULES(LIBXML, libxml-2.0)
+   AC_DEFINE_UNQUOTED(HAVE_LIBXML, 1)
+   LIBGPOD_CFLAGS="$LIBGPOD_CFLAGS $LIBXML_CFLAGS"
+   LIBGPOD_LIBS="$LIBGPOD_LIBS $LIBXML_LIBS"
+fi
+
+dnl **************************************************
+dnl * GDKPIXBUF is optional
+dnl **************************************************
+AC_ARG_ENABLE(gdk-pixbuf, [AC_HELP_STRING([--disable-gdk-pixbuf],[ArtworkDB will be disabled without gdk-pixbuf])], 
+[case "${enableval}" in
+  no) enable_gdkpixbuf=no ;;
+  *) enable_gdkpixbuf=yes;;
+esac])
+AH_TEMPLATE([HAVE_GDKPIXBUF], [Whether gdk-pixbuf is installed, ArtworkDB writing support will be disabled if it can't be found])
+if test x$enable_gdkpixbuf != xno; then
+   GDKPIXBUF_REQ="gdk-pixbuf-2.0"
+   PKG_CHECK_MODULES(GDKPIXBUF, $GDKPIXBUF_REQ >= 2.6.0, have_gdkpixbuf=yes, have_gdkpixbuf=no)
+   if test x"$enable_gdkpixbuf" = xyes -a x"$have_gdkpixbuf" = xno; then
+      AC_MSG_ERROR([gdk-pixbuf support explicitly requested but gdk-pixbuf couldn't be found])
+   fi
+fi
+if test x"$have_gdkpixbuf" = xyes; then
+   AC_DEFINE_UNQUOTED(HAVE_GDKPIXBUF, 1)
+   LIBGPOD_CFLAGS="$LIBGPOD_CFLAGS $GDKPIXBUF_CFLAGS"
+   LIBGPOD_LIBS="$LIBGPOD_LIBS $GDKPIXBUF_LIBS"
+else
+   have_gdkpixbuf=no
+   GDKPIXBUF_REQ=""
+fi
+AM_CONDITIONAL(HAVE_GDKPIXBUF, test x"$have_gdkpixbuf" = xyes)
+AC_SUBST(GDKPIXBUF_REQ)
+
+dnl **************************************************
+dnl * PYGOBJECT is optional
+dnl **************************************************
+
+AC_ARG_ENABLE(pygobject, [AC_HELP_STRING([--disable-pygobject],[Python API will lack GdkPixbuf support without PyGOBJECT])], 
+[case "${enableval}" in
+  no) enable_pygobject=no ;;
+  *) enable_pygobject=yes;;
+esac])
+AH_TEMPLATE([HAVE_PYGOBJECT], [Whether pygobject is installed, Python API will lack GdkPixbuf support without PyGOBJECT])
+if test x$enable_pygobject != xno; then
+   PKG_CHECK_MODULES(PYGOBJECT, pygobject-2.0 >= 2.8.0, have_pygobject=yes, have_pygobject=no)
+   if test x"$enable_pygobject" = xyes -a x"$have_pygobject" = xno; then
+      AC_MSG_ERROR([pygobject support explicitly requested but pygobject couldn't be found])
+   fi
+fi
+if test x"$have_pygobject" = xyes; then
+   AC_DEFINE_UNQUOTED(HAVE_PYGOBJECT, 1)
+else
+   have_pygobject=no
+fi
+AM_CONDITIONAL(HAVE_PYGOBJECT, test x"$have_pygobject" = xyes)
+AC_SUBST(PYGOBJECT_CFLAGS)
+AC_SUBST(PYGOBJECT_LIBS)
+
+dnl **************************************************
+dnl * internationalization support
+dnl **************************************************
+ALL_LINGUAS="de es fr he it ja ro sv zh_CN"
+
+GETTEXT_PACKAGE=libgpod
+AC_SUBST(GETTEXT_PACKAGE)
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
+
+AM_GLIB_GNU_GETTEXT
+
+
+dnl **************************************************
+dnl * gtk-doc
+dnl **************************************************
+GTK_DOC_CHECK(1.0)
+
+dnl **************************************************
+dnl * optional python bindings
+dnl **************************************************
+
+PYTHON_MIN_VERSION=2.1.1
+PYTHON_MUTAGEN_MIN_VERSION=1.8
+SWIG_MIN_VERSION=1.3.24
+LIBGPOD_CHECK_PYTHON($PYTHON_MIN_VERSION)
+
+
+dnl warnings bits, copied from gnome-keyring configure.in
+dnl Turn on the additional warnings last, so -Werror doesn't affect other tests.
+
+AC_ARG_ENABLE(more-warnings,
+[  --enable-more-warnings  Maximum compiler warnings],
+set_more_warnings="$enableval",[
+if test -e "$srcdir/autogen.sh"; then
+	set_more_warnings=yes
+else
+	set_more_warnings=no
+fi
+])
+AC_MSG_CHECKING(for more warnings, including -Werror)
+if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
+	AC_MSG_RESULT(yes)
+	CFLAGS="\
+	-Wall \
+	-Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
+	-Wnested-externs -Wpointer-arith \
+	-Wcast-align -Wsign-compare \
+	-Werror -std=c89 \
+	$CFLAGS"
+
+	for option in -Wno-strict-aliasing -Wno-sign-compare -Wdeclaration-after-statement; do
+		SAVE_CFLAGS="$CFLAGS"
+		CFLAGS="$CFLAGS $option"
+		AC_MSG_CHECKING([whether gcc understands $option])
+		AC_TRY_COMPILE([], [],
+			has_option=yes,
+			has_option=no,)
+		if test $has_option = no; then
+			CFLAGS="$SAVE_CFLAGS"
+		fi
+		AC_MSG_RESULT($has_option)
+		unset has_option
+		unset SAVE_CFLAGS
+	done
+	unset option
+else
+	AC_MSG_RESULT(no)
+fi
+
+AC_SUBST(CFLAGS)
+AC_SUBST(CPPFLAGS)
+AC_SUBST(LDFLAGS)
+AC_SUBST(LIBGPOD_CFLAGS)
+AC_SUBST(LIBGPOD_LIBS)
+
+AC_OUTPUT([
+Makefile
+bindings/Makefile
+bindings/python/gpod.i
+bindings/python/Makefile
+bindings/python/examples/Makefile
+bindings/python/tests/Makefile
+docs/Makefile
+docs/reference/Makefile
+docs/reference/version.xml
+m4/Makefile
+po/Makefile.in
+src/Makefile
+tools/Makefile
+tests/Makefile
+libgpod-1.0.pc
+])
+
+echo "
+Configuration for $PACKAGE $VERSION :
+--------------------------------
+
+ Host System Type .....: $host
+ Install path .........: $prefix
+ Preprocessor .........: $CC $CPPFLAGS
+ Compiler .............: $CC $CFLAGS $LIBGPOD_CFLAGS
+ Linker ...............: $CC $LDFLAGS $LIBS $LIBGPOD_LIBS
+ Artwork support ......: $have_gdkpixbuf
+ Python bindings ......: $with_python
+ PyGObject support ....: $have_pygobject
+
+ Now type 'make' to build $PACKAGE $VERSION,
+ and then 'make install' for installation.
+"
+
+if test x"$enable_libxml" = xno; then
+        echo "
+**WARNING** libxml support is disabled, libgpod won't be able to 
+parse SysInfoExtended. This means it can't take advantage of the 
+extensive iPod description (image formats, features, ...) 
+available from that file
+"
+fi
+
+if test x"$have_gdkpixbuf" = xno; then
+        echo "
+**WARNING** gdkpixbuf support is disabled. libgpod won't be able
+to read or write artwork (covers, photos, ...) from/to the iPod
+"
+fi

Added: libgpod/trunk/libgpod/branches/upstream/current/depcomp
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/depcomp	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/depcomp	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,589 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2007-03-29.01
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 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., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva at dcc.unicamp.br>.
+
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+  depmode     Dependency tracking mode.
+  source      Source file read by `PROGRAMS ARGS'.
+  object      Object file output by `PROGRAMS ARGS'.
+  DEPDIR      directory where to store dependencies.
+  depfile     Dependency file to output.
+  tmpdepfile  Temporary file to use when outputing dependencies.
+  libtool     Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake at gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "depcomp $scriptversion"
+    exit $?
+    ;;
+esac
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+  echo "depcomp: Variables source, object and depmode must be set" 1>&2
+  exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags.  We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write.  Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+  # HP compiler uses -M and no extra arg.
+  gccflag=-M
+  depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+   # This is just like dashmstdout with a different argument.
+   dashmflag=-xM
+   depmode=dashmstdout
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff.  Hmm.
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am.  Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+  for arg
+  do
+    case $arg in
+    -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+    *)  set fnord "$@" "$arg" ;;
+    esac
+    shift # fnord
+    shift # $arg
+  done
+  "$@"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  mv "$tmpdepfile" "$depfile"
+  ;;
+
+gcc)
+## There are various ways to get dependency output from gcc.  Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+##   up in a subdir.  Having to rename by hand is ugly.
+##   (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+##   -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+##   than renaming).
+  if test -z "$gccflag"; then
+    gccflag=-MD,
+  fi
+  "$@" -Wp,"$gccflag$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+  sed -e 's/^[^:]*: / /' \
+      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header).  We avoid this by adding
+## dummy dependencies for each header file.  Too bad gcc doesn't do
+## this for us directly.
+  tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'.  On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+sgi)
+  if test "$libtool" = yes; then
+    "$@" "-Wp,-MDupdate,$tmpdepfile"
+  else
+    "$@" -MDupdate "$tmpdepfile"
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+
+  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
+    echo "$object : \\" > "$depfile"
+
+    # Clip off the initial element (the dependent).  Don't try to be
+    # clever and replace this with sed code, as IRIX sed won't handle
+    # lines with more than a fixed number of characters (4096 in
+    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
+    # the IRIX cc adds comments like `#:fec' to the end of the
+    # dependency line.
+    tr ' ' '
+' < "$tmpdepfile" \
+    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+    tr '
+' ' ' >> $depfile
+    echo >> $depfile
+
+    # The second pass generates a dummy entry for each header file.
+    tr ' ' '
+' < "$tmpdepfile" \
+   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+   >> $depfile
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+aix)
+  # The C for AIX Compiler uses -M and outputs the dependencies
+  # in a .u file.  In older versions, this file always lives in the
+  # current directory.  Also, the AIX compiler puts `$object:' at the
+  # start of each line; $object doesn't have directory information.
+  # Version 6 uses the directory in both cases.
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$base.u
+    tmpdepfile3=$dir.libs/$base.u
+    "$@" -Wc,-M
+  else
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$dir$base.u
+    tmpdepfile3=$dir$base.u
+    "$@" -M
+  fi
+  stat=$?
+
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+    exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  if test -f "$tmpdepfile"; then
+    # 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,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+    # That's a tab and a space in the [].
+    sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+icc)
+  # Intel's C compiler understands `-MD -MF file'.  However on
+  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+  # ICC 7.0 will fill foo.d with something like
+  #    foo.o: sub/foo.c
+  #    foo.o: sub/foo.h
+  # which is wrong.  We want:
+  #    sub/foo.o: sub/foo.c
+  #    sub/foo.o: sub/foo.h
+  #    sub/foo.c:
+  #    sub/foo.h:
+  # ICC 7.1 will output
+  #    foo.o: sub/foo.c sub/foo.h
+  # and will wrap long lines using \ :
+  #    foo.o: sub/foo.c ... \
+  #     sub/foo.h ... \
+  #     ...
+
+  "$@" -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',
+  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+  # Do two passes, one to just change these to
+  # `$object: dependent.h' and one to simply `dependent.h:'.
+  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process this invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+    sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp2)
+  # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+  # compilers, which have integrated preprocessors.  The correct option
+  # to use with these is +Maked; it writes dependencies to a file named
+  # 'foo.d', which lands next to the object file, wherever that
+  # happens to be.
+  # Much of this is similar to the tru64 case; see comments there.
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir.libs/$base.d
+    "$@" -Wc,+Maked
+  else
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir$base.d
+    "$@" +Maked
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+     rm -f "$tmpdepfile1" "$tmpdepfile2"
+     exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  if test -f "$tmpdepfile"; then
+    sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+    # Add `dependent.h:' lines.
+    sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
+  else
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile" "$tmpdepfile2"
+  ;;
+
+tru64)
+   # The Tru64 compiler uses -MD to generate dependencies as a side
+   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+   # dependencies in `foo.d' instead, so we check for that too.
+   # Subdirectories are respected.
+   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+   test "x$dir" = "x$object" && dir=
+   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+   if test "$libtool" = yes; then
+      # With Tru64 cc, shared objects can also be used to make a
+      # static library.  This mechanism is used in libtool 1.4 series to
+      # handle both shared and static libraries in a single compilation.
+      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+      #
+      # With libtool 1.5 this exception was removed, and libtool now
+      # generates 2 separate objects for the 2 libraries.  These two
+      # compilations output dependencies in $dir.libs/$base.o.d and
+      # in $dir$base.o.d.  We have to check for both files, because
+      # one of the two compilations can be disabled.  We should prefer
+      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+      # automatically cleaned when .libs/ is deleted, while ignoring
+      # the former would cause a distcleancheck panic.
+      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
+      tmpdepfile2=$dir$base.o.d          # libtool 1.5
+      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
+      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
+      "$@" -Wc,-MD
+   else
+      tmpdepfile1=$dir$base.o.d
+      tmpdepfile2=$dir$base.d
+      tmpdepfile3=$dir$base.d
+      tmpdepfile4=$dir$base.d
+      "$@" -MD
+   fi
+
+   stat=$?
+   if test $stat -eq 0; then :
+   else
+      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+      exit $stat
+   fi
+
+   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+   do
+     test -f "$tmpdepfile" && break
+   done
+   if test -f "$tmpdepfile"; then
+      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+      # That's a tab and a space in the [].
+      sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+   else
+      echo "#dummy" > "$depfile"
+   fi
+   rm -f "$tmpdepfile"
+   ;;
+
+#nosideeffect)
+  # This comment above is used by automake to tell side-effect
+  # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  test -z "$dashmflag" && dashmflag=-M
+  # Require at least two characters before searching for `:'
+  # in the target name.  This is to cope with DOS-style filenames:
+  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+  "$@" $dashmflag |
+    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+dashXmstdout)
+  # This case only exists to satisfy depend.m4.  It is never actually
+  # run, as this mode is specially recognized in the preamble.
+  exit 1
+  ;;
+
+makedepend)
+  "$@" || exit $?
+  # Remove any Libtool call
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+  # X makedepend
+  shift
+  cleared=no
+  for arg in "$@"; do
+    case $cleared in
+    no)
+      set ""; shift
+      cleared=yes ;;
+    esac
+    case "$arg" in
+    -D*|-I*)
+      set fnord "$@" "$arg"; shift ;;
+    # Strip any option that makedepend may not understand.  Remove
+    # the object too, otherwise makedepend will parse it as a source file.
+    -*|$object)
+      ;;
+    *)
+      set fnord "$@" "$arg"; shift ;;
+    esac
+  done
+  obj_suffix="`echo $object | sed 's/^.*\././'`"
+  touch "$tmpdepfile"
+  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile" "$tmpdepfile".bak
+  ;;
+
+cpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  "$@" -E |
+    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+       -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+    sed '$ s: \\$::' > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  cat < "$tmpdepfile" >> "$depfile"
+  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvisualcpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o,
+  # because we must use -o when running libtool.
+  "$@" || exit $?
+  IFS=" "
+  for arg
+  do
+    case "$arg" in
+    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+	set fnord "$@"
+	shift
+	shift
+	;;
+    *)
+	set fnord "$@" "$arg"
+	shift
+	shift
+	;;
+    esac
+  done
+  "$@" -E |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile"
+  echo "	" >> "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+none)
+  exec "$@"
+  ;;
+
+*)
+  echo "Unknown depmode $depmode" 1>&2
+  exit 1
+  ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:


Property changes on: libgpod/trunk/libgpod/branches/upstream/current/depcomp
___________________________________________________________________
Added: svn:executable
   + 

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/Makefile.am
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/Makefile.am	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/Makefile.am	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1 @@
+SUBDIRS=reference

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/Makefile.in
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/Makefile.in	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/Makefile.in	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,564 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  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@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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 = docs
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \
+	$(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/python.m4 \
+	$(top_srcdir)/m4/swig.m4 $(top_srcdir)/configure.ac
+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 =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+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@
+GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@
+GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@
+GDKPIXBUF_REQ = @GDKPIXBUF_REQ@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+HALCALLOUTSDIR = @HALCALLOUTSDIR@
+HALFDIDIR = @HALFDIDIR@
+HAL_CFLAGS = @HAL_CFLAGS@
+HAL_LIBS = @HAL_LIBS@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
+INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
+INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
+INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
+INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
+INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
+INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
+INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
+INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@
+INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
+INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
+INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
+INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
+INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
+INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
+LDFLAGS = @LDFLAGS@
+LIBGPOD_CFLAGS = @LIBGPOD_CFLAGS@
+LIBGPOD_LIBS = @LIBGPOD_LIBS@
+LIBGPOD_MAJOR_VERSION = @LIBGPOD_MAJOR_VERSION@
+LIBGPOD_MICRO_VERSION = @LIBGPOD_MICRO_VERSION@
+LIBGPOD_MINOR_VERSION = @LIBGPOD_MINOR_VERSION@
+LIBGPOD_SO_VERSION = @LIBGPOD_SO_VERSION@
+LIBGPOD_VERSION = @LIBGPOD_VERSION@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_LIBS = @LIBXML_LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+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@
+PKG_CONFIG = @PKG_CONFIG@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+PYGOBJECT_CFLAGS = @PYGOBJECT_CFLAGS@
+PYGOBJECT_LIBS = @PYGOBJECT_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SGUTILS_LIBS = @SGUTILS_LIBS@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SWIG = @SWIG@
+SWIG_LIB = @SWIG_LIB@
+TAGLIB_CFLAGS = @TAGLIB_CFLAGS@
+TAGLIB_LIBS = @TAGLIB_LIBS@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+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@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = reference
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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) --gnu  docs/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  docs/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+# 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):
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	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) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	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) \
+	  || eval $$failcom; \
+	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; nonemtpy = 1; } \
+	      END { if (nonempty) { 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; nonempty = 1; } \
+	      END { if (nonempty) { 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=; \
+	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; nonempty = 1; } \
+	      END { if (nonempty) { 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)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    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" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+	        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_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-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-info: install-info-recursive
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-ps: install-ps-recursive
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f Makefile
+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:
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+	install-strip
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am check check-am clean clean-generic clean-libtool \
+	ctags ctags-recursive distclean 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-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-man install-pdf install-pdf-am \
+	install-ps install-ps-am install-strip installcheck \
+	installcheck-am installdirs installdirs-am maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+	uninstall uninstall-am
+
+# 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:

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/Makefile.am
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/Makefile.am	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/Makefile.am	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,84 @@
+## Process this file with automake to produce Makefile.in
+
+# We require automake 1.6 at least.
+AUTOMAKE_OPTIONS = 1.6
+
+# This is a blank Makefile.am for using gtk-doc.
+# Copy this to your project's API docs directory and modify the variables to
+# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples
+# of using the various options.
+
+# The name of the module, e.g. 'glib'.
+DOC_MODULE=libgpod
+
+# The top-level SGML file. You can change this if you want to.
+DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.xml
+
+# The directory containing the source code. Relative to $(srcdir).
+# gtk-doc will search all .c & .h files beneath here for inline comments
+# documenting the functions and macros.
+# e.g. DOC_SOURCE_DIR=../../../gtk
+DOC_SOURCE_DIR=../../src
+
+# Extra options to pass to gtkdoc-scangobj. Not normally needed.
+SCANGOBJ_OPTIONS=
+
+# Extra options to supply to gtkdoc-scan.
+# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" 
+SCAN_OPTIONS=--deprecated-guards="LIBGPOD_DISABLE_DEPRECATED"
+
+# Extra options to supply to gtkdoc-mkdb.
+# e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml
+MKDB_OPTIONS=--sgml-mode --output-format=xml
+
+# Extra options to supply to gtkdoc-mktmpl
+# e.g. MKTMPL_OPTIONS=--only-section-tmpl
+MKTMPL_OPTIONS=
+
+# Extra options to supply to gtkdoc-fixref. Not normally needed.
+# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html
+FIXXREF_OPTIONS=
+
+# Used for dependencies. The docs will be rebuilt if any of these change.
+# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
+# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
+HFILE_GLOB=$(top_srcdir)/src/*.h
+CFILE_GLOB=$(top_srcdir)/src/*.c
+
+# Header files to ignore when scanning.
+# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
+IGNORE_HFILES=
+
+# Images to copy into HTML directory.
+# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
+HTML_IMAGES=
+
+# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
+# e.g. content_files=running.sgml building.sgml changes-2.0.sgml
+content_files=
+
+# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded
+# These files must be listed here *and* in content_files
+# e.g. expand_content_files=running.sgml
+expand_content_files=
+
+# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library.
+# Only needed if you are using gtkdoc-scangobj to dynamically query widget
+# signals and properties.
+# e.g. INCLUDES=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
+# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
+INCLUDES=
+GTKDOC_LIBS=
+
+# This includes the standard gtk-doc make rules, copied by gtkdocize.
+include $(top_srcdir)/gtk-doc.make
+
+# Other files to distribute
+EXTRA_DIST += version.xml.in
+
+# Build the documentation when creating tarballs
+dist-hook-local:
+	$(MAKE) all
+
+uninstall-hook:
+	-rmdir --ignore-fail-on-non-empty $(DESTDIR)$(TARGET_DIR)

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/Makefile.in
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/Makefile.in	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/Makefile.in	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,655 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  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@
+
+# -*- mode: makefile -*-
+
+####################################
+# Everything below here is generic #
+####################################
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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@
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(srcdir)/version.xml.in $(top_srcdir)/gtk-doc.make
+subdir = docs/reference
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \
+	$(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/python.m4 \
+	$(top_srcdir)/m4/swig.m4 $(top_srcdir)/configure.ac
+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 = version.xml
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+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@
+GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@
+GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@
+GDKPIXBUF_REQ = @GDKPIXBUF_REQ@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+HALCALLOUTSDIR = @HALCALLOUTSDIR@
+HALFDIDIR = @HALFDIDIR@
+HAL_CFLAGS = @HAL_CFLAGS@
+HAL_LIBS = @HAL_LIBS@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
+INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
+INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
+INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
+INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
+INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
+INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
+INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
+INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@
+INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
+INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
+INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
+INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
+INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
+INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
+LDFLAGS = @LDFLAGS@
+LIBGPOD_CFLAGS = @LIBGPOD_CFLAGS@
+LIBGPOD_LIBS = @LIBGPOD_LIBS@
+LIBGPOD_MAJOR_VERSION = @LIBGPOD_MAJOR_VERSION@
+LIBGPOD_MICRO_VERSION = @LIBGPOD_MICRO_VERSION@
+LIBGPOD_MINOR_VERSION = @LIBGPOD_MINOR_VERSION@
+LIBGPOD_SO_VERSION = @LIBGPOD_SO_VERSION@
+LIBGPOD_VERSION = @LIBGPOD_VERSION@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_LIBS = @LIBXML_LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+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@
+PKG_CONFIG = @PKG_CONFIG@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+PYGOBJECT_CFLAGS = @PYGOBJECT_CFLAGS@
+PYGOBJECT_LIBS = @PYGOBJECT_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SGUTILS_LIBS = @SGUTILS_LIBS@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SWIG = @SWIG@
+SWIG_LIB = @SWIG_LIB@
+TAGLIB_CFLAGS = @TAGLIB_CFLAGS@
+TAGLIB_LIBS = @TAGLIB_LIBS@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+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@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# We require automake 1.6 at least.
+AUTOMAKE_OPTIONS = 1.6
+
+# This is a blank Makefile.am for using gtk-doc.
+# Copy this to your project's API docs directory and modify the variables to
+# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples
+# of using the various options.
+
+# The name of the module, e.g. 'glib'.
+DOC_MODULE = libgpod
+
+# The top-level SGML file. You can change this if you want to.
+DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.xml
+
+# The directory containing the source code. Relative to $(srcdir).
+# gtk-doc will search all .c & .h files beneath here for inline comments
+# documenting the functions and macros.
+# e.g. DOC_SOURCE_DIR=../../../gtk
+DOC_SOURCE_DIR = ../../src
+
+# Extra options to pass to gtkdoc-scangobj. Not normally needed.
+SCANGOBJ_OPTIONS = 
+
+# Extra options to supply to gtkdoc-scan.
+# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" 
+SCAN_OPTIONS = --deprecated-guards="LIBGPOD_DISABLE_DEPRECATED"
+
+# Extra options to supply to gtkdoc-mkdb.
+# e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml
+MKDB_OPTIONS = --sgml-mode --output-format=xml
+
+# Extra options to supply to gtkdoc-mktmpl
+# e.g. MKTMPL_OPTIONS=--only-section-tmpl
+MKTMPL_OPTIONS = 
+
+# Extra options to supply to gtkdoc-fixref. Not normally needed.
+# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html
+FIXXREF_OPTIONS = 
+
+# Used for dependencies. The docs will be rebuilt if any of these change.
+# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
+# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
+HFILE_GLOB = $(top_srcdir)/src/*.h
+CFILE_GLOB = $(top_srcdir)/src/*.c
+
+# Header files to ignore when scanning.
+# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
+IGNORE_HFILES = 
+
+# Images to copy into HTML directory.
+# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
+HTML_IMAGES = 
+
+# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
+# e.g. content_files=running.sgml building.sgml changes-2.0.sgml
+content_files = 
+
+# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded
+# These files must be listed here *and* in content_files
+# e.g. expand_content_files=running.sgml
+expand_content_files = 
+
+# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library.
+# Only needed if you are using gtkdoc-scangobj to dynamically query widget
+# signals and properties.
+# e.g. INCLUDES=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
+# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
+INCLUDES = 
+GTKDOC_LIBS = 
+ at GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS)
+ at GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS)
+ at GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS)
+ at GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS)
+
+# We set GPATH here; this gives us semantics for GNU make
+# which are more like other make's VPATH, when it comes to
+# whether a source that is a target of one rule is then
+# searched for in VPATH/GPATH.
+#
+GPATH = $(srcdir)
+TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE)
+
+# This includes the standard gtk-doc make rules, copied by gtkdocize.
+
+# Other files to distribute
+EXTRA_DIST = $(content_files) $(HTML_IMAGES) $(DOC_MAIN_SGML_FILE) \
+	$(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt \
+	version.xml.in
+DOC_STAMPS = scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
+	   $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
+
+SCANOBJ_FILES = \
+	$(DOC_MODULE).args 	 \
+	$(DOC_MODULE).hierarchy  \
+	$(DOC_MODULE).interfaces \
+	$(DOC_MODULE).prerequisites \
+	$(DOC_MODULE).signals
+
+REPORT_FILES = \
+	$(DOC_MODULE)-undocumented.txt \
+	$(DOC_MODULE)-undeclared.txt \
+	$(DOC_MODULE)-unused.txt
+
+CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS)
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/gtk-doc.make $(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) --gnu  docs/reference/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  docs/reference/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+version.xml: $(top_builddir)/config.status $(srcdir)/version.xml.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    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
+	$(MAKE) $(AM_MAKEFLAGS) \
+	  top_distdir="$(top_distdir)" distdir="$(distdir)" \
+	  dist-hook
+check-am: all-am
+check: check-am
+all-am: Makefile all-local
+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_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+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-libtool clean-local mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-local
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-data-local
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic \
+	maintainer-clean-local
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-local
+	@$(NORMAL_INSTALL)
+	$(MAKE) $(AM_MAKEFLAGS) uninstall-hook
+
+.MAKE: install-am install-strip uninstall-am
+
+.PHONY: all all-am all-local check check-am clean clean-generic \
+	clean-libtool clean-local dist-hook distclean \
+	distclean-generic distclean-libtool distclean-local distdir \
+	dvi dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-data-local install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic \
+	maintainer-clean-local mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
+	uninstall-hook uninstall-local
+
+
+ at ENABLE_GTK_DOC_TRUE@all-local: html-build.stamp
+ at ENABLE_GTK_DOC_FALSE@all-local:
+
+docs: html-build.stamp
+
+#### scan ####
+
+scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
+	@echo 'gtk-doc: Scanning header files'
+	@-chmod -R u+w $(srcdir)
+	cd $(srcdir) && \
+	  gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
+	if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \
+	    CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
+	else \
+	    cd $(srcdir) ; \
+	    for i in $(SCANOBJ_FILES) ; do \
+               test -f $$i || touch $$i ; \
+	    done \
+	fi
+	touch scan-build.stamp
+
+$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp
+	@true
+
+#### templates ####
+
+tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
+	@echo 'gtk-doc: Rebuilding template files'
+	@-chmod -R u+w $(srcdir)
+	cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS)
+	touch tmpl-build.stamp
+
+tmpl.stamp: tmpl-build.stamp
+	@true
+
+tmpl/*.sgml:
+	@true
+
+#### xml ####
+
+sgml-build.stamp: tmpl.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files)
+	@echo 'gtk-doc: Building XML'
+	@-chmod -R u+w $(srcdir)
+	cd $(srcdir) && \
+	gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
+	touch sgml-build.stamp
+
+sgml.stamp: sgml-build.stamp
+	@true
+
+#### html ####
+
+html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
+	@echo 'gtk-doc: Building HTML'
+	@-chmod -R u+w $(srcdir)
+	rm -rf $(srcdir)/html
+	mkdir $(srcdir)/html
+	cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
+	test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
+	@echo 'gtk-doc: Fixing cross-references'
+	cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
+	touch html-build.stamp
+
+##############
+
+clean-local:
+	rm -f *~ *.bak
+	rm -rf .libs
+
+distclean-local:
+	cd $(srcdir) && \
+	  rm -rf xml $(REPORT_FILES) \
+	         $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
+
+maintainer-clean-local: clean
+	cd $(srcdir) && rm -rf xml html
+
+install-data-local:
+	installfiles=`echo $(srcdir)/html/*`; \
+	if test "$$installfiles" = '$(srcdir)/html/*'; \
+	then echo '-- Nothing to install' ; \
+	else \
+	  $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR); \
+	  for i in $$installfiles; do \
+	    echo '-- Installing '$$i ; \
+	    $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
+	  done; \
+	  echo '-- Installing $(srcdir)/html/index.sgml' ; \
+	  $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR) || :; \
+	  (which gtkdoc-rebase >& /dev/null && \
+            gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$(DESTDIR)$(TARGET_DIR)) || : ; \
+	fi
+
+uninstall-local:
+	rm -f $(DESTDIR)$(TARGET_DIR)/*
+
+#
+# Require gtk-doc when making dist
+#
+ at ENABLE_GTK_DOC_TRUE@dist-check-gtkdoc:
+ at ENABLE_GTK_DOC_FALSE@dist-check-gtkdoc:
+ at ENABLE_GTK_DOC_FALSE@	@echo "*** gtk-doc must be installed and enabled in order to make dist"
+ at ENABLE_GTK_DOC_FALSE@	@false
+
+dist-hook: dist-check-gtkdoc dist-hook-local
+	mkdir $(distdir)/tmpl
+	mkdir $(distdir)/xml
+	mkdir $(distdir)/html
+	-cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
+	-cp $(srcdir)/xml/*.xml $(distdir)/xml
+	cp $(srcdir)/html/* $(distdir)/html
+	-cp $(srcdir)/$(DOC_MODULE).types $(distdir)/
+	-cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/
+	cd $(distdir) && rm -f $(DISTCLEANFILES)
+	-gtkdoc-rebase --online --relative --html-dir=$(distdir)/html
+
+.PHONY : dist-hook-local docs
+
+# Build the documentation when creating tarballs
+dist-hook-local:
+	$(MAKE) all
+
+uninstall-hook:
+	-rmdir --ignore-fail-on-non-empty $(DESTDIR)$(TARGET_DIR)
+# 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:

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/ch01.html
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/ch01.html	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/ch01.html	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,50 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>iPod database components</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="index.html" title="libgpod Reference Manual">
+<link rel="up" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
+<link rel="prev" href="libgpod-Low-level-functions.html" title="Low-level functions">
+<link rel="next" href="libgpod-Tracks.html" title="Tracks">
+<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+<link rel="part" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
+<link rel="chapter" href="ch01.html" title="iPod database components">
+<link rel="part" href="photodb.html" title="Part&#160;II.&#160;Photo database">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
+<td><a accesskey="p" href="libgpod-Low-level-functions.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="itunesdb.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">libgpod Reference Manual</th>
+<td><a accesskey="n" href="libgpod-Tracks.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="chapter" lang="en">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="id2629782"></a>iPod database components</h2></div></div></div>
+<div class="toc"><dl>
+<dt>
+<span class="refentrytitle"><a href="libgpod-Tracks.html">Tracks</a></span><span class="refpurpose"> &#8212; Data structure to store metadata about an iPod track</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libgpod-Playlists.html">Playlists</a></span><span class="refpurpose"> &#8212; Data structure to represent an iPod playlist</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libgpod-Smart-Playlists.html">Smart Playlists</a></span><span class="refpurpose"> &#8212; Data structure to represent an iPod smart playlist</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libgpod-Artwork.html">Artwork</a></span><span class="refpurpose"> &#8212; Data structure to store iPod artwork (album covers)</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libgpod-Chapter-Data.html">Chapter Data</a></span><span class="refpurpose"> &#8212; Data structure to store chapter data for tracks</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libgpod-Device.html">Device</a></span><span class="refpurpose"> &#8212; Data structure holding information about the iPod (model, mount point, etc.)</span>
+</dt>
+</dl></div>
+</div>
+</body>
+</html>

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/home.png
===================================================================
(Binary files differ)


Property changes on: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/home.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/index.html
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/index.html	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/index.html	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,119 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>libgpod Reference Manual</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<meta name="description" content="This manual documents the interfaces of the libgpod library and has some short notes to help get you up to speed with using the library. Please see the programs in the tests/ directory of the source distribution for some usage examples. A more complete example can be found in the source for Gtkpod. You can also ask questions on the developer's mailing list: gtkpod-devel at lists.sourceforge.net.">
+<link rel="start" href="index.html" title="libgpod Reference Manual">
+<link rel="next" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
+<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+<link rel="part" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
+<link rel="chapter" href="ch01.html" title="iPod database components">
+<link rel="part" href="photodb.html" title="Part&#160;II.&#160;Photo database">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="book" lang="en">
+<div class="titlepage">
+<div>
+<div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">libgpod Reference Manual</p></th></tr></table></div>
+<div><div class="authorgroup">
+<div class="author">
+<h3 class="author">
+<span class="firstname">Jorg</span> <span class="surname">Schuler</span>
+</h3>
+<div class="affiliation"><div class="address"><p><br>
+	&#160;&#160;&#160;&#160;<code class="email">&lt;<a class="email" href="mailto:jorg.schuler at gmx.de">jorg.schuler at gmx.de</a>&gt;</code><br>
+	&#160;&#160;</p></div></div>
+</div>
+<div class="author">
+<h3 class="author">
+<span class="firstname">Christophe</span> <span class="surname">Fergeau</span>
+</h3>
+<div class="affiliation"><div class="address"><p><br>
+	&#160;&#160;&#160;&#160;<code class="email">&lt;<a class="email" href="mailto:teuf at gnome.org">teuf at gnome.org</a>&gt;</code><br>
+	&#160;&#160;</p></div></div>
+</div>
+</div></div>
+<div><p class="releaseinfo">for libgpod <span>0.7.2</span></p></div>
+<div><p class="copyright">Copyright &#169; 2006-2008 Christophe Fergeau</p></div>
+<div><div class="legalnotice">
+<a name="id2635226"></a><p>Permission is granted to copy, distribute and/or modify
+      this document under the terms of the <em class="citetitle">GNU Free
+      Documentation License</em>, Version 1.1 or any later
+      version published by the Free Software Foundation with no
+      Invariant Sections, no Front-Cover Texts, and no Back-Cover
+      Texts. You may obtain a copy of the <em class="citetitle">GNU Free
+      Documentation License</em> from the Free Software
+      Foundation by visiting <a class="ulink" href="http://www.fsf.org" target="_top">their Web site</a> or by writing
+      to: Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+      Boston, MA 02111-1307, USA.</p>
+<p>Many of the names used by companies to distinguish their
+      products and services are claimed as trademarks. Where those
+      names appear in any GNOME documentation, and those trademarks
+      are made aware to the members of the GNOME Documentation
+      Project, the names have been printed in caps or initial
+      caps.</p>
+</div></div>
+<div><div class="abstract">
+<p class="title"><b>Abstract</b></p>
+<p>
+      This manual documents the interfaces of the libgpod library and
+      has some short notes to help get you up to speed with using the
+      library.
+      </p>
+<p>
+      Please see the programs in the <a class="ulink" href="http://gtkpod.svn.sourceforge.net/svnroot/gtkpod/libgpod/trunk/tests/" target="_top">tests/</a>
+      directory of the source distribution for some usage examples.  A more
+      complete example can be found in the source for <a class="ulink" href="http://www.gtkpod.org" target="_top"> Gtkpod</a>.  You can also ask questions
+      on the developer's mailing list: <a class="ulink" href="mailto:gtkpod-devel at lists.sourceforge.net" target="_top">gtkpod-devel at lists.sourceforge.net</a>.
+      </p>
+</div></div>
+</div>
+<hr>
+</div>
+<div class="toc"><dl>
+<dt><span class="part"><a href="itunesdb.html">I. iPod database</a></span></dt>
+<dd><dl>
+<dt>
+<span class="refentrytitle"><a href="libgpod-The-Itdb-iTunesDB-structure.html">iPod database reading/writing</a></span><span class="refpurpose"> &#8212; Functions to read, write, and create an iPod database</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libgpod-File-handling-functions.html">File handling functions</a></span><span class="refpurpose"> &#8212; Managing files on the iPod</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libgpod-Time-handling.html">Time handling</a></span><span class="refpurpose"> &#8212; [DEPRECATED] Helper functions to convert between Epoch time and Mac
+(iPod) time</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libgpod-Low-level-functions.html">Low-level functions</a></span><span class="refpurpose"> &#8212; Low-level functions which shouldn't be needed in normal situations</span>
+</dt>
+<dt><span class="chapter"><a href="ch01.html">iPod database components</a></span></dt>
+<dd><dl>
+<dt>
+<span class="refentrytitle"><a href="libgpod-Tracks.html">Tracks</a></span><span class="refpurpose"> &#8212; Data structure to store metadata about an iPod track</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libgpod-Playlists.html">Playlists</a></span><span class="refpurpose"> &#8212; Data structure to represent an iPod playlist</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libgpod-Smart-Playlists.html">Smart Playlists</a></span><span class="refpurpose"> &#8212; Data structure to represent an iPod smart playlist</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libgpod-Artwork.html">Artwork</a></span><span class="refpurpose"> &#8212; Data structure to store iPod artwork (album covers)</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libgpod-Chapter-Data.html">Chapter Data</a></span><span class="refpurpose"> &#8212; Data structure to store chapter data for tracks</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libgpod-Device.html">Device</a></span><span class="refpurpose"> &#8212; Data structure holding information about the iPod (model, mount point, etc.)</span>
+</dt>
+</dl></dd>
+</dl></dd>
+<dt><span class="part"><a href="photodb.html">II. Photo database</a></span></dt>
+<dd><dl><dt>
+<span class="refentrytitle"><a href="libgpod-Photo-database.html">Photo database</a></span><span class="refpurpose"> &#8212; Functions to create, read, write the photo database</span>
+</dt></dl></dd>
+</dl></div>
+</div></body>
+</html>

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/index.sgml
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/index.sgml	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/index.sgml	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,369 @@
+<ANCHOR id="libgpod-The-Itdb-iTunesDB-structure" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html">
+<ANCHOR id="Itdb-iTunesDB" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">
+<ANCHOR id="ItdbFileError" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html#ItdbFileError">
+<ANCHOR id="ITDB-FILE-ERROR-SEEK:CAPS" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html#ITDB-FILE-ERROR-SEEK:CAPS">
+<ANCHOR id="ITDB-FILE-ERROR-CORRUPT:CAPS" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html#ITDB-FILE-ERROR-CORRUPT:CAPS">
+<ANCHOR id="ITDB-FILE-ERROR-NOTFOUND:CAPS" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html#ITDB-FILE-ERROR-NOTFOUND:CAPS">
+<ANCHOR id="ITDB-FILE-ERROR-RENAME:CAPS" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html#ITDB-FILE-ERROR-RENAME:CAPS">
+<ANCHOR id="ITDB-FILE-ERROR-ITDB-CORRUPT:CAPS" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html#ITDB-FILE-ERROR-ITDB-CORRUPT:CAPS">
+<ANCHOR id="itdb-new" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html#itdb-new">
+<ANCHOR id="itdb-free" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html#itdb-free">
+<ANCHOR id="itdb-parse" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html#itdb-parse">
+<ANCHOR id="itdb-write" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html#itdb-write">
+<ANCHOR id="itdb-set-mountpoint" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html#itdb-set-mountpoint">
+<ANCHOR id="itdb-get-mountpoint" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html#itdb-get-mountpoint">
+<ANCHOR id="itdb-init-ipod" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html#itdb-init-ipod">
+<ANCHOR id="itdb-tracks-number" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html#itdb-tracks-number">
+<ANCHOR id="itdb-tracks-number-nontransferred" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html#itdb-tracks-number-nontransferred">
+<ANCHOR id="itdb-playlists-number" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html#itdb-playlists-number">
+<ANCHOR id="ItdbUserDataDestroyFunc" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDestroyFunc">
+<ANCHOR id="ItdbUserDataDuplicateFunc" href="libgpod/libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDuplicateFunc">
+<ANCHOR id="libgpod-File-handling-functions" href="libgpod/libgpod-File-handling-functions.html">
+<ANCHOR id="itdb-cp-track-to-ipod" href="libgpod/libgpod-File-handling-functions.html#itdb-cp-track-to-ipod">
+<ANCHOR id="itdb-filename-fs2ipod" href="libgpod/libgpod-File-handling-functions.html#itdb-filename-fs2ipod">
+<ANCHOR id="itdb-filename-ipod2fs" href="libgpod/libgpod-File-handling-functions.html#itdb-filename-ipod2fs">
+<ANCHOR id="itdb-filename-on-ipod" href="libgpod/libgpod-File-handling-functions.html#itdb-filename-on-ipod">
+<ANCHOR id="itdb-musicdirs-number" href="libgpod/libgpod-File-handling-functions.html#itdb-musicdirs-number">
+<ANCHOR id="itdb-rename-files" href="libgpod/libgpod-File-handling-functions.html#itdb-rename-files">
+<ANCHOR id="libgpod-Time-handling" href="libgpod/libgpod-Time-handling.html">
+<ANCHOR id="itdb-time-get-mac-time" href="libgpod/libgpod-Time-handling.html#itdb-time-get-mac-time">
+<ANCHOR id="itdb-time-mac-to-host" href="libgpod/libgpod-Time-handling.html#itdb-time-mac-to-host">
+<ANCHOR id="itdb-time-host-to-mac" href="libgpod/libgpod-Time-handling.html#itdb-time-host-to-mac">
+<ANCHOR id="libgpod-Low-level-functions" href="libgpod/libgpod-Low-level-functions.html">
+<ANCHOR id="itdb-get-control-dir" href="libgpod/libgpod-Low-level-functions.html#itdb-get-control-dir">
+<ANCHOR id="itdb-get-itunes-dir" href="libgpod/libgpod-Low-level-functions.html#itdb-get-itunes-dir">
+<ANCHOR id="itdb-get-music-dir" href="libgpod/libgpod-Low-level-functions.html#itdb-get-music-dir">
+<ANCHOR id="itdb-get-artwork-dir" href="libgpod/libgpod-Low-level-functions.html#itdb-get-artwork-dir">
+<ANCHOR id="itdb-get-device-dir" href="libgpod/libgpod-Low-level-functions.html#itdb-get-device-dir">
+<ANCHOR id="itdb-get-photos-dir" href="libgpod/libgpod-Low-level-functions.html#itdb-get-photos-dir">
+<ANCHOR id="itdb-get-itunesdb-path" href="libgpod/libgpod-Low-level-functions.html#itdb-get-itunesdb-path">
+<ANCHOR id="itdb-get-itunessd-path" href="libgpod/libgpod-Low-level-functions.html#itdb-get-itunessd-path">
+<ANCHOR id="itdb-get-artworkdb-path" href="libgpod/libgpod-Low-level-functions.html#itdb-get-artworkdb-path">
+<ANCHOR id="itdb-get-photodb-path" href="libgpod/libgpod-Low-level-functions.html#itdb-get-photodb-path">
+<ANCHOR id="itdb-get-photos-thumb-dir" href="libgpod/libgpod-Low-level-functions.html#itdb-get-photos-thumb-dir">
+<ANCHOR id="itdb-get-path" href="libgpod/libgpod-Low-level-functions.html#itdb-get-path">
+<ANCHOR id="itdb-resolve-path" href="libgpod/libgpod-Low-level-functions.html#itdb-resolve-path">
+<ANCHOR id="itdb-cp" href="libgpod/libgpod-Low-level-functions.html#itdb-cp">
+<ANCHOR id="itdb-cp-get-dest-filename" href="libgpod/libgpod-Low-level-functions.html#itdb-cp-get-dest-filename">
+<ANCHOR id="itdb-cp-finalize" href="libgpod/libgpod-Low-level-functions.html#itdb-cp-finalize">
+<ANCHOR id="itdb-parse-file" href="libgpod/libgpod-Low-level-functions.html#itdb-parse-file">
+<ANCHOR id="itdb-write-file" href="libgpod/libgpod-Low-level-functions.html#itdb-write-file">
+<ANCHOR id="itdb-shuffle-write" href="libgpod/libgpod-Low-level-functions.html#itdb-shuffle-write">
+<ANCHOR id="itdb-shuffle-write-file" href="libgpod/libgpod-Low-level-functions.html#itdb-shuffle-write-file">
+<ANCHOR id="itdb-duplicate" href="libgpod/libgpod-Low-level-functions.html#itdb-duplicate">
+<ANCHOR id="libgpod-Tracks" href="libgpod/libgpod-Tracks.html">
+<ANCHOR id="Itdb-Track" href="libgpod/libgpod-Tracks.html#Itdb-Track">
+<ANCHOR id="Itdb-Mediatype" href="libgpod/libgpod-Tracks.html#Itdb-Mediatype">
+<ANCHOR id="ITDB-MEDIATYPE-AUDIO:CAPS" href="libgpod/libgpod-Tracks.html#ITDB-MEDIATYPE-AUDIO:CAPS">
+<ANCHOR id="ITDB-MEDIATYPE-MOVIE:CAPS" href="libgpod/libgpod-Tracks.html#ITDB-MEDIATYPE-MOVIE:CAPS">
+<ANCHOR id="ITDB-MEDIATYPE-PODCAST:CAPS" href="libgpod/libgpod-Tracks.html#ITDB-MEDIATYPE-PODCAST:CAPS">
+<ANCHOR id="ITDB-MEDIATYPE-AUDIOBOOK:CAPS" href="libgpod/libgpod-Tracks.html#ITDB-MEDIATYPE-AUDIOBOOK:CAPS">
+<ANCHOR id="ITDB-MEDIATYPE-MUSICVIDEO:CAPS" href="libgpod/libgpod-Tracks.html#ITDB-MEDIATYPE-MUSICVIDEO:CAPS">
+<ANCHOR id="ITDB-MEDIATYPE-TVSHOW:CAPS" href="libgpod/libgpod-Tracks.html#ITDB-MEDIATYPE-TVSHOW:CAPS">
+<ANCHOR id="ITDB-RATING-STEP:CAPS" href="libgpod/libgpod-Tracks.html#ITDB-RATING-STEP:CAPS">
+<ANCHOR id="itdb-track-new" href="libgpod/libgpod-Tracks.html#itdb-track-new">
+<ANCHOR id="itdb-track-free" href="libgpod/libgpod-Tracks.html#itdb-track-free">
+<ANCHOR id="itdb-track-add" href="libgpod/libgpod-Tracks.html#itdb-track-add">
+<ANCHOR id="itdb-track-remove" href="libgpod/libgpod-Tracks.html#itdb-track-remove">
+<ANCHOR id="itdb-track-unlink" href="libgpod/libgpod-Tracks.html#itdb-track-unlink">
+<ANCHOR id="itdb-track-duplicate" href="libgpod/libgpod-Tracks.html#itdb-track-duplicate">
+<ANCHOR id="itdb-track-by-id" href="libgpod/libgpod-Tracks.html#itdb-track-by-id">
+<ANCHOR id="itdb-track-id-tree-create" href="libgpod/libgpod-Tracks.html#itdb-track-id-tree-create">
+<ANCHOR id="itdb-track-id-tree-destroy" href="libgpod/libgpod-Tracks.html#itdb-track-id-tree-destroy">
+<ANCHOR id="itdb-track-id-tree-by-id" href="libgpod/libgpod-Tracks.html#itdb-track-id-tree-by-id">
+<ANCHOR id="itdb-track-get-thumbnail" href="libgpod/libgpod-Tracks.html#itdb-track-get-thumbnail">
+<ANCHOR id="itdb-track-has-thumbnails" href="libgpod/libgpod-Tracks.html#itdb-track-has-thumbnails">
+<ANCHOR id="itdb-track-set-thumbnails" href="libgpod/libgpod-Tracks.html#itdb-track-set-thumbnails">
+<ANCHOR id="itdb-track-set-thumbnails-from-data" href="libgpod/libgpod-Tracks.html#itdb-track-set-thumbnails-from-data">
+<ANCHOR id="itdb-track-set-thumbnails-from-pixbuf" href="libgpod/libgpod-Tracks.html#itdb-track-set-thumbnails-from-pixbuf">
+<ANCHOR id="itdb-track-remove-thumbnails" href="libgpod/libgpod-Tracks.html#itdb-track-remove-thumbnails">
+<ANCHOR id="libgpod-Playlists" href="libgpod/libgpod-Playlists.html">
+<ANCHOR id="Itdb-Playlist" href="libgpod/libgpod-Playlists.html#Itdb-Playlist">
+<ANCHOR id="ItdbPlaylistSortOrder" href="libgpod/libgpod-Playlists.html#ItdbPlaylistSortOrder">
+<ANCHOR id="ITDB-PSO-MANUAL:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-MANUAL:CAPS">
+<ANCHOR id="ITDB-PSO-TITLE:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-TITLE:CAPS">
+<ANCHOR id="ITDB-PSO-ALBUM:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-ALBUM:CAPS">
+<ANCHOR id="ITDB-PSO-ARTIST:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-ARTIST:CAPS">
+<ANCHOR id="ITDB-PSO-BIRATE:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-BIRATE:CAPS">
+<ANCHOR id="ITDB-PSO-GENRE:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-GENRE:CAPS">
+<ANCHOR id="ITDB-PSO-FILETYPE:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-FILETYPE:CAPS">
+<ANCHOR id="ITDB-PSO-TIME-MODIFIED:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-TIME-MODIFIED:CAPS">
+<ANCHOR id="ITDB-PSO-TRACK-NR:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-TRACK-NR:CAPS">
+<ANCHOR id="ITDB-PSO-SIZE:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-SIZE:CAPS">
+<ANCHOR id="ITDB-PSO-TIME:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-TIME:CAPS">
+<ANCHOR id="ITDB-PSO-YEAR:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-YEAR:CAPS">
+<ANCHOR id="ITDB-PSO-SAMPLERATE:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-SAMPLERATE:CAPS">
+<ANCHOR id="ITDB-PSO-COMMENT:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-COMMENT:CAPS">
+<ANCHOR id="ITDB-PSO-TIME-ADDED:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-TIME-ADDED:CAPS">
+<ANCHOR id="ITDB-PSO-EQUALIZER:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-EQUALIZER:CAPS">
+<ANCHOR id="ITDB-PSO-COMPOSER:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-COMPOSER:CAPS">
+<ANCHOR id="ITDB-PSO-PLAYCOUNT:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-PLAYCOUNT:CAPS">
+<ANCHOR id="ITDB-PSO-TIME-PLAYED:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-TIME-PLAYED:CAPS">
+<ANCHOR id="ITDB-PSO-CD-NR:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-CD-NR:CAPS">
+<ANCHOR id="ITDB-PSO-RATING:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-RATING:CAPS">
+<ANCHOR id="ITDB-PSO-RELEASE-DATE:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-RELEASE-DATE:CAPS">
+<ANCHOR id="ITDB-PSO-BPM:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-BPM:CAPS">
+<ANCHOR id="ITDB-PSO-GROUPING:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-GROUPING:CAPS">
+<ANCHOR id="ITDB-PSO-CATEGORY:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-CATEGORY:CAPS">
+<ANCHOR id="ITDB-PSO-DESCRIPTION:CAPS" href="libgpod/libgpod-Playlists.html#ITDB-PSO-DESCRIPTION:CAPS">
+<ANCHOR id="itdb-playlist-new" href="libgpod/libgpod-Playlists.html#itdb-playlist-new">
+<ANCHOR id="itdb-playlist-free" href="libgpod/libgpod-Playlists.html#itdb-playlist-free">
+<ANCHOR id="itdb-playlist-duplicate" href="libgpod/libgpod-Playlists.html#itdb-playlist-duplicate">
+<ANCHOR id="itdb-playlist-add" href="libgpod/libgpod-Playlists.html#itdb-playlist-add">
+<ANCHOR id="itdb-playlist-move" href="libgpod/libgpod-Playlists.html#itdb-playlist-move">
+<ANCHOR id="itdb-playlist-remove" href="libgpod/libgpod-Playlists.html#itdb-playlist-remove">
+<ANCHOR id="itdb-playlist-unlink" href="libgpod/libgpod-Playlists.html#itdb-playlist-unlink">
+<ANCHOR id="itdb-playlist-add-track" href="libgpod/libgpod-Playlists.html#itdb-playlist-add-track">
+<ANCHOR id="itdb-playlist-remove-track" href="libgpod/libgpod-Playlists.html#itdb-playlist-remove-track">
+<ANCHOR id="itdb-playlist-contains-track" href="libgpod/libgpod-Playlists.html#itdb-playlist-contains-track">
+<ANCHOR id="itdb-playlist-contain-track-number" href="libgpod/libgpod-Playlists.html#itdb-playlist-contain-track-number">
+<ANCHOR id="itdb-playlist-tracks-number" href="libgpod/libgpod-Playlists.html#itdb-playlist-tracks-number">
+<ANCHOR id="itdb-playlist-mpl" href="libgpod/libgpod-Playlists.html#itdb-playlist-mpl">
+<ANCHOR id="itdb-playlist-is-mpl" href="libgpod/libgpod-Playlists.html#itdb-playlist-is-mpl">
+<ANCHOR id="itdb-playlist-set-mpl" href="libgpod/libgpod-Playlists.html#itdb-playlist-set-mpl">
+<ANCHOR id="itdb-playlist-podcasts" href="libgpod/libgpod-Playlists.html#itdb-playlist-podcasts">
+<ANCHOR id="itdb-playlist-is-podcasts" href="libgpod/libgpod-Playlists.html#itdb-playlist-is-podcasts">
+<ANCHOR id="itdb-playlist-set-podcasts" href="libgpod/libgpod-Playlists.html#itdb-playlist-set-podcasts">
+<ANCHOR id="itdb-playlist-exists" href="libgpod/libgpod-Playlists.html#itdb-playlist-exists">
+<ANCHOR id="itdb-playlist-by-id" href="libgpod/libgpod-Playlists.html#itdb-playlist-by-id">
+<ANCHOR id="itdb-playlist-by-nr" href="libgpod/libgpod-Playlists.html#itdb-playlist-by-nr">
+<ANCHOR id="itdb-playlist-by-name" href="libgpod/libgpod-Playlists.html#itdb-playlist-by-name">
+<ANCHOR id="itdb-playlist-randomize" href="libgpod/libgpod-Playlists.html#itdb-playlist-randomize">
+<ANCHOR id="libgpod-Smart-Playlists" href="libgpod/libgpod-Smart-Playlists.html">
+<ANCHOR id="Itdb-SPLPref" href="libgpod/libgpod-Smart-Playlists.html#Itdb-SPLPref">
+<ANCHOR id="Itdb-SPLRule" href="libgpod/libgpod-Smart-Playlists.html#Itdb-SPLRule">
+<ANCHOR id="Itdb-SPLRules" href="libgpod/libgpod-Smart-Playlists.html#Itdb-SPLRules">
+<ANCHOR id="ItdbLimitSort" href="libgpod/libgpod-Smart-Playlists.html#ItdbLimitSort">
+<ANCHOR id="ITDB-LIMITSORT-RANDOM:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-LIMITSORT-RANDOM:CAPS">
+<ANCHOR id="ITDB-LIMITSORT-SONG-NAME:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-LIMITSORT-SONG-NAME:CAPS">
+<ANCHOR id="ITDB-LIMITSORT-ALBUM:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-LIMITSORT-ALBUM:CAPS">
+<ANCHOR id="ITDB-LIMITSORT-ARTIST:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-LIMITSORT-ARTIST:CAPS">
+<ANCHOR id="ITDB-LIMITSORT-GENRE:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-LIMITSORT-GENRE:CAPS">
+<ANCHOR id="ITDB-LIMITSORT-MOST-RECENTLY-ADDED:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-LIMITSORT-MOST-RECENTLY-ADDED:CAPS">
+<ANCHOR id="ITDB-LIMITSORT-LEAST-RECENTLY-ADDED:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-LIMITSORT-LEAST-RECENTLY-ADDED:CAPS">
+<ANCHOR id="ITDB-LIMITSORT-MOST-OFTEN-PLAYED:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-LIMITSORT-MOST-OFTEN-PLAYED:CAPS">
+<ANCHOR id="ITDB-LIMITSORT-LEAST-OFTEN-PLAYED:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-LIMITSORT-LEAST-OFTEN-PLAYED:CAPS">
+<ANCHOR id="ITDB-LIMITSORT-MOST-RECENTLY-PLAYED:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-LIMITSORT-MOST-RECENTLY-PLAYED:CAPS">
+<ANCHOR id="ITDB-LIMITSORT-LEAST-RECENTLY-PLAYED:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-LIMITSORT-LEAST-RECENTLY-PLAYED:CAPS">
+<ANCHOR id="ITDB-LIMITSORT-HIGHEST-RATING:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-LIMITSORT-HIGHEST-RATING:CAPS">
+<ANCHOR id="ITDB-LIMITSORT-LOWEST-RATING:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-LIMITSORT-LOWEST-RATING:CAPS">
+<ANCHOR id="ItdbLimitType" href="libgpod/libgpod-Smart-Playlists.html#ItdbLimitType">
+<ANCHOR id="ITDB-LIMITTYPE-MINUTES:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-LIMITTYPE-MINUTES:CAPS">
+<ANCHOR id="ITDB-LIMITTYPE-MB:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-LIMITTYPE-MB:CAPS">
+<ANCHOR id="ITDB-LIMITTYPE-SONGS:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-LIMITTYPE-SONGS:CAPS">
+<ANCHOR id="ITDB-LIMITTYPE-HOURS:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-LIMITTYPE-HOURS:CAPS">
+<ANCHOR id="ITDB-LIMITTYPE-GB:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-LIMITTYPE-GB:CAPS">
+<ANCHOR id="ItdbSPLAction" href="libgpod/libgpod-Smart-Playlists.html#ItdbSPLAction">
+<ANCHOR id="ITDB-SPLACTION-IS-INT:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-IS-INT:CAPS">
+<ANCHOR id="ITDB-SPLACTION-IS-GREATER-THAN:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-IS-GREATER-THAN:CAPS">
+<ANCHOR id="ITDB-SPLACTION-IS-LESS-THAN:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-IS-LESS-THAN:CAPS">
+<ANCHOR id="ITDB-SPLACTION-IS-IN-THE-RANGE:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-IS-IN-THE-RANGE:CAPS">
+<ANCHOR id="ITDB-SPLACTION-IS-IN-THE-LAST:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-IS-IN-THE-LAST:CAPS">
+<ANCHOR id="ITDB-SPLACTION-BINARY-AND:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-BINARY-AND:CAPS">
+<ANCHOR id="ITDB-SPLACTION-IS-STRING:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-IS-STRING:CAPS">
+<ANCHOR id="ITDB-SPLACTION-CONTAINS:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-CONTAINS:CAPS">
+<ANCHOR id="ITDB-SPLACTION-STARTS-WITH:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-STARTS-WITH:CAPS">
+<ANCHOR id="ITDB-SPLACTION-ENDS-WITH:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-ENDS-WITH:CAPS">
+<ANCHOR id="ITDB-SPLACTION-IS-NOT-INT:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-IS-NOT-INT:CAPS">
+<ANCHOR id="ITDB-SPLACTION-IS-NOT-GREATER-THAN:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-IS-NOT-GREATER-THAN:CAPS">
+<ANCHOR id="ITDB-SPLACTION-IS-NOT-LESS-THAN:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-IS-NOT-LESS-THAN:CAPS">
+<ANCHOR id="ITDB-SPLACTION-IS-NOT-IN-THE-RANGE:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-IS-NOT-IN-THE-RANGE:CAPS">
+<ANCHOR id="ITDB-SPLACTION-IS-NOT-IN-THE-LAST:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-IS-NOT-IN-THE-LAST:CAPS">
+<ANCHOR id="ITDB-SPLACTION-IS-NOT:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-IS-NOT:CAPS">
+<ANCHOR id="ITDB-SPLACTION-DOES-NOT-CONTAIN:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-DOES-NOT-CONTAIN:CAPS">
+<ANCHOR id="ITDB-SPLACTION-DOES-NOT-START-WITH:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-DOES-NOT-START-WITH:CAPS">
+<ANCHOR id="ITDB-SPLACTION-DOES-NOT-END-WITH:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-DOES-NOT-END-WITH:CAPS">
+<ANCHOR id="ItdbSPLActionLast" href="libgpod/libgpod-Smart-Playlists.html#ItdbSPLActionLast">
+<ANCHOR id="ITDB-SPLACTION-LAST-DAYS-VALUE:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-LAST-DAYS-VALUE:CAPS">
+<ANCHOR id="ITDB-SPLACTION-LAST-WEEKS-VALUE:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-LAST-WEEKS-VALUE:CAPS">
+<ANCHOR id="ITDB-SPLACTION-LAST-MONTHS-VALUE:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLACTION-LAST-MONTHS-VALUE:CAPS">
+<ANCHOR id="ItdbSPLActionType" href="libgpod/libgpod-Smart-Playlists.html#ItdbSPLActionType">
+<ANCHOR id="ITDB-SPLAT-STRING:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLAT-STRING:CAPS">
+<ANCHOR id="ITDB-SPLAT-INT:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLAT-INT:CAPS">
+<ANCHOR id="ITDB-SPLAT-DATE:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLAT-DATE:CAPS">
+<ANCHOR id="ITDB-SPLAT-RANGE-INT:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLAT-RANGE-INT:CAPS">
+<ANCHOR id="ITDB-SPLAT-RANGE-DATE:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLAT-RANGE-DATE:CAPS">
+<ANCHOR id="ITDB-SPLAT-INTHELAST:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLAT-INTHELAST:CAPS">
+<ANCHOR id="ITDB-SPLAT-PLAYLIST:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLAT-PLAYLIST:CAPS">
+<ANCHOR id="ITDB-SPLAT-NONE:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLAT-NONE:CAPS">
+<ANCHOR id="ITDB-SPLAT-INVALID:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLAT-INVALID:CAPS">
+<ANCHOR id="ITDB-SPLAT-UNKNOWN:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLAT-UNKNOWN:CAPS">
+<ANCHOR id="ITDB-SPLAT-BINARY-AND:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLAT-BINARY-AND:CAPS">
+<ANCHOR id="ItdbSPLField" href="libgpod/libgpod-Smart-Playlists.html#ItdbSPLField">
+<ANCHOR id="ITDB-SPLFIELD-SONG-NAME:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-SONG-NAME:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-ALBUM:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-ALBUM:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-ARTIST:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-ARTIST:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-BITRATE:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-BITRATE:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-SAMPLE-RATE:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-SAMPLE-RATE:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-YEAR:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-YEAR:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-GENRE:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-GENRE:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-KIND:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-KIND:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-DATE-MODIFIED:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-DATE-MODIFIED:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-TRACKNUMBER:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-TRACKNUMBER:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-SIZE:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-SIZE:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-TIME:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-TIME:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-COMMENT:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-COMMENT:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-DATE-ADDED:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-DATE-ADDED:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-COMPOSER:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-COMPOSER:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-PLAYCOUNT:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-PLAYCOUNT:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-LAST-PLAYED:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-LAST-PLAYED:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-DISC-NUMBER:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-DISC-NUMBER:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-RATING:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-RATING:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-COMPILATION:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-COMPILATION:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-BPM:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-BPM:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-GROUPING:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-GROUPING:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-PLAYLIST:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-PLAYLIST:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-VIDEO-KIND:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-VIDEO-KIND:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-TVSHOW:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-TVSHOW:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-SEASON-NR:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-SEASON-NR:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-SKIPCOUNT:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-SKIPCOUNT:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-LAST-SKIPPED:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-LAST-SKIPPED:CAPS">
+<ANCHOR id="ITDB-SPLFIELD-ALBUMARTIST:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFIELD-ALBUMARTIST:CAPS">
+<ANCHOR id="ItdbSPLFieldType" href="libgpod/libgpod-Smart-Playlists.html#ItdbSPLFieldType">
+<ANCHOR id="ITDB-SPLFT-STRING:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFT-STRING:CAPS">
+<ANCHOR id="ITDB-SPLFT-INT:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFT-INT:CAPS">
+<ANCHOR id="ITDB-SPLFT-BOOLEAN:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFT-BOOLEAN:CAPS">
+<ANCHOR id="ITDB-SPLFT-DATE:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFT-DATE:CAPS">
+<ANCHOR id="ITDB-SPLFT-PLAYLIST:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFT-PLAYLIST:CAPS">
+<ANCHOR id="ITDB-SPLFT-UNKNOWN:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFT-UNKNOWN:CAPS">
+<ANCHOR id="ITDB-SPLFT-BINARY-AND:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLFT-BINARY-AND:CAPS">
+<ANCHOR id="ItdbSPLMatch" href="libgpod/libgpod-Smart-Playlists.html#ItdbSPLMatch">
+<ANCHOR id="ITDB-SPLMATCH-AND:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLMATCH-AND:CAPS">
+<ANCHOR id="ITDB-SPLMATCH-OR:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPLMATCH-OR:CAPS">
+<ANCHOR id="ITDB-SPL-DATE-IDENTIFIER:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPL-DATE-IDENTIFIER:CAPS">
+<ANCHOR id="ITDB-SPL-STRING-MAXLEN:CAPS" href="libgpod/libgpod-Smart-Playlists.html#ITDB-SPL-STRING-MAXLEN:CAPS">
+<ANCHOR id="itdb-splr-get-field-type" href="libgpod/libgpod-Smart-Playlists.html#itdb-splr-get-field-type">
+<ANCHOR id="itdb-splr-get-action-type" href="libgpod/libgpod-Smart-Playlists.html#itdb-splr-get-action-type">
+<ANCHOR id="itdb-splr-validate" href="libgpod/libgpod-Smart-Playlists.html#itdb-splr-validate">
+<ANCHOR id="itdb-splr-remove" href="libgpod/libgpod-Smart-Playlists.html#itdb-splr-remove">
+<ANCHOR id="itdb-splr-new" href="libgpod/libgpod-Smart-Playlists.html#itdb-splr-new">
+<ANCHOR id="itdb-splr-add" href="libgpod/libgpod-Smart-Playlists.html#itdb-splr-add">
+<ANCHOR id="itdb-splr-add-new" href="libgpod/libgpod-Smart-Playlists.html#itdb-splr-add-new">
+<ANCHOR id="itdb-spl-copy-rules" href="libgpod/libgpod-Smart-Playlists.html#itdb-spl-copy-rules">
+<ANCHOR id="itdb-splr-eval" href="libgpod/libgpod-Smart-Playlists.html#itdb-splr-eval">
+<ANCHOR id="itdb-spl-update" href="libgpod/libgpod-Smart-Playlists.html#itdb-spl-update">
+<ANCHOR id="itdb-spl-update-all" href="libgpod/libgpod-Smart-Playlists.html#itdb-spl-update-all">
+<ANCHOR id="itdb-spl-update-live" href="libgpod/libgpod-Smart-Playlists.html#itdb-spl-update-live">
+<ANCHOR id="libgpod-Artwork" href="libgpod/libgpod-Artwork.html">
+<ANCHOR id="Itdb-Artwork" href="libgpod/libgpod-Artwork.html#Itdb-Artwork">
+<ANCHOR id="itdb-artwork-new" href="libgpod/libgpod-Artwork.html#itdb-artwork-new">
+<ANCHOR id="itdb-artwork-duplicate" href="libgpod/libgpod-Artwork.html#itdb-artwork-duplicate">
+<ANCHOR id="itdb-artwork-free" href="libgpod/libgpod-Artwork.html#itdb-artwork-free">
+<ANCHOR id="itdb-artwork-get-pixbuf" href="libgpod/libgpod-Artwork.html#itdb-artwork-get-pixbuf">
+<ANCHOR id="itdb-artwork-set-thumbnail" href="libgpod/libgpod-Artwork.html#itdb-artwork-set-thumbnail">
+<ANCHOR id="itdb-artwork-set-thumbnail-from-data" href="libgpod/libgpod-Artwork.html#itdb-artwork-set-thumbnail-from-data">
+<ANCHOR id="itdb-artwork-set-thumbnail-from-pixbuf" href="libgpod/libgpod-Artwork.html#itdb-artwork-set-thumbnail-from-pixbuf">
+<ANCHOR id="itdb-artwork-remove-thumbnails" href="libgpod/libgpod-Artwork.html#itdb-artwork-remove-thumbnails">
+<ANCHOR id="Itdb-Thumb" href="libgpod/libgpod-Artwork.html#Itdb-Thumb">
+<ANCHOR id="itdb-thumb-duplicate" href="libgpod/libgpod-Artwork.html#itdb-thumb-duplicate">
+<ANCHOR id="itdb-thumb-free" href="libgpod/libgpod-Artwork.html#itdb-thumb-free">
+<ANCHOR id="itdb-thumb-to-pixbuf-at-size" href="libgpod/libgpod-Artwork.html#itdb-thumb-to-pixbuf-at-size">
+<ANCHOR id="itdb-thumb-to-pixbufs" href="libgpod/libgpod-Artwork.html#itdb-thumb-to-pixbufs">
+<ANCHOR id="libgpod-Chapter-Data" href="libgpod/libgpod-Chapter-Data.html">
+<ANCHOR id="Itdb-Chapter" href="libgpod/libgpod-Chapter-Data.html#Itdb-Chapter">
+<ANCHOR id="Itdb-Chapterdata" href="libgpod/libgpod-Chapter-Data.html#Itdb-Chapterdata">
+<ANCHOR id="itdb-chapter-new" href="libgpod/libgpod-Chapter-Data.html#itdb-chapter-new">
+<ANCHOR id="itdb-chapter-duplicate" href="libgpod/libgpod-Chapter-Data.html#itdb-chapter-duplicate">
+<ANCHOR id="itdb-chapter-free" href="libgpod/libgpod-Chapter-Data.html#itdb-chapter-free">
+<ANCHOR id="itdb-chapterdata-new" href="libgpod/libgpod-Chapter-Data.html#itdb-chapterdata-new">
+<ANCHOR id="itdb-chapterdata-add-chapter" href="libgpod/libgpod-Chapter-Data.html#itdb-chapterdata-add-chapter">
+<ANCHOR id="itdb-chapterdata-duplicate" href="libgpod/libgpod-Chapter-Data.html#itdb-chapterdata-duplicate">
+<ANCHOR id="itdb-chapterdata-remove-chapter" href="libgpod/libgpod-Chapter-Data.html#itdb-chapterdata-remove-chapter">
+<ANCHOR id="itdb-chapterdata-remove-chapters" href="libgpod/libgpod-Chapter-Data.html#itdb-chapterdata-remove-chapters">
+<ANCHOR id="itdb-chapterdata-free" href="libgpod/libgpod-Chapter-Data.html#itdb-chapterdata-free">
+<ANCHOR id="libgpod-Device" href="libgpod/libgpod-Device.html">
+<ANCHOR id="Itdb-Device" href="libgpod/libgpod-Device.html#Itdb-Device">
+<ANCHOR id="itdb-device-new" href="libgpod/libgpod-Device.html#itdb-device-new">
+<ANCHOR id="itdb-device-free" href="libgpod/libgpod-Device.html#itdb-device-free">
+<ANCHOR id="itdb-device-set-mountpoint" href="libgpod/libgpod-Device.html#itdb-device-set-mountpoint">
+<ANCHOR id="itdb-device-supports-artwork" href="libgpod/libgpod-Device.html#itdb-device-supports-artwork">
+<ANCHOR id="itdb-device-supports-chapter-image" href="libgpod/libgpod-Device.html#itdb-device-supports-chapter-image">
+<ANCHOR id="itdb-device-supports-photo" href="libgpod/libgpod-Device.html#itdb-device-supports-photo">
+<ANCHOR id="itdb-device-supports-podcast" href="libgpod/libgpod-Device.html#itdb-device-supports-podcast">
+<ANCHOR id="itdb-device-supports-video" href="libgpod/libgpod-Device.html#itdb-device-supports-video">
+<ANCHOR id="Itdb-IpodInfo" href="libgpod/libgpod-Device.html#Itdb-IpodInfo">
+<ANCHOR id="itdb-device-get-ipod-info" href="libgpod/libgpod-Device.html#itdb-device-get-ipod-info">
+<ANCHOR id="itdb-info-get-ipod-info-table" href="libgpod/libgpod-Device.html#itdb-info-get-ipod-info-table">
+<ANCHOR id="Itdb-IpodGeneration" href="libgpod/libgpod-Device.html#Itdb-IpodGeneration">
+<ANCHOR id="ITDB-IPOD-GENERATION-UNKNOWN:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-UNKNOWN:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-FIRST:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-FIRST:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-SECOND:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-SECOND:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-THIRD:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-THIRD:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-FOURTH:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-FOURTH:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-PHOTO:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-PHOTO:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-MOBILE:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-MOBILE:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-MINI-1:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-MINI-1:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-MINI-2:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-MINI-2:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-SHUFFLE-1:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-SHUFFLE-1:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-SHUFFLE-2:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-SHUFFLE-2:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-SHUFFLE-3:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-SHUFFLE-3:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-NANO-1:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-NANO-1:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-NANO-2:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-NANO-2:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-NANO-3:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-NANO-3:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-NANO-4:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-NANO-4:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-VIDEO-1:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-VIDEO-1:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-VIDEO-2:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-VIDEO-2:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-CLASSIC-1:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-CLASSIC-1:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-CLASSIC-2:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-CLASSIC-2:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-TOUCH-1:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-TOUCH-1:CAPS">
+<ANCHOR id="ITDB-IPOD-GENERATION-IPHONE-1:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-GENERATION-IPHONE-1:CAPS">
+<ANCHOR id="itdb-info-get-ipod-generation-string" href="libgpod/libgpod-Device.html#itdb-info-get-ipod-generation-string">
+<ANCHOR id="Itdb-IpodModel" href="libgpod/libgpod-Device.html#Itdb-IpodModel">
+<ANCHOR id="ITDB-IPOD-MODEL-INVALID:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-INVALID:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-UNKNOWN:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-UNKNOWN:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-COLOR:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-COLOR:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-COLOR-U2:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-COLOR-U2:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-REGULAR:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-REGULAR:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-REGULAR-U2:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-REGULAR-U2:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-MINI:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-MINI:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-MINI-BLUE:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-MINI-BLUE:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-MINI-PINK:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-MINI-PINK:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-MINI-GREEN:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-MINI-GREEN:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-MINI-GOLD:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-MINI-GOLD:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-SHUFFLE:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-SHUFFLE:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-NANO-WHITE:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-NANO-WHITE:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-NANO-BLACK:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-NANO-BLACK:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-VIDEO-WHITE:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-VIDEO-WHITE:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-VIDEO-BLACK:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-VIDEO-BLACK:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-MOBILE-1:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-MOBILE-1:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-VIDEO-U2:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-VIDEO-U2:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-NANO-SILVER:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-NANO-SILVER:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-NANO-BLUE:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-NANO-BLUE:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-NANO-GREEN:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-NANO-GREEN:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-NANO-PINK:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-NANO-PINK:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-NANO-RED:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-NANO-RED:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-NANO-YELLOW:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-NANO-YELLOW:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-NANO-PURPLE:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-NANO-PURPLE:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-NANO-ORANGE:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-NANO-ORANGE:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-IPHONE-1:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-IPHONE-1:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-SHUFFLE-SILVER:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-SHUFFLE-SILVER:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-SHUFFLE-PINK:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-SHUFFLE-PINK:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-SHUFFLE-BLUE:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-SHUFFLE-BLUE:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-SHUFFLE-GREEN:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-SHUFFLE-GREEN:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-SHUFFLE-ORANGE:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-SHUFFLE-ORANGE:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-SHUFFLE-PURPLE:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-SHUFFLE-PURPLE:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-SHUFFLE-RED:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-SHUFFLE-RED:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-CLASSIC-SILVER:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-CLASSIC-SILVER:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-CLASSIC-BLACK:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-CLASSIC-BLACK:CAPS">
+<ANCHOR id="ITDB-IPOD-MODEL-TOUCH-BLACK:CAPS" href="libgpod/libgpod-Device.html#ITDB-IPOD-MODEL-TOUCH-BLACK:CAPS">
+<ANCHOR id="itdb-info-get-ipod-model-name-string" href="libgpod/libgpod-Device.html#itdb-info-get-ipod-model-name-string">
+<ANCHOR id="Itdb-ArtworkFormat" href="libgpod/libgpod-Device.html#Itdb-ArtworkFormat">
+<ANCHOR id="itdb-device-read-sysinfo" href="libgpod/libgpod-Device.html#itdb-device-read-sysinfo">
+<ANCHOR id="itdb-device-get-sysinfo" href="libgpod/libgpod-Device.html#itdb-device-get-sysinfo">
+<ANCHOR id="itdb-device-set-sysinfo" href="libgpod/libgpod-Device.html#itdb-device-set-sysinfo">
+<ANCHOR id="itdb-device-write-sysinfo" href="libgpod/libgpod-Device.html#itdb-device-write-sysinfo">
+<ANCHOR id="libgpod-Photo-database" href="libgpod/libgpod-Photo-database.html">
+<ANCHOR id="Itdb-PhotoDB" href="libgpod/libgpod-Photo-database.html#Itdb-PhotoDB">
+<ANCHOR id="itdb-photodb-create" href="libgpod/libgpod-Photo-database.html#itdb-photodb-create">
+<ANCHOR id="itdb-photodb-free" href="libgpod/libgpod-Photo-database.html#itdb-photodb-free">
+<ANCHOR id="itdb-photodb-parse" href="libgpod/libgpod-Photo-database.html#itdb-photodb-parse">
+<ANCHOR id="itdb-photodb-write" href="libgpod/libgpod-Photo-database.html#itdb-photodb-write">
+<ANCHOR id="itdb-photodb-add-photo" href="libgpod/libgpod-Photo-database.html#itdb-photodb-add-photo">
+<ANCHOR id="itdb-photodb-add-photo-from-data" href="libgpod/libgpod-Photo-database.html#itdb-photodb-add-photo-from-data">
+<ANCHOR id="itdb-photodb-add-photo-from-pixbuf" href="libgpod/libgpod-Photo-database.html#itdb-photodb-add-photo-from-pixbuf">
+<ANCHOR id="itdb-photodb-remove-photo" href="libgpod/libgpod-Photo-database.html#itdb-photodb-remove-photo">
+<ANCHOR id="Itdb-PhotoAlbum" href="libgpod/libgpod-Photo-database.html#Itdb-PhotoAlbum">
+<ANCHOR id="itdb-photodb-photoalbum-create" href="libgpod/libgpod-Photo-database.html#itdb-photodb-photoalbum-create">
+<ANCHOR id="itdb-photodb-photoalbum-add-photo" href="libgpod/libgpod-Photo-database.html#itdb-photodb-photoalbum-add-photo">
+<ANCHOR id="itdb-photodb-photoalbum-by-name" href="libgpod/libgpod-Photo-database.html#itdb-photodb-photoalbum-by-name">
+<ANCHOR id="itdb-photodb-photoalbum-remove" href="libgpod/libgpod-Photo-database.html#itdb-photodb-photoalbum-remove">

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/itunesdb.html
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/itunesdb.html	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/itunesdb.html	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,76 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Part&#160;I.&#160;iPod database</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="index.html" title="libgpod Reference Manual">
+<link rel="up" href="index.html" title="libgpod Reference Manual">
+<link rel="prev" href="index.html" title="libgpod Reference Manual">
+<link rel="next" href="libgpod-The-Itdb-iTunesDB-structure.html" title="iPod database reading/writing">
+<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+<link rel="part" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
+<link rel="chapter" href="ch01.html" title="iPod database components">
+<link rel="part" href="photodb.html" title="Part&#160;II.&#160;Photo database">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
+<td><a accesskey="p" href="index.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td>&#160;</td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">libgpod Reference Manual</th>
+<td><a accesskey="n" href="libgpod-The-Itdb-iTunesDB-structure.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="part" lang="en">
+<div class="titlepage"><div><div><h1 class="title">
+<a name="itunesdb"></a>Part&#160;I.&#160;iPod database</h1></div></div></div>
+<div class="partintro" lang="en">
+<div></div>
+<p>
+      The iPod database functions are used for adding audio and video
+      to the iPod.
+      </p>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl>
+<dt>
+<span class="refentrytitle"><a href="libgpod-The-Itdb-iTunesDB-structure.html">iPod database reading/writing</a></span><span class="refpurpose"> &#8212; Functions to read, write, and create an iPod database</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libgpod-File-handling-functions.html">File handling functions</a></span><span class="refpurpose"> &#8212; Managing files on the iPod</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libgpod-Time-handling.html">Time handling</a></span><span class="refpurpose"> &#8212; [DEPRECATED] Helper functions to convert between Epoch time and Mac
+(iPod) time</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libgpod-Low-level-functions.html">Low-level functions</a></span><span class="refpurpose"> &#8212; Low-level functions which shouldn't be needed in normal situations</span>
+</dt>
+<dt><span class="chapter"><a href="ch01.html">iPod database components</a></span></dt>
+<dd><dl>
+<dt>
+<span class="refentrytitle"><a href="libgpod-Tracks.html">Tracks</a></span><span class="refpurpose"> &#8212; Data structure to store metadata about an iPod track</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libgpod-Playlists.html">Playlists</a></span><span class="refpurpose"> &#8212; Data structure to represent an iPod playlist</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libgpod-Smart-Playlists.html">Smart Playlists</a></span><span class="refpurpose"> &#8212; Data structure to represent an iPod smart playlist</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libgpod-Artwork.html">Artwork</a></span><span class="refpurpose"> &#8212; Data structure to store iPod artwork (album covers)</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libgpod-Chapter-Data.html">Chapter Data</a></span><span class="refpurpose"> &#8212; Data structure to store chapter data for tracks</span>
+</dt>
+<dt>
+<span class="refentrytitle"><a href="libgpod-Device.html">Device</a></span><span class="refpurpose"> &#8212; Data structure holding information about the iPod (model, mount point, etc.)</span>
+</dt>
+</dl></dd>
+</dl>
+</div>
+</div>
+</div>
+</body>
+</html>

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/left.png
===================================================================
(Binary files differ)


Property changes on: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/left.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-Artwork.html
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-Artwork.html	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-Artwork.html	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,894 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Artwork</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="index.html" title="libgpod Reference Manual">
+<link rel="up" href="ch01.html" title="iPod database components">
+<link rel="prev" href="libgpod-Smart-Playlists.html" title="Smart Playlists">
+<link rel="next" href="libgpod-Chapter-Data.html" title="Chapter Data">
+<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+<link rel="part" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
+<link rel="chapter" href="ch01.html" title="iPod database components">
+<link rel="part" href="photodb.html" title="Part&#160;II.&#160;Photo database">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="libgpod-Smart-Playlists.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">libgpod Reference Manual</th>
+<td><a accesskey="n" href="libgpod-Chapter-Data.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2715714" class="shortcut">Top</a>
+                  &#160;|&#160;
+                  <a href="#id2733529" class="shortcut">Description</a></nobr></td></tr>
+</table>
+<div class="refentry" lang="en">
+<a name="libgpod-Artwork"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2>
+<a name="id2715714"></a><span class="refentrytitle">Artwork</span>
+</h2>
+<p>Artwork &#8212; Data structure to store iPod artwork (album covers)</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<pre class="synopsis">
+
+
+
+                    <a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a>;
+<a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a>*       <a class="link" href="libgpod-Artwork.html#itdb-artwork-new">itdb_artwork_new</a>                    (void);
+<a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a>*       <a class="link" href="libgpod-Artwork.html#itdb-artwork-duplicate">itdb_artwork_duplicate</a>              (<a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork);
+void                <a class="link" href="libgpod-Artwork.html#itdb-artwork-free">itdb_artwork_free</a>                   (<a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>            <a class="link" href="libgpod-Artwork.html#itdb-artwork-get-pixbuf">itdb_artwork_get_pixbuf</a>             (<a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
+                                                         <a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> width,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> height);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Artwork.html#itdb-artwork-set-thumbnail">itdb_artwork_set_thumbnail</a>          (<a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *filename,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> rotation,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Artwork.html#itdb-artwork-set-thumbnail-from-data">itdb_artwork_set_thumbnail_from_data</a>
+                                                        (<a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guchar"
+>guchar</a> *image_data,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"
+>gsize</a> image_data_len,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> rotation,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Artwork.html#itdb-artwork-set-thumbnail-from-pixbuf">itdb_artwork_set_thumbnail_from_pixbuf</a>
+                                                        (<a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a> pixbuf,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> rotation,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+void                <a class="link" href="libgpod-Artwork.html#itdb-artwork-remove-thumbnails">itdb_artwork_remove_thumbnails</a>      (<a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork);
+                    <a class="link" href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a>;
+<a class="link" href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a>*         <a class="link" href="libgpod-Artwork.html#itdb-thumb-duplicate">itdb_thumb_duplicate</a>                (<a class="link" href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a> *thumb);
+void                <a class="link" href="libgpod-Artwork.html#itdb-thumb-free">itdb_thumb_free</a>                     (<a class="link" href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a> *thumb);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>            <a class="link" href="libgpod-Artwork.html#itdb-thumb-to-pixbuf-at-size">itdb_thumb_to_pixbuf_at_size</a>        (<a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
+                                                         <a class="link" href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a> *thumb,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> width,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> height);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
+>GList</a>*              <a class="link" href="libgpod-Artwork.html#itdb-thumb-to-pixbufs">itdb_thumb_to_pixbufs</a>               (<a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
+                                                         <a class="link" href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a> *thumb);
+</pre>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2733529"></a><h2>Description</h2>
+<p>
+These functions and structures are for adding, changing, and removing
+album/track artwork.  For working with photos, see the
+<a class="link" href="photodb.html" title="Part&#160;II.&#160;Photo database">Photo database</a> section.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2733553"></a><h2>Details</h2>
+<div class="refsect2" lang="en">
+<a name="id2735063"></a><h3>
+<a name="Itdb-Artwork"></a>Itdb_Artwork</h3>
+<a class="indexterm" name="id2735078"></a><pre class="programlisting">typedef struct {
+    Itdb_Thumb *thumbnail;
+    guint32 id;
+    guint64 dbid;
+    gint32  unk028;
+    guint32 rating;
+    gint32  unk036;
+    time_t  creation_date;
+    time_t  digitized_date;
+    guint32 artwork_size;
+    /* reserved for future use */
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+    /* below is for use by application */
+    guint64 usertype;
+    gpointer userdata;
+    /* functions called to duplicate/free userdata */
+    ItdbUserDataDuplicateFunc userdata_duplicate;
+    ItdbUserDataDestroyFunc userdata_destroy;
+} Itdb_Artwork;
+</pre>
+<p>
+Structure representing artwork in an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> or <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a>&#160;*<em class="structfield"><code>thumbnail</code></em>;</span></p></td>
+<td>          An <a class="link" href="libgpod-Artwork.html#Itdb-Thumb"><span class="type">Itdb_Thumb</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>id</code></em>;</span></p></td>
+<td>                 Artwork id used by photoalbums.  This starts at 0x40 and
+                     is set automatically when the ArtworkDB or PhotoDB is
+                     written
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
+>guint64</a>&#160;<em class="structfield"><code>dbid</code></em>;</span></p></td>
+<td>               The dbid of associated track.  Used internally by
+                     libgpod.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>unk028</code></em>;</span></p></td>
+<td>             Unknown
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>rating</code></em>;</span></p></td>
+<td>             Rating from iPhoto * 20 (PhotoDB only)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>unk036</code></em>;</span></p></td>
+<td>             Unknown
+</td>
+</tr>
+<tr>
+<td><p><span class="term">time_t&#160;<em class="structfield"><code>creation_date</code></em>;</span></p></td>
+<td>      Date the image file was created (PhotoDB only)
+</td>
+</tr>
+<tr>
+<td><p><span class="term">time_t&#160;<em class="structfield"><code>digitized_date</code></em>;</span></p></td>
+<td>     Date the image was taken (EXIF information, PhotoDB
+                     only)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>artwork_size</code></em>;</span></p></td>
+<td>       Size in bytes of the original source image (PhotoDB
+                     only -- don't touch in case of ArtworkDB!)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int1</code></em>;</span></p></td>
+<td>      Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int2</code></em>;</span></p></td>
+<td>      Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved1</code></em>;</span></p></td>
+<td>          Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved2</code></em>;</span></p></td>
+<td>          Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
+>guint64</a>&#160;<em class="structfield"><code>usertype</code></em>;</span></p></td>
+<td>           For use by application
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>userdata</code></em>;</span></p></td>
+<td>           For use by application
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDuplicateFunc">ItdbUserDataDuplicateFunc</a>&#160;<em class="structfield"><code>userdata_duplicate</code></em>;</span></p></td>
+<td> A function to duplicate <span class="type">userdata</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDestroyFunc">ItdbUserDataDestroyFunc</a>&#160;<em class="structfield"><code>userdata_destroy</code></em>;</span></p></td>
+<td>   A function to free <span class="type">userdata</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.3.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2734467"></a><h3>
+<a name="itdb-artwork-new"></a>itdb_artwork_new ()</h3>
+<a class="indexterm" name="id2734482"></a><pre class="programlisting"><a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a>*       itdb_artwork_new                    (void);</pre>
+<p>
+Creates a new <a class="link" href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a new <a class="link" href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a> to be freed with <a class="link" href="libgpod-Artwork.html#itdb-artwork-free"><code class="function">itdb_artwork_free()</code></a> when
+no longer needed
+
+</td>
+</tr></tbody>
+</table></div>
+<p class="since">Since  0.3.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2734552"></a><h3>
+<a name="itdb-artwork-duplicate"></a>itdb_artwork_duplicate ()</h3>
+<a class="indexterm" name="id2734566"></a><pre class="programlisting"><a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a>*       itdb_artwork_duplicate              (<a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork);</pre>
+<p>
+Duplicates <em class="parameter"><code>artwork</code></em></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>artwork</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a new copy of <em class="parameter"><code>artwork</code></em>
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.3.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2734652"></a><h3>
+<a name="itdb-artwork-free"></a>itdb_artwork_free ()</h3>
+<a class="indexterm" name="id2734666"></a><pre class="programlisting">void                itdb_artwork_free                   (<a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork);</pre>
+<p>
+Frees memory used by <em class="parameter"><code>artwork</code></em></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>artwork</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a>
+</td>
+</tr></tbody>
+</table></div>
+<p class="since">Since  0.3.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2734735"></a><h3>
+<a name="itdb-artwork-get-pixbuf"></a>itdb_artwork_get_pixbuf ()</h3>
+<a class="indexterm" name="id2734748"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>            itdb_artwork_get_pixbuf             (<a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
+                                                         <a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> width,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> height);</pre>
+<p>
+Returns a <a
+href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
+><span class="type">GdkPixbuf</span></a> representing the thumbnail stored in <em class="parameter"><code>artwork</code></em>
+scaling it if appropriate. If either height or width is -1, then the
+biggest unscaled thumbnail available will be returned</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></p></td>
+<td>     an <a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>artwork</code></em>&#160;:</span></p></td>
+<td>    an <a class="link" href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>width</code></em>&#160;:</span></p></td>
+<td>      width of the pixbuf to retrieve, -1 for the biggest
+             possible size and 0 for the smallest possible size (with no
+             scaling)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>height</code></em>&#160;:</span></p></td>
+<td>     height of the pixbuf to retrieve, -1 for the biggest possible
+             size and 0 for the smallest possible size (with no scaling)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a <a
+href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
+><span class="type">GdkPixbuf</span></a> that must be unreffed when no longer used, NULL
+if no artwork could be found or if libgpod is compiled without GdkPixbuf
+support
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.7.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2734922"></a><h3>
+<a name="itdb-artwork-set-thumbnail"></a>itdb_artwork_set_thumbnail ()</h3>
+<a class="indexterm" name="id2734936"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_artwork_set_thumbnail          (<a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *filename,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> rotation,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
+<p>
+Appends a thumbnail of type <em class="parameter"><code>type</code></em> to existing thumbnails in <em class="parameter"><code>artwork</code></em>. No
+data is read from <em class="parameter"><code>filename</code></em> yet, the file will be when <em class="parameter"><code>artwork</code></em> is saved to
+disk. <em class="parameter"><code>filename</code></em> must still exist when that happens.
+</p>
+<p>
+For the rotation angle you can also use the gdk constants
+<code class="literal">GDK_PIXBUF_ROTATE_NONE</code>, <code class="literal">GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE</code>,
+<code class="literal">GDK_PIXBUF_ROTATE_UPSIDEDOWN</code>, AND <code class="literal">GDK_PIXBUF_ROTATE_CLOCKWISE</code>.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>artwork</code></em>&#160;:</span></p></td>
+<td>    an <a class="link" href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></p></td>
+<td>   image file to use to create the thumbnail
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>rotation</code></em>&#160;:</span></p></td>
+<td>   angle by which the image should be rotated
+             counterclockwise. Valid values are 0, 90, 180 and 270.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>      return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> TRUE if the thumbnail could be successfully added, FALSE
+otherwise. <em class="parameter"><code>error</code></em> is set appropriately.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.7.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2743315"></a><h3>
+<a name="itdb-artwork-set-thumbnail-from-data"></a>itdb_artwork_set_thumbnail_from_data ()</h3>
+<a class="indexterm" name="id2743327"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_artwork_set_thumbnail_from_data
+                                                        (<a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guchar"
+>guchar</a> *image_data,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"
+>gsize</a> image_data_len,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> rotation,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
+<p>
+Set a thumbnail in <em class="parameter"><code>artwork</code></em>. No data is processed yet. This will be done when
+<em class="parameter"><code>artwork</code></em> is saved to disk.
+</p>
+<p>
+For the rotation angle you can also use the gdk constants
+<code class="literal">GDK_PIXBUF_ROTATE_NONE</code>, <code class="literal">GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE</code>,
+<code class="literal">GDK_PIXBUF_ROTATE_UPSIDEDOWN</code>, AND <code class="literal">GDK_PIXBUF_ROTATE_CLOCKWISE</code>.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>artwork</code></em>&#160;:</span></p></td>
+<td>        an <a class="link" href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>image_data</code></em>&#160;:</span></p></td>
+<td>     data used to create the thumbnail (the raw contents of
+                 an image file)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>image_data_len</code></em>&#160;:</span></p></td>
+<td> length of above data block
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>rotation</code></em>&#160;:</span></p></td>
+<td>       angle by which the image should be rotated
+                 counterclockwise. Valid values are 0, 90, 180 and 270.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>          return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> TRUE if the thumbnail could be successfully added, FALSE
+otherwise. <em class="parameter"><code>error</code></em> is set appropriately.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.7.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2743536"></a><h3>
+<a name="itdb-artwork-set-thumbnail-from-pixbuf"></a>itdb_artwork_set_thumbnail_from_pixbuf ()</h3>
+<a class="indexterm" name="id2743551"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_artwork_set_thumbnail_from_pixbuf
+                                                        (<a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a> pixbuf,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> rotation,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
+<p>
+Set a thumbnail in <em class="parameter"><code>artwork</code></em>. No data is generated from <em class="parameter"><code>pixbuf</code></em> yet, it will
+be done when <em class="parameter"><code>artwork</code></em> is saved to disk. <em class="parameter"><code>pixbuf</code></em> is ref'ed by this function,
+but is not copied, so it should not be modified before the database is saved.
+</p>
+<p>
+For the rotation angle you can also use the gdk constants
+<code class="literal">GDK_PIXBUF_ROTATE_NONE</code>, <code class="literal">GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE</code>,
+<code class="literal">GDK_PIXBUF_ROTATE_UPSIDEDOWN</code>, AND <code class="literal">GDK_PIXBUF_ROTATE_CLOCKWISE</code>.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>artwork</code></em>&#160;:</span></p></td>
+<td>    an <a class="link" href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>pixbuf</code></em>&#160;:</span></p></td>
+<td>     <a
+href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
+><span class="type">GdkPixbuf</span></a> to use to create the thumbnail
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>rotation</code></em>&#160;:</span></p></td>
+<td>   angle by which the image should be rotated
+             counterclockwise. Valid values are 0, 90, 180 and 270.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>      return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> TRUE if the thumbnail could be successfully added, FALSE
+otherwise. <em class="parameter"><code>error</code></em> is set appropriately.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.7.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2743763"></a><h3>
+<a name="itdb-artwork-remove-thumbnails"></a>itdb_artwork_remove_thumbnails ()</h3>
+<a class="indexterm" name="id2743777"></a><pre class="programlisting">void                itdb_artwork_remove_thumbnails      (<a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *artwork);</pre>
+<p>
+Removes all thumbnails from <em class="parameter"><code>artwork</code></em></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>artwork</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a>
+</td>
+</tr></tbody>
+</table></div>
+<p class="since">Since  0.3.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2743839"></a><h3>
+<a name="Itdb-Thumb"></a>Itdb_Thumb</h3>
+<a class="indexterm" name="id2743851"></a><pre class="programlisting">typedef struct {
+    ItdbThumbDataType data_type;
+    guint rotation;
+} Itdb_Thumb;
+</pre>
+<p>
+This is an opaque structure representing a thumbnail to be
+transferred to the ipod or read from the ipod.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term">ItdbThumbDataType&#160;<em class="structfield"><code>data_type</code></em>;</span></p></td>
+<td> The type of data (file, memory, pixbuf, ipod, etc.)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"
+>guint</a>&#160;<em class="structfield"><code>rotation</code></em>;</span></p></td>
+<td>  Angle by which the image is rotated counterclockwise
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.3.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2743920"></a><h3>
+<a name="itdb-thumb-duplicate"></a>itdb_thumb_duplicate ()</h3>
+<a class="indexterm" name="id2743932"></a><pre class="programlisting"><a class="link" href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a>*         itdb_thumb_duplicate                (<a class="link" href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a> *thumb);</pre>
+<p>
+Duplicates the data contained in <em class="parameter"><code>thumb</code></em></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>thumb</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Artwork.html#Itdb-Thumb"><span class="type">Itdb_Thumb</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a newly allocated copy of <em class="parameter"><code>thumb</code></em> to be freed with
+<a class="link" href="libgpod-Artwork.html#itdb-thumb-free"><code class="function">itdb_thumb_free()</code></a> after use
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.3.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2744017"></a><h3>
+<a name="itdb-thumb-free"></a>itdb_thumb_free ()</h3>
+<a class="indexterm" name="id2744029"></a><pre class="programlisting">void                itdb_thumb_free                     (<a class="link" href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a> *thumb);</pre>
+<p>
+Frees the memory used by <em class="parameter"><code>thumb</code></em></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>thumb</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Artwork.html#Itdb-Thumb"><span class="type">Itdb_Thumb</span></a>
+</td>
+</tr></tbody>
+</table></div>
+<p class="since">Since  0.3.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2744090"></a><h3>
+<a name="itdb-thumb-to-pixbuf-at-size"></a>itdb_thumb_to_pixbuf_at_size ()</h3>
+<a class="indexterm" name="id2744104"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>            itdb_thumb_to_pixbuf_at_size        (<a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
+                                                         <a class="link" href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a> *thumb,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> width,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> height);</pre>
+<p>
+Converts <em class="parameter"><code>thumb</code></em> to a <a
+href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
+><span class="type">GdkPixbuf</span></a>.
+</p>
+<p>
+</p>
+<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
+<h3 class="title">Note</h3>
+Since we want to have gdk-pixbuf dependency optional, a generic
+gpointer is returned which you have to cast to a <a
+href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
+><span class="type">GdkPixbuf</span></a> using
+<code class="function">GDK_PIXBUF()</code> yourself.
+</div>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>thumb</code></em>&#160;:</span></p></td>
+<td>  an <a class="link" href="libgpod-Artwork.html#Itdb-Thumb"><span class="type">Itdb_Thumb</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>width</code></em>&#160;:</span></p></td>
+<td>  width of the pixbuf to retrieve, -1 for the biggest
+         possible size and 0 for the smallest possible size (with no scaling)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>height</code></em>&#160;:</span></p></td>
+<td> height of the pixbuf to retrieve, -1 for the biggest possible size
+         and 0 for the smallest possible size (with no scaling)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a <a
+href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
+><span class="type">GdkPixbuf</span></a> that must be unreffed with <a
+href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-refcounting.html#gdk-pixbuf-unref"
+><code class="function">gdk_pixbuf_unref()</code></a>
+after use, or NULL if the creation of the gdk-pixbuf failed or if
+libgpod was compiled without gdk-pixbuf support.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.7.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2744289"></a><h3>
+<a name="itdb-thumb-to-pixbufs"></a>itdb_thumb_to_pixbufs ()</h3>
+<a class="indexterm" name="id2744302"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
+>GList</a>*              itdb_thumb_to_pixbufs               (<a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
+                                                         <a class="link" href="libgpod-Artwork.html#Itdb-Thumb">Itdb_Thumb</a> *thumb);</pre>
+<p>
+Converts <em class="parameter"><code>thumb</code></em> to a <a
+href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
+><span class="type">GList</span></a> of <a
+href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
+><span class="type">GdkPixbuf</span></a>. The returned <a
+href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
+><span class="type">GList</span></a> will
+generally contain only 1 element, the full-size pixbuf associated with
+<em class="parameter"><code>thumb</code></em>, but when the artwork has been read from the ipod and hasn't been
+modified from the library, then the returned <a
+href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
+><span class="type">GList</span></a> will contain several
+<a
+href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
+><span class="type">GdkPixbuf</span></a> corresponding to the various thumbnail sizes that were
+written to the iPod database.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>thumb</code></em>&#160;:</span></p></td>
+<td>  an <a class="link" href="libgpod-Artwork.html#Itdb-Thumb"><span class="type">Itdb_Thumb</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a <a
+href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
+><span class="type">GList</span></a> of <a
+href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
+><span class="type">GdkPixbuf</span></a> which are associated with <em class="parameter"><code>thumb</code></em>, NULL
+if the pixbuf was invalid or if libgpod is compiled without gdk-pixbuf
+support. The <a
+href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
+><span class="type">GdkPixbuf</span></a> must be unreffed with <a
+href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-refcounting.html#gdk-pixbuf-unref"
+><code class="function">gdk_pixbuf_unref()</code></a> after use
+and the <a
+href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
+><span class="type">GList</span></a> must be freed with <a
+href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#g-list-free"
+><code class="function">g_list_free()</code></a>.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.7.0
+</p>
+</div>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2744489"></a><h2>See Also</h2>
+<p>
+<a class="link" href="photodb.html" title="Part&#160;II.&#160;Photo database">Photo database</a>
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2744504"></a><div class="refsect2" lang="en"><a name="id2744505"></a></div>
+<hr>
+<div class="refsect2" lang="en"><a name="id2744506"></a></div>
+</div>
+</div>
+</body>
+</html>

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-Chapter-Data.html
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-Chapter-Data.html	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-Chapter-Data.html	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,485 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Chapter Data</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="index.html" title="libgpod Reference Manual">
+<link rel="up" href="ch01.html" title="iPod database components">
+<link rel="prev" href="libgpod-Artwork.html" title="Artwork">
+<link rel="next" href="libgpod-Device.html" title="Device">
+<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+<link rel="part" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
+<link rel="chapter" href="ch01.html" title="iPod database components">
+<link rel="part" href="photodb.html" title="Part&#160;II.&#160;Photo database">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="libgpod-Artwork.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">libgpod Reference Manual</th>
+<td><a accesskey="n" href="libgpod-Device.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2680707" class="shortcut">Top</a>
+                  &#160;|&#160;
+                  <a href="#id2730404" class="shortcut">Description</a></nobr></td></tr>
+</table>
+<div class="refentry" lang="en">
+<a name="libgpod-Chapter-Data"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2>
+<a name="id2680707"></a><span class="refentrytitle">Chapter Data</span>
+</h2>
+<p>Chapter Data &#8212; Data structure to store chapter data for tracks</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<pre class="synopsis">
+
+
+
+                    <a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapter">Itdb_Chapter</a>;
+                    <a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata">Itdb_Chapterdata</a>;
+<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapter">Itdb_Chapter</a>*       <a class="link" href="libgpod-Chapter-Data.html#itdb-chapter-new">itdb_chapter_new</a>                    (void);
+<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapter">Itdb_Chapter</a>*       <a class="link" href="libgpod-Chapter-Data.html#itdb-chapter-duplicate">itdb_chapter_duplicate</a>              (<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapter">Itdb_Chapter</a> *chapter);
+void                <a class="link" href="libgpod-Chapter-Data.html#itdb-chapter-free">itdb_chapter_free</a>                   (<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapter">Itdb_Chapter</a> *chapter);
+<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata">Itdb_Chapterdata</a>*   <a class="link" href="libgpod-Chapter-Data.html#itdb-chapterdata-new">itdb_chapterdata_new</a>                (void);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Chapter-Data.html#itdb-chapterdata-add-chapter">itdb_chapterdata_add_chapter</a>        (<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata">Itdb_Chapterdata</a> *chapterdata,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a> startpos,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *chaptertitle);
+<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata">Itdb_Chapterdata</a>*   <a class="link" href="libgpod-Chapter-Data.html#itdb-chapterdata-duplicate">itdb_chapterdata_duplicate</a>          (<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata">Itdb_Chapterdata</a> *chapterdata);
+void                <a class="link" href="libgpod-Chapter-Data.html#itdb-chapterdata-remove-chapter">itdb_chapterdata_remove_chapter</a>     (<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata">Itdb_Chapterdata</a> *chapterdata,
+                                                         <a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapter">Itdb_Chapter</a> *chapter);
+void                <a class="link" href="libgpod-Chapter-Data.html#itdb-chapterdata-remove-chapters">itdb_chapterdata_remove_chapters</a>    (<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata">Itdb_Chapterdata</a> *chapterdata);
+void                <a class="link" href="libgpod-Chapter-Data.html#itdb-chapterdata-free">itdb_chapterdata_free</a>               (<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata">Itdb_Chapterdata</a> *chapterdata);
+</pre>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2730404"></a><h2>Description</h2>
+<p>
+Chapters allow for a large file to be divided into sections.  The start and stop
+points in the track are defined here, as well as the title for each chapter.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2730422"></a><h2>Details</h2>
+<div class="refsect2" lang="en">
+<a name="id2729895"></a><h3>
+<a name="Itdb-Chapter"></a>Itdb_Chapter</h3>
+<a class="indexterm" name="id2729910"></a><pre class="programlisting">typedef struct {
+    guint32 startpos;
+    gchar *chaptertitle;
+    /* reserved for future use */
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+} Itdb_Chapter;
+</pre>
+<p>
+Structure representing an iTunesDB Chapter</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>startpos</code></em>;</span></p></td>
+<td>      The start position of the chapter in ms. The first chapter
+                begins at 1.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>chaptertitle</code></em>;</span></p></td>
+<td>  The chapter title in UTF8
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int1</code></em>;</span></p></td>
+<td> Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int2</code></em>;</span></p></td>
+<td> Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved1</code></em>;</span></p></td>
+<td>     Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved2</code></em>;</span></p></td>
+<td>     Reserved for future use
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.7.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2740762"></a><h3>
+<a name="Itdb-Chapterdata"></a>Itdb_Chapterdata</h3>
+<a class="indexterm" name="id2740776"></a><pre class="programlisting">typedef struct {
+    GList *chapters;
+    guint32 unk024;
+    guint32 unk028;
+    guint32 unk032;
+    /* reserved for future use */
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+} Itdb_Chapterdata;
+</pre>
+<p>
+Structure representing iTunesDB Chapter data</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
+>GList</a>&#160;*<em class="structfield"><code>chapters</code></em>;</span></p></td>
+<td>      A list of chapters (<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapter"><span class="type">Itdb_Chapter</span></a>)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk024</code></em>;</span></p></td>
+<td>        Unknown
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk028</code></em>;</span></p></td>
+<td>        Unknown
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk032</code></em>;</span></p></td>
+<td>        Unknown
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int1</code></em>;</span></p></td>
+<td> Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int2</code></em>;</span></p></td>
+<td> Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved1</code></em>;</span></p></td>
+<td>     Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved2</code></em>;</span></p></td>
+<td>     Reserved for future use
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.7.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2734118"></a><h3>
+<a name="itdb-chapter-new"></a>itdb_chapter_new ()</h3>
+<a class="indexterm" name="id2734133"></a><pre class="programlisting"><a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapter">Itdb_Chapter</a>*       itdb_chapter_new                    (void);</pre>
+<p>
+Creates a new <a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapter"><span class="type">Itdb_Chapter</span></a></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> newly allocated <a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapter"><span class="type">Itdb_Chapter</span></a> to be freed with <a class="link" href="libgpod-Chapter-Data.html#itdb-chapter-free"><code class="function">itdb_chapter_free()</code></a>
+after use
+
+</td>
+</tr></tbody>
+</table></div>
+<p class="since">Since  0.7.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2734204"></a><h3>
+<a name="itdb-chapter-duplicate"></a>itdb_chapter_duplicate ()</h3>
+<a class="indexterm" name="id2734217"></a><pre class="programlisting"><a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapter">Itdb_Chapter</a>*       itdb_chapter_duplicate              (<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapter">Itdb_Chapter</a> *chapter);</pre>
+<p>
+Duplicates the data contained in <em class="parameter"><code>chapter</code></em></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>chapter</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapter"><span class="type">Itdb_Chapter</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a newly allocated copy of <em class="parameter"><code>chapter</code></em> to be freed with
+<a class="link" href="libgpod-Chapter-Data.html#itdb-chapter-free"><code class="function">itdb_chapter_free()</code></a> after use
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.7.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2733627"></a><h3>
+<a name="itdb-chapter-free"></a>itdb_chapter_free ()</h3>
+<a class="indexterm" name="id2733642"></a><pre class="programlisting">void                itdb_chapter_free                   (<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapter">Itdb_Chapter</a> *chapter);</pre>
+<p>
+Frees the memory used by <em class="parameter"><code>chapter</code></em></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>chapter</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapter"><span class="type">Itdb_Chapter</span></a>
+</td>
+</tr></tbody>
+</table></div>
+<p class="since">Since  0.7.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2733710"></a><h3>
+<a name="itdb-chapterdata-new"></a>itdb_chapterdata_new ()</h3>
+<a class="indexterm" name="id2733724"></a><pre class="programlisting"><a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata">Itdb_Chapterdata</a>*   itdb_chapterdata_new                (void);</pre>
+<p>
+Creates a new <a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata"><span class="type">Itdb_Chapterdata</span></a></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a new <a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata"><span class="type">Itdb_Chapterdata</span></a> to be freed with
+              <a class="link" href="libgpod-Chapter-Data.html#itdb-chapterdata-free"><code class="function">itdb_chapterdata_free()</code></a> when no longer needed
+
+</td>
+</tr></tbody>
+</table></div>
+<p class="since">Since  0.7.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2733793"></a><h3>
+<a name="itdb-chapterdata-add-chapter"></a>itdb_chapterdata_add_chapter ()</h3>
+<a class="indexterm" name="id2733808"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_chapterdata_add_chapter        (<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata">Itdb_Chapterdata</a> *chapterdata,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a> startpos,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *chaptertitle);</pre>
+<p>
+Appends a chapter to existing chapters in <em class="parameter"><code>chapterdata</code></em>.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>chapterdata</code></em>&#160;:</span></p></td>
+<td>  an <a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata"><span class="type">Itdb_Chapterdata</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>startpos</code></em>&#160;:</span></p></td>
+<td>     chapter start time in milliseconds
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>chaptertitle</code></em>&#160;:</span></p></td>
+<td> chapter title
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> TRUE if the chapter could be successfully added, FALSE
+otherwise.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.7.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2738991"></a><h3>
+<a name="itdb-chapterdata-duplicate"></a>itdb_chapterdata_duplicate ()</h3>
+<a class="indexterm" name="id2739005"></a><pre class="programlisting"><a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata">Itdb_Chapterdata</a>*   itdb_chapterdata_duplicate          (<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata">Itdb_Chapterdata</a> *chapterdata);</pre>
+<p>
+Duplicates <em class="parameter"><code>chapterdata</code></em></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>chapterdata</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata"><span class="type">Itdb_Chapterdata</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a new copy of <em class="parameter"><code>chapterdata</code></em>
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.7.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2739090"></a><h3>
+<a name="itdb-chapterdata-remove-chapter"></a>itdb_chapterdata_remove_chapter ()</h3>
+<a class="indexterm" name="id2739106"></a><pre class="programlisting">void                itdb_chapterdata_remove_chapter     (<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata">Itdb_Chapterdata</a> *chapterdata,
+                                                         <a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapter">Itdb_Chapter</a> *chapter);</pre>
+<p>
+Removes <em class="parameter"><code>chapter</code></em> from <em class="parameter"><code>chapterdata</code></em>. The memory used by <em class="parameter"><code>chapter</code></em> is freed.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>chapterdata</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata"><span class="type">Itdb_Chapterdata</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>chapter</code></em>&#160;:</span></p></td>
+<td>     an <a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapter"><span class="type">Itdb_Chapter</span></a>
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.7.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2739217"></a><h3>
+<a name="itdb-chapterdata-remove-chapters"></a>itdb_chapterdata_remove_chapters ()</h3>
+<a class="indexterm" name="id2739233"></a><pre class="programlisting">void                itdb_chapterdata_remove_chapters    (<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata">Itdb_Chapterdata</a> *chapterdata);</pre>
+<p>
+Removes all chapters from <em class="parameter"><code>chapterdata</code></em></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>chapterdata</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata"><span class="type">Itdb_Chapterdata</span></a>
+</td>
+</tr></tbody>
+</table></div>
+<p class="since">Since  0.7.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2739302"></a><h3>
+<a name="itdb-chapterdata-free"></a>itdb_chapterdata_free ()</h3>
+<a class="indexterm" name="id2739316"></a><pre class="programlisting">void                itdb_chapterdata_free               (<a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata">Itdb_Chapterdata</a> *chapterdata);</pre>
+<p>
+Frees memory used by <em class="parameter"><code>chapterdata</code></em></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>chapterdata</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata"><span class="type">Itdb_Chapterdata</span></a>
+</td>
+</tr></tbody>
+</table></div>
+<p class="since">Since  0.7.0
+</p>
+</div>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2739386"></a><div class="refsect2" lang="en"><a name="id2739387"></a></div>
+<hr>
+<div class="refsect2" lang="en"><a name="id2739388"></a></div>
+</div>
+</div>
+</body>
+</html>

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-Device.html
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-Device.html	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-Device.html	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,1366 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Device</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="index.html" title="libgpod Reference Manual">
+<link rel="up" href="ch01.html" title="iPod database components">
+<link rel="prev" href="libgpod-Chapter-Data.html" title="Chapter Data">
+<link rel="next" href="photodb.html" title="Part&#160;II.&#160;Photo database">
+<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+<link rel="part" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
+<link rel="chapter" href="ch01.html" title="iPod database components">
+<link rel="part" href="photodb.html" title="Part&#160;II.&#160;Photo database">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="libgpod-Chapter-Data.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">libgpod Reference Manual</th>
+<td><a accesskey="n" href="photodb.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2708554" class="shortcut">Top</a>
+                  &#160;|&#160;
+                  <a href="#id2739667" class="shortcut">Description</a></nobr></td></tr>
+</table>
+<div class="refentry" lang="en">
+<a name="libgpod-Device"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2>
+<a name="id2708554"></a><span class="refentrytitle">Device</span>
+</h2>
+<p>Device &#8212; Data structure holding information about the iPod (model, mount point, etc.)</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<pre class="synopsis">
+
+
+
+                    <a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a>;
+<a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a>*        <a class="link" href="libgpod-Device.html#itdb-device-new">itdb_device_new</a>                     (void);
+void                <a class="link" href="libgpod-Device.html#itdb-device-free">itdb_device_free</a>                    (<a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);
+void                <a class="link" href="libgpod-Device.html#itdb-device-set-mountpoint">itdb_device_set_mountpoint</a>          (<a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mp);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Device.html#itdb-device-supports-artwork">itdb_device_supports_artwork</a>        (const <a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Device.html#itdb-device-supports-chapter-image">itdb_device_supports_chapter_image</a>  (const <a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Device.html#itdb-device-supports-photo">itdb_device_supports_photo</a>          (const <a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Device.html#itdb-device-supports-podcast">itdb_device_supports_podcast</a>        (const <a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Device.html#itdb-device-supports-video">itdb_device_supports_video</a>          (const <a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);
+                    <a class="link" href="libgpod-Device.html#Itdb-IpodInfo">Itdb_IpodInfo</a>;
+const <a class="link" href="libgpod-Device.html#Itdb-IpodInfo">Itdb_IpodInfo</a>* <a class="link" href="libgpod-Device.html#itdb-device-get-ipod-info">itdb_device_get_ipod_info</a>          (const <a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);
+const <a class="link" href="libgpod-Device.html#Itdb-IpodInfo">Itdb_IpodInfo</a>* <a class="link" href="libgpod-Device.html#itdb-info-get-ipod-info-table">itdb_info_get_ipod_info_table</a>      (void);
+enum                <a class="link" href="libgpod-Device.html#Itdb-IpodGeneration">Itdb_IpodGeneration</a>;
+const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*        <a class="link" href="libgpod-Device.html#itdb-info-get-ipod-generation-string">itdb_info_get_ipod_generation_string</a>
+                                                        (<a class="link" href="libgpod-Device.html#Itdb-IpodGeneration">Itdb_IpodGeneration</a> generation);
+enum                <a class="link" href="libgpod-Device.html#Itdb-IpodModel">Itdb_IpodModel</a>;
+const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*        <a class="link" href="libgpod-Device.html#itdb-info-get-ipod-model-name-string">itdb_info_get_ipod_model_name_string</a>
+                                                        (<a class="link" href="libgpod-Device.html#Itdb-IpodModel">Itdb_IpodModel</a> model);
+                    <a class="link" href="libgpod-Device.html#Itdb-ArtworkFormat">Itdb_ArtworkFormat</a>;
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Device.html#itdb-device-read-sysinfo">itdb_device_read_sysinfo</a>            (<a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              <a class="link" href="libgpod-Device.html#itdb-device-get-sysinfo">itdb_device_get_sysinfo</a>             (const <a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *field);
+void                <a class="link" href="libgpod-Device.html#itdb-device-set-sysinfo">itdb_device_set_sysinfo</a>             (<a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *field,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *value);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Device.html#itdb-device-write-sysinfo">itdb_device_write_sysinfo</a>           (<a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+</pre>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2739667"></a><h2>Description</h2>
+<p>
+These functions are for reading and setting information about the iPod.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2739683"></a><h2>Details</h2>
+<div class="refsect2" lang="en">
+<a name="id2739694"></a><h3>
+<a name="Itdb-Device"></a>Itdb_Device</h3>
+<a class="indexterm" name="id2739708"></a><pre class="programlisting">typedef struct {
+    gchar *mountpoint;
+    gint   musicdirs;
+    guint  byte_order;
+    GHashTable *sysinfo;
+    SysInfoIpodProperties *sysinfo_extended;
+    gboolean sysinfo_changed;
+    gint timezone_shift;
+} Itdb_Device;
+</pre>
+<p>
+Structure representing an iPod device</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>mountpoint</code></em>;</span></p></td>
+<td>         The mountpoint of the iPod
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a>&#160;<em class="structfield"><code>musicdirs</code></em>;</span></p></td>
+<td>          The number of /iPod_Control/Music/F.. dirs
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"
+>guint</a>&#160;<em class="structfield"><code>byte_order</code></em>;</span></p></td>
+<td>         G_LITTLE_ENDIAN "regular" endianness G_BIG_ENDIAN
+                     "reversed" endianness (e.g. mobile phone iTunesDBs)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Hash-Tables.html#GHashTable"
+>GHashTable</a>&#160;*<em class="structfield"><code>sysinfo</code></em>;</span></p></td>
+<td>            A hash with key/value pairs of all entries in
+                     Device/SysInfo
+</td>
+</tr>
+<tr>
+<td><p><span class="term">SysInfoIpodProperties&#160;*<em class="structfield"><code>sysinfo_extended</code></em>;</span></p></td>
+<td>   The parsed content of SysInfoExtended, which can be NULL
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>&#160;<em class="structfield"><code>sysinfo_changed</code></em>;</span></p></td>
+<td>    True if the sysinfo hash been changed by the user, false
+                     otherwise.  (see <code class="function">itdb_set_sysinfo()</code>)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a>&#160;<em class="structfield"><code>timezone_shift</code></em>;</span></p></td>
+<td>     The difference in seconds between the current timezone
+                     and UTC
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2739905"></a><h3>
+<a name="itdb-device-new"></a>itdb_device_new ()</h3>
+<a class="indexterm" name="id2739920"></a><pre class="programlisting"><a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a>*        itdb_device_new                     (void);</pre>
+<p>
+Creates a new <a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a> structure</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a newly allocated <a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a> which must be freed with
+<a class="link" href="libgpod-Device.html#itdb-device-free"><code class="function">itdb_device_free()</code></a> when no longer needed
+
+</td>
+</tr></tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2746185"></a><h3>
+<a name="itdb-device-free"></a>itdb_device_free ()</h3>
+<a class="indexterm" name="id2746200"></a><pre class="programlisting">void                itdb_device_free                    (<a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);</pre>
+<p>
+Frees memory used by <em class="parameter"><code>device</code></em></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
+</td>
+</tr></tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2746268"></a><h3>
+<a name="itdb-device-set-mountpoint"></a>itdb_device_set_mountpoint ()</h3>
+<a class="indexterm" name="id2746282"></a><pre class="programlisting">void                itdb_device_set_mountpoint          (<a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mp);</pre>
+<p>
+Sets the mountpoint of <em class="parameter"><code>device</code></em> to <em class="parameter"><code>mp</code></em> and update the cached device 
+information (in particular, re-read the SysInfo file)
+</p>
+<p>
+</p>
+<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
+<h3 class="title">Warning</h3>
+<p>Calling this function invalidates all the artwork in the
+<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> database using this <a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>. Trying to access this
+artwork will result in memory corruption. It's recommended to use
+<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-set-mountpoint"><code class="function">itdb_set_mountpoint()</code></a> instead which will clean the invalidated artwork
+for you.</p>
+</div>
+<p>.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mp</code></em>&#160;:</span></p></td>
+<td>     the new mount point
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2746415"></a><h3>
+<a name="itdb-device-supports-artwork"></a>itdb_device_supports_artwork ()</h3>
+<a class="indexterm" name="id2746430"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_device_supports_artwork        (const <a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);</pre>
+<p>
+Indicates whether <em class="parameter"><code>device</code></em> can display artwork or not. When dealing
+with a non-art capable iPod, no artwork data will be written to the
+iPod so you can spare calls to the artwork handling methods.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> true if <em class="parameter"><code>device</code></em> can display artwork.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.5.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2746520"></a><h3>
+<a name="itdb-device-supports-chapter-image"></a>itdb_device_supports_chapter_image ()</h3>
+<a class="indexterm" name="id2746535"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_device_supports_chapter_image  (const <a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);</pre>
+<p>
+Indicates whether <em class="parameter"><code>device</code></em> can display chapter images or not.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> true if <em class="parameter"><code>device</code></em> can display chapter images.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.7.2
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2746622"></a><h3>
+<a name="itdb-device-supports-photo"></a>itdb_device_supports_photo ()</h3>
+<a class="indexterm" name="id2746636"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_device_supports_photo          (const <a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);</pre>
+<p>
+Indicates whether <em class="parameter"><code>device</code></em> can display photos or not.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> true if <em class="parameter"><code>device</code></em> can display photos.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.5.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2746722"></a><h3>
+<a name="itdb-device-supports-podcast"></a>itdb_device_supports_podcast ()</h3>
+<a class="indexterm" name="id2746738"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_device_supports_podcast        (const <a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);</pre>
+<p>
+Indicates whether <em class="parameter"><code>device</code></em> can play podcasts or not.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> true if <em class="parameter"><code>device</code></em> can play podcasts.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.7.2
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2746824"></a><h3>
+<a name="itdb-device-supports-video"></a>itdb_device_supports_video ()</h3>
+<a class="indexterm" name="id2746838"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_device_supports_video          (const <a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);</pre>
+<p>
+Indicates whether <em class="parameter"><code>device</code></em> can play videos or not.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> true if <em class="parameter"><code>device</code></em> can play videos.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.7.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2746925"></a><h3>
+<a name="Itdb-IpodInfo"></a>Itdb_IpodInfo</h3>
+<a class="indexterm" name="id2746939"></a><pre class="programlisting">typedef struct {
+    const gchar *model_number;
+    const double capacity;
+    const Itdb_IpodModel ipod_model;
+    const Itdb_IpodGeneration ipod_generation;
+    const guint musicdirs;
+    /* reserved for future use */
+    const gint32 reserved_int1;
+    const gint32 reserved_int2;
+    gconstpointer reserved1;
+    gconstpointer reserved2;
+} Itdb_IpodInfo;
+</pre>
+<p>
+Structure representing information about an iPod</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term">const&#160;<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>model_number</code></em>;</span></p></td>
+<td>    The model number.  This is abbreviated.  If the first
+                  character is not numeric, it is ommited. e.g.
+                  "MA350 -&gt; A350", "M9829 -&gt; 9829"
+</td>
+</tr>
+<tr>
+<td><p><span class="term">const&#160;double&#160;<em class="structfield"><code>capacity</code></em>;</span></p></td>
+<td>        The iPod's capacity in gigabytes
+</td>
+</tr>
+<tr>
+<td><p><span class="term">const&#160;<a class="link" href="libgpod-Device.html#Itdb-IpodModel">Itdb_IpodModel</a>&#160;<em class="structfield"><code>ipod_model</code></em>;</span></p></td>
+<td>      The iPod model
+</td>
+</tr>
+<tr>
+<td><p><span class="term">const&#160;<a class="link" href="libgpod-Device.html#Itdb-IpodGeneration">Itdb_IpodGeneration</a>&#160;<em class="structfield"><code>ipod_generation</code></em>;</span></p></td>
+<td> The iPod generation
+</td>
+</tr>
+<tr>
+<td><p><span class="term">const&#160;<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"
+>guint</a>&#160;<em class="structfield"><code>musicdirs</code></em>;</span></p></td>
+<td>       The number of music (Fnn) dirs created by iTunes. The
+                  exact number seems to be version dependent. Therefore, the
+                  numbers here represent a mixture of reported values and
+                  common sense.  Note: this number does not necessarily
+                  represent the number of dirs present on a particular iPod.
+                  It is used when setting up a new iPod from scratch.
+</td>
+</tr>
+<tr>
+<td><p><span class="term">const&#160;<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int1</code></em>;</span></p></td>
+<td>   Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term">const&#160;<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int2</code></em>;</span></p></td>
+<td>   Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gconstpointer"
+>gconstpointer</a>&#160;<em class="structfield"><code>reserved1</code></em>;</span></p></td>
+<td>       Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gconstpointer"
+>gconstpointer</a>&#160;<em class="structfield"><code>reserved2</code></em>;</span></p></td>
+<td>       Reserved for future use
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2747183"></a><h3>
+<a name="itdb-device-get-ipod-info"></a>itdb_device_get_ipod_info ()</h3>
+<a class="indexterm" name="id2747198"></a><pre class="programlisting">const <a class="link" href="libgpod-Device.html#Itdb-IpodInfo">Itdb_IpodInfo</a>* itdb_device_get_ipod_info          (const <a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);</pre>
+<p>
+Retrieve the <a class="link" href="libgpod-Device.html#Itdb-IpodInfo"><span class="type">Itdb_IpodInfo</span></a> entry for this iPod</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> the <a class="link" href="libgpod-Device.html#Itdb-IpodInfo"><span class="type">Itdb_IpodInfo</span></a> entry for this iPod
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2747288"></a><h3>
+<a name="itdb-info-get-ipod-info-table"></a>itdb_info_get_ipod_info_table ()</h3>
+<a class="indexterm" name="id2747303"></a><pre class="programlisting">const <a class="link" href="libgpod-Device.html#Itdb-IpodInfo">Itdb_IpodInfo</a>* itdb_info_get_ipod_info_table      (void);</pre>
+<p>
+Return a pointer to the start of valid iPod model descriptions,
+which is an array of <a class="link" href="libgpod-Device.html#Itdb-IpodInfo"><span class="type">Itdb_IpodInfo</span></a> entries. This can be useful if you
+want to build a list of all iPod models known to the current libgpod.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a pointer to the array of <a class="link" href="libgpod-Device.html#Itdb-IpodInfo"><span class="type">Itdb_IpodInfo</span></a> entries.
+
+</td>
+</tr></tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2747369"></a><h3>
+<a name="Itdb-IpodGeneration"></a>enum Itdb_IpodGeneration</h3>
+<a class="indexterm" name="id2747384"></a><pre class="programlisting">typedef enum {
+    ITDB_IPOD_GENERATION_UNKNOWN,
+    ITDB_IPOD_GENERATION_FIRST,
+    ITDB_IPOD_GENERATION_SECOND,
+    ITDB_IPOD_GENERATION_THIRD,
+    ITDB_IPOD_GENERATION_FOURTH,
+    ITDB_IPOD_GENERATION_PHOTO,
+    ITDB_IPOD_GENERATION_MOBILE,
+    ITDB_IPOD_GENERATION_MINI_1,
+    ITDB_IPOD_GENERATION_MINI_2,
+    ITDB_IPOD_GENERATION_SHUFFLE_1,
+    ITDB_IPOD_GENERATION_SHUFFLE_2,
+    ITDB_IPOD_GENERATION_SHUFFLE_3,
+    ITDB_IPOD_GENERATION_NANO_1,
+    ITDB_IPOD_GENERATION_NANO_2,
+    ITDB_IPOD_GENERATION_NANO_3,
+    ITDB_IPOD_GENERATION_NANO_4,
+    ITDB_IPOD_GENERATION_VIDEO_1,
+    ITDB_IPOD_GENERATION_VIDEO_2,
+    ITDB_IPOD_GENERATION_CLASSIC_1,
+    ITDB_IPOD_GENERATION_CLASSIC_2,
+    ITDB_IPOD_GENERATION_TOUCH_1,
+    ITDB_IPOD_GENERATION_IPHONE_1,
+} Itdb_IpodGeneration;
+</pre>
+<p>
+iPod generation information
+</p>
+<p>
+See http://support.apple.com/kb/HT1353 and http://en.wikipedia.org/wiki/IPod
+for more details.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-UNKNOWN:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_UNKNOWN</code></span></p></td>
+<td>   Unknown iPod
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-FIRST:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_FIRST</code></span></p></td>
+<td>     First Generation iPod
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-SECOND:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_SECOND</code></span></p></td>
+<td>    Second Generation iPod
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-THIRD:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_THIRD</code></span></p></td>
+<td>     Third Generation iPod
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-FOURTH:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_FOURTH</code></span></p></td>
+<td>    Fourth Generation iPod
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-PHOTO:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_PHOTO</code></span></p></td>
+<td>     Photo iPod
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-MOBILE:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_MOBILE</code></span></p></td>
+<td>    Mobile iPod
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-MINI-1:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_MINI_1</code></span></p></td>
+<td>    First Generation iPod Mini
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-MINI-2:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_MINI_2</code></span></p></td>
+<td>    Second Generation iPod Mini
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-SHUFFLE-1:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_SHUFFLE_1</code></span></p></td>
+<td> First Generation iPod Shuffle
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-SHUFFLE-2:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_SHUFFLE_2</code></span></p></td>
+<td> Second Generation iPod Shuffle
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-SHUFFLE-3:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_SHUFFLE_3</code></span></p></td>
+<td> Third Generation iPod Shuffle
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-NANO-1:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_NANO_1</code></span></p></td>
+<td>    First Generation iPod Nano
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-NANO-2:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_NANO_2</code></span></p></td>
+<td>    Second Generation iPod Nano
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-NANO-3:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_NANO_3</code></span></p></td>
+<td>    Third Generation iPod Nano
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-NANO-4:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_NANO_4</code></span></p></td>
+<td>    Fourth Generation iPod Nano
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-VIDEO-1:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_VIDEO_1</code></span></p></td>
+<td>   First Generation iPod Video (aka 5g)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-VIDEO-2:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_VIDEO_2</code></span></p></td>
+<td>   Second Generation iPod Video (aka 5.5g)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-CLASSIC-1:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_CLASSIC_1</code></span></p></td>
+<td> First Generation iPod Classic
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-CLASSIC-2:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_CLASSIC_2</code></span></p></td>
+<td> Second Generation iPod Classic
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-TOUCH-1:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_TOUCH_1</code></span></p></td>
+<td>   First Generation iPod Touch
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-GENERATION-IPHONE-1:CAPS"></a><code class="literal">ITDB_IPOD_GENERATION_IPHONE_1</code></span></p></td>
+<td>  First Generation iPhone
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2747927"></a><h3>
+<a name="itdb-info-get-ipod-generation-string"></a>itdb_info_get_ipod_generation_string ()</h3>
+<a class="indexterm" name="id2747941"></a><pre class="programlisting">const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*        itdb_info_get_ipod_generation_string
+                                                        (<a class="link" href="libgpod-Device.html#Itdb-IpodGeneration">Itdb_IpodGeneration</a> generation);</pre>
+<p>
+Return the iPod's generic generation name, like "First Generation",
+"Mobile Phone"...</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>generation</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Device.html#Itdb-IpodGeneration"><span class="type">Itdb_IpodGeneration</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a pointer to the generation name. This is a static
+string and must not be <a
+href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
+><code class="function">g_free()</code></a>d.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2748030"></a><h3>
+<a name="Itdb-IpodModel"></a>enum Itdb_IpodModel</h3>
+<a class="indexterm" name="id2748044"></a><pre class="programlisting">typedef enum {
+    ITDB_IPOD_MODEL_INVALID,
+    ITDB_IPOD_MODEL_UNKNOWN,
+    ITDB_IPOD_MODEL_COLOR,
+    ITDB_IPOD_MODEL_COLOR_U2,
+    ITDB_IPOD_MODEL_REGULAR,
+    ITDB_IPOD_MODEL_REGULAR_U2,
+    ITDB_IPOD_MODEL_MINI,
+    ITDB_IPOD_MODEL_MINI_BLUE,
+    ITDB_IPOD_MODEL_MINI_PINK,
+    ITDB_IPOD_MODEL_MINI_GREEN,
+    ITDB_IPOD_MODEL_MINI_GOLD,
+    ITDB_IPOD_MODEL_SHUFFLE,
+    ITDB_IPOD_MODEL_NANO_WHITE,
+    ITDB_IPOD_MODEL_NANO_BLACK,
+    ITDB_IPOD_MODEL_VIDEO_WHITE,
+    ITDB_IPOD_MODEL_VIDEO_BLACK,
+    ITDB_IPOD_MODEL_MOBILE_1,
+    ITDB_IPOD_MODEL_VIDEO_U2,
+    ITDB_IPOD_MODEL_NANO_SILVER,
+    ITDB_IPOD_MODEL_NANO_BLUE,
+    ITDB_IPOD_MODEL_NANO_GREEN,
+    ITDB_IPOD_MODEL_NANO_PINK,
+    ITDB_IPOD_MODEL_NANO_RED,
+    ITDB_IPOD_MODEL_NANO_YELLOW,
+    ITDB_IPOD_MODEL_NANO_PURPLE,
+    ITDB_IPOD_MODEL_NANO_ORANGE,
+    ITDB_IPOD_MODEL_IPHONE_1,
+    ITDB_IPOD_MODEL_SHUFFLE_SILVER,
+    ITDB_IPOD_MODEL_SHUFFLE_PINK,
+    ITDB_IPOD_MODEL_SHUFFLE_BLUE,
+    ITDB_IPOD_MODEL_SHUFFLE_GREEN,
+    ITDB_IPOD_MODEL_SHUFFLE_ORANGE,
+    ITDB_IPOD_MODEL_SHUFFLE_PURPLE,
+    ITDB_IPOD_MODEL_SHUFFLE_RED,
+    ITDB_IPOD_MODEL_CLASSIC_SILVER,
+    ITDB_IPOD_MODEL_CLASSIC_BLACK,
+    ITDB_IPOD_MODEL_TOUCH_BLACK,
+} Itdb_IpodModel;
+</pre>
+<p>
+iPod model information</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-INVALID:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_INVALID</code></span></p></td>
+<td>        Invalid model
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-UNKNOWN:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_UNKNOWN</code></span></p></td>
+<td>        Unknown model
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-COLOR:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_COLOR</code></span></p></td>
+<td>          Color iPod
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-COLOR-U2:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_COLOR_U2</code></span></p></td>
+<td>       Color iPod (U2)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-REGULAR:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_REGULAR</code></span></p></td>
+<td>        Regular iPod
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-REGULAR-U2:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_REGULAR_U2</code></span></p></td>
+<td>     Regular iPod (U2)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-MINI:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_MINI</code></span></p></td>
+<td>           iPod Mini
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-MINI-BLUE:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_MINI_BLUE</code></span></p></td>
+<td>      iPod Mini (Blue)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-MINI-PINK:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_MINI_PINK</code></span></p></td>
+<td>      iPod Mini (Pink)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-MINI-GREEN:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_MINI_GREEN</code></span></p></td>
+<td>     iPod Mini (Green)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-MINI-GOLD:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_MINI_GOLD</code></span></p></td>
+<td>      iPod Mini (Gold)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-SHUFFLE:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_SHUFFLE</code></span></p></td>
+<td>        iPod Shuffle
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-NANO-WHITE:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_NANO_WHITE</code></span></p></td>
+<td>     iPod Nano (White)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-NANO-BLACK:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_NANO_BLACK</code></span></p></td>
+<td>     iPod Nano (Black)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-VIDEO-WHITE:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_VIDEO_WHITE</code></span></p></td>
+<td>    iPod Video (White)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-VIDEO-BLACK:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_VIDEO_BLACK</code></span></p></td>
+<td>    iPod Video (Black)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-MOBILE-1:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_MOBILE_1</code></span></p></td>
+<td>       Mobile iPod
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-VIDEO-U2:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_VIDEO_U2</code></span></p></td>
+<td>       iPod Video (U2)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-NANO-SILVER:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_NANO_SILVER</code></span></p></td>
+<td>    iPod Nano (Silver)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-NANO-BLUE:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_NANO_BLUE</code></span></p></td>
+<td>      iPod Nano (Blue)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-NANO-GREEN:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_NANO_GREEN</code></span></p></td>
+<td>     iPod Nano (Green)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-NANO-PINK:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_NANO_PINK</code></span></p></td>
+<td>      iPod Nano (Pink)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-NANO-RED:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_NANO_RED</code></span></p></td>
+<td>       iPod Nano (Red)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-NANO-YELLOW:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_NANO_YELLOW</code></span></p></td>
+<td>    iPod Nano (Yellow)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-NANO-PURPLE:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_NANO_PURPLE</code></span></p></td>
+<td>    iPod Nano (Purple)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-NANO-ORANGE:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_NANO_ORANGE</code></span></p></td>
+<td>    iPod Nano (Orange)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-IPHONE-1:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_IPHONE_1</code></span></p></td>
+<td>       iPhone
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-SHUFFLE-SILVER:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_SHUFFLE_SILVER</code></span></p></td>
+<td> iPod Shuffle (Silver)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-SHUFFLE-PINK:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_SHUFFLE_PINK</code></span></p></td>
+<td>   iPod Shuffle (Pink)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-SHUFFLE-BLUE:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_SHUFFLE_BLUE</code></span></p></td>
+<td>   iPod Shuffle (Blue)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-SHUFFLE-GREEN:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_SHUFFLE_GREEN</code></span></p></td>
+<td>  iPod Shuffle (Green)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-SHUFFLE-ORANGE:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_SHUFFLE_ORANGE</code></span></p></td>
+<td> iPod Shuffle (Orange)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-SHUFFLE-PURPLE:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_SHUFFLE_PURPLE</code></span></p></td>
+<td> iPod Shuffle (Purple)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-SHUFFLE-RED:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_SHUFFLE_RED</code></span></p></td>
+<td>    iPod Shuffle (Red)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-CLASSIC-SILVER:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_CLASSIC_SILVER</code></span></p></td>
+<td> iPod Classic (Silver)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-CLASSIC-BLACK:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_CLASSIC_BLACK</code></span></p></td>
+<td>  iPod Classic (Black)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-IPOD-MODEL-TOUCH-BLACK:CAPS"></a><code class="literal">ITDB_IPOD_MODEL_TOUCH_BLACK</code></span></p></td>
+<td>    iPod Touch (Black)
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2751039"></a><h3>
+<a name="itdb-info-get-ipod-model-name-string"></a>itdb_info_get_ipod_model_name_string ()</h3>
+<a class="indexterm" name="id2751054"></a><pre class="programlisting">const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*        itdb_info_get_ipod_model_name_string
+                                                        (<a class="link" href="libgpod-Device.html#Itdb-IpodModel">Itdb_IpodModel</a> model);</pre>
+<p>
+Return the iPod's generic model name, like "Color", "Nano"...</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>model</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Device.html#Itdb-IpodModel"><span class="type">Itdb_IpodModel</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a pointer to the model name. This is a static string
+and must not be <a
+href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
+><code class="function">g_free()</code></a>d.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2751133"></a><h3>
+<a name="Itdb-ArtworkFormat"></a>Itdb_ArtworkFormat</h3>
+<a class="indexterm" name="id2751144"></a><pre class="programlisting">typedef struct {
+        gint format_id;
+        gint width;
+        gint height;
+        ItdbThumbFormat format;
+        gint32 padding;
+        gboolean crop;
+        gint rotation;
+        guchar back_color[4];
+
+        gint display_width;
+        gboolean interlaced;
+        gboolean align_row_bytes;
+        gint color_adjustment;
+        gdouble gamma;
+        gint associated_format;
+} Itdb_ArtworkFormat;
+</pre>
+<p>
+Structure representing the characteristics of the thumbnails to
+write to a given .ithmb file. The format of the structure is based
+on the way artwork formats are written to SysInfoExtended.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a>&#160;<em class="structfield"><code>format_id</code></em>;</span></p></td>
+<td>          Unique ID for the format (generally a 4 digit int)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a>&#160;<em class="structfield"><code>width</code></em>;</span></p></td>
+<td>              Width of the thumbnail
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a>&#160;<em class="structfield"><code>height</code></em>;</span></p></td>
+<td>             Height of the thumbnail
+</td>
+</tr>
+<tr>
+<td><p><span class="term">ItdbThumbFormat&#160;<em class="structfield"><code>format</code></em>;</span></p></td>
+<td>             Pixel format of the thumbnail (RGB, YUV, ...)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>padding</code></em>;</span></p></td>
+<td>            Number of bytes of padding to add after the thumbnail
+                     (not found in SysInfoExtended -- added for
+                     compatibility with hardcoded artwork formats)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>&#160;<em class="structfield"><code>crop</code></em>;</span></p></td>
+<td>               Indicates if the thumbnail is to be cropped
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a>&#160;<em class="structfield"><code>rotation</code></em>;</span></p></td>
+<td>           Degrees to rotate the thumbnail
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guchar"
+>guchar</a>&#160;<em class="structfield"><code>back_color</code></em>[4];</span></p></td>
+<td>         Background color for the thumbnail
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a>&#160;<em class="structfield"><code>display_width</code></em>;</span></p></td>
+<td>      Width at which the thumbnail will be displayed
+                     (not currently used)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>&#160;<em class="structfield"><code>interlaced</code></em>;</span></p></td>
+<td>         If TRUE, the thumbnails are interlaced
+                     (not currently used)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>&#160;<em class="structfield"><code>align_row_bytes</code></em>;</span></p></td>
+<td>    If TRUE, each pixel row must be aligned a 2-byte boundary
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a>&#160;<em class="structfield"><code>color_adjustment</code></em>;</span></p></td>
+<td>   Color adjustment for the thumbnails
+                     (not currently used)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"
+>gdouble</a>&#160;<em class="structfield"><code>gamma</code></em>;</span></p></td>
+<td>              Gamma value for the thumbails
+                     (not currently used)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a>&#160;<em class="structfield"><code>associated_format</code></em>;</span></p></td>
+<td>  Unknown (not currently used)
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2751445"></a><h3>
+<a name="itdb-device-read-sysinfo"></a>itdb_device_read_sysinfo ()</h3>
+<a class="indexterm" name="id2751457"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_device_read_sysinfo            (<a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device);</pre>
+<p>
+Reads the SysInfo file and stores information in device-&gt;sysinfo for
+later use.
+</p>
+<p>
+</p>
+<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
+<h3 class="title">Warning</h3>
+<p>Calling this function invalidates all the artwork in the
+<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> database using this <a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>. Trying to access this
+artwork will result in memory corruption. Directly calling this function
+shouldn't ever be needed and it will be deprecated
+soon.</p>
+</div>
+<p>.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> TRUE if file could be read, FALSE otherwise 
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2751549"></a><h3>
+<a name="itdb-device-get-sysinfo"></a>itdb_device_get_sysinfo ()</h3>
+<a class="indexterm" name="id2751561"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              itdb_device_get_sysinfo             (const <a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *field);</pre>
+<p>
+Retrieve specified field from the SysInfo file.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>field</code></em>&#160;:</span></p></td>
+<td>  field to retrive information from
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> the information associated with <em class="parameter"><code>field</code></em>, or NULL if <em class="parameter"><code>field</code></em>
+couldn't be found. <a
+href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
+><code class="function">g_free()</code></a> after use
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2751668"></a><h3>
+<a name="itdb-device-set-sysinfo"></a>itdb_device_set_sysinfo ()</h3>
+<a class="indexterm" name="id2751680"></a><pre class="programlisting">void                itdb_device_set_sysinfo             (<a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *field,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *value);</pre>
+<p>
+Set specified field. It can later be written to the iPod using
+<a class="link" href="libgpod-Device.html#itdb-device-write-sysinfo"><code class="function">itdb_device_write_sysinfo()</code></a></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>field</code></em>&#160;:</span></p></td>
+<td>  field to set
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>value</code></em>&#160;:</span></p></td>
+<td>  value to set (or NULL to remove the field).
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2751784"></a><h3>
+<a name="itdb-device-write-sysinfo"></a>itdb_device_write_sysinfo ()</h3>
+<a class="indexterm" name="id2751797"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_device_write_sysinfo           (<a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a> *device,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
+<p>
+Fills the SysInfo file with information in device-&gt;sysinfo. Note:
+no directories are created if not already existent.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>  return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> TRUE if file could be read, FALSE otherwise 
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2751893"></a><div class="refsect2" lang="en"><a name="id2751894"></a></div>
+<hr>
+<div class="refsect2" lang="en"><a name="id2751895"></a></div>
+</div>
+</div>
+</body>
+</html>

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-File-handling-functions.html
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-File-handling-functions.html	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-File-handling-functions.html	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,341 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>File handling functions</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="index.html" title="libgpod Reference Manual">
+<link rel="up" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
+<link rel="prev" href="libgpod-The-Itdb-iTunesDB-structure.html" title="iPod database reading/writing">
+<link rel="next" href="libgpod-Time-handling.html" title="Time handling">
+<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+<link rel="part" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
+<link rel="chapter" href="ch01.html" title="iPod database components">
+<link rel="part" href="photodb.html" title="Part&#160;II.&#160;Photo database">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="libgpod-The-Itdb-iTunesDB-structure.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="itunesdb.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">libgpod Reference Manual</th>
+<td><a accesskey="n" href="libgpod-Time-handling.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2717648" class="shortcut">Top</a>
+                  &#160;|&#160;
+                  <a href="#id2698514" class="shortcut">Description</a></nobr></td></tr>
+</table>
+<div class="refentry" lang="en">
+<a name="libgpod-File-handling-functions"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2>
+<a name="id2717648"></a><span class="refentrytitle">File handling functions</span>
+</h2>
+<p>File handling functions &#8212; Managing files on the iPod</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<pre class="synopsis">
+
+
+
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-File-handling-functions.html#itdb-cp-track-to-ipod">itdb_cp_track_to_ipod</a>               (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *filename,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+void                <a class="link" href="libgpod-File-handling-functions.html#itdb-filename-fs2ipod">itdb_filename_fs2ipod</a>               (<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *filename);
+void                <a class="link" href="libgpod-File-handling-functions.html#itdb-filename-ipod2fs">itdb_filename_ipod2fs</a>               (<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *ipod_file);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              <a class="link" href="libgpod-File-handling-functions.html#itdb-filename-on-ipod">itdb_filename_on_ipod</a>               (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a>                <a class="link" href="libgpod-File-handling-functions.html#itdb-musicdirs-number">itdb_musicdirs_number</a>               (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-File-handling-functions.html#itdb-rename-files">itdb_rename_files</a>                   (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mp,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+</pre>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2698514"></a><h2>Description</h2>
+<p>
+These functions are for copying, renaming, and retrieving information
+about the files and directories on the iPod.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2698531"></a><h2>Details</h2>
+<div class="refsect2" lang="en">
+<a name="id2698542"></a><h3>
+<a name="itdb-cp-track-to-ipod"></a>itdb_cp_track_to_ipod ()</h3>
+<a class="indexterm" name="id2698553"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_cp_track_to_ipod               (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *filename,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
+<p>
+Copy one track to the iPod. The PC filename is <em class="parameter"><code>filename</code></em>
+and is taken literally.
+</p>
+<p>
+The mountpoint of the iPod (in local encoding) must have been set
+with <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-set-mountpoint"><code class="function">itdb_set_mountpoint()</code></a> (done automatically when reading an
+iTunesDB).
+</p>
+<p>
+If <em class="parameter"><code>track-&gt;transferred</code></em> is set to TRUE, nothing is done. Upon
+successful transfer <em class="parameter"><code>track-&gt;transferred</code></em> is set to TRUE.
+</p>
+<p>
+For storage, the directories "F00 ... Fnn" will be used randomly.
+</p>
+<p>
+The filename is constructed as "libgpod<em class="parameter"><code>random_number</code></em>" and copied
+to <em class="parameter"><code>track-&gt;ipod_path</code></em>. If this file already exists, <em class="parameter"><code>random_number</code></em>
+is adjusted until an unused filename is found.
+</p>
+<p>
+If <em class="parameter"><code>track-&gt;ipod_path</code></em> is already set, this one will be used
+instead. If a file with this name already exists, it will be
+overwritten.
+</p>
+<p>
+<em class="parameter"><code>track-&gt;filetype_marker</code></em> is set according to the filename extension</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></p></td>
+<td>      the <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a> to copy (containing <em class="parameter"><code>filename</code></em> metadata)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></p></td>
+<td>   the source file
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>      return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> TRUE on success, FALSE on error, in which case <em class="parameter"><code>error</code></em> is
+set accordingly.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2710788"></a><h3>
+<a name="itdb-filename-fs2ipod"></a>itdb_filename_fs2ipod ()</h3>
+<a class="indexterm" name="id2710799"></a><pre class="programlisting">void                itdb_filename_fs2ipod               (<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *filename);</pre>
+<p>
+Convert string from casual PC file name to iPod iTunesDB format
+using ':' instead of G_DIR_SEPARATOR_S (i.e. slashes on Unix-like
+systems). <em class="parameter"><code>ipod_file</code></em> is modified in place.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></p></td>
+<td> a 'PC-style' filename (eg /iPod_Control/Music/f00/test.mp3)
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2710858"></a><h3>
+<a name="itdb-filename-ipod2fs"></a>itdb_filename_ipod2fs ()</h3>
+<a class="indexterm" name="id2710869"></a><pre class="programlisting">void                itdb_filename_ipod2fs               (<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *ipod_file);</pre>
+<p>
+Convert string from from iPod iTunesDB format to casual PC file
+name using G_DIR_SEPARATOR (ie slashes on Unix-like systems)
+instead of ':'.  <em class="parameter"><code>ipod_file</code></em> is modified in place.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>ipod_file</code></em>&#160;:</span></p></td>
+<td> a 'PC-style' filename (eg /iPod_Control/Music/f00/test.mp3)
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2710928"></a><h3>
+<a name="itdb-filename-on-ipod"></a>itdb_filename_on_ipod ()</h3>
+<a class="indexterm" name="id2710939"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              itdb_filename_on_ipod               (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);</pre>
+<p>
+Get the full iPod filename as stored in <em class="parameter"><code>track</code></em>.
+</p>
+<p>
+</p>
+<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
+<h3 class="title">Note</h3>
+NULL is returned when the file does not exist.
+</div>
+<p>
+</p>
+<p>
+</p>
+<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
+<h3 class="title">Note</h3>
+This code works around a problem on some systems (see
+<a class="link" href="libgpod-Low-level-functions.html#itdb-resolve-path"><code class="function">itdb_resolve_path()</code></a>) and might return a filename with different
+case than the original filename. Don't copy it back to <em class="parameter"><code>track</code></em> if
+you can avoid it.
+</div>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> full filename to <em class="parameter"><code>track</code></em> on the iPod or NULL if no
+filename is set in <em class="parameter"><code>track</code></em>. Must be freed with <a
+href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
+><code class="function">g_free()</code></a> after use.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2705579"></a><h3>
+<a name="itdb-musicdirs-number"></a>itdb_musicdirs_number ()</h3>
+<a class="indexterm" name="id2705592"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a>                itdb_musicdirs_number               (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);</pre>
+<p>
+Determine the number of F.. directories in iPod_Control/Music.
+</p>
+<p>
+If <em class="parameter"><code>itdb-&gt;musicdirs</code></em> is already set, simply return the previously
+determined number. Otherwise count the directories first and set
+<em class="parameter"><code>itdb-&gt;musicdirs</code></em>.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> max number of directories in iPod_Control/Music
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.1.3
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2705686"></a><h3>
+<a name="itdb-rename-files"></a>itdb_rename_files ()</h3>
+<a class="indexterm" name="id2705699"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_rename_files                   (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mp,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
+<p>
+Renames/removes some files on the iPod (Playcounts, OTG
+semaphore). May have to be called if you write the iTunesDB not
+directly to the iPod but to some other location and then manually
+copy the file from there to the iPod.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mp</code></em>&#160;:</span></p></td>
+<td>     mount point of the iPod
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>  return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> FALSE on error and sets <em class="parameter"><code>error</code></em> accordingly
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2705798"></a><div class="refsect2" lang="en"><a name="id2705799"></a></div>
+<hr>
+<div class="refsect2" lang="en"><a name="id2705800"></a></div>
+</div>
+</div>
+</body>
+</html>

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-Low-level-functions.html
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-Low-level-functions.html	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-Low-level-functions.html	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,1105 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Low-level functions</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="index.html" title="libgpod Reference Manual">
+<link rel="up" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
+<link rel="prev" href="libgpod-Time-handling.html" title="Time handling">
+<link rel="next" href="ch01.html" title="iPod database components">
+<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+<link rel="part" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
+<link rel="chapter" href="ch01.html" title="iPod database components">
+<link rel="part" href="photodb.html" title="Part&#160;II.&#160;Photo database">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="libgpod-Time-handling.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="itunesdb.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">libgpod Reference Manual</th>
+<td><a accesskey="n" href="ch01.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2703180" class="shortcut">Top</a>
+                  &#160;|&#160;
+                  <a href="#id2706707" class="shortcut">Description</a></nobr></td></tr>
+</table>
+<div class="refentry" lang="en">
+<a name="libgpod-Low-level-functions"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2>
+<a name="id2703180"></a><span class="refentrytitle">Low-level functions</span>
+</h2>
+<p>Low-level functions &#8212; Low-level functions which shouldn't be needed in normal situations</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<pre class="synopsis">
+
+
+
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              <a class="link" href="libgpod-Low-level-functions.html#itdb-get-control-dir">itdb_get_control_dir</a>                (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              <a class="link" href="libgpod-Low-level-functions.html#itdb-get-itunes-dir">itdb_get_itunes_dir</a>                 (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              <a class="link" href="libgpod-Low-level-functions.html#itdb-get-music-dir">itdb_get_music_dir</a>                  (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              <a class="link" href="libgpod-Low-level-functions.html#itdb-get-artwork-dir">itdb_get_artwork_dir</a>                (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              <a class="link" href="libgpod-Low-level-functions.html#itdb-get-device-dir">itdb_get_device_dir</a>                 (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              <a class="link" href="libgpod-Low-level-functions.html#itdb-get-photos-dir">itdb_get_photos_dir</a>                 (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              <a class="link" href="libgpod-Low-level-functions.html#itdb-get-itunesdb-path">itdb_get_itunesdb_path</a>              (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              <a class="link" href="libgpod-Low-level-functions.html#itdb-get-itunessd-path">itdb_get_itunessd_path</a>              (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              <a class="link" href="libgpod-Low-level-functions.html#itdb-get-artworkdb-path">itdb_get_artworkdb_path</a>             (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              <a class="link" href="libgpod-Low-level-functions.html#itdb-get-photodb-path">itdb_get_photodb_path</a>               (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              <a class="link" href="libgpod-Low-level-functions.html#itdb-get-photos-thumb-dir">itdb_get_photos_thumb_dir</a>           (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              <a class="link" href="libgpod-Low-level-functions.html#itdb-get-path">itdb_get_path</a>                       (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *dir,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *file);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              <a class="link" href="libgpod-Low-level-functions.html#itdb-resolve-path">itdb_resolve_path</a>                   (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *root,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> * const *components);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Low-level-functions.html#itdb-cp">itdb_cp</a>                             (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *from_file,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *to_file,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              <a class="link" href="libgpod-Low-level-functions.html#itdb-cp-get-dest-filename">itdb_cp_get_dest_filename</a>           (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *filename,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a>*         <a class="link" href="libgpod-Low-level-functions.html#itdb-cp-finalize">itdb_cp_finalize</a>                    (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *dest_filename,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a>*      <a class="link" href="libgpod-Low-level-functions.html#itdb-parse-file">itdb_parse_file</a>                     (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *filename,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Low-level-functions.html#itdb-write-file">itdb_write_file</a>                     (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *filename,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Low-level-functions.html#itdb-shuffle-write">itdb_shuffle_write</a>                  (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Low-level-functions.html#itdb-shuffle-write-file">itdb_shuffle_write_file</a>             (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *filename,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a>*      <a class="link" href="libgpod-Low-level-functions.html#itdb-duplicate">itdb_duplicate</a>                      (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);
+</pre>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2706707"></a><h2>Description</h2>
+<p>
+These functions are not normally needed but are avalable to allow for finer
+control over the iPod database.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2706724"></a><h2>Details</h2>
+<div class="refsect2" lang="en">
+<a name="id2706735"></a><h3>
+<a name="itdb-get-control-dir"></a>itdb_get_control_dir ()</h3>
+<a class="indexterm" name="id2706749"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              itdb_get_control_dir                (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);</pre>
+<p>
+Get the i*_Control directory. Observed values are 'iPod_Control'
+for standard iPods and 'iTunes/iTunes_Control' for mobile
+applications.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></p></td>
+<td> the iPod mountpoint
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> path to the control dir or NULL if non-existent. Must
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
+><code class="function">g_free()</code></a> after use.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2706828"></a><h3>
+<a name="itdb-get-itunes-dir"></a>itdb_get_itunes_dir ()</h3>
+<a class="indexterm" name="id2706843"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              itdb_get_itunes_dir                 (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);</pre>
+<p>
+Retrieve the iTunes directory (containing the iTunesDB) by first
+calling <a class="link" href="libgpod-Low-level-functions.html#itdb-get-control-dir"><code class="function">itdb_get_control_dir()</code></a> and then adding 'iTunes'</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></p></td>
+<td> the iPod mountpoint
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> path to the iTunes directory or NULL if non-existent.
+Must <a
+href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
+><code class="function">g_free()</code></a> after use.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2721743"></a><h3>
+<a name="itdb-get-music-dir"></a>itdb_get_music_dir ()</h3>
+<a class="indexterm" name="id2721755"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              itdb_get_music_dir                  (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);</pre>
+<p>
+Retrieve the Music directory (containing the Fnn dirs) by first
+calling <a class="link" href="libgpod-Low-level-functions.html#itdb-get-control-dir"><code class="function">itdb_get_control_dir()</code></a> and then adding 'Music'</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></p></td>
+<td> the iPod mountpoint
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> path to the Music directory or NULL if
+non-existent. Must <a
+href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
+><code class="function">g_free()</code></a> after use.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2721835"></a><h3>
+<a name="itdb-get-artwork-dir"></a>itdb_get_artwork_dir ()</h3>
+<a class="indexterm" name="id2721849"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              itdb_get_artwork_dir                (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);</pre>
+<p>
+Retrieve the Artwork directory (containing the ArtworDB) by
+first calling <a class="link" href="libgpod-Low-level-functions.html#itdb-get-control-dir"><code class="function">itdb_get_control_dir()</code></a> and then adding 'Artwork'</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></p></td>
+<td> the iPod mountpoint
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> path to the Artwork directory or NULL if
+non-existent. Must <a
+href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
+><code class="function">g_free()</code></a> after use.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2721936"></a><h3>
+<a name="itdb-get-device-dir"></a>itdb_get_device_dir ()</h3>
+<a class="indexterm" name="id2721950"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              itdb_get_device_dir                 (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);</pre>
+<p>
+Retrieve the Device directory (containing the SysInfo file) by
+first calling <a class="link" href="libgpod-Low-level-functions.html#itdb-get-control-dir"><code class="function">itdb_get_control_dir()</code></a> and then adding 'Device'</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></p></td>
+<td> the iPod mountpoint
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> path to the Device directory or NULL if
+non-existent. Must <a
+href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
+><code class="function">g_free()</code></a> after use.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2722038"></a><h3>
+<a name="itdb-get-photos-dir"></a>itdb_get_photos_dir ()</h3>
+<a class="indexterm" name="id2722052"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              itdb_get_photos_dir                 (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);</pre>
+<p>
+Retrieve the Photo directory by
+first calling <a class="link" href="libgpod-Low-level-functions.html#itdb-get-control-dir"><code class="function">itdb_get_control_dir()</code></a> and then adding 'Photos'</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></p></td>
+<td> mountpoint of iPod
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> path to the Artwork directory or NULL if
+non-existent. Must <a
+href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
+><code class="function">g_free()</code></a> after use.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2722139"></a><h3>
+<a name="itdb-get-itunesdb-path"></a>itdb_get_itunesdb_path ()</h3>
+<a class="indexterm" name="id2722152"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              itdb_get_itunesdb_path              (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);</pre>
+<p>
+Retrieve a path to the iTunesDB</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></p></td>
+<td> the iPod mountpoint
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> path to the iTunesDB or NULL if non-existent. Must <a
+href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
+><code class="function">g_free()</code></a>
+after use.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2722229"></a><h3>
+<a name="itdb-get-itunessd-path"></a>itdb_get_itunessd_path ()</h3>
+<a class="indexterm" name="id2722243"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              itdb_get_itunessd_path              (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);</pre>
+<p>
+Retrieve a path to the iTunesSD</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></p></td>
+<td> the iPod mountpoint
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> path to the iTunesSD or NULL if non-existent. Must <a
+href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
+><code class="function">g_free()</code></a>
+after use.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2722320"></a><h3>
+<a name="itdb-get-artworkdb-path"></a>itdb_get_artworkdb_path ()</h3>
+<a class="indexterm" name="id2722333"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              itdb_get_artworkdb_path             (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);</pre>
+<p>
+Retrieve a path to the ArtworkDB</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></p></td>
+<td> the iPod mountpoint
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> path to the ArtworkDB or NULL if non-existent. Must <a
+href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
+><code class="function">g_free()</code></a>
+after use.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2722410"></a><h3>
+<a name="itdb-get-photodb-path"></a>itdb_get_photodb_path ()</h3>
+<a class="indexterm" name="id2722424"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              itdb_get_photodb_path               (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);</pre>
+<p>
+Retrieve a path to the Photo DB</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></p></td>
+<td> the iPod mountpoint
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> path to the PhotoDB or NULL if non-existent. Must
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
+><code class="function">g_free()</code></a> after use.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2722502"></a><h3>
+<a name="itdb-get-photos-thumb-dir"></a>itdb_get_photos_thumb_dir ()</h3>
+<a class="indexterm" name="id2722516"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              itdb_get_photos_thumb_dir           (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);</pre>
+<p>
+Retrieve the Photo Thumbnail directory by
+first calling <a class="link" href="libgpod-Low-level-functions.html#itdb-get-control-dir"><code class="function">itdb_get_control_dir()</code></a> and then adding 'Photos/Thumbs'</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></p></td>
+<td> the iPod mountpoint
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> path to the Artwork directory or NULL if
+non-existent. Must <a
+href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
+><code class="function">g_free()</code></a> after use.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2722603"></a><h3>
+<a name="itdb-get-path"></a>itdb_get_path ()</h3>
+<a class="indexterm" name="id2722618"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              itdb_get_path                       (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *dir,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *file);</pre>
+<p>
+Retrieve a path to the <em class="parameter"><code>file</code></em> in <em class="parameter"><code>dir</code></em></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>dir</code></em>&#160;:</span></p></td>
+<td>    a directory
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>file</code></em>&#160;:</span></p></td>
+<td>   a file
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> path to the <em class="parameter"><code>file</code></em> or NULL if non-existent. Must <a
+href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
+><code class="function">g_free()</code></a>
+after use.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2722733"></a><h3>
+<a name="itdb-resolve-path"></a>itdb_resolve_path ()</h3>
+<a class="indexterm" name="id2722746"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              itdb_resolve_path                   (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *root,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> * const *components);</pre>
+<p>
+Resolve the path to a track on the iPod
+</p>
+<p>
+We start by assuming that the iPod mount point exists.  Then, for
+each component c of <em class="parameter"><code>track-&gt;ipod_path</code></em>, we try to find an entry d in
+good_path that is case-insensitively equal to c.  If we find d, we
+append d to good_path and make the result the new good_path.
+Otherwise, we quit and return NULL.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>root</code></em>&#160;:</span></p></td>
+<td> in local encoding
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>components</code></em>&#160;:</span></p></td>
+<td> in utf8
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> path to track on the iPod or NULL.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2722841"></a><h3>
+<a name="itdb-cp"></a>itdb_cp ()</h3>
+<a class="indexterm" name="id2722853"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_cp                             (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *from_file,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *to_file,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
+<p>
+Copy file <em class="parameter"><code>from_file</code></em> to <em class="parameter"><code>to_file</code></em>.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>from_file</code></em>&#160;:</span></p></td>
+<td>  source file
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>to_file</code></em>&#160;:</span></p></td>
+<td>    destination file
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>      return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> TRUE on success, FALSE on error, in which case <em class="parameter"><code>error</code></em> is
+set accordingly.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2722982"></a><h3>
+<a name="itdb-cp-get-dest-filename"></a>itdb_cp_get_dest_filename ()</h3>
+<a class="indexterm" name="id2722996"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*              itdb_cp_get_dest_filename           (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *filename,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
+<p>
+Creates a valid filename on the iPod where <em class="parameter"><code>filename</code></em> can be copied.
+</p>
+<p>
+You must provide either <em class="parameter"><code>track</code></em> or <em class="parameter"><code>mountpoint</code></em>. Providing <em class="parameter"><code>track</code></em> is
+not thread-safe (accesses track-&gt;itdb-&gt;device and may even write to
+track-&gt;itdb-&gt;device). Providing <em class="parameter"><code>mountpoint</code></em> is thread-safe but
+slightly slower because the number of music directories is counted
+each time the function is called.
+</p>
+<p>
+You can use <a class="link" href="libgpod-Low-level-functions.html#itdb-cp"><code class="function">itdb_cp()</code></a> to copy the track to the iPod or implement
+your own copy function. After the file was copied you have to call
+<a class="link" href="libgpod-Low-level-functions.html#itdb-cp-finalize"><code class="function">itdb_cp_finalize()</code></a> to obtain relevant update information for
+<a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></p></td>
+<td>      track to transfer or NULL
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></p></td>
+<td> mountpoint of your iPod or NULL
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></p></td>
+<td>   the source file
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>      return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a valid filename on the iPod where <em class="parameter"><code>filename</code></em> can be
+copied or NULL in case of an error. In that case <em class="parameter"><code>error</code></em> is set
+accordingly. You must free the filename when it is no longer
+needed.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.5.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2723218"></a><h3>
+<a name="itdb-cp-finalize"></a>itdb_cp_finalize ()</h3>
+<a class="indexterm" name="id2723233"></a><pre class="programlisting"><a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a>*         itdb_cp_finalize                    (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *dest_filename,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
+<p>
+Updates information in <em class="parameter"><code>track</code></em> necessary for the iPod.
+</p>
+<p>
+You must supply either <em class="parameter"><code>track</code></em> or <em class="parameter"><code>mountpoint</code></em>. If <em class="parameter"><code>track</code></em> == NULL, a
+new track structure is created that must be freed with
+<a class="link" href="libgpod-Tracks.html#itdb-track-free"><code class="function">itdb_track_free()</code></a> when it is no longer needed.
+</p>
+<p>
+The following <em class="parameter"><code>track</code></em> fields are updated:
+</p>
+<p>
+</p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+      ipod_path
+  </li>
+<li>
+      filetype_marker
+  </li>
+<li>
+      transferred
+  </li>
+<li>
+      size
+  </li>
+</ul></div>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></p></td>
+<td>          track to update or NULL
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></p></td>
+<td>     mountpoint of your iPod or NULL
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>dest_filename</code></em>&#160;:</span></p></td>
+<td>  the name of the file on the iPod copied to
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>          return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> on success a pointer to the <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a> item passed
+or a new <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a> item if <em class="parameter"><code>track</code></em> was NULL. In the latter case
+you must free the memory using <a class="link" href="libgpod-Tracks.html#itdb-track-free"><code class="function">itdb_track_free()</code></a> when the item is
+no longer used. If an error occurs NULL is returned and <em class="parameter"><code>error</code></em> is
+set accordingly. Errors occur when <em class="parameter"><code>dest_filename</code></em> cannot be
+accessed or the mountpoint is not set.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.5.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2723486"></a><h3>
+<a name="itdb-parse-file"></a>itdb_parse_file ()</h3>
+<a class="indexterm" name="id2723498"></a><pre class="programlisting"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a>*      itdb_parse_file                     (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *filename,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
+<p>
+Same as <code class="function">itunesdb_parse()</code>, but filename is specified directly.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></p></td>
+<td>   path to a file in iTunesDB format
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>      return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a newly allocated <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> struct holding the tracks and
+the playlists present in <em class="parameter"><code>filename</code></em>, NULL if <em class="parameter"><code>filename</code></em> isn't a parsable 
+iTunesDB file. If non-NULL, the <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> is to be freed with 
+<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-free"><code class="function">itdb_free()</code></a> when it's no longer needed
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2723634"></a><h3>
+<a name="itdb-write-file"></a>itdb_write_file ()</h3>
+<a class="indexterm" name="id2723647"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_write_file                     (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *filename,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
+<p>
+Write the content of <em class="parameter"><code>itdb</code></em> to <em class="parameter"><code>filename</code></em>. If <em class="parameter"><code>filename</code></em> is NULL, it attempts
+to write to <em class="parameter"><code>itdb-&gt;filename</code></em>.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td>       the <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> to save
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></p></td>
+<td>   filename to save <em class="parameter"><code>itdb</code></em> to
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>      return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> TRUE if all went well, FALSE otherwise
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2725443"></a><h3>
+<a name="itdb-shuffle-write"></a>itdb_shuffle_write ()</h3>
+<a class="indexterm" name="id2725454"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_shuffle_write                  (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
+<p>
+Write out an iTunesSD for the Shuffle.
+</p>
+<p>
+First reassigns unique IDs to all tracks.  An existing "Play
+Counts" file is renamed to "Play Counts.bak" if the export was
+successful.  An existing "OTGPlaylistInfo" file is removed if the
+export was successful.  <em class="parameter"><code>itdb-&gt;mountpoint</code></em> must point to the mount
+point of the iPod, e.g. "/mnt/ipod" and be in local encoding.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td>   the <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> to write to disk
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>  return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> TRUE on success, FALSE on error, in which case <em class="parameter"><code>error</code></em> is
+set accordingly.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2725559"></a><h3>
+<a name="itdb-shuffle-write-file"></a>itdb_shuffle_write_file ()</h3>
+<a class="indexterm" name="id2725569"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_shuffle_write_file             (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *filename,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
+<p>
+Do the actual writing to the iTunesSD</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td>       the <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> to write to disk
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></p></td>
+<td>   file to write to, cannot be NULL
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>      return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> TRUE on success, FALSE on error, in which case <em class="parameter"><code>error</code></em> is
+set accordingly.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2725681"></a><h3>
+<a name="itdb-duplicate"></a>itdb_duplicate ()</h3>
+<a class="indexterm" name="id2725692"></a><pre class="programlisting"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a>*      itdb_duplicate                      (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);</pre>
+<p>
+Duplicate <em class="parameter"><code>itdb</code></em> 
+FIXME: not implemented yet</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> always return NULL since it's unimplemented
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2725759"></a><div class="refsect2" lang="en"><a name="id2725760"></a></div>
+<hr>
+<div class="refsect2" lang="en"><a name="id2725761"></a></div>
+</div>
+</div>
+</body>
+</html>

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-Photo-database.html
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-Photo-database.html	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-Photo-database.html	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,1151 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Photo database</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="index.html" title="libgpod Reference Manual">
+<link rel="up" href="photodb.html" title="Part&#160;II.&#160;Photo database">
+<link rel="prev" href="photodb.html" title="Part&#160;II.&#160;Photo database">
+<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+<link rel="part" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
+<link rel="chapter" href="ch01.html" title="iPod database components">
+<link rel="part" href="photodb.html" title="Part&#160;II.&#160;Photo database">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="photodb.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="photodb.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">libgpod Reference Manual</th>
+<td>&#160;</td>
+</tr>
+<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2706336" class="shortcut">Top</a>
+                  &#160;|&#160;
+                  <a href="#id2740334" class="shortcut">Description</a></nobr></td></tr>
+</table>
+<div class="refentry" lang="en">
+<a name="libgpod-Photo-database"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2>
+<a name="id2706336"></a><span class="refentrytitle">Photo database</span>
+</h2>
+<p>Photo database &#8212; Functions to create, read, write the photo database</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<pre class="synopsis">
+
+
+
+                    <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a>;
+<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a>*       <a class="link" href="libgpod-Photo-database.html#itdb-photodb-create">itdb_photodb_create</a>                 (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);
+void                <a class="link" href="libgpod-Photo-database.html#itdb-photodb-free">itdb_photodb_free</a>                   (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *photodb);
+<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a>*       <a class="link" href="libgpod-Photo-database.html#itdb-photodb-parse">itdb_photodb_parse</a>                  (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mp,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Photo-database.html#itdb-photodb-write">itdb_photodb_write</a>                  (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *photodb,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+<a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a>*       <a class="link" href="libgpod-Photo-database.html#itdb-photodb-add-photo">itdb_photodb_add_photo</a>              (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *filename,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> position,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> rotation,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+<a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a>*       <a class="link" href="libgpod-Photo-database.html#itdb-photodb-add-photo-from-data">itdb_photodb_add_photo_from_data</a>    (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guchar"
+>guchar</a> *image_data,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"
+>gsize</a> image_data_len,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> position,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> rotation,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+<a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a>*       <a class="link" href="libgpod-Photo-database.html#itdb-photodb-add-photo-from-pixbuf">itdb_photodb_add_photo_from_pixbuf</a>  (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a> pixbuf,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> position,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> rotation,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+void                <a class="link" href="libgpod-Photo-database.html#itdb-photodb-remove-photo">itdb_photodb_remove_photo</a>           (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
+                                                         <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoAlbum">Itdb_PhotoAlbum</a> *album,
+                                                         <a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *photo);
+                    <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoAlbum">Itdb_PhotoAlbum</a>;
+<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoAlbum">Itdb_PhotoAlbum</a>*    <a class="link" href="libgpod-Photo-database.html#itdb-photodb-photoalbum-create">itdb_photodb_photoalbum_create</a>      (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *albumname,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> pos);
+void                <a class="link" href="libgpod-Photo-database.html#itdb-photodb-photoalbum-add-photo">itdb_photodb_photoalbum_add_photo</a>   (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
+                                                         <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoAlbum">Itdb_PhotoAlbum</a> *album,
+                                                         <a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *photo,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> position);
+<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoAlbum">Itdb_PhotoAlbum</a>*    <a class="link" href="libgpod-Photo-database.html#itdb-photodb-photoalbum-by-name">itdb_photodb_photoalbum_by_name</a>     (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *albumname);
+void                <a class="link" href="libgpod-Photo-database.html#itdb-photodb-photoalbum-remove">itdb_photodb_photoalbum_remove</a>      (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
+                                                         <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoAlbum">Itdb_PhotoAlbum</a> *album,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a> remove_pics);
+</pre>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2740334"></a><h2>Description</h2>
+<p>
+These functions are for creating, reading, and writing the photo
+database.
+</p>
+<p>
+Overview of using the Photo database:
+</p>
+<p>
+<a class="link" href="libgpod-Photo-database.html#itdb-photodb-parse"><code class="function">itdb_photodb_parse()</code></a>:
+Read an existing PhotoDB.
+</p>
+<p>
+<a class="link" href="libgpod-Photo-database.html#itdb-photodb-create"><code class="function">itdb_photodb_create()</code></a>:
+Create a new <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a> structure. The Photo Library Album is
+(first album) is created automatically.
+</p>
+<p>
+<a class="link" href="libgpod-Photo-database.html#itdb-photodb-add-photo"><code class="function">itdb_photodb_add_photo()</code></a>, <a class="link" href="libgpod-Photo-database.html#itdb-photodb-add-photo-from-data"><code class="function">itdb_photodb_add_photo_from_data()</code></a>:
+Add a photo to the PhotoDB (from file or from a chunk of
+memory). It is automatically added to the Photo Library Album
+(first album), which is created if it does not exist already.
+</p>
+<p>
+<a class="link" href="libgpod-Photo-database.html#itdb-photodb-photoalbum-create"><code class="function">itdb_photodb_photoalbum_create()</code></a>:
+Create and add a new photoalbum.
+</p>
+<p>
+<a class="link" href="libgpod-Photo-database.html#itdb-photodb-photoalbum-add-photo"><code class="function">itdb_photodb_photoalbum_add_photo()</code></a>:
+Add a photo (<a class="link" href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a>) to an existing photoalbum.
+</p>
+<p>
+<a class="link" href="libgpod-Photo-database.html#itdb-photodb-photoalbum-remove"><code class="function">itdb_photodb_photoalbum_remove()</code></a>:
+Remove an existing photoalbum. Pictures can be kept in the
+Photo Library or automatically removed as well.
+</p>
+<p>
+<a class="link" href="libgpod-Photo-database.html#itdb-photodb-remove-photo"><code class="function">itdb_photodb_remove_photo()</code></a>:
+Remove a photo either from a photoalbum or completely from the database.
+</p>
+<p>
+<a class="link" href="libgpod-Photo-database.html#itdb-photodb-write"><code class="function">itdb_photodb_write()</code></a>:
+Write out your PhotoDB.
+</p>
+<p>
+<a class="link" href="libgpod-Photo-database.html#itdb-photodb-free"><code class="function">itdb_photodb_free()</code></a>:
+Free all memory taken by the PhotoDB.
+</p>
+<p>
+<a class="link" href="libgpod-Photo-database.html#itdb-photodb-photoalbum-by-name"><code class="function">itdb_photodb_photoalbum_by_name()</code></a>:
+Find the first photoalbum with a given name or the Photo
+Library Album if called with no name.
+</p>
+<p>
+If you cannot add photos because your iPod is not recognized,
+you may have to set the iPod model by calling
+<a class="link" href="libgpod-Device.html#itdb-device-set-sysinfo"><code class="function">itdb_device_set_sysinfo()</code></a>, e.g. for an 80 GB 6th generation
+iPod Video, you would use:
+</p>
+<pre class="programlisting">
+itdb_device_set_sysinfo (db-&gt;device, "ModelNumStr", "MA450");
+</pre>
+<p>
+See <a class="ulink" href="http://gtkpod.svn.sourceforge.net/svnroot/gtkpod/libgpod/trunk/src/itdb_device.c" target="_top">itdb_device.c</a>
+for a list of supported models.
+</p>
+<p>
+The model number will be saved on the iPod when the PhotoDB is
+written (<a class="link" href="libgpod-Photo-database.html#itdb-photodb-write"><code class="function">itdb_photodb_write()</code></a> calls <a class="link" href="libgpod-Device.html#itdb-device-write-sysinfo"><code class="function">itdb_device_write_sysinfo()</code></a>).
+</p>
+<p>
+Have a look at the <a class="ulink" href="http://gtkpod.svn.sourceforge.net/svnroot/gtkpod/libgpod/trunk/tests/test-photos.c" target="_top">test-photos</a>
+test program in the <a class="ulink" href="http://gtkpod.svn.sourceforge.net/svnroot/gtkpod/libgpod/trunk/tests/" target="_top">tests/</a>
+directory of the libgpod source for an example of how to use the interface.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2745883"></a><h2>Details</h2>
+<div class="refsect2" lang="en">
+<a name="id2745893"></a><h3>
+<a name="Itdb-PhotoDB"></a>Itdb_PhotoDB</h3>
+<a class="indexterm" name="id2745908"></a><pre class="programlisting">typedef struct {
+    GList *photos;
+    GList *photoalbums;
+    Itdb_Device *device;
+    /* reserved for future use */
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+    /* below is for use by application */
+    guint64 usertype;
+    gpointer userdata;
+    /* functions called to duplicate/free userdata */
+    ItdbUserDataDuplicateFunc userdata_duplicate;
+    ItdbUserDataDestroyFunc userdata_destroy;
+} Itdb_PhotoDB;
+</pre>
+<p>
+Structure representing an iTunes Photo database</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
+>GList</a>&#160;*<em class="structfield"><code>photos</code></em>;</span></p></td>
+<td>             A list of photos in the database (<a class="link" href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a>)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
+>GList</a>&#160;*<em class="structfield"><code>photoalbums</code></em>;</span></p></td>
+<td>        A list of albums in the database (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoAlbum"><span class="type">Itdb_PhotoAlbum</span></a>)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a>&#160;*<em class="structfield"><code>device</code></em>;</span></p></td>
+<td>             iPod device info (<a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int1</code></em>;</span></p></td>
+<td>      Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int2</code></em>;</span></p></td>
+<td>      Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved1</code></em>;</span></p></td>
+<td>          Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved2</code></em>;</span></p></td>
+<td>          Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
+>guint64</a>&#160;<em class="structfield"><code>usertype</code></em>;</span></p></td>
+<td>           For use by application
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>userdata</code></em>;</span></p></td>
+<td>           For use by application
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDuplicateFunc">ItdbUserDataDuplicateFunc</a>&#160;<em class="structfield"><code>userdata_duplicate</code></em>;</span></p></td>
+<td> A function to duplicate <span class="type">userdata</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDestroyFunc">ItdbUserDataDestroyFunc</a>&#160;<em class="structfield"><code>userdata_destroy</code></em>;</span></p></td>
+<td>   A function to free <span class="type">userdata</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2751958"></a><h3>
+<a name="itdb-photodb-create"></a>itdb_photodb_create ()</h3>
+<a class="indexterm" name="id2751973"></a><pre class="programlisting"><a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a>*       itdb_photodb_create                 (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint);</pre>
+<p>
+Creates a new Itdb_PhotoDB. If mountpoint is NULL, you will have to
+set it manually later by calling <a class="link" href="libgpod-Device.html#itdb-device-set-mountpoint"><code class="function">itdb_device_set_mountpoint()</code></a>.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></p></td>
+<td> mountpoint or NULL.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a newly created Itdb_PhotoDB to be freed with
+<a class="link" href="libgpod-Photo-database.html#itdb-photodb-free"><code class="function">itdb_photodb_free()</code></a> when it's no longer needed. The Photo Library
+Album is created automatically.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.2
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2752062"></a><h3>
+<a name="itdb-photodb-free"></a>itdb_photodb_free ()</h3>
+<a class="indexterm" name="id2752076"></a><pre class="programlisting">void                itdb_photodb_free                   (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *photodb);</pre>
+<p>
+Free the memory taken by <em class="parameter"><code>photodb</code></em>.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>photodb</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a>
+</td>
+</tr></tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2752146"></a><h3>
+<a name="itdb-photodb-parse"></a>itdb_photodb_parse ()</h3>
+<a class="indexterm" name="id2752161"></a><pre class="programlisting"><a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a>*       itdb_photodb_parse                  (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mp,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
+<p>
+Parses the photo database of an iPod mounted at <em class="parameter"><code>mp</code></em>.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mp</code></em>&#160;:</span></p></td>
+<td>     mountpoint of the iPod
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>  will contain the error description when an error occured.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> the imported PhotoDB or NULL in case of an error.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2752258"></a><h3>
+<a name="itdb-photodb-write"></a>itdb_photodb_write ()</h3>
+<a class="indexterm" name="id2752273"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_photodb_write                  (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *photodb,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
+<p>
+Write out a PhotoDB.
+</p>
+<p>
+FIXME: error is not set yet.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>photodb</code></em>&#160;:</span></p></td>
+<td>    the <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a> to write to disk
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>      return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> TRUE on success, FALSE on error, in which case <em class="parameter"><code>error</code></em> is
+set accordingly.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2752387"></a><h3>
+<a name="itdb-photodb-add-photo"></a>itdb_photodb_add_photo ()</h3>
+<a class="indexterm" name="id2752400"></a><pre class="programlisting"><a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a>*       itdb_photodb_add_photo              (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *filename,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> position,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> rotation,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
+<p>
+Add a photo to the PhotoDB. The photo is automatically added to the
+first Photoalbum, which by default contains a list of all photos in
+the database. If no Photoalbums exist one is created automatically.
+</p>
+<p>
+For the rotation angle you can also use the gdk constants
+<code class="literal">GDK_PIXBUF_ROTATE_NONE</code>, <code class="literal">GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE</code>,
+<code class="literal">GDK_PIXBUF_ROTATE_UPSIDEDOWN</code>, AND <code class="literal">GDK_PIXBUF_ROTATE_CLOCKWISE</code>.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>db</code></em>&#160;:</span></p></td>
+<td>         the <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a> to add the photo to
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></p></td>
+<td>   path of the photo to add.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>position</code></em>&#160;:</span></p></td>
+<td>   position where to insert the new photo (-1 to append
+             at the end)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>rotation</code></em>&#160;:</span></p></td>
+<td>   angle by which the image should be rotated
+             counterclockwise. Valid values are 0, 90, 180 and 270.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>      return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a pointer to the added photo.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2752617"></a><h3>
+<a name="itdb-photodb-add-photo-from-data"></a>itdb_photodb_add_photo_from_data ()</h3>
+<a class="indexterm" name="id2752633"></a><pre class="programlisting"><a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a>*       itdb_photodb_add_photo_from_data    (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guchar"
+>guchar</a> *image_data,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"
+>gsize</a> image_data_len,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> position,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> rotation,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
+<p>
+Add a photo to the PhotoDB. The photo is automatically added to the
+first Photoalbum, which by default contains a list of all photos in
+the database. If no Photoalbums exist one is created automatically.
+</p>
+<p>
+For the rotation angle you can also use the gdk constants
+<code class="literal">GDK_PIXBUF_ROTATE_NONE</code>, <code class="literal">GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE</code>,
+<code class="literal">GDK_PIXBUF_ROTATE_UPSIDEDOWN</code>, AND <code class="literal">GDK_PIXBUF_ROTATE_CLOCKWISE</code>.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>db</code></em>&#160;:</span></p></td>
+<td>             the <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a> to add the photo to
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>image_data</code></em>&#160;:</span></p></td>
+<td>     chunk of memory containing the image data (for
+                 example a jpg file)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>image_data_len</code></em>&#160;:</span></p></td>
+<td> length of above chunk of memory
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>position</code></em>&#160;:</span></p></td>
+<td>       position where to insert the new photo (-1 to
+                 append at the end)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>rotation</code></em>&#160;:</span></p></td>
+<td>       angle by which the image should be rotated
+                 counterclockwise. Valid values are 0, 90, 180 and 270.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>          return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a pointer to the added photo.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2752874"></a><h3>
+<a name="itdb-photodb-add-photo-from-pixbuf"></a>itdb_photodb_add_photo_from_pixbuf ()</h3>
+<a class="indexterm" name="id2752889"></a><pre class="programlisting"><a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a>*       itdb_photodb_add_photo_from_pixbuf  (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a> pixbuf,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> position,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> rotation,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
+<p>
+Add a photo to the PhotoDB. The photo is automatically added to the
+first Photoalbum, which by default contains a list of all photos in
+the database. If no Photoalbums exist one is created automatically.
+</p>
+<p>
+For the rotation angle you can also use the gdk constants
+<code class="literal">GDK_PIXBUF_ROTATE_NONE</code>, <code class="literal">GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE</code>,
+<code class="literal">GDK_PIXBUF_ROTATE_UPSIDEDOWN</code>, AND <code class="literal">GDK_PIXBUF_ROTATE_CLOCKWISE</code>.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>db</code></em>&#160;:</span></p></td>
+<td>         the <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a> to add the photo to
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>pixbuf</code></em>&#160;:</span></p></td>
+<td>     a <a
+href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
+><span class="type">GdkPixbuf</span></a> to use as the image data
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>position</code></em>&#160;:</span></p></td>
+<td>   position where to insert the new photo (-1 to append
+             at the end)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>rotation</code></em>&#160;:</span></p></td>
+<td>   angle by which the image should be rotated
+             counterclockwise. Valid values are 0, 90, 180 and 270.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>      return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a pointer to the added photo.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.5.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2753112"></a><h3>
+<a name="itdb-photodb-remove-photo"></a>itdb_photodb_remove_photo ()</h3>
+<a class="indexterm" name="id2753126"></a><pre class="programlisting">void                itdb_photodb_remove_photo           (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
+                                                         <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoAlbum">Itdb_PhotoAlbum</a> *album,
+                                                         <a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *photo);</pre>
+<p>
+Removes a photo. If <em class="parameter"><code>album</code></em> is not the first photoalbum, the photo
+will be removed from that album only. If <em class="parameter"><code>album</code></em> is NULL or the
+first photoalbum (Photo Library), the photo will be removed from
+all albums and the <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a>.
+</p>
+<p>
+</p>
+<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
+<h3 class="title">Note</h3>
+<em class="parameter"><code>photo</code></em> will be freed and can no longer be used if removed from the
+first photoalbum.
+</div>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>db</code></em>&#160;:</span></p></td>
+<td>     the <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a> to remove the photo from
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>album</code></em>&#160;:</span></p></td>
+<td>  the album to remove the photo from. If album is NULL, then
+         it will first be removed from all photoalbums and then
+         from the photo database as well.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>photo</code></em>&#160;:</span></p></td>
+<td>  <a class="link" href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a> (photo) to remove.
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2753278"></a><h3>
+<a name="Itdb-PhotoAlbum"></a>Itdb_PhotoAlbum</h3>
+<a class="indexterm" name="id2753293"></a><pre class="programlisting">typedef struct {
+    Itdb_PhotoDB *photodb;
+    gchar *name;
+    GList *members;
+    guint8 album_type;
+    guint8 playmusic;
+    guint8 repeat;
+    guint8 random;
+    guint8 show_titles;
+    guint8 transition_direction;
+    gint32 slide_duration;
+    gint32 transition_duration;
+    gint64 song_id;
+    gint32 unk024;
+    gint16 unk028;
+    gint32 unk044;
+    gint32 unk048;
+    /* set automatically at time of writing the PhotoDB */
+    gint32  album_id;
+    gint32  prev_album_id;
+    /* reserved for future use */
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+    /* below is for use by application */
+    guint64 usertype;
+    gpointer userdata;
+    /* functions called to duplicate/free userdata */
+    ItdbUserDataDuplicateFunc userdata_duplicate;
+    ItdbUserDataDestroyFunc userdata_destroy;
+} Itdb_PhotoAlbum;
+</pre>
+<p>
+Structure representing an iTunes Photo Album</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a>&#160;*<em class="structfield"><code>photodb</code></em>;</span></p></td>
+<td>              A pointer to the <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a> (for convenience)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>name</code></em>;</span></p></td>
+<td>                 The name of photoalbum in UTF8
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
+>GList</a>&#160;*<em class="structfield"><code>members</code></em>;</span></p></td>
+<td>              A list of photos in album (<a class="link" href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a>)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>album_type</code></em>;</span></p></td>
+<td>           The album type.  0x01 for master (Photo Library),
+                       0x02 for a normal album.  (4 and 5 have also been
+                       seen.)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>playmusic</code></em>;</span></p></td>
+<td>            Play music during slideshow
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>repeat</code></em>;</span></p></td>
+<td>               Repeat the slideshow
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>random</code></em>;</span></p></td>
+<td>               Show slides in random order
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>show_titles</code></em>;</span></p></td>
+<td>          Show slide captions
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>transition_direction</code></em>;</span></p></td>
+<td> Transition direction.  0=none, 1=left-to-right,
+                       2=right-to-left, 3=top-to-bottom, 4=bottom-to-top
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>slide_duration</code></em>;</span></p></td>
+<td>       Slide duration in seconds
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>transition_duration</code></em>;</span></p></td>
+<td>  Transition duration, in milliseconds
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint64"
+>gint64</a>&#160;<em class="structfield"><code>song_id</code></em>;</span></p></td>
+<td>              The <em class="parameter"><code>dbid2</code></em> of a track to play during slideshow
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>unk024</code></em>;</span></p></td>
+<td>               Unknown, seems to be always 0
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint16"
+>gint16</a>&#160;<em class="structfield"><code>unk028</code></em>;</span></p></td>
+<td>               Unknown, seems to be always 0
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>unk044</code></em>;</span></p></td>
+<td>               Unknown, seems to always be 0
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>unk048</code></em>;</span></p></td>
+<td>               Unknown, seems to always be 0
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>album_id</code></em>;</span></p></td>
+<td>             The id of the album.  This is set automatically when
+                       the PhotoDB is written.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>prev_album_id</code></em>;</span></p></td>
+<td>        The id of the previous playlist.  This is set
+                       automatically when the PhotoDB is written.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int1</code></em>;</span></p></td>
+<td>        Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int2</code></em>;</span></p></td>
+<td>        Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved1</code></em>;</span></p></td>
+<td>            Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved2</code></em>;</span></p></td>
+<td>            Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
+>guint64</a>&#160;<em class="structfield"><code>usertype</code></em>;</span></p></td>
+<td>             For use by application
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>userdata</code></em>;</span></p></td>
+<td>             For use by application
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDuplicateFunc">ItdbUserDataDuplicateFunc</a>&#160;<em class="structfield"><code>userdata_duplicate</code></em>;</span></p></td>
+<td>   A function to duplicate <span class="type">userdata</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDestroyFunc">ItdbUserDataDestroyFunc</a>&#160;<em class="structfield"><code>userdata_destroy</code></em>;</span></p></td>
+<td>     A function to free <span class="type">userdata</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2753922"></a><h3>
+<a name="itdb-photodb-photoalbum-create"></a>itdb_photodb_photoalbum_create ()</h3>
+<a class="indexterm" name="id2753937"></a><pre class="programlisting"><a class="link" href="libgpod-Photo-database.html#Itdb-PhotoAlbum">Itdb_PhotoAlbum</a>*    itdb_photodb_photoalbum_create      (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *albumname,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> pos);</pre>
+<p>
+Create and add a new photoalbum.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>db</code></em>&#160;:</span></p></td>
+<td>         The database to create a new album in
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>albumname</code></em>&#160;:</span></p></td>
+<td>  the name of the new album
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>pos</code></em>&#160;:</span></p></td>
+<td>        position where to insert the newly created album (-1
+             to append at the end).
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> the album which was created and added.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.2
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2754860"></a><h3>
+<a name="itdb-photodb-photoalbum-add-photo"></a>itdb_photodb_photoalbum_add_photo ()</h3>
+<a class="indexterm" name="id2754875"></a><pre class="programlisting">void                itdb_photodb_photoalbum_add_photo   (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
+                                                         <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoAlbum">Itdb_PhotoAlbum</a> *album,
+                                                         <a class="link" href="libgpod-Artwork.html#Itdb-Artwork">Itdb_Artwork</a> *photo,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> position);</pre>
+<p>
+Adds a photo already in the library to the specified album
+<em class="parameter"><code>album</code></em>. Photos are automatically added to the first album (Photo
+Library) when calling <a class="link" href="libgpod-Photo-database.html#itdb-photodb-add-photo"><code class="function">itdb_photodb_add_photo()</code></a> or
+<a class="link" href="libgpod-Photo-database.html#itdb-photodb-add-photo-from-data"><code class="function">itdb_photodb_add_photo_from_data()</code></a>, so you don't have to use this
+function to add them there.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>db</code></em>&#160;:</span></p></td>
+<td>         the <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a> to act on
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>album</code></em>&#160;:</span></p></td>
+<td>      the <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoAlbum"><span class="type">Itdb_PhotoAlbum</span></a> to add the photo to
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>photo</code></em>&#160;:</span></p></td>
+<td>      a pointer to the photo (<a class="link" href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a>) to add to the
+             album
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>position</code></em>&#160;:</span></p></td>
+<td>   position where to insert the new photo (-1 to append
+             at the end)
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.2
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2755030"></a><h3>
+<a name="itdb-photodb-photoalbum-by-name"></a>itdb_photodb_photoalbum_by_name ()</h3>
+<a class="indexterm" name="id2755045"></a><pre class="programlisting"><a class="link" href="libgpod-Photo-database.html#Itdb-PhotoAlbum">Itdb_PhotoAlbum</a>*    itdb_photodb_photoalbum_by_name     (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *albumname);</pre>
+<p>
+Find the first photoalbum with a given name or the Photo Library
+Album if called with no name.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>db</code></em>&#160;:</span></p></td>
+<td>         the <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a> to retrieve the album from
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>albumname</code></em>&#160;:</span></p></td>
+<td>  the name of the photoalbum to get or NULL for the
+             master photoalbum.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a pointer to the first photoalbum named <em class="parameter"><code>albumname</code></em>,
+else NULL
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.2
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2755140"></a><h3>
+<a name="itdb-photodb-photoalbum-remove"></a>itdb_photodb_photoalbum_remove ()</h3>
+<a class="indexterm" name="id2755155"></a><pre class="programlisting">void                itdb_photodb_photoalbum_remove      (<a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB">Itdb_PhotoDB</a> *db,
+                                                         <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoAlbum">Itdb_PhotoAlbum</a> *album,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a> remove_pics);</pre>
+<p>
+Remove <em class="parameter"><code>album</code></em> from the Photo Database. If <em class="parameter"><code>remove_pics</code></em> is TRUE,
+remove all photos contained in <em class="parameter"><code>album</code></em> from the Photo Database.
+</p>
+<p>
+</p>
+<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
+<h3 class="title">Note</h3>
+Memory used by the removed album will be freed and the album cannot
+be accessed any more.
+</div>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>db</code></em>&#160;:</span></p></td>
+<td>             the <a class="link" href="libgpod-Photo-database.html#Itdb-PhotoDB"><span class="type">Itdb_PhotoDB</span></a> to apply changes to
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>album</code></em>&#160;:</span></p></td>
+<td>          the album to be removed from the database
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>remove_pics</code></em>&#160;:</span></p></td>
+<td>    TRUE to remove pics in that album permanently
+                 from the database.
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.2
+</p>
+</div>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2755278"></a><div class="refsect2" lang="en"><a name="id2755279"></a></div>
+<hr>
+<div class="refsect2" lang="en"><a name="id2755280"></a></div>
+</div>
+</div>
+</body>
+</html>

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-Playlists.html
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-Playlists.html	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-Playlists.html	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,1195 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Playlists</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="index.html" title="libgpod Reference Manual">
+<link rel="up" href="ch01.html" title="iPod database components">
+<link rel="prev" href="libgpod-Tracks.html" title="Tracks">
+<link rel="next" href="libgpod-Smart-Playlists.html" title="Smart Playlists">
+<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+<link rel="part" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
+<link rel="chapter" href="ch01.html" title="iPod database components">
+<link rel="part" href="photodb.html" title="Part&#160;II.&#160;Photo database">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="libgpod-Tracks.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">libgpod Reference Manual</th>
+<td><a accesskey="n" href="libgpod-Smart-Playlists.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2697296" class="shortcut">Top</a>
+                  &#160;|&#160;
+                  <a href="#id2717320" class="shortcut">Description</a></nobr></td></tr>
+</table>
+<div class="refentry" lang="en">
+<a name="libgpod-Playlists"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2>
+<a name="id2697296"></a><span class="refentrytitle">Playlists</span>
+</h2>
+<p>Playlists &#8212; Data structure to represent an iPod playlist</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<pre class="synopsis">
+
+
+
+                    <a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>;
+enum                <a class="link" href="libgpod-Playlists.html#ItdbPlaylistSortOrder">ItdbPlaylistSortOrder</a>;
+<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      <a class="link" href="libgpod-Playlists.html#itdb-playlist-new">itdb_playlist_new</a>                   (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *title,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a> spl);
+void                <a class="link" href="libgpod-Playlists.html#itdb-playlist-free">itdb_playlist_free</a>                  (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);
+<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      <a class="link" href="libgpod-Playlists.html#itdb-playlist-duplicate">itdb_playlist_duplicate</a>             (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);
+void                <a class="link" href="libgpod-Playlists.html#itdb-playlist-add">itdb_playlist_add</a>                   (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         <a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a> pos);
+void                <a class="link" href="libgpod-Playlists.html#itdb-playlist-move">itdb_playlist_move</a>                  (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a> pos);
+void                <a class="link" href="libgpod-Playlists.html#itdb-playlist-remove">itdb_playlist_remove</a>                (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);
+void                <a class="link" href="libgpod-Playlists.html#itdb-playlist-unlink">itdb_playlist_unlink</a>                (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);
+void                <a class="link" href="libgpod-Playlists.html#itdb-playlist-add-track">itdb_playlist_add_track</a>             (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
+                                                         <a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a> pos);
+void                <a class="link" href="libgpod-Playlists.html#itdb-playlist-remove-track">itdb_playlist_remove_track</a>          (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
+                                                         <a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Playlists.html#itdb-playlist-contains-track">itdb_playlist_contains_track</a>        (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
+                                                         <a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>             <a class="link" href="libgpod-Playlists.html#itdb-playlist-contain-track-number">itdb_playlist_contain_track_number</a>  (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *tr);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>             <a class="link" href="libgpod-Playlists.html#itdb-playlist-tracks-number">itdb_playlist_tracks_number</a>         (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);
+<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      <a class="link" href="libgpod-Playlists.html#itdb-playlist-mpl">itdb_playlist_mpl</a>                   (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Playlists.html#itdb-playlist-is-mpl">itdb_playlist_is_mpl</a>                (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);
+void                <a class="link" href="libgpod-Playlists.html#itdb-playlist-set-mpl">itdb_playlist_set_mpl</a>               (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);
+<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      <a class="link" href="libgpod-Playlists.html#itdb-playlist-podcasts">itdb_playlist_podcasts</a>              (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Playlists.html#itdb-playlist-is-podcasts">itdb_playlist_is_podcasts</a>           (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);
+void                <a class="link" href="libgpod-Playlists.html#itdb-playlist-set-podcasts">itdb_playlist_set_podcasts</a>          (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Playlists.html#itdb-playlist-exists">itdb_playlist_exists</a>                (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         <a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);
+<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      <a class="link" href="libgpod-Playlists.html#itdb-playlist-by-id">itdb_playlist_by_id</a>                 (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
+>guint64</a> id);
+<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      <a class="link" href="libgpod-Playlists.html#itdb-playlist-by-nr">itdb_playlist_by_nr</a>                 (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a> num);
+<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      <a class="link" href="libgpod-Playlists.html#itdb-playlist-by-name">itdb_playlist_by_name</a>               (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *name);
+void                <a class="link" href="libgpod-Playlists.html#itdb-playlist-randomize">itdb_playlist_randomize</a>             (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);
+</pre>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2717320"></a><h2>Description</h2>
+<p>
+These functions and structures allow for adding and removing playlists,
+adding and removing tracks from playlists, sorting playlists, finding tracks in
+a playlist, etc.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2717339"></a><h2>Details</h2>
+<div class="refsect2" lang="en">
+<a name="id2717350"></a><h3>
+<a name="Itdb-Playlist"></a>Itdb_Playlist</h3>
+<a class="indexterm" name="id2717362"></a><pre class="programlisting">typedef struct {
+    Itdb_iTunesDB *itdb;
+    gchar *name;
+    guint8 type;
+    guint8 flag1;
+    guint8 flag2;
+    guint8 flag3;
+    gint  num;
+    GList *members;
+    gboolean is_spl;
+    time_t timestamp;
+    guint64 id;
+    guint32 sortorder;
+    guint32 podcastflag;
+    Itdb_SPLPref splpref;
+    Itdb_SPLRules splrules;
+    gpointer reserved100;
+    gpointer reserved101;
+    /* reserved for future use */
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+    /* below is for use by application */
+    guint64 usertype;
+    gpointer userdata;
+    /* functions called to duplicate/free userdata */
+    ItdbUserDataDuplicateFunc userdata_duplicate;
+    ItdbUserDataDestroyFunc userdata_destroy;
+} Itdb_Playlist;
+</pre>
+<p>
+Structure representing an iTunes Playlist</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a>&#160;*<em class="structfield"><code>itdb</code></em>;</span></p></td>
+<td>               A pointer to the <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> (for convenience)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>name</code></em>;</span></p></td>
+<td>               The name of the playlist in UTF8
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>type</code></em>;</span></p></td>
+<td>               The playlist type (normal or master)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>flag1</code></em>;</span></p></td>
+<td>              Unknown, usually set to 0
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>flag2</code></em>;</span></p></td>
+<td>              Unknown, always set to 0
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>flag3</code></em>;</span></p></td>
+<td>              Unknown, always set to 0
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a>&#160;<em class="structfield"><code>num</code></em>;</span></p></td>
+<td>                The number of tracks in the playlist
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
+>GList</a>&#160;*<em class="structfield"><code>members</code></em>;</span></p></td>
+<td>            A list of tracks in the playlist (<a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>&#160;<em class="structfield"><code>is_spl</code></em>;</span></p></td>
+<td>             True if the playlist is a smart playlist, otherwise
+                     false
+</td>
+</tr>
+<tr>
+<td><p><span class="term">time_t&#160;<em class="structfield"><code>timestamp</code></em>;</span></p></td>
+<td>          When the playlist was created
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
+>guint64</a>&#160;<em class="structfield"><code>id</code></em>;</span></p></td>
+<td>                 The playlist ID
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>sortorder</code></em>;</span></p></td>
+<td>          The playlist sort order (<a class="link" href="libgpod-Playlists.html#ItdbPlaylistSortOrder"><span class="type">ItdbPlaylistSortOrder</span></a>)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>podcastflag</code></em>;</span></p></td>
+<td>        This is set to 0 on normal playlists and to 1 for the
+                     Podcast playlist. If set to 1, the playlist will not be
+                     shown under 'Playlists' on the iPod, but as 'Podcasts'
+                     under the Music menu. The actual title of the Playlist
+                     does not matter. If more than one playlist is set to 1,
+                     they don't show up at all.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLPref">Itdb_SPLPref</a>&#160;<em class="structfield"><code>splpref</code></em>;</span></p></td>
+<td>            Smart playlist preferences (<a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLPref"><span class="type">Itdb_SPLPref</span></a>)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRules">Itdb_SPLRules</a>&#160;<em class="structfield"><code>splrules</code></em>;</span></p></td>
+<td>           Smart playlist rules (<a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRules"><span class="type">Itdb_SPLRules</span></a>)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved100</code></em>;</span></p></td>
+<td>        Reserved for MHOD100 implementation
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved101</code></em>;</span></p></td>
+<td>        Reserved for MHOD100 implementation
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int1</code></em>;</span></p></td>
+<td>      Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int2</code></em>;</span></p></td>
+<td>      Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved1</code></em>;</span></p></td>
+<td>          Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved2</code></em>;</span></p></td>
+<td>          Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
+>guint64</a>&#160;<em class="structfield"><code>usertype</code></em>;</span></p></td>
+<td>           For use by application
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>userdata</code></em>;</span></p></td>
+<td>           For use by application
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDuplicateFunc">ItdbUserDataDuplicateFunc</a>&#160;<em class="structfield"><code>userdata_duplicate</code></em>;</span></p></td>
+<td> A function to duplicate <span class="type">userdata</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDestroyFunc">ItdbUserDataDestroyFunc</a>&#160;<em class="structfield"><code>userdata_destroy</code></em>;</span></p></td>
+<td>   A function to free <span class="type">userdata</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2728343"></a><h3>
+<a name="ItdbPlaylistSortOrder"></a>enum ItdbPlaylistSortOrder</h3>
+<a class="indexterm" name="id2728357"></a><pre class="programlisting">typedef enum
+{
+    ITDB_PSO_MANUAL = 1,
+/*    ITDB_PSO_UNKNOWN = 2, */
+    ITDB_PSO_TITLE = 3,
+    ITDB_PSO_ALBUM = 4,
+    ITDB_PSO_ARTIST = 5,
+    ITDB_PSO_BIRATE = 6,
+    ITDB_PSO_GENRE = 7,
+    ITDB_PSO_FILETYPE = 8,
+    ITDB_PSO_TIME_MODIFIED = 9,
+    ITDB_PSO_TRACK_NR = 10,
+    ITDB_PSO_SIZE = 11,
+    ITDB_PSO_TIME = 12,  /* ? */
+    ITDB_PSO_YEAR = 13,
+    ITDB_PSO_SAMPLERATE = 14,
+    ITDB_PSO_COMMENT = 15,
+    ITDB_PSO_TIME_ADDED = 16,
+    ITDB_PSO_EQUALIZER = 17, /* ? */
+    ITDB_PSO_COMPOSER = 18,
+/*    ITDB_PSO_UNKNOWN = 19, */
+    ITDB_PSO_PLAYCOUNT = 20,
+    ITDB_PSO_TIME_PLAYED = 21,
+    ITDB_PSO_CD_NR = 22,
+    ITDB_PSO_RATING = 23,
+    ITDB_PSO_RELEASE_DATE = 24, /* used by podcasts */
+    ITDB_PSO_BPM = 25,
+    ITDB_PSO_GROUPING = 26,
+    ITDB_PSO_CATEGORY = 27,
+    ITDB_PSO_DESCRIPTION = 28
+} ItdbPlaylistSortOrder;
+</pre>
+<p>
+Playlist Sort Order</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-MANUAL:CAPS"></a><code class="literal">ITDB_PSO_MANUAL</code></span></p></td>
+<td>        Sort by playlist order (manual sort)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-TITLE:CAPS"></a><code class="literal">ITDB_PSO_TITLE</code></span></p></td>
+<td>         Sort by track title
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-ALBUM:CAPS"></a><code class="literal">ITDB_PSO_ALBUM</code></span></p></td>
+<td>         Sort by album
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-ARTIST:CAPS"></a><code class="literal">ITDB_PSO_ARTIST</code></span></p></td>
+<td>        Sort by artist
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-BIRATE:CAPS"></a><code class="literal">ITDB_PSO_BIRATE</code></span></p></td>
+<td>        Sort by bitrate
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-GENRE:CAPS"></a><code class="literal">ITDB_PSO_GENRE</code></span></p></td>
+<td>         Sort by genre
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-FILETYPE:CAPS"></a><code class="literal">ITDB_PSO_FILETYPE</code></span></p></td>
+<td>      Sort by filetype
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-TIME-MODIFIED:CAPS"></a><code class="literal">ITDB_PSO_TIME_MODIFIED</code></span></p></td>
+<td> Sort by date modified
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-TRACK-NR:CAPS"></a><code class="literal">ITDB_PSO_TRACK_NR</code></span></p></td>
+<td>      Sort by track number
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-SIZE:CAPS"></a><code class="literal">ITDB_PSO_SIZE</code></span></p></td>
+<td>          Sort by track size
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-TIME:CAPS"></a><code class="literal">ITDB_PSO_TIME</code></span></p></td>
+<td>          Sort by track time
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-YEAR:CAPS"></a><code class="literal">ITDB_PSO_YEAR</code></span></p></td>
+<td>          Sort by year
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-SAMPLERATE:CAPS"></a><code class="literal">ITDB_PSO_SAMPLERATE</code></span></p></td>
+<td>    Sort by samplerate
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-COMMENT:CAPS"></a><code class="literal">ITDB_PSO_COMMENT</code></span></p></td>
+<td>       Sort by comments
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-TIME-ADDED:CAPS"></a><code class="literal">ITDB_PSO_TIME_ADDED</code></span></p></td>
+<td>    Sort by date added
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-EQUALIZER:CAPS"></a><code class="literal">ITDB_PSO_EQUALIZER</code></span></p></td>
+<td>     Sort by equilizer
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-COMPOSER:CAPS"></a><code class="literal">ITDB_PSO_COMPOSER</code></span></p></td>
+<td>      Sort by composer
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-PLAYCOUNT:CAPS"></a><code class="literal">ITDB_PSO_PLAYCOUNT</code></span></p></td>
+<td>     Sort by playcount
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-TIME-PLAYED:CAPS"></a><code class="literal">ITDB_PSO_TIME_PLAYED</code></span></p></td>
+<td>   Sort by date last played
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-CD-NR:CAPS"></a><code class="literal">ITDB_PSO_CD_NR</code></span></p></td>
+<td>         Sort by disc number
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-RATING:CAPS"></a><code class="literal">ITDB_PSO_RATING</code></span></p></td>
+<td>        Sort by rating
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-RELEASE-DATE:CAPS"></a><code class="literal">ITDB_PSO_RELEASE_DATE</code></span></p></td>
+<td>  Sort by release date
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-BPM:CAPS"></a><code class="literal">ITDB_PSO_BPM</code></span></p></td>
+<td>           Sort by beats per minute
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-GROUPING:CAPS"></a><code class="literal">ITDB_PSO_GROUPING</code></span></p></td>
+<td>      Sort by grouping
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-CATEGORY:CAPS"></a><code class="literal">ITDB_PSO_CATEGORY</code></span></p></td>
+<td>      Sort by category
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-PSO-DESCRIPTION:CAPS"></a><code class="literal">ITDB_PSO_DESCRIPTION</code></span></p></td>
+<td>   Sort by description
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.1.3
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2728951"></a><h3>
+<a name="itdb-playlist-new"></a>itdb_playlist_new ()</h3>
+<a class="indexterm" name="id2728964"></a><pre class="programlisting"><a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      itdb_playlist_new                   (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *title,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a> spl);</pre>
+<p>
+Creates a new playlist. If <em class="parameter"><code>spl</code></em> is TRUE, a smart playlist is
+generated. pl-&gt;id is set by <a class="link" href="libgpod-Playlists.html#itdb-playlist-add"><code class="function">itdb_playlist_add()</code></a> when the playlist
+is added to an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>title</code></em>&#160;:</span></p></td>
+<td>  playlist title
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>spl</code></em>&#160;:</span></p></td>
+<td>    smart playlist flag
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a new <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a> which must be freed with
+<a class="link" href="libgpod-Playlists.html#itdb-playlist-free"><code class="function">itdb_playlist_free()</code></a> after use
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2729084"></a><h3>
+<a name="itdb-playlist-free"></a>itdb_playlist_free ()</h3>
+<a class="indexterm" name="id2729097"></a><pre class="programlisting">void                itdb_playlist_free                  (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
+<p>
+Frees the memory used by playlist <em class="parameter"><code>pl</code></em>.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2729160"></a><h3>
+<a name="itdb-playlist-duplicate"></a>itdb_playlist_duplicate ()</h3>
+<a class="indexterm" name="id2729171"></a><pre class="programlisting"><a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      itdb_playlist_duplicate             (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
+<p>
+Duplicates an existing playlist. <em class="parameter"><code>pl_dup-&gt;id</code></em> is set to zero, so
+that it will be set to a unique value when adding it to an
+<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>. The returned playlist won't be associated with an
+<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a newly allocated <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a> that you'll have to
+free with <a class="link" href="libgpod-Playlists.html#itdb-playlist-free"><code class="function">itdb_playlist_free()</code></a> when you no longer need it.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2729280"></a><h3>
+<a name="itdb-playlist-add"></a>itdb_playlist_add ()</h3>
+<a class="indexterm" name="id2729292"></a><pre class="programlisting">void                itdb_playlist_add                   (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         <a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a> pos);</pre>
+<p>
+Adds playlist <em class="parameter"><code>pl</code></em> to the database <em class="parameter"><code>itdb</code></em> at position <em class="parameter"><code>pos</code></em> (-1 for
+"append to end"). A unique id is created if <em class="parameter"><code>pl-&gt;id</code></em> is equal to
+zero. After calling this function, <em class="parameter"><code>itdb</code></em> manages the memory of <em class="parameter"><code>pl</code></em>,
+which means you no longer need to explicitly call
+<a class="link" href="libgpod-Playlists.html#itdb-playlist-free"><code class="function">itdb_playlist_free()</code></a></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td>   an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td>     an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>pos</code></em>&#160;:</span></p></td>
+<td>    position to insert <em class="parameter"><code>pl</code></em> at
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2729451"></a><h3>
+<a name="itdb-playlist-move"></a>itdb_playlist_move ()</h3>
+<a class="indexterm" name="id2729464"></a><pre class="programlisting">void                itdb_playlist_move                  (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a> pos);</pre>
+<p>
+Moves playlist <em class="parameter"><code>pl</code></em> to position <em class="parameter"><code>pos</code></em></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td>     an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>pos</code></em>&#160;:</span></p></td>
+<td>    new position
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2729553"></a><h3>
+<a name="itdb-playlist-remove"></a>itdb_playlist_remove ()</h3>
+<a class="indexterm" name="id2729564"></a><pre class="programlisting">void                itdb_playlist_remove                (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
+<p>
+Removes <em class="parameter"><code>pl</code></em> from the <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> it's associated with
+and frees memory</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2729634"></a><h3>
+<a name="itdb-playlist-unlink"></a>itdb_playlist_unlink ()</h3>
+<a class="indexterm" name="id2729646"></a><pre class="programlisting">void                itdb_playlist_unlink                (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
+<p>
+Remove <em class="parameter"><code>pl</code></em> from the <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> it's associated with but do not
+free memory. <em class="parameter"><code>pl-&gt;itdb</code></em> is set to NULL after this function returns</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2729722"></a><h3>
+<a name="itdb-playlist-add-track"></a>itdb_playlist_add_track ()</h3>
+<a class="indexterm" name="id2729734"></a><pre class="programlisting">void                itdb_playlist_add_track             (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
+                                                         <a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a> pos);</pre>
+<p>
+Adds <em class="parameter"><code>track</code></em> to <em class="parameter"><code>pl</code></em> at position <em class="parameter"><code>pos</code></em> (-1 to append at the end)</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td>     an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></p></td>
+<td>  an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>pos</code></em>&#160;:</span></p></td>
+<td>    position to insert <em class="parameter"><code>track</code></em> at
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2729864"></a><h3>
+<a name="itdb-playlist-remove-track"></a>itdb_playlist_remove_track ()</h3>
+<a class="indexterm" name="id2735447"></a><pre class="programlisting">void                itdb_playlist_remove_track          (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
+                                                         <a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);</pre>
+<p>
+Removes <em class="parameter"><code>track</code></em> from <em class="parameter"><code>pl</code></em>. If <em class="parameter"><code>pl</code></em> is NULL, removes <em class="parameter"><code>track</code></em> from the
+master playlist. If <em class="parameter"><code>track</code></em> can't be found in <em class="parameter"><code>pl</code></em>, nothing happens.
+If after removing <em class="parameter"><code>track</code></em>, <em class="parameter"><code>pl</code></em> is empty, it's not removed from the
+database The memory used by <em class="parameter"><code>track</code></em> isn't freed.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td>     an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></p></td>
+<td>  an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2735571"></a><h3>
+<a name="itdb-playlist-contains-track"></a>itdb_playlist_contains_track ()</h3>
+<a class="indexterm" name="id2735583"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_playlist_contains_track        (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
+                                                         <a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);</pre>
+<p>
+Checks if <em class="parameter"><code>track</code></em> is in <em class="parameter"><code>pl</code></em></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td>     an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></p></td>
+<td>  an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> TRUE if <em class="parameter"><code>track</code></em> is in <em class="parameter"><code>pl</code></em>, FALSE otherwise
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2735688"></a><h3>
+<a name="itdb-playlist-contain-track-number"></a>itdb_playlist_contain_track_number ()</h3>
+<a class="indexterm" name="id2735702"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>             itdb_playlist_contain_track_number  (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *tr);</pre>
+<p>
+Counts the number of playlist <em class="parameter"><code>track</code></em> is a member of (not including
+the master playlist)</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>tr</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> the number of playlist containing <em class="parameter"><code>track</code></em>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2735774"></a><h3>
+<a name="itdb-playlist-tracks-number"></a>itdb_playlist_tracks_number ()</h3>
+<a class="indexterm" name="id2735785"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>             itdb_playlist_tracks_number         (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
+<p>
+Counts the number of tracks in <em class="parameter"><code>pl</code></em></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> the number of tracks in <em class="parameter"><code>pl</code></em>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2735855"></a><h3>
+<a name="itdb-playlist-mpl"></a>itdb_playlist_mpl ()</h3>
+<a class="indexterm" name="id2735865"></a><pre class="programlisting"><a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      itdb_playlist_mpl                   (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);</pre>
+<p>
+Gets the master playlist of <em class="parameter"><code>itdb</code></em></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> the master playlist of <em class="parameter"><code>itdb</code></em>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2735935"></a><h3>
+<a name="itdb-playlist-is-mpl"></a>itdb_playlist_is_mpl ()</h3>
+<a class="indexterm" name="id2735947"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_playlist_is_mpl                (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
+<p>
+Checks if <em class="parameter"><code>pl</code></em> is the master playlist</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> TRUE if <em class="parameter"><code>pl</code></em> is the master playlist, FALSE otherwise
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.1.6
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2736024"></a><h3>
+<a name="itdb-playlist-set-mpl"></a>itdb_playlist_set_mpl ()</h3>
+<a class="indexterm" name="id2736037"></a><pre class="programlisting">void                itdb_playlist_set_mpl               (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
+<p>
+Sets <em class="parameter"><code>pl</code></em> to be a master playlist</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+</td>
+</tr></tbody>
+</table></div>
+<p class="since">Since  0.2.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2736098"></a><h3>
+<a name="itdb-playlist-podcasts"></a>itdb_playlist_podcasts ()</h3>
+<a class="indexterm" name="id2736111"></a><pre class="programlisting"><a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      itdb_playlist_podcasts              (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);</pre>
+<p>
+Gets the podcasts playlist of <em class="parameter"><code>itdb</code></em></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> the podcasts playlist of <em class="parameter"><code>itdb</code></em>, or NULL if there is
+not one
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.1.6
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2736187"></a><h3>
+<a name="itdb-playlist-is-podcasts"></a>itdb_playlist_is_podcasts ()</h3>
+<a class="indexterm" name="id2736200"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_playlist_is_podcasts           (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
+<p>
+Checks if <em class="parameter"><code>pl</code></em> is the podcasts playlist</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> TRUE if <em class="parameter"><code>pl</code></em> is the podcasts playlist, FALSE otherwise
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.1.6
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2736278"></a><h3>
+<a name="itdb-playlist-set-podcasts"></a>itdb_playlist_set_podcasts ()</h3>
+<a class="indexterm" name="id2736291"></a><pre class="programlisting">void                itdb_playlist_set_podcasts          (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
+<p>
+Set <em class="parameter"><code>pl</code></em> to be a podcasts playlist</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+</td>
+</tr></tbody>
+</table></div>
+<p class="since">Since  0.2.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2736352"></a><h3>
+<a name="itdb-playlist-exists"></a>itdb_playlist_exists ()</h3>
+<a class="indexterm" name="id2736363"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_playlist_exists                (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         <a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
+<p>
+Checks if <em class="parameter"><code>pl</code></em> is present in <em class="parameter"><code>itdb</code></em></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td>   an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td>     an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> TRUE if <em class="parameter"><code>pl</code></em> exists in <em class="parameter"><code>itdb</code></em>, FALSE otherwise
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2736468"></a><h3>
+<a name="itdb-playlist-by-id"></a>itdb_playlist_by_id ()</h3>
+<a class="indexterm" name="id2736478"></a><pre class="programlisting"><a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      itdb_playlist_by_id                 (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
+>guint64</a> id);</pre>
+<p>
+Looks up a playlist whose ID is <em class="parameter"><code>id</code></em></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td>   an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>id</code></em>&#160;:</span></p></td>
+<td>     ID of the playlist to look for
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> the <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a> with ID <em class="parameter"><code>id</code></em> or NULL if there is no
+such playlist.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2736575"></a><h3>
+<a name="itdb-playlist-by-nr"></a>itdb_playlist_by_nr ()</h3>
+<a class="indexterm" name="id2736585"></a><pre class="programlisting"><a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      itdb_playlist_by_nr                 (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a> num);</pre>
+<p>
+Gets the playlist at the given position in <em class="parameter"><code>itdb</code></em></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td>   an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>num</code></em>&#160;:</span></p></td>
+<td>    the position of the playlist, counting from 0
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> the <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>, or NULL if there is no playlist
+at <em class="parameter"><code>pos</code></em>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2736682"></a><h3>
+<a name="itdb-playlist-by-name"></a>itdb_playlist_by_name ()</h3>
+<a class="indexterm" name="id2736692"></a><pre class="programlisting"><a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a>*      itdb_playlist_by_name               (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *name);</pre>
+<p>
+Searches a playlist whose name is <em class="parameter"><code>name</code></em> in <em class="parameter"><code>itdb</code></em></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td>   an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>name</code></em>&#160;:</span></p></td>
+<td>   name of the playlist to look for
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> the first <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a> with name <em class="parameter"><code>name</code></em>, NULL if
+there is no such playlist
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2736794"></a><h3>
+<a name="itdb-playlist-randomize"></a>itdb_playlist_randomize ()</h3>
+<a class="indexterm" name="id2736805"></a><pre class="programlisting">void                itdb_playlist_randomize             (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl);</pre>
+<p>
+Randomizes <em class="parameter"><code>pl</code></em></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a> to randomize
+</td>
+</tr></tbody>
+</table></div>
+</div>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2736860"></a><div class="refsect2" lang="en"><a name="id2736861"></a></div>
+<hr>
+<div class="refsect2" lang="en"><a name="id2736862"></a></div>
+</div>
+</div>
+</body>
+</html>

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-Smart-Playlists.html
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-Smart-Playlists.html	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-Smart-Playlists.html	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,1569 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Smart Playlists</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="index.html" title="libgpod Reference Manual">
+<link rel="up" href="ch01.html" title="iPod database components">
+<link rel="prev" href="libgpod-Playlists.html" title="Playlists">
+<link rel="next" href="libgpod-Artwork.html" title="Artwork">
+<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+<link rel="part" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
+<link rel="chapter" href="ch01.html" title="iPod database components">
+<link rel="part" href="photodb.html" title="Part&#160;II.&#160;Photo database">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="libgpod-Playlists.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">libgpod Reference Manual</th>
+<td><a accesskey="n" href="libgpod-Artwork.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2707312" class="shortcut">Top</a>
+                  &#160;|&#160;
+                  <a href="#id2724833" class="shortcut">Description</a></nobr></td></tr>
+</table>
+<div class="refentry" lang="en">
+<a name="libgpod-Smart-Playlists"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2>
+<a name="id2707312"></a><span class="refentrytitle">Smart Playlists</span>
+</h2>
+<p>Smart Playlists &#8212; Data structure to represent an iPod smart playlist</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<pre class="synopsis">
+
+
+
+                    <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLPref">Itdb_SPLPref</a>;
+                    <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a>;
+                    <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRules">Itdb_SPLRules</a>;
+enum                <a class="link" href="libgpod-Smart-Playlists.html#ItdbLimitSort">ItdbLimitSort</a>;
+enum                <a class="link" href="libgpod-Smart-Playlists.html#ItdbLimitType">ItdbLimitType</a>;
+enum                <a class="link" href="libgpod-Smart-Playlists.html#ItdbSPLAction">ItdbSPLAction</a>;
+enum                <a class="link" href="libgpod-Smart-Playlists.html#ItdbSPLActionLast">ItdbSPLActionLast</a>;
+enum                <a class="link" href="libgpod-Smart-Playlists.html#ItdbSPLActionType">ItdbSPLActionType</a>;
+enum                <a class="link" href="libgpod-Smart-Playlists.html#ItdbSPLField">ItdbSPLField</a>;
+enum                <a class="link" href="libgpod-Smart-Playlists.html#ItdbSPLFieldType">ItdbSPLFieldType</a>;
+enum                <a class="link" href="libgpod-Smart-Playlists.html#ItdbSPLMatch">ItdbSPLMatch</a>;
+#define             <a class="link" href="libgpod-Smart-Playlists.html#ITDB-SPL-DATE-IDENTIFIER:CAPS">ITDB_SPL_DATE_IDENTIFIER</a>
+#define             <a class="link" href="libgpod-Smart-Playlists.html#ITDB-SPL-STRING-MAXLEN:CAPS">ITDB_SPL_STRING_MAXLEN</a>
+<a class="link" href="libgpod-Smart-Playlists.html#ItdbSPLFieldType">ItdbSPLFieldType</a>    <a class="link" href="libgpod-Smart-Playlists.html#itdb-splr-get-field-type">itdb_splr_get_field_type</a>            (const <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a> *splr);
+<a class="link" href="libgpod-Smart-Playlists.html#ItdbSPLActionType">ItdbSPLActionType</a>   <a class="link" href="libgpod-Smart-Playlists.html#itdb-splr-get-action-type">itdb_splr_get_action_type</a>           (const <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a> *splr);
+void                <a class="link" href="libgpod-Smart-Playlists.html#itdb-splr-validate">itdb_splr_validate</a>                  (<a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a> *splr);
+void                <a class="link" href="libgpod-Smart-Playlists.html#itdb-splr-remove">itdb_splr_remove</a>                    (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
+                                                         <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a> *splr);
+<a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a>*       <a class="link" href="libgpod-Smart-Playlists.html#itdb-splr-new">itdb_splr_new</a>                       (void);
+void                <a class="link" href="libgpod-Smart-Playlists.html#itdb-splr-add">itdb_splr_add</a>                       (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
+                                                         <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a> *splr,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> pos);
+<a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a>*       <a class="link" href="libgpod-Smart-Playlists.html#itdb-splr-add-new">itdb_splr_add_new</a>                   (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> pos);
+void                <a class="link" href="libgpod-Smart-Playlists.html#itdb-spl-copy-rules">itdb_spl_copy_rules</a>                 (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *dest,
+                                                         <a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *src);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Smart-Playlists.html#itdb-splr-eval">itdb_splr_eval</a>                      (<a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a> *splr,
+                                                         <a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);
+void                <a class="link" href="libgpod-Smart-Playlists.html#itdb-spl-update">itdb_spl_update</a>                     (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *spl);
+void                <a class="link" href="libgpod-Smart-Playlists.html#itdb-spl-update-all">itdb_spl_update_all</a>                 (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);
+void                <a class="link" href="libgpod-Smart-Playlists.html#itdb-spl-update-live">itdb_spl_update_live</a>                (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);
+</pre>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2724833"></a><h2>Description</h2>
+<p>
+These functions and structures are for dealing with smart playlists.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2724850"></a><h2>Details</h2>
+<div class="refsect2" lang="en">
+<a name="id2724861"></a><h3>
+<a name="Itdb-SPLPref"></a>Itdb_SPLPref</h3>
+<a class="indexterm" name="id2730717"></a><pre class="programlisting">typedef struct {
+    guint8  liveupdate;
+    guint8  checkrules;
+    guint8  checklimits;
+    guint32 limittype;
+    guint32 limitsort;
+    guint32 limitvalue;
+    guint8  matchcheckedonly;
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+} Itdb_SPLPref;
+</pre>
+<p>
+Smart Playlist preferences are for various flags that are not strictly smart
+playlist "rules."</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>liveupdate</code></em>;</span></p></td>
+<td>         Live Updating
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>checkrules</code></em>;</span></p></td>
+<td>         Match this number of rules.  If set to 0, ignore rules.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>checklimits</code></em>;</span></p></td>
+<td>        Limit to this number of <em class="parameter"><code>limittype</code></em>.  If 0, no limits.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>limittype</code></em>;</span></p></td>
+<td>          an <a class="link" href="libgpod-Smart-Playlists.html#ItdbLimitType"><span class="type">ItdbLimitType</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>limitsort</code></em>;</span></p></td>
+<td>          an <a class="link" href="libgpod-Smart-Playlists.html#ItdbLimitSort"><span class="type">ItdbLimitSort</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>limitvalue</code></em>;</span></p></td>
+<td>         The value typed next to "Limit type"
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>matchcheckedonly</code></em>;</span></p></td>
+<td>   Match only checked songs
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int1</code></em>;</span></p></td>
+<td>      Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int2</code></em>;</span></p></td>
+<td>      Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved1</code></em>;</span></p></td>
+<td>          Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved2</code></em>;</span></p></td>
+<td>          Reserved for future use
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.5.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2736889"></a><h3>
+<a name="Itdb-SPLRule"></a>Itdb_SPLRule</h3>
+<a class="indexterm" name="id2736904"></a><pre class="programlisting">typedef struct {
+    guint32 field;
+    guint32 action;
+    gchar *string;
+    guint64 fromvalue;
+    gint64 fromdate;
+    guint64 fromunits;
+    guint64 tovalue;
+    gint64 todate;
+    guint64 tounits;
+    guint32 unk052;
+    guint32 unk056;
+    guint32 unk060;
+    guint32 unk064;
+    guint32 unk068;
+    /* reserved for future use */
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+} Itdb_SPLRule;
+</pre>
+<p>
+Smart Playlist Rule
+</p>
+<p>
+The from and to fields require some explanation.  If <em class="parameter"><code>field</code></em> is a date type,
+then <em class="parameter"><code>value</code></em> would be set to 0x2dae2dae2dae2dae, <em class="parameter"><code>date</code></em> would be a number,
+(e.g. 2 or -2), and <em class="parameter"><code>units</code></em> would be a time unit in seconds (e.g. one week
+would be 604800).  If <em class="parameter"><code>field</code></em> is an integer comparison, like rating = 60 (i.e.
+3 stars), then <em class="parameter"><code>value</code></em> would be the value we care about (e.g. 60), <em class="parameter"><code>date</code></em> would
+be 0, and <em class="parameter"><code>units</code></em> would be 1.  Binary AND types are similar, <em class="parameter"><code>value</code></em> is the
+important part, with <em class="parameter"><code>date</code></em> = 0 and <em class="parameter"><code>units</code></em> = 1.  Clear as mud, right?
+</p>
+<p>
+For more details see <a class="ulink" href="http://ipodlinux.org/ITunesDB.html#Smart_Playlist_Rule_Values" target="_top">ipodlinux.org</a>.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>field</code></em>;</span></p></td>
+<td>          an <a class="link" href="libgpod-Smart-Playlists.html#ItdbSPLFieldType"><span class="type">ItdbSPLFieldType</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>action</code></em>;</span></p></td>
+<td>         an <a class="link" href="libgpod-Smart-Playlists.html#ItdbSPLActionType"><span class="type">ItdbSPLActionType</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>string</code></em>;</span></p></td>
+<td>         data in UTF8
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
+>guint64</a>&#160;<em class="structfield"><code>fromvalue</code></em>;</span></p></td>
+<td>      from value
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint64"
+>gint64</a>&#160;<em class="structfield"><code>fromdate</code></em>;</span></p></td>
+<td>       from date
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
+>guint64</a>&#160;<em class="structfield"><code>fromunits</code></em>;</span></p></td>
+<td>      from units
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
+>guint64</a>&#160;<em class="structfield"><code>tovalue</code></em>;</span></p></td>
+<td>        to value
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint64"
+>gint64</a>&#160;<em class="structfield"><code>todate</code></em>;</span></p></td>
+<td>         to date
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
+>guint64</a>&#160;<em class="structfield"><code>tounits</code></em>;</span></p></td>
+<td>        to units
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk052</code></em>;</span></p></td>
+<td>         Unknown
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk056</code></em>;</span></p></td>
+<td>         Unknown
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk060</code></em>;</span></p></td>
+<td>         Unknown
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk064</code></em>;</span></p></td>
+<td>         Unknown
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk068</code></em>;</span></p></td>
+<td>         Unknown
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int1</code></em>;</span></p></td>
+<td>  Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int2</code></em>;</span></p></td>
+<td>  Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved1</code></em>;</span></p></td>
+<td>      Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved2</code></em>;</span></p></td>
+<td>      Reserved for future use
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.5.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2737415"></a><h3>
+<a name="Itdb-SPLRules"></a>Itdb_SPLRules</h3>
+<a class="indexterm" name="id2737430"></a><pre class="programlisting">typedef struct {
+    guint32 unk004;
+    guint32 match_operator;
+    GList *rules;
+    /* reserved for future use */
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+} Itdb_SPLRules;
+</pre>
+<p>
+Smart Playlist Rules</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk004</code></em>;</span></p></td>
+<td>         Unknown
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>match_operator</code></em>;</span></p></td>
+<td> Whether all rules must match (<a class="link" href="libgpod-Smart-Playlists.html#ITDB-SPLMATCH-AND:CAPS"><span class="type">ITDB_SPLMATCH_AND</span></a>) or any
+                 rules may match (<a class="link" href="libgpod-Smart-Playlists.html#ITDB-SPLMATCH-OR:CAPS"><span class="type">ITDB_SPLMATCH_OR</span></a>)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
+>GList</a>&#160;*<em class="structfield"><code>rules</code></em>;</span></p></td>
+<td>          list of <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule"><span class="type">Itdb_SPLRule</span></a>'s
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int1</code></em>;</span></p></td>
+<td>  Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int2</code></em>;</span></p></td>
+<td>  Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved1</code></em>;</span></p></td>
+<td>      Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved2</code></em>;</span></p></td>
+<td>      Reserved for future use
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.5.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2737632"></a><h3>
+<a name="ItdbLimitSort"></a>enum ItdbLimitSort</h3>
+<a class="indexterm" name="id2737646"></a><pre class="programlisting">typedef enum {
+    ITDB_LIMITSORT_RANDOM = 0x02,
+    ITDB_LIMITSORT_SONG_NAME = 0x03,
+    ITDB_LIMITSORT_ALBUM = 0x04,
+    ITDB_LIMITSORT_ARTIST = 0x05,
+    ITDB_LIMITSORT_GENRE = 0x07,
+    ITDB_LIMITSORT_MOST_RECENTLY_ADDED = 0x10,
+    ITDB_LIMITSORT_LEAST_RECENTLY_ADDED = 0x80000010, /* See note above */
+    ITDB_LIMITSORT_MOST_OFTEN_PLAYED = 0x14,
+    ITDB_LIMITSORT_LEAST_OFTEN_PLAYED = 0x80000014,   /* See note above */
+    ITDB_LIMITSORT_MOST_RECENTLY_PLAYED = 0x15,
+    ITDB_LIMITSORT_LEAST_RECENTLY_PLAYED = 0x80000015,/* See note above */
+    ITDB_LIMITSORT_HIGHEST_RATING = 0x17,
+    ITDB_LIMITSORT_LOWEST_RATING = 0x80000017,        /* See note above */
+} ItdbLimitSort;
+</pre>
+<p>
+Which songs to pick when using a limit type
+</p>
+<p>
+Note: the values for <a class="link" href="libgpod-Smart-Playlists.html#ITDB-LIMITSORT-LEAST-RECENTLY-ADDED:CAPS"><span class="type">ITDB_LIMITSORT_LEAST_RECENTLY_ADDED</span></a>,
+<a class="link" href="libgpod-Smart-Playlists.html#ITDB-LIMITSORT-LEAST-OFTEN-PLAYED:CAPS"><span class="type">ITDB_LIMITSORT_LEAST_OFTEN_PLAYED</span></a>, <a class="link" href="libgpod-Smart-Playlists.html#ITDB-LIMITSORT-LEAST-RECENTLY-PLAYED:CAPS"><span class="type">ITDB_LIMITSORT_LEAST_RECENTLY_PLAYED</span></a>,
+and <a class="link" href="libgpod-Smart-Playlists.html#ITDB-LIMITSORT-LOWEST-RATING:CAPS"><span class="type">ITDB_LIMITSORT_LOWEST_RATING</span></a> are really 0x10, 0x14, 0x15, 0x17, with the
+'limitsort_opposite' flag set.  This is the same value as the "positive"
+value (i.e. <a class="link" href="libgpod-Smart-Playlists.html#ITDB-LIMITSORT-LEAST-RECENTLY-ADDED:CAPS"><span class="type">ITDB_LIMITSORT_LEAST_RECENTLY_ADDED</span></a>), and is really very
+terribly awfully weird, so we map the values to iPodDB specific values with
+the high bit set.
+</p>
+<p>
+On writing, we check the high bit and write the limitsort_opposite from that.
+That way, we don't have to deal with programs using the class needing to set
+the wrong limit and then make it into the "opposite", which would be frickin'
+annoying.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a name="ITDB-LIMITSORT-RANDOM:CAPS"></a><code class="literal">ITDB_LIMITSORT_RANDOM</code></span></p></td>
+<td>                Sort randomly
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-LIMITSORT-SONG-NAME:CAPS"></a><code class="literal">ITDB_LIMITSORT_SONG_NAME</code></span></p></td>
+<td>             Sort by track name
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-LIMITSORT-ALBUM:CAPS"></a><code class="literal">ITDB_LIMITSORT_ALBUM</code></span></p></td>
+<td>                 Sort by album name
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-LIMITSORT-ARTIST:CAPS"></a><code class="literal">ITDB_LIMITSORT_ARTIST</code></span></p></td>
+<td>                Sort by artist name
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-LIMITSORT-GENRE:CAPS"></a><code class="literal">ITDB_LIMITSORT_GENRE</code></span></p></td>
+<td>                 Sort by genre
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-LIMITSORT-MOST-RECENTLY-ADDED:CAPS"></a><code class="literal">ITDB_LIMITSORT_MOST_RECENTLY_ADDED</code></span></p></td>
+<td>   Sort by most recently added
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-LIMITSORT-LEAST-RECENTLY-ADDED:CAPS"></a><code class="literal">ITDB_LIMITSORT_LEAST_RECENTLY_ADDED</code></span></p></td>
+<td>  Sort by least recently added
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-LIMITSORT-MOST-OFTEN-PLAYED:CAPS"></a><code class="literal">ITDB_LIMITSORT_MOST_OFTEN_PLAYED</code></span></p></td>
+<td>     Sort by most often played
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-LIMITSORT-LEAST-OFTEN-PLAYED:CAPS"></a><code class="literal">ITDB_LIMITSORT_LEAST_OFTEN_PLAYED</code></span></p></td>
+<td>    Sort by least often played
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-LIMITSORT-MOST-RECENTLY-PLAYED:CAPS"></a><code class="literal">ITDB_LIMITSORT_MOST_RECENTLY_PLAYED</code></span></p></td>
+<td>  Sort by most recently played
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-LIMITSORT-LEAST-RECENTLY-PLAYED:CAPS"></a><code class="literal">ITDB_LIMITSORT_LEAST_RECENTLY_PLAYED</code></span></p></td>
+<td> Sort by least recently played
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-LIMITSORT-HIGHEST-RATING:CAPS"></a><code class="literal">ITDB_LIMITSORT_HIGHEST_RATING</code></span></p></td>
+<td>        Sort by highest rating
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-LIMITSORT-LOWEST-RATING:CAPS"></a><code class="literal">ITDB_LIMITSORT_LOWEST_RATING</code></span></p></td>
+<td>         Sort by lowest rating
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.5.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2738027"></a><h3>
+<a name="ItdbLimitType"></a>enum ItdbLimitType</h3>
+<a class="indexterm" name="id2738042"></a><pre class="programlisting">typedef enum {
+    ITDB_LIMITTYPE_MINUTES = 0x01,
+    ITDB_LIMITTYPE_MB      = 0x02,
+    ITDB_LIMITTYPE_SONGS   = 0x03,
+    ITDB_LIMITTYPE_HOURS   = 0x04,
+    ITDB_LIMITTYPE_GB      = 0x05
+} ItdbLimitType;
+</pre>
+<p>
+The type of unit to use when limiting a playlist</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a name="ITDB-LIMITTYPE-MINUTES:CAPS"></a><code class="literal">ITDB_LIMITTYPE_MINUTES</code></span></p></td>
+<td> Limit in minutes
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-LIMITTYPE-MB:CAPS"></a><code class="literal">ITDB_LIMITTYPE_MB</code></span></p></td>
+<td>      Limit in megabytes
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-LIMITTYPE-SONGS:CAPS"></a><code class="literal">ITDB_LIMITTYPE_SONGS</code></span></p></td>
+<td>   Limit in number of songs
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-LIMITTYPE-HOURS:CAPS"></a><code class="literal">ITDB_LIMITTYPE_HOURS</code></span></p></td>
+<td>   Limit in hours
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-LIMITTYPE-GB:CAPS"></a><code class="literal">ITDB_LIMITTYPE_GB</code></span></p></td>
+<td>      Limit in gigabytes
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.5.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2738181"></a><h3>
+<a name="ItdbSPLAction"></a>enum ItdbSPLAction</h3>
+<a class="indexterm" name="id2738196"></a><pre class="programlisting">typedef enum {
+    ITDB_SPLACTION_IS_INT = 0x00000001,
+    ITDB_SPLACTION_IS_GREATER_THAN = 0x00000010,
+    ITDB_SPLACTION_IS_LESS_THAN = 0x00000040,
+    ITDB_SPLACTION_IS_IN_THE_RANGE = 0x00000100,
+    ITDB_SPLACTION_IS_IN_THE_LAST = 0x00000200,
+    ITDB_SPLACTION_BINARY_AND = 0x00000400,
+
+    ITDB_SPLACTION_IS_STRING = 0x01000001,
+    ITDB_SPLACTION_CONTAINS = 0x01000002,
+    ITDB_SPLACTION_STARTS_WITH = 0x01000004,
+    ITDB_SPLACTION_ENDS_WITH = 0x01000008,
+
+    ITDB_SPLACTION_IS_NOT_INT = 0x02000001,
+    ITDB_SPLACTION_IS_NOT_GREATER_THAN = 0x02000010,
+    ITDB_SPLACTION_IS_NOT_LESS_THAN = 0x02000040,
+    ITDB_SPLACTION_IS_NOT_IN_THE_RANGE = 0x02000100,
+    ITDB_SPLACTION_IS_NOT_IN_THE_LAST = 0x02000200,
+
+    ITDB_SPLACTION_IS_NOT = 0x03000001,
+    ITDB_SPLACTION_DOES_NOT_CONTAIN = 0x03000002,
+    ITDB_SPLACTION_DOES_NOT_START_WITH = 0x03000004,
+    ITDB_SPLACTION_DOES_NOT_END_WITH = 0x03000008,
+} ItdbSPLAction;
+</pre>
+<p>
+Smartlist Actions used in smart playlist rules.
+</p>
+<p>
+Note by Otto (Samuel Wood):
+</p>
+<div class="informalexample"><pre class="programlisting">
+ really this is a bitmapped field...
+ high byte
+ bit 0 = "string" values if set, "int" values if not set
+ bit 1 = "not", or to negate the check.
+ lower 2 bytes
+ bit 0 = simple "IS" query
+ bit 1 = contains
+ bit 2 = begins with
+ bit 3 = ends with
+ bit 4 = greater than
+ bit 5 = unknown, but probably greater than or equal to
+ bit 6 = less than
+ bit 7 = unknown, but probably less than or equal to
+ bit 8 = a range selection
+ bit 9 = "in the last"
+ </pre></div>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-IS-INT:CAPS"></a><code class="literal">ITDB_SPLACTION_IS_INT</code></span></p></td>
+<td>              is integer ("Is Set" in iTunes)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-IS-GREATER-THAN:CAPS"></a><code class="literal">ITDB_SPLACTION_IS_GREATER_THAN</code></span></p></td>
+<td>     is greater than ("Is after" in iTunes)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-IS-LESS-THAN:CAPS"></a><code class="literal">ITDB_SPLACTION_IS_LESS_THAN</code></span></p></td>
+<td>        is less than ("Is Before" in iTunes)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-IS-IN-THE-RANGE:CAPS"></a><code class="literal">ITDB_SPLACTION_IS_IN_THE_RANGE</code></span></p></td>
+<td>     is in the range
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-IS-IN-THE-LAST:CAPS"></a><code class="literal">ITDB_SPLACTION_IS_IN_THE_LAST</code></span></p></td>
+<td>      is in the last
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-BINARY-AND:CAPS"></a><code class="literal">ITDB_SPLACTION_BINARY_AND</code></span></p></td>
+<td>          binary AND
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-IS-STRING:CAPS"></a><code class="literal">ITDB_SPLACTION_IS_STRING</code></span></p></td>
+<td>           is a string
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-CONTAINS:CAPS"></a><code class="literal">ITDB_SPLACTION_CONTAINS</code></span></p></td>
+<td>            contains
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-STARTS-WITH:CAPS"></a><code class="literal">ITDB_SPLACTION_STARTS_WITH</code></span></p></td>
+<td>         starts with
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-ENDS-WITH:CAPS"></a><code class="literal">ITDB_SPLACTION_ENDS_WITH</code></span></p></td>
+<td>           ends with
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-IS-NOT-INT:CAPS"></a><code class="literal">ITDB_SPLACTION_IS_NOT_INT</code></span></p></td>
+<td>          is not an integer ("Is Not Set" in iTunes)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-IS-NOT-GREATER-THAN:CAPS"></a><code class="literal">ITDB_SPLACTION_IS_NOT_GREATER_THAN</code></span></p></td>
+<td> is not greater than (not in iTunes)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-IS-NOT-LESS-THAN:CAPS"></a><code class="literal">ITDB_SPLACTION_IS_NOT_LESS_THAN</code></span></p></td>
+<td>    is not less than (not in iTunes)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-IS-NOT-IN-THE-RANGE:CAPS"></a><code class="literal">ITDB_SPLACTION_IS_NOT_IN_THE_RANGE</code></span></p></td>
+<td> is not in the range (not in iTunes)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-IS-NOT-IN-THE-LAST:CAPS"></a><code class="literal">ITDB_SPLACTION_IS_NOT_IN_THE_LAST</code></span></p></td>
+<td>  is not in the last
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-IS-NOT:CAPS"></a><code class="literal">ITDB_SPLACTION_IS_NOT</code></span></p></td>
+<td>              is not
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-DOES-NOT-CONTAIN:CAPS"></a><code class="literal">ITDB_SPLACTION_DOES_NOT_CONTAIN</code></span></p></td>
+<td>    does not contain
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-DOES-NOT-START-WITH:CAPS"></a><code class="literal">ITDB_SPLACTION_DOES_NOT_START_WITH</code></span></p></td>
+<td> does not start with (not in iTunes)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-DOES-NOT-END-WITH:CAPS"></a><code class="literal">ITDB_SPLACTION_DOES_NOT_END_WITH</code></span></p></td>
+<td>   does not end with (not in iTunes)
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.5.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2738690"></a><h3>
+<a name="ItdbSPLActionLast"></a>enum ItdbSPLActionLast</h3>
+<a class="indexterm" name="id2738704"></a><pre class="programlisting">typedef enum {
+    ITDB_SPLACTION_LAST_DAYS_VALUE = 86400,    /* nr of secs in 24 hours */
+    ITDB_SPLACTION_LAST_WEEKS_VALUE = 604800,  /* nr of secs in 7 days   */
+    ITDB_SPLACTION_LAST_MONTHS_VALUE = 2628000,/* nr of secs in 30.4167
+						  days ~= 1 month */
+} ItdbSPLActionLast;
+</pre>
+<p>
+These are to pass to <code class="function">AddRule()</code> when you need a unit for the two "in the last"
+action types.  In theory, you can use any time range.  iTunes might not
+like it, but the iPod shouldn't care.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-LAST-DAYS-VALUE:CAPS"></a><code class="literal">ITDB_SPLACTION_LAST_DAYS_VALUE</code></span></p></td>
+<td>   Seconds in 24 hours
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-LAST-WEEKS-VALUE:CAPS"></a><code class="literal">ITDB_SPLACTION_LAST_WEEKS_VALUE</code></span></p></td>
+<td>  Seconds in 7 days
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLACTION-LAST-MONTHS-VALUE:CAPS"></a><code class="literal">ITDB_SPLACTION_LAST_MONTHS_VALUE</code></span></p></td>
+<td> Seconds in 1 month (approximately)
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.5.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2738820"></a><h3>
+<a name="ItdbSPLActionType"></a>enum ItdbSPLActionType</h3>
+<a class="indexterm" name="id2738835"></a><pre class="programlisting">typedef enum
+{
+    ITDB_SPLAT_STRING = 1,
+    ITDB_SPLAT_INT,
+    ITDB_SPLAT_DATE,
+    ITDB_SPLAT_RANGE_INT,
+    ITDB_SPLAT_RANGE_DATE,
+    ITDB_SPLAT_INTHELAST,
+    ITDB_SPLAT_PLAYLIST,
+    ITDB_SPLAT_NONE,
+    ITDB_SPLAT_INVALID,
+    ITDB_SPLAT_UNKNOWN,
+    ITDB_SPLAT_BINARY_AND
+} ItdbSPLActionType;
+</pre>
+<p>
+Smart Playlist Action Types</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLAT-STRING:CAPS"></a><code class="literal">ITDB_SPLAT_STRING</code></span></p></td>
+<td>      string
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLAT-INT:CAPS"></a><code class="literal">ITDB_SPLAT_INT</code></span></p></td>
+<td>         from integer
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLAT-DATE:CAPS"></a><code class="literal">ITDB_SPLAT_DATE</code></span></p></td>
+<td>        from date ...
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLAT-RANGE-INT:CAPS"></a><code class="literal">ITDB_SPLAT_RANGE_INT</code></span></p></td>
+<td>   an integer range ...
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLAT-RANGE-DATE:CAPS"></a><code class="literal">ITDB_SPLAT_RANGE_DATE</code></span></p></td>
+<td>  a date range ...
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLAT-INTHELAST:CAPS"></a><code class="literal">ITDB_SPLAT_INTHELAST</code></span></p></td>
+<td>   in the last ...
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLAT-PLAYLIST:CAPS"></a><code class="literal">ITDB_SPLAT_PLAYLIST</code></span></p></td>
+<td>    in playlist
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLAT-NONE:CAPS"></a><code class="literal">ITDB_SPLAT_NONE</code></span></p></td>
+<td>        none
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLAT-INVALID:CAPS"></a><code class="literal">ITDB_SPLAT_INVALID</code></span></p></td>
+<td>     invalid
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLAT-UNKNOWN:CAPS"></a><code class="literal">ITDB_SPLAT_UNKNOWN</code></span></p></td>
+<td>     unknown
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLAT-BINARY-AND:CAPS"></a><code class="literal">ITDB_SPLAT_BINARY_AND</code></span></p></td>
+<td>  is / is not (binary AND)
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.5.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2741084"></a><h3>
+<a name="ItdbSPLField"></a>enum ItdbSPLField</h3>
+<a class="indexterm" name="id2741097"></a><pre class="programlisting">typedef enum {
+    ITDB_SPLFIELD_SONG_NAME = 0x02,
+    ITDB_SPLFIELD_ALBUM = 0x03,
+    ITDB_SPLFIELD_ARTIST = 0x04,
+    ITDB_SPLFIELD_BITRATE = 0x05,
+    ITDB_SPLFIELD_SAMPLE_RATE = 0x06,
+    ITDB_SPLFIELD_YEAR = 0x07,
+    ITDB_SPLFIELD_GENRE = 0x08,
+    ITDB_SPLFIELD_KIND = 0x09,
+    ITDB_SPLFIELD_DATE_MODIFIED = 0x0a,
+    ITDB_SPLFIELD_TRACKNUMBER = 0x0b,
+    ITDB_SPLFIELD_SIZE = 0x0c,
+    ITDB_SPLFIELD_TIME = 0x0d,
+    ITDB_SPLFIELD_COMMENT = 0x0e,
+    ITDB_SPLFIELD_DATE_ADDED = 0x10,
+    ITDB_SPLFIELD_COMPOSER = 0x12,
+    ITDB_SPLFIELD_PLAYCOUNT = 0x16,
+    ITDB_SPLFIELD_LAST_PLAYED = 0x17,
+    ITDB_SPLFIELD_DISC_NUMBER = 0x18,
+    ITDB_SPLFIELD_RATING = 0x19,
+    ITDB_SPLFIELD_COMPILATION = 0x1f,
+    ITDB_SPLFIELD_BPM = 0x23,
+    ITDB_SPLFIELD_GROUPING = 0x27,
+    ITDB_SPLFIELD_PLAYLIST = 0x28,
+    ITDB_SPLFIELD_VIDEO_KIND = 0x3c,
+    ITDB_SPLFIELD_TVSHOW = 0x3e,
+    ITDB_SPLFIELD_SEASON_NR = 0x3f,
+    ITDB_SPLFIELD_SKIPCOUNT = 0x44,
+    ITDB_SPLFIELD_LAST_SKIPPED = 0x45,
+    ITDB_SPLFIELD_ALBUMARTIST = 0x47
+} ItdbSPLField;
+</pre>
+<p>
+Smart Playlist Fields, used for Smart Playlist Rules (<a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule"><span class="type">Itdb_SPLRule</span></a>).</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-SONG-NAME:CAPS"></a><code class="literal">ITDB_SPLFIELD_SONG_NAME</code></span></p></td>
+<td>        Song name (string)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-ALBUM:CAPS"></a><code class="literal">ITDB_SPLFIELD_ALBUM</code></span></p></td>
+<td>            Album (string)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-ARTIST:CAPS"></a><code class="literal">ITDB_SPLFIELD_ARTIST</code></span></p></td>
+<td>           Artist (string)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-BITRATE:CAPS"></a><code class="literal">ITDB_SPLFIELD_BITRATE</code></span></p></td>
+<td>          Bitrate (integer, e.g. from/to = 128)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-SAMPLE-RATE:CAPS"></a><code class="literal">ITDB_SPLFIELD_SAMPLE_RATE</code></span></p></td>
+<td>      Sample rate (integer, e.g. from/to = 44100)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-YEAR:CAPS"></a><code class="literal">ITDB_SPLFIELD_YEAR</code></span></p></td>
+<td>             Year (integer, e.g. from/to = 2004)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-GENRE:CAPS"></a><code class="literal">ITDB_SPLFIELD_GENRE</code></span></p></td>
+<td>            Genre (string)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-KIND:CAPS"></a><code class="literal">ITDB_SPLFIELD_KIND</code></span></p></td>
+<td>             File type (string, e.g. MP3-File)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-DATE-MODIFIED:CAPS"></a><code class="literal">ITDB_SPLFIELD_DATE_MODIFIED</code></span></p></td>
+<td>    Date modified (integer, e.g.
+                                 from/to = bcf93280 == is before 6/19/2004)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-TRACKNUMBER:CAPS"></a><code class="literal">ITDB_SPLFIELD_TRACKNUMBER</code></span></p></td>
+<td>      Track number (integer, e.g. from/to = 2)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-SIZE:CAPS"></a><code class="literal">ITDB_SPLFIELD_SIZE</code></span></p></td>
+<td>             Size (integer, e.g.
+                                 from/to = 0x00600000 for 6MB)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-TIME:CAPS"></a><code class="literal">ITDB_SPLFIELD_TIME</code></span></p></td>
+<td>             Time (integer, e.g.
+                                 from/to = 83999 for 1:23/83 seconds)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-COMMENT:CAPS"></a><code class="literal">ITDB_SPLFIELD_COMMENT</code></span></p></td>
+<td>          Comment (string)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-DATE-ADDED:CAPS"></a><code class="literal">ITDB_SPLFIELD_DATE_ADDED</code></span></p></td>
+<td>       Date added (integer, e.g.
+                                 from/to = bcfa83ff == is after 6/19/2004)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-COMPOSER:CAPS"></a><code class="literal">ITDB_SPLFIELD_COMPOSER</code></span></p></td>
+<td>         Composer (string)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-PLAYCOUNT:CAPS"></a><code class="literal">ITDB_SPLFIELD_PLAYCOUNT</code></span></p></td>
+<td>        Playcount (integer, e.g. from/to = 1)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-LAST-PLAYED:CAPS"></a><code class="literal">ITDB_SPLFIELD_LAST_PLAYED</code></span></p></td>
+<td>      Date last played (integer, e.g.
+                                 from = bcfa83ff (6/19/2004)
+                                 to = 0xbcfbd57f (6/20/2004))
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-DISC-NUMBER:CAPS"></a><code class="literal">ITDB_SPLFIELD_DISC_NUMBER</code></span></p></td>
+<td>      Disc number (integer, e.g. from/to = 1)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-RATING:CAPS"></a><code class="literal">ITDB_SPLFIELD_RATING</code></span></p></td>
+<td>           Rating (integer, e.g.
+                                 from/to = 60 (3 stars))
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-COMPILATION:CAPS"></a><code class="literal">ITDB_SPLFIELD_COMPILATION</code></span></p></td>
+<td>      Compilation (integer, e.g.
+                                 is set -&gt; ITDB_SPLACTION_IS_INT/from=1,
+                                 not set -&gt; ITDB_SPLACTION_IS_NOT_INT/from=1)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-BPM:CAPS"></a><code class="literal">ITDB_SPLFIELD_BPM</code></span></p></td>
+<td>              Beats per minute (integer, e.g.
+                                 from/to = 60)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-GROUPING:CAPS"></a><code class="literal">ITDB_SPLFIELD_GROUPING</code></span></p></td>
+<td>         Grouping (string)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-PLAYLIST:CAPS"></a><code class="literal">ITDB_SPLFIELD_PLAYLIST</code></span></p></td>
+<td>         FIXME Unknown...not parsed correctly...
+                                 from/to = 0xb6fbad5f for "Purchased Music".
+                                 Extra data after "to"...
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-VIDEO-KIND:CAPS"></a><code class="literal">ITDB_SPLFIELD_VIDEO_KIND</code></span></p></td>
+<td>       Logical integer (works on mediatype)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-TVSHOW:CAPS"></a><code class="literal">ITDB_SPLFIELD_TVSHOW</code></span></p></td>
+<td>           TV Show (string)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-SEASON-NR:CAPS"></a><code class="literal">ITDB_SPLFIELD_SEASON_NR</code></span></p></td>
+<td>        Season number (integer)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-SKIPCOUNT:CAPS"></a><code class="literal">ITDB_SPLFIELD_SKIPCOUNT</code></span></p></td>
+<td>        Skipcount (integer)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-LAST-SKIPPED:CAPS"></a><code class="literal">ITDB_SPLFIELD_LAST_SKIPPED</code></span></p></td>
+<td>     Last skipped (integer)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFIELD-ALBUMARTIST:CAPS"></a><code class="literal">ITDB_SPLFIELD_ALBUMARTIST</code></span></p></td>
+<td>      Album artist (string)
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.5.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2741743"></a><h3>
+<a name="ItdbSPLFieldType"></a>enum ItdbSPLFieldType</h3>
+<a class="indexterm" name="id2741755"></a><pre class="programlisting">typedef enum
+{
+    ITDB_SPLFT_STRING = 1,
+    ITDB_SPLFT_INT,
+    ITDB_SPLFT_BOOLEAN,
+    ITDB_SPLFT_DATE,
+    ITDB_SPLFT_PLAYLIST,
+    ITDB_SPLFT_UNKNOWN,
+    ITDB_SPLFT_BINARY_AND
+} ItdbSPLFieldType;
+</pre>
+<p>
+Smart Playlist Field Types</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFT-STRING:CAPS"></a><code class="literal">ITDB_SPLFT_STRING</code></span></p></td>
+<td>      string
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFT-INT:CAPS"></a><code class="literal">ITDB_SPLFT_INT</code></span></p></td>
+<td>         integer
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFT-BOOLEAN:CAPS"></a><code class="literal">ITDB_SPLFT_BOOLEAN</code></span></p></td>
+<td>     boolean
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFT-DATE:CAPS"></a><code class="literal">ITDB_SPLFT_DATE</code></span></p></td>
+<td>        date
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFT-PLAYLIST:CAPS"></a><code class="literal">ITDB_SPLFT_PLAYLIST</code></span></p></td>
+<td>    playlist
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFT-UNKNOWN:CAPS"></a><code class="literal">ITDB_SPLFT_UNKNOWN</code></span></p></td>
+<td>     unknown
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLFT-BINARY-AND:CAPS"></a><code class="literal">ITDB_SPLFT_BINARY_AND</code></span></p></td>
+<td>  binary AND
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.5.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2741917"></a><h3>
+<a name="ItdbSPLMatch"></a>enum ItdbSPLMatch</h3>
+<a class="indexterm" name="id2741928"></a><pre class="programlisting">typedef enum {
+    ITDB_SPLMATCH_AND = 0,
+    ITDB_SPLMATCH_OR = 1
+} ItdbSPLMatch;
+</pre>
+<p>
+Types for smart playlist rules match_operator</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLMATCH-AND:CAPS"></a><code class="literal">ITDB_SPLMATCH_AND</code></span></p></td>
+<td> Logical AND - all of the rules must be true in order for
+                    the combined rule to be applied
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-SPLMATCH-OR:CAPS"></a><code class="literal">ITDB_SPLMATCH_OR</code></span></p></td>
+<td>  Logical OR - any of the rules may be true
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2741992"></a><h3>
+<a name="ITDB-SPL-DATE-IDENTIFIER:CAPS"></a>ITDB_SPL_DATE_IDENTIFIER</h3>
+<a class="indexterm" name="id2742006"></a><pre class="programlisting">#define ITDB_SPL_DATE_IDENTIFIER (G_GINT64_CONSTANT (0x2dae2dae2dae2daeU))
+</pre>
+<p>
+Identifier for smart playlist date fields</p>
+<p>
+
+</p>
+<p class="since">Since  0.5.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2742031"></a><h3>
+<a name="ITDB-SPL-STRING-MAXLEN:CAPS"></a>ITDB_SPL_STRING_MAXLEN</h3>
+<a class="indexterm" name="id2742043"></a><pre class="programlisting">#define ITDB_SPL_STRING_MAXLEN 255
+</pre>
+<p>
+Maximum string length for smart playlists</p>
+<p>
+
+</p>
+<p class="since">Since  0.5.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2742067"></a><h3>
+<a name="itdb-splr-get-field-type"></a>itdb_splr_get_field_type ()</h3>
+<a class="indexterm" name="id2742078"></a><pre class="programlisting"><a class="link" href="libgpod-Smart-Playlists.html#ItdbSPLFieldType">ItdbSPLFieldType</a>    itdb_splr_get_field_type            (const <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a> *splr);</pre>
+<p>
+Gets the type of the field of the <em class="parameter"><code>splr</code></em> rule</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>splr</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule"><span class="type">Itdb_SPLRule</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> an <span class="type">Itdb_SPLFieldType</span> corresponding to <em class="parameter"><code>splr</code></em> field
+type (string, int, date, ...)
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2742155"></a><h3>
+<a name="itdb-splr-get-action-type"></a>itdb_splr_get_action_type ()</h3>
+<a class="indexterm" name="id2742166"></a><pre class="programlisting"><a class="link" href="libgpod-Smart-Playlists.html#ItdbSPLActionType">ItdbSPLActionType</a>   itdb_splr_get_action_type           (const <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a> *splr);</pre>
+<p>
+Gets the type of the action associated with <em class="parameter"><code>splr</code></em>.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>splr</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule"><span class="type">Itdb_SPLRule</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> type (range, date, string...) of the action field
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2742233"></a><h3>
+<a name="itdb-splr-validate"></a>itdb_splr_validate ()</h3>
+<a class="indexterm" name="id2742244"></a><pre class="programlisting">void                itdb_splr_validate                  (<a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a> *splr);</pre>
+<p>
+Validates a smart playlist rule</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>splr</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule"><span class="type">Itdb_SPLRule</span></a>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2742295"></a><h3>
+<a name="itdb-splr-remove"></a>itdb_splr_remove ()</h3>
+<a class="indexterm" name="id2742305"></a><pre class="programlisting">void                itdb_splr_remove                    (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
+                                                         <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a> *splr);</pre>
+<p>
+Removes the smart playlist rule <em class="parameter"><code>splr</code></em> from playlist <em class="parameter"><code>pl</code></em>. The memory
+used by <em class="parameter"><code>splr</code></em> is freed.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>splr</code></em>&#160;:</span></p></td>
+<td> an Itdb_SPLRule
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2742391"></a><h3>
+<a name="itdb-splr-new"></a>itdb_splr_new ()</h3>
+<a class="indexterm" name="id2742401"></a><pre class="programlisting"><a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a>*       itdb_splr_new                       (void);</pre>
+<p>
+Creates a new default smart rule</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a new <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule"><span class="type">Itdb_SPLRule</span></a> that must be freed with <code class="function">itdb_splr_free()</code> when
+no longer needed
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2742452"></a><h3>
+<a name="itdb-splr-add"></a>itdb_splr_add ()</h3>
+<a class="indexterm" name="id2742462"></a><pre class="programlisting">void                itdb_splr_add                       (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
+                                                         <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a> *splr,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> pos);</pre>
+<p>
+Adds the smart rule <em class="parameter"><code>splr</code></em> to <em class="parameter"><code>pl</code></em> at position <em class="parameter"><code>pos</code></em>. If <em class="parameter"><code>pos</code></em> is -1,
+<em class="parameter"><code>splr</code></em> gets appended to the end. After this call, <em class="parameter"><code>splr</code></em> memory is
+managed by <em class="parameter"><code>pl</code></em>, so you no longer need to call <code class="function">itdb_splr_free()</code></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td>     an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>splr</code></em>&#160;:</span></p></td>
+<td>   an <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule"><span class="type">Itdb_SPLRule</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>pos</code></em>&#160;:</span></p></td>
+<td>    position of the rule
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2742602"></a><h3>
+<a name="itdb-splr-add-new"></a>itdb_splr_add_new ()</h3>
+<a class="indexterm" name="id2742612"></a><pre class="programlisting"><a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a>*       itdb_splr_add_new                   (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *pl,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> pos);</pre>
+<p>
+Creates a new smart rule and inserts it at position <em class="parameter"><code>pos</code></em> in <em class="parameter"><code>pl</code></em>. If
+<em class="parameter"><code>pos</code></em> is -1, the new rule gets appended to the end.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>pl</code></em>&#160;:</span></p></td>
+<td>     an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>pos</code></em>&#160;:</span></p></td>
+<td>    position to insert the rule at
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> pointer to the newly created <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule"><span class="type">Itdb_SPLRule</span></a>. Its
+memory is handled by <em class="parameter"><code>pl</code></em> though, so you don't need to explicitly
+call <code class="function">itdb_splr_free()</code> on it
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2742731"></a><h3>
+<a name="itdb-spl-copy-rules"></a>itdb_spl_copy_rules ()</h3>
+<a class="indexterm" name="id2742741"></a><pre class="programlisting">void                itdb_spl_copy_rules                 (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *dest,
+                                                         <a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *src);</pre>
+<p>
+Copy all relevant information for smart playlist from playlist <em class="parameter"><code>src</code></em>
+to playlist <em class="parameter"><code>dest</code></em>. If <em class="parameter"><code>dest</code></em> is already a smart playlist, the
+existing data is overwritten/deleted.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>dest</code></em>&#160;:</span></p></td>
+<td>   destination <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>src</code></em>&#160;:</span></p></td>
+<td>    source <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2742835"></a><h3>
+<a name="itdb-splr-eval"></a>itdb_splr_eval ()</h3>
+<a class="indexterm" name="id2742845"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_splr_eval                      (<a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule">Itdb_SPLRule</a> *splr,
+                                                         <a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);</pre>
+<p>
+Evaluates <em class="parameter"><code>splr</code></em>'s truth against <em class="parameter"><code>track</code></em>. <em class="parameter"><code>track-&gt;itdb</code></em> must be set.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>splr</code></em>&#160;:</span></p></td>
+<td>   an <a class="link" href="libgpod-Smart-Playlists.html#Itdb-SPLRule"><span class="type">Itdb_SPLRule</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></p></td>
+<td>  an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> TRUE if <em class="parameter"><code>track</code></em> matches <em class="parameter"><code>splr</code></em>, FALSE otherwise.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2742956"></a><h3>
+<a name="itdb-spl-update"></a>itdb_spl_update ()</h3>
+<a class="indexterm" name="id2742967"></a><pre class="programlisting">void                itdb_spl_update                     (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist">Itdb_Playlist</a> *spl);</pre>
+<p>
+Updates the content of the smart playlist <em class="parameter"><code>spl</code></em> (meant to be called
+if the tracks stored in the <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> associated with <em class="parameter"><code>spl</code></em>
+have changed somehow and you want <em class="parameter"><code>spl-&gt;members</code></em> to be accurate
+with regards to those changes. Does nothing if <em class="parameter"><code>spl</code></em> isn't a smart
+playlist.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>spl</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2743048"></a><h3>
+<a name="itdb-spl-update-all"></a>itdb_spl_update_all ()</h3>
+<a class="indexterm" name="id2743058"></a><pre class="programlisting">void                itdb_spl_update_all                 (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);</pre>
+<p>
+Updates all smart playlists contained in <em class="parameter"><code>itdb</code></em></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2743113"></a><h3>
+<a name="itdb-spl-update-live"></a>itdb_spl_update_live ()</h3>
+<a class="indexterm" name="id2743126"></a><pre class="programlisting">void                itdb_spl_update_live                (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);</pre>
+<p>
+Updates all smart playlists contained in <em class="parameter"><code>itdb</code></em> which have the
+<em class="parameter"><code>liveupdate</code></em> flag set.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+</td>
+</tr></tbody>
+</table></div>
+<p class="since">Since  0.2.0
+</p>
+</div>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2743194"></a><h2>See Also</h2>
+<p>
+<a class="link" href="libgpod-Playlists.html" title="Playlists">Playlists</a>
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2743209"></a><div class="refsect2" lang="en"><a name="id2743210"></a></div>
+<hr>
+<div class="refsect2" lang="en"><a name="id2743211"></a></div>
+</div>
+</div>
+</body>
+</html>

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-The-Itdb-iTunesDB-structure.html
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-The-Itdb-iTunesDB-structure.html	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-The-Itdb-iTunesDB-structure.html	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,782 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>iPod database reading/writing</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="index.html" title="libgpod Reference Manual">
+<link rel="up" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
+<link rel="prev" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
+<link rel="next" href="libgpod-File-handling-functions.html" title="File handling functions">
+<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+<link rel="part" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
+<link rel="chapter" href="ch01.html" title="iPod database components">
+<link rel="part" href="photodb.html" title="Part&#160;II.&#160;Photo database">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="itunesdb.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="itunesdb.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">libgpod Reference Manual</th>
+<td><a accesskey="n" href="libgpod-File-handling-functions.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2696882" class="shortcut">Top</a>
+                  &#160;|&#160;
+                  <a href="#id2629897" class="shortcut">Description</a></nobr></td></tr>
+</table>
+<div class="refentry" lang="en">
+<a name="libgpod-The-Itdb-iTunesDB-structure"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2>
+<a name="id2696882"></a><span class="refentrytitle">iPod database reading/writing</span>
+</h2>
+<p>iPod database reading/writing &#8212; Functions to read, write, and create an iPod database</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<pre class="synopsis">
+
+
+
+                    <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a>;
+enum                <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbFileError">ItdbFileError</a>;
+<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a>*      <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-new">itdb_new</a>                            (void);
+void                <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-free">itdb_free</a>                           (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);
+<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a>*      <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-parse">itdb_parse</a>                          (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mp,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-write">itdb_write</a>                          (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+void                <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-set-mountpoint">itdb_set_mountpoint</a>                 (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mp);
+const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*        <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-get-mountpoint">itdb_get_mountpoint</a>                 (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-init-ipod">itdb_init_ipod</a>                      (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *model_number,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *ipod_name,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>             <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-tracks-number">itdb_tracks_number</a>                  (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>             <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-tracks-number-nontransferred">itdb_tracks_number_nontransferred</a>   (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>             <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-playlists-number">itdb_playlists_number</a>               (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);
+void                (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDestroyFunc">*ItdbUserDataDestroyFunc</a>)          (<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a> userdata);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>            (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDuplicateFunc">*ItdbUserDataDuplicateFunc</a>)        (<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a> userdata);
+</pre>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2629897"></a><h2>Description</h2>
+<p>
+These functions are for reading, writing, creating, and deleting an iPod
+database and getting the total number of tracks and playlists.
+</p>
+<p>
+Overview of using an iPod database:
+</p>
+<p>
+<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-parse"><code class="function">itdb_parse()</code></a>: read the iTunesDB and ArtworkDB
+</p>
+<p>
+<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-write"><code class="function">itdb_write()</code></a>: write the iTunesDB and ArtworkDB
+</p>
+<p>
+<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-parse"><code class="function">itdb_parse()</code></a> will return a <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> structure with GLists
+containing all tracks the playlists in the database.  Each track is
+represented by an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>.   Each playlist is represented by an
+<a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>.  See the <a class="link" href="libgpod-Tracks.html" title="Tracks">Tracks</a>
+and <a class="link" href="libgpod-Playlists.html" title="Playlists">Playlists</a> sections for
+details on tracks and playlists, respectively.
+</p>
+<p>
+Each <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a> has a GList called <em class="parameter"><code>members</code></em> which contains all of
+the tracks in the playlist.  Tracks referenced in a playlist must also
+be present in the <em class="parameter"><code>tracks</code></em> GList of the <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>.
+</p>
+<p>
+The iPod must contain one master playlist (MPL) containing all tracks
+accessible on the iPod through the Music-&gt;Tracks/Albums/Artists/etc.
+menu.  In addition to the MPL there can be a number of normal
+playlists accessible through the Music-&gt;Playlists menu on the iPod.
+Tracks that are a member of one of these normal playlists must also be
+a member of the MPL.
+</p>
+<p>
+The Podcasts playlist is just another playlist with some internal
+flags set differently.  Tracks in the Podcasts playlist are not
+normally members of the MPL (so on the iPod they will only show up
+under the Podcasts menu). All tracks referenced must be in the
+<em class="parameter"><code>tracks</code></em> GList of the <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>, however.
+</p>
+<p>
+Each track may have a thumbnail associated with it. You can retrieve a
+<a
+href="/usr/share/gtk-doc/html/gdk/gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"
+><span class="type">GdkPixmap</span></a> of the thumbnail using <a class="link" href="libgpod-Artwork.html#itdb-artwork-get-pixbuf"><code class="function">itdb_artwork_get_pixbuf()</code></a>.  A
+thumbnail can be added with <a class="link" href="libgpod-Tracks.html#itdb-track-set-thumbnails"><code class="function">itdb_track_set_thumbnails()</code></a>.  A thumbnail
+can be removed with <a class="link" href="libgpod-Tracks.html#itdb-track-remove-thumbnails"><code class="function">itdb_track_remove_thumbnails()</code></a>.  Please see the
+<a class="link" href="libgpod-Artwork.html" title="Artwork">Artwork</a> section for more
+details on artwork related functions and structures.
+</p>
+<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
+<h3 class="title">Note</h3>
+<p>
+Be aware that iTunes additionally stores the artwork as tags
+in the original music file. That's also from where the data is
+read when artwork is displayed in iTunes, and there can be more
+than one piece of artwork. libgpod does not store the artwork as
+tags in the original music file. As a consequence, if iTunes
+attempts to access the artwork, it will find none, and remove
+libgpod's artwork. Luckily, iTunes will only attempt to access
+the artwork if you select a track in iTunes.  To work around
+this, gtkpod keeps a list of the original filename of all
+artwork and silently adds the thumbnails if they were 'lost'.
+Your application might want to do something similar, or you can
+supply patches for (optionally!) adding tags to the original music
+files.
+</p>
+</div>
+<p>
+The <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>, <a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a> and <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a> structures each
+have <em class="parameter"><code>userdata</code></em> and <em class="parameter"><code>usertype</code></em> fields that can be used by the
+application to store additional application-specific data. If
+<em class="parameter"><code>userdata</code></em> is a pointer to an external structure, you can supply a
+<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDuplicateFunc"><span class="type">ItdbUserDataDuplicateFunc</span></a> and a <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDestroyFunc"><span class="type">ItdbUserDataDestroyFunc</span></a> so that this
+data can be duplicated or freed automatically with a call to the
+library <code class="function">_duplicate()</code>/<code class="function">_free()</code> functions.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2634654"></a><h2>Details</h2>
+<div class="refsect2" lang="en">
+<a name="id2634665"></a><h3>
+<a name="Itdb-iTunesDB"></a>Itdb_iTunesDB</h3>
+<a class="indexterm" name="id2634677"></a><pre class="programlisting">typedef struct {
+    GList *tracks;
+    GList *playlists;
+    gchar *filename;
+    Itdb_Device *device;
+    guint32 version;
+    guint64 id;
+    /* reserved for future use */
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+    /* below is for use by application */
+    guint64 usertype;
+    gpointer userdata;
+    /* functions called to duplicate/free userdata */
+    ItdbUserDataDuplicateFunc userdata_duplicate;
+    ItdbUserDataDestroyFunc userdata_destroy;
+} Itdb_iTunesDB;
+</pre>
+<p>
+Structure representing an iTunes database</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
+>GList</a>&#160;*<em class="structfield"><code>tracks</code></em>;</span></p></td>
+<td>             A list of tracks in the database (<a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
+>GList</a>&#160;*<em class="structfield"><code>playlists</code></em>;</span></p></td>
+<td>          A list of playlists in the database (<a class="link" href="libgpod-Playlists.html#Itdb-Playlist"><span class="type">Itdb_Playlist</span></a>)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>filename</code></em>;</span></p></td>
+<td>           The filename of the iTunesDB
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-Device.html#Itdb-Device">Itdb_Device</a>&#160;*<em class="structfield"><code>device</code></em>;</span></p></td>
+<td>             iPod device info (<a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a>)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>version</code></em>;</span></p></td>
+<td>            The version number of the iTunesDB
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
+>guint64</a>&#160;<em class="structfield"><code>id</code></em>;</span></p></td>
+<td>                 A 64 bit id value for the iTunesDB
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int1</code></em>;</span></p></td>
+<td>      Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int2</code></em>;</span></p></td>
+<td>      Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved1</code></em>;</span></p></td>
+<td>          Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved2</code></em>;</span></p></td>
+<td>          Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
+>guint64</a>&#160;<em class="structfield"><code>usertype</code></em>;</span></p></td>
+<td>           For use by application
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>userdata</code></em>;</span></p></td>
+<td>           For use by application
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDuplicateFunc">ItdbUserDataDuplicateFunc</a>&#160;<em class="structfield"><code>userdata_duplicate</code></em>;</span></p></td>
+<td> A function to duplicate <span class="type">userdata</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDestroyFunc">ItdbUserDataDestroyFunc</a>&#160;<em class="structfield"><code>userdata_destroy</code></em>;</span></p></td>
+<td>   A function to free <span class="type">userdata</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2678534"></a><h3>
+<a name="ItdbFileError"></a>enum ItdbFileError</h3>
+<a class="indexterm" name="id2678546"></a><pre class="programlisting">typedef enum
+{
+    ITDB_FILE_ERROR_SEEK,
+    ITDB_FILE_ERROR_CORRUPT,
+    ITDB_FILE_ERROR_NOTFOUND,
+    ITDB_FILE_ERROR_RENAME,
+    ITDB_FILE_ERROR_ITDB_CORRUPT
+} ItdbFileError;
+</pre>
+<p>
+Error codes for iTunesDB file</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a name="ITDB-FILE-ERROR-SEEK:CAPS"></a><code class="literal">ITDB_FILE_ERROR_SEEK</code></span></p></td>
+<td>         file corrupt: illegal seek occured
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-FILE-ERROR-CORRUPT:CAPS"></a><code class="literal">ITDB_FILE_ERROR_CORRUPT</code></span></p></td>
+<td>      file corrupt
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-FILE-ERROR-NOTFOUND:CAPS"></a><code class="literal">ITDB_FILE_ERROR_NOTFOUND</code></span></p></td>
+<td>     file not found
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-FILE-ERROR-RENAME:CAPS"></a><code class="literal">ITDB_FILE_ERROR_RENAME</code></span></p></td>
+<td>       file could not be renamed
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-FILE-ERROR-ITDB-CORRUPT:CAPS"></a><code class="literal">ITDB_FILE_ERROR_ITDB_CORRUPT</code></span></p></td>
+<td> iTunesDB in memory corrupt
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2678683"></a><h3>
+<a name="itdb-new"></a>itdb_new ()</h3>
+<a class="indexterm" name="id2678695"></a><pre class="programlisting"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a>*      itdb_new                            (void);</pre>
+<p>
+Creates a new Itdb_iTunesDB with the unknowns filled in to reasonable
+values.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a newly created Itdb_iTunesDB to be freed with <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-free"><code class="function">itdb_free()</code></a>
+when it's no longer needed
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2678746"></a><h3>
+<a name="itdb-free"></a>itdb_free ()</h3>
+<a class="indexterm" name="id2678759"></a><pre class="programlisting">void                itdb_free                           (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);</pre>
+<p>
+Free the memory taken by <em class="parameter"><code>itdb</code></em>.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2678822"></a><h3>
+<a name="itdb-parse"></a>itdb_parse ()</h3>
+<a class="indexterm" name="id2678834"></a><pre class="programlisting"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a>*      itdb_parse                          (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mp,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
+<p>
+Parse the Itdb_iTunesDB of the iPod located at <em class="parameter"><code>mp</code></em></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mp</code></em>&#160;:</span></p></td>
+<td>     mount point of the iPod (eg "/mnt/ipod") in local encoding
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>  return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a newly allocated <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> struct holding the tracks and
+the playlists present on the iPod at <em class="parameter"><code>mp</code></em>, NULL if <em class="parameter"><code>mp</code></em> isn't an iPod mount
+point. If non-NULL, the <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> is to be freed with <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#itdb-free"><code class="function">itdb_free()</code></a> when
+it's no longer needed
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2678967"></a><h3>
+<a name="itdb-write"></a>itdb_write ()</h3>
+<a class="indexterm" name="id2678979"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_write                          (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
+<p>
+Write out an iTunesDB. It reassigns unique IDs to all tracks. 
+An existing "Play Counts" file is renamed to "Play Counts.bak" if
+the export was successful.
+An existing "OTGPlaylistInfo" file is removed if the export was
+successful.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td>   the <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> to write to disk
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>  return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> TRUE on success, FALSE on error, in which case <em class="parameter"><code>error</code></em> is
+set accordingly.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2679085"></a><h3>
+<a name="itdb-set-mountpoint"></a>itdb_set_mountpoint ()</h3>
+<a class="indexterm" name="id2679100"></a><pre class="programlisting">void                itdb_set_mountpoint                 (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mp);</pre>
+<p>
+Sets the mountpoint of <em class="parameter"><code>itdb</code></em>. Always use this function to set the
+mountpoint of an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> as it will reset the number of
+available /iPod_Control/Music/F.. dirs. It doesn't attempt to parse
+an iPod database that may be present on the iPod at <em class="parameter"><code>mp</code></em>.
+</p>
+<p>
+</p>
+<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
+<h3 class="title">Note</h3>
+<p>Calling this function removes the artwork in the
+<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> database using this <a class="link" href="libgpod-Device.html#Itdb-Device"><span class="type">Itdb_Device</span></a> which was read from the
+iPod.</p>
+</div>
+<p>.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td>   an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mp</code></em>&#160;:</span></p></td>
+<td>     new mount point
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.1.3
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2679231"></a><h3>
+<a name="itdb-get-mountpoint"></a>itdb_get_mountpoint ()</h3>
+<a class="indexterm" name="id2679245"></a><pre class="programlisting">const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>*        itdb_get_mountpoint                 (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);</pre>
+<p>
+Retrieve a reference to the mountpoint of <em class="parameter"><code>itdb</code></em></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> the <em class="parameter"><code>itdb</code></em> mountpoint, this string shouldn't be freed
+nor modified
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2679333"></a><h3>
+<a name="itdb-init-ipod"></a>itdb_init_ipod ()</h3>
+<a class="indexterm" name="id2679347"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_init_ipod                      (const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *mountpoint,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *model_number,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *ipod_name,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+>GError</a> **error);</pre>
+<p>
+Initialise an iPod device from scratch. The function attempts to
+create a blank database, complete with master playlist and device
+information as well as the directory structure required for the
+type of iPod.
+<em class="parameter"><code>model_number</code></em> is used to tell libgpod about the exact iPod
+model, which is needed for proper artwork writing. <em class="parameter"><code>model_number</code></em> can be
+found from the table returned by itdb_device_get_ipod_info_table (for
+example). On recent distros with iPods released
+in the last few years (starting with the iPod Color), it should be fine
+to pass in a NULL <em class="parameter"><code>model_number</code></em> while still getting artwork writing.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>mountpoint</code></em>&#160;:</span></p></td>
+<td>   the iPod mountpoint
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>model_number</code></em>&#160;:</span></p></td>
+<td> the iPod model number, can be NULL
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>ipod_name</code></em>&#160;:</span></p></td>
+<td>    the name to give to the iPod. Will be displayed in
+               gtkpod or itunes
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
+<td>        return location for a <a
+href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"
+><span class="type">GError</span></a> or NULL
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> TRUE when successful, FALSE if a failure has occurred.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2679515"></a><h3>
+<a name="itdb-tracks-number"></a>itdb_tracks_number ()</h3>
+<a class="indexterm" name="id2679527"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>             itdb_tracks_number                  (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);</pre>
+<p>
+Counts the number of tracks stored in <em class="parameter"><code>itdb</code></em></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> the number of tracks in <em class="parameter"><code>itdb</code></em>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2679605"></a><h3>
+<a name="itdb-tracks-number-nontransferred"></a>itdb_tracks_number_nontransferred ()</h3>
+<a class="indexterm" name="id2679618"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>             itdb_tracks_number_nontransferred   (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);</pre>
+<p>
+Counts the number of non-transferred tracks in <em class="parameter"><code>itdb</code></em></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> the number of tracks in <em class="parameter"><code>itdb</code></em> that haven't been transferred
+to the iPod yet (ie the number of <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a> in which the transferred field
+is false)
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2679704"></a><h3>
+<a name="itdb-playlists-number"></a>itdb_playlists_number ()</h3>
+<a class="indexterm" name="id2679716"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>             itdb_playlists_number               (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);</pre>
+<p>
+Counts the number of playlists stored in <em class="parameter"><code>itdb</code></em></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> the number of playlists in <em class="parameter"><code>itdb</code></em> (including the master 
+playlist)
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2679794"></a><h3>
+<a name="ItdbUserDataDestroyFunc"></a>ItdbUserDataDestroyFunc ()</h3>
+<a class="indexterm" name="id2679806"></a><pre class="programlisting">void                (*ItdbUserDataDestroyFunc)          (<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a> userdata);</pre>
+<p>
+Function called to free userdata</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>userdata</code></em>&#160;:</span></p></td>
+<td> A <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+><span class="type">gpointer</span></a> to user data
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2679863"></a><h3>
+<a name="ItdbUserDataDuplicateFunc"></a>ItdbUserDataDuplicateFunc ()</h3>
+<a class="indexterm" name="id2679875"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>            (*ItdbUserDataDuplicateFunc)        (<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a> userdata);</pre>
+<p>
+Function called to duplicate userdata</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>userdata</code></em>&#160;:</span></p></td>
+<td> A <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+><span class="type">gpointer</span></a> to user data
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> A <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+><span class="type">gpointer</span></a>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2679950"></a><div class="refsect2" lang="en"><a name="id2679951"></a></div>
+<hr>
+<div class="refsect2" lang="en"><a name="id2679952"></a></div>
+</div>
+</div>
+</body>
+</html>

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-Time-handling.html
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-Time-handling.html	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-Time-handling.html	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,167 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Time handling</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="index.html" title="libgpod Reference Manual">
+<link rel="up" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
+<link rel="prev" href="libgpod-File-handling-functions.html" title="File handling functions">
+<link rel="next" href="libgpod-Low-level-functions.html" title="Low-level functions">
+<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+<link rel="part" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
+<link rel="chapter" href="ch01.html" title="iPod database components">
+<link rel="part" href="photodb.html" title="Part&#160;II.&#160;Photo database">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="libgpod-File-handling-functions.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="itunesdb.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">libgpod Reference Manual</th>
+<td><a accesskey="n" href="libgpod-Low-level-functions.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2702382" class="shortcut">Top</a>
+                  &#160;|&#160;
+                  <a href="#id2686341" class="shortcut">Description</a></nobr></td></tr>
+</table>
+<div class="refentry" lang="en">
+<a name="libgpod-Time-handling"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2>
+<a name="id2702382"></a><span class="refentrytitle">Time handling</span>
+</h2>
+<p>Time handling &#8212; [DEPRECATED] Helper functions to convert between Epoch time and Mac
+(iPod) time</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<pre class="synopsis">
+
+
+
+time_t              <a class="link" href="libgpod-Time-handling.html#itdb-time-get-mac-time">itdb_time_get_mac_time</a>              (void);
+time_t              <a class="link" href="libgpod-Time-handling.html#itdb-time-mac-to-host">itdb_time_mac_to_host</a>               (time_t time);
+time_t              <a class="link" href="libgpod-Time-handling.html#itdb-time-host-to-mac">itdb_time_host_to_mac</a>               (time_t time);
+</pre>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2686341"></a><h2>Description</h2>
+<p>
+The functions provide conversion between Epoch time and Mac (iPod)
+time.
+</p>
+<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
+<h3 class="title">Note</h3>
+These functions are now obsolete and should no longer be used, libgpod
+automatically converts to/from Epoch time and iPod time when
+writing/reading the iPod databases.
+</div>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2698781"></a><h2>Details</h2>
+<div class="refsect2" lang="en">
+<a name="id2696667"></a><h3>
+<a name="itdb-time-get-mac-time"></a>itdb_time_get_mac_time ()</h3>
+<a class="indexterm" name="id2696680"></a><pre class="programlisting">time_t              itdb_time_get_mac_time              (void);</pre>
+<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
+<h3 class="title">Warning</h3>
+<p><code class="literal">itdb_time_get_mac_time</code> is deprecated and should not be used in newly-written code. kept for compatibility with older code, directly use
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Date-and-Time-Functions.html#g-get-current-time"
+><code class="function">g_get_current_time()</code></a> or time(NULL) instead</p>
+</div>
+<p>
+Gets the current time in a format appropriate for storing in the libgpod
+data structures</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> current time
+
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2696744"></a><h3>
+<a name="itdb-time-mac-to-host"></a>itdb_time_mac_to_host ()</h3>
+<a class="indexterm" name="id2696757"></a><pre class="programlisting">time_t              itdb_time_mac_to_host               (time_t time);</pre>
+<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
+<h3 class="title">Warning</h3>
+<p><code class="literal">itdb_time_mac_to_host</code> is deprecated and should not be used in newly-written code. It's been kept for compatibility with older code, but this
+function is now a no-op</p>
+</div>
+<p>
+Converts a timestamp from libgpod format to host system timestamp.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>time</code></em>&#160;:</span></p></td>
+<td> time expressed in libgpod format
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> timestamp for the host system
+
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2716010"></a><h3>
+<a name="itdb-time-host-to-mac"></a>itdb_time_host_to_mac ()</h3>
+<a class="indexterm" name="id2716023"></a><pre class="programlisting">time_t              itdb_time_host_to_mac               (time_t time);</pre>
+<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
+<h3 class="title">Warning</h3>
+<p><code class="literal">itdb_time_host_to_mac</code> is deprecated and should not be used in newly-written code. It's been kept for compatibility with older code, but this
+function is now a no-op</p>
+</div>
+<p>
+Convert host system timestamp to libgpod format timestamp</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>time</code></em>&#160;:</span></p></td>
+<td> time expressed in host unit
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a libgpod timestamp
+
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2716099"></a><div class="refsect2" lang="en"><a name="id2716100"></a></div>
+<hr>
+<div class="refsect2" lang="en"><a name="id2716101"></a></div>
+</div>
+</div>
+</body>
+</html>

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-Tracks.html
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-Tracks.html	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod-Tracks.html	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,1918 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Tracks</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="index.html" title="libgpod Reference Manual">
+<link rel="up" href="ch01.html" title="iPod database components">
+<link rel="prev" href="ch01.html" title="iPod database components">
+<link rel="next" href="libgpod-Playlists.html" title="Playlists">
+<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+<link rel="part" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
+<link rel="chapter" href="ch01.html" title="iPod database components">
+<link rel="part" href="photodb.html" title="Part&#160;II.&#160;Photo database">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+<tr valign="middle">
+<td><a accesskey="p" href="ch01.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">libgpod Reference Manual</th>
+<td><a accesskey="n" href="libgpod-Playlists.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2711210" class="shortcut">Top</a>
+                  &#160;|&#160;
+                  <a href="#id2724475" class="shortcut">Description</a></nobr></td></tr>
+</table>
+<div class="refentry" lang="en">
+<a name="libgpod-Tracks"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2>
+<a name="id2711210"></a><span class="refentrytitle">Tracks</span>
+</h2>
+<p>Tracks &#8212; Data structure to store metadata about an iPod track</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<h2>Synopsis</h2>
+<pre class="synopsis">
+
+
+
+                    <a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a>;
+enum                <a class="link" href="libgpod-Tracks.html#Itdb-Mediatype">Itdb_Mediatype</a>;
+#define             <a class="link" href="libgpod-Tracks.html#ITDB-RATING-STEP:CAPS">ITDB_RATING_STEP</a>
+<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a>*         <a class="link" href="libgpod-Tracks.html#itdb-track-new">itdb_track_new</a>                      (void);
+void                <a class="link" href="libgpod-Tracks.html#itdb-track-free">itdb_track_free</a>                     (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);
+void                <a class="link" href="libgpod-Tracks.html#itdb-track-add">itdb_track_add</a>                      (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         <a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a> pos);
+void                <a class="link" href="libgpod-Tracks.html#itdb-track-remove">itdb_track_remove</a>                   (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);
+void                <a class="link" href="libgpod-Tracks.html#itdb-track-unlink">itdb_track_unlink</a>                   (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);
+<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a>*         <a class="link" href="libgpod-Tracks.html#itdb-track-duplicate">itdb_track_duplicate</a>                (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *tr);
+<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a>*         <a class="link" href="libgpod-Tracks.html#itdb-track-by-id">itdb_track_by_id</a>                    (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a> id);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Balanced-Binary-Trees.html#GTree"
+>GTree</a>*              <a class="link" href="libgpod-Tracks.html#itdb-track-id-tree-create">itdb_track_id_tree_create</a>           (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);
+void                <a class="link" href="libgpod-Tracks.html#itdb-track-id-tree-destroy">itdb_track_id_tree_destroy</a>          (<a
+href="/usr/share/gtk-doc/html/glib/glib-Balanced-Binary-Trees.html#GTree"
+>GTree</a> *idtree);
+<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a>*         <a class="link" href="libgpod-Tracks.html#itdb-track-id-tree-by-id">itdb_track_id_tree_by_id</a>            (<a
+href="/usr/share/gtk-doc/html/glib/glib-Balanced-Binary-Trees.html#GTree"
+>GTree</a> *idtree,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a> id);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>            <a class="link" href="libgpod-Tracks.html#itdb-track-get-thumbnail">itdb_track_get_thumbnail</a>            (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> width,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> height);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Tracks.html#itdb-track-has-thumbnails">itdb_track_has_thumbnails</a>           (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Tracks.html#itdb-track-set-thumbnails">itdb_track_set_thumbnails</a>           (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *filename);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Tracks.html#itdb-track-set-thumbnails-from-data">itdb_track_set_thumbnails_from_data</a> (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guchar"
+>guchar</a> *image_data,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"
+>gsize</a> image_data_len);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            <a class="link" href="libgpod-Tracks.html#itdb-track-set-thumbnails-from-pixbuf">itdb_track_set_thumbnails_from_pixbuf</a>
+                                                        (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a> pixbuf);
+void                <a class="link" href="libgpod-Tracks.html#itdb-track-remove-thumbnails">itdb_track_remove_thumbnails</a>        (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);
+</pre>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2724475"></a><h2>Description</h2>
+<p>
+These functions and structures are for storing and retrieving
+information about an iPod track.
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2724492"></a><h2>Details</h2>
+<div class="refsect2" lang="en">
+<a name="id2724503"></a><h3>
+<a name="Itdb-Track"></a>Itdb_Track</h3>
+<a class="indexterm" name="id2724515"></a><pre class="programlisting">typedef struct {
+  Itdb_iTunesDB *itdb;
+  gchar   *title;
+  gchar   *ipod_path;
+  gchar   *album;
+  gchar   *artist;
+  gchar   *genre;
+  gchar   *filetype;
+  gchar   *comment;
+  gchar   *category;
+  gchar   *composer;
+  gchar   *grouping;
+  gchar   *description;
+  gchar   *podcasturl;
+  gchar   *podcastrss;
+  Itdb_Chapterdata *chapterdata;
+  gchar   *subtitle;
+/* the following 5 are new in libgpod 0.4.2... */
+  gchar   *tvshow;
+  gchar   *tvepisode;
+  gchar   *tvnetwork;
+  gchar   *albumartist;
+  gchar   *keywords;
+/* the following 6 are new in libgpod 0.5.0... */
+  /* You can set these strings to override the standard
+     sortorder. When set they take precedence over the default
+     'artist', 'album'... fields.
+
+     For example, in the case of an artist name like "The Artist",
+     iTunes will set sort_artist to "Artist, The" followed by five
+     0x01 characters. Why five 0x01 characters are added is not
+     completely understood.
+
+     If you do not set the sort_artist field, libgpod will pre-sort
+     the lists displayed by the iPod according to "Artist, The",
+     without setting the field.
+  */
+  gchar   *sort_artist;
+  gchar   *sort_title;
+  gchar   *sort_album;
+  gchar   *sort_albumartist;
+  gchar   *sort_composer;
+  gchar   *sort_tvshow;
+/* end of new fields in libgpod 0.5.0 */
+  guint32 id;
+  gint32  size;
+  gint32  tracklen;
+  gint32  cd_nr;
+  gint32  cds;
+  gint32  track_nr;
+  gint32  tracks;
+  gint32  bitrate;
+  guint16 samplerate;
+  guint16 samplerate_low;
+  gint32  year;
+  gint32  volume;
+  guint32 soundcheck;
+  time_t  time_added;
+  time_t  time_modified;
+  time_t  time_played;
+  guint32 bookmark_time;
+  guint32 rating;
+  guint32 playcount;
+  guint32 playcount2;
+  guint32 recent_playcount;
+  gboolean transferred;
+  gint16  BPM;
+  guint8  app_rating;
+  guint8  type1;
+  guint8  type2;
+  guint8  compilation;
+  guint32 starttime;
+  guint32 stoptime;
+  guint8  checked;
+  guint64 dbid;
+  guint32 drm_userid;
+  guint32 visible;
+  guint32 filetype_marker;
+  guint16 artwork_count;
+  guint32 artwork_size;
+  float samplerate2;
+  guint16 unk126;
+  guint32 unk132;
+  time_t  time_released;
+  guint16 unk144;
+  guint16 explicit_flag;
+  guint32 unk148;
+  guint32 unk152;
+  guint32 skipcount;
+  guint32 recent_skipcount;
+  guint32 last_skipped;
+  guint8 has_artwork;
+  guint8 skip_when_shuffling;
+  guint8 remember_playback_position;
+  guint8 flag4;
+  guint64 dbid2;
+  guint8 lyrics_flag;
+  guint8 movie_flag;
+  guint8 mark_unplayed;
+  guint8 unk179;
+  guint32 unk180;
+  guint32 pregap;
+  guint64 samplecount;
+  guint32 unk196;
+  guint32 postgap;
+  guint32 unk204;
+  guint32 mediatype;
+  guint32 season_nr;
+  guint32 episode_nr;
+  guint32 unk220;
+  guint32 unk224;
+  guint32 unk228, unk232, unk236, unk240, unk244;
+  guint32 gapless_data;
+  guint32 unk252;
+  guint16 gapless_track_flag;
+  guint16 gapless_album_flag;
+  guint16 album_id;
+
+  /* This is for Cover Art support */
+  struct _Itdb_Artwork *artwork;
+
+  /* This is for sparse artwork support, new in libgpod-0.7.0 */
+  guint32 mhii_link;
+
+  /* reserved for future use */
+  gint32 reserved_int1;
+  gint32 reserved_int2;
+  gint32 reserved_int3;
+  gint32 reserved_int4;
+  gint32 reserved_int5;
+  gint32 reserved_int6;
+  gpointer reserved1;
+  gpointer reserved2;
+  gpointer reserved3;
+  gpointer reserved4;
+  gpointer reserved5;
+  gpointer reserved6;
+
+  /* +++***+++***+++***+++***+++***+++***+++***+++***+++***+++***
+     When adding string fields don't forget to add them in
+     itdb_track_duplicate as well
+     +++***+++***+++***+++***+++***+++***+++***+++***+++***+++*** */
+
+  /* below is for use by application */
+  guint64 usertype;
+  gpointer userdata;
+  /* functions called to duplicate/free userdata */
+  ItdbUserDataDuplicateFunc userdata_duplicate;
+  ItdbUserDataDestroyFunc userdata_destroy;
+} Itdb_Track;
+</pre>
+<p>
+Structure representing a track in an iTunesDB
+</p>
+<p>
+</p>
+<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
+<h3 class="title">Note</h3>
+<p>When adding string fields don't forget to add them in
+<a class="link" href="libgpod-Tracks.html#itdb-track-duplicate"><code class="function">itdb_track_duplicate()</code></a> as well.</p>
+</div>
+<p>
+</p>
+<p>
+Many of the parameter descriptions are copied verbatim from
+http://ipodlinux.org/ITunesDB, which is the best source for information about
+the iTunesDB and related files.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a>&#160;*<em class="structfield"><code>itdb</code></em>;</span></p></td>
+<td>                       A pointer to the <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> (for convenience)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>title</code></em>;</span></p></td>
+<td>                      The title of the track in UTF8
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>ipod_path</code></em>;</span></p></td>
+<td>                  The file path on the iPod.  Directories are
+                             separated with ":" instead of "/".  The path is
+                             relative to the iPod mountpoint.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>album</code></em>;</span></p></td>
+<td>                      The album name in UTF8
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>artist</code></em>;</span></p></td>
+<td>                     The artist name in UTF8
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>genre</code></em>;</span></p></td>
+<td>                      The genre in UTF8
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>filetype</code></em>;</span></p></td>
+<td>                   A UTF8 string describing the file type.  E.g.
+                             "MP3-File".
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>comment</code></em>;</span></p></td>
+<td>                    A comment in UTF8
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>category</code></em>;</span></p></td>
+<td>                   The category ("Technology", "Music", etc.)
+                             where the podcast was located.  (Added in
+                             dbversion 0x0d)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>composer</code></em>;</span></p></td>
+<td>                   The composer name in UTF8
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>grouping</code></em>;</span></p></td>
+<td>                   ??? (UTF8)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>description</code></em>;</span></p></td>
+<td>                Description text (such as podcast show notes).
+                             (Added in dbversion 0x0d)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>podcasturl</code></em>;</span></p></td>
+<td>                 Podcast Enclosure URL in UTF-8 or ASCII.
+                             (Added in dbversion 0x0d)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>podcastrss</code></em>;</span></p></td>
+<td>                 Podcast RSS URL in UTF-8 or ASCII.
+                             (Added in dbversion 0x0d)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-Chapter-Data.html#Itdb-Chapterdata">Itdb_Chapterdata</a>&#160;*<em class="structfield"><code>chapterdata</code></em>;</span></p></td>
+<td>                This is an m4a-style entry that is used to
+                             display subsongs within a mhit.  (Added in
+                             dbversion 0x0d)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>subtitle</code></em>;</span></p></td>
+<td>                   Subtitle (usually the same as Description).
+                             (Added in dbversion 0x0d)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>tvshow</code></em>;</span></p></td>
+<td>                     Name of the TV show (only used for TV Shows).
+                             (Added in dbversion 0x0d?) (Since libgpod-0.4.2)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>tvepisode</code></em>;</span></p></td>
+<td>                  The episode number (only used for TV Shows).
+                             (Added in dbversion 0x0d?) (Since libgpod-0.4.2)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>tvnetwork</code></em>;</span></p></td>
+<td>                  The TV network (only used for TV Shows).
+                             (Added in dbversion 0x0d?) (Since libgpod-0.4.2)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>albumartist</code></em>;</span></p></td>
+<td>                The album artist (Added in dbversion 0x13?)
+                             (Since libgpod-0.4.2)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>keywords</code></em>;</span></p></td>
+<td>                   List of keywords pertaining to the track.
+                             (Added in dbversion 0x13?) (Since libgpod-0.4.2)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>sort_artist</code></em>;</span></p></td>
+<td>                The artist name used for sorting.  Artists with
+                             names like "The Artist" would have "Artist,
+                             The" here.  If you do not set this field,
+                             libgpod will pre-sort the lists displayed by
+                             the iPod according to "Artist, The", without
+                             setting this field.
+                             (Added in dbversion 0x13?) (Since libgpod-0.5.0)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>sort_title</code></em>;</span></p></td>
+<td>                 The track title used for sorting.  See
+                             <em class="parameter"><code>sort_artist</code></em>. (Since libgpod-0.5.0)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>sort_album</code></em>;</span></p></td>
+<td>                 The album name used for sorting.  See
+                             <em class="parameter"><code>sort_artist</code></em>. (Since libgpod-0.5.0)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>sort_albumartist</code></em>;</span></p></td>
+<td>           The album artist used for sorting.  See
+                             <em class="parameter"><code>sort_artist</code></em>. (Since libgpod-0.5.0)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>sort_composer</code></em>;</span></p></td>
+<td>              The composer used for sorting.  See
+                             <em class="parameter"><code>sort_artist</code></em>. (Since libgpod-0.5.0)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a>&#160;*<em class="structfield"><code>sort_tvshow</code></em>;</span></p></td>
+<td>                The name of the TV show used for sorting.  See
+                             <em class="parameter"><code>sort_artist</code></em>. (Since libgpod-0.5.0)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>id</code></em>;</span></p></td>
+<td>                         Unique ID of track
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>size</code></em>;</span></p></td>
+<td>                       The size of the file in bytes
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>tracklen</code></em>;</span></p></td>
+<td>                   The length of the track in ms
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>cd_nr</code></em>;</span></p></td>
+<td>                      The CD number the track comes from.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>cds</code></em>;</span></p></td>
+<td>                        The total number of CDs.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>track_nr</code></em>;</span></p></td>
+<td>                   The track number.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>tracks</code></em>;</span></p></td>
+<td>                     The total number of tracks.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>bitrate</code></em>;</span></p></td>
+<td>                    The bitrate at which the file is encoded.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint16"
+>guint16</a>&#160;<em class="structfield"><code>samplerate</code></em>;</span></p></td>
+<td>                 The samplerate of the track (e.g. CD = 44100)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint16"
+>guint16</a>&#160;<em class="structfield"><code>samplerate_low</code></em>;</span></p></td>
+<td>             In the iTunesDB the samplerate is
+                             multiplied by 0x10000 -- these are the
+                             lower 16 bit, which are usually 0
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>year</code></em>;</span></p></td>
+<td>                       The year the track was released
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>volume</code></em>;</span></p></td>
+<td>                     Volume adjustment field.  This is a value from
+                             -255 to 255 that will be applied to the track
+                             on playback.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>soundcheck</code></em>;</span></p></td>
+<td>                 The SoundCheck value to apply to the song, when
+                             SoundCheck is switched on in the iPod settings.
+                             The value for this field can be determined by
+                             the equation: X = 1000 * 10 ^ (-.1 * Y) where Y
+                             is the adjustment value in dB and X is the
+                             value that goes into the SoundCheck field. The
+                             value 0 is special, the equation is not used
+                             and it is treated as "no Soundcheck" (basically
+                             the same as the value 1000). This equation
+                             works perfectly well with ReplayGain derived
+                             data instead of the iTunes SoundCheck derived
+                             information.
+</td>
+</tr>
+<tr>
+<td><p><span class="term">time_t&#160;<em class="structfield"><code>time_added</code></em>;</span></p></td>
+<td>                 The time the track was added.
+</td>
+</tr>
+<tr>
+<td><p><span class="term">time_t&#160;<em class="structfield"><code>time_modified</code></em>;</span></p></td>
+<td>              The time the track was last modified
+</td>
+</tr>
+<tr>
+<td><p><span class="term">time_t&#160;<em class="structfield"><code>time_played</code></em>;</span></p></td>
+<td>                The time the track was last played
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>bookmark_time</code></em>;</span></p></td>
+<td>              The time, in milliseconds, that the track will
+                             start playing at. This is used for AudioBook
+                             filetypes (.aa and .m4b).  Note that there is
+                             also a bookmark value in the play counts file
+                             that will be set by the iPod and can be used
+                             instead of this value.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>rating</code></em>;</span></p></td>
+<td>                     The track rating (stars * <a class="link" href="libgpod-Tracks.html#ITDB-RATING-STEP:CAPS"><span class="type">ITDB_RATING_STEP</span></a>)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>playcount</code></em>;</span></p></td>
+<td>                  The number of times the track has been played
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>playcount2</code></em>;</span></p></td>
+<td>                 This also stores the play count of the
+                             track.  It is unclear if this ever differs
+                             from the above value. During sync, this is set
+                             to the same value as <em class="parameter"><code>playcount</code></em>.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>recent_playcount</code></em>;</span></p></td>
+<td>           The number of times the track was played since
+                             the last sync.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>&#160;<em class="structfield"><code>transferred</code></em>;</span></p></td>
+<td>                Whether the file been transferred to iPod.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint16"
+>gint16</a>&#160;<em class="structfield"><code>BPM</code></em>;</span></p></td>
+<td>                        BPM (beats per minute) of the track
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>app_rating</code></em>;</span></p></td>
+<td>                 The last rating set by an application (e.g.
+                             iTunes).  If the rating on the iPod and the
+                             <em class="parameter"><code>rating</code></em> field above differ, the original
+                             rating is copied here and the new rating is
+                             stored in <em class="parameter"><code>rating</code></em>.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>type1</code></em>;</span></p></td>
+<td>                      CBR MP3s and AAC are 0x00, VBR MP3s are 0x01
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>type2</code></em>;</span></p></td>
+<td>                      MP3s are 0x01, AAC are 0x00
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>compilation</code></em>;</span></p></td>
+<td>                Flag to mark the track as a compilation.  True
+                             if set to 0x1, false if set to 0x0.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>starttime</code></em>;</span></p></td>
+<td>                  The time, in milliseconds, at which the song
+                             will start playing.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>stoptime</code></em>;</span></p></td>
+<td>                   The time, in milliseconds, at which the song
+                             will stop playing.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>checked</code></em>;</span></p></td>
+<td>                    Flag for whether the track is checked.  True if
+                             set to 0x0, false if set to 0x1
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
+>guint64</a>&#160;<em class="structfield"><code>dbid</code></em>;</span></p></td>
+<td>                       Unique database ID that identifies this song
+                             across the databases on the iPod. For example,
+                             this id joins an iTunesDB mhit with an
+                             ArtworkDB mhii.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>drm_userid</code></em>;</span></p></td>
+<td>                 Apple Store/Audible User ID (for DRM'ed files
+                             only, set to 0 otherwise).
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>visible</code></em>;</span></p></td>
+<td>                    If this value is 1, the song is visible on the
+                             iPod. All other values cause the file to be
+                             hidden.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>filetype_marker</code></em>;</span></p></td>
+<td>            This appears to always be 0 on hard drive based
+                             iPods, but for the iTunesDB that is written to
+                             an iPod Shuffle, iTunes 4.7.1 writes out the
+                             file's type as an ANSI string(!). For example,
+                             a MP3 file has a filetype of 0x4d503320 -&gt;
+                             0x4d = 'M', 0x50 = 'P', 0x33 = '3', 0x20 =
+                             &lt;space&gt;.  This is set to the filename
+                             extension by libgpod when copying the track to
+                             the iPod.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint16"
+>guint16</a>&#160;<em class="structfield"><code>artwork_count</code></em>;</span></p></td>
+<td>              The number of album artwork items associated
+                             with this song.  libgpod updates this value
+                             when syncing.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>artwork_size</code></em>;</span></p></td>
+<td>               The total size of artwork (in bytes) attached
+                             to this song, when it is converted to JPEG
+                             format. Observed in dbversion 0x0b and with
+                             an iPod Photo. libgpod updates this value when
+                             syncing.
+</td>
+</tr>
+<tr>
+<td><p><span class="term">float&#160;<em class="structfield"><code>samplerate2</code></em>;</span></p></td>
+<td>                The sample rate of the song expressed as an
+                             IEEE 32 bit floating point number.  It is
+                             uncertain why this is here.  libgpod will set
+                             this when adding a track.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint16"
+>guint16</a>&#160;<em class="structfield"><code>unk126</code></em>;</span></p></td>
+<td>                     Unknown, but always seems to be 0xffff for
+                             MP3/AAC songs, 0x0 for uncompressed songs
+                             (like WAVE format), 0x1 for Audible.  libgpod
+                             will try to set this when adding a new track.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk132</code></em>;</span></p></td>
+<td>                     Unknown
+</td>
+</tr>
+<tr>
+<td><p><span class="term">time_t&#160;<em class="structfield"><code>time_released</code></em>;</span></p></td>
+<td>              The date/time the track was added to the iTunes
+                             music store?  For podcasts this is the release
+                             date that is displayed next to the title in the
+                             Podcast playlist.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint16"
+>guint16</a>&#160;<em class="structfield"><code>unk144</code></em>;</span></p></td>
+<td>                     Unknown, but MP3 songs appear to be always
+                             0x000c, AAC songs are always 0x0033, Audible
+                             files are 0x0029, WAV files are 0x0.  libgpod
+                             will attempt to set this value when adding a
+                             track.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint16"
+>guint16</a>&#160;<em class="structfield"><code>explicit_flag</code></em>;</span></p></td>
+<td>              Flag to mark a track as "explicit" in iTunes.
+                             True if to 0x1, false if set to 0x0.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk148</code></em>;</span></p></td>
+<td>                     Unknown - used for Apple Store DRM songs
+                             (always 0x01010100?), zero otherwise
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk152</code></em>;</span></p></td>
+<td>                     Unknown
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>skipcount</code></em>;</span></p></td>
+<td>                  The number of times the track has been skipped.
+                             (Added in dbversion 0x0c)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>recent_skipcount</code></em>;</span></p></td>
+<td>           The number of times the track was skipped since
+                             the last sync.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>last_skipped</code></em>;</span></p></td>
+<td>               The time the track was last skipped.  (Added in
+                             dbversion 0x0c)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>has_artwork</code></em>;</span></p></td>
+<td>                Whether the track has artwork.
+                             True if set to 0x01, false if set to 0x02.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>skip_when_shuffling</code></em>;</span></p></td>
+<td>        Flag to skip the track when shuffling.  True if
+                             set to 0x01, false if set to 0x00. Audiobooks
+                             (.aa and .m4b) always seem to be skipped when
+                             shuffling, regardless of this flag.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>remember_playback_position</code></em>;</span></p></td>
+<td> Flag to remember playback position.
+                             True when set to 0x01, false when set to 0x00.
+                             Audiobooks (.aa and .m4b) always seem to
+                             remember the playback position, regardless of
+                             this flag.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>flag4</code></em>;</span></p></td>
+<td>                      Used for podcasts, 0x00 otherwise.  If set to
+                             0x01 the "Now Playing" page will show
+                             Title/Album, when set to 0x00 it will also show
+                             the Artist.  When set to 0x02 a sub-page
+                             (middle button) with further information about
+                             the track will be shown.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
+>guint64</a>&#160;<em class="structfield"><code>dbid2</code></em>;</span></p></td>
+<td>                      The purpose of the field is unclear.  If not
+                             set, libgpod will set this to the same value as
+                             <em class="parameter"><code>dbid</code></em> when adding a track.  (With iTunes, since
+                             dbversion 0x12, this field value differs from
+                             <em class="parameter"><code>dbid</code></em>.)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>lyrics_flag</code></em>;</span></p></td>
+<td>                Whether the track has lyrics (e.g. it has a
+                             USLT ID3 tag in an MP3 or a <em class="parameter"><code>lyr</code></em> atom in an
+                             MP4).  True if set to 0x01, false if set to
+                             0x00.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>movie_flag</code></em>;</span></p></td>
+<td>                 Whether the track is a movie.  True if set to
+                             0x01, false if set to 0x00.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>mark_unplayed</code></em>;</span></p></td>
+<td>              A value of 0x02 marks a podcast as unplayed on
+                             the iPod, with a bullet.  Once played it is set
+                             to 0x01. Non-podcasts have this set to 0x01.
+                             (Added in dbversion 0x0c)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"
+>guint8</a>&#160;<em class="structfield"><code>unk179</code></em>;</span></p></td>
+<td>                     Unknown, always 0x00 so far.  (Added in
+                             dbversion 0x0c)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk180</code></em>;</span></p></td>
+<td>                     Unknown.  (Added in dbversion 0x0c)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>pregap</code></em>;</span></p></td>
+<td>                     The number of samples of silence before the
+                             track starts (for gapless playback).
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
+>guint64</a>&#160;<em class="structfield"><code>samplecount</code></em>;</span></p></td>
+<td>                The number of samples in the track (for gapless
+                             playback).
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk196</code></em>;</span></p></td>
+<td>                     Unknown.  (Added in dbversion 0x0c)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>postgap</code></em>;</span></p></td>
+<td>                    The number of samples of silence at the end of
+                             the track (for gapless playback).
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk204</code></em>;</span></p></td>
+<td>                     Unknown.  Appears to be 0x1 for files encoded
+                             using the MP3 encoder, 0x0 otherwise.  (Added
+                             in dbversion 0x0c, first values observed in
+                             0x0d.)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>mediatype</code></em>;</span></p></td>
+<td>                  The type of file.  It must be set to 0x00000001
+                             for audio files, and set to 0x00000002 for
+                             video files.  If set to 0x00, the files show up
+                             in both, the audio menus ("Songs", "Artists",
+                             etc.) and the video menus ("Movies", "Music
+                             Videos", etc.).  It appears to be set to 0x20
+                             for music videos, and if set to 0x60 the file
+                             shows up in "TV Shows" rather than "Movies".
+                             <p>
+                             The following list summarizes all observed types:
+                             </p>
+                             <div class="itemizedlist"><ul type="disc">
+<li>0x00 00 00 00 - Audio/Video</li>
+<li>0x00 00 00 01 - Audio</li>
+<li>0x00 00 00 02 - Video</li>
+<li>0x00 00 00 04 - Podcast</li>
+<li>0x00 00 00 06 - Video Podcast</li>
+<li>0x00 00 00 08 - Audiobook</li>
+<li>0x00 00 00 20 - Music Video</li>
+<li>0x00 00 00 40 - TV Show (shows up ONLY
+                             in TV Shows)</li>
+<li>0x00 00 00 60 - TV Show (shows up in
+                             the Music lists as well)</li>
+</ul></div>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>season_nr</code></em>;</span></p></td>
+<td>                  The season number of the track (only used for
+                             TV Shows).
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>episode_nr</code></em>;</span></p></td>
+<td>                 The episode number of the track (only used for
+                             TV Shows).  Although this is not displayed on
+                             the iPod, the episodes are sorted by episode
+                             number.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk220</code></em>;</span></p></td>
+<td>                     Unknown.  This has something to do with
+                             protected files.  It is set to 0x0 for
+                             non-protected files.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk224</code></em>;</span></p></td>
+<td>                     Unknown.  (Added in dbversion 0x0c)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk228</code></em>;</span></p></td>
+<td>                     Unknown.  (Added in dbversion 0x0c)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk232</code></em>;</span></p></td>
+<td>                     Unknown.  (Added in dbversion 0x0c)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk236</code></em>;</span></p></td>
+<td>                     Unknown.  (Added in dbversion 0x0c)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk240</code></em>;</span></p></td>
+<td>                     Unknown.  (Added in dbversion 0x0c)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk244</code></em>;</span></p></td>
+<td>                     Unknown.  (Added in dbversion 0x13)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>gapless_data</code></em>;</span></p></td>
+<td>               The size in bytes from first Synch Frame
+                             (which is usually the XING frame that
+                             includes the LAME tag) until the 8th before
+                             the last frame. The gapless playback does not
+                             work for MP3 files if this is set to zero. For
+                             AAC tracks, this may be zero.  (Added in
+                             dbversion 0x13)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>unk252</code></em>;</span></p></td>
+<td>                     Unknown.  (Added in dbversion 0x0c)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint16"
+>guint16</a>&#160;<em class="structfield"><code>gapless_track_flag</code></em>;</span></p></td>
+<td>         If set to 1, this track has gapless playback
+                             data.  (Added in dbversion 0x13)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint16"
+>guint16</a>&#160;<em class="structfield"><code>gapless_album_flag</code></em>;</span></p></td>
+<td>         If set to 1, this track does not use
+                             crossfading in iTunes.  (Added in dbversion
+                             0x13)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint16"
+>guint16</a>&#160;<em class="structfield"><code>album_id</code></em>;</span></p></td>
+<td>                   The Album ID from the album list (currently
+                             unused by libgpod)
+</td>
+</tr>
+<tr>
+<td><p><span class="term">struct&#160;<a class="link" href="libgpod-Artwork.html#Itdb-Artwork">_Itdb_Artwork</a>&#160;*<em class="structfield"><code>artwork</code></em>;</span></p></td>
+<td>                    An <a class="link" href="libgpod-Artwork.html#Itdb-Artwork"><span class="type">Itdb_Artwork</span></a> for cover art
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a>&#160;<em class="structfield"><code>mhii_link</code></em>;</span></p></td>
+<td>                  This is set to the id of the corresponding
+                             ArtworkDB mhii, used for sparse artwork
+                             support.  (Since libgpod-0.7.0)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int1</code></em>;</span></p></td>
+<td>              Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int2</code></em>;</span></p></td>
+<td>              Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int3</code></em>;</span></p></td>
+<td>              Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int4</code></em>;</span></p></td>
+<td>              Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int5</code></em>;</span></p></td>
+<td>              Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a>&#160;<em class="structfield"><code>reserved_int6</code></em>;</span></p></td>
+<td>              Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved1</code></em>;</span></p></td>
+<td>                  Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved2</code></em>;</span></p></td>
+<td>                  Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved3</code></em>;</span></p></td>
+<td>                  Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved4</code></em>;</span></p></td>
+<td>                  Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved5</code></em>;</span></p></td>
+<td>                  Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>reserved6</code></em>;</span></p></td>
+<td>                  Reserved for future use
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"
+>guint64</a>&#160;<em class="structfield"><code>usertype</code></em>;</span></p></td>
+<td>                   For use by application
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>&#160;<em class="structfield"><code>userdata</code></em>;</span></p></td>
+<td>                   For use by application
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDuplicateFunc">ItdbUserDataDuplicateFunc</a>&#160;<em class="structfield"><code>userdata_duplicate</code></em>;</span></p></td>
+<td>         A function to duplicate <span class="type">userdata</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDestroyFunc">ItdbUserDataDestroyFunc</a>&#160;<em class="structfield"><code>userdata_destroy</code></em>;</span></p></td>
+<td>           A function to free <span class="type">userdata</span>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2731558"></a><h3>
+<a name="Itdb-Mediatype"></a>enum Itdb_Mediatype</h3>
+<a class="indexterm" name="id2731570"></a><pre class="programlisting">typedef enum
+{
+    ITDB_MEDIATYPE_AUDIO      = 0x0001,
+    ITDB_MEDIATYPE_MOVIE      = 0x0002,
+    ITDB_MEDIATYPE_PODCAST    = 0x0004,
+    ITDB_MEDIATYPE_AUDIOBOOK  = 0x0008,
+    ITDB_MEDIATYPE_MUSICVIDEO = 0x0020,
+    ITDB_MEDIATYPE_TVSHOW     = 0x0040,
+} Itdb_Mediatype;
+</pre>
+<p>
+Mediatype definitions
+</p>
+<p>
+The mediatype is used to determine what menu a track appears under.  For
+example, setting the mediatype to <a class="link" href="libgpod-Tracks.html#ITDB-MEDIATYPE-PODCAST:CAPS"><span class="type">ITDB_MEDIATYPE_PODCAST</span></a> makes the track
+appear on the Podcast menu.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><a name="ITDB-MEDIATYPE-AUDIO:CAPS"></a><code class="literal">ITDB_MEDIATYPE_AUDIO</code></span></p></td>
+<td>      Audio files
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-MEDIATYPE-MOVIE:CAPS"></a><code class="literal">ITDB_MEDIATYPE_MOVIE</code></span></p></td>
+<td>      Movies
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-MEDIATYPE-PODCAST:CAPS"></a><code class="literal">ITDB_MEDIATYPE_PODCAST</code></span></p></td>
+<td>    Podcasts
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-MEDIATYPE-AUDIOBOOK:CAPS"></a><code class="literal">ITDB_MEDIATYPE_AUDIOBOOK</code></span></p></td>
+<td>  Audio books
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-MEDIATYPE-MUSICVIDEO:CAPS"></a><code class="literal">ITDB_MEDIATYPE_MUSICVIDEO</code></span></p></td>
+<td> Music videos
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><a name="ITDB-MEDIATYPE-TVSHOW:CAPS"></a><code class="literal">ITDB_MEDIATYPE_TVSHOW</code></span></p></td>
+<td>     TV Shows
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.5.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2731730"></a><h3>
+<a name="ITDB-RATING-STEP:CAPS"></a>ITDB_RATING_STEP</h3>
+<a class="indexterm" name="id2731741"></a><pre class="programlisting">#define ITDB_RATING_STEP 20
+</pre>
+<p>
+The multiplier for each star in <span class="type">track-</span>&gt;rating</p>
+<p>
+
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2731765"></a><h3>
+<a name="itdb-track-new"></a>itdb_track_new ()</h3>
+<a class="indexterm" name="id2731775"></a><pre class="programlisting"><a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a>*         itdb_track_new                      (void);</pre>
+<p>
+Creates an empty <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> the new <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>, free it with <a class="link" href="libgpod-Tracks.html#itdb-track-free"><code class="function">itdb_track_free()</code></a> when no
+longer needed
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2731830"></a><h3>
+<a name="itdb-track-free"></a>itdb_track_free ()</h3>
+<a class="indexterm" name="id2731841"></a><pre class="programlisting">void                itdb_track_free                     (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);</pre>
+<p>
+Frees the memory used by <em class="parameter"><code>track</code></em></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2731895"></a><h3>
+<a name="itdb-track-add"></a>itdb_track_add ()</h3>
+<a class="indexterm" name="id2731906"></a><pre class="programlisting">void                itdb_track_add                      (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         <a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint32"
+>gint32</a> pos);</pre>
+<p>
+Adds <em class="parameter"><code>track</code></em> to <em class="parameter"><code>itdb-&gt;tracks</code></em> at position <em class="parameter"><code>pos</code></em> (or at the end if pos
+is -1). The application is responsible to also add it to the master
+playlist. The <em class="parameter"><code>itdb</code></em> gets ownership of the <em class="parameter"><code>track</code></em> and will take care of
+freeing the memory it uses when it's no longer necessary.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td>   an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></p></td>
+<td>  an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>pos</code></em>&#160;:</span></p></td>
+<td>    position of the track to add
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2732030"></a><h3>
+<a name="itdb-track-remove"></a>itdb_track_remove ()</h3>
+<a class="indexterm" name="id2732041"></a><pre class="programlisting">void                itdb_track_remove                   (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);</pre>
+<p>
+Removes <em class="parameter"><code>track</code></em> from the <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> it's associated with, and frees the
+memory it uses. It doesn't remove the track from the playlists it may have
+been added to, in particular it won't be removed from the master playlist.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2732106"></a><h3>
+<a name="itdb-track-unlink"></a>itdb_track_unlink ()</h3>
+<a class="indexterm" name="id2732116"></a><pre class="programlisting">void                itdb_track_unlink                   (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);</pre>
+<p>
+Removes <em class="parameter"><code>track</code></em> from the <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a> it's associated with, but do not free
+memory. It doesn't remove the track from the playlists it may have been
+added to, in particular it won't be removed from the master playlist.
+<em class="parameter"><code>track-&gt;itdb</code></em> is set to NULL.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2732186"></a><h3>
+<a name="itdb-track-duplicate"></a>itdb_track_duplicate ()</h3>
+<a class="indexterm" name="id2732197"></a><pre class="programlisting"><a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a>*         itdb_track_duplicate                (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *tr);</pre>
+<p>
+Duplicates an existing track</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>tr</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a newly allocated <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2732263"></a><h3>
+<a name="itdb-track-by-id"></a>itdb_track_by_id ()</h3>
+<a class="indexterm" name="id2732274"></a><pre class="programlisting"><a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a>*         itdb_track_by_id                    (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a> id);</pre>
+<p>
+Looks up a track using its ID in <em class="parameter"><code>itdb</code></em>.
+</p>
+<p>
+Looking up tracks by ID is not really a good idea because the IDs
+are created by itdb just before export. The functions are here
+because they are needed during import of the iTunesDB which is
+referencing tracks by IDs.
+</p>
+<p>
+This function is very slow (linear in the number of tracks
+contained in the database). If you need to lookup many IDs use
+<a class="link" href="libgpod-Tracks.html#itdb-track-id-tree-create"><code class="function">itdb_track_id_tree_create()</code></a>, <a class="link" href="libgpod-Tracks.html#itdb-track-id-tree-destroy"><code class="function">itdb_track_id_tree_destroy()</code></a>, and
+<a class="link" href="libgpod-Tracks.html#itdb-track-id-tree-by-id"><code class="function">itdb_track_id_tree_by_id()</code></a>.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>id</code></em>&#160;:</span></p></td>
+<td>   ID of the track to look for
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a> with the ID <em class="parameter"><code>id</code></em> or NULL if the ID cannot be
+found.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2732409"></a><h3>
+<a name="itdb-track-id-tree-create"></a>itdb_track_id_tree_create ()</h3>
+<a class="indexterm" name="id2732420"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Balanced-Binary-Trees.html#GTree"
+>GTree</a>*              itdb_track_id_tree_create           (<a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB">Itdb_iTunesDB</a> *itdb);</pre>
+<p>
+Creates a balanced-binary tree for quick ID lookup that is used in
+<code class="function">itdb_track_by_id_tree()</code></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>itdb</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"><span class="type">Itdb_iTunesDB</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a <a
+href="/usr/share/gtk-doc/html/glib/glib-Balanced-Binary-Trees.html#GTree"
+><span class="type">GTree</span></a> indexed by track IDs to be freed with
+<a class="link" href="libgpod-Tracks.html#itdb-track-id-tree-destroy"><code class="function">itdb_track_id_tree_destroy()</code></a> when no longer used
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2732505"></a><h3>
+<a name="itdb-track-id-tree-destroy"></a>itdb_track_id_tree_destroy ()</h3>
+<a class="indexterm" name="id2732516"></a><pre class="programlisting">void                itdb_track_id_tree_destroy          (<a
+href="/usr/share/gtk-doc/html/glib/glib-Balanced-Binary-Trees.html#GTree"
+>GTree</a> *idtree);</pre>
+<p>
+Frees the memory used by <em class="parameter"><code>idtree</code></em></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>idtree</code></em>&#160;:</span></p></td>
+<td> a <a
+href="/usr/share/gtk-doc/html/glib/glib-Balanced-Binary-Trees.html#GTree"
+><span class="type">GTree</span></a>
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2732570"></a><h3>
+<a name="itdb-track-id-tree-by-id"></a>itdb_track_id_tree_by_id ()</h3>
+<a class="indexterm" name="id2732580"></a><pre class="programlisting"><a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a>*         itdb_track_id_tree_by_id            (<a
+href="/usr/share/gtk-doc/html/glib/glib-Balanced-Binary-Trees.html#GTree"
+>GTree</a> *idtree,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"
+>guint32</a> id);</pre>
+<p>
+Lookup an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a> by <em class="parameter"><code>id</code></em> using <em class="parameter"><code>idtree</code></em> for faster lookup
+(compared to <a class="link" href="libgpod-Tracks.html#itdb-track-by-id"><code class="function">itdb_track_by_id()</code></a>)</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>idtree</code></em>&#160;:</span></p></td>
+<td> a <a
+href="/usr/share/gtk-doc/html/glib/glib-Balanced-Binary-Trees.html#GTree"
+><span class="type">GTree</span></a> created using <a class="link" href="libgpod-Tracks.html#itdb-track-id-tree-create"><code class="function">itdb_track_id_tree_create()</code></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>id</code></em>&#160;:</span></p></td>
+<td>     the ID of the track to search for
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> the <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a> whose ID is <em class="parameter"><code>id</code></em>, or NULL if such a track
+couldn't be found
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2732706"></a><h3>
+<a name="itdb-track-get-thumbnail"></a>itdb_track_get_thumbnail ()</h3>
+<a class="indexterm" name="id2732719"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a>            itdb_track_get_thumbnail            (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> width,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> height);</pre>
+<p>
+Get a thumbnail representing the cover associated with the current track,
+scaling it if appropriate. If either height or width is -1, then the biggest
+unscaled thumbnail available will be returned.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></p></td>
+<td>  an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>width</code></em>&#160;:</span></p></td>
+<td>  width of the pixbuf to retrieve, -1 for the biggest possible size
+         (with no scaling)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>height</code></em>&#160;:</span></p></td>
+<td> height of the pixbuf to retrieve, -1 for the biggest possible size
+         (with no scaling)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> a <a
+href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
+><span class="type">GdkPixbuf</span></a> that must be unreffed when no longer used, NULL
+if no artwork could be found or if libgpod is compiled without GdkPixbuf
+support
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.7.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2732838"></a><h3>
+<a name="itdb-track-has-thumbnails"></a>itdb_track_has_thumbnails ()</h3>
+<a class="indexterm" name="id2732851"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_track_has_thumbnails           (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);</pre>
+<p>
+Determine if a <em class="parameter"><code>track</code></em> has thumbnails</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> TRUE if <em class="parameter"><code>track</code></em> has artwork available, FALSE otherwise
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.7.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2732928"></a><h3>
+<a name="itdb-track-set-thumbnails"></a>itdb_track_set_thumbnails ()</h3>
+<a class="indexterm" name="id2732941"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_track_set_thumbnails           (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
+>gchar</a> *filename);</pre>
+<p>
+Uses the image contained in <em class="parameter"><code>filename</code></em> to generate iPod thumbnails. The image
+can be in any format supported by gdk-pixbuf. To save memory, the thumbnails
+will only be generated when necessary, i.e. when <code class="function">itdb_save()</code> or a similar
+function is called.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></p></td>
+<td>    an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></p></td>
+<td> image file to use as a thumbnail
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> TRUE if the thumbnail could be added, FALSE otherwise.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.3.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2733046"></a><h3>
+<a name="itdb-track-set-thumbnails-from-data"></a>itdb_track_set_thumbnails_from_data ()</h3>
+<a class="indexterm" name="id2733061"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_track_set_thumbnails_from_data (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+                                                         const <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guchar"
+>guchar</a> *image_data,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"
+>gsize</a> image_data_len);</pre>
+<p>
+Uses <em class="parameter"><code>image_data</code></em> to generate iPod thumbnails. The image can be in
+any format supported by gdk-pixbuf. To save memory, the thumbnails
+will only be generated when necessary, i.e. when <code class="function">itdb_save()</code> or a
+similar function is called.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></p></td>
+<td>          an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>image_data</code></em>&#160;:</span></p></td>
+<td>     data used to create the thumbnail (the raw contents of
+                 an image file)
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>image_data_len</code></em>&#160;:</span></p></td>
+<td> length of above data block
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> TRUE if the thumbnail could be added, FALSE otherwise.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.4.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2733186"></a><h3>
+<a name="itdb-track-set-thumbnails-from-pixbuf"></a>itdb_track_set_thumbnails_from_pixbuf ()</h3>
+<a class="indexterm" name="id2733201"></a><pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a>            itdb_track_set_thumbnails_from_pixbuf
+                                                        (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track,
+                                                         <a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
+>gpointer</a> pixbuf);</pre>
+<p>
+Uses <em class="parameter"><code>pixbuf</code></em> to generate iPod thumbnails. To save memory, the thumbnails
+will only be generated when necessary, i.e. when <code class="function">itdb_save()</code> or a
+similar function is called.</p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></p></td>
+<td>  an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>pixbuf</code></em>&#160;:</span></p></td>
+<td> a <a
+href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
+><span class="type">GdkPixbuf</span></a> used to generate the thumbnail
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
+<td> TRUE if the thumbnail could be added, FALSE otherwise.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since  0.5.0
+</p>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="id2733312"></a><h3>
+<a name="itdb-track-remove-thumbnails"></a>itdb_track_remove_thumbnails ()</h3>
+<a class="indexterm" name="id2733326"></a><pre class="programlisting">void                itdb_track_remove_thumbnails        (<a class="link" href="libgpod-Tracks.html#Itdb-Track">Itdb_Track</a> *track);</pre>
+<p>
+Removes the thumbnails associated with <em class="parameter"><code>track</code></em></p>
+<p>
+
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>track</code></em>&#160;:</span></p></td>
+<td> an <a class="link" href="libgpod-Tracks.html#Itdb-Track"><span class="type">Itdb_Track</span></a>
+</td>
+</tr></tbody>
+</table></div>
+<p class="since">Since  0.3.0
+</p>
+</div>
+</div>
+<div class="refsect1" lang="en">
+<a name="id2733389"></a><div class="refsect2" lang="en"><a name="id2733390"></a></div>
+<hr>
+<div class="refsect2" lang="en"><a name="id2733391"></a></div>
+</div>
+</div>
+</body>
+</html>

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod.devhelp
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod.devhelp	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod.devhelp	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,220 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<!DOCTYPE book PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
+<book xmlns="http://www.devhelp.net/book" title="libgpod Reference Manual" link="index.html" author="Jorg SchulerChristophe Fergeau" name="libgpod">
+  <chapters>
+    <sub name="iPod database" link="itunesdb.html">
+      <sub name="iPod database reading/writing" link="libgpod-The-Itdb-iTunesDB-structure.html"/>
+      <sub name="File handling functions" link="libgpod-File-handling-functions.html"/>
+      <sub name="Time handling" link="libgpod-Time-handling.html"/>
+      <sub name="Low-level functions" link="libgpod-Low-level-functions.html"/>
+      <sub name="iPod database components" link="ch01.html">
+        <sub name="Tracks" link="libgpod-Tracks.html"/>
+        <sub name="Playlists" link="libgpod-Playlists.html"/>
+        <sub name="Smart Playlists" link="libgpod-Smart-Playlists.html"/>
+        <sub name="Artwork" link="libgpod-Artwork.html"/>
+        <sub name="Chapter Data" link="libgpod-Chapter-Data.html"/>
+        <sub name="Device" link="libgpod-Device.html"/>
+      </sub>
+    </sub>
+    <sub name="Photo database" link="photodb.html">
+      <sub name="Photo database" link="libgpod-Photo-database.html"/>
+    </sub>
+  </chapters>
+  <functions>
+    <function name="Itdb_iTunesDB" link="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"/>
+    <function name="enum ItdbFileError" link="libgpod-The-Itdb-iTunesDB-structure.html#ItdbFileError"/>
+    <function name="itdb_new ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-new"/>
+    <function name="itdb_free ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-free"/>
+    <function name="itdb_parse ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-parse"/>
+    <function name="itdb_write ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-write"/>
+    <function name="itdb_set_mountpoint ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-set-mountpoint"/>
+    <function name="itdb_get_mountpoint ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-get-mountpoint"/>
+    <function name="itdb_init_ipod ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-init-ipod"/>
+    <function name="itdb_tracks_number ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-tracks-number"/>
+    <function name="itdb_tracks_number_nontransferred ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-tracks-number-nontransferred"/>
+    <function name="itdb_playlists_number ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-playlists-number"/>
+    <function name="ItdbUserDataDestroyFunc ()" link="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDestroyFunc"/>
+    <function name="ItdbUserDataDuplicateFunc ()" link="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDuplicateFunc"/>
+    <function name="" link="libgpod-The-Itdb-iTunesDB-structure.html#id2679951"/>
+    <function name="" link="libgpod-The-Itdb-iTunesDB-structure.html#id2679952"/>
+    <function name="itdb_cp_track_to_ipod ()" link="libgpod-File-handling-functions.html#itdb-cp-track-to-ipod"/>
+    <function name="itdb_filename_fs2ipod ()" link="libgpod-File-handling-functions.html#itdb-filename-fs2ipod"/>
+    <function name="itdb_filename_ipod2fs ()" link="libgpod-File-handling-functions.html#itdb-filename-ipod2fs"/>
+    <function name="itdb_filename_on_ipod ()" link="libgpod-File-handling-functions.html#itdb-filename-on-ipod"/>
+    <function name="itdb_musicdirs_number ()" link="libgpod-File-handling-functions.html#itdb-musicdirs-number"/>
+    <function name="itdb_rename_files ()" link="libgpod-File-handling-functions.html#itdb-rename-files"/>
+    <function name="" link="libgpod-File-handling-functions.html#id2705799"/>
+    <function name="" link="libgpod-File-handling-functions.html#id2705800"/>
+    <function name="itdb_time_get_mac_time ()" link="libgpod-Time-handling.html#itdb-time-get-mac-time"/>
+    <function name="itdb_time_mac_to_host ()" link="libgpod-Time-handling.html#itdb-time-mac-to-host"/>
+    <function name="itdb_time_host_to_mac ()" link="libgpod-Time-handling.html#itdb-time-host-to-mac"/>
+    <function name="" link="libgpod-Time-handling.html#id2716100"/>
+    <function name="" link="libgpod-Time-handling.html#id2716101"/>
+    <function name="itdb_get_control_dir ()" link="libgpod-Low-level-functions.html#itdb-get-control-dir"/>
+    <function name="itdb_get_itunes_dir ()" link="libgpod-Low-level-functions.html#itdb-get-itunes-dir"/>
+    <function name="itdb_get_music_dir ()" link="libgpod-Low-level-functions.html#itdb-get-music-dir"/>
+    <function name="itdb_get_artwork_dir ()" link="libgpod-Low-level-functions.html#itdb-get-artwork-dir"/>
+    <function name="itdb_get_device_dir ()" link="libgpod-Low-level-functions.html#itdb-get-device-dir"/>
+    <function name="itdb_get_photos_dir ()" link="libgpod-Low-level-functions.html#itdb-get-photos-dir"/>
+    <function name="itdb_get_itunesdb_path ()" link="libgpod-Low-level-functions.html#itdb-get-itunesdb-path"/>
+    <function name="itdb_get_itunessd_path ()" link="libgpod-Low-level-functions.html#itdb-get-itunessd-path"/>
+    <function name="itdb_get_artworkdb_path ()" link="libgpod-Low-level-functions.html#itdb-get-artworkdb-path"/>
+    <function name="itdb_get_photodb_path ()" link="libgpod-Low-level-functions.html#itdb-get-photodb-path"/>
+    <function name="itdb_get_photos_thumb_dir ()" link="libgpod-Low-level-functions.html#itdb-get-photos-thumb-dir"/>
+    <function name="itdb_get_path ()" link="libgpod-Low-level-functions.html#itdb-get-path"/>
+    <function name="itdb_resolve_path ()" link="libgpod-Low-level-functions.html#itdb-resolve-path"/>
+    <function name="itdb_cp ()" link="libgpod-Low-level-functions.html#itdb-cp"/>
+    <function name="itdb_cp_get_dest_filename ()" link="libgpod-Low-level-functions.html#itdb-cp-get-dest-filename"/>
+    <function name="itdb_cp_finalize ()" link="libgpod-Low-level-functions.html#itdb-cp-finalize"/>
+    <function name="itdb_parse_file ()" link="libgpod-Low-level-functions.html#itdb-parse-file"/>
+    <function name="itdb_write_file ()" link="libgpod-Low-level-functions.html#itdb-write-file"/>
+    <function name="itdb_shuffle_write ()" link="libgpod-Low-level-functions.html#itdb-shuffle-write"/>
+    <function name="itdb_shuffle_write_file ()" link="libgpod-Low-level-functions.html#itdb-shuffle-write-file"/>
+    <function name="itdb_duplicate ()" link="libgpod-Low-level-functions.html#itdb-duplicate"/>
+    <function name="" link="libgpod-Low-level-functions.html#id2725760"/>
+    <function name="" link="libgpod-Low-level-functions.html#id2725761"/>
+    <function name="Itdb_Track" link="libgpod-Tracks.html#Itdb-Track"/>
+    <function name="enum Itdb_Mediatype" link="libgpod-Tracks.html#Itdb-Mediatype"/>
+    <function name="ITDB_RATING_STEP" link="libgpod-Tracks.html#ITDB-RATING-STEP:CAPS"/>
+    <function name="itdb_track_new ()" link="libgpod-Tracks.html#itdb-track-new"/>
+    <function name="itdb_track_free ()" link="libgpod-Tracks.html#itdb-track-free"/>
+    <function name="itdb_track_add ()" link="libgpod-Tracks.html#itdb-track-add"/>
+    <function name="itdb_track_remove ()" link="libgpod-Tracks.html#itdb-track-remove"/>
+    <function name="itdb_track_unlink ()" link="libgpod-Tracks.html#itdb-track-unlink"/>
+    <function name="itdb_track_duplicate ()" link="libgpod-Tracks.html#itdb-track-duplicate"/>
+    <function name="itdb_track_by_id ()" link="libgpod-Tracks.html#itdb-track-by-id"/>
+    <function name="itdb_track_id_tree_create ()" link="libgpod-Tracks.html#itdb-track-id-tree-create"/>
+    <function name="itdb_track_id_tree_destroy ()" link="libgpod-Tracks.html#itdb-track-id-tree-destroy"/>
+    <function name="itdb_track_id_tree_by_id ()" link="libgpod-Tracks.html#itdb-track-id-tree-by-id"/>
+    <function name="itdb_track_get_thumbnail ()" link="libgpod-Tracks.html#itdb-track-get-thumbnail"/>
+    <function name="itdb_track_has_thumbnails ()" link="libgpod-Tracks.html#itdb-track-has-thumbnails"/>
+    <function name="itdb_track_set_thumbnails ()" link="libgpod-Tracks.html#itdb-track-set-thumbnails"/>
+    <function name="itdb_track_set_thumbnails_from_data ()" link="libgpod-Tracks.html#itdb-track-set-thumbnails-from-data"/>
+    <function name="itdb_track_set_thumbnails_from_pixbuf ()" link="libgpod-Tracks.html#itdb-track-set-thumbnails-from-pixbuf"/>
+    <function name="itdb_track_remove_thumbnails ()" link="libgpod-Tracks.html#itdb-track-remove-thumbnails"/>
+    <function name="" link="libgpod-Tracks.html#id2733390"/>
+    <function name="" link="libgpod-Tracks.html#id2733391"/>
+    <function name="Itdb_Playlist" link="libgpod-Playlists.html#Itdb-Playlist"/>
+    <function name="enum ItdbPlaylistSortOrder" link="libgpod-Playlists.html#ItdbPlaylistSortOrder"/>
+    <function name="itdb_playlist_new ()" link="libgpod-Playlists.html#itdb-playlist-new"/>
+    <function name="itdb_playlist_free ()" link="libgpod-Playlists.html#itdb-playlist-free"/>
+    <function name="itdb_playlist_duplicate ()" link="libgpod-Playlists.html#itdb-playlist-duplicate"/>
+    <function name="itdb_playlist_add ()" link="libgpod-Playlists.html#itdb-playlist-add"/>
+    <function name="itdb_playlist_move ()" link="libgpod-Playlists.html#itdb-playlist-move"/>
+    <function name="itdb_playlist_remove ()" link="libgpod-Playlists.html#itdb-playlist-remove"/>
+    <function name="itdb_playlist_unlink ()" link="libgpod-Playlists.html#itdb-playlist-unlink"/>
+    <function name="itdb_playlist_add_track ()" link="libgpod-Playlists.html#itdb-playlist-add-track"/>
+    <function name="itdb_playlist_remove_track ()" link="libgpod-Playlists.html#itdb-playlist-remove-track"/>
+    <function name="itdb_playlist_contains_track ()" link="libgpod-Playlists.html#itdb-playlist-contains-track"/>
+    <function name="itdb_playlist_contain_track_number ()" link="libgpod-Playlists.html#itdb-playlist-contain-track-number"/>
+    <function name="itdb_playlist_tracks_number ()" link="libgpod-Playlists.html#itdb-playlist-tracks-number"/>
+    <function name="itdb_playlist_mpl ()" link="libgpod-Playlists.html#itdb-playlist-mpl"/>
+    <function name="itdb_playlist_is_mpl ()" link="libgpod-Playlists.html#itdb-playlist-is-mpl"/>
+    <function name="itdb_playlist_set_mpl ()" link="libgpod-Playlists.html#itdb-playlist-set-mpl"/>
+    <function name="itdb_playlist_podcasts ()" link="libgpod-Playlists.html#itdb-playlist-podcasts"/>
+    <function name="itdb_playlist_is_podcasts ()" link="libgpod-Playlists.html#itdb-playlist-is-podcasts"/>
+    <function name="itdb_playlist_set_podcasts ()" link="libgpod-Playlists.html#itdb-playlist-set-podcasts"/>
+    <function name="itdb_playlist_exists ()" link="libgpod-Playlists.html#itdb-playlist-exists"/>
+    <function name="itdb_playlist_by_id ()" link="libgpod-Playlists.html#itdb-playlist-by-id"/>
+    <function name="itdb_playlist_by_nr ()" link="libgpod-Playlists.html#itdb-playlist-by-nr"/>
+    <function name="itdb_playlist_by_name ()" link="libgpod-Playlists.html#itdb-playlist-by-name"/>
+    <function name="itdb_playlist_randomize ()" link="libgpod-Playlists.html#itdb-playlist-randomize"/>
+    <function name="" link="libgpod-Playlists.html#id2736861"/>
+    <function name="" link="libgpod-Playlists.html#id2736862"/>
+    <function name="Itdb_SPLPref" link="libgpod-Smart-Playlists.html#Itdb-SPLPref"/>
+    <function name="Itdb_SPLRule" link="libgpod-Smart-Playlists.html#Itdb-SPLRule"/>
+    <function name="Itdb_SPLRules" link="libgpod-Smart-Playlists.html#Itdb-SPLRules"/>
+    <function name="enum ItdbLimitSort" link="libgpod-Smart-Playlists.html#ItdbLimitSort"/>
+    <function name="enum ItdbLimitType" link="libgpod-Smart-Playlists.html#ItdbLimitType"/>
+    <function name="enum ItdbSPLAction" link="libgpod-Smart-Playlists.html#ItdbSPLAction"/>
+    <function name="enum ItdbSPLActionLast" link="libgpod-Smart-Playlists.html#ItdbSPLActionLast"/>
+    <function name="enum ItdbSPLActionType" link="libgpod-Smart-Playlists.html#ItdbSPLActionType"/>
+    <function name="enum ItdbSPLField" link="libgpod-Smart-Playlists.html#ItdbSPLField"/>
+    <function name="enum ItdbSPLFieldType" link="libgpod-Smart-Playlists.html#ItdbSPLFieldType"/>
+    <function name="enum ItdbSPLMatch" link="libgpod-Smart-Playlists.html#ItdbSPLMatch"/>
+    <function name="ITDB_SPL_DATE_IDENTIFIER" link="libgpod-Smart-Playlists.html#ITDB-SPL-DATE-IDENTIFIER:CAPS"/>
+    <function name="ITDB_SPL_STRING_MAXLEN" link="libgpod-Smart-Playlists.html#ITDB-SPL-STRING-MAXLEN:CAPS"/>
+    <function name="itdb_splr_get_field_type ()" link="libgpod-Smart-Playlists.html#itdb-splr-get-field-type"/>
+    <function name="itdb_splr_get_action_type ()" link="libgpod-Smart-Playlists.html#itdb-splr-get-action-type"/>
+    <function name="itdb_splr_validate ()" link="libgpod-Smart-Playlists.html#itdb-splr-validate"/>
+    <function name="itdb_splr_remove ()" link="libgpod-Smart-Playlists.html#itdb-splr-remove"/>
+    <function name="itdb_splr_new ()" link="libgpod-Smart-Playlists.html#itdb-splr-new"/>
+    <function name="itdb_splr_add ()" link="libgpod-Smart-Playlists.html#itdb-splr-add"/>
+    <function name="itdb_splr_add_new ()" link="libgpod-Smart-Playlists.html#itdb-splr-add-new"/>
+    <function name="itdb_spl_copy_rules ()" link="libgpod-Smart-Playlists.html#itdb-spl-copy-rules"/>
+    <function name="itdb_splr_eval ()" link="libgpod-Smart-Playlists.html#itdb-splr-eval"/>
+    <function name="itdb_spl_update ()" link="libgpod-Smart-Playlists.html#itdb-spl-update"/>
+    <function name="itdb_spl_update_all ()" link="libgpod-Smart-Playlists.html#itdb-spl-update-all"/>
+    <function name="itdb_spl_update_live ()" link="libgpod-Smart-Playlists.html#itdb-spl-update-live"/>
+    <function name="" link="libgpod-Smart-Playlists.html#id2743210"/>
+    <function name="" link="libgpod-Smart-Playlists.html#id2743211"/>
+    <function name="Itdb_Artwork" link="libgpod-Artwork.html#Itdb-Artwork"/>
+    <function name="itdb_artwork_new ()" link="libgpod-Artwork.html#itdb-artwork-new"/>
+    <function name="itdb_artwork_duplicate ()" link="libgpod-Artwork.html#itdb-artwork-duplicate"/>
+    <function name="itdb_artwork_free ()" link="libgpod-Artwork.html#itdb-artwork-free"/>
+    <function name="itdb_artwork_get_pixbuf ()" link="libgpod-Artwork.html#itdb-artwork-get-pixbuf"/>
+    <function name="itdb_artwork_set_thumbnail ()" link="libgpod-Artwork.html#itdb-artwork-set-thumbnail"/>
+    <function name="itdb_artwork_set_thumbnail_from_data ()" link="libgpod-Artwork.html#itdb-artwork-set-thumbnail-from-data"/>
+    <function name="itdb_artwork_set_thumbnail_from_pixbuf ()" link="libgpod-Artwork.html#itdb-artwork-set-thumbnail-from-pixbuf"/>
+    <function name="itdb_artwork_remove_thumbnails ()" link="libgpod-Artwork.html#itdb-artwork-remove-thumbnails"/>
+    <function name="Itdb_Thumb" link="libgpod-Artwork.html#Itdb-Thumb"/>
+    <function name="itdb_thumb_duplicate ()" link="libgpod-Artwork.html#itdb-thumb-duplicate"/>
+    <function name="itdb_thumb_free ()" link="libgpod-Artwork.html#itdb-thumb-free"/>
+    <function name="itdb_thumb_to_pixbuf_at_size ()" link="libgpod-Artwork.html#itdb-thumb-to-pixbuf-at-size"/>
+    <function name="itdb_thumb_to_pixbufs ()" link="libgpod-Artwork.html#itdb-thumb-to-pixbufs"/>
+    <function name="" link="libgpod-Artwork.html#id2744505"/>
+    <function name="" link="libgpod-Artwork.html#id2744506"/>
+    <function name="Itdb_Chapter" link="libgpod-Chapter-Data.html#Itdb-Chapter"/>
+    <function name="Itdb_Chapterdata" link="libgpod-Chapter-Data.html#Itdb-Chapterdata"/>
+    <function name="itdb_chapter_new ()" link="libgpod-Chapter-Data.html#itdb-chapter-new"/>
+    <function name="itdb_chapter_duplicate ()" link="libgpod-Chapter-Data.html#itdb-chapter-duplicate"/>
+    <function name="itdb_chapter_free ()" link="libgpod-Chapter-Data.html#itdb-chapter-free"/>
+    <function name="itdb_chapterdata_new ()" link="libgpod-Chapter-Data.html#itdb-chapterdata-new"/>
+    <function name="itdb_chapterdata_add_chapter ()" link="libgpod-Chapter-Data.html#itdb-chapterdata-add-chapter"/>
+    <function name="itdb_chapterdata_duplicate ()" link="libgpod-Chapter-Data.html#itdb-chapterdata-duplicate"/>
+    <function name="itdb_chapterdata_remove_chapter ()" link="libgpod-Chapter-Data.html#itdb-chapterdata-remove-chapter"/>
+    <function name="itdb_chapterdata_remove_chapters ()" link="libgpod-Chapter-Data.html#itdb-chapterdata-remove-chapters"/>
+    <function name="itdb_chapterdata_free ()" link="libgpod-Chapter-Data.html#itdb-chapterdata-free"/>
+    <function name="" link="libgpod-Chapter-Data.html#id2739387"/>
+    <function name="" link="libgpod-Chapter-Data.html#id2739388"/>
+    <function name="Itdb_Device" link="libgpod-Device.html#Itdb-Device"/>
+    <function name="itdb_device_new ()" link="libgpod-Device.html#itdb-device-new"/>
+    <function name="itdb_device_free ()" link="libgpod-Device.html#itdb-device-free"/>
+    <function name="itdb_device_set_mountpoint ()" link="libgpod-Device.html#itdb-device-set-mountpoint"/>
+    <function name="itdb_device_supports_artwork ()" link="libgpod-Device.html#itdb-device-supports-artwork"/>
+    <function name="itdb_device_supports_chapter_image ()" link="libgpod-Device.html#itdb-device-supports-chapter-image"/>
+    <function name="itdb_device_supports_photo ()" link="libgpod-Device.html#itdb-device-supports-photo"/>
+    <function name="itdb_device_supports_podcast ()" link="libgpod-Device.html#itdb-device-supports-podcast"/>
+    <function name="itdb_device_supports_video ()" link="libgpod-Device.html#itdb-device-supports-video"/>
+    <function name="Itdb_IpodInfo" link="libgpod-Device.html#Itdb-IpodInfo"/>
+    <function name="itdb_device_get_ipod_info ()" link="libgpod-Device.html#itdb-device-get-ipod-info"/>
+    <function name="itdb_info_get_ipod_info_table ()" link="libgpod-Device.html#itdb-info-get-ipod-info-table"/>
+    <function name="enum Itdb_IpodGeneration" link="libgpod-Device.html#Itdb-IpodGeneration"/>
+    <function name="itdb_info_get_ipod_generation_string ()" link="libgpod-Device.html#itdb-info-get-ipod-generation-string"/>
+    <function name="enum Itdb_IpodModel" link="libgpod-Device.html#Itdb-IpodModel"/>
+    <function name="itdb_info_get_ipod_model_name_string ()" link="libgpod-Device.html#itdb-info-get-ipod-model-name-string"/>
+    <function name="Itdb_ArtworkFormat" link="libgpod-Device.html#Itdb-ArtworkFormat"/>
+    <function name="itdb_device_read_sysinfo ()" link="libgpod-Device.html#itdb-device-read-sysinfo"/>
+    <function name="itdb_device_get_sysinfo ()" link="libgpod-Device.html#itdb-device-get-sysinfo"/>
+    <function name="itdb_device_set_sysinfo ()" link="libgpod-Device.html#itdb-device-set-sysinfo"/>
+    <function name="itdb_device_write_sysinfo ()" link="libgpod-Device.html#itdb-device-write-sysinfo"/>
+    <function name="" link="libgpod-Device.html#id2751894"/>
+    <function name="" link="libgpod-Device.html#id2751895"/>
+    <function name="Itdb_PhotoDB" link="libgpod-Photo-database.html#Itdb-PhotoDB"/>
+    <function name="itdb_photodb_create ()" link="libgpod-Photo-database.html#itdb-photodb-create"/>
+    <function name="itdb_photodb_free ()" link="libgpod-Photo-database.html#itdb-photodb-free"/>
+    <function name="itdb_photodb_parse ()" link="libgpod-Photo-database.html#itdb-photodb-parse"/>
+    <function name="itdb_photodb_write ()" link="libgpod-Photo-database.html#itdb-photodb-write"/>
+    <function name="itdb_photodb_add_photo ()" link="libgpod-Photo-database.html#itdb-photodb-add-photo"/>
+    <function name="itdb_photodb_add_photo_from_data ()" link="libgpod-Photo-database.html#itdb-photodb-add-photo-from-data"/>
+    <function name="itdb_photodb_add_photo_from_pixbuf ()" link="libgpod-Photo-database.html#itdb-photodb-add-photo-from-pixbuf"/>
+    <function name="itdb_photodb_remove_photo ()" link="libgpod-Photo-database.html#itdb-photodb-remove-photo"/>
+    <function name="Itdb_PhotoAlbum" link="libgpod-Photo-database.html#Itdb-PhotoAlbum"/>
+    <function name="itdb_photodb_photoalbum_create ()" link="libgpod-Photo-database.html#itdb-photodb-photoalbum-create"/>
+    <function name="itdb_photodb_photoalbum_add_photo ()" link="libgpod-Photo-database.html#itdb-photodb-photoalbum-add-photo"/>
+    <function name="itdb_photodb_photoalbum_by_name ()" link="libgpod-Photo-database.html#itdb-photodb-photoalbum-by-name"/>
+    <function name="itdb_photodb_photoalbum_remove ()" link="libgpod-Photo-database.html#itdb-photodb-photoalbum-remove"/>
+    <function name="" link="libgpod-Photo-database.html#id2755279"/>
+    <function name="" link="libgpod-Photo-database.html#id2755280"/>
+  </functions>
+</book>

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod.devhelp2
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod.devhelp2	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/libgpod.devhelp2	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,220 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<!DOCTYPE book PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
+<book xmlns="http://www.devhelp.net/book" title="libgpod Reference Manual" link="index.html" author="Jorg SchulerChristophe Fergeau" name="libgpod" version="2">
+  <chapters>
+    <sub name="iPod database" link="itunesdb.html">
+      <sub name="iPod database reading/writing" link="libgpod-The-Itdb-iTunesDB-structure.html"/>
+      <sub name="File handling functions" link="libgpod-File-handling-functions.html"/>
+      <sub name="Time handling" link="libgpod-Time-handling.html"/>
+      <sub name="Low-level functions" link="libgpod-Low-level-functions.html"/>
+      <sub name="iPod database components" link="ch01.html">
+        <sub name="Tracks" link="libgpod-Tracks.html"/>
+        <sub name="Playlists" link="libgpod-Playlists.html"/>
+        <sub name="Smart Playlists" link="libgpod-Smart-Playlists.html"/>
+        <sub name="Artwork" link="libgpod-Artwork.html"/>
+        <sub name="Chapter Data" link="libgpod-Chapter-Data.html"/>
+        <sub name="Device" link="libgpod-Device.html"/>
+      </sub>
+    </sub>
+    <sub name="Photo database" link="photodb.html">
+      <sub name="Photo database" link="libgpod-Photo-database.html"/>
+    </sub>
+  </chapters>
+  <functions>
+    <keyword type="struct" name="Itdb_iTunesDB" link="libgpod-The-Itdb-iTunesDB-structure.html#Itdb-iTunesDB"/>
+    <keyword type="enum" name="enum ItdbFileError" link="libgpod-The-Itdb-iTunesDB-structure.html#ItdbFileError"/>
+    <keyword type="function" name="itdb_new ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-new"/>
+    <keyword type="function" name="itdb_free ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-free"/>
+    <keyword type="function" name="itdb_parse ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-parse"/>
+    <keyword type="function" name="itdb_write ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-write"/>
+    <keyword type="function" name="itdb_set_mountpoint ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-set-mountpoint" since="0.1.3"/>
+    <keyword type="function" name="itdb_get_mountpoint ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-get-mountpoint" since="0.4.0"/>
+    <keyword type="function" name="itdb_init_ipod ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-init-ipod" since="0.4.0"/>
+    <keyword type="function" name="itdb_tracks_number ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-tracks-number"/>
+    <keyword type="function" name="itdb_tracks_number_nontransferred ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-tracks-number-nontransferred"/>
+    <keyword type="function" name="itdb_playlists_number ()" link="libgpod-The-Itdb-iTunesDB-structure.html#itdb-playlists-number"/>
+    <keyword type="function" name="ItdbUserDataDestroyFunc ()" link="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDestroyFunc"/>
+    <keyword type="function" name="ItdbUserDataDuplicateFunc ()" link="libgpod-The-Itdb-iTunesDB-structure.html#ItdbUserDataDuplicateFunc"/>
+    <keyword type="" name="" link="libgpod-The-Itdb-iTunesDB-structure.html#id2679951"/>
+    <keyword type="" name="" link="libgpod-The-Itdb-iTunesDB-structure.html#id2679952"/>
+    <keyword type="function" name="itdb_cp_track_to_ipod ()" link="libgpod-File-handling-functions.html#itdb-cp-track-to-ipod"/>
+    <keyword type="function" name="itdb_filename_fs2ipod ()" link="libgpod-File-handling-functions.html#itdb-filename-fs2ipod"/>
+    <keyword type="function" name="itdb_filename_ipod2fs ()" link="libgpod-File-handling-functions.html#itdb-filename-ipod2fs"/>
+    <keyword type="function" name="itdb_filename_on_ipod ()" link="libgpod-File-handling-functions.html#itdb-filename-on-ipod"/>
+    <keyword type="function" name="itdb_musicdirs_number ()" link="libgpod-File-handling-functions.html#itdb-musicdirs-number" since="0.1.3"/>
+    <keyword type="function" name="itdb_rename_files ()" link="libgpod-File-handling-functions.html#itdb-rename-files"/>
+    <keyword type="" name="" link="libgpod-File-handling-functions.html#id2705799"/>
+    <keyword type="" name="" link="libgpod-File-handling-functions.html#id2705800"/>
+    <keyword type="function" name="itdb_time_get_mac_time ()" link="libgpod-Time-handling.html#itdb-time-get-mac-time" deprecated=""/>
+    <keyword type="function" name="itdb_time_mac_to_host ()" link="libgpod-Time-handling.html#itdb-time-mac-to-host" deprecated=""/>
+    <keyword type="function" name="itdb_time_host_to_mac ()" link="libgpod-Time-handling.html#itdb-time-host-to-mac" deprecated=""/>
+    <keyword type="" name="" link="libgpod-Time-handling.html#id2716100"/>
+    <keyword type="" name="" link="libgpod-Time-handling.html#id2716101"/>
+    <keyword type="function" name="itdb_get_control_dir ()" link="libgpod-Low-level-functions.html#itdb-get-control-dir" since="0.4.0"/>
+    <keyword type="function" name="itdb_get_itunes_dir ()" link="libgpod-Low-level-functions.html#itdb-get-itunes-dir" since="0.4.0"/>
+    <keyword type="function" name="itdb_get_music_dir ()" link="libgpod-Low-level-functions.html#itdb-get-music-dir"/>
+    <keyword type="function" name="itdb_get_artwork_dir ()" link="libgpod-Low-level-functions.html#itdb-get-artwork-dir" since="0.4.0"/>
+    <keyword type="function" name="itdb_get_device_dir ()" link="libgpod-Low-level-functions.html#itdb-get-device-dir" since="0.4.0"/>
+    <keyword type="function" name="itdb_get_photos_dir ()" link="libgpod-Low-level-functions.html#itdb-get-photos-dir" since="0.4.0"/>
+    <keyword type="function" name="itdb_get_itunesdb_path ()" link="libgpod-Low-level-functions.html#itdb-get-itunesdb-path" since="0.4.0"/>
+    <keyword type="function" name="itdb_get_itunessd_path ()" link="libgpod-Low-level-functions.html#itdb-get-itunessd-path" since="0.4.0"/>
+    <keyword type="function" name="itdb_get_artworkdb_path ()" link="libgpod-Low-level-functions.html#itdb-get-artworkdb-path" since="0.4.0"/>
+    <keyword type="function" name="itdb_get_photodb_path ()" link="libgpod-Low-level-functions.html#itdb-get-photodb-path" since="0.4.0"/>
+    <keyword type="function" name="itdb_get_photos_thumb_dir ()" link="libgpod-Low-level-functions.html#itdb-get-photos-thumb-dir" since="0.4.0"/>
+    <keyword type="function" name="itdb_get_path ()" link="libgpod-Low-level-functions.html#itdb-get-path" since="0.4.0"/>
+    <keyword type="function" name="itdb_resolve_path ()" link="libgpod-Low-level-functions.html#itdb-resolve-path"/>
+    <keyword type="function" name="itdb_cp ()" link="libgpod-Low-level-functions.html#itdb-cp"/>
+    <keyword type="function" name="itdb_cp_get_dest_filename ()" link="libgpod-Low-level-functions.html#itdb-cp-get-dest-filename" since="0.5.0"/>
+    <keyword type="function" name="itdb_cp_finalize ()" link="libgpod-Low-level-functions.html#itdb-cp-finalize" since="0.5.0"/>
+    <keyword type="function" name="itdb_parse_file ()" link="libgpod-Low-level-functions.html#itdb-parse-file"/>
+    <keyword type="function" name="itdb_write_file ()" link="libgpod-Low-level-functions.html#itdb-write-file"/>
+    <keyword type="function" name="itdb_shuffle_write ()" link="libgpod-Low-level-functions.html#itdb-shuffle-write"/>
+    <keyword type="function" name="itdb_shuffle_write_file ()" link="libgpod-Low-level-functions.html#itdb-shuffle-write-file"/>
+    <keyword type="function" name="itdb_duplicate ()" link="libgpod-Low-level-functions.html#itdb-duplicate"/>
+    <keyword type="" name="" link="libgpod-Low-level-functions.html#id2725760"/>
+    <keyword type="" name="" link="libgpod-Low-level-functions.html#id2725761"/>
+    <keyword type="struct" name="Itdb_Track" link="libgpod-Tracks.html#Itdb-Track"/>
+    <keyword type="enum" name="enum Itdb_Mediatype" link="libgpod-Tracks.html#Itdb-Mediatype" since="0.5.0"/>
+    <keyword type="macro" name="ITDB_RATING_STEP" link="libgpod-Tracks.html#ITDB-RATING-STEP:CAPS"/>
+    <keyword type="function" name="itdb_track_new ()" link="libgpod-Tracks.html#itdb-track-new"/>
+    <keyword type="function" name="itdb_track_free ()" link="libgpod-Tracks.html#itdb-track-free"/>
+    <keyword type="function" name="itdb_track_add ()" link="libgpod-Tracks.html#itdb-track-add"/>
+    <keyword type="function" name="itdb_track_remove ()" link="libgpod-Tracks.html#itdb-track-remove"/>
+    <keyword type="function" name="itdb_track_unlink ()" link="libgpod-Tracks.html#itdb-track-unlink"/>
+    <keyword type="function" name="itdb_track_duplicate ()" link="libgpod-Tracks.html#itdb-track-duplicate"/>
+    <keyword type="function" name="itdb_track_by_id ()" link="libgpod-Tracks.html#itdb-track-by-id"/>
+    <keyword type="function" name="itdb_track_id_tree_create ()" link="libgpod-Tracks.html#itdb-track-id-tree-create"/>
+    <keyword type="function" name="itdb_track_id_tree_destroy ()" link="libgpod-Tracks.html#itdb-track-id-tree-destroy"/>
+    <keyword type="function" name="itdb_track_id_tree_by_id ()" link="libgpod-Tracks.html#itdb-track-id-tree-by-id"/>
+    <keyword type="function" name="itdb_track_get_thumbnail ()" link="libgpod-Tracks.html#itdb-track-get-thumbnail" since="0.7.0"/>
+    <keyword type="function" name="itdb_track_has_thumbnails ()" link="libgpod-Tracks.html#itdb-track-has-thumbnails" since="0.7.0"/>
+    <keyword type="function" name="itdb_track_set_thumbnails ()" link="libgpod-Tracks.html#itdb-track-set-thumbnails" since="0.3.0"/>
+    <keyword type="function" name="itdb_track_set_thumbnails_from_data ()" link="libgpod-Tracks.html#itdb-track-set-thumbnails-from-data" since="0.4.0"/>
+    <keyword type="function" name="itdb_track_set_thumbnails_from_pixbuf ()" link="libgpod-Tracks.html#itdb-track-set-thumbnails-from-pixbuf" since="0.5.0"/>
+    <keyword type="function" name="itdb_track_remove_thumbnails ()" link="libgpod-Tracks.html#itdb-track-remove-thumbnails" since="0.3.0"/>
+    <keyword type="" name="" link="libgpod-Tracks.html#id2733390"/>
+    <keyword type="" name="" link="libgpod-Tracks.html#id2733391"/>
+    <keyword type="struct" name="Itdb_Playlist" link="libgpod-Playlists.html#Itdb-Playlist"/>
+    <keyword type="enum" name="enum ItdbPlaylistSortOrder" link="libgpod-Playlists.html#ItdbPlaylistSortOrder" since="0.1.3"/>
+    <keyword type="function" name="itdb_playlist_new ()" link="libgpod-Playlists.html#itdb-playlist-new"/>
+    <keyword type="function" name="itdb_playlist_free ()" link="libgpod-Playlists.html#itdb-playlist-free"/>
+    <keyword type="function" name="itdb_playlist_duplicate ()" link="libgpod-Playlists.html#itdb-playlist-duplicate"/>
+    <keyword type="function" name="itdb_playlist_add ()" link="libgpod-Playlists.html#itdb-playlist-add"/>
+    <keyword type="function" name="itdb_playlist_move ()" link="libgpod-Playlists.html#itdb-playlist-move"/>
+    <keyword type="function" name="itdb_playlist_remove ()" link="libgpod-Playlists.html#itdb-playlist-remove"/>
+    <keyword type="function" name="itdb_playlist_unlink ()" link="libgpod-Playlists.html#itdb-playlist-unlink"/>
+    <keyword type="function" name="itdb_playlist_add_track ()" link="libgpod-Playlists.html#itdb-playlist-add-track"/>
+    <keyword type="function" name="itdb_playlist_remove_track ()" link="libgpod-Playlists.html#itdb-playlist-remove-track"/>
+    <keyword type="function" name="itdb_playlist_contains_track ()" link="libgpod-Playlists.html#itdb-playlist-contains-track"/>
+    <keyword type="function" name="itdb_playlist_contain_track_number ()" link="libgpod-Playlists.html#itdb-playlist-contain-track-number"/>
+    <keyword type="function" name="itdb_playlist_tracks_number ()" link="libgpod-Playlists.html#itdb-playlist-tracks-number"/>
+    <keyword type="function" name="itdb_playlist_mpl ()" link="libgpod-Playlists.html#itdb-playlist-mpl"/>
+    <keyword type="function" name="itdb_playlist_is_mpl ()" link="libgpod-Playlists.html#itdb-playlist-is-mpl" since="0.1.6"/>
+    <keyword type="function" name="itdb_playlist_set_mpl ()" link="libgpod-Playlists.html#itdb-playlist-set-mpl" since="0.2.0"/>
+    <keyword type="function" name="itdb_playlist_podcasts ()" link="libgpod-Playlists.html#itdb-playlist-podcasts" since="0.1.6"/>
+    <keyword type="function" name="itdb_playlist_is_podcasts ()" link="libgpod-Playlists.html#itdb-playlist-is-podcasts" since="0.1.6"/>
+    <keyword type="function" name="itdb_playlist_set_podcasts ()" link="libgpod-Playlists.html#itdb-playlist-set-podcasts" since="0.2.0"/>
+    <keyword type="function" name="itdb_playlist_exists ()" link="libgpod-Playlists.html#itdb-playlist-exists"/>
+    <keyword type="function" name="itdb_playlist_by_id ()" link="libgpod-Playlists.html#itdb-playlist-by-id"/>
+    <keyword type="function" name="itdb_playlist_by_nr ()" link="libgpod-Playlists.html#itdb-playlist-by-nr"/>
+    <keyword type="function" name="itdb_playlist_by_name ()" link="libgpod-Playlists.html#itdb-playlist-by-name"/>
+    <keyword type="function" name="itdb_playlist_randomize ()" link="libgpod-Playlists.html#itdb-playlist-randomize"/>
+    <keyword type="" name="" link="libgpod-Playlists.html#id2736861"/>
+    <keyword type="" name="" link="libgpod-Playlists.html#id2736862"/>
+    <keyword type="struct" name="Itdb_SPLPref" link="libgpod-Smart-Playlists.html#Itdb-SPLPref" since="0.5.0"/>
+    <keyword type="struct" name="Itdb_SPLRule" link="libgpod-Smart-Playlists.html#Itdb-SPLRule" since="0.5.0"/>
+    <keyword type="struct" name="Itdb_SPLRules" link="libgpod-Smart-Playlists.html#Itdb-SPLRules" since="0.5.0"/>
+    <keyword type="enum" name="enum ItdbLimitSort" link="libgpod-Smart-Playlists.html#ItdbLimitSort" since="0.5.0"/>
+    <keyword type="enum" name="enum ItdbLimitType" link="libgpod-Smart-Playlists.html#ItdbLimitType" since="0.5.0"/>
+    <keyword type="enum" name="enum ItdbSPLAction" link="libgpod-Smart-Playlists.html#ItdbSPLAction" since="0.5.0"/>
+    <keyword type="enum" name="enum ItdbSPLActionLast" link="libgpod-Smart-Playlists.html#ItdbSPLActionLast" since="0.5.0"/>
+    <keyword type="enum" name="enum ItdbSPLActionType" link="libgpod-Smart-Playlists.html#ItdbSPLActionType" since="0.5.0"/>
+    <keyword type="enum" name="enum ItdbSPLField" link="libgpod-Smart-Playlists.html#ItdbSPLField" since="0.5.0"/>
+    <keyword type="enum" name="enum ItdbSPLFieldType" link="libgpod-Smart-Playlists.html#ItdbSPLFieldType" since="0.5.0"/>
+    <keyword type="enum" name="enum ItdbSPLMatch" link="libgpod-Smart-Playlists.html#ItdbSPLMatch"/>
+    <keyword type="macro" name="ITDB_SPL_DATE_IDENTIFIER" link="libgpod-Smart-Playlists.html#ITDB-SPL-DATE-IDENTIFIER:CAPS" since="0.5.0"/>
+    <keyword type="macro" name="ITDB_SPL_STRING_MAXLEN" link="libgpod-Smart-Playlists.html#ITDB-SPL-STRING-MAXLEN:CAPS" since="0.5.0"/>
+    <keyword type="function" name="itdb_splr_get_field_type ()" link="libgpod-Smart-Playlists.html#itdb-splr-get-field-type"/>
+    <keyword type="function" name="itdb_splr_get_action_type ()" link="libgpod-Smart-Playlists.html#itdb-splr-get-action-type"/>
+    <keyword type="function" name="itdb_splr_validate ()" link="libgpod-Smart-Playlists.html#itdb-splr-validate"/>
+    <keyword type="function" name="itdb_splr_remove ()" link="libgpod-Smart-Playlists.html#itdb-splr-remove"/>
+    <keyword type="function" name="itdb_splr_new ()" link="libgpod-Smart-Playlists.html#itdb-splr-new"/>
+    <keyword type="function" name="itdb_splr_add ()" link="libgpod-Smart-Playlists.html#itdb-splr-add"/>
+    <keyword type="function" name="itdb_splr_add_new ()" link="libgpod-Smart-Playlists.html#itdb-splr-add-new"/>
+    <keyword type="function" name="itdb_spl_copy_rules ()" link="libgpod-Smart-Playlists.html#itdb-spl-copy-rules"/>
+    <keyword type="function" name="itdb_splr_eval ()" link="libgpod-Smart-Playlists.html#itdb-splr-eval"/>
+    <keyword type="function" name="itdb_spl_update ()" link="libgpod-Smart-Playlists.html#itdb-spl-update"/>
+    <keyword type="function" name="itdb_spl_update_all ()" link="libgpod-Smart-Playlists.html#itdb-spl-update-all"/>
+    <keyword type="function" name="itdb_spl_update_live ()" link="libgpod-Smart-Playlists.html#itdb-spl-update-live" since="0.2.0"/>
+    <keyword type="" name="" link="libgpod-Smart-Playlists.html#id2743210"/>
+    <keyword type="" name="" link="libgpod-Smart-Playlists.html#id2743211"/>
+    <keyword type="struct" name="Itdb_Artwork" link="libgpod-Artwork.html#Itdb-Artwork" since="0.3.0"/>
+    <keyword type="function" name="itdb_artwork_new ()" link="libgpod-Artwork.html#itdb-artwork-new" since="0.3.0"/>
+    <keyword type="function" name="itdb_artwork_duplicate ()" link="libgpod-Artwork.html#itdb-artwork-duplicate" since="0.3.0"/>
+    <keyword type="function" name="itdb_artwork_free ()" link="libgpod-Artwork.html#itdb-artwork-free" since="0.3.0"/>
+    <keyword type="function" name="itdb_artwork_get_pixbuf ()" link="libgpod-Artwork.html#itdb-artwork-get-pixbuf" since="0.7.0"/>
+    <keyword type="function" name="itdb_artwork_set_thumbnail ()" link="libgpod-Artwork.html#itdb-artwork-set-thumbnail" since="0.7.0"/>
+    <keyword type="function" name="itdb_artwork_set_thumbnail_from_data ()" link="libgpod-Artwork.html#itdb-artwork-set-thumbnail-from-data" since="0.7.0"/>
+    <keyword type="function" name="itdb_artwork_set_thumbnail_from_pixbuf ()" link="libgpod-Artwork.html#itdb-artwork-set-thumbnail-from-pixbuf" since="0.7.0"/>
+    <keyword type="function" name="itdb_artwork_remove_thumbnails ()" link="libgpod-Artwork.html#itdb-artwork-remove-thumbnails" since="0.3.0"/>
+    <keyword type="struct" name="Itdb_Thumb" link="libgpod-Artwork.html#Itdb-Thumb" since="0.3.0"/>
+    <keyword type="function" name="itdb_thumb_duplicate ()" link="libgpod-Artwork.html#itdb-thumb-duplicate" since="0.3.0"/>
+    <keyword type="function" name="itdb_thumb_free ()" link="libgpod-Artwork.html#itdb-thumb-free" since="0.3.0"/>
+    <keyword type="function" name="itdb_thumb_to_pixbuf_at_size ()" link="libgpod-Artwork.html#itdb-thumb-to-pixbuf-at-size" since="0.7.0"/>
+    <keyword type="function" name="itdb_thumb_to_pixbufs ()" link="libgpod-Artwork.html#itdb-thumb-to-pixbufs" since="0.7.0"/>
+    <keyword type="" name="" link="libgpod-Artwork.html#id2744505"/>
+    <keyword type="" name="" link="libgpod-Artwork.html#id2744506"/>
+    <keyword type="struct" name="Itdb_Chapter" link="libgpod-Chapter-Data.html#Itdb-Chapter" since="0.7.0"/>
+    <keyword type="struct" name="Itdb_Chapterdata" link="libgpod-Chapter-Data.html#Itdb-Chapterdata" since="0.7.0"/>
+    <keyword type="function" name="itdb_chapter_new ()" link="libgpod-Chapter-Data.html#itdb-chapter-new" since="0.7.0"/>
+    <keyword type="function" name="itdb_chapter_duplicate ()" link="libgpod-Chapter-Data.html#itdb-chapter-duplicate" since="0.7.0"/>
+    <keyword type="function" name="itdb_chapter_free ()" link="libgpod-Chapter-Data.html#itdb-chapter-free" since="0.7.0"/>
+    <keyword type="function" name="itdb_chapterdata_new ()" link="libgpod-Chapter-Data.html#itdb-chapterdata-new" since="0.7.0"/>
+    <keyword type="function" name="itdb_chapterdata_add_chapter ()" link="libgpod-Chapter-Data.html#itdb-chapterdata-add-chapter" since="0.7.0"/>
+    <keyword type="function" name="itdb_chapterdata_duplicate ()" link="libgpod-Chapter-Data.html#itdb-chapterdata-duplicate" since="0.7.0"/>
+    <keyword type="function" name="itdb_chapterdata_remove_chapter ()" link="libgpod-Chapter-Data.html#itdb-chapterdata-remove-chapter" since="0.7.0"/>
+    <keyword type="function" name="itdb_chapterdata_remove_chapters ()" link="libgpod-Chapter-Data.html#itdb-chapterdata-remove-chapters" since="0.7.0"/>
+    <keyword type="function" name="itdb_chapterdata_free ()" link="libgpod-Chapter-Data.html#itdb-chapterdata-free" since="0.7.0"/>
+    <keyword type="" name="" link="libgpod-Chapter-Data.html#id2739387"/>
+    <keyword type="" name="" link="libgpod-Chapter-Data.html#id2739388"/>
+    <keyword type="struct" name="Itdb_Device" link="libgpod-Device.html#Itdb-Device" since="0.4.0"/>
+    <keyword type="function" name="itdb_device_new ()" link="libgpod-Device.html#itdb-device-new" since="0.4.0"/>
+    <keyword type="function" name="itdb_device_free ()" link="libgpod-Device.html#itdb-device-free" since="0.4.0"/>
+    <keyword type="function" name="itdb_device_set_mountpoint ()" link="libgpod-Device.html#itdb-device-set-mountpoint" since="0.4.0"/>
+    <keyword type="function" name="itdb_device_supports_artwork ()" link="libgpod-Device.html#itdb-device-supports-artwork" since="0.5.0"/>
+    <keyword type="function" name="itdb_device_supports_chapter_image ()" link="libgpod-Device.html#itdb-device-supports-chapter-image" since="0.7.2"/>
+    <keyword type="function" name="itdb_device_supports_photo ()" link="libgpod-Device.html#itdb-device-supports-photo" since="0.5.0"/>
+    <keyword type="function" name="itdb_device_supports_podcast ()" link="libgpod-Device.html#itdb-device-supports-podcast" since="0.7.2"/>
+    <keyword type="function" name="itdb_device_supports_video ()" link="libgpod-Device.html#itdb-device-supports-video" since="0.7.0"/>
+    <keyword type="struct" name="Itdb_IpodInfo" link="libgpod-Device.html#Itdb-IpodInfo" since="0.4.0"/>
+    <keyword type="function" name="itdb_device_get_ipod_info ()" link="libgpod-Device.html#itdb-device-get-ipod-info" since="0.4.0"/>
+    <keyword type="function" name="itdb_info_get_ipod_info_table ()" link="libgpod-Device.html#itdb-info-get-ipod-info-table" since="0.4.0"/>
+    <keyword type="enum" name="enum Itdb_IpodGeneration" link="libgpod-Device.html#Itdb-IpodGeneration" since="0.4.0"/>
+    <keyword type="function" name="itdb_info_get_ipod_generation_string ()" link="libgpod-Device.html#itdb-info-get-ipod-generation-string" since="0.4.0"/>
+    <keyword type="enum" name="enum Itdb_IpodModel" link="libgpod-Device.html#Itdb-IpodModel" since="0.4.0"/>
+    <keyword type="function" name="itdb_info_get_ipod_model_name_string ()" link="libgpod-Device.html#itdb-info-get-ipod-model-name-string" since="0.4.0"/>
+    <keyword type="struct" name="Itdb_ArtworkFormat" link="libgpod-Device.html#Itdb-ArtworkFormat"/>
+    <keyword type="function" name="itdb_device_read_sysinfo ()" link="libgpod-Device.html#itdb-device-read-sysinfo" since="0.4.0"/>
+    <keyword type="function" name="itdb_device_get_sysinfo ()" link="libgpod-Device.html#itdb-device-get-sysinfo" since="0.4.0"/>
+    <keyword type="function" name="itdb_device_set_sysinfo ()" link="libgpod-Device.html#itdb-device-set-sysinfo" since="0.4.0"/>
+    <keyword type="function" name="itdb_device_write_sysinfo ()" link="libgpod-Device.html#itdb-device-write-sysinfo" since="0.4.0"/>
+    <keyword type="" name="" link="libgpod-Device.html#id2751894"/>
+    <keyword type="" name="" link="libgpod-Device.html#id2751895"/>
+    <keyword type="struct" name="Itdb_PhotoDB" link="libgpod-Photo-database.html#Itdb-PhotoDB" since="0.4.0"/>
+    <keyword type="function" name="itdb_photodb_create ()" link="libgpod-Photo-database.html#itdb-photodb-create" since="0.4.2"/>
+    <keyword type="function" name="itdb_photodb_free ()" link="libgpod-Photo-database.html#itdb-photodb-free" since="0.4.0"/>
+    <keyword type="function" name="itdb_photodb_parse ()" link="libgpod-Photo-database.html#itdb-photodb-parse" since="0.4.0"/>
+    <keyword type="function" name="itdb_photodb_write ()" link="libgpod-Photo-database.html#itdb-photodb-write" since="0.4.0"/>
+    <keyword type="function" name="itdb_photodb_add_photo ()" link="libgpod-Photo-database.html#itdb-photodb-add-photo" since="0.4.0"/>
+    <keyword type="function" name="itdb_photodb_add_photo_from_data ()" link="libgpod-Photo-database.html#itdb-photodb-add-photo-from-data" since="0.4.0"/>
+    <keyword type="function" name="itdb_photodb_add_photo_from_pixbuf ()" link="libgpod-Photo-database.html#itdb-photodb-add-photo-from-pixbuf" since="0.5.0"/>
+    <keyword type="function" name="itdb_photodb_remove_photo ()" link="libgpod-Photo-database.html#itdb-photodb-remove-photo" since="0.4.0"/>
+    <keyword type="struct" name="Itdb_PhotoAlbum" link="libgpod-Photo-database.html#Itdb-PhotoAlbum" since="0.4.0"/>
+    <keyword type="function" name="itdb_photodb_photoalbum_create ()" link="libgpod-Photo-database.html#itdb-photodb-photoalbum-create" since="0.4.2"/>
+    <keyword type="function" name="itdb_photodb_photoalbum_add_photo ()" link="libgpod-Photo-database.html#itdb-photodb-photoalbum-add-photo" since="0.4.2"/>
+    <keyword type="function" name="itdb_photodb_photoalbum_by_name ()" link="libgpod-Photo-database.html#itdb-photodb-photoalbum-by-name" since="0.4.2"/>
+    <keyword type="function" name="itdb_photodb_photoalbum_remove ()" link="libgpod-Photo-database.html#itdb-photodb-photoalbum-remove" since="0.4.2"/>
+    <keyword type="" name="" link="libgpod-Photo-database.html#id2755279"/>
+    <keyword type="" name="" link="libgpod-Photo-database.html#id2755280"/>
+  </functions>
+</book>

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/photodb.html
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/photodb.html	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/photodb.html	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,43 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Part&#160;II.&#160;Photo database</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="index.html" title="libgpod Reference Manual">
+<link rel="up" href="index.html" title="libgpod Reference Manual">
+<link rel="prev" href="libgpod-Device.html" title="Device">
+<link rel="next" href="libgpod-Photo-database.html" title="Photo database">
+<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+<link rel="part" href="itunesdb.html" title="Part&#160;I.&#160;iPod database">
+<link rel="chapter" href="ch01.html" title="iPod database components">
+<link rel="part" href="photodb.html" title="Part&#160;II.&#160;Photo database">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
+<td><a accesskey="p" href="libgpod-Device.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td>&#160;</td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">libgpod Reference Manual</th>
+<td><a accesskey="n" href="libgpod-Photo-database.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr></table>
+<div class="part" lang="en">
+<div class="titlepage"><div><div><h1 class="title">
+<a name="photodb"></a>Part&#160;II.&#160;Photo database</h1></div></div></div>
+<div class="partintro" lang="en">
+<div></div>
+<p>
+      The Photo database functions are used for adding pictures to
+      the iPod.
+      </p>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl><dt>
+<span class="refentrytitle"><a href="libgpod-Photo-database.html">Photo database</a></span><span class="refpurpose"> &#8212; Functions to create, read, write the photo database</span>
+</dt></dl>
+</div>
+</div>
+</div>
+</body>
+</html>

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/right.png
===================================================================
(Binary files differ)


Property changes on: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/right.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/style.css
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/style.css	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/style.css	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,148 @@
+.synopsis, .classsynopsis
+{
+  background: #eeeeee;
+  border: solid 1px #aaaaaa;
+  padding: 0.5em;
+}
+.programlisting
+{
+  background: #eeeeff;
+  border: solid 1px #aaaaff;
+  padding: 0.5em;
+}
+.variablelist
+{
+  padding: 4px;
+  margin-left: 3em;
+}
+.variablelist td:first-child
+{
+  vertical-align: top;
+}
+
+/* this is needed so that the local anchors are displayed below the naviagtion */
+ at media screen {
+  div.refnamediv a[name], div.refsect1 a[name]
+  {
+    position: relative;
+    top: -4.5em;
+  }
+  table.navigation#top
+  {
+    background: #ffeeee;
+    border: solid 1px #ffaaaa;
+    margin-top: 0;
+    margin-bottom: 0;
+    position: fixed;
+    top: 0;
+    left: 0;
+    height: 2em;
+    z-index: 1;
+  }
+  .navigation a
+  {
+    color: #770000;
+  }
+  .navigation a:visited
+  {
+    color: #550000;
+  }
+  td.shortcuts
+  {
+    color: #770000;
+    font-size: 80%;
+  }
+  div.refentry, div.chapter, div.reference, div.part, div.book, div.index, div.glossary, div.sect1, div.appendix, div.preface
+  {
+    position: relative;
+    top: 3em;
+    z-index: 0;
+  }
+  div.refnamediv
+  {
+    margin-top: 2em;
+  }
+  body
+  {
+    padding-bottom: 20em;
+  }
+}
+ at media print {
+  table.navigation {
+    visibility: collapse;
+    display: none;
+  }
+  div.titlepage table.navigation {
+    visibility: visible;
+    display: table;
+    background: #ffeeee;
+    border: solid 1px #ffaaaa;
+    margin-top: 0;
+    margin-bottom: 0;
+    top: 0;
+    left: 0;
+    height: 2em;
+  }
+}
+
+.navigation .title
+{
+  font-size: 200%;
+}
+
+
+div.gallery-float
+{
+  float: left;
+  padding: 10px;
+}
+div.gallery-float img
+{
+  border-style: none;
+}
+div.gallery-spacer
+{
+  clear: both;
+}
+a
+{
+  text-decoration: none;
+}
+a:hover
+{
+  text-decoration: underline;
+  color: #FF0000;
+}
+
+div.table table
+{
+  border-collapse: collapse;
+  border-spacing: 0px;
+  border-style: solid;
+  border-color: #777777;
+  border-width: 1px;
+}
+
+div.table table td, div.table table th
+{
+  border-style: solid;
+  border-color: #777777;
+  border-width: 1px;
+  padding: 3px;
+  vertical-align: top;
+}
+
+div.table table th
+{
+  background-color: #eeeeee;
+}
+
+hr
+{
+  color: #888;
+  background: #888;
+  border: 0;
+  height: 1px;
+  clear: both;
+}
+

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/up.png
===================================================================
(Binary files differ)


Property changes on: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/html/up.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/libgpod-docs.xml
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/libgpod-docs.xml	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/libgpod-docs.xml	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,106 @@
+<?xml version="1.0"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
+               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
+  <bookinfo>
+    <title>libgpod Reference Manual</title>
+    <releaseinfo>for libgpod <xi:include href="version.xml"/></releaseinfo>
+    <authorgroup>
+      <author>
+	<firstname>Jorg</firstname>
+	<surname>Schuler</surname>
+	<affiliation>
+	  <address>
+	    <email>jorg.schuler at gmx.de</email>
+	  </address>
+	</affiliation>
+      </author>
+      <author>
+	<firstname>Christophe</firstname>
+	<surname>Fergeau</surname>
+	<affiliation>
+	  <address>
+	    <email>teuf at gnome.org</email>
+	  </address>
+	</affiliation>
+      </author>
+    </authorgroup>
+    <copyright>
+      <year>2006-2008</year>
+      <holder>Christophe Fergeau</holder>
+    </copyright>
+
+    <legalnotice>
+      <para>Permission is granted to copy, distribute and/or modify
+      this document under the terms of the <citetitle>GNU Free
+      Documentation License</citetitle>, Version 1.1 or any later
+      version published by the Free Software Foundation with no
+      Invariant Sections, no Front-Cover Texts, and no Back-Cover
+      Texts. You may obtain a copy of the <citetitle>GNU Free
+      Documentation License</citetitle> from the Free Software
+      Foundation by visiting <ulink type="http"
+      url="http://www.fsf.org">their Web site</ulink> or by writing
+      to: Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+      Boston, MA 02111-1307, USA.</para>
+
+      <para>Many of the names used by companies to distinguish their
+      products and services are claimed as trademarks. Where those
+      names appear in any GNOME documentation, and those trademarks
+      are made aware to the members of the GNOME Documentation
+      Project, the names have been printed in caps or initial
+      caps.</para>
+    </legalnotice>
+
+    <abstract>
+      <para>
+      This manual documents the interfaces of the libgpod library and
+      has some short notes to help get you up to speed with using the
+      library.
+      </para>
+      <para>
+      Please see the programs in the <ulink type="http"
+      url="http://gtkpod.svn.sourceforge.net/svnroot/gtkpod/libgpod/trunk/tests/">tests/</ulink>
+      directory of the source distribution for some usage examples.  A more
+      complete example can be found in the source for <ulink type="http"
+      url="http://www.gtkpod.org"> Gtkpod</ulink>.  You can also ask questions
+      on the developer's mailing list: <ulink
+      url="mailto:gtkpod-devel at lists.sourceforge.net">gtkpod-devel at lists.sourceforge.net</ulink>.
+      </para>
+    </abstract>
+  </bookinfo>
+
+  <part id="itunesdb">
+    <title>iPod database</title>
+    <partintro>
+      <para>
+      The iPod database functions are used for adding audio and video
+      to the iPod.
+      </para>
+    </partintro>
+
+    <xi:include href="xml/itunesdb-db.xml"/>
+    <xi:include href="xml/itunesdb-copying.xml"/>
+    <xi:include href="xml/itunesdb-time.xml"/>
+    <xi:include href="xml/itunesdb-lowlevel.xml"/>
+    <chapter>
+      <title>iPod database components</title>
+      <xi:include href="xml/track.xml"/>
+      <xi:include href="xml/playlists.xml"/>
+      <xi:include href="xml/smart-playlists.xml"/>
+      <xi:include href="xml/artwork.xml"/>
+      <xi:include href="xml/chapterdata.xml"/>
+      <xi:include href="xml/device.xml"/>
+    </chapter>
+  </part>
+
+  <part id="photodb">
+    <title>Photo database</title>
+    <partintro>
+      <para>
+      The Photo database functions are used for adding pictures to
+      the iPod.
+      </para>
+    </partintro>
+    <xi:include href="xml/photodb.xml"/>
+  </part>
+</book>

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/libgpod-sections.txt
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/libgpod-sections.txt	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/libgpod-sections.txt	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,381 @@
+<SECTION>
+<FILE>itunesdb-db</FILE>
+<TITLE>The Itdb_iTunesDB structure</TITLE>
+Itdb_iTunesDB
+ItdbFileError
+
+itdb_new
+itdb_free
+itdb_parse
+itdb_write
+itdb_set_mountpoint
+itdb_get_mountpoint
+itdb_init_ipod
+
+itdb_tracks_number
+itdb_tracks_number_nontransferred
+itdb_playlists_number
+
+ItdbUserDataDestroyFunc
+ItdbUserDataDuplicateFunc
+</SECTION>
+
+<SECTION>
+<FILE>itunesdb-copying</FILE>
+<TITLE>File handling functions</TITLE>
+itdb_cp_track_to_ipod
+itdb_filename_fs2ipod
+itdb_filename_ipod2fs
+itdb_filename_on_ipod
+itdb_musicdirs_number
+itdb_rename_files
+</SECTION>
+
+<SECTION>
+<FILE>itunesdb-lowlevel</FILE>
+<TITLE>Low-level functions</TITLE>
+itdb_get_control_dir
+itdb_get_itunes_dir
+itdb_get_music_dir
+itdb_get_artwork_dir
+itdb_get_device_dir
+itdb_get_photos_dir
+itdb_get_itunesdb_path
+itdb_get_itunessd_path
+itdb_get_artworkdb_path
+itdb_get_photodb_path
+itdb_get_photos_thumb_dir
+
+itdb_get_path
+itdb_resolve_path
+
+itdb_cp
+itdb_cp_get_dest_filename
+itdb_cp_finalize
+itdb_parse_file
+itdb_write_file
+itdb_shuffle_write
+itdb_shuffle_write_file
+itdb_duplicate
+</SECTION>
+
+<SECTION>
+<FILE>itunesdb-time</FILE>
+<TITLE>Time handling</TITLE>
+itdb_time_get_mac_time
+itdb_time_mac_to_host
+itdb_time_host_to_mac
+</SECTION>
+
+<SECTION>
+<FILE>track</FILE>
+<TITLE>Tracks</TITLE>
+Itdb_Track
+Itdb_Mediatype
+ITDB_RATING_STEP
+itdb_track_new
+itdb_track_free
+itdb_track_add
+itdb_track_remove
+itdb_track_unlink
+itdb_track_duplicate
+itdb_track_by_id
+itdb_track_id_tree_create
+itdb_track_id_tree_destroy
+itdb_track_id_tree_by_id
+itdb_track_get_thumbnail
+itdb_track_has_thumbnails
+itdb_track_set_thumbnails
+itdb_track_set_thumbnails_from_data
+itdb_track_set_thumbnails_from_pixbuf
+itdb_track_remove_thumbnails
+</SECTION>
+
+
+<SECTION>
+<FILE>playlists</FILE>
+<TITLE>Playlists</TITLE>
+Itdb_Playlist
+ItdbPlaylistSortOrder
+itdb_playlist_new
+itdb_playlist_free
+itdb_playlist_duplicate
+itdb_playlist_add
+itdb_playlist_move
+itdb_playlist_remove
+itdb_playlist_unlink
+
+itdb_playlist_add_track
+itdb_playlist_remove_track
+itdb_playlist_contains_track
+itdb_playlist_contain_track_number
+itdb_playlist_tracks_number
+
+itdb_playlist_mpl
+itdb_playlist_is_mpl
+itdb_playlist_set_mpl
+itdb_playlist_podcasts
+itdb_playlist_is_podcasts
+itdb_playlist_set_podcasts
+itdb_playlist_exists
+itdb_playlist_by_id
+itdb_playlist_by_nr
+itdb_playlist_by_name
+
+itdb_playlist_randomize
+</SECTION>
+
+<SECTION>
+<FILE>smart-playlists</FILE>
+<TITLE>Smart Playlists</TITLE>
+Itdb_SPLPref
+Itdb_SPLRule
+Itdb_SPLRules
+ItdbLimitSort
+ItdbLimitType
+ItdbSPLAction
+ItdbSPLActionLast
+ItdbSPLActionType
+ItdbSPLField
+ItdbSPLFieldType
+ItdbSPLMatch
+ITDB_SPL_DATE_IDENTIFIER
+ITDB_SPL_STRING_MAXLEN
+itdb_splr_get_field_type
+itdb_splr_get_action_type
+itdb_splr_validate
+itdb_splr_remove
+itdb_splr_new
+itdb_splr_add
+itdb_splr_add_new
+itdb_spl_copy_rules
+itdb_splr_eval
+itdb_spl_update
+itdb_spl_update_all
+itdb_spl_update_live
+</SECTION>
+
+<SECTION>
+<FILE>chapterdata</FILE>
+<TITLE>Chapter Data</TITLE>
+Itdb_Chapter
+Itdb_Chapterdata
+itdb_chapter_new
+itdb_chapter_duplicate
+itdb_chapter_free
+itdb_chapterdata_new
+itdb_chapterdata_add_chapter
+itdb_chapterdata_duplicate
+itdb_chapterdata_remove_chapter
+itdb_chapterdata_remove_chapters
+itdb_chapterdata_free
+</SECTION>
+
+<SECTION>
+<FILE>device</FILE>
+<TITLE>Device</TITLE>
+Itdb_Device
+itdb_device_new
+itdb_device_free
+itdb_device_set_mountpoint
+itdb_device_supports_artwork
+itdb_device_supports_chapter_image
+itdb_device_supports_photo
+itdb_device_supports_podcast
+itdb_device_supports_video
+Itdb_IpodInfo
+itdb_device_get_ipod_info
+itdb_info_get_ipod_info_table
+Itdb_IpodGeneration
+itdb_info_get_ipod_generation_string
+Itdb_IpodModel
+itdb_info_get_ipod_model_name_string
+Itdb_ArtworkFormat
+itdb_device_read_sysinfo
+itdb_device_get_sysinfo
+itdb_device_set_sysinfo
+itdb_device_write_sysinfo
+</SECTION>
+
+<SECTION>
+<FILE>artwork</FILE>
+<TITLE>Artwork</TITLE>
+Itdb_Artwork
+itdb_artwork_new
+itdb_artwork_duplicate
+itdb_artwork_free
+itdb_artwork_get_pixbuf
+itdb_artwork_set_thumbnail
+itdb_artwork_set_thumbnail_from_data
+itdb_artwork_set_thumbnail_from_pixbuf
+itdb_artwork_remove_thumbnails
+Itdb_Thumb
+itdb_thumb_duplicate
+itdb_thumb_free
+itdb_thumb_to_pixbuf_at_size
+itdb_thumb_to_pixbufs
+</SECTION>
+
+<SECTION>
+<FILE>photodb</FILE>
+<TITLE>Photo database</TITLE>
+Itdb_PhotoDB
+itdb_photodb_create
+itdb_photodb_free
+itdb_photodb_parse
+itdb_photodb_write
+
+itdb_photodb_add_photo
+itdb_photodb_add_photo_from_data
+itdb_photodb_add_photo_from_pixbuf
+itdb_photodb_remove_photo
+
+Itdb_PhotoAlbum
+itdb_photodb_photoalbum_create
+itdb_photodb_photoalbum_add_photo
+itdb_photodb_photoalbum_by_name
+itdb_photodb_photoalbum_remove
+</SECTION>
+
+<SECTION>
+<FILE>Internal</FILE>
+<SUBSECTION Private>
+DEBUG_ARTWORK
+G_GNUC_INTERNAL
+FContents_
+dump_mhif
+dump_mhia
+dump_mhni
+dump_mhod
+dump_mhod_string
+dump_mhii
+dump_mhl
+dump_mhsd
+dump_mhfd
+dump_mhba
+get16int
+get24int
+get32float
+get32int
+get64int
+MHeader
+MhlHeader
+MhbdHeader
+ArtworkDB_MhsdHeader
+MhltHeader
+MhlpHeader
+MhypHeader
+MhipHeader
+MhitHeader
+ArtworkDB_MhodHeader
+ArtworkDB_MhodHeaderString
+MhfdHeader
+MhliHeader
+MhiiHeader
+MhniHeader
+MhlaHeader
+MhbaHeader
+MhlfHeader
+MhifHeader
+MhiaHeader
+MhitHeader471
+MhodHeaderString
+MhodHeaderSmartPlaylistData
+MhodHeaderSmartPlaylistRuleString
+MhodHeaderSmartPlaylistRuleNonString
+MhodHeaderSmartPlaylistRule
+iTunesDB_MhsdHeader
+MhodHeader
+NO_PLAYCOUNT
+WCONTENTS_STEPSIZE
+DBParseContext
+db_parse_context_get_m_header
+iPodSong
+DB_TO_CPU_GET
+DB_TO_CPU_GET_DB
+ITDB_FILE_ERROR
+itdb_file_error_quark
+ITDB_DEVICE_ERROR
+ItdbDeviceError
+itdb_device_error_quark
+DbType
+Itdb_DB
+ItdbChecksumType
+ItdbThumbDataType
+
+GChecksum
+GChecksumType
+g_checksum_copy
+g_checksum_free
+g_checksum_get_digest
+g_checksum_get_string
+g_checksum_new
+g_checksum_type_get_length
+g_checksum_update
+g_compute_checksum_for_data
+g_compute_checksum_for_string
+
+SysInfoIpodProperties
+itdb_sysinfo_extended_parse
+itdb_sysinfo_properties_free
+
+ALPHA_BITS_555
+ALPHA_BITS_888
+ALPHA_MASK_555
+ALPHA_MASK_888
+ALPHA_SHIFT_555
+ALPHA_SHIFT_888
+BLUE_BITS_555
+BLUE_BITS_565
+BLUE_BITS_888
+BLUE_MASK_555
+BLUE_MASK_565
+BLUE_MASK_888
+BLUE_SHIFT_555
+BLUE_SHIFT_565
+BLUE_SHIFT_888
+GREEN_BITS_555
+GREEN_BITS_565
+GREEN_BITS_888
+GREEN_MASK_555
+GREEN_MASK_565
+GREEN_MASK_888
+GREEN_SHIFT_555
+GREEN_SHIFT_565
+GREEN_SHIFT_888
+RED_BITS_555
+RED_BITS_565
+RED_BITS_888
+RED_MASK_555
+RED_MASK_565
+RED_MASK_888
+RED_SHIFT_555
+RED_SHIFT_565
+RED_SHIFT_888
+
+ITDB_SPLACTION_LAST_HOURS_VALUE
+ITDB_SPLACTION_LAST_MINUTES_VALUE
+ITDB_SPLACTION_LAST_YEARS_VALUE
+ITDB_SPLACTION_LAST_LUNARCYCLE_VALUE
+ITDB_SPLACTION_LAST_SIDEREAL_DAY
+ITDB_SPLACTION_LAST_SWATCH_BEAT
+ITDB_SPLACTION_LAST_MOMENT
+ITDB_SPLACTION_LAST_OSTENT
+ITDB_SPLACTION_LAST_FORTNIGHT
+ITDB_SPLACTION_LAST_VINAL
+ITDB_SPLACTION_LAST_QUARTER
+ITDB_SPLACTION_LAST_SOLAR_YEAR
+ITDB_SPLACTION_LAST_SIDEREAL_YEAR
+
+SHA_BLOCKSIZE
+SHA_BYTE
+SHA_BYTE_ORDER
+SHA_DIGESTSIZE
+SHA_INFO
+SHA_LONG
+SHA_VERSION
+sha_final
+sha_init
+sha_update
+itdb_compute_hash
+</SECTION>

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/Internal.sgml
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/Internal.sgml	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/Internal.sgml	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,19 @@
+<!-- ##### SECTION Title ##### -->
+Internal
+
+<!-- ##### SECTION Short_Description ##### -->
+Symbols to be hidden ;)
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+These functions won't be documented because you won't be using them. ;)
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/artwork.sgml
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/artwork.sgml	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/artwork.sgml	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,173 @@
+<!-- ##### SECTION Title ##### -->
+Artwork
+
+<!-- ##### SECTION Short_Description ##### -->
+Data structure to store iPod artwork (album covers)
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+These functions and structures are for adding, changing, and removing
+album/track artwork.  For working with photos, see the
+<link linkend="photodb">Photo database</link> section.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+<link linkend="photodb">Photo database</link>
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### STRUCT Itdb_Artwork ##### -->
+<para>
+
+</para>
+
+ at thumbnail: 
+ at id: 
+ at dbid: 
+ at unk028: 
+ at rating: 
+ at unk036: 
+ at creation_date: 
+ at digitized_date: 
+ at artwork_size: 
+ at reserved_int1: 
+ at reserved_int2: 
+ at reserved1: 
+ at reserved2: 
+ at usertype: 
+ at userdata: 
+ at userdata_duplicate: 
+ at userdata_destroy: 
+
+<!-- ##### FUNCTION itdb_artwork_new ##### -->
+<para>
+
+</para>
+
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_artwork_duplicate ##### -->
+<para>
+
+</para>
+
+ at artwork: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_artwork_free ##### -->
+<para>
+
+</para>
+
+ at artwork: 
+
+
+<!-- ##### FUNCTION itdb_artwork_get_pixbuf ##### -->
+<para>
+
+</para>
+
+ at device: 
+ at artwork: 
+ at width: 
+ at height: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_artwork_set_thumbnail ##### -->
+<para>
+
+</para>
+
+ at artwork: 
+ at filename: 
+ at rotation: 
+ at error: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_artwork_set_thumbnail_from_data ##### -->
+<para>
+
+</para>
+
+ at artwork: 
+ at image_data: 
+ at image_data_len: 
+ at rotation: 
+ at error: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_artwork_set_thumbnail_from_pixbuf ##### -->
+<para>
+
+</para>
+
+ at artwork: 
+ at pixbuf: 
+ at rotation: 
+ at error: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_artwork_remove_thumbnails ##### -->
+<para>
+
+</para>
+
+ at artwork: 
+
+
+<!-- ##### STRUCT Itdb_Thumb ##### -->
+<para>
+
+</para>
+
+ at data_type: 
+ at rotation: 
+
+<!-- ##### FUNCTION itdb_thumb_duplicate ##### -->
+<para>
+
+</para>
+
+ at thumb: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_thumb_free ##### -->
+<para>
+
+</para>
+
+ at thumb: 
+
+
+<!-- ##### FUNCTION itdb_thumb_to_pixbuf_at_size ##### -->
+<para>
+
+</para>
+
+ at device: 
+ at thumb: 
+ at width: 
+ at height: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_thumb_to_pixbufs ##### -->
+<para>
+
+</para>
+
+ at device: 
+ at thumb: 
+ at Returns: 
+
+

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/chapterdata.sgml
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/chapterdata.sgml	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/chapterdata.sgml	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,124 @@
+<!-- ##### SECTION Title ##### -->
+Chapter Data
+
+<!-- ##### SECTION Short_Description ##### -->
+Data structure to store chapter data for tracks
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+Chapters allow for a large file to be divided into sections.  The start and stop
+points in the track are defined here, as well as the title for each chapter.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### STRUCT Itdb_Chapter ##### -->
+<para>
+
+</para>
+
+ at startpos: 
+ at chaptertitle: 
+ at reserved_int1: 
+ at reserved_int2: 
+ at reserved1: 
+ at reserved2: 
+
+<!-- ##### STRUCT Itdb_Chapterdata ##### -->
+<para>
+
+</para>
+
+ at chapters: 
+ at unk024: 
+ at unk028: 
+ at unk032: 
+ at reserved_int1: 
+ at reserved_int2: 
+ at reserved1: 
+ at reserved2: 
+
+<!-- ##### FUNCTION itdb_chapter_new ##### -->
+<para>
+
+</para>
+
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_chapter_duplicate ##### -->
+<para>
+
+</para>
+
+ at chapter: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_chapter_free ##### -->
+<para>
+
+</para>
+
+ at chapter: 
+
+
+<!-- ##### FUNCTION itdb_chapterdata_new ##### -->
+<para>
+
+</para>
+
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_chapterdata_add_chapter ##### -->
+<para>
+
+</para>
+
+ at chapterdata: 
+ at startpos: 
+ at chaptertitle: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_chapterdata_duplicate ##### -->
+<para>
+
+</para>
+
+ at chapterdata: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_chapterdata_remove_chapter ##### -->
+<para>
+
+</para>
+
+ at chapterdata: 
+ at chapter: 
+
+
+<!-- ##### FUNCTION itdb_chapterdata_remove_chapters ##### -->
+<para>
+
+</para>
+
+ at chapterdata: 
+
+
+<!-- ##### FUNCTION itdb_chapterdata_free ##### -->
+<para>
+
+</para>
+
+ at chapterdata: 
+
+

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/device.sgml
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/device.sgml	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/device.sgml	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,282 @@
+<!-- ##### SECTION Title ##### -->
+Device
+
+<!-- ##### SECTION Short_Description ##### -->
+Data structure holding information about the iPod (model, mount point, etc.)
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+These functions are for reading and setting information about the iPod.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### STRUCT Itdb_Device ##### -->
+<para>
+
+</para>
+
+ at mountpoint: 
+ at musicdirs: 
+ at byte_order: 
+ at sysinfo: 
+ at sysinfo_extended: 
+ at sysinfo_changed: 
+ at timezone_shift: 
+
+<!-- ##### FUNCTION itdb_device_new ##### -->
+<para>
+
+</para>
+
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_device_free ##### -->
+<para>
+
+</para>
+
+ at device: 
+
+
+<!-- ##### FUNCTION itdb_device_set_mountpoint ##### -->
+<para>
+
+</para>
+
+ at device: 
+ at mp: 
+
+
+<!-- ##### FUNCTION itdb_device_supports_artwork ##### -->
+<para>
+
+</para>
+
+ at device: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_device_supports_chapter_image ##### -->
+<para>
+
+</para>
+
+ at device: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_device_supports_photo ##### -->
+<para>
+
+</para>
+
+ at device: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_device_supports_podcast ##### -->
+<para>
+
+</para>
+
+ at device: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_device_supports_video ##### -->
+<para>
+
+</para>
+
+ at device: 
+ at Returns: 
+
+
+<!-- ##### STRUCT Itdb_IpodInfo ##### -->
+<para>
+
+</para>
+
+ at model_number: 
+ at capacity: 
+ at ipod_model: 
+ at ipod_generation: 
+ at musicdirs: 
+ at reserved_int1: 
+ at reserved_int2: 
+ at reserved1: 
+ at reserved2: 
+
+<!-- ##### FUNCTION itdb_device_get_ipod_info ##### -->
+<para>
+
+</para>
+
+ at device: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_info_get_ipod_info_table ##### -->
+<para>
+
+</para>
+
+ at Returns: 
+
+
+<!-- ##### ENUM Itdb_IpodGeneration ##### -->
+<para>
+
+</para>
+
+ at ITDB_IPOD_GENERATION_UNKNOWN: 
+ at ITDB_IPOD_GENERATION_FIRST: 
+ at ITDB_IPOD_GENERATION_SECOND: 
+ at ITDB_IPOD_GENERATION_THIRD: 
+ at ITDB_IPOD_GENERATION_FOURTH: 
+ at ITDB_IPOD_GENERATION_PHOTO: 
+ at ITDB_IPOD_GENERATION_MOBILE: 
+ at ITDB_IPOD_GENERATION_MINI_1: 
+ at ITDB_IPOD_GENERATION_MINI_2: 
+ at ITDB_IPOD_GENERATION_SHUFFLE_1: 
+ at ITDB_IPOD_GENERATION_SHUFFLE_2: 
+ at ITDB_IPOD_GENERATION_SHUFFLE_3: 
+ at ITDB_IPOD_GENERATION_NANO_1: 
+ at ITDB_IPOD_GENERATION_NANO_2: 
+ at ITDB_IPOD_GENERATION_NANO_3: 
+ at ITDB_IPOD_GENERATION_NANO_4: 
+ at ITDB_IPOD_GENERATION_VIDEO_1: 
+ at ITDB_IPOD_GENERATION_VIDEO_2: 
+ at ITDB_IPOD_GENERATION_CLASSIC_1: 
+ at ITDB_IPOD_GENERATION_CLASSIC_2: 
+ at ITDB_IPOD_GENERATION_TOUCH_1: 
+ at ITDB_IPOD_GENERATION_IPHONE_1: 
+
+<!-- ##### FUNCTION itdb_info_get_ipod_generation_string ##### -->
+<para>
+
+</para>
+
+ at generation: 
+ at Returns: 
+
+
+<!-- ##### ENUM Itdb_IpodModel ##### -->
+<para>
+
+</para>
+
+ at ITDB_IPOD_MODEL_INVALID: 
+ at ITDB_IPOD_MODEL_UNKNOWN: 
+ at ITDB_IPOD_MODEL_COLOR: 
+ at ITDB_IPOD_MODEL_COLOR_U2: 
+ at ITDB_IPOD_MODEL_REGULAR: 
+ at ITDB_IPOD_MODEL_REGULAR_U2: 
+ at ITDB_IPOD_MODEL_MINI: 
+ at ITDB_IPOD_MODEL_MINI_BLUE: 
+ at ITDB_IPOD_MODEL_MINI_PINK: 
+ at ITDB_IPOD_MODEL_MINI_GREEN: 
+ at ITDB_IPOD_MODEL_MINI_GOLD: 
+ at ITDB_IPOD_MODEL_SHUFFLE: 
+ at ITDB_IPOD_MODEL_NANO_WHITE: 
+ at ITDB_IPOD_MODEL_NANO_BLACK: 
+ at ITDB_IPOD_MODEL_VIDEO_WHITE: 
+ at ITDB_IPOD_MODEL_VIDEO_BLACK: 
+ at ITDB_IPOD_MODEL_MOBILE_1: 
+ at ITDB_IPOD_MODEL_VIDEO_U2: 
+ at ITDB_IPOD_MODEL_NANO_SILVER: 
+ at ITDB_IPOD_MODEL_NANO_BLUE: 
+ at ITDB_IPOD_MODEL_NANO_GREEN: 
+ at ITDB_IPOD_MODEL_NANO_PINK: 
+ at ITDB_IPOD_MODEL_NANO_RED: 
+ at ITDB_IPOD_MODEL_NANO_YELLOW: 
+ at ITDB_IPOD_MODEL_NANO_PURPLE: 
+ at ITDB_IPOD_MODEL_NANO_ORANGE: 
+ at ITDB_IPOD_MODEL_IPHONE_1: 
+ at ITDB_IPOD_MODEL_SHUFFLE_SILVER: 
+ at ITDB_IPOD_MODEL_SHUFFLE_PINK: 
+ at ITDB_IPOD_MODEL_SHUFFLE_BLUE: 
+ at ITDB_IPOD_MODEL_SHUFFLE_GREEN: 
+ at ITDB_IPOD_MODEL_SHUFFLE_ORANGE: 
+ at ITDB_IPOD_MODEL_SHUFFLE_PURPLE: 
+ at ITDB_IPOD_MODEL_SHUFFLE_RED: 
+ at ITDB_IPOD_MODEL_CLASSIC_SILVER: 
+ at ITDB_IPOD_MODEL_CLASSIC_BLACK: 
+ at ITDB_IPOD_MODEL_TOUCH_BLACK: 
+
+<!-- ##### FUNCTION itdb_info_get_ipod_model_name_string ##### -->
+<para>
+
+</para>
+
+ at model: 
+ at Returns: 
+
+
+<!-- ##### STRUCT Itdb_ArtworkFormat ##### -->
+<para>
+
+</para>
+
+ at format_id: 
+ at width: 
+ at height: 
+ at format: 
+ at padding: 
+ at crop: 
+ at rotation: 
+ at back_color: 
+ at display_width: 
+ at interlaced: 
+ at align_row_bytes: 
+ at color_adjustment: 
+ at gamma: 
+ at associated_format: 
+
+<!-- ##### FUNCTION itdb_device_read_sysinfo ##### -->
+<para>
+
+</para>
+
+ at device: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_device_get_sysinfo ##### -->
+<para>
+
+</para>
+
+ at device: 
+ at field: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_device_set_sysinfo ##### -->
+<para>
+
+</para>
+
+ at device: 
+ at field: 
+ at value: 
+
+
+<!-- ##### FUNCTION itdb_device_write_sysinfo ##### -->
+<para>
+
+</para>
+
+ at device: 
+ at error: 
+ at Returns: 
+
+

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/itunesdb-copying.sgml
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/itunesdb-copying.sgml	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/itunesdb-copying.sgml	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,75 @@
+<!-- ##### SECTION Title ##### -->
+File handling functions
+
+<!-- ##### SECTION Short_Description ##### -->
+Managing files on the iPod
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+These functions are for copying, renaming, and retrieving information
+about the files and directories on the iPod.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### FUNCTION itdb_cp_track_to_ipod ##### -->
+<para>
+
+</para>
+
+ at track: 
+ at filename: 
+ at error: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_filename_fs2ipod ##### -->
+<para>
+
+</para>
+
+ at filename: 
+
+
+<!-- ##### FUNCTION itdb_filename_ipod2fs ##### -->
+<para>
+
+</para>
+
+ at ipod_file: 
+
+
+<!-- ##### FUNCTION itdb_filename_on_ipod ##### -->
+<para>
+
+</para>
+
+ at track: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_musicdirs_number ##### -->
+<para>
+
+</para>
+
+ at itdb: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_rename_files ##### -->
+<para>
+
+</para>
+
+ at mp: 
+ at error: 
+ at Returns: 
+
+

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/itunesdb-db.sgml
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/itunesdb-db.sgml	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/itunesdb-db.sgml	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,232 @@
+<!-- ##### SECTION Title ##### -->
+iPod database reading/writing
+
+<!-- ##### SECTION Short_Description ##### -->
+Functions to read, write, and create an iPod database
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+These functions are for reading, writing, creating, and deleting an iPod
+database and getting the total number of tracks and playlists.
+</para>
+<para>
+Overview of using an iPod database:
+</para>
+<para>
+itdb_parse(): read the iTunesDB and ArtworkDB
+</para>
+<para>
+itdb_write(): write the iTunesDB and ArtworkDB
+</para>
+<para>
+itdb_parse() will return a #Itdb_iTunesDB structure with GLists
+containing all tracks the playlists in the database.  Each track is
+represented by an #Itdb_Track.   Each playlist is represented by an
+#Itdb_Playlist.  See the <link linkend="libgpod-Tracks">Tracks</link>
+and <link linkend="libgpod-Playlists">Playlists</link> sections for
+details on tracks and playlists, respectively.
+</para>
+<para>
+Each #Itdb_Playlist has a GList called @members which contains all of
+the tracks in the playlist.  Tracks referenced in a playlist must also
+be present in the @tracks GList of the #Itdb_iTunesDB.
+</para>
+<para>
+The iPod must contain one master playlist (MPL) containing all tracks
+accessible on the iPod through the Music->Tracks/Albums/Artists/etc.
+menu.  In addition to the MPL there can be a number of normal
+playlists accessible through the Music->Playlists menu on the iPod.
+Tracks that are a member of one of these normal playlists must also be
+a member of the MPL.
+</para>
+<para>
+The Podcasts playlist is just another playlist with some internal
+flags set differently.  Tracks in the Podcasts playlist are not
+normally members of the MPL (so on the iPod they will only show up
+under the Podcasts menu). All tracks referenced must be in the
+ at tracks GList of the #Itdb_iTunesDB, however.
+</para>
+<para>
+Each track may have a thumbnail associated with it. You can retrieve a
+#GdkPixmap of the thumbnail using itdb_artwork_get_pixbuf().  A
+thumbnail can be added with itdb_track_set_thumbnails().  A thumbnail
+can be removed with itdb_track_remove_thumbnails().  Please see the
+<link linkend="libgpod-Artwork">Artwork</link> section for more
+details on artwork related functions and structures.
+</para>
+<note>
+<para>
+Be aware that iTunes additionally stores the artwork as tags
+in the original music file. That's also from where the data is
+read when artwork is displayed in iTunes, and there can be more
+than one piece of artwork. libgpod does not store the artwork as
+tags in the original music file. As a consequence, if iTunes
+attempts to access the artwork, it will find none, and remove
+libgpod's artwork. Luckily, iTunes will only attempt to access
+the artwork if you select a track in iTunes.  To work around
+this, gtkpod keeps a list of the original filename of all
+artwork and silently adds the thumbnails if they were 'lost'.
+Your application might want to do something similar, or you can
+supply patches for (optionally!) adding tags to the original music
+files.
+</para>
+</note>
+<para>
+The #Itdb_iTunesDB, #Itdb_Playlist and #Itdb_Track structures each
+have @userdata and @usertype fields that can be used by the
+application to store additional application-specific data. If
+ at userdata is a pointer to an external structure, you can supply a
+#ItdbUserDataDuplicateFunc and a #ItdbUserDataDestroyFunc so that this
+data can be duplicated or freed automatically with a call to the
+library _duplicate()/_free() functions.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### STRUCT Itdb_iTunesDB ##### -->
+<para>
+
+</para>
+
+ at tracks: 
+ at playlists: 
+ at filename: 
+ at device: 
+ at version: 
+ at id: 
+ at reserved_int1: 
+ at reserved_int2: 
+ at reserved1: 
+ at reserved2: 
+ at usertype: 
+ at userdata: 
+ at userdata_duplicate: 
+ at userdata_destroy: 
+
+<!-- ##### ENUM ItdbFileError ##### -->
+<para>
+
+</para>
+
+ at ITDB_FILE_ERROR_SEEK: 
+ at ITDB_FILE_ERROR_CORRUPT: 
+ at ITDB_FILE_ERROR_NOTFOUND: 
+ at ITDB_FILE_ERROR_RENAME: 
+ at ITDB_FILE_ERROR_ITDB_CORRUPT: 
+
+<!-- ##### FUNCTION itdb_new ##### -->
+<para>
+
+</para>
+
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_free ##### -->
+<para>
+
+</para>
+
+ at itdb: 
+
+
+<!-- ##### FUNCTION itdb_parse ##### -->
+<para>
+
+</para>
+
+ at mp: 
+ at error: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_write ##### -->
+<para>
+
+</para>
+
+ at itdb: 
+ at error: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_set_mountpoint ##### -->
+<para>
+
+</para>
+
+ at itdb: 
+ at mp: 
+
+
+<!-- ##### FUNCTION itdb_get_mountpoint ##### -->
+<para>
+
+</para>
+
+ at itdb: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_init_ipod ##### -->
+<para>
+
+</para>
+
+ at mountpoint: 
+ at model_number: 
+ at ipod_name: 
+ at error: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_tracks_number ##### -->
+<para>
+
+</para>
+
+ at itdb: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_tracks_number_nontransferred ##### -->
+<para>
+
+</para>
+
+ at itdb: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_playlists_number ##### -->
+<para>
+
+</para>
+
+ at itdb: 
+ at Returns: 
+
+
+<!-- ##### USER_FUNCTION ItdbUserDataDestroyFunc ##### -->
+<para>
+
+</para>
+
+ at userdata: 
+
+
+<!-- ##### USER_FUNCTION ItdbUserDataDuplicateFunc ##### -->
+<para>
+
+</para>
+
+ at userdata: 
+ at Returns: 
+
+

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/itunesdb-lowlevel.sgml
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/itunesdb-lowlevel.sgml	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/itunesdb-lowlevel.sgml	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,225 @@
+<!-- ##### SECTION Title ##### -->
+Low-level functions
+
+<!-- ##### SECTION Short_Description ##### -->
+Low-level functions which shouldn't be needed in normal situations
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+These functions are not normally needed but are avalable to allow for finer
+control over the iPod database.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### FUNCTION itdb_get_control_dir ##### -->
+<para>
+
+</para>
+
+ at mountpoint: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_get_itunes_dir ##### -->
+<para>
+
+</para>
+
+ at mountpoint: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_get_music_dir ##### -->
+<para>
+
+</para>
+
+ at mountpoint: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_get_artwork_dir ##### -->
+<para>
+
+</para>
+
+ at mountpoint: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_get_device_dir ##### -->
+<para>
+
+</para>
+
+ at mountpoint: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_get_photos_dir ##### -->
+<para>
+
+</para>
+
+ at mountpoint: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_get_itunesdb_path ##### -->
+<para>
+
+</para>
+
+ at mountpoint: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_get_itunessd_path ##### -->
+<para>
+
+</para>
+
+ at mountpoint: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_get_artworkdb_path ##### -->
+<para>
+
+</para>
+
+ at mountpoint: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_get_photodb_path ##### -->
+<para>
+
+</para>
+
+ at mountpoint: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_get_photos_thumb_dir ##### -->
+<para>
+
+</para>
+
+ at mountpoint: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_get_path ##### -->
+<para>
+
+</para>
+
+ at dir: 
+ at file: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_resolve_path ##### -->
+<para>
+
+</para>
+
+ at root: 
+ at components: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_cp ##### -->
+<para>
+
+</para>
+
+ at from_file: 
+ at to_file: 
+ at error: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_cp_get_dest_filename ##### -->
+<para>
+
+</para>
+
+ at track: 
+ at mountpoint: 
+ at filename: 
+ at error: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_cp_finalize ##### -->
+<para>
+
+</para>
+
+ at track: 
+ at mountpoint: 
+ at dest_filename: 
+ at error: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_parse_file ##### -->
+<para>
+
+</para>
+
+ at filename: 
+ at error: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_write_file ##### -->
+<para>
+
+</para>
+
+ at itdb: 
+ at filename: 
+ at error: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_shuffle_write ##### -->
+<para>
+
+</para>
+
+ at itdb: 
+ at error: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_shuffle_write_file ##### -->
+<para>
+
+</para>
+
+ at itdb: 
+ at filename: 
+ at error: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_duplicate ##### -->
+<para>
+
+</para>
+
+ at itdb: 
+ at Returns: 
+
+

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/itunesdb-time.sgml
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/itunesdb-time.sgml	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/itunesdb-time.sgml	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,52 @@
+<!-- ##### SECTION Title ##### -->
+Time handling
+
+<!-- ##### SECTION Short_Description ##### -->
+[DEPRECATED] Helper functions to convert between Epoch time and Mac
+(iPod) time
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+The functions provide conversion between Epoch time and Mac (iPod)
+time.
+</para>
+<note>
+These functions are now obsolete and should no longer be used, libgpod
+automatically converts to/from Epoch time and iPod time when
+writing/reading the iPod databases.
+</note>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### FUNCTION itdb_time_get_mac_time ##### -->
+<para>
+
+</para>
+
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_time_mac_to_host ##### -->
+<para>
+
+</para>
+
+ at time: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_time_host_to_mac ##### -->
+<para>
+
+</para>
+
+ at time: 
+ at Returns: 
+
+

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/libgpod-unused.sgml
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/libgpod-unused.sgml	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/libgpod-unused.sgml	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,383 @@
+<!-- ##### SECTION ./tmpl/itunesdb.sgml:Long_Description ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SECTION ./tmpl/itunesdb.sgml:See_Also ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SECTION ./tmpl/itunesdb.sgml:Short_Description ##### -->
+Main data structure to manipulate an iPod content (songs, playlists, ...)
+
+
+<!-- ##### SECTION ./tmpl/itunesdb.sgml:Stability_Level ##### -->
+
+
+
+<!-- ##### SECTION ./tmpl/itunesdb.sgml:Title ##### -->
+iTunesDB
+
+
+<!-- ##### MACRO ITDB_FILE_ERROR ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ITDB_SPLACTION_LAST_FORTNIGHT ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ITDB_SPLACTION_LAST_HOURS_VALUE ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ITDB_SPLACTION_LAST_LUNARCYCLE_VALUE ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ITDB_SPLACTION_LAST_MINUTES_VALUE ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ITDB_SPLACTION_LAST_MOMENT ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ITDB_SPLACTION_LAST_OSTENT ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ITDB_SPLACTION_LAST_QUARTER ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ITDB_SPLACTION_LAST_SIDEREAL_DAY ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ITDB_SPLACTION_LAST_SIDEREAL_YEAR ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ITDB_SPLACTION_LAST_SOLAR_YEAR ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ITDB_SPLACTION_LAST_SWATCH_BEAT ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ITDB_SPLACTION_LAST_VINAL ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ITDB_SPLACTION_LAST_YEARS_VALUE ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ITDB_SPLDATE_IDENTIFIER ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO ITDB_SPL_MAXSTRINGLENGTH ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### ENUM Itdb_Generation ##### -->
+<para>
+
+</para>
+
+ at UNKNOWN_GENERATION: 
+ at FIRST_GENERATION: 
+ at SECOND_GENERATION: 
+ at THIRD_GENERATION: 
+ at FOURTH_GENERATION: 
+ at FIFTH_GENERATION: 
+ at MOBILE_GENERATION: 
+
+<!-- ##### ENUM Itdb_ModelType ##### -->
+<para>
+
+</para>
+
+ at MODEL_TYPE_INVALID: 
+ at MODEL_TYPE_UNKNOWN: 
+ at MODEL_TYPE_COLOR: 
+ at MODEL_TYPE_COLOR_U2: 
+ at MODEL_TYPE_REGULAR: 
+ at MODEL_TYPE_REGULAR_U2: 
+ at MODEL_TYPE_MINI: 
+ at MODEL_TYPE_MINI_BLUE: 
+ at MODEL_TYPE_MINI_PINK: 
+ at MODEL_TYPE_MINI_GREEN: 
+ at MODEL_TYPE_MINI_GOLD: 
+ at MODEL_TYPE_SHUFFLE: 
+ at MODEL_TYPE_NANO_WHITE: 
+ at MODEL_TYPE_NANO_BLACK: 
+ at MODEL_TYPE_VIDEO_WHITE: 
+ at MODEL_TYPE_VIDEO_BLACK: 
+ at MODEL_TYPE_MOBILE_1: 
+
+<!-- ##### ENUM SPLAction ##### -->
+<para>
+
+</para>
+
+ at SPLACTION_IS_INT: 
+ at SPLACTION_IS_GREATER_THAN: 
+ at SPLACTION_IS_LESS_THAN: 
+ at SPLACTION_IS_IN_THE_RANGE: 
+ at SPLACTION_IS_IN_THE_LAST: 
+ at SPLACTION_BINARY_AND: 
+ at SPLACTION_IS_STRING: 
+ at SPLACTION_CONTAINS: 
+ at SPLACTION_STARTS_WITH: 
+ at SPLACTION_ENDS_WITH: 
+ at SPLACTION_IS_NOT_INT: 
+ at SPLACTION_IS_NOT_GREATER_THAN: 
+ at SPLACTION_IS_NOT_LESS_THAN: 
+ at SPLACTION_IS_NOT_IN_THE_RANGE: 
+ at SPLACTION_IS_NOT_IN_THE_LAST: 
+ at SPLACTION_IS_NOT: 
+ at SPLACTION_DOES_NOT_CONTAIN: 
+ at SPLACTION_DOES_NOT_START_WITH: 
+ at SPLACTION_DOES_NOT_END_WITH: 
+
+<!-- ##### ENUM SPLActionType ##### -->
+<para>
+
+</para>
+
+ at splat_string: 
+ at splat_int: 
+ at splat_date: 
+ at splat_range_int: 
+ at splat_range_date: 
+ at splat_inthelast: 
+ at splat_playlist: 
+ at splat_none: 
+ at splat_invalid: 
+ at splat_unknown: 
+ at splat_binary_and: 
+
+<!-- ##### MACRO SPLDATE_IDENTIFIER ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### ENUM SPLField ##### -->
+<para>
+
+</para>
+
+ at SPLFIELD_SONG_NAME: 
+ at SPLFIELD_ALBUM: 
+ at SPLFIELD_ARTIST: 
+ at SPLFIELD_BITRATE: 
+ at SPLFIELD_SAMPLE_RATE: 
+ at SPLFIELD_YEAR: 
+ at SPLFIELD_GENRE: 
+ at SPLFIELD_KIND: 
+ at SPLFIELD_DATE_MODIFIED: 
+ at SPLFIELD_TRACKNUMBER: 
+ at SPLFIELD_SIZE: 
+ at SPLFIELD_TIME: 
+ at SPLFIELD_COMMENT: 
+ at SPLFIELD_DATE_ADDED: 
+ at SPLFIELD_COMPOSER: 
+ at SPLFIELD_PLAYCOUNT: 
+ at SPLFIELD_LAST_PLAYED: 
+ at SPLFIELD_DISC_NUMBER: 
+ at SPLFIELD_RATING: 
+ at SPLFIELD_COMPILATION: 
+ at SPLFIELD_BPM: 
+ at SPLFIELD_GROUPING: 
+ at SPLFIELD_PLAYLIST: 
+ at SPLFIELD_VIDEO_KIND: 
+ at SPLFIELD_TVSHOW: 
+ at SPLFIELD_SEASON_NR: 
+ at SPLFIELD_SKIPCOUNT: 
+ at SPLFIELD_LAST_SKIPPED: 
+ at SPLFIELD_ALBUMARTIST: 
+
+<!-- ##### ENUM SPLFieldType ##### -->
+<para>
+
+</para>
+
+ at splft_string: 
+ at splft_int: 
+ at splft_boolean: 
+ at splft_date: 
+ at splft_playlist: 
+ at splft_unknown: 
+ at splft_binary_and: 
+
+<!-- ##### STRUCT SPLPref ##### -->
+<para>
+
+</para>
+
+ at liveupdate: 
+ at checkrules: 
+ at checklimits: 
+ at limittype: 
+ at limitsort: 
+ at limitvalue: 
+ at matchcheckedonly: 
+
+<!-- ##### STRUCT SPLRule ##### -->
+<para>
+
+</para>
+
+ at field: 
+ at action: 
+ at string: 
+ at fromvalue: 
+ at fromdate: 
+ at fromunits: 
+ at tovalue: 
+ at todate: 
+ at tounits: 
+ at unk052: 
+ at unk056: 
+ at unk060: 
+ at unk064: 
+ at unk068: 
+
+<!-- ##### STRUCT SPLRules ##### -->
+<para>
+
+</para>
+
+ at unk004: 
+ at match_operator: 
+ at rules: 
+
+<!-- ##### MACRO SPL_MAXSTRINGLENGTH ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO SPL_STRING_MAXLEN ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION itdb_artwork_add_thumbnail ##### -->
+<para>
+
+</para>
+
+ at artwork: 
+ at type: 
+ at filename: 
+ at rotation: 
+ at error: 
+ at Returns: 
+
+<!-- ##### FUNCTION itdb_artwork_add_thumbnail_from_data ##### -->
+<para>
+
+</para>
+
+ at artwork: 
+ at type: 
+ at image_data: 
+ at image_data_len: 
+ at rotation: 
+ at error: 
+ at Returns: 
+
+<!-- ##### FUNCTION itdb_artwork_add_thumbnail_from_pixbuf ##### -->
+<para>
+
+</para>
+
+ at artwork: 
+ at type: 
+ at pixbuf: 
+ at rotation: 
+ at error: 
+ at Returns: 
+
+<!-- ##### FUNCTION itdb_artwork_get_thumb_by_type ##### -->
+<para>
+
+</para>
+
+ at artwork: 
+ at type: 
+ at Returns: 
+
+<!-- ##### FUNCTION itdb_artwork_remove_thumbnail ##### -->
+<para>
+
+</para>
+
+ at artwork: 
+ at thumb: 
+
+<!-- ##### FUNCTION itdb_file_error_quark ##### -->
+<para>
+
+</para>
+
+ at Returns: 
+
+<!-- ##### FUNCTION itdb_thumb_get_filename ##### -->
+<para>
+
+</para>
+
+ at device: 
+ at thumb: 
+ at Returns: 
+
+<!-- ##### FUNCTION itdb_thumb_new ##### -->
+<para>
+
+</para>
+
+ at Returns: 
+

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/photodb.sgml
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/photodb.sgml	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/photodb.sgml	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,271 @@
+<!-- ##### SECTION Title ##### -->
+Photo database
+
+<!-- ##### SECTION Short_Description ##### -->
+Functions to create, read, write the photo database
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+These functions are for creating, reading, and writing the photo
+database.
+</para>
+<para>
+Overview of using the Photo database:
+</para>
+<para>
+itdb_photodb_parse():
+Read an existing PhotoDB.
+</para>
+<para>
+itdb_photodb_create():
+Create a new #Itdb_PhotoDB structure. The Photo Library Album is
+(first album) is created automatically.
+</para>
+<para>
+itdb_photodb_add_photo(), itdb_photodb_add_photo_from_data():
+Add a photo to the PhotoDB (from file or from a chunk of
+memory). It is automatically added to the Photo Library Album
+(first album), which is created if it does not exist already.
+</para>
+<para>
+itdb_photodb_photoalbum_create():
+Create and add a new photoalbum.
+</para>
+<para>
+itdb_photodb_photoalbum_add_photo():
+Add a photo (#Itdb_Artwork) to an existing photoalbum.
+</para>
+<para>
+itdb_photodb_photoalbum_remove():
+Remove an existing photoalbum. Pictures can be kept in the
+Photo Library or automatically removed as well.
+</para>
+<para>
+itdb_photodb_remove_photo():
+Remove a photo either from a photoalbum or completely from the database.
+</para>
+<para>
+itdb_photodb_write():
+Write out your PhotoDB.
+</para>
+<para>
+itdb_photodb_free():
+Free all memory taken by the PhotoDB.
+</para>
+<para>
+itdb_photodb_photoalbum_by_name():
+Find the first photoalbum with a given name or the Photo
+Library Album if called with no name.
+</para>
+<para>
+If you cannot add photos because your iPod is not recognized,
+you may have to set the iPod model by calling
+itdb_device_set_sysinfo(), e.g. for an 80 GB 6th generation
+iPod Video, you would use:
+</para>
+<programlisting>
+itdb_device_set_sysinfo (db->device, "ModelNumStr", "MA450");
+</programlisting>
+<para>
+See <ulink type="http"
+url="http://gtkpod.svn.sourceforge.net/svnroot/gtkpod/libgpod/trunk/src/itdb_device.c">itdb_device.c</ulink>
+for a list of supported models.
+</para>
+<para>
+The model number will be saved on the iPod when the PhotoDB is
+written (itdb_photodb_write() calls itdb_device_write_sysinfo()).
+</para>
+<para>
+Have a look at the <ulink type="http"
+url="http://gtkpod.svn.sourceforge.net/svnroot/gtkpod/libgpod/trunk/tests/test-photos.c">test-photos</ulink>
+test program in the <ulink type="http"
+url="http://gtkpod.svn.sourceforge.net/svnroot/gtkpod/libgpod/trunk/tests/">tests/</ulink>
+directory of the libgpod source for an example of how to use the interface.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### STRUCT Itdb_PhotoDB ##### -->
+<para>
+
+</para>
+
+ at photos: 
+ at photoalbums: 
+ at device: 
+ at reserved_int1: 
+ at reserved_int2: 
+ at reserved1: 
+ at reserved2: 
+ at usertype: 
+ at userdata: 
+ at userdata_duplicate: 
+ at userdata_destroy: 
+
+<!-- ##### FUNCTION itdb_photodb_create ##### -->
+<para>
+
+</para>
+
+ at mountpoint: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_photodb_free ##### -->
+<para>
+
+</para>
+
+ at photodb: 
+
+
+<!-- ##### FUNCTION itdb_photodb_parse ##### -->
+<para>
+
+</para>
+
+ at mp: 
+ at error: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_photodb_write ##### -->
+<para>
+
+</para>
+
+ at photodb: 
+ at error: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_photodb_add_photo ##### -->
+<para>
+
+</para>
+
+ at db: 
+ at filename: 
+ at position: 
+ at rotation: 
+ at error: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_photodb_add_photo_from_data ##### -->
+<para>
+
+</para>
+
+ at db: 
+ at image_data: 
+ at image_data_len: 
+ at position: 
+ at rotation: 
+ at error: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_photodb_add_photo_from_pixbuf ##### -->
+<para>
+
+</para>
+
+ at db: 
+ at pixbuf: 
+ at position: 
+ at rotation: 
+ at error: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_photodb_remove_photo ##### -->
+<para>
+
+</para>
+
+ at db: 
+ at album: 
+ at photo: 
+
+
+<!-- ##### STRUCT Itdb_PhotoAlbum ##### -->
+<para>
+
+</para>
+
+ at photodb: 
+ at name: 
+ at members: 
+ at album_type: 
+ at playmusic: 
+ at repeat: 
+ at random: 
+ at show_titles: 
+ at transition_direction: 
+ at slide_duration: 
+ at transition_duration: 
+ at song_id: 
+ at unk024: 
+ at unk028: 
+ at unk044: 
+ at unk048: 
+ at album_id: 
+ at prev_album_id: 
+ at reserved_int1: 
+ at reserved_int2: 
+ at reserved1: 
+ at reserved2: 
+ at usertype: 
+ at userdata: 
+ at userdata_duplicate: 
+ at userdata_destroy: 
+
+<!-- ##### FUNCTION itdb_photodb_photoalbum_create ##### -->
+<para>
+
+</para>
+
+ at db: 
+ at albumname: 
+ at pos: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_photodb_photoalbum_add_photo ##### -->
+<para>
+
+</para>
+
+ at db: 
+ at album: 
+ at photo: 
+ at position: 
+
+
+<!-- ##### FUNCTION itdb_photodb_photoalbum_by_name ##### -->
+<para>
+
+</para>
+
+ at db: 
+ at albumname: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_photodb_photoalbum_remove ##### -->
+<para>
+
+</para>
+
+ at db: 
+ at album: 
+ at remove_pics: 
+
+

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/playlists.sgml
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/playlists.sgml	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/playlists.sgml	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,293 @@
+<!-- ##### SECTION Title ##### -->
+Playlists
+
+<!-- ##### SECTION Short_Description ##### -->
+Data structure to represent an iPod playlist
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+These functions and structures allow for adding and removing playlists,
+adding and removing tracks from playlists, sorting playlists, finding tracks in
+a playlist, etc.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### STRUCT Itdb_Playlist ##### -->
+<para>
+
+</para>
+
+ at itdb: 
+ at name: 
+ at type: 
+ at flag1: 
+ at flag2: 
+ at flag3: 
+ at num: 
+ at members: 
+ at is_spl: 
+ at timestamp: 
+ at id: 
+ at sortorder: 
+ at podcastflag: 
+ at splpref: 
+ at splrules: 
+ at reserved100: 
+ at reserved101: 
+ at reserved_int1: 
+ at reserved_int2: 
+ at reserved1: 
+ at reserved2: 
+ at usertype: 
+ at userdata: 
+ at userdata_duplicate: 
+ at userdata_destroy: 
+
+<!-- ##### ENUM ItdbPlaylistSortOrder ##### -->
+<para>
+
+</para>
+
+ at ITDB_PSO_MANUAL: 
+ at ITDB_PSO_TITLE: 
+ at ITDB_PSO_ALBUM: 
+ at ITDB_PSO_ARTIST: 
+ at ITDB_PSO_BIRATE: 
+ at ITDB_PSO_GENRE: 
+ at ITDB_PSO_FILETYPE: 
+ at ITDB_PSO_TIME_MODIFIED: 
+ at ITDB_PSO_TRACK_NR: 
+ at ITDB_PSO_SIZE: 
+ at ITDB_PSO_TIME: 
+ at ITDB_PSO_YEAR: 
+ at ITDB_PSO_SAMPLERATE: 
+ at ITDB_PSO_COMMENT: 
+ at ITDB_PSO_TIME_ADDED: 
+ at ITDB_PSO_EQUALIZER: 
+ at ITDB_PSO_COMPOSER: 
+ at ITDB_PSO_PLAYCOUNT: 
+ at ITDB_PSO_TIME_PLAYED: 
+ at ITDB_PSO_CD_NR: 
+ at ITDB_PSO_RATING: 
+ at ITDB_PSO_RELEASE_DATE: 
+ at ITDB_PSO_BPM: 
+ at ITDB_PSO_GROUPING: 
+ at ITDB_PSO_CATEGORY: 
+ at ITDB_PSO_DESCRIPTION: 
+
+<!-- ##### FUNCTION itdb_playlist_new ##### -->
+<para>
+
+</para>
+
+ at title: 
+ at spl: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_playlist_free ##### -->
+<para>
+
+</para>
+
+ at pl: 
+
+
+<!-- ##### FUNCTION itdb_playlist_duplicate ##### -->
+<para>
+
+</para>
+
+ at pl: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_playlist_add ##### -->
+<para>
+
+</para>
+
+ at itdb: 
+ at pl: 
+ at pos: 
+
+
+<!-- ##### FUNCTION itdb_playlist_move ##### -->
+<para>
+
+</para>
+
+ at pl: 
+ at pos: 
+
+
+<!-- ##### FUNCTION itdb_playlist_remove ##### -->
+<para>
+
+</para>
+
+ at pl: 
+
+
+<!-- ##### FUNCTION itdb_playlist_unlink ##### -->
+<para>
+
+</para>
+
+ at pl: 
+
+
+<!-- ##### FUNCTION itdb_playlist_add_track ##### -->
+<para>
+
+</para>
+
+ at pl: 
+ at track: 
+ at pos: 
+
+
+<!-- ##### FUNCTION itdb_playlist_remove_track ##### -->
+<para>
+
+</para>
+
+ at pl: 
+ at track: 
+
+
+<!-- ##### FUNCTION itdb_playlist_contains_track ##### -->
+<para>
+
+</para>
+
+ at pl: 
+ at track: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_playlist_contain_track_number ##### -->
+<para>
+
+</para>
+
+ at tr: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_playlist_tracks_number ##### -->
+<para>
+
+</para>
+
+ at pl: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_playlist_mpl ##### -->
+<para>
+
+</para>
+
+ at itdb: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_playlist_is_mpl ##### -->
+<para>
+
+</para>
+
+ at pl: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_playlist_set_mpl ##### -->
+<para>
+
+</para>
+
+ at pl: 
+
+
+<!-- ##### FUNCTION itdb_playlist_podcasts ##### -->
+<para>
+
+</para>
+
+ at itdb: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_playlist_is_podcasts ##### -->
+<para>
+
+</para>
+
+ at pl: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_playlist_set_podcasts ##### -->
+<para>
+
+</para>
+
+ at pl: 
+
+
+<!-- ##### FUNCTION itdb_playlist_exists ##### -->
+<para>
+
+</para>
+
+ at itdb: 
+ at pl: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_playlist_by_id ##### -->
+<para>
+
+</para>
+
+ at itdb: 
+ at id: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_playlist_by_nr ##### -->
+<para>
+
+</para>
+
+ at itdb: 
+ at num: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_playlist_by_name ##### -->
+<para>
+
+</para>
+
+ at itdb: 
+ at name: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_playlist_randomize ##### -->
+<para>
+
+</para>
+
+ at pl: 
+
+

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/smart-playlists.sgml
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/smart-playlists.sgml	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/smart-playlists.sgml	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,330 @@
+<!-- ##### SECTION Title ##### -->
+Smart Playlists
+
+<!-- ##### SECTION Short_Description ##### -->
+Data structure to represent an iPod smart playlist
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+These functions and structures are for dealing with smart playlists.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+<link linkend="libgpod-Playlists">Playlists</link>
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### STRUCT Itdb_SPLPref ##### -->
+<para>
+
+</para>
+
+ at liveupdate: 
+ at checkrules: 
+ at checklimits: 
+ at limittype: 
+ at limitsort: 
+ at limitvalue: 
+ at matchcheckedonly: 
+ at reserved_int1: 
+ at reserved_int2: 
+ at reserved1: 
+ at reserved2: 
+
+<!-- ##### STRUCT Itdb_SPLRule ##### -->
+<para>
+
+</para>
+
+ at field: 
+ at action: 
+ at string: 
+ at fromvalue: 
+ at fromdate: 
+ at fromunits: 
+ at tovalue: 
+ at todate: 
+ at tounits: 
+ at unk052: 
+ at unk056: 
+ at unk060: 
+ at unk064: 
+ at unk068: 
+ at reserved_int1: 
+ at reserved_int2: 
+ at reserved1: 
+ at reserved2: 
+
+<!-- ##### STRUCT Itdb_SPLRules ##### -->
+<para>
+
+</para>
+
+ at unk004: 
+ at match_operator: 
+ at rules: 
+ at reserved_int1: 
+ at reserved_int2: 
+ at reserved1: 
+ at reserved2: 
+
+<!-- ##### ENUM ItdbLimitSort ##### -->
+<para>
+
+</para>
+
+ at ITDB_LIMITSORT_RANDOM: 
+ at ITDB_LIMITSORT_SONG_NAME: 
+ at ITDB_LIMITSORT_ALBUM: 
+ at ITDB_LIMITSORT_ARTIST: 
+ at ITDB_LIMITSORT_GENRE: 
+ at ITDB_LIMITSORT_MOST_RECENTLY_ADDED: 
+ at ITDB_LIMITSORT_LEAST_RECENTLY_ADDED: 
+ at ITDB_LIMITSORT_MOST_OFTEN_PLAYED: 
+ at ITDB_LIMITSORT_LEAST_OFTEN_PLAYED: 
+ at ITDB_LIMITSORT_MOST_RECENTLY_PLAYED: 
+ at ITDB_LIMITSORT_LEAST_RECENTLY_PLAYED: 
+ at ITDB_LIMITSORT_HIGHEST_RATING: 
+ at ITDB_LIMITSORT_LOWEST_RATING: 
+
+<!-- ##### ENUM ItdbLimitType ##### -->
+<para>
+
+</para>
+
+ at ITDB_LIMITTYPE_MINUTES: 
+ at ITDB_LIMITTYPE_MB: 
+ at ITDB_LIMITTYPE_SONGS: 
+ at ITDB_LIMITTYPE_HOURS: 
+ at ITDB_LIMITTYPE_GB: 
+
+<!-- ##### ENUM ItdbSPLAction ##### -->
+<para>
+
+</para>
+
+ at ITDB_SPLACTION_IS_INT: 
+ at ITDB_SPLACTION_IS_GREATER_THAN: 
+ at ITDB_SPLACTION_IS_LESS_THAN: 
+ at ITDB_SPLACTION_IS_IN_THE_RANGE: 
+ at ITDB_SPLACTION_IS_IN_THE_LAST: 
+ at ITDB_SPLACTION_BINARY_AND: 
+ at ITDB_SPLACTION_IS_STRING: 
+ at ITDB_SPLACTION_CONTAINS: 
+ at ITDB_SPLACTION_STARTS_WITH: 
+ at ITDB_SPLACTION_ENDS_WITH: 
+ at ITDB_SPLACTION_IS_NOT_INT: 
+ at ITDB_SPLACTION_IS_NOT_GREATER_THAN: 
+ at ITDB_SPLACTION_IS_NOT_LESS_THAN: 
+ at ITDB_SPLACTION_IS_NOT_IN_THE_RANGE: 
+ at ITDB_SPLACTION_IS_NOT_IN_THE_LAST: 
+ at ITDB_SPLACTION_IS_NOT: 
+ at ITDB_SPLACTION_DOES_NOT_CONTAIN: 
+ at ITDB_SPLACTION_DOES_NOT_START_WITH: 
+ at ITDB_SPLACTION_DOES_NOT_END_WITH: 
+
+<!-- ##### ENUM ItdbSPLActionLast ##### -->
+<para>
+
+</para>
+
+ at ITDB_SPLACTION_LAST_DAYS_VALUE: 
+ at ITDB_SPLACTION_LAST_WEEKS_VALUE: 
+ at ITDB_SPLACTION_LAST_MONTHS_VALUE: 
+
+<!-- ##### ENUM ItdbSPLActionType ##### -->
+<para>
+
+</para>
+
+ at ITDB_SPLAT_STRING: 
+ at ITDB_SPLAT_INT: 
+ at ITDB_SPLAT_DATE: 
+ at ITDB_SPLAT_RANGE_INT: 
+ at ITDB_SPLAT_RANGE_DATE: 
+ at ITDB_SPLAT_INTHELAST: 
+ at ITDB_SPLAT_PLAYLIST: 
+ at ITDB_SPLAT_NONE: 
+ at ITDB_SPLAT_INVALID: 
+ at ITDB_SPLAT_UNKNOWN: 
+ at ITDB_SPLAT_BINARY_AND: 
+
+<!-- ##### ENUM ItdbSPLField ##### -->
+<para>
+
+</para>
+
+ at ITDB_SPLFIELD_SONG_NAME: 
+ at ITDB_SPLFIELD_ALBUM: 
+ at ITDB_SPLFIELD_ARTIST: 
+ at ITDB_SPLFIELD_BITRATE: 
+ at ITDB_SPLFIELD_SAMPLE_RATE: 
+ at ITDB_SPLFIELD_YEAR: 
+ at ITDB_SPLFIELD_GENRE: 
+ at ITDB_SPLFIELD_KIND: 
+ at ITDB_SPLFIELD_DATE_MODIFIED: 
+ at ITDB_SPLFIELD_TRACKNUMBER: 
+ at ITDB_SPLFIELD_SIZE: 
+ at ITDB_SPLFIELD_TIME: 
+ at ITDB_SPLFIELD_COMMENT: 
+ at ITDB_SPLFIELD_DATE_ADDED: 
+ at ITDB_SPLFIELD_COMPOSER: 
+ at ITDB_SPLFIELD_PLAYCOUNT: 
+ at ITDB_SPLFIELD_LAST_PLAYED: 
+ at ITDB_SPLFIELD_DISC_NUMBER: 
+ at ITDB_SPLFIELD_RATING: 
+ at ITDB_SPLFIELD_COMPILATION: 
+ at ITDB_SPLFIELD_BPM: 
+ at ITDB_SPLFIELD_GROUPING: 
+ at ITDB_SPLFIELD_PLAYLIST: 
+ at ITDB_SPLFIELD_VIDEO_KIND: 
+ at ITDB_SPLFIELD_TVSHOW: 
+ at ITDB_SPLFIELD_SEASON_NR: 
+ at ITDB_SPLFIELD_SKIPCOUNT: 
+ at ITDB_SPLFIELD_LAST_SKIPPED: 
+ at ITDB_SPLFIELD_ALBUMARTIST: 
+
+<!-- ##### ENUM ItdbSPLFieldType ##### -->
+<para>
+
+</para>
+
+ at ITDB_SPLFT_STRING: 
+ at ITDB_SPLFT_INT: 
+ at ITDB_SPLFT_BOOLEAN: 
+ at ITDB_SPLFT_DATE: 
+ at ITDB_SPLFT_PLAYLIST: 
+ at ITDB_SPLFT_UNKNOWN: 
+ at ITDB_SPLFT_BINARY_AND: 
+
+<!-- ##### ENUM ItdbSPLMatch ##### -->
+<para>
+
+</para>
+
+ at ITDB_SPLMATCH_AND: 
+ at ITDB_SPLMATCH_OR: 
+
+<!-- ##### MACRO ITDB_SPL_DATE_IDENTIFIER ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ITDB_SPL_STRING_MAXLEN ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION itdb_splr_get_field_type ##### -->
+<para>
+
+</para>
+
+ at splr: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_splr_get_action_type ##### -->
+<para>
+
+</para>
+
+ at splr: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_splr_validate ##### -->
+<para>
+
+</para>
+
+ at splr: 
+
+
+<!-- ##### FUNCTION itdb_splr_remove ##### -->
+<para>
+
+</para>
+
+ at pl: 
+ at splr: 
+
+
+<!-- ##### FUNCTION itdb_splr_new ##### -->
+<para>
+
+</para>
+
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_splr_add ##### -->
+<para>
+
+</para>
+
+ at pl: 
+ at splr: 
+ at pos: 
+
+
+<!-- ##### FUNCTION itdb_splr_add_new ##### -->
+<para>
+
+</para>
+
+ at pl: 
+ at pos: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_spl_copy_rules ##### -->
+<para>
+
+</para>
+
+ at dest: 
+ at src: 
+
+
+<!-- ##### FUNCTION itdb_splr_eval ##### -->
+<para>
+
+</para>
+
+ at splr: 
+ at track: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_spl_update ##### -->
+<para>
+
+</para>
+
+ at spl: 
+
+
+<!-- ##### FUNCTION itdb_spl_update_all ##### -->
+<para>
+
+</para>
+
+ at itdb: 
+
+
+<!-- ##### FUNCTION itdb_spl_update_live ##### -->
+<para>
+
+</para>
+
+ at itdb: 
+
+

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/track.sgml
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/track.sgml	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/tmpl/track.sgml	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,314 @@
+<!-- ##### SECTION Title ##### -->
+Tracks
+
+<!-- ##### SECTION Short_Description ##### -->
+Data structure to store metadata about an iPod track
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+These functions and structures are for storing and retrieving
+information about an iPod track.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### STRUCT Itdb_Track ##### -->
+<para>
+
+</para>
+
+ at itdb: 
+ at title: 
+ at ipod_path: 
+ at album: 
+ at artist: 
+ at genre: 
+ at filetype: 
+ at comment: 
+ at category: 
+ at composer: 
+ at grouping: 
+ at description: 
+ at podcasturl: 
+ at podcastrss: 
+ at chapterdata: 
+ at subtitle: 
+ at tvshow: 
+ at tvepisode: 
+ at tvnetwork: 
+ at albumartist: 
+ at keywords: 
+ at sort_artist: 
+ at sort_title: 
+ at sort_album: 
+ at sort_albumartist: 
+ at sort_composer: 
+ at sort_tvshow: 
+ at id: 
+ at size: 
+ at tracklen: 
+ at cd_nr: 
+ at cds: 
+ at track_nr: 
+ at tracks: 
+ at bitrate: 
+ at samplerate: 
+ at samplerate_low: 
+ at year: 
+ at volume: 
+ at soundcheck: 
+ at time_added: 
+ at time_modified: 
+ at time_played: 
+ at bookmark_time: 
+ at rating: 
+ at playcount: 
+ at playcount2: 
+ at recent_playcount: 
+ at transferred: 
+ at BPM: 
+ at app_rating: 
+ at type1: 
+ at type2: 
+ at compilation: 
+ at starttime: 
+ at stoptime: 
+ at checked: 
+ at dbid: 
+ at drm_userid: 
+ at visible: 
+ at filetype_marker: 
+ at artwork_count: 
+ at artwork_size: 
+ at samplerate2: 
+ at unk126: 
+ at unk132: 
+ at time_released: 
+ at unk144: 
+ at explicit_flag: 
+ at unk148: 
+ at unk152: 
+ at skipcount: 
+ at recent_skipcount: 
+ at last_skipped: 
+ at has_artwork: 
+ at skip_when_shuffling: 
+ at remember_playback_position: 
+ at flag4: 
+ at dbid2: 
+ at lyrics_flag: 
+ at movie_flag: 
+ at mark_unplayed: 
+ at unk179: 
+ at unk180: 
+ at pregap: 
+ at samplecount: 
+ at unk196: 
+ at postgap: 
+ at unk204: 
+ at mediatype: 
+ at season_nr: 
+ at episode_nr: 
+ at unk220: 
+ at unk224: 
+ at unk228: 
+ at unk232: 
+ at unk236: 
+ at unk240: 
+ at unk244: 
+ at gapless_data: 
+ at unk252: 
+ at gapless_track_flag: 
+ at gapless_album_flag: 
+ at album_id: 
+ at artwork: 
+ at mhii_link: 
+ at reserved_int1: 
+ at reserved_int2: 
+ at reserved_int3: 
+ at reserved_int4: 
+ at reserved_int5: 
+ at reserved_int6: 
+ at reserved1: 
+ at reserved2: 
+ at reserved3: 
+ at reserved4: 
+ at reserved5: 
+ at reserved6: 
+ at usertype: 
+ at userdata: 
+ at userdata_duplicate: 
+ at userdata_destroy: 
+
+<!-- ##### ENUM Itdb_Mediatype ##### -->
+<para>
+
+</para>
+
+ at ITDB_MEDIATYPE_AUDIO: 
+ at ITDB_MEDIATYPE_MOVIE: 
+ at ITDB_MEDIATYPE_PODCAST: 
+ at ITDB_MEDIATYPE_AUDIOBOOK: 
+ at ITDB_MEDIATYPE_MUSICVIDEO: 
+ at ITDB_MEDIATYPE_TVSHOW: 
+
+<!-- ##### MACRO ITDB_RATING_STEP ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION itdb_track_new ##### -->
+<para>
+
+</para>
+
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_track_free ##### -->
+<para>
+
+</para>
+
+ at track: 
+
+
+<!-- ##### FUNCTION itdb_track_add ##### -->
+<para>
+
+</para>
+
+ at itdb: 
+ at track: 
+ at pos: 
+
+
+<!-- ##### FUNCTION itdb_track_remove ##### -->
+<para>
+
+</para>
+
+ at track: 
+
+
+<!-- ##### FUNCTION itdb_track_unlink ##### -->
+<para>
+
+</para>
+
+ at track: 
+
+
+<!-- ##### FUNCTION itdb_track_duplicate ##### -->
+<para>
+
+</para>
+
+ at tr: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_track_by_id ##### -->
+<para>
+
+</para>
+
+ at itdb: 
+ at id: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_track_id_tree_create ##### -->
+<para>
+
+</para>
+
+ at itdb: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_track_id_tree_destroy ##### -->
+<para>
+
+</para>
+
+ at idtree: 
+
+
+<!-- ##### FUNCTION itdb_track_id_tree_by_id ##### -->
+<para>
+
+</para>
+
+ at idtree: 
+ at id: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_track_get_thumbnail ##### -->
+<para>
+
+</para>
+
+ at track: 
+ at width: 
+ at height: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_track_has_thumbnails ##### -->
+<para>
+
+</para>
+
+ at track: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_track_set_thumbnails ##### -->
+<para>
+
+</para>
+
+ at track: 
+ at filename: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_track_set_thumbnails_from_data ##### -->
+<para>
+
+</para>
+
+ at track: 
+ at image_data: 
+ at image_data_len: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_track_set_thumbnails_from_pixbuf ##### -->
+<para>
+
+</para>
+
+ at track: 
+ at pixbuf: 
+ at Returns: 
+
+
+<!-- ##### FUNCTION itdb_track_remove_thumbnails ##### -->
+<para>
+
+</para>
+
+ at track: 
+
+

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/version.xml.in
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/version.xml.in	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/version.xml.in	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,4 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<phrase>@LIBGPOD_VERSION@</phrase>

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/Internal.xml
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/Internal.xml	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/Internal.xml	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
+               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<refentry id="libgpod-Internal">
+<refmeta>
+<refentrytitle role="top_of_page">Internal</refentrytitle>
+<manvolnum>3</manvolnum>
+<refmiscinfo>LIBGPOD Library</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+<refname>Internal</refname>
+<refpurpose>Symbols to be hidden ;)</refpurpose>
+<!--[<xref linkend="desc" endterm="desc.title"/>]-->
+</refnamediv>
+
+<refsynopsisdiv role="synopsis">
+<title role="synopsis.title">Synopsis</title>
+
+<synopsis>
+
+
+
+
+</synopsis>
+</refsynopsisdiv>
+
+
+
+
+
+
+
+
+
+<refsect1 role="desc">
+<title role="desc.title">Description</title>
+<para>
+These functions won't be documented because you won't be using them. ;)
+</para>
+</refsect1>
+
+<refsect1 role="details">
+<title role="details.title">Details</title>
+
+</refsect1>
+
+
+
+
+
+<refsect1><refsect2 /><refsect2 /></refsect1>
+</refentry>

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/artwork.xml
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/artwork.xml	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/artwork.xml	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,545 @@
+<?xml version="1.0"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
+               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<refentry id="libgpod-Artwork">
+<refmeta>
+<refentrytitle role="top_of_page">Artwork</refentrytitle>
+<manvolnum>3</manvolnum>
+<refmiscinfo>LIBGPOD Library</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+<refname>Artwork</refname>
+<refpurpose>Data structure to store iPod artwork (album covers)</refpurpose>
+<!--[<xref linkend="desc" endterm="desc.title"/>]-->
+</refnamediv>
+
+<refsynopsisdiv role="synopsis">
+<title role="synopsis.title">Synopsis</title>
+
+<synopsis>
+
+
+
+                    <link linkend="Itdb-Artwork">Itdb_Artwork</link>;
+<link linkend="Itdb-Artwork">Itdb_Artwork</link>*       <link linkend="itdb-artwork-new">itdb_artwork_new</link>                    (void);
+<link linkend="Itdb-Artwork">Itdb_Artwork</link>*       <link linkend="itdb-artwork-duplicate">itdb_artwork_duplicate</link>              (<link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork);
+<link linkend="void">void</link>                <link linkend="itdb-artwork-free">itdb_artwork_free</link>                   (<link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork);
+<link linkend="gpointer">gpointer</link>            <link linkend="itdb-artwork-get-pixbuf">itdb_artwork_get_pixbuf</link>             (<link linkend="Itdb-Device">Itdb_Device</link> *device,
+                                                         <link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork,
+                                                         <link linkend="gint">gint</link> width,
+                                                         <link linkend="gint">gint</link> height);
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-artwork-set-thumbnail">itdb_artwork_set_thumbnail</link>          (<link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork,
+                                                         const <link linkend="gchar">gchar</link> *filename,
+                                                         <link linkend="gint">gint</link> rotation,
+                                                         <link linkend="GError">GError</link> **error);
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-artwork-set-thumbnail-from-data">itdb_artwork_set_thumbnail_from_data</link>
+                                                        (<link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork,
+                                                         const <link linkend="guchar">guchar</link> *image_data,
+                                                         <link linkend="gsize">gsize</link> image_data_len,
+                                                         <link linkend="gint">gint</link> rotation,
+                                                         <link linkend="GError">GError</link> **error);
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-artwork-set-thumbnail-from-pixbuf">itdb_artwork_set_thumbnail_from_pixbuf</link>
+                                                        (<link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork,
+                                                         <link linkend="gpointer">gpointer</link> pixbuf,
+                                                         <link linkend="gint">gint</link> rotation,
+                                                         <link linkend="GError">GError</link> **error);
+<link linkend="void">void</link>                <link linkend="itdb-artwork-remove-thumbnails">itdb_artwork_remove_thumbnails</link>      (<link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork);
+                    <link linkend="Itdb-Thumb">Itdb_Thumb</link>;
+<link linkend="Itdb-Thumb">Itdb_Thumb</link>*         <link linkend="itdb-thumb-duplicate">itdb_thumb_duplicate</link>                (<link linkend="Itdb-Thumb">Itdb_Thumb</link> *thumb);
+<link linkend="void">void</link>                <link linkend="itdb-thumb-free">itdb_thumb_free</link>                     (<link linkend="Itdb-Thumb">Itdb_Thumb</link> *thumb);
+<link linkend="gpointer">gpointer</link>            <link linkend="itdb-thumb-to-pixbuf-at-size">itdb_thumb_to_pixbuf_at_size</link>        (<link linkend="Itdb-Device">Itdb_Device</link> *device,
+                                                         <link linkend="Itdb-Thumb">Itdb_Thumb</link> *thumb,
+                                                         <link linkend="gint">gint</link> width,
+                                                         <link linkend="gint">gint</link> height);
+<link linkend="GList">GList</link>*              <link linkend="itdb-thumb-to-pixbufs">itdb_thumb_to_pixbufs</link>               (<link linkend="Itdb-Device">Itdb_Device</link> *device,
+                                                         <link linkend="Itdb-Thumb">Itdb_Thumb</link> *thumb);
+</synopsis>
+</refsynopsisdiv>
+
+
+
+
+
+
+
+
+
+<refsect1 role="desc">
+<title role="desc.title">Description</title>
+<para>
+These functions and structures are for adding, changing, and removing
+album/track artwork.  For working with photos, see the
+<link linkend="photodb">Photo database</link> section.
+</para>
+</refsect1>
+
+<refsect1 role="details">
+<title role="details.title">Details</title>
+<refsect2>
+<title><anchor id="Itdb-Artwork" role="struct" condition="since:0.3.0"/>Itdb_Artwork</title>
+<indexterm role="0.3.0"><primary>Itdb_Artwork</primary></indexterm><programlisting>typedef struct {
+    Itdb_Thumb *thumbnail;
+    guint32 id;
+    guint64 dbid;
+    gint32  unk028;
+    guint32 rating;
+    gint32  unk036;
+    time_t  creation_date;
+    time_t  digitized_date;
+    guint32 artwork_size;
+    /* reserved for future use */
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+    /* below is for use by application */
+    guint64 usertype;
+    gpointer userdata;
+    /* functions called to duplicate/free userdata */
+    ItdbUserDataDuplicateFunc userdata_duplicate;
+    ItdbUserDataDestroyFunc userdata_destroy;
+} Itdb_Artwork;
+</programlisting>
+<para>
+Structure representing artwork in an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> or <link linkend="Itdb-PhotoDB"><type>Itdb_PhotoDB</type></link></para>
+<para>
+
+</para><variablelist role="struct">
+<varlistentry>
+<term><link linkend="Itdb-Thumb">Itdb_Thumb</link>&nbsp;*<structfield>thumbnail</structfield>;</term>
+<listitem><simpara>          An <link linkend="Itdb-Thumb"><type>Itdb_Thumb</type></link>
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>id</structfield>;</term>
+<listitem><simpara>                 Artwork id used by photoalbums.  This starts at 0x40 and
+                     is set automatically when the ArtworkDB or PhotoDB is
+                     written
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint64">guint64</link>&nbsp;<structfield>dbid</structfield>;</term>
+<listitem><simpara>               The dbid of associated track.  Used internally by
+                     libgpod.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>unk028</structfield>;</term>
+<listitem><simpara>             Unknown
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>rating</structfield>;</term>
+<listitem><simpara>             Rating from iPhoto * 20 (PhotoDB only)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>unk036</structfield>;</term>
+<listitem><simpara>             Unknown
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="time-t">time_t</link>&nbsp;<structfield>creation_date</structfield>;</term>
+<listitem><simpara>      Date the image file was created (PhotoDB only)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="time-t">time_t</link>&nbsp;<structfield>digitized_date</structfield>;</term>
+<listitem><simpara>     Date the image was taken (EXIF information, PhotoDB
+                     only)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>artwork_size</structfield>;</term>
+<listitem><simpara>       Size in bytes of the original source image (PhotoDB
+                     only -- don't touch in case of ArtworkDB!)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int1</structfield>;</term>
+<listitem><simpara>      Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int2</structfield>;</term>
+<listitem><simpara>      Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved1</structfield>;</term>
+<listitem><simpara>          Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved2</structfield>;</term>
+<listitem><simpara>          Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint64">guint64</link>&nbsp;<structfield>usertype</structfield>;</term>
+<listitem><simpara>           For use by application
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>userdata</structfield>;</term>
+<listitem><simpara>           For use by application
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="ItdbUserDataDuplicateFunc">ItdbUserDataDuplicateFunc</link>&nbsp;<structfield>userdata_duplicate</structfield>;</term>
+<listitem><simpara> A function to duplicate <link linkend="userdata"><type>userdata</type></link>
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="ItdbUserDataDestroyFunc">ItdbUserDataDestroyFunc</link>&nbsp;<structfield>userdata_destroy</structfield>;</term>
+<listitem><simpara>   A function to free <link linkend="userdata"><type>userdata</type></link>
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.3.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-artwork-new" role="function" condition="since:0.3.0"/>itdb_artwork_new ()</title>
+<indexterm role="0.3.0"><primary>itdb_artwork_new</primary></indexterm><programlisting><link linkend="Itdb-Artwork">Itdb_Artwork</link>*       itdb_artwork_new                    (void);</programlisting>
+<para>
+Creates a new <link linkend="Itdb-Artwork"><type>Itdb_Artwork</type></link></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="Itdb-Artwork"><type>Itdb_Artwork</type></link> to be freed with <link linkend="itdb-artwork-free"><function>itdb_artwork_free()</function></link> when
+no longer needed
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.3.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-artwork-duplicate" role="function" condition="since:0.3.0"/>itdb_artwork_duplicate ()</title>
+<indexterm role="0.3.0"><primary>itdb_artwork_duplicate</primary></indexterm><programlisting><link linkend="Itdb-Artwork">Itdb_Artwork</link>*       itdb_artwork_duplicate              (<link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork);</programlisting>
+<para>
+Duplicates <parameter>artwork</parameter></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>artwork</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Artwork"><type>Itdb_Artwork</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new copy of <parameter>artwork</parameter>
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.3.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-artwork-free" role="function" condition="since:0.3.0"/>itdb_artwork_free ()</title>
+<indexterm role="0.3.0"><primary>itdb_artwork_free</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_artwork_free                   (<link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork);</programlisting>
+<para>
+Frees memory used by <parameter>artwork</parameter></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>artwork</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Artwork"><type>Itdb_Artwork</type></link>
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.3.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-artwork-get-pixbuf" role="function" condition="since:0.7.0"/>itdb_artwork_get_pixbuf ()</title>
+<indexterm role="0.7.0"><primary>itdb_artwork_get_pixbuf</primary></indexterm><programlisting><link linkend="gpointer">gpointer</link>            itdb_artwork_get_pixbuf             (<link linkend="Itdb-Device">Itdb_Device</link> *device,
+                                                         <link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork,
+                                                         <link linkend="gint">gint</link> width,
+                                                         <link linkend="gint">gint</link> height);</programlisting>
+<para>
+Returns a <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> representing the thumbnail stored in <parameter>artwork</parameter>
+scaling it if appropriate. If either height or width is -1, then the
+biggest unscaled thumbnail available will be returned</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>device</parameter>&nbsp;:</term>
+<listitem><simpara>     an <link linkend="Itdb-Device"><type>Itdb_Device</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>artwork</parameter>&nbsp;:</term>
+<listitem><simpara>    an <link linkend="Itdb-Artwork"><type>Itdb_Artwork</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
+<listitem><simpara>      width of the pixbuf to retrieve, -1 for the biggest
+             possible size and 0 for the smallest possible size (with no
+             scaling)
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>height</parameter>&nbsp;:</term>
+<listitem><simpara>     height of the pixbuf to retrieve, -1 for the biggest possible
+             size and 0 for the smallest possible size (with no scaling)
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> that must be unreffed when no longer used, NULL
+if no artwork could be found or if libgpod is compiled without GdkPixbuf
+support
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-artwork-set-thumbnail" role="function" condition="since:0.7.0"/>itdb_artwork_set_thumbnail ()</title>
+<indexterm role="0.7.0"><primary>itdb_artwork_set_thumbnail</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_artwork_set_thumbnail          (<link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork,
+                                                         const <link linkend="gchar">gchar</link> *filename,
+                                                         <link linkend="gint">gint</link> rotation,
+                                                         <link linkend="GError">GError</link> **error);</programlisting>
+<para>
+Appends a thumbnail of type <parameter>type</parameter> to existing thumbnails in <parameter>artwork</parameter>. No
+data is read from <parameter>filename</parameter> yet, the file will be when <parameter>artwork</parameter> is saved to
+disk. <parameter>filename</parameter> must still exist when that happens.
+</para>
+<para>
+For the rotation angle you can also use the gdk constants
+<link linkend="GDK-PIXBUF-ROTATE-NONE:CAPS"><literal>GDK_PIXBUF_ROTATE_NONE</literal></link>, <link linkend="GDK-PIXBUF-ROTATE-COUNTERCLOCKWISE:CAPS"><literal>GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE</literal></link>,
+<link linkend="GDK-PIXBUF-ROTATE-UPSIDEDOWN:CAPS"><literal>GDK_PIXBUF_ROTATE_UPSIDEDOWN</literal></link>, AND <link linkend="GDK-PIXBUF-ROTATE-CLOCKWISE:CAPS"><literal>GDK_PIXBUF_ROTATE_CLOCKWISE</literal></link>.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>artwork</parameter>&nbsp;:</term>
+<listitem><simpara>    an <link linkend="Itdb-Artwork"><type>Itdb_Artwork</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>filename</parameter>&nbsp;:</term>
+<listitem><simpara>   image file to use to create the thumbnail
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>rotation</parameter>&nbsp;:</term>
+<listitem><simpara>   angle by which the image should be rotated
+             counterclockwise. Valid values are 0, 90, 180 and 270.
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
+<listitem><simpara>      return location for a <link linkend="GError"><type>GError</type></link> or NULL
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if the thumbnail could be successfully added, FALSE
+otherwise. <parameter>error</parameter> is set appropriately.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-artwork-set-thumbnail-from-data" role="function" condition="since:0.7.0"/>itdb_artwork_set_thumbnail_from_data ()</title>
+<indexterm role="0.7.0"><primary>itdb_artwork_set_thumbnail_from_data</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_artwork_set_thumbnail_from_data
+                                                        (<link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork,
+                                                         const <link linkend="guchar">guchar</link> *image_data,
+                                                         <link linkend="gsize">gsize</link> image_data_len,
+                                                         <link linkend="gint">gint</link> rotation,
+                                                         <link linkend="GError">GError</link> **error);</programlisting>
+<para>
+Set a thumbnail in <parameter>artwork</parameter>. No data is processed yet. This will be done when
+<parameter>artwork</parameter> is saved to disk.
+</para>
+<para>
+For the rotation angle you can also use the gdk constants
+<link linkend="GDK-PIXBUF-ROTATE-NONE:CAPS"><literal>GDK_PIXBUF_ROTATE_NONE</literal></link>, <link linkend="GDK-PIXBUF-ROTATE-COUNTERCLOCKWISE:CAPS"><literal>GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE</literal></link>,
+<link linkend="GDK-PIXBUF-ROTATE-UPSIDEDOWN:CAPS"><literal>GDK_PIXBUF_ROTATE_UPSIDEDOWN</literal></link>, AND <link linkend="GDK-PIXBUF-ROTATE-CLOCKWISE:CAPS"><literal>GDK_PIXBUF_ROTATE_CLOCKWISE</literal></link>.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>artwork</parameter>&nbsp;:</term>
+<listitem><simpara>        an <link linkend="Itdb-Artwork"><type>Itdb_Artwork</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>image_data</parameter>&nbsp;:</term>
+<listitem><simpara>     data used to create the thumbnail (the raw contents of
+                 an image file)
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>image_data_len</parameter>&nbsp;:</term>
+<listitem><simpara> length of above data block
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>rotation</parameter>&nbsp;:</term>
+<listitem><simpara>       angle by which the image should be rotated
+                 counterclockwise. Valid values are 0, 90, 180 and 270.
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
+<listitem><simpara>          return location for a <link linkend="GError"><type>GError</type></link> or NULL
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if the thumbnail could be successfully added, FALSE
+otherwise. <parameter>error</parameter> is set appropriately.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-artwork-set-thumbnail-from-pixbuf" role="function" condition="since:0.7.0"/>itdb_artwork_set_thumbnail_from_pixbuf ()</title>
+<indexterm role="0.7.0"><primary>itdb_artwork_set_thumbnail_from_pixbuf</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_artwork_set_thumbnail_from_pixbuf
+                                                        (<link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork,
+                                                         <link linkend="gpointer">gpointer</link> pixbuf,
+                                                         <link linkend="gint">gint</link> rotation,
+                                                         <link linkend="GError">GError</link> **error);</programlisting>
+<para>
+Set a thumbnail in <parameter>artwork</parameter>. No data is generated from <parameter>pixbuf</parameter> yet, it will
+be done when <parameter>artwork</parameter> is saved to disk. <parameter>pixbuf</parameter> is ref'ed by this function,
+but is not copied, so it should not be modified before the database is saved.
+</para>
+<para>
+For the rotation angle you can also use the gdk constants
+<link linkend="GDK-PIXBUF-ROTATE-NONE:CAPS"><literal>GDK_PIXBUF_ROTATE_NONE</literal></link>, <link linkend="GDK-PIXBUF-ROTATE-COUNTERCLOCKWISE:CAPS"><literal>GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE</literal></link>,
+<link linkend="GDK-PIXBUF-ROTATE-UPSIDEDOWN:CAPS"><literal>GDK_PIXBUF_ROTATE_UPSIDEDOWN</literal></link>, AND <link linkend="GDK-PIXBUF-ROTATE-CLOCKWISE:CAPS"><literal>GDK_PIXBUF_ROTATE_CLOCKWISE</literal></link>.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>artwork</parameter>&nbsp;:</term>
+<listitem><simpara>    an <link linkend="Itdb-Artwork"><type>Itdb_Artwork</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>pixbuf</parameter>&nbsp;:</term>
+<listitem><simpara>     <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> to use to create the thumbnail
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>rotation</parameter>&nbsp;:</term>
+<listitem><simpara>   angle by which the image should be rotated
+             counterclockwise. Valid values are 0, 90, 180 and 270.
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
+<listitem><simpara>      return location for a <link linkend="GError"><type>GError</type></link> or NULL
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if the thumbnail could be successfully added, FALSE
+otherwise. <parameter>error</parameter> is set appropriately.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-artwork-remove-thumbnails" role="function" condition="since:0.3.0"/>itdb_artwork_remove_thumbnails ()</title>
+<indexterm role="0.3.0"><primary>itdb_artwork_remove_thumbnails</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_artwork_remove_thumbnails      (<link linkend="Itdb-Artwork">Itdb_Artwork</link> *artwork);</programlisting>
+<para>
+Removes all thumbnails from <parameter>artwork</parameter></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>artwork</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Artwork"><type>Itdb_Artwork</type></link>
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.3.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="Itdb-Thumb" role="struct" condition="since:0.3.0"/>Itdb_Thumb</title>
+<indexterm role="0.3.0"><primary>Itdb_Thumb</primary></indexterm><programlisting>typedef struct {
+    ItdbThumbDataType data_type;
+    guint rotation;
+} Itdb_Thumb;
+</programlisting>
+<para>
+This is an opaque structure representing a thumbnail to be
+transferred to the ipod or read from the ipod.</para>
+<para>
+
+</para><variablelist role="struct">
+<varlistentry>
+<term><link linkend="ItdbThumbDataType">ItdbThumbDataType</link>&nbsp;<structfield>data_type</structfield>;</term>
+<listitem><simpara> The type of data (file, memory, pixbuf, ipod, etc.)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint">guint</link>&nbsp;<structfield>rotation</structfield>;</term>
+<listitem><simpara>  Angle by which the image is rotated counterclockwise
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.3.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-thumb-duplicate" role="function" condition="since:0.3.0"/>itdb_thumb_duplicate ()</title>
+<indexterm role="0.3.0"><primary>itdb_thumb_duplicate</primary></indexterm><programlisting><link linkend="Itdb-Thumb">Itdb_Thumb</link>*         itdb_thumb_duplicate                (<link linkend="Itdb-Thumb">Itdb_Thumb</link> *thumb);</programlisting>
+<para>
+Duplicates the data contained in <parameter>thumb</parameter></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>thumb</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Thumb"><type>Itdb_Thumb</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a newly allocated copy of <parameter>thumb</parameter> to be freed with
+<link linkend="itdb-thumb-free"><function>itdb_thumb_free()</function></link> after use
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.3.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-thumb-free" role="function" condition="since:0.3.0"/>itdb_thumb_free ()</title>
+<indexterm role="0.3.0"><primary>itdb_thumb_free</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_thumb_free                     (<link linkend="Itdb-Thumb">Itdb_Thumb</link> *thumb);</programlisting>
+<para>
+Frees the memory used by <parameter>thumb</parameter></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>thumb</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Thumb"><type>Itdb_Thumb</type></link>
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.3.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-thumb-to-pixbuf-at-size" role="function" condition="since:0.7.0"/>itdb_thumb_to_pixbuf_at_size ()</title>
+<indexterm role="0.7.0"><primary>itdb_thumb_to_pixbuf_at_size</primary></indexterm><programlisting><link linkend="gpointer">gpointer</link>            itdb_thumb_to_pixbuf_at_size        (<link linkend="Itdb-Device">Itdb_Device</link> *device,
+                                                         <link linkend="Itdb-Thumb">Itdb_Thumb</link> *thumb,
+                                                         <link linkend="gint">gint</link> width,
+                                                         <link linkend="gint">gint</link> height);</programlisting>
+<para>
+Converts <parameter>thumb</parameter> to a <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>.
+</para>
+<para>
+<note>
+Since we want to have gdk-pixbuf dependency optional, a generic
+gpointer is returned which you have to cast to a <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> using
+<link linkend="GDK-PIXBUF:CAPS"><function>GDK_PIXBUF()</function></link> yourself.
+</note></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>device</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Device"><type>Itdb_Device</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>thumb</parameter>&nbsp;:</term>
+<listitem><simpara>  an <link linkend="Itdb-Thumb"><type>Itdb_Thumb</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
+<listitem><simpara>  width of the pixbuf to retrieve, -1 for the biggest
+         possible size and 0 for the smallest possible size (with no scaling)
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>height</parameter>&nbsp;:</term>
+<listitem><simpara> height of the pixbuf to retrieve, -1 for the biggest possible size
+         and 0 for the smallest possible size (with no scaling)
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> that must be unreffed with <link linkend="gdk-pixbuf-unref"><function>gdk_pixbuf_unref()</function></link>
+after use, or NULL if the creation of the gdk-pixbuf failed or if
+libgpod was compiled without gdk-pixbuf support.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-thumb-to-pixbufs" role="function" condition="since:0.7.0"/>itdb_thumb_to_pixbufs ()</title>
+<indexterm role="0.7.0"><primary>itdb_thumb_to_pixbufs</primary></indexterm><programlisting><link linkend="GList">GList</link>*              itdb_thumb_to_pixbufs               (<link linkend="Itdb-Device">Itdb_Device</link> *device,
+                                                         <link linkend="Itdb-Thumb">Itdb_Thumb</link> *thumb);</programlisting>
+<para>
+Converts <parameter>thumb</parameter> to a <link linkend="GList"><type>GList</type></link> of <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>. The returned <link linkend="GList"><type>GList</type></link> will
+generally contain only 1 element, the full-size pixbuf associated with
+<parameter>thumb</parameter>, but when the artwork has been read from the ipod and hasn't been
+modified from the library, then the returned <link linkend="GList"><type>GList</type></link> will contain several
+<link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> corresponding to the various thumbnail sizes that were
+written to the iPod database.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>device</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Device"><type>Itdb_Device</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>thumb</parameter>&nbsp;:</term>
+<listitem><simpara>  an <link linkend="Itdb-Thumb"><type>Itdb_Thumb</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="GList"><type>GList</type></link> of <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> which are associated with <parameter>thumb</parameter>, NULL
+if the pixbuf was invalid or if libgpod is compiled without gdk-pixbuf
+support. The <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> must be unreffed with <link linkend="gdk-pixbuf-unref"><function>gdk_pixbuf_unref()</function></link> after use
+and the <link linkend="GList"><type>GList</type></link> must be freed with <link linkend="g-list-free"><function>g_list_free()</function></link>.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
+
+</refsect1>
+
+
+
+<refsect1>
+<title>See Also</title>
+<para>
+<link linkend="photodb">Photo database</link>
+</para>
+</refsect1>
+
+
+<refsect1><refsect2 /><refsect2 /></refsect1>
+</refentry>

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/chapterdata.xml
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/chapterdata.xml	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/chapterdata.xml	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,320 @@
+<?xml version="1.0"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
+               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<refentry id="libgpod-Chapter-Data">
+<refmeta>
+<refentrytitle role="top_of_page">Chapter Data</refentrytitle>
+<manvolnum>3</manvolnum>
+<refmiscinfo>LIBGPOD Library</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+<refname>Chapter Data</refname>
+<refpurpose>Data structure to store chapter data for tracks</refpurpose>
+<!--[<xref linkend="desc" endterm="desc.title"/>]-->
+</refnamediv>
+
+<refsynopsisdiv role="synopsis">
+<title role="synopsis.title">Synopsis</title>
+
+<synopsis>
+
+
+
+                    <link linkend="Itdb-Chapter">Itdb_Chapter</link>;
+                    <link linkend="Itdb-Chapterdata">Itdb_Chapterdata</link>;
+<link linkend="Itdb-Chapter">Itdb_Chapter</link>*       <link linkend="itdb-chapter-new">itdb_chapter_new</link>                    (void);
+<link linkend="Itdb-Chapter">Itdb_Chapter</link>*       <link linkend="itdb-chapter-duplicate">itdb_chapter_duplicate</link>              (<link linkend="Itdb-Chapter">Itdb_Chapter</link> *chapter);
+<link linkend="void">void</link>                <link linkend="itdb-chapter-free">itdb_chapter_free</link>                   (<link linkend="Itdb-Chapter">Itdb_Chapter</link> *chapter);
+<link linkend="Itdb-Chapterdata">Itdb_Chapterdata</link>*   <link linkend="itdb-chapterdata-new">itdb_chapterdata_new</link>                (void);
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-chapterdata-add-chapter">itdb_chapterdata_add_chapter</link>        (<link linkend="Itdb-Chapterdata">Itdb_Chapterdata</link> *chapterdata,
+                                                         <link linkend="gint32">gint32</link> startpos,
+                                                         <link linkend="gchar">gchar</link> *chaptertitle);
+<link linkend="Itdb-Chapterdata">Itdb_Chapterdata</link>*   <link linkend="itdb-chapterdata-duplicate">itdb_chapterdata_duplicate</link>          (<link linkend="Itdb-Chapterdata">Itdb_Chapterdata</link> *chapterdata);
+<link linkend="void">void</link>                <link linkend="itdb-chapterdata-remove-chapter">itdb_chapterdata_remove_chapter</link>     (<link linkend="Itdb-Chapterdata">Itdb_Chapterdata</link> *chapterdata,
+                                                         <link linkend="Itdb-Chapter">Itdb_Chapter</link> *chapter);
+<link linkend="void">void</link>                <link linkend="itdb-chapterdata-remove-chapters">itdb_chapterdata_remove_chapters</link>    (<link linkend="Itdb-Chapterdata">Itdb_Chapterdata</link> *chapterdata);
+<link linkend="void">void</link>                <link linkend="itdb-chapterdata-free">itdb_chapterdata_free</link>               (<link linkend="Itdb-Chapterdata">Itdb_Chapterdata</link> *chapterdata);
+</synopsis>
+</refsynopsisdiv>
+
+
+
+
+
+
+
+
+
+<refsect1 role="desc">
+<title role="desc.title">Description</title>
+<para>
+Chapters allow for a large file to be divided into sections.  The start and stop
+points in the track are defined here, as well as the title for each chapter.
+</para>
+</refsect1>
+
+<refsect1 role="details">
+<title role="details.title">Details</title>
+<refsect2>
+<title><anchor id="Itdb-Chapter" role="struct" condition="since:0.7.0"/>Itdb_Chapter</title>
+<indexterm role="0.7.0"><primary>Itdb_Chapter</primary></indexterm><programlisting>typedef struct {
+    guint32 startpos;
+    gchar *chaptertitle;
+    /* reserved for future use */
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+} Itdb_Chapter;
+</programlisting>
+<para>
+Structure representing an iTunesDB Chapter</para>
+<para>
+
+</para><variablelist role="struct">
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>startpos</structfield>;</term>
+<listitem><simpara>      The start position of the chapter in ms. The first chapter
+                begins at 1.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>chaptertitle</structfield>;</term>
+<listitem><simpara>  The chapter title in UTF8
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int1</structfield>;</term>
+<listitem><simpara> Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int2</structfield>;</term>
+<listitem><simpara> Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved1</structfield>;</term>
+<listitem><simpara>     Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved2</structfield>;</term>
+<listitem><simpara>     Reserved for future use
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="Itdb-Chapterdata" role="struct" condition="since:0.7.0"/>Itdb_Chapterdata</title>
+<indexterm role="0.7.0"><primary>Itdb_Chapterdata</primary></indexterm><programlisting>typedef struct {
+    GList *chapters;
+    guint32 unk024;
+    guint32 unk028;
+    guint32 unk032;
+    /* reserved for future use */
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+} Itdb_Chapterdata;
+</programlisting>
+<para>
+Structure representing iTunesDB Chapter data</para>
+<para>
+
+</para><variablelist role="struct">
+<varlistentry>
+<term><link linkend="GList">GList</link>&nbsp;*<structfield>chapters</structfield>;</term>
+<listitem><simpara>      A list of chapters (<link linkend="Itdb-Chapter"><type>Itdb_Chapter</type></link>)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk024</structfield>;</term>
+<listitem><simpara>        Unknown
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk028</structfield>;</term>
+<listitem><simpara>        Unknown
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk032</structfield>;</term>
+<listitem><simpara>        Unknown
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int1</structfield>;</term>
+<listitem><simpara> Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int2</structfield>;</term>
+<listitem><simpara> Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved1</structfield>;</term>
+<listitem><simpara>     Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved2</structfield>;</term>
+<listitem><simpara>     Reserved for future use
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-chapter-new" role="function" condition="since:0.7.0"/>itdb_chapter_new ()</title>
+<indexterm role="0.7.0"><primary>itdb_chapter_new</primary></indexterm><programlisting><link linkend="Itdb-Chapter">Itdb_Chapter</link>*       itdb_chapter_new                    (void);</programlisting>
+<para>
+Creates a new <link linkend="Itdb-Chapter"><type>Itdb_Chapter</type></link></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> newly allocated <link linkend="Itdb-Chapter"><type>Itdb_Chapter</type></link> to be freed with <link linkend="itdb-chapter-free"><function>itdb_chapter_free()</function></link>
+after use
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-chapter-duplicate" role="function" condition="since:0.7.0"/>itdb_chapter_duplicate ()</title>
+<indexterm role="0.7.0"><primary>itdb_chapter_duplicate</primary></indexterm><programlisting><link linkend="Itdb-Chapter">Itdb_Chapter</link>*       itdb_chapter_duplicate              (<link linkend="Itdb-Chapter">Itdb_Chapter</link> *chapter);</programlisting>
+<para>
+Duplicates the data contained in <parameter>chapter</parameter></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>chapter</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Chapter"><type>Itdb_Chapter</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a newly allocated copy of <parameter>chapter</parameter> to be freed with
+<link linkend="itdb-chapter-free"><function>itdb_chapter_free()</function></link> after use
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-chapter-free" role="function" condition="since:0.7.0"/>itdb_chapter_free ()</title>
+<indexterm role="0.7.0"><primary>itdb_chapter_free</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_chapter_free                   (<link linkend="Itdb-Chapter">Itdb_Chapter</link> *chapter);</programlisting>
+<para>
+Frees the memory used by <parameter>chapter</parameter></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>chapter</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Chapter"><type>Itdb_Chapter</type></link>
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-chapterdata-new" role="function" condition="since:0.7.0"/>itdb_chapterdata_new ()</title>
+<indexterm role="0.7.0"><primary>itdb_chapterdata_new</primary></indexterm><programlisting><link linkend="Itdb-Chapterdata">Itdb_Chapterdata</link>*   itdb_chapterdata_new                (void);</programlisting>
+<para>
+Creates a new <link linkend="Itdb-Chapterdata"><type>Itdb_Chapterdata</type></link></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="Itdb-Chapterdata"><type>Itdb_Chapterdata</type></link> to be freed with
+              <link linkend="itdb-chapterdata-free"><function>itdb_chapterdata_free()</function></link> when no longer needed
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-chapterdata-add-chapter" role="function" condition="since:0.7.0"/>itdb_chapterdata_add_chapter ()</title>
+<indexterm role="0.7.0"><primary>itdb_chapterdata_add_chapter</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_chapterdata_add_chapter        (<link linkend="Itdb-Chapterdata">Itdb_Chapterdata</link> *chapterdata,
+                                                         <link linkend="gint32">gint32</link> startpos,
+                                                         <link linkend="gchar">gchar</link> *chaptertitle);</programlisting>
+<para>
+Appends a chapter to existing chapters in <parameter>chapterdata</parameter>.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>chapterdata</parameter>&nbsp;:</term>
+<listitem><simpara>  an <link linkend="Itdb-Chapterdata"><type>Itdb_Chapterdata</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>startpos</parameter>&nbsp;:</term>
+<listitem><simpara>     chapter start time in milliseconds
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>chaptertitle</parameter>&nbsp;:</term>
+<listitem><simpara> chapter title
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if the chapter could be successfully added, FALSE
+otherwise.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-chapterdata-duplicate" role="function" condition="since:0.7.0"/>itdb_chapterdata_duplicate ()</title>
+<indexterm role="0.7.0"><primary>itdb_chapterdata_duplicate</primary></indexterm><programlisting><link linkend="Itdb-Chapterdata">Itdb_Chapterdata</link>*   itdb_chapterdata_duplicate          (<link linkend="Itdb-Chapterdata">Itdb_Chapterdata</link> *chapterdata);</programlisting>
+<para>
+Duplicates <parameter>chapterdata</parameter></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>chapterdata</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Chapterdata"><type>Itdb_Chapterdata</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new copy of <parameter>chapterdata</parameter>
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-chapterdata-remove-chapter" role="function" condition="since:0.7.0"/>itdb_chapterdata_remove_chapter ()</title>
+<indexterm role="0.7.0"><primary>itdb_chapterdata_remove_chapter</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_chapterdata_remove_chapter     (<link linkend="Itdb-Chapterdata">Itdb_Chapterdata</link> *chapterdata,
+                                                         <link linkend="Itdb-Chapter">Itdb_Chapter</link> *chapter);</programlisting>
+<para>
+Removes <parameter>chapter</parameter> from <parameter>chapterdata</parameter>. The memory used by <parameter>chapter</parameter> is freed.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>chapterdata</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Chapterdata"><type>Itdb_Chapterdata</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>chapter</parameter>&nbsp;:</term>
+<listitem><simpara>     an <link linkend="Itdb-Chapter"><type>Itdb_Chapter</type></link>
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-chapterdata-remove-chapters" role="function" condition="since:0.7.0"/>itdb_chapterdata_remove_chapters ()</title>
+<indexterm role="0.7.0"><primary>itdb_chapterdata_remove_chapters</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_chapterdata_remove_chapters    (<link linkend="Itdb-Chapterdata">Itdb_Chapterdata</link> *chapterdata);</programlisting>
+<para>
+Removes all chapters from <parameter>chapterdata</parameter></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>chapterdata</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Chapterdata"><type>Itdb_Chapterdata</type></link>
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-chapterdata-free" role="function" condition="since:0.7.0"/>itdb_chapterdata_free ()</title>
+<indexterm role="0.7.0"><primary>itdb_chapterdata_free</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_chapterdata_free               (<link linkend="Itdb-Chapterdata">Itdb_Chapterdata</link> *chapterdata);</programlisting>
+<para>
+Frees memory used by <parameter>chapterdata</parameter></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>chapterdata</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Chapterdata"><type>Itdb_Chapterdata</type></link>
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
+
+</refsect1>
+
+
+
+
+
+<refsect1><refsect2 /><refsect2 /></refsect1>
+</refentry>

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/device.xml
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/device.xml	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/device.xml	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,988 @@
+<?xml version="1.0"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
+               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<refentry id="libgpod-Device">
+<refmeta>
+<refentrytitle role="top_of_page">Device</refentrytitle>
+<manvolnum>3</manvolnum>
+<refmiscinfo>LIBGPOD Library</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+<refname>Device</refname>
+<refpurpose>Data structure holding information about the iPod (model, mount point, etc.)</refpurpose>
+<!--[<xref linkend="desc" endterm="desc.title"/>]-->
+</refnamediv>
+
+<refsynopsisdiv role="synopsis">
+<title role="synopsis.title">Synopsis</title>
+
+<synopsis>
+
+
+
+                    <link linkend="Itdb-Device">Itdb_Device</link>;
+<link linkend="Itdb-Device">Itdb_Device</link>*        <link linkend="itdb-device-new">itdb_device_new</link>                     (void);
+<link linkend="void">void</link>                <link linkend="itdb-device-free">itdb_device_free</link>                    (<link linkend="Itdb-Device">Itdb_Device</link> *device);
+<link linkend="void">void</link>                <link linkend="itdb-device-set-mountpoint">itdb_device_set_mountpoint</link>          (<link linkend="Itdb-Device">Itdb_Device</link> *device,
+                                                         const <link linkend="gchar">gchar</link> *mp);
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-device-supports-artwork">itdb_device_supports_artwork</link>        (const <link linkend="Itdb-Device">Itdb_Device</link> *device);
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-device-supports-chapter-image">itdb_device_supports_chapter_image</link>  (const <link linkend="Itdb-Device">Itdb_Device</link> *device);
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-device-supports-photo">itdb_device_supports_photo</link>          (const <link linkend="Itdb-Device">Itdb_Device</link> *device);
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-device-supports-podcast">itdb_device_supports_podcast</link>        (const <link linkend="Itdb-Device">Itdb_Device</link> *device);
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-device-supports-video">itdb_device_supports_video</link>          (const <link linkend="Itdb-Device">Itdb_Device</link> *device);
+                    <link linkend="Itdb-IpodInfo">Itdb_IpodInfo</link>;
+const <link linkend="Itdb-IpodInfo">Itdb_IpodInfo</link>* <link linkend="itdb-device-get-ipod-info">itdb_device_get_ipod_info</link>          (const <link linkend="Itdb-Device">Itdb_Device</link> *device);
+const <link linkend="Itdb-IpodInfo">Itdb_IpodInfo</link>* <link linkend="itdb-info-get-ipod-info-table">itdb_info_get_ipod_info_table</link>      (void);
+enum                <link linkend="Itdb-IpodGeneration">Itdb_IpodGeneration</link>;
+const <link linkend="gchar">gchar</link>*        <link linkend="itdb-info-get-ipod-generation-string">itdb_info_get_ipod_generation_string</link>
+                                                        (<link linkend="Itdb-IpodGeneration">Itdb_IpodGeneration</link> generation);
+enum                <link linkend="Itdb-IpodModel">Itdb_IpodModel</link>;
+const <link linkend="gchar">gchar</link>*        <link linkend="itdb-info-get-ipod-model-name-string">itdb_info_get_ipod_model_name_string</link>
+                                                        (<link linkend="Itdb-IpodModel">Itdb_IpodModel</link> model);
+                    <link linkend="Itdb-ArtworkFormat">Itdb_ArtworkFormat</link>;
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-device-read-sysinfo">itdb_device_read_sysinfo</link>            (<link linkend="Itdb-Device">Itdb_Device</link> *device);
+<link linkend="gchar">gchar</link>*              <link linkend="itdb-device-get-sysinfo">itdb_device_get_sysinfo</link>             (const <link linkend="Itdb-Device">Itdb_Device</link> *device,
+                                                         const <link linkend="gchar">gchar</link> *field);
+<link linkend="void">void</link>                <link linkend="itdb-device-set-sysinfo">itdb_device_set_sysinfo</link>             (<link linkend="Itdb-Device">Itdb_Device</link> *device,
+                                                         const <link linkend="gchar">gchar</link> *field,
+                                                         const <link linkend="gchar">gchar</link> *value);
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-device-write-sysinfo">itdb_device_write_sysinfo</link>           (<link linkend="Itdb-Device">Itdb_Device</link> *device,
+                                                         <link linkend="GError">GError</link> **error);
+</synopsis>
+</refsynopsisdiv>
+
+
+
+
+
+
+
+
+
+<refsect1 role="desc">
+<title role="desc.title">Description</title>
+<para>
+These functions are for reading and setting information about the iPod.
+</para>
+</refsect1>
+
+<refsect1 role="details">
+<title role="details.title">Details</title>
+<refsect2>
+<title><anchor id="Itdb-Device" role="struct" condition="since:0.4.0"/>Itdb_Device</title>
+<indexterm role="0.4.0"><primary>Itdb_Device</primary></indexterm><programlisting>typedef struct {
+    gchar *mountpoint;
+    gint   musicdirs;
+    guint  byte_order;
+    GHashTable *sysinfo;
+    SysInfoIpodProperties *sysinfo_extended;
+    gboolean sysinfo_changed;
+    gint timezone_shift;
+} Itdb_Device;
+</programlisting>
+<para>
+Structure representing an iPod device</para>
+<para>
+
+</para><variablelist role="struct">
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>mountpoint</structfield>;</term>
+<listitem><simpara>         The mountpoint of the iPod
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint">gint</link>&nbsp;<structfield>musicdirs</structfield>;</term>
+<listitem><simpara>          The number of /iPod_Control/Music/F.. dirs
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint">guint</link>&nbsp;<structfield>byte_order</structfield>;</term>
+<listitem><simpara>         G_LITTLE_ENDIAN "regular" endianness G_BIG_ENDIAN
+                     "reversed" endianness (e.g. mobile phone iTunesDBs)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="GHashTable">GHashTable</link>&nbsp;*<structfield>sysinfo</structfield>;</term>
+<listitem><simpara>            A hash with key/value pairs of all entries in
+                     Device/SysInfo
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="SysInfoIpodProperties">SysInfoIpodProperties</link>&nbsp;*<structfield>sysinfo_extended</structfield>;</term>
+<listitem><simpara>   The parsed content of SysInfoExtended, which can be NULL
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gboolean">gboolean</link>&nbsp;<structfield>sysinfo_changed</structfield>;</term>
+<listitem><simpara>    True if the sysinfo hash been changed by the user, false
+                     otherwise.  (see <link linkend="itdb-set-sysinfo"><function>itdb_set_sysinfo()</function></link>)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint">gint</link>&nbsp;<structfield>timezone_shift</structfield>;</term>
+<listitem><simpara>     The difference in seconds between the current timezone
+                     and UTC
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-device-new" role="function" condition="since:0.4.0"/>itdb_device_new ()</title>
+<indexterm role="0.4.0"><primary>itdb_device_new</primary></indexterm><programlisting><link linkend="Itdb-Device">Itdb_Device</link>*        itdb_device_new                     (void);</programlisting>
+<para>
+Creates a new <link linkend="Itdb-Device"><type>Itdb_Device</type></link> structure</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a newly allocated <link linkend="Itdb-Device"><type>Itdb_Device</type></link> which must be freed with
+<link linkend="itdb-device-free"><function>itdb_device_free()</function></link> when no longer needed
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-device-free" role="function" condition="since:0.4.0"/>itdb_device_free ()</title>
+<indexterm role="0.4.0"><primary>itdb_device_free</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_device_free                    (<link linkend="Itdb-Device">Itdb_Device</link> *device);</programlisting>
+<para>
+Frees memory used by <parameter>device</parameter></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>device</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Device"><type>Itdb_Device</type></link>
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-device-set-mountpoint" role="function" condition="since:0.4.0"/>itdb_device_set_mountpoint ()</title>
+<indexterm role="0.4.0"><primary>itdb_device_set_mountpoint</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_device_set_mountpoint          (<link linkend="Itdb-Device">Itdb_Device</link> *device,
+                                                         const <link linkend="gchar">gchar</link> *mp);</programlisting>
+<para>
+Sets the mountpoint of <parameter>device</parameter> to <parameter>mp</parameter> and update the cached device 
+information (in particular, re-read the SysInfo file)
+</para>
+<para>
+<warning><para>Calling this function invalidates all the artwork in the
+<link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> database using this <link linkend="Itdb-Device"><type>Itdb_Device</type></link>. Trying to access this
+artwork will result in memory corruption. It's recommended to use
+<link linkend="itdb-set-mountpoint"><function>itdb_set_mountpoint()</function></link> instead which will clean the invalidated artwork
+for you.</para></warning>.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>device</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Device"><type>Itdb_Device</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>mp</parameter>&nbsp;:</term>
+<listitem><simpara>     the new mount point
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-device-supports-artwork" role="function" condition="since:0.5.0"/>itdb_device_supports_artwork ()</title>
+<indexterm role="0.5.0"><primary>itdb_device_supports_artwork</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_device_supports_artwork        (const <link linkend="Itdb-Device">Itdb_Device</link> *device);</programlisting>
+<para>
+Indicates whether <parameter>device</parameter> can display artwork or not. When dealing
+with a non-art capable iPod, no artwork data will be written to the
+iPod so you can spare calls to the artwork handling methods.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>device</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Device"><type>Itdb_Device</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> true if <parameter>device</parameter> can display artwork.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.5.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-device-supports-chapter-image" role="function" condition="since:0.7.2"/>itdb_device_supports_chapter_image ()</title>
+<indexterm role="0.7.2"><primary>itdb_device_supports_chapter_image</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_device_supports_chapter_image  (const <link linkend="Itdb-Device">Itdb_Device</link> *device);</programlisting>
+<para>
+Indicates whether <parameter>device</parameter> can display chapter images or not.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>device</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Device"><type>Itdb_Device</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> true if <parameter>device</parameter> can display chapter images.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.7.2
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-device-supports-photo" role="function" condition="since:0.5.0"/>itdb_device_supports_photo ()</title>
+<indexterm role="0.5.0"><primary>itdb_device_supports_photo</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_device_supports_photo          (const <link linkend="Itdb-Device">Itdb_Device</link> *device);</programlisting>
+<para>
+Indicates whether <parameter>device</parameter> can display photos or not.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>device</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Device"><type>Itdb_Device</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> true if <parameter>device</parameter> can display photos.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.5.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-device-supports-podcast" role="function" condition="since:0.7.2"/>itdb_device_supports_podcast ()</title>
+<indexterm role="0.7.2"><primary>itdb_device_supports_podcast</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_device_supports_podcast        (const <link linkend="Itdb-Device">Itdb_Device</link> *device);</programlisting>
+<para>
+Indicates whether <parameter>device</parameter> can play podcasts or not.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>device</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Device"><type>Itdb_Device</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> true if <parameter>device</parameter> can play podcasts.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.7.2
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-device-supports-video" role="function" condition="since:0.7.0"/>itdb_device_supports_video ()</title>
+<indexterm role="0.7.0"><primary>itdb_device_supports_video</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_device_supports_video          (const <link linkend="Itdb-Device">Itdb_Device</link> *device);</programlisting>
+<para>
+Indicates whether <parameter>device</parameter> can play videos or not.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>device</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Device"><type>Itdb_Device</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> true if <parameter>device</parameter> can play videos.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="Itdb-IpodInfo" role="struct" condition="since:0.4.0"/>Itdb_IpodInfo</title>
+<indexterm role="0.4.0"><primary>Itdb_IpodInfo</primary></indexterm><programlisting>typedef struct {
+    const gchar *model_number;
+    const double capacity;
+    const Itdb_IpodModel ipod_model;
+    const Itdb_IpodGeneration ipod_generation;
+    const guint musicdirs;
+    /* reserved for future use */
+    const gint32 reserved_int1;
+    const gint32 reserved_int2;
+    gconstpointer reserved1;
+    gconstpointer reserved2;
+} Itdb_IpodInfo;
+</programlisting>
+<para>
+Structure representing information about an iPod</para>
+<para>
+
+</para><variablelist role="struct">
+<varlistentry>
+<term>const&nbsp;<link linkend="gchar">gchar</link>&nbsp;*<structfield>model_number</structfield>;</term>
+<listitem><simpara>    The model number.  This is abbreviated.  If the first
+                  character is not numeric, it is ommited. e.g.
+                  "MA350 -> A350", "M9829 -> 9829"
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term>const&nbsp;<link linkend="double">double</link>&nbsp;<structfield>capacity</structfield>;</term>
+<listitem><simpara>        The iPod's capacity in gigabytes
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term>const&nbsp;<link linkend="Itdb-IpodModel">Itdb_IpodModel</link>&nbsp;<structfield>ipod_model</structfield>;</term>
+<listitem><simpara>      The iPod model
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term>const&nbsp;<link linkend="Itdb-IpodGeneration">Itdb_IpodGeneration</link>&nbsp;<structfield>ipod_generation</structfield>;</term>
+<listitem><simpara> The iPod generation
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term>const&nbsp;<link linkend="guint">guint</link>&nbsp;<structfield>musicdirs</structfield>;</term>
+<listitem><simpara>       The number of music (Fnn) dirs created by iTunes. The
+                  exact number seems to be version dependent. Therefore, the
+                  numbers here represent a mixture of reported values and
+                  common sense.  Note: this number does not necessarily
+                  represent the number of dirs present on a particular iPod.
+                  It is used when setting up a new iPod from scratch.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term>const&nbsp;<link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int1</structfield>;</term>
+<listitem><simpara>   Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term>const&nbsp;<link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int2</structfield>;</term>
+<listitem><simpara>   Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gconstpointer">gconstpointer</link>&nbsp;<structfield>reserved1</structfield>;</term>
+<listitem><simpara>       Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gconstpointer">gconstpointer</link>&nbsp;<structfield>reserved2</structfield>;</term>
+<listitem><simpara>       Reserved for future use
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-device-get-ipod-info" role="function" condition="since:0.4.0"/>itdb_device_get_ipod_info ()</title>
+<indexterm role="0.4.0"><primary>itdb_device_get_ipod_info</primary></indexterm><programlisting>const <link linkend="Itdb-IpodInfo">Itdb_IpodInfo</link>* itdb_device_get_ipod_info          (const <link linkend="Itdb-Device">Itdb_Device</link> *device);</programlisting>
+<para>
+Retrieve the <link linkend="Itdb-IpodInfo"><type>Itdb_IpodInfo</type></link> entry for this iPod</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>device</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Device"><type>Itdb_Device</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the <link linkend="Itdb-IpodInfo"><type>Itdb_IpodInfo</type></link> entry for this iPod
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-info-get-ipod-info-table" role="function" condition="since:0.4.0"/>itdb_info_get_ipod_info_table ()</title>
+<indexterm role="0.4.0"><primary>itdb_info_get_ipod_info_table</primary></indexterm><programlisting>const <link linkend="Itdb-IpodInfo">Itdb_IpodInfo</link>* itdb_info_get_ipod_info_table      (void);</programlisting>
+<para>
+Return a pointer to the start of valid iPod model descriptions,
+which is an array of <link linkend="Itdb-IpodInfo"><type>Itdb_IpodInfo</type></link> entries. This can be useful if you
+want to build a list of all iPod models known to the current libgpod.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a pointer to the array of <link linkend="Itdb-IpodInfo"><type>Itdb_IpodInfo</type></link> entries.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="Itdb-IpodGeneration" role="enum" condition="since:0.4.0"/>enum Itdb_IpodGeneration</title>
+<indexterm role="0.4.0"><primary>Itdb_IpodGeneration</primary></indexterm><programlisting>typedef enum {
+    ITDB_IPOD_GENERATION_UNKNOWN,
+    ITDB_IPOD_GENERATION_FIRST,
+    ITDB_IPOD_GENERATION_SECOND,
+    ITDB_IPOD_GENERATION_THIRD,
+    ITDB_IPOD_GENERATION_FOURTH,
+    ITDB_IPOD_GENERATION_PHOTO,
+    ITDB_IPOD_GENERATION_MOBILE,
+    ITDB_IPOD_GENERATION_MINI_1,
+    ITDB_IPOD_GENERATION_MINI_2,
+    ITDB_IPOD_GENERATION_SHUFFLE_1,
+    ITDB_IPOD_GENERATION_SHUFFLE_2,
+    ITDB_IPOD_GENERATION_SHUFFLE_3,
+    ITDB_IPOD_GENERATION_NANO_1,
+    ITDB_IPOD_GENERATION_NANO_2,
+    ITDB_IPOD_GENERATION_NANO_3,
+    ITDB_IPOD_GENERATION_NANO_4,
+    ITDB_IPOD_GENERATION_VIDEO_1,
+    ITDB_IPOD_GENERATION_VIDEO_2,
+    ITDB_IPOD_GENERATION_CLASSIC_1,
+    ITDB_IPOD_GENERATION_CLASSIC_2,
+    ITDB_IPOD_GENERATION_TOUCH_1,
+    ITDB_IPOD_GENERATION_IPHONE_1,
+} Itdb_IpodGeneration;
+</programlisting>
+<para>
+iPod generation information
+</para>
+<para>
+See http://support.apple.com/kb/HT1353 and http://en.wikipedia.org/wiki/IPod
+for more details.</para>
+<para>
+
+</para><variablelist role="enum">
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-UNKNOWN:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_UNKNOWN</literal></term>
+<listitem><simpara>   Unknown iPod
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-FIRST:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_FIRST</literal></term>
+<listitem><simpara>     First Generation iPod
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-SECOND:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_SECOND</literal></term>
+<listitem><simpara>    Second Generation iPod
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-THIRD:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_THIRD</literal></term>
+<listitem><simpara>     Third Generation iPod
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-FOURTH:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_FOURTH</literal></term>
+<listitem><simpara>    Fourth Generation iPod
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-PHOTO:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_PHOTO</literal></term>
+<listitem><simpara>     Photo iPod
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-MOBILE:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_MOBILE</literal></term>
+<listitem><simpara>    Mobile iPod
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-MINI-1:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_MINI_1</literal></term>
+<listitem><simpara>    First Generation iPod Mini
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-MINI-2:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_MINI_2</literal></term>
+<listitem><simpara>    Second Generation iPod Mini
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-SHUFFLE-1:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_SHUFFLE_1</literal></term>
+<listitem><simpara> First Generation iPod Shuffle
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-SHUFFLE-2:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_SHUFFLE_2</literal></term>
+<listitem><simpara> Second Generation iPod Shuffle
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-SHUFFLE-3:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_SHUFFLE_3</literal></term>
+<listitem><simpara> Third Generation iPod Shuffle
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-NANO-1:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_NANO_1</literal></term>
+<listitem><simpara>    First Generation iPod Nano
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-NANO-2:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_NANO_2</literal></term>
+<listitem><simpara>    Second Generation iPod Nano
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-NANO-3:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_NANO_3</literal></term>
+<listitem><simpara>    Third Generation iPod Nano
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-NANO-4:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_NANO_4</literal></term>
+<listitem><simpara>    Fourth Generation iPod Nano
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-VIDEO-1:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_VIDEO_1</literal></term>
+<listitem><simpara>   First Generation iPod Video (aka 5g)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-VIDEO-2:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_VIDEO_2</literal></term>
+<listitem><simpara>   Second Generation iPod Video (aka 5.5g)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-CLASSIC-1:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_CLASSIC_1</literal></term>
+<listitem><simpara> First Generation iPod Classic
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-CLASSIC-2:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_CLASSIC_2</literal></term>
+<listitem><simpara> Second Generation iPod Classic
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-TOUCH-1:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_TOUCH_1</literal></term>
+<listitem><simpara>   First Generation iPod Touch
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-GENERATION-IPHONE-1:CAPS" role="constant"/><literal>ITDB_IPOD_GENERATION_IPHONE_1</literal></term>
+<listitem><simpara>  First Generation iPhone
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-info-get-ipod-generation-string" role="function" condition="since:0.4.0"/>itdb_info_get_ipod_generation_string ()</title>
+<indexterm role="0.4.0"><primary>itdb_info_get_ipod_generation_string</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>*        itdb_info_get_ipod_generation_string
+                                                        (<link linkend="Itdb-IpodGeneration">Itdb_IpodGeneration</link> generation);</programlisting>
+<para>
+Return the iPod's generic generation name, like "First Generation",
+"Mobile Phone"...</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>generation</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-IpodGeneration"><type>Itdb_IpodGeneration</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a pointer to the generation name. This is a static
+string and must not be <link linkend="g-free"><function>g_free()</function></link>d.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="Itdb-IpodModel" role="enum" condition="since:0.4.0"/>enum Itdb_IpodModel</title>
+<indexterm role="0.4.0"><primary>Itdb_IpodModel</primary></indexterm><programlisting>typedef enum {
+    ITDB_IPOD_MODEL_INVALID,
+    ITDB_IPOD_MODEL_UNKNOWN,
+    ITDB_IPOD_MODEL_COLOR,
+    ITDB_IPOD_MODEL_COLOR_U2,
+    ITDB_IPOD_MODEL_REGULAR,
+    ITDB_IPOD_MODEL_REGULAR_U2,
+    ITDB_IPOD_MODEL_MINI,
+    ITDB_IPOD_MODEL_MINI_BLUE,
+    ITDB_IPOD_MODEL_MINI_PINK,
+    ITDB_IPOD_MODEL_MINI_GREEN,
+    ITDB_IPOD_MODEL_MINI_GOLD,
+    ITDB_IPOD_MODEL_SHUFFLE,
+    ITDB_IPOD_MODEL_NANO_WHITE,
+    ITDB_IPOD_MODEL_NANO_BLACK,
+    ITDB_IPOD_MODEL_VIDEO_WHITE,
+    ITDB_IPOD_MODEL_VIDEO_BLACK,
+    ITDB_IPOD_MODEL_MOBILE_1,
+    ITDB_IPOD_MODEL_VIDEO_U2,
+    ITDB_IPOD_MODEL_NANO_SILVER,
+    ITDB_IPOD_MODEL_NANO_BLUE,
+    ITDB_IPOD_MODEL_NANO_GREEN,
+    ITDB_IPOD_MODEL_NANO_PINK,
+    ITDB_IPOD_MODEL_NANO_RED,
+    ITDB_IPOD_MODEL_NANO_YELLOW,
+    ITDB_IPOD_MODEL_NANO_PURPLE,
+    ITDB_IPOD_MODEL_NANO_ORANGE,
+    ITDB_IPOD_MODEL_IPHONE_1,
+    ITDB_IPOD_MODEL_SHUFFLE_SILVER,
+    ITDB_IPOD_MODEL_SHUFFLE_PINK,
+    ITDB_IPOD_MODEL_SHUFFLE_BLUE,
+    ITDB_IPOD_MODEL_SHUFFLE_GREEN,
+    ITDB_IPOD_MODEL_SHUFFLE_ORANGE,
+    ITDB_IPOD_MODEL_SHUFFLE_PURPLE,
+    ITDB_IPOD_MODEL_SHUFFLE_RED,
+    ITDB_IPOD_MODEL_CLASSIC_SILVER,
+    ITDB_IPOD_MODEL_CLASSIC_BLACK,
+    ITDB_IPOD_MODEL_TOUCH_BLACK,
+} Itdb_IpodModel;
+</programlisting>
+<para>
+iPod model information</para>
+<para>
+
+</para><variablelist role="enum">
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-INVALID:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_INVALID</literal></term>
+<listitem><simpara>        Invalid model
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-UNKNOWN:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_UNKNOWN</literal></term>
+<listitem><simpara>        Unknown model
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-COLOR:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_COLOR</literal></term>
+<listitem><simpara>          Color iPod
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-COLOR-U2:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_COLOR_U2</literal></term>
+<listitem><simpara>       Color iPod (U2)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-REGULAR:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_REGULAR</literal></term>
+<listitem><simpara>        Regular iPod
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-REGULAR-U2:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_REGULAR_U2</literal></term>
+<listitem><simpara>     Regular iPod (U2)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-MINI:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_MINI</literal></term>
+<listitem><simpara>           iPod Mini
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-MINI-BLUE:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_MINI_BLUE</literal></term>
+<listitem><simpara>      iPod Mini (Blue)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-MINI-PINK:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_MINI_PINK</literal></term>
+<listitem><simpara>      iPod Mini (Pink)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-MINI-GREEN:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_MINI_GREEN</literal></term>
+<listitem><simpara>     iPod Mini (Green)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-MINI-GOLD:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_MINI_GOLD</literal></term>
+<listitem><simpara>      iPod Mini (Gold)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-SHUFFLE:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_SHUFFLE</literal></term>
+<listitem><simpara>        iPod Shuffle
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-NANO-WHITE:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_NANO_WHITE</literal></term>
+<listitem><simpara>     iPod Nano (White)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-NANO-BLACK:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_NANO_BLACK</literal></term>
+<listitem><simpara>     iPod Nano (Black)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-VIDEO-WHITE:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_VIDEO_WHITE</literal></term>
+<listitem><simpara>    iPod Video (White)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-VIDEO-BLACK:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_VIDEO_BLACK</literal></term>
+<listitem><simpara>    iPod Video (Black)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-MOBILE-1:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_MOBILE_1</literal></term>
+<listitem><simpara>       Mobile iPod
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-VIDEO-U2:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_VIDEO_U2</literal></term>
+<listitem><simpara>       iPod Video (U2)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-NANO-SILVER:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_NANO_SILVER</literal></term>
+<listitem><simpara>    iPod Nano (Silver)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-NANO-BLUE:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_NANO_BLUE</literal></term>
+<listitem><simpara>      iPod Nano (Blue)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-NANO-GREEN:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_NANO_GREEN</literal></term>
+<listitem><simpara>     iPod Nano (Green)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-NANO-PINK:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_NANO_PINK</literal></term>
+<listitem><simpara>      iPod Nano (Pink)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-NANO-RED:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_NANO_RED</literal></term>
+<listitem><simpara>       iPod Nano (Red)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-NANO-YELLOW:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_NANO_YELLOW</literal></term>
+<listitem><simpara>    iPod Nano (Yellow)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-NANO-PURPLE:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_NANO_PURPLE</literal></term>
+<listitem><simpara>    iPod Nano (Purple)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-NANO-ORANGE:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_NANO_ORANGE</literal></term>
+<listitem><simpara>    iPod Nano (Orange)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-IPHONE-1:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_IPHONE_1</literal></term>
+<listitem><simpara>       iPhone
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-SHUFFLE-SILVER:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_SHUFFLE_SILVER</literal></term>
+<listitem><simpara> iPod Shuffle (Silver)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-SHUFFLE-PINK:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_SHUFFLE_PINK</literal></term>
+<listitem><simpara>   iPod Shuffle (Pink)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-SHUFFLE-BLUE:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_SHUFFLE_BLUE</literal></term>
+<listitem><simpara>   iPod Shuffle (Blue)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-SHUFFLE-GREEN:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_SHUFFLE_GREEN</literal></term>
+<listitem><simpara>  iPod Shuffle (Green)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-SHUFFLE-ORANGE:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_SHUFFLE_ORANGE</literal></term>
+<listitem><simpara> iPod Shuffle (Orange)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-SHUFFLE-PURPLE:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_SHUFFLE_PURPLE</literal></term>
+<listitem><simpara> iPod Shuffle (Purple)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-SHUFFLE-RED:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_SHUFFLE_RED</literal></term>
+<listitem><simpara>    iPod Shuffle (Red)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-CLASSIC-SILVER:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_CLASSIC_SILVER</literal></term>
+<listitem><simpara> iPod Classic (Silver)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-CLASSIC-BLACK:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_CLASSIC_BLACK</literal></term>
+<listitem><simpara>  iPod Classic (Black)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-IPOD-MODEL-TOUCH-BLACK:CAPS" role="constant"/><literal>ITDB_IPOD_MODEL_TOUCH_BLACK</literal></term>
+<listitem><simpara>    iPod Touch (Black)
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-info-get-ipod-model-name-string" role="function" condition="since:0.4.0"/>itdb_info_get_ipod_model_name_string ()</title>
+<indexterm role="0.4.0"><primary>itdb_info_get_ipod_model_name_string</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>*        itdb_info_get_ipod_model_name_string
+                                                        (<link linkend="Itdb-IpodModel">Itdb_IpodModel</link> model);</programlisting>
+<para>
+Return the iPod's generic model name, like "Color", "Nano"...</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>model</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-IpodModel"><type>Itdb_IpodModel</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a pointer to the model name. This is a static string
+and must not be <link linkend="g-free"><function>g_free()</function></link>d.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="Itdb-ArtworkFormat" role="struct"/>Itdb_ArtworkFormat</title>
+<indexterm><primary>Itdb_ArtworkFormat</primary></indexterm><programlisting>typedef struct {
+        gint format_id;
+        gint width;
+        gint height;
+        ItdbThumbFormat format;
+        gint32 padding;
+        gboolean crop;
+        gint rotation;
+        guchar back_color[4];
+
+        gint display_width;
+        gboolean interlaced;
+        gboolean align_row_bytes;
+        gint color_adjustment;
+        gdouble gamma;
+        gint associated_format;
+} Itdb_ArtworkFormat;
+</programlisting>
+<para>
+Structure representing the characteristics of the thumbnails to
+write to a given .ithmb file. The format of the structure is based
+on the way artwork formats are written to SysInfoExtended.</para>
+<para>
+
+</para><variablelist role="struct">
+<varlistentry>
+<term><link linkend="gint">gint</link>&nbsp;<structfield>format_id</structfield>;</term>
+<listitem><simpara>          Unique ID for the format (generally a 4 digit int)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint">gint</link>&nbsp;<structfield>width</structfield>;</term>
+<listitem><simpara>              Width of the thumbnail
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint">gint</link>&nbsp;<structfield>height</structfield>;</term>
+<listitem><simpara>             Height of the thumbnail
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="ItdbThumbFormat">ItdbThumbFormat</link>&nbsp;<structfield>format</structfield>;</term>
+<listitem><simpara>             Pixel format of the thumbnail (RGB, YUV, ...)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>padding</structfield>;</term>
+<listitem><simpara>            Number of bytes of padding to add after the thumbnail
+                     (not found in SysInfoExtended -- added for
+                     compatibility with hardcoded artwork formats)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gboolean">gboolean</link>&nbsp;<structfield>crop</structfield>;</term>
+<listitem><simpara>               Indicates if the thumbnail is to be cropped
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint">gint</link>&nbsp;<structfield>rotation</structfield>;</term>
+<listitem><simpara>           Degrees to rotate the thumbnail
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guchar">guchar</link>&nbsp;<structfield>back_color</structfield>[4];</term>
+<listitem><simpara>         Background color for the thumbnail
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint">gint</link>&nbsp;<structfield>display_width</structfield>;</term>
+<listitem><simpara>      Width at which the thumbnail will be displayed
+                     (not currently used)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gboolean">gboolean</link>&nbsp;<structfield>interlaced</structfield>;</term>
+<listitem><simpara>         If TRUE, the thumbnails are interlaced
+                     (not currently used)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gboolean">gboolean</link>&nbsp;<structfield>align_row_bytes</structfield>;</term>
+<listitem><simpara>    If TRUE, each pixel row must be aligned a 2-byte boundary
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint">gint</link>&nbsp;<structfield>color_adjustment</structfield>;</term>
+<listitem><simpara>   Color adjustment for the thumbnails
+                     (not currently used)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gdouble">gdouble</link>&nbsp;<structfield>gamma</structfield>;</term>
+<listitem><simpara>              Gamma value for the thumbails
+                     (not currently used)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint">gint</link>&nbsp;<structfield>associated_format</structfield>;</term>
+<listitem><simpara>  Unknown (not currently used)
+</simpara></listitem>
+</varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-device-read-sysinfo" role="function" condition="since:0.4.0"/>itdb_device_read_sysinfo ()</title>
+<indexterm role="0.4.0"><primary>itdb_device_read_sysinfo</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_device_read_sysinfo            (<link linkend="Itdb-Device">Itdb_Device</link> *device);</programlisting>
+<para>
+Reads the SysInfo file and stores information in device->sysinfo for
+later use.
+</para>
+<para>
+<warning><para>Calling this function invalidates all the artwork in the
+<link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> database using this <link linkend="Itdb-Device"><type>Itdb_Device</type></link>. Trying to access this
+artwork will result in memory corruption. Directly calling this function
+shouldn't ever be needed and it will be deprecated
+soon.</para></warning>.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>device</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Device"><type>Itdb_Device</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if file could be read, FALSE otherwise 
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-device-get-sysinfo" role="function" condition="since:0.4.0"/>itdb_device_get_sysinfo ()</title>
+<indexterm role="0.4.0"><primary>itdb_device_get_sysinfo</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_device_get_sysinfo             (const <link linkend="Itdb-Device">Itdb_Device</link> *device,
+                                                         const <link linkend="gchar">gchar</link> *field);</programlisting>
+<para>
+Retrieve specified field from the SysInfo file.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>device</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Device"><type>Itdb_Device</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>field</parameter>&nbsp;:</term>
+<listitem><simpara>  field to retrive information from
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the information associated with <parameter>field</parameter>, or NULL if <parameter>field</parameter>
+couldn't be found. <link linkend="g-free"><function>g_free()</function></link> after use
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-device-set-sysinfo" role="function" condition="since:0.4.0"/>itdb_device_set_sysinfo ()</title>
+<indexterm role="0.4.0"><primary>itdb_device_set_sysinfo</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_device_set_sysinfo             (<link linkend="Itdb-Device">Itdb_Device</link> *device,
+                                                         const <link linkend="gchar">gchar</link> *field,
+                                                         const <link linkend="gchar">gchar</link> *value);</programlisting>
+<para>
+Set specified field. It can later be written to the iPod using
+<link linkend="itdb-device-write-sysinfo"><function>itdb_device_write_sysinfo()</function></link></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>device</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Device"><type>Itdb_Device</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>field</parameter>&nbsp;:</term>
+<listitem><simpara>  field to set
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>value</parameter>&nbsp;:</term>
+<listitem><simpara>  value to set (or NULL to remove the field).
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-device-write-sysinfo" role="function" condition="since:0.4.0"/>itdb_device_write_sysinfo ()</title>
+<indexterm role="0.4.0"><primary>itdb_device_write_sysinfo</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_device_write_sysinfo           (<link linkend="Itdb-Device">Itdb_Device</link> *device,
+                                                         <link linkend="GError">GError</link> **error);</programlisting>
+<para>
+Fills the SysInfo file with information in device->sysinfo. Note:
+no directories are created if not already existent.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>device</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Device"><type>Itdb_Device</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
+<listitem><simpara>  return location for a <link linkend="GError"><type>GError</type></link> or NULL
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if file could be read, FALSE otherwise 
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+
+</refsect1>
+
+
+
+
+
+<refsect1><refsect2 /><refsect2 /></refsect1>
+</refentry>

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/itunesdb-copying.xml
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/itunesdb-copying.xml	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/itunesdb-copying.xml	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,209 @@
+<?xml version="1.0"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
+               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<refentry id="libgpod-File-handling-functions">
+<refmeta>
+<refentrytitle role="top_of_page">File handling functions</refentrytitle>
+<manvolnum>3</manvolnum>
+<refmiscinfo>LIBGPOD Library</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+<refname>File handling functions</refname>
+<refpurpose>Managing files on the iPod</refpurpose>
+<!--[<xref linkend="desc" endterm="desc.title"/>]-->
+</refnamediv>
+
+<refsynopsisdiv role="synopsis">
+<title role="synopsis.title">Synopsis</title>
+
+<synopsis>
+
+
+
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-cp-track-to-ipod">itdb_cp_track_to_ipod</link>               (<link linkend="Itdb-Track">Itdb_Track</link> *track,
+                                                         const <link linkend="gchar">gchar</link> *filename,
+                                                         <link linkend="GError">GError</link> **error);
+<link linkend="void">void</link>                <link linkend="itdb-filename-fs2ipod">itdb_filename_fs2ipod</link>               (<link linkend="gchar">gchar</link> *filename);
+<link linkend="void">void</link>                <link linkend="itdb-filename-ipod2fs">itdb_filename_ipod2fs</link>               (<link linkend="gchar">gchar</link> *ipod_file);
+<link linkend="gchar">gchar</link>*              <link linkend="itdb-filename-on-ipod">itdb_filename_on_ipod</link>               (<link linkend="Itdb-Track">Itdb_Track</link> *track);
+<link linkend="gint">gint</link>                <link linkend="itdb-musicdirs-number">itdb_musicdirs_number</link>               (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-rename-files">itdb_rename_files</link>                   (const <link linkend="gchar">gchar</link> *mp,
+                                                         <link linkend="GError">GError</link> **error);
+</synopsis>
+</refsynopsisdiv>
+
+
+
+
+
+
+
+
+
+<refsect1 role="desc">
+<title role="desc.title">Description</title>
+<para>
+These functions are for copying, renaming, and retrieving information
+about the files and directories on the iPod.
+</para>
+</refsect1>
+
+<refsect1 role="details">
+<title role="details.title">Details</title>
+<refsect2>
+<title><anchor id="itdb-cp-track-to-ipod" role="function"/>itdb_cp_track_to_ipod ()</title>
+<indexterm><primary>itdb_cp_track_to_ipod</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_cp_track_to_ipod               (<link linkend="Itdb-Track">Itdb_Track</link> *track,
+                                                         const <link linkend="gchar">gchar</link> *filename,
+                                                         <link linkend="GError">GError</link> **error);</programlisting>
+<para>
+Copy one track to the iPod. The PC filename is <parameter>filename</parameter>
+and is taken literally.
+</para>
+<para>
+The mountpoint of the iPod (in local encoding) must have been set
+with <link linkend="itdb-set-mountpoint"><function>itdb_set_mountpoint()</function></link> (done automatically when reading an
+iTunesDB).
+</para>
+<para>
+If <parameter>track->transferred</parameter> is set to TRUE, nothing is done. Upon
+successful transfer <parameter>track->transferred</parameter> is set to TRUE.
+</para>
+<para>
+For storage, the directories "F00 ... Fnn" will be used randomly.
+</para>
+<para>
+The filename is constructed as "libgpod<parameter>random_number</parameter>" and copied
+to <parameter>track->ipod_path</parameter>. If this file already exists, <parameter>random_number</parameter>
+is adjusted until an unused filename is found.
+</para>
+<para>
+If <parameter>track->ipod_path</parameter> is already set, this one will be used
+instead. If a file with this name already exists, it will be
+overwritten.
+</para>
+<para>
+<parameter>track->filetype_marker</parameter> is set according to the filename extension</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>track</parameter>&nbsp;:</term>
+<listitem><simpara>      the <link linkend="Itdb-Track"><type>Itdb_Track</type></link> to copy (containing <parameter>filename</parameter> metadata)
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>filename</parameter>&nbsp;:</term>
+<listitem><simpara>   the source file
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
+<listitem><simpara>      return location for a <link linkend="GError"><type>GError</type></link> or NULL
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success, FALSE on error, in which case <parameter>error</parameter> is
+set accordingly.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-filename-fs2ipod" role="function"/>itdb_filename_fs2ipod ()</title>
+<indexterm><primary>itdb_filename_fs2ipod</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_filename_fs2ipod               (<link linkend="gchar">gchar</link> *filename);</programlisting>
+<para>
+Convert string from casual PC file name to iPod iTunesDB format
+using ':' instead of G_DIR_SEPARATOR_S (i.e. slashes on Unix-like
+systems). <parameter>ipod_file</parameter> is modified in place.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>filename</parameter>&nbsp;:</term>
+<listitem><simpara> a 'PC-style' filename (eg /iPod_Control/Music/f00/test.mp3)
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-filename-ipod2fs" role="function"/>itdb_filename_ipod2fs ()</title>
+<indexterm><primary>itdb_filename_ipod2fs</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_filename_ipod2fs               (<link linkend="gchar">gchar</link> *ipod_file);</programlisting>
+<para>
+Convert string from from iPod iTunesDB format to casual PC file
+name using G_DIR_SEPARATOR (ie slashes on Unix-like systems)
+instead of ':'.  <parameter>ipod_file</parameter> is modified in place.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>ipod_file</parameter>&nbsp;:</term>
+<listitem><simpara> a 'PC-style' filename (eg /iPod_Control/Music/f00/test.mp3)
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-filename-on-ipod" role="function"/>itdb_filename_on_ipod ()</title>
+<indexterm><primary>itdb_filename_on_ipod</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_filename_on_ipod               (<link linkend="Itdb-Track">Itdb_Track</link> *track);</programlisting>
+<para>
+Get the full iPod filename as stored in <parameter>track</parameter>.
+</para>
+<para>
+<note>
+NULL is returned when the file does not exist.
+</note>
+</para>
+<para>
+<note>
+This code works around a problem on some systems (see
+<link linkend="itdb-resolve-path"><function>itdb_resolve_path()</function></link>) and might return a filename with different
+case than the original filename. Don't copy it back to <parameter>track</parameter> if
+you can avoid it.
+</note></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>track</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> full filename to <parameter>track</parameter> on the iPod or NULL if no
+filename is set in <parameter>track</parameter>. Must be freed with <link linkend="g-free"><function>g_free()</function></link> after use.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-musicdirs-number" role="function" condition="since:0.1.3"/>itdb_musicdirs_number ()</title>
+<indexterm role="0.1.3"><primary>itdb_musicdirs_number</primary></indexterm><programlisting><link linkend="gint">gint</link>                itdb_musicdirs_number               (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);</programlisting>
+<para>
+Determine the number of F.. directories in iPod_Control/Music.
+</para>
+<para>
+If <parameter>itdb->musicdirs</parameter> is already set, simply return the previously
+determined number. Otherwise count the directories first and set
+<parameter>itdb->musicdirs</parameter>.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> max number of directories in iPod_Control/Music
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.1.3
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-rename-files" role="function"/>itdb_rename_files ()</title>
+<indexterm><primary>itdb_rename_files</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_rename_files                   (const <link linkend="gchar">gchar</link> *mp,
+                                                         <link linkend="GError">GError</link> **error);</programlisting>
+<para>
+Renames/removes some files on the iPod (Playcounts, OTG
+semaphore). May have to be called if you write the iTunesDB not
+directly to the iPod but to some other location and then manually
+copy the file from there to the iPod.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>mp</parameter>&nbsp;:</term>
+<listitem><simpara>     mount point of the iPod
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
+<listitem><simpara>  return location for a <link linkend="GError"><type>GError</type></link> or NULL
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> FALSE on error and sets <parameter>error</parameter> accordingly
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+
+</refsect1>
+
+
+
+
+
+<refsect1><refsect2 /><refsect2 /></refsect1>
+</refentry>

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/itunesdb-db.xml
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/itunesdb-db.xml	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/itunesdb-db.xml	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,504 @@
+<?xml version="1.0"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
+               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<refentry id="libgpod-The-Itdb-iTunesDB-structure">
+<refmeta>
+<refentrytitle role="top_of_page">iPod database reading/writing</refentrytitle>
+<manvolnum>3</manvolnum>
+<refmiscinfo>LIBGPOD Library</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+<refname>iPod database reading/writing</refname>
+<refpurpose>Functions to read, write, and create an iPod database</refpurpose>
+<!--[<xref linkend="desc" endterm="desc.title"/>]-->
+</refnamediv>
+
+<refsynopsisdiv role="synopsis">
+<title role="synopsis.title">Synopsis</title>
+
+<synopsis>
+
+
+
+                    <link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link>;
+enum                <link linkend="ItdbFileError">ItdbFileError</link>;
+<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link>*      <link linkend="itdb-new">itdb_new</link>                            (void);
+<link linkend="void">void</link>                <link linkend="itdb-free">itdb_free</link>                           (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);
+<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link>*      <link linkend="itdb-parse">itdb_parse</link>                          (const <link linkend="gchar">gchar</link> *mp,
+                                                         <link linkend="GError">GError</link> **error);
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-write">itdb_write</link>                          (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
+                                                         <link linkend="GError">GError</link> **error);
+<link linkend="void">void</link>                <link linkend="itdb-set-mountpoint">itdb_set_mountpoint</link>                 (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
+                                                         const <link linkend="gchar">gchar</link> *mp);
+const <link linkend="gchar">gchar</link>*        <link linkend="itdb-get-mountpoint">itdb_get_mountpoint</link>                 (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-init-ipod">itdb_init_ipod</link>                      (const <link linkend="gchar">gchar</link> *mountpoint,
+                                                         const <link linkend="gchar">gchar</link> *model_number,
+                                                         const <link linkend="gchar">gchar</link> *ipod_name,
+                                                         <link linkend="GError">GError</link> **error);
+<link linkend="guint32">guint32</link>             <link linkend="itdb-tracks-number">itdb_tracks_number</link>                  (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);
+<link linkend="guint32">guint32</link>             <link linkend="itdb-tracks-number-nontransferred">itdb_tracks_number_nontransferred</link>   (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);
+<link linkend="guint32">guint32</link>             <link linkend="itdb-playlists-number">itdb_playlists_number</link>               (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);
+<link linkend="void">void</link>                (<link linkend="ItdbUserDataDestroyFunc">*ItdbUserDataDestroyFunc</link>)          (<link linkend="gpointer">gpointer</link> userdata);
+<link linkend="gpointer">gpointer</link>            (<link linkend="ItdbUserDataDuplicateFunc">*ItdbUserDataDuplicateFunc</link>)        (<link linkend="gpointer">gpointer</link> userdata);
+</synopsis>
+</refsynopsisdiv>
+
+
+
+
+
+
+
+
+
+<refsect1 role="desc">
+<title role="desc.title">Description</title>
+<para>
+These functions are for reading, writing, creating, and deleting an iPod
+database and getting the total number of tracks and playlists.
+</para>
+<para>
+Overview of using an iPod database:
+</para>
+<para>
+<link linkend="itdb-parse"><function>itdb_parse()</function></link>: read the iTunesDB and ArtworkDB
+</para>
+<para>
+<link linkend="itdb-write"><function>itdb_write()</function></link>: write the iTunesDB and ArtworkDB
+</para>
+<para>
+<link linkend="itdb-parse"><function>itdb_parse()</function></link> will return a <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> structure with GLists
+containing all tracks the playlists in the database.  Each track is
+represented by an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>.   Each playlist is represented by an
+<link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>.  See the <link linkend="libgpod-Tracks">Tracks</link>
+and <link linkend="libgpod-Playlists">Playlists</link> sections for
+details on tracks and playlists, respectively.
+</para>
+<para>
+Each <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link> has a GList called <parameter>members</parameter> which contains all of
+the tracks in the playlist.  Tracks referenced in a playlist must also
+be present in the <parameter>tracks</parameter> GList of the <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>.
+</para>
+<para>
+The iPod must contain one master playlist (MPL) containing all tracks
+accessible on the iPod through the Music->Tracks/Albums/Artists/etc.
+menu.  In addition to the MPL there can be a number of normal
+playlists accessible through the Music->Playlists menu on the iPod.
+Tracks that are a member of one of these normal playlists must also be
+a member of the MPL.
+</para>
+<para>
+The Podcasts playlist is just another playlist with some internal
+flags set differently.  Tracks in the Podcasts playlist are not
+normally members of the MPL (so on the iPod they will only show up
+under the Podcasts menu). All tracks referenced must be in the
+<parameter>tracks</parameter> GList of the <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>, however.
+</para>
+<para>
+Each track may have a thumbnail associated with it. You can retrieve a
+<link linkend="GdkPixmap"><type>GdkPixmap</type></link> of the thumbnail using <link linkend="itdb-artwork-get-pixbuf"><function>itdb_artwork_get_pixbuf()</function></link>.  A
+thumbnail can be added with <link linkend="itdb-track-set-thumbnails"><function>itdb_track_set_thumbnails()</function></link>.  A thumbnail
+can be removed with <link linkend="itdb-track-remove-thumbnails"><function>itdb_track_remove_thumbnails()</function></link>.  Please see the
+<link linkend="libgpod-Artwork">Artwork</link> section for more
+details on artwork related functions and structures.
+</para>
+<note>
+<para>
+Be aware that iTunes additionally stores the artwork as tags
+in the original music file. That's also from where the data is
+read when artwork is displayed in iTunes, and there can be more
+than one piece of artwork. libgpod does not store the artwork as
+tags in the original music file. As a consequence, if iTunes
+attempts to access the artwork, it will find none, and remove
+libgpod's artwork. Luckily, iTunes will only attempt to access
+the artwork if you select a track in iTunes.  To work around
+this, gtkpod keeps a list of the original filename of all
+artwork and silently adds the thumbnails if they were 'lost'.
+Your application might want to do something similar, or you can
+supply patches for (optionally!) adding tags to the original music
+files.
+</para>
+</note>
+<para>
+The <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>, <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link> and <link linkend="Itdb-Track"><type>Itdb_Track</type></link> structures each
+have <parameter>userdata</parameter> and <parameter>usertype</parameter> fields that can be used by the
+application to store additional application-specific data. If
+<parameter>userdata</parameter> is a pointer to an external structure, you can supply a
+<link linkend="ItdbUserDataDuplicateFunc"><type>ItdbUserDataDuplicateFunc</type></link> and a <link linkend="ItdbUserDataDestroyFunc"><type>ItdbUserDataDestroyFunc</type></link> so that this
+data can be duplicated or freed automatically with a call to the
+library <link linkend="duplicate"><function>_duplicate()</function></link>/<link linkend="free"><function>_free()</function></link> functions.
+</para>
+</refsect1>
+
+<refsect1 role="details">
+<title role="details.title">Details</title>
+<refsect2>
+<title><anchor id="Itdb-iTunesDB" role="struct"/>Itdb_iTunesDB</title>
+<indexterm><primary>Itdb_iTunesDB</primary></indexterm><programlisting>typedef struct {
+    GList *tracks;
+    GList *playlists;
+    gchar *filename;
+    Itdb_Device *device;
+    guint32 version;
+    guint64 id;
+    /* reserved for future use */
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+    /* below is for use by application */
+    guint64 usertype;
+    gpointer userdata;
+    /* functions called to duplicate/free userdata */
+    ItdbUserDataDuplicateFunc userdata_duplicate;
+    ItdbUserDataDestroyFunc userdata_destroy;
+} Itdb_iTunesDB;
+</programlisting>
+<para>
+Structure representing an iTunes database</para>
+<para>
+
+</para><variablelist role="struct">
+<varlistentry>
+<term><link linkend="GList">GList</link>&nbsp;*<structfield>tracks</structfield>;</term>
+<listitem><simpara>             A list of tracks in the database (<link linkend="Itdb-Track"><type>Itdb_Track</type></link>)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="GList">GList</link>&nbsp;*<structfield>playlists</structfield>;</term>
+<listitem><simpara>          A list of playlists in the database (<link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>filename</structfield>;</term>
+<listitem><simpara>           The filename of the iTunesDB
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="Itdb-Device">Itdb_Device</link>&nbsp;*<structfield>device</structfield>;</term>
+<listitem><simpara>             iPod device info (<link linkend="Itdb-Device"><type>Itdb_Device</type></link>)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>version</structfield>;</term>
+<listitem><simpara>            The version number of the iTunesDB
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint64">guint64</link>&nbsp;<structfield>id</structfield>;</term>
+<listitem><simpara>                 A 64 bit id value for the iTunesDB
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int1</structfield>;</term>
+<listitem><simpara>      Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int2</structfield>;</term>
+<listitem><simpara>      Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved1</structfield>;</term>
+<listitem><simpara>          Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved2</structfield>;</term>
+<listitem><simpara>          Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint64">guint64</link>&nbsp;<structfield>usertype</structfield>;</term>
+<listitem><simpara>           For use by application
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>userdata</structfield>;</term>
+<listitem><simpara>           For use by application
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="ItdbUserDataDuplicateFunc">ItdbUserDataDuplicateFunc</link>&nbsp;<structfield>userdata_duplicate</structfield>;</term>
+<listitem><simpara> A function to duplicate <link linkend="userdata"><type>userdata</type></link>
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="ItdbUserDataDestroyFunc">ItdbUserDataDestroyFunc</link>&nbsp;<structfield>userdata_destroy</structfield>;</term>
+<listitem><simpara>   A function to free <link linkend="userdata"><type>userdata</type></link>
+</simpara></listitem>
+</varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="ItdbFileError" role="enum"/>enum ItdbFileError</title>
+<indexterm><primary>ItdbFileError</primary></indexterm><programlisting>typedef enum
+{
+    ITDB_FILE_ERROR_SEEK,
+    ITDB_FILE_ERROR_CORRUPT,
+    ITDB_FILE_ERROR_NOTFOUND,
+    ITDB_FILE_ERROR_RENAME,
+    ITDB_FILE_ERROR_ITDB_CORRUPT
+} ItdbFileError;
+</programlisting>
+<para>
+Error codes for iTunesDB file</para>
+<para>
+
+</para><variablelist role="enum">
+<varlistentry>
+<term><anchor id="ITDB-FILE-ERROR-SEEK:CAPS" role="constant"/><literal>ITDB_FILE_ERROR_SEEK</literal></term>
+<listitem><simpara>         file corrupt: illegal seek occured
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-FILE-ERROR-CORRUPT:CAPS" role="constant"/><literal>ITDB_FILE_ERROR_CORRUPT</literal></term>
+<listitem><simpara>      file corrupt
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-FILE-ERROR-NOTFOUND:CAPS" role="constant"/><literal>ITDB_FILE_ERROR_NOTFOUND</literal></term>
+<listitem><simpara>     file not found
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-FILE-ERROR-RENAME:CAPS" role="constant"/><literal>ITDB_FILE_ERROR_RENAME</literal></term>
+<listitem><simpara>       file could not be renamed
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-FILE-ERROR-ITDB-CORRUPT:CAPS" role="constant"/><literal>ITDB_FILE_ERROR_ITDB_CORRUPT</literal></term>
+<listitem><simpara> iTunesDB in memory corrupt
+</simpara></listitem>
+</varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-new" role="function"/>itdb_new ()</title>
+<indexterm><primary>itdb_new</primary></indexterm><programlisting><link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link>*      itdb_new                            (void);</programlisting>
+<para>
+Creates a new Itdb_iTunesDB with the unknowns filled in to reasonable
+values.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a newly created Itdb_iTunesDB to be freed with <link linkend="itdb-free"><function>itdb_free()</function></link>
+when it's no longer needed
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-free" role="function"/>itdb_free ()</title>
+<indexterm><primary>itdb_free</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_free                           (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);</programlisting>
+<para>
+Free the memory taken by <parameter>itdb</parameter>.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-parse" role="function"/>itdb_parse ()</title>
+<indexterm><primary>itdb_parse</primary></indexterm><programlisting><link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link>*      itdb_parse                          (const <link linkend="gchar">gchar</link> *mp,
+                                                         <link linkend="GError">GError</link> **error);</programlisting>
+<para>
+Parse the Itdb_iTunesDB of the iPod located at <parameter>mp</parameter></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>mp</parameter>&nbsp;:</term>
+<listitem><simpara>     mount point of the iPod (eg "/mnt/ipod") in local encoding
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
+<listitem><simpara>  return location for a <link linkend="GError"><type>GError</type></link> or NULL
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a newly allocated <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> struct holding the tracks and
+the playlists present on the iPod at <parameter>mp</parameter>, NULL if <parameter>mp</parameter> isn't an iPod mount
+point. If non-NULL, the <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> is to be freed with <link linkend="itdb-free"><function>itdb_free()</function></link> when
+it's no longer needed
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-write" role="function"/>itdb_write ()</title>
+<indexterm><primary>itdb_write</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_write                          (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
+                                                         <link linkend="GError">GError</link> **error);</programlisting>
+<para>
+Write out an iTunesDB. It reassigns unique IDs to all tracks. 
+An existing "Play Counts" file is renamed to "Play Counts.bak" if
+the export was successful.
+An existing "OTGPlaylistInfo" file is removed if the export was
+successful.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
+<listitem><simpara>   the <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> to write to disk
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
+<listitem><simpara>  return location for a <link linkend="GError"><type>GError</type></link> or NULL
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success, FALSE on error, in which case <parameter>error</parameter> is
+set accordingly.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-set-mountpoint" role="function" condition="since:0.1.3"/>itdb_set_mountpoint ()</title>
+<indexterm role="0.1.3"><primary>itdb_set_mountpoint</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_set_mountpoint                 (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
+                                                         const <link linkend="gchar">gchar</link> *mp);</programlisting>
+<para>
+Sets the mountpoint of <parameter>itdb</parameter>. Always use this function to set the
+mountpoint of an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> as it will reset the number of
+available /iPod_Control/Music/F.. dirs. It doesn't attempt to parse
+an iPod database that may be present on the iPod at <parameter>mp</parameter>.
+</para>
+<para>
+<note><para>Calling this function removes the artwork in the
+<link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> database using this <link linkend="Itdb-Device"><type>Itdb_Device</type></link> which was read from the
+iPod.</para></note>.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
+<listitem><simpara>   an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>mp</parameter>&nbsp;:</term>
+<listitem><simpara>     new mount point
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.1.3
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-get-mountpoint" role="function" condition="since:0.4.0"/>itdb_get_mountpoint ()</title>
+<indexterm role="0.4.0"><primary>itdb_get_mountpoint</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>*        itdb_get_mountpoint                 (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);</programlisting>
+<para>
+Retrieve a reference to the mountpoint of <parameter>itdb</parameter></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the <parameter>itdb</parameter> mountpoint, this string shouldn't be freed
+nor modified
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-init-ipod" role="function" condition="since:0.4.0"/>itdb_init_ipod ()</title>
+<indexterm role="0.4.0"><primary>itdb_init_ipod</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_init_ipod                      (const <link linkend="gchar">gchar</link> *mountpoint,
+                                                         const <link linkend="gchar">gchar</link> *model_number,
+                                                         const <link linkend="gchar">gchar</link> *ipod_name,
+                                                         <link linkend="GError">GError</link> **error);</programlisting>
+<para>
+Initialise an iPod device from scratch. The function attempts to
+create a blank database, complete with master playlist and device
+information as well as the directory structure required for the
+type of iPod.
+<parameter>model_number</parameter> is used to tell libgpod about the exact iPod
+model, which is needed for proper artwork writing. <parameter>model_number</parameter> can be
+found from the table returned by itdb_device_get_ipod_info_table (for
+example). On recent distros with iPods released
+in the last few years (starting with the iPod Color), it should be fine
+to pass in a NULL <parameter>model_number</parameter> while still getting artwork writing.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>mountpoint</parameter>&nbsp;:</term>
+<listitem><simpara>   the iPod mountpoint
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>model_number</parameter>&nbsp;:</term>
+<listitem><simpara> the iPod model number, can be NULL
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>ipod_name</parameter>&nbsp;:</term>
+<listitem><simpara>    the name to give to the iPod. Will be displayed in
+               gtkpod or itunes
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
+<listitem><simpara>        return location for a <link linkend="GError"><type>GError</type></link> or NULL
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE when successful, FALSE if a failure has occurred.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-tracks-number" role="function"/>itdb_tracks_number ()</title>
+<indexterm><primary>itdb_tracks_number</primary></indexterm><programlisting><link linkend="guint32">guint32</link>             itdb_tracks_number                  (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);</programlisting>
+<para>
+Counts the number of tracks stored in <parameter>itdb</parameter></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the number of tracks in <parameter>itdb</parameter>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-tracks-number-nontransferred" role="function"/>itdb_tracks_number_nontransferred ()</title>
+<indexterm><primary>itdb_tracks_number_nontransferred</primary></indexterm><programlisting><link linkend="guint32">guint32</link>             itdb_tracks_number_nontransferred   (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);</programlisting>
+<para>
+Counts the number of non-transferred tracks in <parameter>itdb</parameter></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the number of tracks in <parameter>itdb</parameter> that haven't been transferred
+to the iPod yet (ie the number of <link linkend="Itdb-Track"><type>Itdb_Track</type></link> in which the transferred field
+is false)
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-playlists-number" role="function"/>itdb_playlists_number ()</title>
+<indexterm><primary>itdb_playlists_number</primary></indexterm><programlisting><link linkend="guint32">guint32</link>             itdb_playlists_number               (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);</programlisting>
+<para>
+Counts the number of playlists stored in <parameter>itdb</parameter></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the number of playlists in <parameter>itdb</parameter> (including the master 
+playlist)
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="ItdbUserDataDestroyFunc" role="function"/>ItdbUserDataDestroyFunc ()</title>
+<indexterm><primary>ItdbUserDataDestroyFunc</primary></indexterm><programlisting><link linkend="void">void</link>                (*ItdbUserDataDestroyFunc)          (<link linkend="gpointer">gpointer</link> userdata);</programlisting>
+<para>
+Function called to free userdata</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>userdata</parameter>&nbsp;:</term>
+<listitem><simpara> A <link linkend="gpointer"><type>gpointer</type></link> to user data
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="ItdbUserDataDuplicateFunc" role="function"/>ItdbUserDataDuplicateFunc ()</title>
+<indexterm><primary>ItdbUserDataDuplicateFunc</primary></indexterm><programlisting><link linkend="gpointer">gpointer</link>            (*ItdbUserDataDuplicateFunc)        (<link linkend="gpointer">gpointer</link> userdata);</programlisting>
+<para>
+Function called to duplicate userdata</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>userdata</parameter>&nbsp;:</term>
+<listitem><simpara> A <link linkend="gpointer"><type>gpointer</type></link> to user data
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> A <link linkend="gpointer"><type>gpointer</type></link>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+
+</refsect1>
+
+
+
+
+
+<refsect1><refsect2 /><refsect2 /></refsect1>
+</refentry>

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/itunesdb-lowlevel.xml
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/itunesdb-lowlevel.xml	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/itunesdb-lowlevel.xml	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,561 @@
+<?xml version="1.0"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
+               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<refentry id="libgpod-Low-level-functions">
+<refmeta>
+<refentrytitle role="top_of_page">Low-level functions</refentrytitle>
+<manvolnum>3</manvolnum>
+<refmiscinfo>LIBGPOD Library</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+<refname>Low-level functions</refname>
+<refpurpose>Low-level functions which shouldn't be needed in normal situations</refpurpose>
+<!--[<xref linkend="desc" endterm="desc.title"/>]-->
+</refnamediv>
+
+<refsynopsisdiv role="synopsis">
+<title role="synopsis.title">Synopsis</title>
+
+<synopsis>
+
+
+
+<link linkend="gchar">gchar</link>*              <link linkend="itdb-get-control-dir">itdb_get_control_dir</link>                (const <link linkend="gchar">gchar</link> *mountpoint);
+<link linkend="gchar">gchar</link>*              <link linkend="itdb-get-itunes-dir">itdb_get_itunes_dir</link>                 (const <link linkend="gchar">gchar</link> *mountpoint);
+<link linkend="gchar">gchar</link>*              <link linkend="itdb-get-music-dir">itdb_get_music_dir</link>                  (const <link linkend="gchar">gchar</link> *mountpoint);
+<link linkend="gchar">gchar</link>*              <link linkend="itdb-get-artwork-dir">itdb_get_artwork_dir</link>                (const <link linkend="gchar">gchar</link> *mountpoint);
+<link linkend="gchar">gchar</link>*              <link linkend="itdb-get-device-dir">itdb_get_device_dir</link>                 (const <link linkend="gchar">gchar</link> *mountpoint);
+<link linkend="gchar">gchar</link>*              <link linkend="itdb-get-photos-dir">itdb_get_photos_dir</link>                 (const <link linkend="gchar">gchar</link> *mountpoint);
+<link linkend="gchar">gchar</link>*              <link linkend="itdb-get-itunesdb-path">itdb_get_itunesdb_path</link>              (const <link linkend="gchar">gchar</link> *mountpoint);
+<link linkend="gchar">gchar</link>*              <link linkend="itdb-get-itunessd-path">itdb_get_itunessd_path</link>              (const <link linkend="gchar">gchar</link> *mountpoint);
+<link linkend="gchar">gchar</link>*              <link linkend="itdb-get-artworkdb-path">itdb_get_artworkdb_path</link>             (const <link linkend="gchar">gchar</link> *mountpoint);
+<link linkend="gchar">gchar</link>*              <link linkend="itdb-get-photodb-path">itdb_get_photodb_path</link>               (const <link linkend="gchar">gchar</link> *mountpoint);
+<link linkend="gchar">gchar</link>*              <link linkend="itdb-get-photos-thumb-dir">itdb_get_photos_thumb_dir</link>           (const <link linkend="gchar">gchar</link> *mountpoint);
+<link linkend="gchar">gchar</link>*              <link linkend="itdb-get-path">itdb_get_path</link>                       (const <link linkend="gchar">gchar</link> *dir,
+                                                         const <link linkend="gchar">gchar</link> *file);
+<link linkend="gchar">gchar</link>*              <link linkend="itdb-resolve-path">itdb_resolve_path</link>                   (const <link linkend="gchar">gchar</link> *root,
+                                                         const <link linkend="gchar">gchar</link> * const *components);
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-cp">itdb_cp</link>                             (const <link linkend="gchar">gchar</link> *from_file,
+                                                         const <link linkend="gchar">gchar</link> *to_file,
+                                                         <link linkend="GError">GError</link> **error);
+<link linkend="gchar">gchar</link>*              <link linkend="itdb-cp-get-dest-filename">itdb_cp_get_dest_filename</link>           (<link linkend="Itdb-Track">Itdb_Track</link> *track,
+                                                         const <link linkend="gchar">gchar</link> *mountpoint,
+                                                         const <link linkend="gchar">gchar</link> *filename,
+                                                         <link linkend="GError">GError</link> **error);
+<link linkend="Itdb-Track">Itdb_Track</link>*         <link linkend="itdb-cp-finalize">itdb_cp_finalize</link>                    (<link linkend="Itdb-Track">Itdb_Track</link> *track,
+                                                         const <link linkend="gchar">gchar</link> *mountpoint,
+                                                         const <link linkend="gchar">gchar</link> *dest_filename,
+                                                         <link linkend="GError">GError</link> **error);
+<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link>*      <link linkend="itdb-parse-file">itdb_parse_file</link>                     (const <link linkend="gchar">gchar</link> *filename,
+                                                         <link linkend="GError">GError</link> **error);
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-write-file">itdb_write_file</link>                     (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
+                                                         const <link linkend="gchar">gchar</link> *filename,
+                                                         <link linkend="GError">GError</link> **error);
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-shuffle-write">itdb_shuffle_write</link>                  (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
+                                                         <link linkend="GError">GError</link> **error);
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-shuffle-write-file">itdb_shuffle_write_file</link>             (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
+                                                         const <link linkend="gchar">gchar</link> *filename,
+                                                         <link linkend="GError">GError</link> **error);
+<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link>*      <link linkend="itdb-duplicate">itdb_duplicate</link>                      (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);
+</synopsis>
+</refsynopsisdiv>
+
+
+
+
+
+
+
+
+
+<refsect1 role="desc">
+<title role="desc.title">Description</title>
+<para>
+These functions are not normally needed but are avalable to allow for finer
+control over the iPod database.
+</para>
+</refsect1>
+
+<refsect1 role="details">
+<title role="details.title">Details</title>
+<refsect2>
+<title><anchor id="itdb-get-control-dir" role="function" condition="since:0.4.0"/>itdb_get_control_dir ()</title>
+<indexterm role="0.4.0"><primary>itdb_get_control_dir</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_get_control_dir                (const <link linkend="gchar">gchar</link> *mountpoint);</programlisting>
+<para>
+Get the i*_Control directory. Observed values are 'iPod_Control'
+for standard iPods and 'iTunes/iTunes_Control' for mobile
+applications.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>mountpoint</parameter>&nbsp;:</term>
+<listitem><simpara> the iPod mountpoint
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> path to the control dir or NULL if non-existent. Must
+<link linkend="g-free"><function>g_free()</function></link> after use.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-get-itunes-dir" role="function" condition="since:0.4.0"/>itdb_get_itunes_dir ()</title>
+<indexterm role="0.4.0"><primary>itdb_get_itunes_dir</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_get_itunes_dir                 (const <link linkend="gchar">gchar</link> *mountpoint);</programlisting>
+<para>
+Retrieve the iTunes directory (containing the iTunesDB) by first
+calling <link linkend="itdb-get-control-dir"><function>itdb_get_control_dir()</function></link> and then adding 'iTunes'</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>mountpoint</parameter>&nbsp;:</term>
+<listitem><simpara> the iPod mountpoint
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> path to the iTunes directory or NULL if non-existent.
+Must <link linkend="g-free"><function>g_free()</function></link> after use.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-get-music-dir" role="function"/>itdb_get_music_dir ()</title>
+<indexterm><primary>itdb_get_music_dir</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_get_music_dir                  (const <link linkend="gchar">gchar</link> *mountpoint);</programlisting>
+<para>
+Retrieve the Music directory (containing the Fnn dirs) by first
+calling <link linkend="itdb-get-control-dir"><function>itdb_get_control_dir()</function></link> and then adding 'Music'</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>mountpoint</parameter>&nbsp;:</term>
+<listitem><simpara> the iPod mountpoint
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> path to the Music directory or NULL if
+non-existent. Must <link linkend="g-free"><function>g_free()</function></link> after use.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-get-artwork-dir" role="function" condition="since:0.4.0"/>itdb_get_artwork_dir ()</title>
+<indexterm role="0.4.0"><primary>itdb_get_artwork_dir</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_get_artwork_dir                (const <link linkend="gchar">gchar</link> *mountpoint);</programlisting>
+<para>
+Retrieve the Artwork directory (containing the ArtworDB) by
+first calling <link linkend="itdb-get-control-dir"><function>itdb_get_control_dir()</function></link> and then adding 'Artwork'</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>mountpoint</parameter>&nbsp;:</term>
+<listitem><simpara> the iPod mountpoint
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> path to the Artwork directory or NULL if
+non-existent. Must <link linkend="g-free"><function>g_free()</function></link> after use.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-get-device-dir" role="function" condition="since:0.4.0"/>itdb_get_device_dir ()</title>
+<indexterm role="0.4.0"><primary>itdb_get_device_dir</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_get_device_dir                 (const <link linkend="gchar">gchar</link> *mountpoint);</programlisting>
+<para>
+Retrieve the Device directory (containing the SysInfo file) by
+first calling <link linkend="itdb-get-control-dir"><function>itdb_get_control_dir()</function></link> and then adding 'Device'</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>mountpoint</parameter>&nbsp;:</term>
+<listitem><simpara> the iPod mountpoint
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> path to the Device directory or NULL if
+non-existent. Must <link linkend="g-free"><function>g_free()</function></link> after use.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-get-photos-dir" role="function" condition="since:0.4.0"/>itdb_get_photos_dir ()</title>
+<indexterm role="0.4.0"><primary>itdb_get_photos_dir</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_get_photos_dir                 (const <link linkend="gchar">gchar</link> *mountpoint);</programlisting>
+<para>
+Retrieve the Photo directory by
+first calling <link linkend="itdb-get-control-dir"><function>itdb_get_control_dir()</function></link> and then adding 'Photos'</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>mountpoint</parameter>&nbsp;:</term>
+<listitem><simpara> mountpoint of iPod
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> path to the Artwork directory or NULL if
+non-existent. Must <link linkend="g-free"><function>g_free()</function></link> after use.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-get-itunesdb-path" role="function" condition="since:0.4.0"/>itdb_get_itunesdb_path ()</title>
+<indexterm role="0.4.0"><primary>itdb_get_itunesdb_path</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_get_itunesdb_path              (const <link linkend="gchar">gchar</link> *mountpoint);</programlisting>
+<para>
+Retrieve a path to the iTunesDB</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>mountpoint</parameter>&nbsp;:</term>
+<listitem><simpara> the iPod mountpoint
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> path to the iTunesDB or NULL if non-existent. Must <link linkend="g-free"><function>g_free()</function></link>
+after use.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-get-itunessd-path" role="function" condition="since:0.4.0"/>itdb_get_itunessd_path ()</title>
+<indexterm role="0.4.0"><primary>itdb_get_itunessd_path</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_get_itunessd_path              (const <link linkend="gchar">gchar</link> *mountpoint);</programlisting>
+<para>
+Retrieve a path to the iTunesSD</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>mountpoint</parameter>&nbsp;:</term>
+<listitem><simpara> the iPod mountpoint
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> path to the iTunesSD or NULL if non-existent. Must <link linkend="g-free"><function>g_free()</function></link>
+after use.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-get-artworkdb-path" role="function" condition="since:0.4.0"/>itdb_get_artworkdb_path ()</title>
+<indexterm role="0.4.0"><primary>itdb_get_artworkdb_path</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_get_artworkdb_path             (const <link linkend="gchar">gchar</link> *mountpoint);</programlisting>
+<para>
+Retrieve a path to the ArtworkDB</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>mountpoint</parameter>&nbsp;:</term>
+<listitem><simpara> the iPod mountpoint
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> path to the ArtworkDB or NULL if non-existent. Must <link linkend="g-free"><function>g_free()</function></link>
+after use.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-get-photodb-path" role="function" condition="since:0.4.0"/>itdb_get_photodb_path ()</title>
+<indexterm role="0.4.0"><primary>itdb_get_photodb_path</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_get_photodb_path               (const <link linkend="gchar">gchar</link> *mountpoint);</programlisting>
+<para>
+Retrieve a path to the Photo DB</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>mountpoint</parameter>&nbsp;:</term>
+<listitem><simpara> the iPod mountpoint
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> path to the PhotoDB or NULL if non-existent. Must
+<link linkend="g-free"><function>g_free()</function></link> after use.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-get-photos-thumb-dir" role="function" condition="since:0.4.0"/>itdb_get_photos_thumb_dir ()</title>
+<indexterm role="0.4.0"><primary>itdb_get_photos_thumb_dir</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_get_photos_thumb_dir           (const <link linkend="gchar">gchar</link> *mountpoint);</programlisting>
+<para>
+Retrieve the Photo Thumbnail directory by
+first calling <link linkend="itdb-get-control-dir"><function>itdb_get_control_dir()</function></link> and then adding 'Photos/Thumbs'</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>mountpoint</parameter>&nbsp;:</term>
+<listitem><simpara> the iPod mountpoint
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> path to the Artwork directory or NULL if
+non-existent. Must <link linkend="g-free"><function>g_free()</function></link> after use.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-get-path" role="function" condition="since:0.4.0"/>itdb_get_path ()</title>
+<indexterm role="0.4.0"><primary>itdb_get_path</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_get_path                       (const <link linkend="gchar">gchar</link> *dir,
+                                                         const <link linkend="gchar">gchar</link> *file);</programlisting>
+<para>
+Retrieve a path to the <parameter>file</parameter> in <parameter>dir</parameter></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>dir</parameter>&nbsp;:</term>
+<listitem><simpara>    a directory
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>file</parameter>&nbsp;:</term>
+<listitem><simpara>   a file
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> path to the <parameter>file</parameter> or NULL if non-existent. Must <link linkend="g-free"><function>g_free()</function></link>
+after use.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-resolve-path" role="function"/>itdb_resolve_path ()</title>
+<indexterm><primary>itdb_resolve_path</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_resolve_path                   (const <link linkend="gchar">gchar</link> *root,
+                                                         const <link linkend="gchar">gchar</link> * const *components);</programlisting>
+<para>
+Resolve the path to a track on the iPod
+</para>
+<para>
+We start by assuming that the iPod mount point exists.  Then, for
+each component c of <parameter>track->ipod_path</parameter>, we try to find an entry d in
+good_path that is case-insensitively equal to c.  If we find d, we
+append d to good_path and make the result the new good_path.
+Otherwise, we quit and return NULL.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>root</parameter>&nbsp;:</term>
+<listitem><simpara> in local encoding
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>components</parameter>&nbsp;:</term>
+<listitem><simpara> in utf8
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> path to track on the iPod or NULL.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-cp" role="function"/>itdb_cp ()</title>
+<indexterm><primary>itdb_cp</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_cp                             (const <link linkend="gchar">gchar</link> *from_file,
+                                                         const <link linkend="gchar">gchar</link> *to_file,
+                                                         <link linkend="GError">GError</link> **error);</programlisting>
+<para>
+Copy file <parameter>from_file</parameter> to <parameter>to_file</parameter>.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>from_file</parameter>&nbsp;:</term>
+<listitem><simpara>  source file
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>to_file</parameter>&nbsp;:</term>
+<listitem><simpara>    destination file
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
+<listitem><simpara>      return location for a <link linkend="GError"><type>GError</type></link> or NULL
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success, FALSE on error, in which case <parameter>error</parameter> is
+set accordingly.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-cp-get-dest-filename" role="function" condition="since:0.5.0"/>itdb_cp_get_dest_filename ()</title>
+<indexterm role="0.5.0"><primary>itdb_cp_get_dest_filename</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              itdb_cp_get_dest_filename           (<link linkend="Itdb-Track">Itdb_Track</link> *track,
+                                                         const <link linkend="gchar">gchar</link> *mountpoint,
+                                                         const <link linkend="gchar">gchar</link> *filename,
+                                                         <link linkend="GError">GError</link> **error);</programlisting>
+<para>
+Creates a valid filename on the iPod where <parameter>filename</parameter> can be copied.
+</para>
+<para>
+You must provide either <parameter>track</parameter> or <parameter>mountpoint</parameter>. Providing <parameter>track</parameter> is
+not thread-safe (accesses track->itdb->device and may even write to
+track->itdb->device). Providing <parameter>mountpoint</parameter> is thread-safe but
+slightly slower because the number of music directories is counted
+each time the function is called.
+</para>
+<para>
+You can use <link linkend="itdb-cp"><function>itdb_cp()</function></link> to copy the track to the iPod or implement
+your own copy function. After the file was copied you have to call
+<link linkend="itdb-cp-finalize"><function>itdb_cp_finalize()</function></link> to obtain relevant update information for
+<link linkend="Itdb-Track"><type>Itdb_Track</type></link>.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>track</parameter>&nbsp;:</term>
+<listitem><simpara>      track to transfer or NULL
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>mountpoint</parameter>&nbsp;:</term>
+<listitem><simpara> mountpoint of your iPod or NULL
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>filename</parameter>&nbsp;:</term>
+<listitem><simpara>   the source file
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
+<listitem><simpara>      return location for a <link linkend="GError"><type>GError</type></link> or NULL
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a valid filename on the iPod where <parameter>filename</parameter> can be
+copied or NULL in case of an error. In that case <parameter>error</parameter> is set
+accordingly. You must free the filename when it is no longer
+needed.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.5.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-cp-finalize" role="function" condition="since:0.5.0"/>itdb_cp_finalize ()</title>
+<indexterm role="0.5.0"><primary>itdb_cp_finalize</primary></indexterm><programlisting><link linkend="Itdb-Track">Itdb_Track</link>*         itdb_cp_finalize                    (<link linkend="Itdb-Track">Itdb_Track</link> *track,
+                                                         const <link linkend="gchar">gchar</link> *mountpoint,
+                                                         const <link linkend="gchar">gchar</link> *dest_filename,
+                                                         <link linkend="GError">GError</link> **error);</programlisting>
+<para>
+Updates information in <parameter>track</parameter> necessary for the iPod.
+</para>
+<para>
+You must supply either <parameter>track</parameter> or <parameter>mountpoint</parameter>. If <parameter>track</parameter> == NULL, a
+new track structure is created that must be freed with
+<link linkend="itdb-track-free"><function>itdb_track_free()</function></link> when it is no longer needed.
+</para>
+<para>
+The following <parameter>track</parameter> fields are updated:
+</para>
+<para>
+<itemizedlist>
+  <listitem>
+      ipod_path
+  </listitem>
+  <listitem>
+      filetype_marker
+  </listitem>
+  <listitem>
+      transferred
+  </listitem>
+  <listitem>
+      size
+  </listitem>
+</itemizedlist></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>track</parameter>&nbsp;:</term>
+<listitem><simpara>          track to update or NULL
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>mountpoint</parameter>&nbsp;:</term>
+<listitem><simpara>     mountpoint of your iPod or NULL
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>dest_filename</parameter>&nbsp;:</term>
+<listitem><simpara>  the name of the file on the iPod copied to
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
+<listitem><simpara>          return location for a <link linkend="GError"><type>GError</type></link> or NULL
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> on success a pointer to the <link linkend="Itdb-Track"><type>Itdb_Track</type></link> item passed
+or a new <link linkend="Itdb-Track"><type>Itdb_Track</type></link> item if <parameter>track</parameter> was NULL. In the latter case
+you must free the memory using <link linkend="itdb-track-free"><function>itdb_track_free()</function></link> when the item is
+no longer used. If an error occurs NULL is returned and <parameter>error</parameter> is
+set accordingly. Errors occur when <parameter>dest_filename</parameter> cannot be
+accessed or the mountpoint is not set.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.5.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-parse-file" role="function"/>itdb_parse_file ()</title>
+<indexterm><primary>itdb_parse_file</primary></indexterm><programlisting><link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link>*      itdb_parse_file                     (const <link linkend="gchar">gchar</link> *filename,
+                                                         <link linkend="GError">GError</link> **error);</programlisting>
+<para>
+Same as <link linkend="itunesdb-parse"><function>itunesdb_parse()</function></link>, but filename is specified directly.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>filename</parameter>&nbsp;:</term>
+<listitem><simpara>   path to a file in iTunesDB format
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
+<listitem><simpara>      return location for a <link linkend="GError"><type>GError</type></link> or NULL
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a newly allocated <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> struct holding the tracks and
+the playlists present in <parameter>filename</parameter>, NULL if <parameter>filename</parameter> isn't a parsable 
+iTunesDB file. If non-NULL, the <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> is to be freed with 
+<link linkend="itdb-free"><function>itdb_free()</function></link> when it's no longer needed
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-write-file" role="function"/>itdb_write_file ()</title>
+<indexterm><primary>itdb_write_file</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_write_file                     (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
+                                                         const <link linkend="gchar">gchar</link> *filename,
+                                                         <link linkend="GError">GError</link> **error);</programlisting>
+<para>
+Write the content of <parameter>itdb</parameter> to <parameter>filename</parameter>. If <parameter>filename</parameter> is NULL, it attempts
+to write to <parameter>itdb->filename</parameter>.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
+<listitem><simpara>       the <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> to save
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>filename</parameter>&nbsp;:</term>
+<listitem><simpara>   filename to save <parameter>itdb</parameter> to
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
+<listitem><simpara>      return location for a <link linkend="GError"><type>GError</type></link> or NULL
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if all went well, FALSE otherwise
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-shuffle-write" role="function"/>itdb_shuffle_write ()</title>
+<indexterm><primary>itdb_shuffle_write</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_shuffle_write                  (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
+                                                         <link linkend="GError">GError</link> **error);</programlisting>
+<para>
+Write out an iTunesSD for the Shuffle.
+</para>
+<para>
+First reassigns unique IDs to all tracks.  An existing "Play
+Counts" file is renamed to "Play Counts.bak" if the export was
+successful.  An existing "OTGPlaylistInfo" file is removed if the
+export was successful.  <parameter>itdb->mountpoint</parameter> must point to the mount
+point of the iPod, e.g. "/mnt/ipod" and be in local encoding.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
+<listitem><simpara>   the <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> to write to disk
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
+<listitem><simpara>  return location for a <link linkend="GError"><type>GError</type></link> or NULL
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success, FALSE on error, in which case <parameter>error</parameter> is
+set accordingly.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-shuffle-write-file" role="function"/>itdb_shuffle_write_file ()</title>
+<indexterm><primary>itdb_shuffle_write_file</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_shuffle_write_file             (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
+                                                         const <link linkend="gchar">gchar</link> *filename,
+                                                         <link linkend="GError">GError</link> **error);</programlisting>
+<para>
+Do the actual writing to the iTunesSD</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
+<listitem><simpara>       the <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> to write to disk
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>filename</parameter>&nbsp;:</term>
+<listitem><simpara>   file to write to, cannot be NULL
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
+<listitem><simpara>      return location for a <link linkend="GError"><type>GError</type></link> or NULL
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success, FALSE on error, in which case <parameter>error</parameter> is
+set accordingly.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-duplicate" role="function"/>itdb_duplicate ()</title>
+<indexterm><primary>itdb_duplicate</primary></indexterm><programlisting><link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link>*      itdb_duplicate                      (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);</programlisting>
+<para>
+Duplicate <parameter>itdb</parameter> 
+FIXME: not implemented yet</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> always return NULL since it's unimplemented
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+
+</refsect1>
+
+
+
+
+
+<refsect1><refsect2 /><refsect2 /></refsect1>
+</refentry>

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/itunesdb-time.xml
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/itunesdb-time.xml	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/itunesdb-time.xml	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,111 @@
+<?xml version="1.0"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
+               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<refentry id="libgpod-Time-handling">
+<refmeta>
+<refentrytitle role="top_of_page">Time handling</refentrytitle>
+<manvolnum>3</manvolnum>
+<refmiscinfo>LIBGPOD Library</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+<refname>Time handling</refname>
+<refpurpose>[DEPRECATED] Helper functions to convert between Epoch time and Mac
+(iPod) time</refpurpose>
+<!--[<xref linkend="desc" endterm="desc.title"/>]-->
+</refnamediv>
+
+<refsynopsisdiv role="synopsis">
+<title role="synopsis.title">Synopsis</title>
+
+<synopsis>
+
+
+
+<link linkend="time-t">time_t</link>              <link linkend="itdb-time-get-mac-time">itdb_time_get_mac_time</link>              (void);
+<link linkend="time-t">time_t</link>              <link linkend="itdb-time-mac-to-host">itdb_time_mac_to_host</link>               (<link linkend="time-t">time_t</link> time);
+<link linkend="time-t">time_t</link>              <link linkend="itdb-time-host-to-mac">itdb_time_host_to_mac</link>               (<link linkend="time-t">time_t</link> time);
+</synopsis>
+</refsynopsisdiv>
+
+
+
+
+
+
+
+
+
+<refsect1 role="desc">
+<title role="desc.title">Description</title>
+<para>
+The functions provide conversion between Epoch time and Mac (iPod)
+time.
+</para>
+<note>
+These functions are now obsolete and should no longer be used, libgpod
+automatically converts to/from Epoch time and iPod time when
+writing/reading the iPod databases.
+</note>
+</refsect1>
+
+<refsect1 role="details">
+<title role="details.title">Details</title>
+<refsect2>
+<title><anchor id="itdb-time-get-mac-time" role="function" condition="deprecated"/>itdb_time_get_mac_time ()</title>
+<indexterm role="deprecated"><primary>itdb_time_get_mac_time</primary></indexterm><programlisting><link linkend="time-t">time_t</link>              itdb_time_get_mac_time              (void);</programlisting>
+<warning><para><literal>itdb_time_get_mac_time</literal> is deprecated and should not be used in newly-written code. kept for compatibility with older code, directly use
+<link linkend="g-get-current-time"><function>g_get_current_time()</function></link> or time(NULL) instead</para></warning>
+<para>
+Gets the current time in a format appropriate for storing in the libgpod
+data structures</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> current time
+
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-time-mac-to-host" role="function" condition="deprecated"/>itdb_time_mac_to_host ()</title>
+<indexterm role="deprecated"><primary>itdb_time_mac_to_host</primary></indexterm><programlisting><link linkend="time-t">time_t</link>              itdb_time_mac_to_host               (<link linkend="time-t">time_t</link> time);</programlisting>
+<warning><para><literal>itdb_time_mac_to_host</literal> is deprecated and should not be used in newly-written code. It's been kept for compatibility with older code, but this
+function is now a no-op</para></warning>
+<para>
+Converts a timestamp from libgpod format to host system timestamp.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>time</parameter>&nbsp;:</term>
+<listitem><simpara> time expressed in libgpod format
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> timestamp for the host system
+
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-time-host-to-mac" role="function" condition="deprecated"/>itdb_time_host_to_mac ()</title>
+<indexterm role="deprecated"><primary>itdb_time_host_to_mac</primary></indexterm><programlisting><link linkend="time-t">time_t</link>              itdb_time_host_to_mac               (<link linkend="time-t">time_t</link> time);</programlisting>
+<warning><para><literal>itdb_time_host_to_mac</literal> is deprecated and should not be used in newly-written code. It's been kept for compatibility with older code, but this
+function is now a no-op</para></warning>
+<para>
+Convert host system timestamp to libgpod format timestamp</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>time</parameter>&nbsp;:</term>
+<listitem><simpara> time expressed in host unit
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a libgpod timestamp
+
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+
+</refsect1>
+
+
+
+
+
+<refsect1><refsect2 /><refsect2 /></refsect1>
+</refentry>

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/photodb.xml
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/photodb.xml	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/photodb.xml	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,767 @@
+<?xml version="1.0"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
+               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<refentry id="libgpod-Photo-database">
+<refmeta>
+<refentrytitle role="top_of_page">Photo database</refentrytitle>
+<manvolnum>3</manvolnum>
+<refmiscinfo>LIBGPOD Library</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+<refname>Photo database</refname>
+<refpurpose>Functions to create, read, write the photo database</refpurpose>
+<!--[<xref linkend="desc" endterm="desc.title"/>]-->
+</refnamediv>
+
+<refsynopsisdiv role="synopsis">
+<title role="synopsis.title">Synopsis</title>
+
+<synopsis>
+
+
+
+                    <link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link>;
+<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link>*       <link linkend="itdb-photodb-create">itdb_photodb_create</link>                 (const <link linkend="gchar">gchar</link> *mountpoint);
+<link linkend="void">void</link>                <link linkend="itdb-photodb-free">itdb_photodb_free</link>                   (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *photodb);
+<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link>*       <link linkend="itdb-photodb-parse">itdb_photodb_parse</link>                  (const <link linkend="gchar">gchar</link> *mp,
+                                                         <link linkend="GError">GError</link> **error);
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-photodb-write">itdb_photodb_write</link>                  (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *photodb,
+                                                         <link linkend="GError">GError</link> **error);
+<link linkend="Itdb-Artwork">Itdb_Artwork</link>*       <link linkend="itdb-photodb-add-photo">itdb_photodb_add_photo</link>              (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
+                                                         const <link linkend="gchar">gchar</link> *filename,
+                                                         <link linkend="gint">gint</link> position,
+                                                         <link linkend="gint">gint</link> rotation,
+                                                         <link linkend="GError">GError</link> **error);
+<link linkend="Itdb-Artwork">Itdb_Artwork</link>*       <link linkend="itdb-photodb-add-photo-from-data">itdb_photodb_add_photo_from_data</link>    (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
+                                                         const <link linkend="guchar">guchar</link> *image_data,
+                                                         <link linkend="gsize">gsize</link> image_data_len,
+                                                         <link linkend="gint">gint</link> position,
+                                                         <link linkend="gint">gint</link> rotation,
+                                                         <link linkend="GError">GError</link> **error);
+<link linkend="Itdb-Artwork">Itdb_Artwork</link>*       <link linkend="itdb-photodb-add-photo-from-pixbuf">itdb_photodb_add_photo_from_pixbuf</link>  (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
+                                                         <link linkend="gpointer">gpointer</link> pixbuf,
+                                                         <link linkend="gint">gint</link> position,
+                                                         <link linkend="gint">gint</link> rotation,
+                                                         <link linkend="GError">GError</link> **error);
+<link linkend="void">void</link>                <link linkend="itdb-photodb-remove-photo">itdb_photodb_remove_photo</link>           (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
+                                                         <link linkend="Itdb-PhotoAlbum">Itdb_PhotoAlbum</link> *album,
+                                                         <link linkend="Itdb-Artwork">Itdb_Artwork</link> *photo);
+                    <link linkend="Itdb-PhotoAlbum">Itdb_PhotoAlbum</link>;
+<link linkend="Itdb-PhotoAlbum">Itdb_PhotoAlbum</link>*    <link linkend="itdb-photodb-photoalbum-create">itdb_photodb_photoalbum_create</link>      (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
+                                                         const <link linkend="gchar">gchar</link> *albumname,
+                                                         <link linkend="gint">gint</link> pos);
+<link linkend="void">void</link>                <link linkend="itdb-photodb-photoalbum-add-photo">itdb_photodb_photoalbum_add_photo</link>   (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
+                                                         <link linkend="Itdb-PhotoAlbum">Itdb_PhotoAlbum</link> *album,
+                                                         <link linkend="Itdb-Artwork">Itdb_Artwork</link> *photo,
+                                                         <link linkend="gint">gint</link> position);
+<link linkend="Itdb-PhotoAlbum">Itdb_PhotoAlbum</link>*    <link linkend="itdb-photodb-photoalbum-by-name">itdb_photodb_photoalbum_by_name</link>     (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
+                                                         const <link linkend="gchar">gchar</link> *albumname);
+<link linkend="void">void</link>                <link linkend="itdb-photodb-photoalbum-remove">itdb_photodb_photoalbum_remove</link>      (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
+                                                         <link linkend="Itdb-PhotoAlbum">Itdb_PhotoAlbum</link> *album,
+                                                         <link linkend="gboolean">gboolean</link> remove_pics);
+</synopsis>
+</refsynopsisdiv>
+
+
+
+
+
+
+
+
+
+<refsect1 role="desc">
+<title role="desc.title">Description</title>
+<para>
+These functions are for creating, reading, and writing the photo
+database.
+</para>
+<para>
+Overview of using the Photo database:
+</para>
+<para>
+<link linkend="itdb-photodb-parse"><function>itdb_photodb_parse()</function></link>:
+Read an existing PhotoDB.
+</para>
+<para>
+<link linkend="itdb-photodb-create"><function>itdb_photodb_create()</function></link>:
+Create a new <link linkend="Itdb-PhotoDB"><type>Itdb_PhotoDB</type></link> structure. The Photo Library Album is
+(first album) is created automatically.
+</para>
+<para>
+<link linkend="itdb-photodb-add-photo"><function>itdb_photodb_add_photo()</function></link>, <link linkend="itdb-photodb-add-photo-from-data"><function>itdb_photodb_add_photo_from_data()</function></link>:
+Add a photo to the PhotoDB (from file or from a chunk of
+memory). It is automatically added to the Photo Library Album
+(first album), which is created if it does not exist already.
+</para>
+<para>
+<link linkend="itdb-photodb-photoalbum-create"><function>itdb_photodb_photoalbum_create()</function></link>:
+Create and add a new photoalbum.
+</para>
+<para>
+<link linkend="itdb-photodb-photoalbum-add-photo"><function>itdb_photodb_photoalbum_add_photo()</function></link>:
+Add a photo (<link linkend="Itdb-Artwork"><type>Itdb_Artwork</type></link>) to an existing photoalbum.
+</para>
+<para>
+<link linkend="itdb-photodb-photoalbum-remove"><function>itdb_photodb_photoalbum_remove()</function></link>:
+Remove an existing photoalbum. Pictures can be kept in the
+Photo Library or automatically removed as well.
+</para>
+<para>
+<link linkend="itdb-photodb-remove-photo"><function>itdb_photodb_remove_photo()</function></link>:
+Remove a photo either from a photoalbum or completely from the database.
+</para>
+<para>
+<link linkend="itdb-photodb-write"><function>itdb_photodb_write()</function></link>:
+Write out your PhotoDB.
+</para>
+<para>
+<link linkend="itdb-photodb-free"><function>itdb_photodb_free()</function></link>:
+Free all memory taken by the PhotoDB.
+</para>
+<para>
+<link linkend="itdb-photodb-photoalbum-by-name"><function>itdb_photodb_photoalbum_by_name()</function></link>:
+Find the first photoalbum with a given name or the Photo
+Library Album if called with no name.
+</para>
+<para>
+If you cannot add photos because your iPod is not recognized,
+you may have to set the iPod model by calling
+<link linkend="itdb-device-set-sysinfo"><function>itdb_device_set_sysinfo()</function></link>, e.g. for an 80 GB 6th generation
+iPod Video, you would use:
+</para>
+<programlisting>
+itdb_device_set_sysinfo (db->device, "ModelNumStr", "MA450");
+</programlisting>
+<para>
+See <ulink type="http"
+url="http://gtkpod.svn.sourceforge.net/svnroot/gtkpod/libgpod/trunk/src/itdb_device.c">itdb_device.c</ulink>
+for a list of supported models.
+</para>
+<para>
+The model number will be saved on the iPod when the PhotoDB is
+written (<link linkend="itdb-photodb-write"><function>itdb_photodb_write()</function></link> calls <link linkend="itdb-device-write-sysinfo"><function>itdb_device_write_sysinfo()</function></link>).
+</para>
+<para>
+Have a look at the <ulink type="http"
+url="http://gtkpod.svn.sourceforge.net/svnroot/gtkpod/libgpod/trunk/tests/test-photos.c">test-photos</ulink>
+test program in the <ulink type="http"
+url="http://gtkpod.svn.sourceforge.net/svnroot/gtkpod/libgpod/trunk/tests/">tests/</ulink>
+directory of the libgpod source for an example of how to use the interface.
+</para>
+</refsect1>
+
+<refsect1 role="details">
+<title role="details.title">Details</title>
+<refsect2>
+<title><anchor id="Itdb-PhotoDB" role="struct" condition="since:0.4.0"/>Itdb_PhotoDB</title>
+<indexterm role="0.4.0"><primary>Itdb_PhotoDB</primary></indexterm><programlisting>typedef struct {
+    GList *photos;
+    GList *photoalbums;
+    Itdb_Device *device;
+    /* reserved for future use */
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+    /* below is for use by application */
+    guint64 usertype;
+    gpointer userdata;
+    /* functions called to duplicate/free userdata */
+    ItdbUserDataDuplicateFunc userdata_duplicate;
+    ItdbUserDataDestroyFunc userdata_destroy;
+} Itdb_PhotoDB;
+</programlisting>
+<para>
+Structure representing an iTunes Photo database</para>
+<para>
+
+</para><variablelist role="struct">
+<varlistentry>
+<term><link linkend="GList">GList</link>&nbsp;*<structfield>photos</structfield>;</term>
+<listitem><simpara>             A list of photos in the database (<link linkend="Itdb-Artwork"><type>Itdb_Artwork</type></link>)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="GList">GList</link>&nbsp;*<structfield>photoalbums</structfield>;</term>
+<listitem><simpara>        A list of albums in the database (<link linkend="Itdb-PhotoAlbum"><type>Itdb_PhotoAlbum</type></link>)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="Itdb-Device">Itdb_Device</link>&nbsp;*<structfield>device</structfield>;</term>
+<listitem><simpara>             iPod device info (<link linkend="Itdb-Device"><type>Itdb_Device</type></link>)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int1</structfield>;</term>
+<listitem><simpara>      Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int2</structfield>;</term>
+<listitem><simpara>      Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved1</structfield>;</term>
+<listitem><simpara>          Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved2</structfield>;</term>
+<listitem><simpara>          Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint64">guint64</link>&nbsp;<structfield>usertype</structfield>;</term>
+<listitem><simpara>           For use by application
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>userdata</structfield>;</term>
+<listitem><simpara>           For use by application
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="ItdbUserDataDuplicateFunc">ItdbUserDataDuplicateFunc</link>&nbsp;<structfield>userdata_duplicate</structfield>;</term>
+<listitem><simpara> A function to duplicate <link linkend="userdata"><type>userdata</type></link>
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="ItdbUserDataDestroyFunc">ItdbUserDataDestroyFunc</link>&nbsp;<structfield>userdata_destroy</structfield>;</term>
+<listitem><simpara>   A function to free <link linkend="userdata"><type>userdata</type></link>
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-photodb-create" role="function" condition="since:0.4.2"/>itdb_photodb_create ()</title>
+<indexterm role="0.4.2"><primary>itdb_photodb_create</primary></indexterm><programlisting><link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link>*       itdb_photodb_create                 (const <link linkend="gchar">gchar</link> *mountpoint);</programlisting>
+<para>
+Creates a new Itdb_PhotoDB. If mountpoint is NULL, you will have to
+set it manually later by calling <link linkend="itdb-device-set-mountpoint"><function>itdb_device_set_mountpoint()</function></link>.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>mountpoint</parameter>&nbsp;:</term>
+<listitem><simpara> mountpoint or NULL.
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a newly created Itdb_PhotoDB to be freed with
+<link linkend="itdb-photodb-free"><function>itdb_photodb_free()</function></link> when it's no longer needed. The Photo Library
+Album is created automatically.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.2
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-photodb-free" role="function" condition="since:0.4.0"/>itdb_photodb_free ()</title>
+<indexterm role="0.4.0"><primary>itdb_photodb_free</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_photodb_free                   (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *photodb);</programlisting>
+<para>
+Free the memory taken by <parameter>photodb</parameter>.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>photodb</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-PhotoDB"><type>Itdb_PhotoDB</type></link>
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-photodb-parse" role="function" condition="since:0.4.0"/>itdb_photodb_parse ()</title>
+<indexterm role="0.4.0"><primary>itdb_photodb_parse</primary></indexterm><programlisting><link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link>*       itdb_photodb_parse                  (const <link linkend="gchar">gchar</link> *mp,
+                                                         <link linkend="GError">GError</link> **error);</programlisting>
+<para>
+Parses the photo database of an iPod mounted at <parameter>mp</parameter>.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>mp</parameter>&nbsp;:</term>
+<listitem><simpara>     mountpoint of the iPod
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
+<listitem><simpara>  will contain the error description when an error occured.
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the imported PhotoDB or NULL in case of an error.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-photodb-write" role="function" condition="since:0.4.0"/>itdb_photodb_write ()</title>
+<indexterm role="0.4.0"><primary>itdb_photodb_write</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_photodb_write                  (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *photodb,
+                                                         <link linkend="GError">GError</link> **error);</programlisting>
+<para>
+Write out a PhotoDB.
+</para>
+<para>
+FIXME: error is not set yet.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>photodb</parameter>&nbsp;:</term>
+<listitem><simpara>    the <link linkend="Itdb-PhotoDB"><type>Itdb_PhotoDB</type></link> to write to disk
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
+<listitem><simpara>      return location for a <link linkend="GError"><type>GError</type></link> or NULL
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE on success, FALSE on error, in which case <parameter>error</parameter> is
+set accordingly.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-photodb-add-photo" role="function" condition="since:0.4.0"/>itdb_photodb_add_photo ()</title>
+<indexterm role="0.4.0"><primary>itdb_photodb_add_photo</primary></indexterm><programlisting><link linkend="Itdb-Artwork">Itdb_Artwork</link>*       itdb_photodb_add_photo              (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
+                                                         const <link linkend="gchar">gchar</link> *filename,
+                                                         <link linkend="gint">gint</link> position,
+                                                         <link linkend="gint">gint</link> rotation,
+                                                         <link linkend="GError">GError</link> **error);</programlisting>
+<para>
+Add a photo to the PhotoDB. The photo is automatically added to the
+first Photoalbum, which by default contains a list of all photos in
+the database. If no Photoalbums exist one is created automatically.
+</para>
+<para>
+For the rotation angle you can also use the gdk constants
+<link linkend="GDK-PIXBUF-ROTATE-NONE:CAPS"><literal>GDK_PIXBUF_ROTATE_NONE</literal></link>, <link linkend="GDK-PIXBUF-ROTATE-COUNTERCLOCKWISE:CAPS"><literal>GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE</literal></link>,
+<link linkend="GDK-PIXBUF-ROTATE-UPSIDEDOWN:CAPS"><literal>GDK_PIXBUF_ROTATE_UPSIDEDOWN</literal></link>, AND <link linkend="GDK-PIXBUF-ROTATE-CLOCKWISE:CAPS"><literal>GDK_PIXBUF_ROTATE_CLOCKWISE</literal></link>.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>db</parameter>&nbsp;:</term>
+<listitem><simpara>         the <link linkend="Itdb-PhotoDB"><type>Itdb_PhotoDB</type></link> to add the photo to
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>filename</parameter>&nbsp;:</term>
+<listitem><simpara>   path of the photo to add.
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>position</parameter>&nbsp;:</term>
+<listitem><simpara>   position where to insert the new photo (-1 to append
+             at the end)
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>rotation</parameter>&nbsp;:</term>
+<listitem><simpara>   angle by which the image should be rotated
+             counterclockwise. Valid values are 0, 90, 180 and 270.
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
+<listitem><simpara>      return location for a <link linkend="GError"><type>GError</type></link> or NULL
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a pointer to the added photo.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-photodb-add-photo-from-data" role="function" condition="since:0.4.0"/>itdb_photodb_add_photo_from_data ()</title>
+<indexterm role="0.4.0"><primary>itdb_photodb_add_photo_from_data</primary></indexterm><programlisting><link linkend="Itdb-Artwork">Itdb_Artwork</link>*       itdb_photodb_add_photo_from_data    (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
+                                                         const <link linkend="guchar">guchar</link> *image_data,
+                                                         <link linkend="gsize">gsize</link> image_data_len,
+                                                         <link linkend="gint">gint</link> position,
+                                                         <link linkend="gint">gint</link> rotation,
+                                                         <link linkend="GError">GError</link> **error);</programlisting>
+<para>
+Add a photo to the PhotoDB. The photo is automatically added to the
+first Photoalbum, which by default contains a list of all photos in
+the database. If no Photoalbums exist one is created automatically.
+</para>
+<para>
+For the rotation angle you can also use the gdk constants
+<link linkend="GDK-PIXBUF-ROTATE-NONE:CAPS"><literal>GDK_PIXBUF_ROTATE_NONE</literal></link>, <link linkend="GDK-PIXBUF-ROTATE-COUNTERCLOCKWISE:CAPS"><literal>GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE</literal></link>,
+<link linkend="GDK-PIXBUF-ROTATE-UPSIDEDOWN:CAPS"><literal>GDK_PIXBUF_ROTATE_UPSIDEDOWN</literal></link>, AND <link linkend="GDK-PIXBUF-ROTATE-CLOCKWISE:CAPS"><literal>GDK_PIXBUF_ROTATE_CLOCKWISE</literal></link>.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>db</parameter>&nbsp;:</term>
+<listitem><simpara>             the <link linkend="Itdb-PhotoDB"><type>Itdb_PhotoDB</type></link> to add the photo to
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>image_data</parameter>&nbsp;:</term>
+<listitem><simpara>     chunk of memory containing the image data (for
+                 example a jpg file)
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>image_data_len</parameter>&nbsp;:</term>
+<listitem><simpara> length of above chunk of memory
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>position</parameter>&nbsp;:</term>
+<listitem><simpara>       position where to insert the new photo (-1 to
+                 append at the end)
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>rotation</parameter>&nbsp;:</term>
+<listitem><simpara>       angle by which the image should be rotated
+                 counterclockwise. Valid values are 0, 90, 180 and 270.
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
+<listitem><simpara>          return location for a <link linkend="GError"><type>GError</type></link> or NULL
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a pointer to the added photo.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-photodb-add-photo-from-pixbuf" role="function" condition="since:0.5.0"/>itdb_photodb_add_photo_from_pixbuf ()</title>
+<indexterm role="0.5.0"><primary>itdb_photodb_add_photo_from_pixbuf</primary></indexterm><programlisting><link linkend="Itdb-Artwork">Itdb_Artwork</link>*       itdb_photodb_add_photo_from_pixbuf  (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
+                                                         <link linkend="gpointer">gpointer</link> pixbuf,
+                                                         <link linkend="gint">gint</link> position,
+                                                         <link linkend="gint">gint</link> rotation,
+                                                         <link linkend="GError">GError</link> **error);</programlisting>
+<para>
+Add a photo to the PhotoDB. The photo is automatically added to the
+first Photoalbum, which by default contains a list of all photos in
+the database. If no Photoalbums exist one is created automatically.
+</para>
+<para>
+For the rotation angle you can also use the gdk constants
+<link linkend="GDK-PIXBUF-ROTATE-NONE:CAPS"><literal>GDK_PIXBUF_ROTATE_NONE</literal></link>, <link linkend="GDK-PIXBUF-ROTATE-COUNTERCLOCKWISE:CAPS"><literal>GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE</literal></link>,
+<link linkend="GDK-PIXBUF-ROTATE-UPSIDEDOWN:CAPS"><literal>GDK_PIXBUF_ROTATE_UPSIDEDOWN</literal></link>, AND <link linkend="GDK-PIXBUF-ROTATE-CLOCKWISE:CAPS"><literal>GDK_PIXBUF_ROTATE_CLOCKWISE</literal></link>.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>db</parameter>&nbsp;:</term>
+<listitem><simpara>         the <link linkend="Itdb-PhotoDB"><type>Itdb_PhotoDB</type></link> to add the photo to
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>pixbuf</parameter>&nbsp;:</term>
+<listitem><simpara>     a <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> to use as the image data
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>position</parameter>&nbsp;:</term>
+<listitem><simpara>   position where to insert the new photo (-1 to append
+             at the end)
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>rotation</parameter>&nbsp;:</term>
+<listitem><simpara>   angle by which the image should be rotated
+             counterclockwise. Valid values are 0, 90, 180 and 270.
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
+<listitem><simpara>      return location for a <link linkend="GError"><type>GError</type></link> or NULL
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a pointer to the added photo.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.5.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-photodb-remove-photo" role="function" condition="since:0.4.0"/>itdb_photodb_remove_photo ()</title>
+<indexterm role="0.4.0"><primary>itdb_photodb_remove_photo</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_photodb_remove_photo           (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
+                                                         <link linkend="Itdb-PhotoAlbum">Itdb_PhotoAlbum</link> *album,
+                                                         <link linkend="Itdb-Artwork">Itdb_Artwork</link> *photo);</programlisting>
+<para>
+Removes a photo. If <parameter>album</parameter> is not the first photoalbum, the photo
+will be removed from that album only. If <parameter>album</parameter> is NULL or the
+first photoalbum (Photo Library), the photo will be removed from
+all albums and the <link linkend="Itdb-PhotoDB"><type>Itdb_PhotoDB</type></link>.
+</para>
+<para>
+<note>
+<parameter>photo</parameter> will be freed and can no longer be used if removed from the
+first photoalbum.
+</note></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>db</parameter>&nbsp;:</term>
+<listitem><simpara>     the <link linkend="Itdb-PhotoDB"><type>Itdb_PhotoDB</type></link> to remove the photo from
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>album</parameter>&nbsp;:</term>
+<listitem><simpara>  the album to remove the photo from. If album is NULL, then
+         it will first be removed from all photoalbums and then
+         from the photo database as well.
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>photo</parameter>&nbsp;:</term>
+<listitem><simpara>  <link linkend="Itdb-Artwork"><type>Itdb_Artwork</type></link> (photo) to remove.
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="Itdb-PhotoAlbum" role="struct" condition="since:0.4.0"/>Itdb_PhotoAlbum</title>
+<indexterm role="0.4.0"><primary>Itdb_PhotoAlbum</primary></indexterm><programlisting>typedef struct {
+    Itdb_PhotoDB *photodb;
+    gchar *name;
+    GList *members;
+    guint8 album_type;
+    guint8 playmusic;
+    guint8 repeat;
+    guint8 random;
+    guint8 show_titles;
+    guint8 transition_direction;
+    gint32 slide_duration;
+    gint32 transition_duration;
+    gint64 song_id;
+    gint32 unk024;
+    gint16 unk028;
+    gint32 unk044;
+    gint32 unk048;
+    /* set automatically at time of writing the PhotoDB */
+    gint32  album_id;
+    gint32  prev_album_id;
+    /* reserved for future use */
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+    /* below is for use by application */
+    guint64 usertype;
+    gpointer userdata;
+    /* functions called to duplicate/free userdata */
+    ItdbUserDataDuplicateFunc userdata_duplicate;
+    ItdbUserDataDestroyFunc userdata_destroy;
+} Itdb_PhotoAlbum;
+</programlisting>
+<para>
+Structure representing an iTunes Photo Album</para>
+<para>
+
+</para><variablelist role="struct">
+<varlistentry>
+<term><link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link>&nbsp;*<structfield>photodb</structfield>;</term>
+<listitem><simpara>              A pointer to the <link linkend="Itdb-PhotoDB"><type>Itdb_PhotoDB</type></link> (for convenience)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>name</structfield>;</term>
+<listitem><simpara>                 The name of photoalbum in UTF8
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="GList">GList</link>&nbsp;*<structfield>members</structfield>;</term>
+<listitem><simpara>              A list of photos in album (<link linkend="Itdb-Artwork"><type>Itdb_Artwork</type></link>)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>album_type</structfield>;</term>
+<listitem><simpara>           The album type.  0x01 for master (Photo Library),
+                       0x02 for a normal album.  (4 and 5 have also been
+                       seen.)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>playmusic</structfield>;</term>
+<listitem><simpara>            Play music during slideshow
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>repeat</structfield>;</term>
+<listitem><simpara>               Repeat the slideshow
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>random</structfield>;</term>
+<listitem><simpara>               Show slides in random order
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>show_titles</structfield>;</term>
+<listitem><simpara>          Show slide captions
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>transition_direction</structfield>;</term>
+<listitem><simpara> Transition direction.  0=none, 1=left-to-right,
+                       2=right-to-left, 3=top-to-bottom, 4=bottom-to-top
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>slide_duration</structfield>;</term>
+<listitem><simpara>       Slide duration in seconds
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>transition_duration</structfield>;</term>
+<listitem><simpara>  Transition duration, in milliseconds
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint64">gint64</link>&nbsp;<structfield>song_id</structfield>;</term>
+<listitem><simpara>              The <parameter>dbid2</parameter> of a track to play during slideshow
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>unk024</structfield>;</term>
+<listitem><simpara>               Unknown, seems to be always 0
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint16">gint16</link>&nbsp;<structfield>unk028</structfield>;</term>
+<listitem><simpara>               Unknown, seems to be always 0
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>unk044</structfield>;</term>
+<listitem><simpara>               Unknown, seems to always be 0
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>unk048</structfield>;</term>
+<listitem><simpara>               Unknown, seems to always be 0
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>album_id</structfield>;</term>
+<listitem><simpara>             The id of the album.  This is set automatically when
+                       the PhotoDB is written.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>prev_album_id</structfield>;</term>
+<listitem><simpara>        The id of the previous playlist.  This is set
+                       automatically when the PhotoDB is written.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int1</structfield>;</term>
+<listitem><simpara>        Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int2</structfield>;</term>
+<listitem><simpara>        Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved1</structfield>;</term>
+<listitem><simpara>            Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved2</structfield>;</term>
+<listitem><simpara>            Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint64">guint64</link>&nbsp;<structfield>usertype</structfield>;</term>
+<listitem><simpara>             For use by application
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>userdata</structfield>;</term>
+<listitem><simpara>             For use by application
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="ItdbUserDataDuplicateFunc">ItdbUserDataDuplicateFunc</link>&nbsp;<structfield>userdata_duplicate</structfield>;</term>
+<listitem><simpara>   A function to duplicate <link linkend="userdata"><type>userdata</type></link>
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="ItdbUserDataDestroyFunc">ItdbUserDataDestroyFunc</link>&nbsp;<structfield>userdata_destroy</structfield>;</term>
+<listitem><simpara>     A function to free <link linkend="userdata"><type>userdata</type></link>
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-photodb-photoalbum-create" role="function" condition="since:0.4.2"/>itdb_photodb_photoalbum_create ()</title>
+<indexterm role="0.4.2"><primary>itdb_photodb_photoalbum_create</primary></indexterm><programlisting><link linkend="Itdb-PhotoAlbum">Itdb_PhotoAlbum</link>*    itdb_photodb_photoalbum_create      (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
+                                                         const <link linkend="gchar">gchar</link> *albumname,
+                                                         <link linkend="gint">gint</link> pos);</programlisting>
+<para>
+Create and add a new photoalbum.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>db</parameter>&nbsp;:</term>
+<listitem><simpara>         The database to create a new album in
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>albumname</parameter>&nbsp;:</term>
+<listitem><simpara>  the name of the new album
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>pos</parameter>&nbsp;:</term>
+<listitem><simpara>        position where to insert the newly created album (-1
+             to append at the end).
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the album which was created and added.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.2
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-photodb-photoalbum-add-photo" role="function" condition="since:0.4.2"/>itdb_photodb_photoalbum_add_photo ()</title>
+<indexterm role="0.4.2"><primary>itdb_photodb_photoalbum_add_photo</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_photodb_photoalbum_add_photo   (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
+                                                         <link linkend="Itdb-PhotoAlbum">Itdb_PhotoAlbum</link> *album,
+                                                         <link linkend="Itdb-Artwork">Itdb_Artwork</link> *photo,
+                                                         <link linkend="gint">gint</link> position);</programlisting>
+<para>
+Adds a photo already in the library to the specified album
+<parameter>album</parameter>. Photos are automatically added to the first album (Photo
+Library) when calling <link linkend="itdb-photodb-add-photo"><function>itdb_photodb_add_photo()</function></link> or
+<link linkend="itdb-photodb-add-photo-from-data"><function>itdb_photodb_add_photo_from_data()</function></link>, so you don't have to use this
+function to add them there.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>db</parameter>&nbsp;:</term>
+<listitem><simpara>         the <link linkend="Itdb-PhotoDB"><type>Itdb_PhotoDB</type></link> to act on
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>album</parameter>&nbsp;:</term>
+<listitem><simpara>      the <link linkend="Itdb-PhotoAlbum"><type>Itdb_PhotoAlbum</type></link> to add the photo to
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>photo</parameter>&nbsp;:</term>
+<listitem><simpara>      a pointer to the photo (<link linkend="Itdb-Artwork"><type>Itdb_Artwork</type></link>) to add to the
+             album
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>position</parameter>&nbsp;:</term>
+<listitem><simpara>   position where to insert the new photo (-1 to append
+             at the end)
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.2
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-photodb-photoalbum-by-name" role="function" condition="since:0.4.2"/>itdb_photodb_photoalbum_by_name ()</title>
+<indexterm role="0.4.2"><primary>itdb_photodb_photoalbum_by_name</primary></indexterm><programlisting><link linkend="Itdb-PhotoAlbum">Itdb_PhotoAlbum</link>*    itdb_photodb_photoalbum_by_name     (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
+                                                         const <link linkend="gchar">gchar</link> *albumname);</programlisting>
+<para>
+Find the first photoalbum with a given name or the Photo Library
+Album if called with no name.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>db</parameter>&nbsp;:</term>
+<listitem><simpara>         the <link linkend="Itdb-PhotoDB"><type>Itdb_PhotoDB</type></link> to retrieve the album from
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>albumname</parameter>&nbsp;:</term>
+<listitem><simpara>  the name of the photoalbum to get or NULL for the
+             master photoalbum.
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a pointer to the first photoalbum named <parameter>albumname</parameter>,
+else NULL
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.2
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-photodb-photoalbum-remove" role="function" condition="since:0.4.2"/>itdb_photodb_photoalbum_remove ()</title>
+<indexterm role="0.4.2"><primary>itdb_photodb_photoalbum_remove</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_photodb_photoalbum_remove      (<link linkend="Itdb-PhotoDB">Itdb_PhotoDB</link> *db,
+                                                         <link linkend="Itdb-PhotoAlbum">Itdb_PhotoAlbum</link> *album,
+                                                         <link linkend="gboolean">gboolean</link> remove_pics);</programlisting>
+<para>
+Remove <parameter>album</parameter> from the Photo Database. If <parameter>remove_pics</parameter> is TRUE,
+remove all photos contained in <parameter>album</parameter> from the Photo Database.
+</para>
+<para>
+<note>
+Memory used by the removed album will be freed and the album cannot
+be accessed any more.
+</note></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>db</parameter>&nbsp;:</term>
+<listitem><simpara>             the <link linkend="Itdb-PhotoDB"><type>Itdb_PhotoDB</type></link> to apply changes to
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>album</parameter>&nbsp;:</term>
+<listitem><simpara>          the album to be removed from the database
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>remove_pics</parameter>&nbsp;:</term>
+<listitem><simpara>    TRUE to remove pics in that album permanently
+                 from the database.
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.2
+</para></refsect2>
+
+</refsect1>
+
+
+
+
+
+<refsect1><refsect2 /><refsect2 /></refsect1>
+</refentry>

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/playlists.xml
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/playlists.xml	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/playlists.xml	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,811 @@
+<?xml version="1.0"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
+               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<refentry id="libgpod-Playlists">
+<refmeta>
+<refentrytitle role="top_of_page">Playlists</refentrytitle>
+<manvolnum>3</manvolnum>
+<refmiscinfo>LIBGPOD Library</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+<refname>Playlists</refname>
+<refpurpose>Data structure to represent an iPod playlist</refpurpose>
+<!--[<xref linkend="desc" endterm="desc.title"/>]-->
+</refnamediv>
+
+<refsynopsisdiv role="synopsis">
+<title role="synopsis.title">Synopsis</title>
+
+<synopsis>
+
+
+
+                    <link linkend="Itdb-Playlist">Itdb_Playlist</link>;
+enum                <link linkend="ItdbPlaylistSortOrder">ItdbPlaylistSortOrder</link>;
+<link linkend="Itdb-Playlist">Itdb_Playlist</link>*      <link linkend="itdb-playlist-new">itdb_playlist_new</link>                   (const <link linkend="gchar">gchar</link> *title,
+                                                         <link linkend="gboolean">gboolean</link> spl);
+<link linkend="void">void</link>                <link linkend="itdb-playlist-free">itdb_playlist_free</link>                  (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl);
+<link linkend="Itdb-Playlist">Itdb_Playlist</link>*      <link linkend="itdb-playlist-duplicate">itdb_playlist_duplicate</link>             (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl);
+<link linkend="void">void</link>                <link linkend="itdb-playlist-add">itdb_playlist_add</link>                   (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
+                                                         <link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl,
+                                                         <link linkend="gint32">gint32</link> pos);
+<link linkend="void">void</link>                <link linkend="itdb-playlist-move">itdb_playlist_move</link>                  (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl,
+                                                         <link linkend="guint32">guint32</link> pos);
+<link linkend="void">void</link>                <link linkend="itdb-playlist-remove">itdb_playlist_remove</link>                (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl);
+<link linkend="void">void</link>                <link linkend="itdb-playlist-unlink">itdb_playlist_unlink</link>                (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl);
+<link linkend="void">void</link>                <link linkend="itdb-playlist-add-track">itdb_playlist_add_track</link>             (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl,
+                                                         <link linkend="Itdb-Track">Itdb_Track</link> *track,
+                                                         <link linkend="gint32">gint32</link> pos);
+<link linkend="void">void</link>                <link linkend="itdb-playlist-remove-track">itdb_playlist_remove_track</link>          (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl,
+                                                         <link linkend="Itdb-Track">Itdb_Track</link> *track);
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-playlist-contains-track">itdb_playlist_contains_track</link>        (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl,
+                                                         <link linkend="Itdb-Track">Itdb_Track</link> *track);
+<link linkend="guint32">guint32</link>             <link linkend="itdb-playlist-contain-track-number">itdb_playlist_contain_track_number</link>  (<link linkend="Itdb-Track">Itdb_Track</link> *tr);
+<link linkend="guint32">guint32</link>             <link linkend="itdb-playlist-tracks-number">itdb_playlist_tracks_number</link>         (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl);
+<link linkend="Itdb-Playlist">Itdb_Playlist</link>*      <link linkend="itdb-playlist-mpl">itdb_playlist_mpl</link>                   (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-playlist-is-mpl">itdb_playlist_is_mpl</link>                (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl);
+<link linkend="void">void</link>                <link linkend="itdb-playlist-set-mpl">itdb_playlist_set_mpl</link>               (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl);
+<link linkend="Itdb-Playlist">Itdb_Playlist</link>*      <link linkend="itdb-playlist-podcasts">itdb_playlist_podcasts</link>              (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-playlist-is-podcasts">itdb_playlist_is_podcasts</link>           (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl);
+<link linkend="void">void</link>                <link linkend="itdb-playlist-set-podcasts">itdb_playlist_set_podcasts</link>          (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl);
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-playlist-exists">itdb_playlist_exists</link>                (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
+                                                         <link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl);
+<link linkend="Itdb-Playlist">Itdb_Playlist</link>*      <link linkend="itdb-playlist-by-id">itdb_playlist_by_id</link>                 (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
+                                                         <link linkend="guint64">guint64</link> id);
+<link linkend="Itdb-Playlist">Itdb_Playlist</link>*      <link linkend="itdb-playlist-by-nr">itdb_playlist_by_nr</link>                 (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
+                                                         <link linkend="guint32">guint32</link> num);
+<link linkend="Itdb-Playlist">Itdb_Playlist</link>*      <link linkend="itdb-playlist-by-name">itdb_playlist_by_name</link>               (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
+                                                         <link linkend="gchar">gchar</link> *name);
+<link linkend="void">void</link>                <link linkend="itdb-playlist-randomize">itdb_playlist_randomize</link>             (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl);
+</synopsis>
+</refsynopsisdiv>
+
+
+
+
+
+
+
+
+
+<refsect1 role="desc">
+<title role="desc.title">Description</title>
+<para>
+These functions and structures allow for adding and removing playlists,
+adding and removing tracks from playlists, sorting playlists, finding tracks in
+a playlist, etc.
+</para>
+</refsect1>
+
+<refsect1 role="details">
+<title role="details.title">Details</title>
+<refsect2>
+<title><anchor id="Itdb-Playlist" role="struct"/>Itdb_Playlist</title>
+<indexterm><primary>Itdb_Playlist</primary></indexterm><programlisting>typedef struct {
+    Itdb_iTunesDB *itdb;
+    gchar *name;
+    guint8 type;
+    guint8 flag1;
+    guint8 flag2;
+    guint8 flag3;
+    gint  num;
+    GList *members;
+    gboolean is_spl;
+    time_t timestamp;
+    guint64 id;
+    guint32 sortorder;
+    guint32 podcastflag;
+    Itdb_SPLPref splpref;
+    Itdb_SPLRules splrules;
+    gpointer reserved100;
+    gpointer reserved101;
+    /* reserved for future use */
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+    /* below is for use by application */
+    guint64 usertype;
+    gpointer userdata;
+    /* functions called to duplicate/free userdata */
+    ItdbUserDataDuplicateFunc userdata_duplicate;
+    ItdbUserDataDestroyFunc userdata_destroy;
+} Itdb_Playlist;
+</programlisting>
+<para>
+Structure representing an iTunes Playlist</para>
+<para>
+
+</para><variablelist role="struct">
+<varlistentry>
+<term><link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link>&nbsp;*<structfield>itdb</structfield>;</term>
+<listitem><simpara>               A pointer to the <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> (for convenience)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>name</structfield>;</term>
+<listitem><simpara>               The name of the playlist in UTF8
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>type</structfield>;</term>
+<listitem><simpara>               The playlist type (normal or master)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>flag1</structfield>;</term>
+<listitem><simpara>              Unknown, usually set to 0
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>flag2</structfield>;</term>
+<listitem><simpara>              Unknown, always set to 0
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>flag3</structfield>;</term>
+<listitem><simpara>              Unknown, always set to 0
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint">gint</link>&nbsp;<structfield>num</structfield>;</term>
+<listitem><simpara>                The number of tracks in the playlist
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="GList">GList</link>&nbsp;*<structfield>members</structfield>;</term>
+<listitem><simpara>            A list of tracks in the playlist (<link linkend="Itdb-Track"><type>Itdb_Track</type></link>)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gboolean">gboolean</link>&nbsp;<structfield>is_spl</structfield>;</term>
+<listitem><simpara>             True if the playlist is a smart playlist, otherwise
+                     false
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="time-t">time_t</link>&nbsp;<structfield>timestamp</structfield>;</term>
+<listitem><simpara>          When the playlist was created
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint64">guint64</link>&nbsp;<structfield>id</structfield>;</term>
+<listitem><simpara>                 The playlist ID
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>sortorder</structfield>;</term>
+<listitem><simpara>          The playlist sort order (<link linkend="ItdbPlaylistSortOrder"><type>ItdbPlaylistSortOrder</type></link>)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>podcastflag</structfield>;</term>
+<listitem><simpara>        This is set to 0 on normal playlists and to 1 for the
+                     Podcast playlist. If set to 1, the playlist will not be
+                     shown under 'Playlists' on the iPod, but as 'Podcasts'
+                     under the Music menu. The actual title of the Playlist
+                     does not matter. If more than one playlist is set to 1,
+                     they don't show up at all.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="Itdb-SPLPref">Itdb_SPLPref</link>&nbsp;<structfield>splpref</structfield>;</term>
+<listitem><simpara>            Smart playlist preferences (<link linkend="Itdb-SPLPref"><type>Itdb_SPLPref</type></link>)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="Itdb-SPLRules">Itdb_SPLRules</link>&nbsp;<structfield>splrules</structfield>;</term>
+<listitem><simpara>           Smart playlist rules (<link linkend="Itdb-SPLRules"><type>Itdb_SPLRules</type></link>)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved100</structfield>;</term>
+<listitem><simpara>        Reserved for MHOD100 implementation
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved101</structfield>;</term>
+<listitem><simpara>        Reserved for MHOD100 implementation
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int1</structfield>;</term>
+<listitem><simpara>      Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int2</structfield>;</term>
+<listitem><simpara>      Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved1</structfield>;</term>
+<listitem><simpara>          Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved2</structfield>;</term>
+<listitem><simpara>          Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint64">guint64</link>&nbsp;<structfield>usertype</structfield>;</term>
+<listitem><simpara>           For use by application
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>userdata</structfield>;</term>
+<listitem><simpara>           For use by application
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="ItdbUserDataDuplicateFunc">ItdbUserDataDuplicateFunc</link>&nbsp;<structfield>userdata_duplicate</structfield>;</term>
+<listitem><simpara> A function to duplicate <link linkend="userdata"><type>userdata</type></link>
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="ItdbUserDataDestroyFunc">ItdbUserDataDestroyFunc</link>&nbsp;<structfield>userdata_destroy</structfield>;</term>
+<listitem><simpara>   A function to free <link linkend="userdata"><type>userdata</type></link>
+</simpara></listitem>
+</varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="ItdbPlaylistSortOrder" role="enum" condition="since:0.1.3"/>enum ItdbPlaylistSortOrder</title>
+<indexterm role="0.1.3"><primary>ItdbPlaylistSortOrder</primary></indexterm><programlisting>typedef enum
+{
+    ITDB_PSO_MANUAL = 1,
+/*    ITDB_PSO_UNKNOWN = 2, */
+    ITDB_PSO_TITLE = 3,
+    ITDB_PSO_ALBUM = 4,
+    ITDB_PSO_ARTIST = 5,
+    ITDB_PSO_BIRATE = 6,
+    ITDB_PSO_GENRE = 7,
+    ITDB_PSO_FILETYPE = 8,
+    ITDB_PSO_TIME_MODIFIED = 9,
+    ITDB_PSO_TRACK_NR = 10,
+    ITDB_PSO_SIZE = 11,
+    ITDB_PSO_TIME = 12,  /* ? */
+    ITDB_PSO_YEAR = 13,
+    ITDB_PSO_SAMPLERATE = 14,
+    ITDB_PSO_COMMENT = 15,
+    ITDB_PSO_TIME_ADDED = 16,
+    ITDB_PSO_EQUALIZER = 17, /* ? */
+    ITDB_PSO_COMPOSER = 18,
+/*    ITDB_PSO_UNKNOWN = 19, */
+    ITDB_PSO_PLAYCOUNT = 20,
+    ITDB_PSO_TIME_PLAYED = 21,
+    ITDB_PSO_CD_NR = 22,
+    ITDB_PSO_RATING = 23,
+    ITDB_PSO_RELEASE_DATE = 24, /* used by podcasts */
+    ITDB_PSO_BPM = 25,
+    ITDB_PSO_GROUPING = 26,
+    ITDB_PSO_CATEGORY = 27,
+    ITDB_PSO_DESCRIPTION = 28
+} ItdbPlaylistSortOrder;
+</programlisting>
+<para>
+Playlist Sort Order</para>
+<para>
+
+</para><variablelist role="enum">
+<varlistentry>
+<term><anchor id="ITDB-PSO-MANUAL:CAPS" role="constant"/><literal>ITDB_PSO_MANUAL</literal></term>
+<listitem><simpara>        Sort by playlist order (manual sort)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-TITLE:CAPS" role="constant"/><literal>ITDB_PSO_TITLE</literal></term>
+<listitem><simpara>         Sort by track title
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-ALBUM:CAPS" role="constant"/><literal>ITDB_PSO_ALBUM</literal></term>
+<listitem><simpara>         Sort by album
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-ARTIST:CAPS" role="constant"/><literal>ITDB_PSO_ARTIST</literal></term>
+<listitem><simpara>        Sort by artist
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-BIRATE:CAPS" role="constant"/><literal>ITDB_PSO_BIRATE</literal></term>
+<listitem><simpara>        Sort by bitrate
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-GENRE:CAPS" role="constant"/><literal>ITDB_PSO_GENRE</literal></term>
+<listitem><simpara>         Sort by genre
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-FILETYPE:CAPS" role="constant"/><literal>ITDB_PSO_FILETYPE</literal></term>
+<listitem><simpara>      Sort by filetype
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-TIME-MODIFIED:CAPS" role="constant"/><literal>ITDB_PSO_TIME_MODIFIED</literal></term>
+<listitem><simpara> Sort by date modified
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-TRACK-NR:CAPS" role="constant"/><literal>ITDB_PSO_TRACK_NR</literal></term>
+<listitem><simpara>      Sort by track number
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-SIZE:CAPS" role="constant"/><literal>ITDB_PSO_SIZE</literal></term>
+<listitem><simpara>          Sort by track size
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-TIME:CAPS" role="constant"/><literal>ITDB_PSO_TIME</literal></term>
+<listitem><simpara>          Sort by track time
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-YEAR:CAPS" role="constant"/><literal>ITDB_PSO_YEAR</literal></term>
+<listitem><simpara>          Sort by year
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-SAMPLERATE:CAPS" role="constant"/><literal>ITDB_PSO_SAMPLERATE</literal></term>
+<listitem><simpara>    Sort by samplerate
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-COMMENT:CAPS" role="constant"/><literal>ITDB_PSO_COMMENT</literal></term>
+<listitem><simpara>       Sort by comments
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-TIME-ADDED:CAPS" role="constant"/><literal>ITDB_PSO_TIME_ADDED</literal></term>
+<listitem><simpara>    Sort by date added
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-EQUALIZER:CAPS" role="constant"/><literal>ITDB_PSO_EQUALIZER</literal></term>
+<listitem><simpara>     Sort by equilizer
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-COMPOSER:CAPS" role="constant"/><literal>ITDB_PSO_COMPOSER</literal></term>
+<listitem><simpara>      Sort by composer
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-PLAYCOUNT:CAPS" role="constant"/><literal>ITDB_PSO_PLAYCOUNT</literal></term>
+<listitem><simpara>     Sort by playcount
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-TIME-PLAYED:CAPS" role="constant"/><literal>ITDB_PSO_TIME_PLAYED</literal></term>
+<listitem><simpara>   Sort by date last played
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-CD-NR:CAPS" role="constant"/><literal>ITDB_PSO_CD_NR</literal></term>
+<listitem><simpara>         Sort by disc number
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-RATING:CAPS" role="constant"/><literal>ITDB_PSO_RATING</literal></term>
+<listitem><simpara>        Sort by rating
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-RELEASE-DATE:CAPS" role="constant"/><literal>ITDB_PSO_RELEASE_DATE</literal></term>
+<listitem><simpara>  Sort by release date
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-BPM:CAPS" role="constant"/><literal>ITDB_PSO_BPM</literal></term>
+<listitem><simpara>           Sort by beats per minute
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-GROUPING:CAPS" role="constant"/><literal>ITDB_PSO_GROUPING</literal></term>
+<listitem><simpara>      Sort by grouping
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-CATEGORY:CAPS" role="constant"/><literal>ITDB_PSO_CATEGORY</literal></term>
+<listitem><simpara>      Sort by category
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-PSO-DESCRIPTION:CAPS" role="constant"/><literal>ITDB_PSO_DESCRIPTION</literal></term>
+<listitem><simpara>   Sort by description
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.1.3
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-playlist-new" role="function"/>itdb_playlist_new ()</title>
+<indexterm><primary>itdb_playlist_new</primary></indexterm><programlisting><link linkend="Itdb-Playlist">Itdb_Playlist</link>*      itdb_playlist_new                   (const <link linkend="gchar">gchar</link> *title,
+                                                         <link linkend="gboolean">gboolean</link> spl);</programlisting>
+<para>
+Creates a new playlist. If <parameter>spl</parameter> is TRUE, a smart playlist is
+generated. pl->id is set by <link linkend="itdb-playlist-add"><function>itdb_playlist_add()</function></link> when the playlist
+is added to an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>title</parameter>&nbsp;:</term>
+<listitem><simpara>  playlist title
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>spl</parameter>&nbsp;:</term>
+<listitem><simpara>    smart playlist flag
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link> which must be freed with
+<link linkend="itdb-playlist-free"><function>itdb_playlist_free()</function></link> after use
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-playlist-free" role="function"/>itdb_playlist_free ()</title>
+<indexterm><primary>itdb_playlist_free</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_playlist_free                  (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl);</programlisting>
+<para>
+Frees the memory used by playlist <parameter>pl</parameter>.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>pl</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-playlist-duplicate" role="function"/>itdb_playlist_duplicate ()</title>
+<indexterm><primary>itdb_playlist_duplicate</primary></indexterm><programlisting><link linkend="Itdb-Playlist">Itdb_Playlist</link>*      itdb_playlist_duplicate             (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl);</programlisting>
+<para>
+Duplicates an existing playlist. <parameter>pl_dup->id</parameter> is set to zero, so
+that it will be set to a unique value when adding it to an
+<link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>. The returned playlist won't be associated with an
+<link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>pl</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a newly allocated <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link> that you'll have to
+free with <link linkend="itdb-playlist-free"><function>itdb_playlist_free()</function></link> when you no longer need it.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-playlist-add" role="function"/>itdb_playlist_add ()</title>
+<indexterm><primary>itdb_playlist_add</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_playlist_add                   (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
+                                                         <link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl,
+                                                         <link linkend="gint32">gint32</link> pos);</programlisting>
+<para>
+Adds playlist <parameter>pl</parameter> to the database <parameter>itdb</parameter> at position <parameter>pos</parameter> (-1 for
+"append to end"). A unique id is created if <parameter>pl->id</parameter> is equal to
+zero. After calling this function, <parameter>itdb</parameter> manages the memory of <parameter>pl</parameter>,
+which means you no longer need to explicitly call
+<link linkend="itdb-playlist-free"><function>itdb_playlist_free()</function></link></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
+<listitem><simpara>   an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>pl</parameter>&nbsp;:</term>
+<listitem><simpara>     an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>pos</parameter>&nbsp;:</term>
+<listitem><simpara>    position to insert <parameter>pl</parameter> at
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-playlist-move" role="function"/>itdb_playlist_move ()</title>
+<indexterm><primary>itdb_playlist_move</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_playlist_move                  (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl,
+                                                         <link linkend="guint32">guint32</link> pos);</programlisting>
+<para>
+Moves playlist <parameter>pl</parameter> to position <parameter>pos</parameter></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>pl</parameter>&nbsp;:</term>
+<listitem><simpara>     an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>pos</parameter>&nbsp;:</term>
+<listitem><simpara>    new position
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-playlist-remove" role="function"/>itdb_playlist_remove ()</title>
+<indexterm><primary>itdb_playlist_remove</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_playlist_remove                (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl);</programlisting>
+<para>
+Removes <parameter>pl</parameter> from the <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> it's associated with
+and frees memory</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>pl</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-playlist-unlink" role="function"/>itdb_playlist_unlink ()</title>
+<indexterm><primary>itdb_playlist_unlink</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_playlist_unlink                (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl);</programlisting>
+<para>
+Remove <parameter>pl</parameter> from the <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> it's associated with but do not
+free memory. <parameter>pl->itdb</parameter> is set to NULL after this function returns</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>pl</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-playlist-add-track" role="function"/>itdb_playlist_add_track ()</title>
+<indexterm><primary>itdb_playlist_add_track</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_playlist_add_track             (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl,
+                                                         <link linkend="Itdb-Track">Itdb_Track</link> *track,
+                                                         <link linkend="gint32">gint32</link> pos);</programlisting>
+<para>
+Adds <parameter>track</parameter> to <parameter>pl</parameter> at position <parameter>pos</parameter> (-1 to append at the end)</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>pl</parameter>&nbsp;:</term>
+<listitem><simpara>     an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>track</parameter>&nbsp;:</term>
+<listitem><simpara>  an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>pos</parameter>&nbsp;:</term>
+<listitem><simpara>    position to insert <parameter>track</parameter> at
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-playlist-remove-track" role="function"/>itdb_playlist_remove_track ()</title>
+<indexterm><primary>itdb_playlist_remove_track</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_playlist_remove_track          (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl,
+                                                         <link linkend="Itdb-Track">Itdb_Track</link> *track);</programlisting>
+<para>
+Removes <parameter>track</parameter> from <parameter>pl</parameter>. If <parameter>pl</parameter> is NULL, removes <parameter>track</parameter> from the
+master playlist. If <parameter>track</parameter> can't be found in <parameter>pl</parameter>, nothing happens.
+If after removing <parameter>track</parameter>, <parameter>pl</parameter> is empty, it's not removed from the
+database The memory used by <parameter>track</parameter> isn't freed.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>pl</parameter>&nbsp;:</term>
+<listitem><simpara>     an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>track</parameter>&nbsp;:</term>
+<listitem><simpara>  an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-playlist-contains-track" role="function"/>itdb_playlist_contains_track ()</title>
+<indexterm><primary>itdb_playlist_contains_track</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_playlist_contains_track        (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl,
+                                                         <link linkend="Itdb-Track">Itdb_Track</link> *track);</programlisting>
+<para>
+Checks if <parameter>track</parameter> is in <parameter>pl</parameter></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>pl</parameter>&nbsp;:</term>
+<listitem><simpara>     an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>track</parameter>&nbsp;:</term>
+<listitem><simpara>  an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if <parameter>track</parameter> is in <parameter>pl</parameter>, FALSE otherwise
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-playlist-contain-track-number" role="function"/>itdb_playlist_contain_track_number ()</title>
+<indexterm><primary>itdb_playlist_contain_track_number</primary></indexterm><programlisting><link linkend="guint32">guint32</link>             itdb_playlist_contain_track_number  (<link linkend="Itdb-Track">Itdb_Track</link> *tr);</programlisting>
+<para>
+Counts the number of playlist <parameter>track</parameter> is a member of (not including
+the master playlist)</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>tr</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the number of playlist containing <parameter>track</parameter>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-playlist-tracks-number" role="function"/>itdb_playlist_tracks_number ()</title>
+<indexterm><primary>itdb_playlist_tracks_number</primary></indexterm><programlisting><link linkend="guint32">guint32</link>             itdb_playlist_tracks_number         (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl);</programlisting>
+<para>
+Counts the number of tracks in <parameter>pl</parameter></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>pl</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the number of tracks in <parameter>pl</parameter>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-playlist-mpl" role="function"/>itdb_playlist_mpl ()</title>
+<indexterm><primary>itdb_playlist_mpl</primary></indexterm><programlisting><link linkend="Itdb-Playlist">Itdb_Playlist</link>*      itdb_playlist_mpl                   (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);</programlisting>
+<para>
+Gets the master playlist of <parameter>itdb</parameter></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the master playlist of <parameter>itdb</parameter>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-playlist-is-mpl" role="function" condition="since:0.1.6"/>itdb_playlist_is_mpl ()</title>
+<indexterm role="0.1.6"><primary>itdb_playlist_is_mpl</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_playlist_is_mpl                (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl);</programlisting>
+<para>
+Checks if <parameter>pl</parameter> is the master playlist</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>pl</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if <parameter>pl</parameter> is the master playlist, FALSE otherwise
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.1.6
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-playlist-set-mpl" role="function" condition="since:0.2.0"/>itdb_playlist_set_mpl ()</title>
+<indexterm role="0.2.0"><primary>itdb_playlist_set_mpl</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_playlist_set_mpl               (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl);</programlisting>
+<para>
+Sets <parameter>pl</parameter> to be a master playlist</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>pl</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.2.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-playlist-podcasts" role="function" condition="since:0.1.6"/>itdb_playlist_podcasts ()</title>
+<indexterm role="0.1.6"><primary>itdb_playlist_podcasts</primary></indexterm><programlisting><link linkend="Itdb-Playlist">Itdb_Playlist</link>*      itdb_playlist_podcasts              (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);</programlisting>
+<para>
+Gets the podcasts playlist of <parameter>itdb</parameter></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the podcasts playlist of <parameter>itdb</parameter>, or NULL if there is
+not one
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.1.6
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-playlist-is-podcasts" role="function" condition="since:0.1.6"/>itdb_playlist_is_podcasts ()</title>
+<indexterm role="0.1.6"><primary>itdb_playlist_is_podcasts</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_playlist_is_podcasts           (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl);</programlisting>
+<para>
+Checks if <parameter>pl</parameter> is the podcasts playlist</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>pl</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if <parameter>pl</parameter> is the podcasts playlist, FALSE otherwise
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.1.6
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-playlist-set-podcasts" role="function" condition="since:0.2.0"/>itdb_playlist_set_podcasts ()</title>
+<indexterm role="0.2.0"><primary>itdb_playlist_set_podcasts</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_playlist_set_podcasts          (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl);</programlisting>
+<para>
+Set <parameter>pl</parameter> to be a podcasts playlist</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>pl</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.2.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-playlist-exists" role="function"/>itdb_playlist_exists ()</title>
+<indexterm><primary>itdb_playlist_exists</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_playlist_exists                (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
+                                                         <link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl);</programlisting>
+<para>
+Checks if <parameter>pl</parameter> is present in <parameter>itdb</parameter></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
+<listitem><simpara>   an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>pl</parameter>&nbsp;:</term>
+<listitem><simpara>     an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if <parameter>pl</parameter> exists in <parameter>itdb</parameter>, FALSE otherwise
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-playlist-by-id" role="function"/>itdb_playlist_by_id ()</title>
+<indexterm><primary>itdb_playlist_by_id</primary></indexterm><programlisting><link linkend="Itdb-Playlist">Itdb_Playlist</link>*      itdb_playlist_by_id                 (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
+                                                         <link linkend="guint64">guint64</link> id);</programlisting>
+<para>
+Looks up a playlist whose ID is <parameter>id</parameter></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
+<listitem><simpara>   an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>id</parameter>&nbsp;:</term>
+<listitem><simpara>     ID of the playlist to look for
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link> with ID <parameter>id</parameter> or NULL if there is no
+such playlist.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-playlist-by-nr" role="function"/>itdb_playlist_by_nr ()</title>
+<indexterm><primary>itdb_playlist_by_nr</primary></indexterm><programlisting><link linkend="Itdb-Playlist">Itdb_Playlist</link>*      itdb_playlist_by_nr                 (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
+                                                         <link linkend="guint32">guint32</link> num);</programlisting>
+<para>
+Gets the playlist at the given position in <parameter>itdb</parameter></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
+<listitem><simpara>   an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>num</parameter>&nbsp;:</term>
+<listitem><simpara>    the position of the playlist, counting from 0
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>, or NULL if there is no playlist
+at <parameter>pos</parameter>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-playlist-by-name" role="function"/>itdb_playlist_by_name ()</title>
+<indexterm><primary>itdb_playlist_by_name</primary></indexterm><programlisting><link linkend="Itdb-Playlist">Itdb_Playlist</link>*      itdb_playlist_by_name               (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
+                                                         <link linkend="gchar">gchar</link> *name);</programlisting>
+<para>
+Searches a playlist whose name is <parameter>name</parameter> in <parameter>itdb</parameter></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
+<listitem><simpara>   an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
+<listitem><simpara>   name of the playlist to look for
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the first <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link> with name <parameter>name</parameter>, NULL if
+there is no such playlist
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-playlist-randomize" role="function"/>itdb_playlist_randomize ()</title>
+<indexterm><primary>itdb_playlist_randomize</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_playlist_randomize             (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl);</programlisting>
+<para>
+Randomizes <parameter>pl</parameter></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>pl</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link> to randomize
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+
+</refsect1>
+
+
+
+
+
+<refsect1><refsect2 /><refsect2 /></refsect1>
+</refentry>

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/smart-playlists.xml
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/smart-playlists.xml	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/smart-playlists.xml	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,1256 @@
+<?xml version="1.0"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
+               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<refentry id="libgpod-Smart-Playlists">
+<refmeta>
+<refentrytitle role="top_of_page">Smart Playlists</refentrytitle>
+<manvolnum>3</manvolnum>
+<refmiscinfo>LIBGPOD Library</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+<refname>Smart Playlists</refname>
+<refpurpose>Data structure to represent an iPod smart playlist</refpurpose>
+<!--[<xref linkend="desc" endterm="desc.title"/>]-->
+</refnamediv>
+
+<refsynopsisdiv role="synopsis">
+<title role="synopsis.title">Synopsis</title>
+
+<synopsis>
+
+
+
+                    <link linkend="Itdb-SPLPref">Itdb_SPLPref</link>;
+                    <link linkend="Itdb-SPLRule">Itdb_SPLRule</link>;
+                    <link linkend="Itdb-SPLRules">Itdb_SPLRules</link>;
+enum                <link linkend="ItdbLimitSort">ItdbLimitSort</link>;
+enum                <link linkend="ItdbLimitType">ItdbLimitType</link>;
+enum                <link linkend="ItdbSPLAction">ItdbSPLAction</link>;
+enum                <link linkend="ItdbSPLActionLast">ItdbSPLActionLast</link>;
+enum                <link linkend="ItdbSPLActionType">ItdbSPLActionType</link>;
+enum                <link linkend="ItdbSPLField">ItdbSPLField</link>;
+enum                <link linkend="ItdbSPLFieldType">ItdbSPLFieldType</link>;
+enum                <link linkend="ItdbSPLMatch">ItdbSPLMatch</link>;
+#define             <link linkend="ITDB-SPL-DATE-IDENTIFIER:CAPS">ITDB_SPL_DATE_IDENTIFIER</link>
+#define             <link linkend="ITDB-SPL-STRING-MAXLEN:CAPS">ITDB_SPL_STRING_MAXLEN</link>
+<link linkend="ItdbSPLFieldType">ItdbSPLFieldType</link>    <link linkend="itdb-splr-get-field-type">itdb_splr_get_field_type</link>            (const <link linkend="Itdb-SPLRule">Itdb_SPLRule</link> *splr);
+<link linkend="ItdbSPLActionType">ItdbSPLActionType</link>   <link linkend="itdb-splr-get-action-type">itdb_splr_get_action_type</link>           (const <link linkend="Itdb-SPLRule">Itdb_SPLRule</link> *splr);
+<link linkend="void">void</link>                <link linkend="itdb-splr-validate">itdb_splr_validate</link>                  (<link linkend="Itdb-SPLRule">Itdb_SPLRule</link> *splr);
+<link linkend="void">void</link>                <link linkend="itdb-splr-remove">itdb_splr_remove</link>                    (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl,
+                                                         <link linkend="Itdb-SPLRule">Itdb_SPLRule</link> *splr);
+<link linkend="Itdb-SPLRule">Itdb_SPLRule</link>*       <link linkend="itdb-splr-new">itdb_splr_new</link>                       (void);
+<link linkend="void">void</link>                <link linkend="itdb-splr-add">itdb_splr_add</link>                       (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl,
+                                                         <link linkend="Itdb-SPLRule">Itdb_SPLRule</link> *splr,
+                                                         <link linkend="gint">gint</link> pos);
+<link linkend="Itdb-SPLRule">Itdb_SPLRule</link>*       <link linkend="itdb-splr-add-new">itdb_splr_add_new</link>                   (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl,
+                                                         <link linkend="gint">gint</link> pos);
+<link linkend="void">void</link>                <link linkend="itdb-spl-copy-rules">itdb_spl_copy_rules</link>                 (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *dest,
+                                                         <link linkend="Itdb-Playlist">Itdb_Playlist</link> *src);
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-splr-eval">itdb_splr_eval</link>                      (<link linkend="Itdb-SPLRule">Itdb_SPLRule</link> *splr,
+                                                         <link linkend="Itdb-Track">Itdb_Track</link> *track);
+<link linkend="void">void</link>                <link linkend="itdb-spl-update">itdb_spl_update</link>                     (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *spl);
+<link linkend="void">void</link>                <link linkend="itdb-spl-update-all">itdb_spl_update_all</link>                 (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);
+<link linkend="void">void</link>                <link linkend="itdb-spl-update-live">itdb_spl_update_live</link>                (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);
+</synopsis>
+</refsynopsisdiv>
+
+
+
+
+
+
+
+
+
+<refsect1 role="desc">
+<title role="desc.title">Description</title>
+<para>
+These functions and structures are for dealing with smart playlists.
+</para>
+</refsect1>
+
+<refsect1 role="details">
+<title role="details.title">Details</title>
+<refsect2>
+<title><anchor id="Itdb-SPLPref" role="struct" condition="since:0.5.0"/>Itdb_SPLPref</title>
+<indexterm role="0.5.0"><primary>Itdb_SPLPref</primary></indexterm><programlisting>typedef struct {
+    guint8  liveupdate;
+    guint8  checkrules;
+    guint8  checklimits;
+    guint32 limittype;
+    guint32 limitsort;
+    guint32 limitvalue;
+    guint8  matchcheckedonly;
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+} Itdb_SPLPref;
+</programlisting>
+<para>
+Smart Playlist preferences are for various flags that are not strictly smart
+playlist "rules."</para>
+<para>
+
+</para><variablelist role="struct">
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>liveupdate</structfield>;</term>
+<listitem><simpara>         Live Updating
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>checkrules</structfield>;</term>
+<listitem><simpara>         Match this number of rules.  If set to 0, ignore rules.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>checklimits</structfield>;</term>
+<listitem><simpara>        Limit to this number of <parameter>limittype</parameter>.  If 0, no limits.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>limittype</structfield>;</term>
+<listitem><simpara>          an <link linkend="ItdbLimitType"><type>ItdbLimitType</type></link>
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>limitsort</structfield>;</term>
+<listitem><simpara>          an <link linkend="ItdbLimitSort"><type>ItdbLimitSort</type></link>
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>limitvalue</structfield>;</term>
+<listitem><simpara>         The value typed next to "Limit type"
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>matchcheckedonly</structfield>;</term>
+<listitem><simpara>   Match only checked songs
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int1</structfield>;</term>
+<listitem><simpara>      Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int2</structfield>;</term>
+<listitem><simpara>      Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved1</structfield>;</term>
+<listitem><simpara>          Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved2</structfield>;</term>
+<listitem><simpara>          Reserved for future use
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.5.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="Itdb-SPLRule" role="struct" condition="since:0.5.0"/>Itdb_SPLRule</title>
+<indexterm role="0.5.0"><primary>Itdb_SPLRule</primary></indexterm><programlisting>typedef struct {
+    guint32 field;
+    guint32 action;
+    gchar *string;
+    guint64 fromvalue;
+    gint64 fromdate;
+    guint64 fromunits;
+    guint64 tovalue;
+    gint64 todate;
+    guint64 tounits;
+    guint32 unk052;
+    guint32 unk056;
+    guint32 unk060;
+    guint32 unk064;
+    guint32 unk068;
+    /* reserved for future use */
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+} Itdb_SPLRule;
+</programlisting>
+<para>
+Smart Playlist Rule
+</para>
+<para>
+The from and to fields require some explanation.  If <parameter>field</parameter> is a date type,
+then <parameter>value</parameter> would be set to 0x2dae2dae2dae2dae, <parameter>date</parameter> would be a number,
+(e.g. 2 or -2), and <parameter>units</parameter> would be a time unit in seconds (e.g. one week
+would be 604800).  If <parameter>field</parameter> is an integer comparison, like rating = 60 (i.e.
+3 stars), then <parameter>value</parameter> would be the value we care about (e.g. 60), <parameter>date</parameter> would
+be 0, and <parameter>units</parameter> would be 1.  Binary AND types are similar, <parameter>value</parameter> is the
+important part, with <parameter>date</parameter> = 0 and <parameter>units</parameter> = 1.  Clear as mud, right?
+</para>
+<para>
+For more details see <ulink
+url="http://ipodlinux.org/ITunesDB.html&num;Smart_Playlist_Rule_Values">ipodlinux.org</ulink>.</para>
+<para>
+
+</para><variablelist role="struct">
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>field</structfield>;</term>
+<listitem><simpara>          an <link linkend="ItdbSPLFieldType"><type>ItdbSPLFieldType</type></link>
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>action</structfield>;</term>
+<listitem><simpara>         an <link linkend="ItdbSPLActionType"><type>ItdbSPLActionType</type></link>
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>string</structfield>;</term>
+<listitem><simpara>         data in UTF8
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint64">guint64</link>&nbsp;<structfield>fromvalue</structfield>;</term>
+<listitem><simpara>      from value
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint64">gint64</link>&nbsp;<structfield>fromdate</structfield>;</term>
+<listitem><simpara>       from date
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint64">guint64</link>&nbsp;<structfield>fromunits</structfield>;</term>
+<listitem><simpara>      from units
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint64">guint64</link>&nbsp;<structfield>tovalue</structfield>;</term>
+<listitem><simpara>        to value
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint64">gint64</link>&nbsp;<structfield>todate</structfield>;</term>
+<listitem><simpara>         to date
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint64">guint64</link>&nbsp;<structfield>tounits</structfield>;</term>
+<listitem><simpara>        to units
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk052</structfield>;</term>
+<listitem><simpara>         Unknown
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk056</structfield>;</term>
+<listitem><simpara>         Unknown
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk060</structfield>;</term>
+<listitem><simpara>         Unknown
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk064</structfield>;</term>
+<listitem><simpara>         Unknown
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk068</structfield>;</term>
+<listitem><simpara>         Unknown
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int1</structfield>;</term>
+<listitem><simpara>  Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int2</structfield>;</term>
+<listitem><simpara>  Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved1</structfield>;</term>
+<listitem><simpara>      Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved2</structfield>;</term>
+<listitem><simpara>      Reserved for future use
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.5.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="Itdb-SPLRules" role="struct" condition="since:0.5.0"/>Itdb_SPLRules</title>
+<indexterm role="0.5.0"><primary>Itdb_SPLRules</primary></indexterm><programlisting>typedef struct {
+    guint32 unk004;
+    guint32 match_operator;
+    GList *rules;
+    /* reserved for future use */
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+} Itdb_SPLRules;
+</programlisting>
+<para>
+Smart Playlist Rules</para>
+<para>
+
+</para><variablelist role="struct">
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk004</structfield>;</term>
+<listitem><simpara>         Unknown
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>match_operator</structfield>;</term>
+<listitem><simpara> Whether all rules must match (<link linkend="ITDB-SPLMATCH-AND:CAPS"><type>ITDB_SPLMATCH_AND</type></link>) or any
+                 rules may match (<link linkend="ITDB-SPLMATCH-OR:CAPS"><type>ITDB_SPLMATCH_OR</type></link>)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="GList">GList</link>&nbsp;*<structfield>rules</structfield>;</term>
+<listitem><simpara>          list of <link linkend="Itdb-SPLRule"><type>Itdb_SPLRule</type></link>'s
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int1</structfield>;</term>
+<listitem><simpara>  Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int2</structfield>;</term>
+<listitem><simpara>  Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved1</structfield>;</term>
+<listitem><simpara>      Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved2</structfield>;</term>
+<listitem><simpara>      Reserved for future use
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.5.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="ItdbLimitSort" role="enum" condition="since:0.5.0"/>enum ItdbLimitSort</title>
+<indexterm role="0.5.0"><primary>ItdbLimitSort</primary></indexterm><programlisting>typedef enum {
+    ITDB_LIMITSORT_RANDOM = 0x02,
+    ITDB_LIMITSORT_SONG_NAME = 0x03,
+    ITDB_LIMITSORT_ALBUM = 0x04,
+    ITDB_LIMITSORT_ARTIST = 0x05,
+    ITDB_LIMITSORT_GENRE = 0x07,
+    ITDB_LIMITSORT_MOST_RECENTLY_ADDED = 0x10,
+    ITDB_LIMITSORT_LEAST_RECENTLY_ADDED = 0x80000010, /* See note above */
+    ITDB_LIMITSORT_MOST_OFTEN_PLAYED = 0x14,
+    ITDB_LIMITSORT_LEAST_OFTEN_PLAYED = 0x80000014,   /* See note above */
+    ITDB_LIMITSORT_MOST_RECENTLY_PLAYED = 0x15,
+    ITDB_LIMITSORT_LEAST_RECENTLY_PLAYED = 0x80000015,/* See note above */
+    ITDB_LIMITSORT_HIGHEST_RATING = 0x17,
+    ITDB_LIMITSORT_LOWEST_RATING = 0x80000017,        /* See note above */
+} ItdbLimitSort;
+</programlisting>
+<para>
+Which songs to pick when using a limit type
+</para>
+<para>
+Note: the values for <link linkend="ITDB-LIMITSORT-LEAST-RECENTLY-ADDED:CAPS"><type>ITDB_LIMITSORT_LEAST_RECENTLY_ADDED</type></link>,
+<link linkend="ITDB-LIMITSORT-LEAST-OFTEN-PLAYED:CAPS"><type>ITDB_LIMITSORT_LEAST_OFTEN_PLAYED</type></link>, <link linkend="ITDB-LIMITSORT-LEAST-RECENTLY-PLAYED:CAPS"><type>ITDB_LIMITSORT_LEAST_RECENTLY_PLAYED</type></link>,
+and <link linkend="ITDB-LIMITSORT-LOWEST-RATING:CAPS"><type>ITDB_LIMITSORT_LOWEST_RATING</type></link> are really 0x10, 0x14, 0x15, 0x17, with the
+'limitsort_opposite' flag set.  This is the same value as the "positive"
+value (i.e. <link linkend="ITDB-LIMITSORT-LEAST-RECENTLY-ADDED:CAPS"><type>ITDB_LIMITSORT_LEAST_RECENTLY_ADDED</type></link>), and is really very
+terribly awfully weird, so we map the values to iPodDB specific values with
+the high bit set.
+</para>
+<para>
+On writing, we check the high bit and write the limitsort_opposite from that.
+That way, we don't have to deal with programs using the class needing to set
+the wrong limit and then make it into the "opposite", which would be frickin'
+annoying.</para>
+<para>
+
+</para><variablelist role="enum">
+<varlistentry>
+<term><anchor id="ITDB-LIMITSORT-RANDOM:CAPS" role="constant"/><literal>ITDB_LIMITSORT_RANDOM</literal></term>
+<listitem><simpara>                Sort randomly
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-LIMITSORT-SONG-NAME:CAPS" role="constant"/><literal>ITDB_LIMITSORT_SONG_NAME</literal></term>
+<listitem><simpara>             Sort by track name
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-LIMITSORT-ALBUM:CAPS" role="constant"/><literal>ITDB_LIMITSORT_ALBUM</literal></term>
+<listitem><simpara>                 Sort by album name
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-LIMITSORT-ARTIST:CAPS" role="constant"/><literal>ITDB_LIMITSORT_ARTIST</literal></term>
+<listitem><simpara>                Sort by artist name
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-LIMITSORT-GENRE:CAPS" role="constant"/><literal>ITDB_LIMITSORT_GENRE</literal></term>
+<listitem><simpara>                 Sort by genre
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-LIMITSORT-MOST-RECENTLY-ADDED:CAPS" role="constant"/><literal>ITDB_LIMITSORT_MOST_RECENTLY_ADDED</literal></term>
+<listitem><simpara>   Sort by most recently added
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-LIMITSORT-LEAST-RECENTLY-ADDED:CAPS" role="constant"/><literal>ITDB_LIMITSORT_LEAST_RECENTLY_ADDED</literal></term>
+<listitem><simpara>  Sort by least recently added
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-LIMITSORT-MOST-OFTEN-PLAYED:CAPS" role="constant"/><literal>ITDB_LIMITSORT_MOST_OFTEN_PLAYED</literal></term>
+<listitem><simpara>     Sort by most often played
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-LIMITSORT-LEAST-OFTEN-PLAYED:CAPS" role="constant"/><literal>ITDB_LIMITSORT_LEAST_OFTEN_PLAYED</literal></term>
+<listitem><simpara>    Sort by least often played
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-LIMITSORT-MOST-RECENTLY-PLAYED:CAPS" role="constant"/><literal>ITDB_LIMITSORT_MOST_RECENTLY_PLAYED</literal></term>
+<listitem><simpara>  Sort by most recently played
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-LIMITSORT-LEAST-RECENTLY-PLAYED:CAPS" role="constant"/><literal>ITDB_LIMITSORT_LEAST_RECENTLY_PLAYED</literal></term>
+<listitem><simpara> Sort by least recently played
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-LIMITSORT-HIGHEST-RATING:CAPS" role="constant"/><literal>ITDB_LIMITSORT_HIGHEST_RATING</literal></term>
+<listitem><simpara>        Sort by highest rating
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-LIMITSORT-LOWEST-RATING:CAPS" role="constant"/><literal>ITDB_LIMITSORT_LOWEST_RATING</literal></term>
+<listitem><simpara>         Sort by lowest rating
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.5.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="ItdbLimitType" role="enum" condition="since:0.5.0"/>enum ItdbLimitType</title>
+<indexterm role="0.5.0"><primary>ItdbLimitType</primary></indexterm><programlisting>typedef enum {
+    ITDB_LIMITTYPE_MINUTES = 0x01,
+    ITDB_LIMITTYPE_MB      = 0x02,
+    ITDB_LIMITTYPE_SONGS   = 0x03,
+    ITDB_LIMITTYPE_HOURS   = 0x04,
+    ITDB_LIMITTYPE_GB      = 0x05
+} ItdbLimitType;
+</programlisting>
+<para>
+The type of unit to use when limiting a playlist</para>
+<para>
+
+</para><variablelist role="enum">
+<varlistentry>
+<term><anchor id="ITDB-LIMITTYPE-MINUTES:CAPS" role="constant"/><literal>ITDB_LIMITTYPE_MINUTES</literal></term>
+<listitem><simpara> Limit in minutes
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-LIMITTYPE-MB:CAPS" role="constant"/><literal>ITDB_LIMITTYPE_MB</literal></term>
+<listitem><simpara>      Limit in megabytes
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-LIMITTYPE-SONGS:CAPS" role="constant"/><literal>ITDB_LIMITTYPE_SONGS</literal></term>
+<listitem><simpara>   Limit in number of songs
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-LIMITTYPE-HOURS:CAPS" role="constant"/><literal>ITDB_LIMITTYPE_HOURS</literal></term>
+<listitem><simpara>   Limit in hours
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-LIMITTYPE-GB:CAPS" role="constant"/><literal>ITDB_LIMITTYPE_GB</literal></term>
+<listitem><simpara>      Limit in gigabytes
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.5.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="ItdbSPLAction" role="enum" condition="since:0.5.0"/>enum ItdbSPLAction</title>
+<indexterm role="0.5.0"><primary>ItdbSPLAction</primary></indexterm><programlisting>typedef enum {
+    ITDB_SPLACTION_IS_INT = 0x00000001,
+    ITDB_SPLACTION_IS_GREATER_THAN = 0x00000010,
+    ITDB_SPLACTION_IS_LESS_THAN = 0x00000040,
+    ITDB_SPLACTION_IS_IN_THE_RANGE = 0x00000100,
+    ITDB_SPLACTION_IS_IN_THE_LAST = 0x00000200,
+    ITDB_SPLACTION_BINARY_AND = 0x00000400,
+
+    ITDB_SPLACTION_IS_STRING = 0x01000001,
+    ITDB_SPLACTION_CONTAINS = 0x01000002,
+    ITDB_SPLACTION_STARTS_WITH = 0x01000004,
+    ITDB_SPLACTION_ENDS_WITH = 0x01000008,
+
+    ITDB_SPLACTION_IS_NOT_INT = 0x02000001,
+    ITDB_SPLACTION_IS_NOT_GREATER_THAN = 0x02000010,
+    ITDB_SPLACTION_IS_NOT_LESS_THAN = 0x02000040,
+    ITDB_SPLACTION_IS_NOT_IN_THE_RANGE = 0x02000100,
+    ITDB_SPLACTION_IS_NOT_IN_THE_LAST = 0x02000200,
+
+    ITDB_SPLACTION_IS_NOT = 0x03000001,
+    ITDB_SPLACTION_DOES_NOT_CONTAIN = 0x03000002,
+    ITDB_SPLACTION_DOES_NOT_START_WITH = 0x03000004,
+    ITDB_SPLACTION_DOES_NOT_END_WITH = 0x03000008,
+} ItdbSPLAction;
+</programlisting>
+<para>
+Smartlist Actions used in smart playlist rules.
+</para>
+<para>
+Note by Otto (Samuel Wood):
+<informalexample>
+ <programlisting>
+ really this is a bitmapped field...
+ high byte
+ bit 0 = "string" values if set, "int" values if not set
+ bit 1 = "not", or to negate the check.
+ lower 2 bytes
+ bit 0 = simple "IS" query
+ bit 1 = contains
+ bit 2 = begins with
+ bit 3 = ends with
+ bit 4 = greater than
+ bit 5 = unknown, but probably greater than or equal to
+ bit 6 = less than
+ bit 7 = unknown, but probably less than or equal to
+ bit 8 = a range selection
+ bit 9 = "in the last"
+ </programlisting>
+</informalexample></para>
+<para>
+
+</para><variablelist role="enum">
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-IS-INT:CAPS" role="constant"/><literal>ITDB_SPLACTION_IS_INT</literal></term>
+<listitem><simpara>              is integer ("Is Set" in iTunes)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-IS-GREATER-THAN:CAPS" role="constant"/><literal>ITDB_SPLACTION_IS_GREATER_THAN</literal></term>
+<listitem><simpara>     is greater than ("Is after" in iTunes)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-IS-LESS-THAN:CAPS" role="constant"/><literal>ITDB_SPLACTION_IS_LESS_THAN</literal></term>
+<listitem><simpara>        is less than ("Is Before" in iTunes)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-IS-IN-THE-RANGE:CAPS" role="constant"/><literal>ITDB_SPLACTION_IS_IN_THE_RANGE</literal></term>
+<listitem><simpara>     is in the range
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-IS-IN-THE-LAST:CAPS" role="constant"/><literal>ITDB_SPLACTION_IS_IN_THE_LAST</literal></term>
+<listitem><simpara>      is in the last
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-BINARY-AND:CAPS" role="constant"/><literal>ITDB_SPLACTION_BINARY_AND</literal></term>
+<listitem><simpara>          binary AND
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-IS-STRING:CAPS" role="constant"/><literal>ITDB_SPLACTION_IS_STRING</literal></term>
+<listitem><simpara>           is a string
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-CONTAINS:CAPS" role="constant"/><literal>ITDB_SPLACTION_CONTAINS</literal></term>
+<listitem><simpara>            contains
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-STARTS-WITH:CAPS" role="constant"/><literal>ITDB_SPLACTION_STARTS_WITH</literal></term>
+<listitem><simpara>         starts with
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-ENDS-WITH:CAPS" role="constant"/><literal>ITDB_SPLACTION_ENDS_WITH</literal></term>
+<listitem><simpara>           ends with
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-IS-NOT-INT:CAPS" role="constant"/><literal>ITDB_SPLACTION_IS_NOT_INT</literal></term>
+<listitem><simpara>          is not an integer ("Is Not Set" in iTunes)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-IS-NOT-GREATER-THAN:CAPS" role="constant"/><literal>ITDB_SPLACTION_IS_NOT_GREATER_THAN</literal></term>
+<listitem><simpara> is not greater than (not in iTunes)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-IS-NOT-LESS-THAN:CAPS" role="constant"/><literal>ITDB_SPLACTION_IS_NOT_LESS_THAN</literal></term>
+<listitem><simpara>    is not less than (not in iTunes)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-IS-NOT-IN-THE-RANGE:CAPS" role="constant"/><literal>ITDB_SPLACTION_IS_NOT_IN_THE_RANGE</literal></term>
+<listitem><simpara> is not in the range (not in iTunes)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-IS-NOT-IN-THE-LAST:CAPS" role="constant"/><literal>ITDB_SPLACTION_IS_NOT_IN_THE_LAST</literal></term>
+<listitem><simpara>  is not in the last
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-IS-NOT:CAPS" role="constant"/><literal>ITDB_SPLACTION_IS_NOT</literal></term>
+<listitem><simpara>              is not
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-DOES-NOT-CONTAIN:CAPS" role="constant"/><literal>ITDB_SPLACTION_DOES_NOT_CONTAIN</literal></term>
+<listitem><simpara>    does not contain
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-DOES-NOT-START-WITH:CAPS" role="constant"/><literal>ITDB_SPLACTION_DOES_NOT_START_WITH</literal></term>
+<listitem><simpara> does not start with (not in iTunes)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-DOES-NOT-END-WITH:CAPS" role="constant"/><literal>ITDB_SPLACTION_DOES_NOT_END_WITH</literal></term>
+<listitem><simpara>   does not end with (not in iTunes)
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.5.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="ItdbSPLActionLast" role="enum" condition="since:0.5.0"/>enum ItdbSPLActionLast</title>
+<indexterm role="0.5.0"><primary>ItdbSPLActionLast</primary></indexterm><programlisting>typedef enum {
+    ITDB_SPLACTION_LAST_DAYS_VALUE = 86400,    /* nr of secs in 24 hours */
+    ITDB_SPLACTION_LAST_WEEKS_VALUE = 604800,  /* nr of secs in 7 days   */
+    ITDB_SPLACTION_LAST_MONTHS_VALUE = 2628000,/* nr of secs in 30.4167
+						  days ~= 1 month */
+} ItdbSPLActionLast;
+</programlisting>
+<para>
+These are to pass to <link linkend="AddRule"><function>AddRule()</function></link> when you need a unit for the two "in the last"
+action types.  In theory, you can use any time range.  iTunes might not
+like it, but the iPod shouldn't care.</para>
+<para>
+
+</para><variablelist role="enum">
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-LAST-DAYS-VALUE:CAPS" role="constant"/><literal>ITDB_SPLACTION_LAST_DAYS_VALUE</literal></term>
+<listitem><simpara>   Seconds in 24 hours
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-LAST-WEEKS-VALUE:CAPS" role="constant"/><literal>ITDB_SPLACTION_LAST_WEEKS_VALUE</literal></term>
+<listitem><simpara>  Seconds in 7 days
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLACTION-LAST-MONTHS-VALUE:CAPS" role="constant"/><literal>ITDB_SPLACTION_LAST_MONTHS_VALUE</literal></term>
+<listitem><simpara> Seconds in 1 month (approximately)
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.5.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="ItdbSPLActionType" role="enum" condition="since:0.5.0"/>enum ItdbSPLActionType</title>
+<indexterm role="0.5.0"><primary>ItdbSPLActionType</primary></indexterm><programlisting>typedef enum
+{
+    ITDB_SPLAT_STRING = 1,
+    ITDB_SPLAT_INT,
+    ITDB_SPLAT_DATE,
+    ITDB_SPLAT_RANGE_INT,
+    ITDB_SPLAT_RANGE_DATE,
+    ITDB_SPLAT_INTHELAST,
+    ITDB_SPLAT_PLAYLIST,
+    ITDB_SPLAT_NONE,
+    ITDB_SPLAT_INVALID,
+    ITDB_SPLAT_UNKNOWN,
+    ITDB_SPLAT_BINARY_AND
+} ItdbSPLActionType;
+</programlisting>
+<para>
+Smart Playlist Action Types</para>
+<para>
+
+</para><variablelist role="enum">
+<varlistentry>
+<term><anchor id="ITDB-SPLAT-STRING:CAPS" role="constant"/><literal>ITDB_SPLAT_STRING</literal></term>
+<listitem><simpara>      string
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLAT-INT:CAPS" role="constant"/><literal>ITDB_SPLAT_INT</literal></term>
+<listitem><simpara>         from integer
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLAT-DATE:CAPS" role="constant"/><literal>ITDB_SPLAT_DATE</literal></term>
+<listitem><simpara>        from date ...
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLAT-RANGE-INT:CAPS" role="constant"/><literal>ITDB_SPLAT_RANGE_INT</literal></term>
+<listitem><simpara>   an integer range ...
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLAT-RANGE-DATE:CAPS" role="constant"/><literal>ITDB_SPLAT_RANGE_DATE</literal></term>
+<listitem><simpara>  a date range ...
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLAT-INTHELAST:CAPS" role="constant"/><literal>ITDB_SPLAT_INTHELAST</literal></term>
+<listitem><simpara>   in the last ...
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLAT-PLAYLIST:CAPS" role="constant"/><literal>ITDB_SPLAT_PLAYLIST</literal></term>
+<listitem><simpara>    in playlist
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLAT-NONE:CAPS" role="constant"/><literal>ITDB_SPLAT_NONE</literal></term>
+<listitem><simpara>        none
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLAT-INVALID:CAPS" role="constant"/><literal>ITDB_SPLAT_INVALID</literal></term>
+<listitem><simpara>     invalid
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLAT-UNKNOWN:CAPS" role="constant"/><literal>ITDB_SPLAT_UNKNOWN</literal></term>
+<listitem><simpara>     unknown
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLAT-BINARY-AND:CAPS" role="constant"/><literal>ITDB_SPLAT_BINARY_AND</literal></term>
+<listitem><simpara>  is / is not (binary AND)
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.5.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="ItdbSPLField" role="enum" condition="since:0.5.0"/>enum ItdbSPLField</title>
+<indexterm role="0.5.0"><primary>ItdbSPLField</primary></indexterm><programlisting>typedef enum {
+    ITDB_SPLFIELD_SONG_NAME = 0x02,
+    ITDB_SPLFIELD_ALBUM = 0x03,
+    ITDB_SPLFIELD_ARTIST = 0x04,
+    ITDB_SPLFIELD_BITRATE = 0x05,
+    ITDB_SPLFIELD_SAMPLE_RATE = 0x06,
+    ITDB_SPLFIELD_YEAR = 0x07,
+    ITDB_SPLFIELD_GENRE = 0x08,
+    ITDB_SPLFIELD_KIND = 0x09,
+    ITDB_SPLFIELD_DATE_MODIFIED = 0x0a,
+    ITDB_SPLFIELD_TRACKNUMBER = 0x0b,
+    ITDB_SPLFIELD_SIZE = 0x0c,
+    ITDB_SPLFIELD_TIME = 0x0d,
+    ITDB_SPLFIELD_COMMENT = 0x0e,
+    ITDB_SPLFIELD_DATE_ADDED = 0x10,
+    ITDB_SPLFIELD_COMPOSER = 0x12,
+    ITDB_SPLFIELD_PLAYCOUNT = 0x16,
+    ITDB_SPLFIELD_LAST_PLAYED = 0x17,
+    ITDB_SPLFIELD_DISC_NUMBER = 0x18,
+    ITDB_SPLFIELD_RATING = 0x19,
+    ITDB_SPLFIELD_COMPILATION = 0x1f,
+    ITDB_SPLFIELD_BPM = 0x23,
+    ITDB_SPLFIELD_GROUPING = 0x27,
+    ITDB_SPLFIELD_PLAYLIST = 0x28,
+    ITDB_SPLFIELD_VIDEO_KIND = 0x3c,
+    ITDB_SPLFIELD_TVSHOW = 0x3e,
+    ITDB_SPLFIELD_SEASON_NR = 0x3f,
+    ITDB_SPLFIELD_SKIPCOUNT = 0x44,
+    ITDB_SPLFIELD_LAST_SKIPPED = 0x45,
+    ITDB_SPLFIELD_ALBUMARTIST = 0x47
+} ItdbSPLField;
+</programlisting>
+<para>
+Smart Playlist Fields, used for Smart Playlist Rules (<link linkend="Itdb-SPLRule"><type>Itdb_SPLRule</type></link>).</para>
+<para>
+
+</para><variablelist role="enum">
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-SONG-NAME:CAPS" role="constant"/><literal>ITDB_SPLFIELD_SONG_NAME</literal></term>
+<listitem><simpara>        Song name (string)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-ALBUM:CAPS" role="constant"/><literal>ITDB_SPLFIELD_ALBUM</literal></term>
+<listitem><simpara>            Album (string)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-ARTIST:CAPS" role="constant"/><literal>ITDB_SPLFIELD_ARTIST</literal></term>
+<listitem><simpara>           Artist (string)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-BITRATE:CAPS" role="constant"/><literal>ITDB_SPLFIELD_BITRATE</literal></term>
+<listitem><simpara>          Bitrate (integer, e.g. from/to = 128)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-SAMPLE-RATE:CAPS" role="constant"/><literal>ITDB_SPLFIELD_SAMPLE_RATE</literal></term>
+<listitem><simpara>      Sample rate (integer, e.g. from/to = 44100)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-YEAR:CAPS" role="constant"/><literal>ITDB_SPLFIELD_YEAR</literal></term>
+<listitem><simpara>             Year (integer, e.g. from/to = 2004)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-GENRE:CAPS" role="constant"/><literal>ITDB_SPLFIELD_GENRE</literal></term>
+<listitem><simpara>            Genre (string)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-KIND:CAPS" role="constant"/><literal>ITDB_SPLFIELD_KIND</literal></term>
+<listitem><simpara>             File type (string, e.g. MP3-File)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-DATE-MODIFIED:CAPS" role="constant"/><literal>ITDB_SPLFIELD_DATE_MODIFIED</literal></term>
+<listitem><simpara>    Date modified (integer, e.g.
+                                 from/to = bcf93280 == is before 6/19/2004)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-TRACKNUMBER:CAPS" role="constant"/><literal>ITDB_SPLFIELD_TRACKNUMBER</literal></term>
+<listitem><simpara>      Track number (integer, e.g. from/to = 2)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-SIZE:CAPS" role="constant"/><literal>ITDB_SPLFIELD_SIZE</literal></term>
+<listitem><simpara>             Size (integer, e.g.
+                                 from/to = 0x00600000 for 6MB)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-TIME:CAPS" role="constant"/><literal>ITDB_SPLFIELD_TIME</literal></term>
+<listitem><simpara>             Time (integer, e.g.
+                                 from/to = 83999 for 1:23/83 seconds)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-COMMENT:CAPS" role="constant"/><literal>ITDB_SPLFIELD_COMMENT</literal></term>
+<listitem><simpara>          Comment (string)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-DATE-ADDED:CAPS" role="constant"/><literal>ITDB_SPLFIELD_DATE_ADDED</literal></term>
+<listitem><simpara>       Date added (integer, e.g.
+                                 from/to = bcfa83ff == is after 6/19/2004)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-COMPOSER:CAPS" role="constant"/><literal>ITDB_SPLFIELD_COMPOSER</literal></term>
+<listitem><simpara>         Composer (string)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-PLAYCOUNT:CAPS" role="constant"/><literal>ITDB_SPLFIELD_PLAYCOUNT</literal></term>
+<listitem><simpara>        Playcount (integer, e.g. from/to = 1)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-LAST-PLAYED:CAPS" role="constant"/><literal>ITDB_SPLFIELD_LAST_PLAYED</literal></term>
+<listitem><simpara>      Date last played (integer, e.g.
+                                 from = bcfa83ff (6/19/2004)
+                                 to = 0xbcfbd57f (6/20/2004))
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-DISC-NUMBER:CAPS" role="constant"/><literal>ITDB_SPLFIELD_DISC_NUMBER</literal></term>
+<listitem><simpara>      Disc number (integer, e.g. from/to = 1)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-RATING:CAPS" role="constant"/><literal>ITDB_SPLFIELD_RATING</literal></term>
+<listitem><simpara>           Rating (integer, e.g.
+                                 from/to = 60 (3 stars))
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-COMPILATION:CAPS" role="constant"/><literal>ITDB_SPLFIELD_COMPILATION</literal></term>
+<listitem><simpara>      Compilation (integer, e.g.
+                                 is set -> ITDB_SPLACTION_IS_INT/from=1,
+                                 not set -> ITDB_SPLACTION_IS_NOT_INT/from=1)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-BPM:CAPS" role="constant"/><literal>ITDB_SPLFIELD_BPM</literal></term>
+<listitem><simpara>              Beats per minute (integer, e.g.
+                                 from/to = 60)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-GROUPING:CAPS" role="constant"/><literal>ITDB_SPLFIELD_GROUPING</literal></term>
+<listitem><simpara>         Grouping (string)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-PLAYLIST:CAPS" role="constant"/><literal>ITDB_SPLFIELD_PLAYLIST</literal></term>
+<listitem><simpara>         FIXME Unknown...not parsed correctly...
+                                 from/to = 0xb6fbad5f for "Purchased Music".
+                                 Extra data after "to"...
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-VIDEO-KIND:CAPS" role="constant"/><literal>ITDB_SPLFIELD_VIDEO_KIND</literal></term>
+<listitem><simpara>       Logical integer (works on mediatype)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-TVSHOW:CAPS" role="constant"/><literal>ITDB_SPLFIELD_TVSHOW</literal></term>
+<listitem><simpara>           TV Show (string)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-SEASON-NR:CAPS" role="constant"/><literal>ITDB_SPLFIELD_SEASON_NR</literal></term>
+<listitem><simpara>        Season number (integer)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-SKIPCOUNT:CAPS" role="constant"/><literal>ITDB_SPLFIELD_SKIPCOUNT</literal></term>
+<listitem><simpara>        Skipcount (integer)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-LAST-SKIPPED:CAPS" role="constant"/><literal>ITDB_SPLFIELD_LAST_SKIPPED</literal></term>
+<listitem><simpara>     Last skipped (integer)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFIELD-ALBUMARTIST:CAPS" role="constant"/><literal>ITDB_SPLFIELD_ALBUMARTIST</literal></term>
+<listitem><simpara>      Album artist (string)
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.5.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="ItdbSPLFieldType" role="enum" condition="since:0.5.0"/>enum ItdbSPLFieldType</title>
+<indexterm role="0.5.0"><primary>ItdbSPLFieldType</primary></indexterm><programlisting>typedef enum
+{
+    ITDB_SPLFT_STRING = 1,
+    ITDB_SPLFT_INT,
+    ITDB_SPLFT_BOOLEAN,
+    ITDB_SPLFT_DATE,
+    ITDB_SPLFT_PLAYLIST,
+    ITDB_SPLFT_UNKNOWN,
+    ITDB_SPLFT_BINARY_AND
+} ItdbSPLFieldType;
+</programlisting>
+<para>
+Smart Playlist Field Types</para>
+<para>
+
+</para><variablelist role="enum">
+<varlistentry>
+<term><anchor id="ITDB-SPLFT-STRING:CAPS" role="constant"/><literal>ITDB_SPLFT_STRING</literal></term>
+<listitem><simpara>      string
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFT-INT:CAPS" role="constant"/><literal>ITDB_SPLFT_INT</literal></term>
+<listitem><simpara>         integer
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFT-BOOLEAN:CAPS" role="constant"/><literal>ITDB_SPLFT_BOOLEAN</literal></term>
+<listitem><simpara>     boolean
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFT-DATE:CAPS" role="constant"/><literal>ITDB_SPLFT_DATE</literal></term>
+<listitem><simpara>        date
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFT-PLAYLIST:CAPS" role="constant"/><literal>ITDB_SPLFT_PLAYLIST</literal></term>
+<listitem><simpara>    playlist
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFT-UNKNOWN:CAPS" role="constant"/><literal>ITDB_SPLFT_UNKNOWN</literal></term>
+<listitem><simpara>     unknown
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLFT-BINARY-AND:CAPS" role="constant"/><literal>ITDB_SPLFT_BINARY_AND</literal></term>
+<listitem><simpara>  binary AND
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.5.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="ItdbSPLMatch" role="enum"/>enum ItdbSPLMatch</title>
+<indexterm><primary>ItdbSPLMatch</primary></indexterm><programlisting>typedef enum {
+    ITDB_SPLMATCH_AND = 0,
+    ITDB_SPLMATCH_OR = 1
+} ItdbSPLMatch;
+</programlisting>
+<para>
+Types for smart playlist rules match_operator</para>
+<para>
+
+</para><variablelist role="enum">
+<varlistentry>
+<term><anchor id="ITDB-SPLMATCH-AND:CAPS" role="constant"/><literal>ITDB_SPLMATCH_AND</literal></term>
+<listitem><simpara> Logical AND - all of the rules must be true in order for
+                    the combined rule to be applied
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-SPLMATCH-OR:CAPS" role="constant"/><literal>ITDB_SPLMATCH_OR</literal></term>
+<listitem><simpara>  Logical OR - any of the rules may be true
+</simpara></listitem>
+</varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="ITDB-SPL-DATE-IDENTIFIER:CAPS" role="macro" condition="since:0.5.0"/>ITDB_SPL_DATE_IDENTIFIER</title>
+<indexterm role="0.5.0"><primary>ITDB_SPL_DATE_IDENTIFIER</primary></indexterm><programlisting>#define ITDB_SPL_DATE_IDENTIFIER (G_GINT64_CONSTANT (0x2dae2dae2dae2daeU))
+</programlisting>
+<para>
+Identifier for smart playlist date fields</para>
+<para>
+
+</para><para role="since">Since  0.5.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="ITDB-SPL-STRING-MAXLEN:CAPS" role="macro" condition="since:0.5.0"/>ITDB_SPL_STRING_MAXLEN</title>
+<indexterm role="0.5.0"><primary>ITDB_SPL_STRING_MAXLEN</primary></indexterm><programlisting>#define ITDB_SPL_STRING_MAXLEN 255
+</programlisting>
+<para>
+Maximum string length for smart playlists</para>
+<para>
+
+</para><para role="since">Since  0.5.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-splr-get-field-type" role="function"/>itdb_splr_get_field_type ()</title>
+<indexterm><primary>itdb_splr_get_field_type</primary></indexterm><programlisting><link linkend="ItdbSPLFieldType">ItdbSPLFieldType</link>    itdb_splr_get_field_type            (const <link linkend="Itdb-SPLRule">Itdb_SPLRule</link> *splr);</programlisting>
+<para>
+Gets the type of the field of the <parameter>splr</parameter> rule</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>splr</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-SPLRule"><type>Itdb_SPLRule</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> an <link linkend="Itdb-SPLFieldType"><type>Itdb_SPLFieldType</type></link> corresponding to <parameter>splr</parameter> field
+type (string, int, date, ...)
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-splr-get-action-type" role="function"/>itdb_splr_get_action_type ()</title>
+<indexterm><primary>itdb_splr_get_action_type</primary></indexterm><programlisting><link linkend="ItdbSPLActionType">ItdbSPLActionType</link>   itdb_splr_get_action_type           (const <link linkend="Itdb-SPLRule">Itdb_SPLRule</link> *splr);</programlisting>
+<para>
+Gets the type of the action associated with <parameter>splr</parameter>.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>splr</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-SPLRule"><type>Itdb_SPLRule</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> type (range, date, string...) of the action field
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-splr-validate" role="function"/>itdb_splr_validate ()</title>
+<indexterm><primary>itdb_splr_validate</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_splr_validate                  (<link linkend="Itdb-SPLRule">Itdb_SPLRule</link> *splr);</programlisting>
+<para>
+Validates a smart playlist rule</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>splr</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-SPLRule"><type>Itdb_SPLRule</type></link>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-splr-remove" role="function"/>itdb_splr_remove ()</title>
+<indexterm><primary>itdb_splr_remove</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_splr_remove                    (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl,
+                                                         <link linkend="Itdb-SPLRule">Itdb_SPLRule</link> *splr);</programlisting>
+<para>
+Removes the smart playlist rule <parameter>splr</parameter> from playlist <parameter>pl</parameter>. The memory
+used by <parameter>splr</parameter> is freed.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>pl</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>splr</parameter>&nbsp;:</term>
+<listitem><simpara> an Itdb_SPLRule
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-splr-new" role="function"/>itdb_splr_new ()</title>
+<indexterm><primary>itdb_splr_new</primary></indexterm><programlisting><link linkend="Itdb-SPLRule">Itdb_SPLRule</link>*       itdb_splr_new                       (void);</programlisting>
+<para>
+Creates a new default smart rule</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="Itdb-SPLRule"><type>Itdb_SPLRule</type></link> that must be freed with <link linkend="itdb-splr-free"><function>itdb_splr_free()</function></link> when
+no longer needed
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-splr-add" role="function"/>itdb_splr_add ()</title>
+<indexterm><primary>itdb_splr_add</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_splr_add                       (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl,
+                                                         <link linkend="Itdb-SPLRule">Itdb_SPLRule</link> *splr,
+                                                         <link linkend="gint">gint</link> pos);</programlisting>
+<para>
+Adds the smart rule <parameter>splr</parameter> to <parameter>pl</parameter> at position <parameter>pos</parameter>. If <parameter>pos</parameter> is -1,
+<parameter>splr</parameter> gets appended to the end. After this call, <parameter>splr</parameter> memory is
+managed by <parameter>pl</parameter>, so you no longer need to call <link linkend="itdb-splr-free"><function>itdb_splr_free()</function></link></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>pl</parameter>&nbsp;:</term>
+<listitem><simpara>     an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>splr</parameter>&nbsp;:</term>
+<listitem><simpara>   an <link linkend="Itdb-SPLRule"><type>Itdb_SPLRule</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>pos</parameter>&nbsp;:</term>
+<listitem><simpara>    position of the rule
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-splr-add-new" role="function"/>itdb_splr_add_new ()</title>
+<indexterm><primary>itdb_splr_add_new</primary></indexterm><programlisting><link linkend="Itdb-SPLRule">Itdb_SPLRule</link>*       itdb_splr_add_new                   (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *pl,
+                                                         <link linkend="gint">gint</link> pos);</programlisting>
+<para>
+Creates a new smart rule and inserts it at position <parameter>pos</parameter> in <parameter>pl</parameter>. If
+<parameter>pos</parameter> is -1, the new rule gets appended to the end.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>pl</parameter>&nbsp;:</term>
+<listitem><simpara>     an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>pos</parameter>&nbsp;:</term>
+<listitem><simpara>    position to insert the rule at
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> pointer to the newly created <link linkend="Itdb-SPLRule"><type>Itdb_SPLRule</type></link>. Its
+memory is handled by <parameter>pl</parameter> though, so you don't need to explicitly
+call <link linkend="itdb-splr-free"><function>itdb_splr_free()</function></link> on it
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-spl-copy-rules" role="function"/>itdb_spl_copy_rules ()</title>
+<indexterm><primary>itdb_spl_copy_rules</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_spl_copy_rules                 (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *dest,
+                                                         <link linkend="Itdb-Playlist">Itdb_Playlist</link> *src);</programlisting>
+<para>
+Copy all relevant information for smart playlist from playlist <parameter>src</parameter>
+to playlist <parameter>dest</parameter>. If <parameter>dest</parameter> is already a smart playlist, the
+existing data is overwritten/deleted.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>dest</parameter>&nbsp;:</term>
+<listitem><simpara>   destination <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>src</parameter>&nbsp;:</term>
+<listitem><simpara>    source <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-splr-eval" role="function"/>itdb_splr_eval ()</title>
+<indexterm><primary>itdb_splr_eval</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_splr_eval                      (<link linkend="Itdb-SPLRule">Itdb_SPLRule</link> *splr,
+                                                         <link linkend="Itdb-Track">Itdb_Track</link> *track);</programlisting>
+<para>
+Evaluates <parameter>splr</parameter>'s truth against <parameter>track</parameter>. <parameter>track->itdb</parameter> must be set.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>splr</parameter>&nbsp;:</term>
+<listitem><simpara>   an <link linkend="Itdb-SPLRule"><type>Itdb_SPLRule</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>track</parameter>&nbsp;:</term>
+<listitem><simpara>  an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if <parameter>track</parameter> matches <parameter>splr</parameter>, FALSE otherwise.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-spl-update" role="function"/>itdb_spl_update ()</title>
+<indexterm><primary>itdb_spl_update</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_spl_update                     (<link linkend="Itdb-Playlist">Itdb_Playlist</link> *spl);</programlisting>
+<para>
+Updates the content of the smart playlist <parameter>spl</parameter> (meant to be called
+if the tracks stored in the <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> associated with <parameter>spl</parameter>
+have changed somehow and you want <parameter>spl->members</parameter> to be accurate
+with regards to those changes. Does nothing if <parameter>spl</parameter> isn't a smart
+playlist.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>spl</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Playlist"><type>Itdb_Playlist</type></link>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-spl-update-all" role="function"/>itdb_spl_update_all ()</title>
+<indexterm><primary>itdb_spl_update_all</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_spl_update_all                 (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);</programlisting>
+<para>
+Updates all smart playlists contained in <parameter>itdb</parameter></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-spl-update-live" role="function" condition="since:0.2.0"/>itdb_spl_update_live ()</title>
+<indexterm role="0.2.0"><primary>itdb_spl_update_live</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_spl_update_live                (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);</programlisting>
+<para>
+Updates all smart playlists contained in <parameter>itdb</parameter> which have the
+<parameter>liveupdate</parameter> flag set.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.2.0
+</para></refsect2>
+
+</refsect1>
+
+
+
+<refsect1>
+<title>See Also</title>
+<para>
+<link linkend="libgpod-Playlists">Playlists</link>
+</para>
+</refsect1>
+
+
+<refsect1><refsect2 /><refsect2 /></refsect1>
+</refentry>

Added: libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/track.xml
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/track.xml	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/docs/reference/xml/track.xml	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,1395 @@
+<?xml version="1.0"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
+               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<refentry id="libgpod-Tracks">
+<refmeta>
+<refentrytitle role="top_of_page">Tracks</refentrytitle>
+<manvolnum>3</manvolnum>
+<refmiscinfo>LIBGPOD Library</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+<refname>Tracks</refname>
+<refpurpose>Data structure to store metadata about an iPod track</refpurpose>
+<!--[<xref linkend="desc" endterm="desc.title"/>]-->
+</refnamediv>
+
+<refsynopsisdiv role="synopsis">
+<title role="synopsis.title">Synopsis</title>
+
+<synopsis>
+
+
+
+                    <link linkend="Itdb-Track">Itdb_Track</link>;
+enum                <link linkend="Itdb-Mediatype">Itdb_Mediatype</link>;
+#define             <link linkend="ITDB-RATING-STEP:CAPS">ITDB_RATING_STEP</link>
+<link linkend="Itdb-Track">Itdb_Track</link>*         <link linkend="itdb-track-new">itdb_track_new</link>                      (void);
+<link linkend="void">void</link>                <link linkend="itdb-track-free">itdb_track_free</link>                     (<link linkend="Itdb-Track">Itdb_Track</link> *track);
+<link linkend="void">void</link>                <link linkend="itdb-track-add">itdb_track_add</link>                      (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
+                                                         <link linkend="Itdb-Track">Itdb_Track</link> *track,
+                                                         <link linkend="gint32">gint32</link> pos);
+<link linkend="void">void</link>                <link linkend="itdb-track-remove">itdb_track_remove</link>                   (<link linkend="Itdb-Track">Itdb_Track</link> *track);
+<link linkend="void">void</link>                <link linkend="itdb-track-unlink">itdb_track_unlink</link>                   (<link linkend="Itdb-Track">Itdb_Track</link> *track);
+<link linkend="Itdb-Track">Itdb_Track</link>*         <link linkend="itdb-track-duplicate">itdb_track_duplicate</link>                (<link linkend="Itdb-Track">Itdb_Track</link> *tr);
+<link linkend="Itdb-Track">Itdb_Track</link>*         <link linkend="itdb-track-by-id">itdb_track_by_id</link>                    (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
+                                                         <link linkend="guint32">guint32</link> id);
+<link linkend="GTree">GTree</link>*              <link linkend="itdb-track-id-tree-create">itdb_track_id_tree_create</link>           (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);
+<link linkend="void">void</link>                <link linkend="itdb-track-id-tree-destroy">itdb_track_id_tree_destroy</link>          (<link linkend="GTree">GTree</link> *idtree);
+<link linkend="Itdb-Track">Itdb_Track</link>*         <link linkend="itdb-track-id-tree-by-id">itdb_track_id_tree_by_id</link>            (<link linkend="GTree">GTree</link> *idtree,
+                                                         <link linkend="guint32">guint32</link> id);
+<link linkend="gpointer">gpointer</link>            <link linkend="itdb-track-get-thumbnail">itdb_track_get_thumbnail</link>            (<link linkend="Itdb-Track">Itdb_Track</link> *track,
+                                                         <link linkend="gint">gint</link> width,
+                                                         <link linkend="gint">gint</link> height);
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-track-has-thumbnails">itdb_track_has_thumbnails</link>           (<link linkend="Itdb-Track">Itdb_Track</link> *track);
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-track-set-thumbnails">itdb_track_set_thumbnails</link>           (<link linkend="Itdb-Track">Itdb_Track</link> *track,
+                                                         const <link linkend="gchar">gchar</link> *filename);
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-track-set-thumbnails-from-data">itdb_track_set_thumbnails_from_data</link> (<link linkend="Itdb-Track">Itdb_Track</link> *track,
+                                                         const <link linkend="guchar">guchar</link> *image_data,
+                                                         <link linkend="gsize">gsize</link> image_data_len);
+<link linkend="gboolean">gboolean</link>            <link linkend="itdb-track-set-thumbnails-from-pixbuf">itdb_track_set_thumbnails_from_pixbuf</link>
+                                                        (<link linkend="Itdb-Track">Itdb_Track</link> *track,
+                                                         <link linkend="gpointer">gpointer</link> pixbuf);
+<link linkend="void">void</link>                <link linkend="itdb-track-remove-thumbnails">itdb_track_remove_thumbnails</link>        (<link linkend="Itdb-Track">Itdb_Track</link> *track);
+</synopsis>
+</refsynopsisdiv>
+
+
+
+
+
+
+
+
+
+<refsect1 role="desc">
+<title role="desc.title">Description</title>
+<para>
+These functions and structures are for storing and retrieving
+information about an iPod track.
+</para>
+</refsect1>
+
+<refsect1 role="details">
+<title role="details.title">Details</title>
+<refsect2>
+<title><anchor id="Itdb-Track" role="struct"/>Itdb_Track</title>
+<indexterm><primary>Itdb_Track</primary></indexterm><programlisting>typedef struct {
+  Itdb_iTunesDB *itdb;
+  gchar   *title;
+  gchar   *ipod_path;
+  gchar   *album;
+  gchar   *artist;
+  gchar   *genre;
+  gchar   *filetype;
+  gchar   *comment;
+  gchar   *category;
+  gchar   *composer;
+  gchar   *grouping;
+  gchar   *description;
+  gchar   *podcasturl;
+  gchar   *podcastrss;
+  Itdb_Chapterdata *chapterdata;
+  gchar   *subtitle;
+/* the following 5 are new in libgpod 0.4.2... */
+  gchar   *tvshow;
+  gchar   *tvepisode;
+  gchar   *tvnetwork;
+  gchar   *albumartist;
+  gchar   *keywords;
+/* the following 6 are new in libgpod 0.5.0... */
+  /* You can set these strings to override the standard
+     sortorder. When set they take precedence over the default
+     'artist', 'album'... fields.
+
+     For example, in the case of an artist name like "The Artist",
+     iTunes will set sort_artist to "Artist, The" followed by five
+     0x01 characters. Why five 0x01 characters are added is not
+     completely understood.
+
+     If you do not set the sort_artist field, libgpod will pre-sort
+     the lists displayed by the iPod according to "Artist, The",
+     without setting the field.
+  */
+  gchar   *sort_artist;
+  gchar   *sort_title;
+  gchar   *sort_album;
+  gchar   *sort_albumartist;
+  gchar   *sort_composer;
+  gchar   *sort_tvshow;
+/* end of new fields in libgpod 0.5.0 */
+  guint32 id;
+  gint32  size;
+  gint32  tracklen;
+  gint32  cd_nr;
+  gint32  cds;
+  gint32  track_nr;
+  gint32  tracks;
+  gint32  bitrate;
+  guint16 samplerate;
+  guint16 samplerate_low;
+  gint32  year;
+  gint32  volume;
+  guint32 soundcheck;
+  time_t  time_added;
+  time_t  time_modified;
+  time_t  time_played;
+  guint32 bookmark_time;
+  guint32 rating;
+  guint32 playcount;
+  guint32 playcount2;
+  guint32 recent_playcount;
+  gboolean transferred;
+  gint16  BPM;
+  guint8  app_rating;
+  guint8  type1;
+  guint8  type2;
+  guint8  compilation;
+  guint32 starttime;
+  guint32 stoptime;
+  guint8  checked;
+  guint64 dbid;
+  guint32 drm_userid;
+  guint32 visible;
+  guint32 filetype_marker;
+  guint16 artwork_count;
+  guint32 artwork_size;
+  float samplerate2;
+  guint16 unk126;
+  guint32 unk132;
+  time_t  time_released;
+  guint16 unk144;
+  guint16 explicit_flag;
+  guint32 unk148;
+  guint32 unk152;
+  guint32 skipcount;
+  guint32 recent_skipcount;
+  guint32 last_skipped;
+  guint8 has_artwork;
+  guint8 skip_when_shuffling;
+  guint8 remember_playback_position;
+  guint8 flag4;
+  guint64 dbid2;
+  guint8 lyrics_flag;
+  guint8 movie_flag;
+  guint8 mark_unplayed;
+  guint8 unk179;
+  guint32 unk180;
+  guint32 pregap;
+  guint64 samplecount;
+  guint32 unk196;
+  guint32 postgap;
+  guint32 unk204;
+  guint32 mediatype;
+  guint32 season_nr;
+  guint32 episode_nr;
+  guint32 unk220;
+  guint32 unk224;
+  guint32 unk228, unk232, unk236, unk240, unk244;
+  guint32 gapless_data;
+  guint32 unk252;
+  guint16 gapless_track_flag;
+  guint16 gapless_album_flag;
+  guint16 album_id;
+
+  /* This is for Cover Art support */
+  struct _Itdb_Artwork *artwork;
+
+  /* This is for sparse artwork support, new in libgpod-0.7.0 */
+  guint32 mhii_link;
+
+  /* reserved for future use */
+  gint32 reserved_int1;
+  gint32 reserved_int2;
+  gint32 reserved_int3;
+  gint32 reserved_int4;
+  gint32 reserved_int5;
+  gint32 reserved_int6;
+  gpointer reserved1;
+  gpointer reserved2;
+  gpointer reserved3;
+  gpointer reserved4;
+  gpointer reserved5;
+  gpointer reserved6;
+
+  /* +++***+++***+++***+++***+++***+++***+++***+++***+++***+++***
+     When adding string fields don't forget to add them in
+     itdb_track_duplicate as well
+     +++***+++***+++***+++***+++***+++***+++***+++***+++***+++*** */
+
+  /* below is for use by application */
+  guint64 usertype;
+  gpointer userdata;
+  /* functions called to duplicate/free userdata */
+  ItdbUserDataDuplicateFunc userdata_duplicate;
+  ItdbUserDataDestroyFunc userdata_destroy;
+} Itdb_Track;
+</programlisting>
+<para>
+Structure representing a track in an iTunesDB
+</para>
+<para>
+<note><para>When adding string fields don't forget to add them in
+<link linkend="itdb-track-duplicate"><function>itdb_track_duplicate()</function></link> as well.</para></note>
+</para>
+<para>
+Many of the parameter descriptions are copied verbatim from
+http://ipodlinux.org/ITunesDB, which is the best source for information about
+the iTunesDB and related files.</para>
+<para>
+
+</para><variablelist role="struct">
+<varlistentry>
+<term><link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link>&nbsp;*<structfield>itdb</structfield>;</term>
+<listitem><simpara>                       A pointer to the <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> (for convenience)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>title</structfield>;</term>
+<listitem><simpara>                      The title of the track in UTF8
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>ipod_path</structfield>;</term>
+<listitem><simpara>                  The file path on the iPod.  Directories are
+                             separated with ":" instead of "/".  The path is
+                             relative to the iPod mountpoint.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>album</structfield>;</term>
+<listitem><simpara>                      The album name in UTF8
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>artist</structfield>;</term>
+<listitem><simpara>                     The artist name in UTF8
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>genre</structfield>;</term>
+<listitem><simpara>                      The genre in UTF8
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>filetype</structfield>;</term>
+<listitem><simpara>                   A UTF8 string describing the file type.  E.g.
+                             "MP3-File".
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>comment</structfield>;</term>
+<listitem><simpara>                    A comment in UTF8
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>category</structfield>;</term>
+<listitem><simpara>                   The category ("Technology", "Music", etc.)
+                             where the podcast was located.  (Added in
+                             dbversion 0x0d)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>composer</structfield>;</term>
+<listitem><simpara>                   The composer name in UTF8
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>grouping</structfield>;</term>
+<listitem><simpara>                   ??? (UTF8)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>description</structfield>;</term>
+<listitem><simpara>                Description text (such as podcast show notes).
+                             (Added in dbversion 0x0d)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>podcasturl</structfield>;</term>
+<listitem><simpara>                 Podcast Enclosure URL in UTF-8 or ASCII.
+                             (Added in dbversion 0x0d)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>podcastrss</structfield>;</term>
+<listitem><simpara>                 Podcast RSS URL in UTF-8 or ASCII.
+                             (Added in dbversion 0x0d)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="Itdb-Chapterdata">Itdb_Chapterdata</link>&nbsp;*<structfield>chapterdata</structfield>;</term>
+<listitem><simpara>                This is an m4a-style entry that is used to
+                             display subsongs within a mhit.  (Added in
+                             dbversion 0x0d)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>subtitle</structfield>;</term>
+<listitem><simpara>                   Subtitle (usually the same as Description).
+                             (Added in dbversion 0x0d)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>tvshow</structfield>;</term>
+<listitem><simpara>                     Name of the TV show (only used for TV Shows).
+                             (Added in dbversion 0x0d?) (Since libgpod-0.4.2)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>tvepisode</structfield>;</term>
+<listitem><simpara>                  The episode number (only used for TV Shows).
+                             (Added in dbversion 0x0d?) (Since libgpod-0.4.2)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>tvnetwork</structfield>;</term>
+<listitem><simpara>                  The TV network (only used for TV Shows).
+                             (Added in dbversion 0x0d?) (Since libgpod-0.4.2)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>albumartist</structfield>;</term>
+<listitem><simpara>                The album artist (Added in dbversion 0x13?)
+                             (Since libgpod-0.4.2)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>keywords</structfield>;</term>
+<listitem><simpara>                   List of keywords pertaining to the track.
+                             (Added in dbversion 0x13?) (Since libgpod-0.4.2)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>sort_artist</structfield>;</term>
+<listitem><simpara>                The artist name used for sorting.  Artists with
+                             names like "The Artist" would have "Artist,
+                             The" here.  If you do not set this field,
+                             libgpod will pre-sort the lists displayed by
+                             the iPod according to "Artist, The", without
+                             setting this field.
+                             (Added in dbversion 0x13?) (Since libgpod-0.5.0)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>sort_title</structfield>;</term>
+<listitem><simpara>                 The track title used for sorting.  See
+                             <parameter>sort_artist</parameter>. (Since libgpod-0.5.0)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>sort_album</structfield>;</term>
+<listitem><simpara>                 The album name used for sorting.  See
+                             <parameter>sort_artist</parameter>. (Since libgpod-0.5.0)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>sort_albumartist</structfield>;</term>
+<listitem><simpara>           The album artist used for sorting.  See
+                             <parameter>sort_artist</parameter>. (Since libgpod-0.5.0)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>sort_composer</structfield>;</term>
+<listitem><simpara>              The composer used for sorting.  See
+                             <parameter>sort_artist</parameter>. (Since libgpod-0.5.0)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gchar">gchar</link>&nbsp;*<structfield>sort_tvshow</structfield>;</term>
+<listitem><simpara>                The name of the TV show used for sorting.  See
+                             <parameter>sort_artist</parameter>. (Since libgpod-0.5.0)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>id</structfield>;</term>
+<listitem><simpara>                         Unique ID of track
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>size</structfield>;</term>
+<listitem><simpara>                       The size of the file in bytes
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>tracklen</structfield>;</term>
+<listitem><simpara>                   The length of the track in ms
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>cd_nr</structfield>;</term>
+<listitem><simpara>                      The CD number the track comes from.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>cds</structfield>;</term>
+<listitem><simpara>                        The total number of CDs.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>track_nr</structfield>;</term>
+<listitem><simpara>                   The track number.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>tracks</structfield>;</term>
+<listitem><simpara>                     The total number of tracks.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>bitrate</structfield>;</term>
+<listitem><simpara>                    The bitrate at which the file is encoded.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint16">guint16</link>&nbsp;<structfield>samplerate</structfield>;</term>
+<listitem><simpara>                 The samplerate of the track (e.g. CD = 44100)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint16">guint16</link>&nbsp;<structfield>samplerate_low</structfield>;</term>
+<listitem><simpara>             In the iTunesDB the samplerate is
+                             multiplied by 0x10000 -- these are the
+                             lower 16 bit, which are usually 0
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>year</structfield>;</term>
+<listitem><simpara>                       The year the track was released
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>volume</structfield>;</term>
+<listitem><simpara>                     Volume adjustment field.  This is a value from
+                             -255 to 255 that will be applied to the track
+                             on playback.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>soundcheck</structfield>;</term>
+<listitem><simpara>                 The SoundCheck value to apply to the song, when
+                             SoundCheck is switched on in the iPod settings.
+                             The value for this field can be determined by
+                             the equation: X = 1000 * 10 ^ (-.1 * Y) where Y
+                             is the adjustment value in dB and X is the
+                             value that goes into the SoundCheck field. The
+                             value 0 is special, the equation is not used
+                             and it is treated as "no Soundcheck" (basically
+                             the same as the value 1000). This equation
+                             works perfectly well with ReplayGain derived
+                             data instead of the iTunes SoundCheck derived
+                             information.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="time-t">time_t</link>&nbsp;<structfield>time_added</structfield>;</term>
+<listitem><simpara>                 The time the track was added.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="time-t">time_t</link>&nbsp;<structfield>time_modified</structfield>;</term>
+<listitem><simpara>              The time the track was last modified
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="time-t">time_t</link>&nbsp;<structfield>time_played</structfield>;</term>
+<listitem><simpara>                The time the track was last played
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>bookmark_time</structfield>;</term>
+<listitem><simpara>              The time, in milliseconds, that the track will
+                             start playing at. This is used for AudioBook
+                             filetypes (.aa and .m4b).  Note that there is
+                             also a bookmark value in the play counts file
+                             that will be set by the iPod and can be used
+                             instead of this value.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>rating</structfield>;</term>
+<listitem><simpara>                     The track rating (stars * <link linkend="ITDB-RATING-STEP:CAPS"><type>ITDB_RATING_STEP</type></link>)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>playcount</structfield>;</term>
+<listitem><simpara>                  The number of times the track has been played
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>playcount2</structfield>;</term>
+<listitem><simpara>                 This also stores the play count of the
+                             track.  It is unclear if this ever differs
+                             from the above value. During sync, this is set
+                             to the same value as <parameter>playcount</parameter>.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>recent_playcount</structfield>;</term>
+<listitem><simpara>           The number of times the track was played since
+                             the last sync.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gboolean">gboolean</link>&nbsp;<structfield>transferred</structfield>;</term>
+<listitem><simpara>                Whether the file been transferred to iPod.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint16">gint16</link>&nbsp;<structfield>BPM</structfield>;</term>
+<listitem><simpara>                        BPM (beats per minute) of the track
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>app_rating</structfield>;</term>
+<listitem><simpara>                 The last rating set by an application (e.g.
+                             iTunes).  If the rating on the iPod and the
+                             <parameter>rating</parameter> field above differ, the original
+                             rating is copied here and the new rating is
+                             stored in <parameter>rating</parameter>.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>type1</structfield>;</term>
+<listitem><simpara>                      CBR MP3s and AAC are 0x00, VBR MP3s are 0x01
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>type2</structfield>;</term>
+<listitem><simpara>                      MP3s are 0x01, AAC are 0x00
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>compilation</structfield>;</term>
+<listitem><simpara>                Flag to mark the track as a compilation.  True
+                             if set to 0x1, false if set to 0x0.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>starttime</structfield>;</term>
+<listitem><simpara>                  The time, in milliseconds, at which the song
+                             will start playing.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>stoptime</structfield>;</term>
+<listitem><simpara>                   The time, in milliseconds, at which the song
+                             will stop playing.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>checked</structfield>;</term>
+<listitem><simpara>                    Flag for whether the track is checked.  True if
+                             set to 0x0, false if set to 0x1
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint64">guint64</link>&nbsp;<structfield>dbid</structfield>;</term>
+<listitem><simpara>                       Unique database ID that identifies this song
+                             across the databases on the iPod. For example,
+                             this id joins an iTunesDB mhit with an
+                             ArtworkDB mhii.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>drm_userid</structfield>;</term>
+<listitem><simpara>                 Apple Store/Audible User ID (for DRM'ed files
+                             only, set to 0 otherwise).
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>visible</structfield>;</term>
+<listitem><simpara>                    If this value is 1, the song is visible on the
+                             iPod. All other values cause the file to be
+                             hidden.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>filetype_marker</structfield>;</term>
+<listitem><simpara>            This appears to always be 0 on hard drive based
+                             iPods, but for the iTunesDB that is written to
+                             an iPod Shuffle, iTunes 4.7.1 writes out the
+                             file's type as an ANSI string(!). For example,
+                             a MP3 file has a filetype of 0x4d503320 ->
+                             0x4d = 'M', 0x50 = 'P', 0x33 = '3', 0x20 =
+                             &lt;space&gt;.  This is set to the filename
+                             extension by libgpod when copying the track to
+                             the iPod.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint16">guint16</link>&nbsp;<structfield>artwork_count</structfield>;</term>
+<listitem><simpara>              The number of album artwork items associated
+                             with this song.  libgpod updates this value
+                             when syncing.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>artwork_size</structfield>;</term>
+<listitem><simpara>               The total size of artwork (in bytes) attached
+                             to this song, when it is converted to JPEG
+                             format. Observed in dbversion 0x0b and with
+                             an iPod Photo. libgpod updates this value when
+                             syncing.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="float">float</link>&nbsp;<structfield>samplerate2</structfield>;</term>
+<listitem><simpara>                The sample rate of the song expressed as an
+                             IEEE 32 bit floating point number.  It is
+                             uncertain why this is here.  libgpod will set
+                             this when adding a track.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint16">guint16</link>&nbsp;<structfield>unk126</structfield>;</term>
+<listitem><simpara>                     Unknown, but always seems to be 0xffff for
+                             MP3/AAC songs, 0x0 for uncompressed songs
+                             (like WAVE format), 0x1 for Audible.  libgpod
+                             will try to set this when adding a new track.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk132</structfield>;</term>
+<listitem><simpara>                     Unknown
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="time-t">time_t</link>&nbsp;<structfield>time_released</structfield>;</term>
+<listitem><simpara>              The date/time the track was added to the iTunes
+                             music store?  For podcasts this is the release
+                             date that is displayed next to the title in the
+                             Podcast playlist.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint16">guint16</link>&nbsp;<structfield>unk144</structfield>;</term>
+<listitem><simpara>                     Unknown, but MP3 songs appear to be always
+                             0x000c, AAC songs are always 0x0033, Audible
+                             files are 0x0029, WAV files are 0x0.  libgpod
+                             will attempt to set this value when adding a
+                             track.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint16">guint16</link>&nbsp;<structfield>explicit_flag</structfield>;</term>
+<listitem><simpara>              Flag to mark a track as "explicit" in iTunes.
+                             True if to 0x1, false if set to 0x0.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk148</structfield>;</term>
+<listitem><simpara>                     Unknown - used for Apple Store DRM songs
+                             (always 0x01010100?), zero otherwise
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk152</structfield>;</term>
+<listitem><simpara>                     Unknown
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>skipcount</structfield>;</term>
+<listitem><simpara>                  The number of times the track has been skipped.
+                             (Added in dbversion 0x0c)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>recent_skipcount</structfield>;</term>
+<listitem><simpara>           The number of times the track was skipped since
+                             the last sync.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>last_skipped</structfield>;</term>
+<listitem><simpara>               The time the track was last skipped.  (Added in
+                             dbversion 0x0c)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>has_artwork</structfield>;</term>
+<listitem><simpara>                Whether the track has artwork.
+                             True if set to 0x01, false if set to 0x02.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>skip_when_shuffling</structfield>;</term>
+<listitem><simpara>        Flag to skip the track when shuffling.  True if
+                             set to 0x01, false if set to 0x00. Audiobooks
+                             (.aa and .m4b) always seem to be skipped when
+                             shuffling, regardless of this flag.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>remember_playback_position</structfield>;</term>
+<listitem><simpara> Flag to remember playback position.
+                             True when set to 0x01, false when set to 0x00.
+                             Audiobooks (.aa and .m4b) always seem to
+                             remember the playback position, regardless of
+                             this flag.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>flag4</structfield>;</term>
+<listitem><simpara>                      Used for podcasts, 0x00 otherwise.  If set to
+                             0x01 the "Now Playing" page will show
+                             Title/Album, when set to 0x00 it will also show
+                             the Artist.  When set to 0x02 a sub-page
+                             (middle button) with further information about
+                             the track will be shown.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint64">guint64</link>&nbsp;<structfield>dbid2</structfield>;</term>
+<listitem><simpara>                      The purpose of the field is unclear.  If not
+                             set, libgpod will set this to the same value as
+                             <parameter>dbid</parameter> when adding a track.  (With iTunes, since
+                             dbversion 0x12, this field value differs from
+                             <parameter>dbid</parameter>.)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>lyrics_flag</structfield>;</term>
+<listitem><simpara>                Whether the track has lyrics (e.g. it has a
+                             USLT ID3 tag in an MP3 or a <parameter>lyr</parameter> atom in an
+                             MP4).  True if set to 0x01, false if set to
+                             0x00.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>movie_flag</structfield>;</term>
+<listitem><simpara>                 Whether the track is a movie.  True if set to
+                             0x01, false if set to 0x00.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>mark_unplayed</structfield>;</term>
+<listitem><simpara>              A value of 0x02 marks a podcast as unplayed on
+                             the iPod, with a bullet.  Once played it is set
+                             to 0x01. Non-podcasts have this set to 0x01.
+                             (Added in dbversion 0x0c)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint8">guint8</link>&nbsp;<structfield>unk179</structfield>;</term>
+<listitem><simpara>                     Unknown, always 0x00 so far.  (Added in
+                             dbversion 0x0c)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk180</structfield>;</term>
+<listitem><simpara>                     Unknown.  (Added in dbversion 0x0c)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>pregap</structfield>;</term>
+<listitem><simpara>                     The number of samples of silence before the
+                             track starts (for gapless playback).
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint64">guint64</link>&nbsp;<structfield>samplecount</structfield>;</term>
+<listitem><simpara>                The number of samples in the track (for gapless
+                             playback).
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk196</structfield>;</term>
+<listitem><simpara>                     Unknown.  (Added in dbversion 0x0c)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>postgap</structfield>;</term>
+<listitem><simpara>                    The number of samples of silence at the end of
+                             the track (for gapless playback).
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk204</structfield>;</term>
+<listitem><simpara>                     Unknown.  Appears to be 0x1 for files encoded
+                             using the MP3 encoder, 0x0 otherwise.  (Added
+                             in dbversion 0x0c, first values observed in
+                             0x0d.)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>mediatype</structfield>;</term>
+<listitem><simpara>                  The type of file.  It must be set to 0x00000001
+                             for audio files, and set to 0x00000002 for
+                             video files.  If set to 0x00, the files show up
+                             in both, the audio menus ("Songs", "Artists",
+                             etc.) and the video menus ("Movies", "Music
+                             Videos", etc.).  It appears to be set to 0x20
+                             for music videos, and if set to 0x60 the file
+                             shows up in "TV Shows" rather than "Movies".
+                             <para>
+                             The following list summarizes all observed types:
+                             </para>
+                             <itemizedlist>
+                             <listitem>0x00 00 00 00 - Audio/Video</listitem>
+                             <listitem>0x00 00 00 01 - Audio</listitem>
+                             <listitem>0x00 00 00 02 - Video</listitem>
+                             <listitem>0x00 00 00 04 - Podcast</listitem>
+                             <listitem>0x00 00 00 06 - Video Podcast</listitem>
+                             <listitem>0x00 00 00 08 - Audiobook</listitem>
+                             <listitem>0x00 00 00 20 - Music Video</listitem>
+                             <listitem>0x00 00 00 40 - TV Show (shows up ONLY
+                             in TV Shows)</listitem>
+                             <listitem>0x00 00 00 60 - TV Show (shows up in
+                             the Music lists as well)</listitem>
+                             </itemizedlist>
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>season_nr</structfield>;</term>
+<listitem><simpara>                  The season number of the track (only used for
+                             TV Shows).
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>episode_nr</structfield>;</term>
+<listitem><simpara>                 The episode number of the track (only used for
+                             TV Shows).  Although this is not displayed on
+                             the iPod, the episodes are sorted by episode
+                             number.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk220</structfield>;</term>
+<listitem><simpara>                     Unknown.  This has something to do with
+                             protected files.  It is set to 0x0 for
+                             non-protected files.
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk224</structfield>;</term>
+<listitem><simpara>                     Unknown.  (Added in dbversion 0x0c)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk228</structfield>;</term>
+<listitem><simpara>                     Unknown.  (Added in dbversion 0x0c)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk232</structfield>;</term>
+<listitem><simpara>                     Unknown.  (Added in dbversion 0x0c)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk236</structfield>;</term>
+<listitem><simpara>                     Unknown.  (Added in dbversion 0x0c)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk240</structfield>;</term>
+<listitem><simpara>                     Unknown.  (Added in dbversion 0x0c)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk244</structfield>;</term>
+<listitem><simpara>                     Unknown.  (Added in dbversion 0x13)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>gapless_data</structfield>;</term>
+<listitem><simpara>               The size in bytes from first Synch Frame
+                             (which is usually the XING frame that
+                             includes the LAME tag) until the 8th before
+                             the last frame. The gapless playback does not
+                             work for MP3 files if this is set to zero. For
+                             AAC tracks, this may be zero.  (Added in
+                             dbversion 0x13)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>unk252</structfield>;</term>
+<listitem><simpara>                     Unknown.  (Added in dbversion 0x0c)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint16">guint16</link>&nbsp;<structfield>gapless_track_flag</structfield>;</term>
+<listitem><simpara>         If set to 1, this track has gapless playback
+                             data.  (Added in dbversion 0x13)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint16">guint16</link>&nbsp;<structfield>gapless_album_flag</structfield>;</term>
+<listitem><simpara>         If set to 1, this track does not use
+                             crossfading in iTunes.  (Added in dbversion
+                             0x13)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint16">guint16</link>&nbsp;<structfield>album_id</structfield>;</term>
+<listitem><simpara>                   The Album ID from the album list (currently
+                             unused by libgpod)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term>struct&nbsp;<link linkend="Itdb-Artwork">_Itdb_Artwork</link>&nbsp;*<structfield>artwork</structfield>;</term>
+<listitem><simpara>                    An <link linkend="Itdb-Artwork"><type>Itdb_Artwork</type></link> for cover art
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint32">guint32</link>&nbsp;<structfield>mhii_link</structfield>;</term>
+<listitem><simpara>                  This is set to the id of the corresponding
+                             ArtworkDB mhii, used for sparse artwork
+                             support.  (Since libgpod-0.7.0)
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int1</structfield>;</term>
+<listitem><simpara>              Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int2</structfield>;</term>
+<listitem><simpara>              Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int3</structfield>;</term>
+<listitem><simpara>              Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int4</structfield>;</term>
+<listitem><simpara>              Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int5</structfield>;</term>
+<listitem><simpara>              Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gint32">gint32</link>&nbsp;<structfield>reserved_int6</structfield>;</term>
+<listitem><simpara>              Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved1</structfield>;</term>
+<listitem><simpara>                  Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved2</structfield>;</term>
+<listitem><simpara>                  Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved3</structfield>;</term>
+<listitem><simpara>                  Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved4</structfield>;</term>
+<listitem><simpara>                  Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved5</structfield>;</term>
+<listitem><simpara>                  Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>reserved6</structfield>;</term>
+<listitem><simpara>                  Reserved for future use
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="guint64">guint64</link>&nbsp;<structfield>usertype</structfield>;</term>
+<listitem><simpara>                   For use by application
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>userdata</structfield>;</term>
+<listitem><simpara>                   For use by application
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="ItdbUserDataDuplicateFunc">ItdbUserDataDuplicateFunc</link>&nbsp;<structfield>userdata_duplicate</structfield>;</term>
+<listitem><simpara>         A function to duplicate <link linkend="userdata"><type>userdata</type></link>
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><link linkend="ItdbUserDataDestroyFunc">ItdbUserDataDestroyFunc</link>&nbsp;<structfield>userdata_destroy</structfield>;</term>
+<listitem><simpara>           A function to free <link linkend="userdata"><type>userdata</type></link>
+</simpara></listitem>
+</varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="Itdb-Mediatype" role="enum" condition="since:0.5.0"/>enum Itdb_Mediatype</title>
+<indexterm role="0.5.0"><primary>Itdb_Mediatype</primary></indexterm><programlisting>typedef enum
+{
+    ITDB_MEDIATYPE_AUDIO      = 0x0001,
+    ITDB_MEDIATYPE_MOVIE      = 0x0002,
+    ITDB_MEDIATYPE_PODCAST    = 0x0004,
+    ITDB_MEDIATYPE_AUDIOBOOK  = 0x0008,
+    ITDB_MEDIATYPE_MUSICVIDEO = 0x0020,
+    ITDB_MEDIATYPE_TVSHOW     = 0x0040,
+} Itdb_Mediatype;
+</programlisting>
+<para>
+Mediatype definitions
+</para>
+<para>
+The mediatype is used to determine what menu a track appears under.  For
+example, setting the mediatype to <link linkend="ITDB-MEDIATYPE-PODCAST:CAPS"><type>ITDB_MEDIATYPE_PODCAST</type></link> makes the track
+appear on the Podcast menu.</para>
+<para>
+
+</para><variablelist role="enum">
+<varlistentry>
+<term><anchor id="ITDB-MEDIATYPE-AUDIO:CAPS" role="constant"/><literal>ITDB_MEDIATYPE_AUDIO</literal></term>
+<listitem><simpara>      Audio files
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-MEDIATYPE-MOVIE:CAPS" role="constant"/><literal>ITDB_MEDIATYPE_MOVIE</literal></term>
+<listitem><simpara>      Movies
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-MEDIATYPE-PODCAST:CAPS" role="constant"/><literal>ITDB_MEDIATYPE_PODCAST</literal></term>
+<listitem><simpara>    Podcasts
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-MEDIATYPE-AUDIOBOOK:CAPS" role="constant"/><literal>ITDB_MEDIATYPE_AUDIOBOOK</literal></term>
+<listitem><simpara>  Audio books
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-MEDIATYPE-MUSICVIDEO:CAPS" role="constant"/><literal>ITDB_MEDIATYPE_MUSICVIDEO</literal></term>
+<listitem><simpara> Music videos
+</simpara></listitem>
+</varlistentry>
+<varlistentry>
+<term><anchor id="ITDB-MEDIATYPE-TVSHOW:CAPS" role="constant"/><literal>ITDB_MEDIATYPE_TVSHOW</literal></term>
+<listitem><simpara>     TV Shows
+</simpara></listitem>
+</varlistentry>
+</variablelist><para role="since">Since  0.5.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="ITDB-RATING-STEP:CAPS" role="macro"/>ITDB_RATING_STEP</title>
+<indexterm><primary>ITDB_RATING_STEP</primary></indexterm><programlisting>#define ITDB_RATING_STEP 20
+</programlisting>
+<para>
+The multiplier for each star in <link linkend="track-"><type>track-</type></link>>rating</para>
+<para>
+
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-track-new" role="function"/>itdb_track_new ()</title>
+<indexterm><primary>itdb_track_new</primary></indexterm><programlisting><link linkend="Itdb-Track">Itdb_Track</link>*         itdb_track_new                      (void);</programlisting>
+<para>
+Creates an empty <link linkend="Itdb-Track"><type>Itdb_Track</type></link></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the new <link linkend="Itdb-Track"><type>Itdb_Track</type></link>, free it with <link linkend="itdb-track-free"><function>itdb_track_free()</function></link> when no
+longer needed
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-track-free" role="function"/>itdb_track_free ()</title>
+<indexterm><primary>itdb_track_free</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_track_free                     (<link linkend="Itdb-Track">Itdb_Track</link> *track);</programlisting>
+<para>
+Frees the memory used by <parameter>track</parameter></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>track</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-track-add" role="function"/>itdb_track_add ()</title>
+<indexterm><primary>itdb_track_add</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_track_add                      (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
+                                                         <link linkend="Itdb-Track">Itdb_Track</link> *track,
+                                                         <link linkend="gint32">gint32</link> pos);</programlisting>
+<para>
+Adds <parameter>track</parameter> to <parameter>itdb->tracks</parameter> at position <parameter>pos</parameter> (or at the end if pos
+is -1). The application is responsible to also add it to the master
+playlist. The <parameter>itdb</parameter> gets ownership of the <parameter>track</parameter> and will take care of
+freeing the memory it uses when it's no longer necessary.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
+<listitem><simpara>   an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>track</parameter>&nbsp;:</term>
+<listitem><simpara>  an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>pos</parameter>&nbsp;:</term>
+<listitem><simpara>    position of the track to add
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-track-remove" role="function"/>itdb_track_remove ()</title>
+<indexterm><primary>itdb_track_remove</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_track_remove                   (<link linkend="Itdb-Track">Itdb_Track</link> *track);</programlisting>
+<para>
+Removes <parameter>track</parameter> from the <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> it's associated with, and frees the
+memory it uses. It doesn't remove the track from the playlists it may have
+been added to, in particular it won't be removed from the master playlist.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>track</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-track-unlink" role="function"/>itdb_track_unlink ()</title>
+<indexterm><primary>itdb_track_unlink</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_track_unlink                   (<link linkend="Itdb-Track">Itdb_Track</link> *track);</programlisting>
+<para>
+Removes <parameter>track</parameter> from the <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link> it's associated with, but do not free
+memory. It doesn't remove the track from the playlists it may have been
+added to, in particular it won't be removed from the master playlist.
+<parameter>track->itdb</parameter> is set to NULL.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>track</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-track-duplicate" role="function"/>itdb_track_duplicate ()</title>
+<indexterm><primary>itdb_track_duplicate</primary></indexterm><programlisting><link linkend="Itdb-Track">Itdb_Track</link>*         itdb_track_duplicate                (<link linkend="Itdb-Track">Itdb_Track</link> *tr);</programlisting>
+<para>
+Duplicates an existing track</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>tr</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a newly allocated <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-track-by-id" role="function"/>itdb_track_by_id ()</title>
+<indexterm><primary>itdb_track_by_id</primary></indexterm><programlisting><link linkend="Itdb-Track">Itdb_Track</link>*         itdb_track_by_id                    (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb,
+                                                         <link linkend="guint32">guint32</link> id);</programlisting>
+<para>
+Looks up a track using its ID in <parameter>itdb</parameter>.
+</para>
+<para>
+Looking up tracks by ID is not really a good idea because the IDs
+are created by itdb just before export. The functions are here
+because they are needed during import of the iTunesDB which is
+referencing tracks by IDs.
+</para>
+<para>
+This function is very slow (linear in the number of tracks
+contained in the database). If you need to lookup many IDs use
+<link linkend="itdb-track-id-tree-create"><function>itdb_track_id_tree_create()</function></link>, <link linkend="itdb-track-id-tree-destroy"><function>itdb_track_id_tree_destroy()</function></link>, and
+<link linkend="itdb-track-id-tree-by-id"><function>itdb_track_id_tree_by_id()</function></link>.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>id</parameter>&nbsp;:</term>
+<listitem><simpara>   ID of the track to look for
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="Itdb-Track"><type>Itdb_Track</type></link> with the ID <parameter>id</parameter> or NULL if the ID cannot be
+found.
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-track-id-tree-create" role="function"/>itdb_track_id_tree_create ()</title>
+<indexterm><primary>itdb_track_id_tree_create</primary></indexterm><programlisting><link linkend="GTree">GTree</link>*              itdb_track_id_tree_create           (<link linkend="Itdb-iTunesDB">Itdb_iTunesDB</link> *itdb);</programlisting>
+<para>
+Creates a balanced-binary tree for quick ID lookup that is used in
+<link linkend="itdb-track-by-id-tree"><function>itdb_track_by_id_tree()</function></link></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>itdb</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-iTunesDB"><type>Itdb_iTunesDB</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="GTree"><type>GTree</type></link> indexed by track IDs to be freed with
+<link linkend="itdb-track-id-tree-destroy"><function>itdb_track_id_tree_destroy()</function></link> when no longer used
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-track-id-tree-destroy" role="function"/>itdb_track_id_tree_destroy ()</title>
+<indexterm><primary>itdb_track_id_tree_destroy</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_track_id_tree_destroy          (<link linkend="GTree">GTree</link> *idtree);</programlisting>
+<para>
+Frees the memory used by <parameter>idtree</parameter></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>idtree</parameter>&nbsp;:</term>
+<listitem><simpara> a <link linkend="GTree"><type>GTree</type></link>
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-track-id-tree-by-id" role="function"/>itdb_track_id_tree_by_id ()</title>
+<indexterm><primary>itdb_track_id_tree_by_id</primary></indexterm><programlisting><link linkend="Itdb-Track">Itdb_Track</link>*         itdb_track_id_tree_by_id            (<link linkend="GTree">GTree</link> *idtree,
+                                                         <link linkend="guint32">guint32</link> id);</programlisting>
+<para>
+Lookup an <link linkend="Itdb-Track"><type>Itdb_Track</type></link> by <parameter>id</parameter> using <parameter>idtree</parameter> for faster lookup
+(compared to <link linkend="itdb-track-by-id"><function>itdb_track_by_id()</function></link>)</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>idtree</parameter>&nbsp;:</term>
+<listitem><simpara> a <link linkend="GTree"><type>GTree</type></link> created using <link linkend="itdb-track-id-tree-create"><function>itdb_track_id_tree_create()</function></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>id</parameter>&nbsp;:</term>
+<listitem><simpara>     the ID of the track to search for
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the <link linkend="Itdb-Track"><type>Itdb_Track</type></link> whose ID is <parameter>id</parameter>, or NULL if such a track
+couldn't be found
+</simpara></listitem></varlistentry>
+</variablelist></refsect2>
+<refsect2>
+<title><anchor id="itdb-track-get-thumbnail" role="function" condition="since:0.7.0"/>itdb_track_get_thumbnail ()</title>
+<indexterm role="0.7.0"><primary>itdb_track_get_thumbnail</primary></indexterm><programlisting><link linkend="gpointer">gpointer</link>            itdb_track_get_thumbnail            (<link linkend="Itdb-Track">Itdb_Track</link> *track,
+                                                         <link linkend="gint">gint</link> width,
+                                                         <link linkend="gint">gint</link> height);</programlisting>
+<para>
+Get a thumbnail representing the cover associated with the current track,
+scaling it if appropriate. If either height or width is -1, then the biggest
+unscaled thumbnail available will be returned.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>track</parameter>&nbsp;:</term>
+<listitem><simpara>  an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>width</parameter>&nbsp;:</term>
+<listitem><simpara>  width of the pixbuf to retrieve, -1 for the biggest possible size
+         (with no scaling)
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>height</parameter>&nbsp;:</term>
+<listitem><simpara> height of the pixbuf to retrieve, -1 for the biggest possible size
+         (with no scaling)
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> that must be unreffed when no longer used, NULL
+if no artwork could be found or if libgpod is compiled without GdkPixbuf
+support
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-track-has-thumbnails" role="function" condition="since:0.7.0"/>itdb_track_has_thumbnails ()</title>
+<indexterm role="0.7.0"><primary>itdb_track_has_thumbnails</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_track_has_thumbnails           (<link linkend="Itdb-Track">Itdb_Track</link> *track);</programlisting>
+<para>
+Determine if a <parameter>track</parameter> has thumbnails</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>track</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if <parameter>track</parameter> has artwork available, FALSE otherwise
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.7.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-track-set-thumbnails" role="function" condition="since:0.3.0"/>itdb_track_set_thumbnails ()</title>
+<indexterm role="0.3.0"><primary>itdb_track_set_thumbnails</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_track_set_thumbnails           (<link linkend="Itdb-Track">Itdb_Track</link> *track,
+                                                         const <link linkend="gchar">gchar</link> *filename);</programlisting>
+<para>
+Uses the image contained in <parameter>filename</parameter> to generate iPod thumbnails. The image
+can be in any format supported by gdk-pixbuf. To save memory, the thumbnails
+will only be generated when necessary, i.e. when <link linkend="itdb-save"><function>itdb_save()</function></link> or a similar
+function is called.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>track</parameter>&nbsp;:</term>
+<listitem><simpara>    an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>filename</parameter>&nbsp;:</term>
+<listitem><simpara> image file to use as a thumbnail
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if the thumbnail could be added, FALSE otherwise.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.3.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-track-set-thumbnails-from-data" role="function" condition="since:0.4.0"/>itdb_track_set_thumbnails_from_data ()</title>
+<indexterm role="0.4.0"><primary>itdb_track_set_thumbnails_from_data</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_track_set_thumbnails_from_data (<link linkend="Itdb-Track">Itdb_Track</link> *track,
+                                                         const <link linkend="guchar">guchar</link> *image_data,
+                                                         <link linkend="gsize">gsize</link> image_data_len);</programlisting>
+<para>
+Uses <parameter>image_data</parameter> to generate iPod thumbnails. The image can be in
+any format supported by gdk-pixbuf. To save memory, the thumbnails
+will only be generated when necessary, i.e. when <link linkend="itdb-save"><function>itdb_save()</function></link> or a
+similar function is called.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>track</parameter>&nbsp;:</term>
+<listitem><simpara>          an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>image_data</parameter>&nbsp;:</term>
+<listitem><simpara>     data used to create the thumbnail (the raw contents of
+                 an image file)
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>image_data_len</parameter>&nbsp;:</term>
+<listitem><simpara> length of above data block
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if the thumbnail could be added, FALSE otherwise.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.4.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-track-set-thumbnails-from-pixbuf" role="function" condition="since:0.5.0"/>itdb_track_set_thumbnails_from_pixbuf ()</title>
+<indexterm role="0.5.0"><primary>itdb_track_set_thumbnails_from_pixbuf</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            itdb_track_set_thumbnails_from_pixbuf
+                                                        (<link linkend="Itdb-Track">Itdb_Track</link> *track,
+                                                         <link linkend="gpointer">gpointer</link> pixbuf);</programlisting>
+<para>
+Uses <parameter>pixbuf</parameter> to generate iPod thumbnails. To save memory, the thumbnails
+will only be generated when necessary, i.e. when <link linkend="itdb-save"><function>itdb_save()</function></link> or a
+similar function is called.</para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>track</parameter>&nbsp;:</term>
+<listitem><simpara>  an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
+</simpara></listitem></varlistentry>
+<varlistentry><term><parameter>pixbuf</parameter>&nbsp;:</term>
+<listitem><simpara> a <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> used to generate the thumbnail
+</simpara></listitem></varlistentry>
+<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> TRUE if the thumbnail could be added, FALSE otherwise.
+
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.5.0
+</para></refsect2>
+<refsect2>
+<title><anchor id="itdb-track-remove-thumbnails" role="function" condition="since:0.3.0"/>itdb_track_remove_thumbnails ()</title>
+<indexterm role="0.3.0"><primary>itdb_track_remove_thumbnails</primary></indexterm><programlisting><link linkend="void">void</link>                itdb_track_remove_thumbnails        (<link linkend="Itdb-Track">Itdb_Track</link> *track);</programlisting>
+<para>
+Removes the thumbnails associated with <parameter>track</parameter></para>
+<para>
+
+</para><variablelist role="params">
+<varlistentry><term><parameter>track</parameter>&nbsp;:</term>
+<listitem><simpara> an <link linkend="Itdb-Track"><type>Itdb_Track</type></link>
+</simpara></listitem></varlistentry>
+</variablelist><para role="since">Since  0.3.0
+</para></refsect2>
+
+</refsect1>
+
+
+
+
+
+<refsect1><refsect2 /><refsect2 /></refsect1>
+</refentry>

Added: libgpod/trunk/libgpod/branches/upstream/current/gtk-doc.make
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/gtk-doc.make	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/gtk-doc.make	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,173 @@
+# -*- mode: makefile -*-
+
+####################################
+# Everything below here is generic #
+####################################
+
+if GTK_DOC_USE_LIBTOOL
+GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS)
+GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS)
+else
+GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS)
+GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS)
+endif
+
+# We set GPATH here; this gives us semantics for GNU make
+# which are more like other make's VPATH, when it comes to
+# whether a source that is a target of one rule is then
+# searched for in VPATH/GPATH.
+#
+GPATH = $(srcdir)
+
+TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
+
+EXTRA_DIST = 				\
+	$(content_files)		\
+	$(HTML_IMAGES)			\
+	$(DOC_MAIN_SGML_FILE)		\
+	$(DOC_MODULE)-sections.txt	\
+	$(DOC_MODULE)-overrides.txt
+
+DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
+	   $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
+
+SCANOBJ_FILES = 		 \
+	$(DOC_MODULE).args 	 \
+	$(DOC_MODULE).hierarchy  \
+	$(DOC_MODULE).interfaces \
+	$(DOC_MODULE).prerequisites \
+	$(DOC_MODULE).signals
+
+REPORT_FILES = \
+	$(DOC_MODULE)-undocumented.txt \
+	$(DOC_MODULE)-undeclared.txt \
+	$(DOC_MODULE)-unused.txt
+
+CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS)
+
+if ENABLE_GTK_DOC
+all-local: html-build.stamp
+else
+all-local:
+endif
+
+docs: html-build.stamp
+
+#### scan ####
+
+scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
+	@echo 'gtk-doc: Scanning header files'
+	@-chmod -R u+w $(srcdir)
+	cd $(srcdir) && \
+	  gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
+	if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \
+	    CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
+	else \
+	    cd $(srcdir) ; \
+	    for i in $(SCANOBJ_FILES) ; do \
+               test -f $$i || touch $$i ; \
+	    done \
+	fi
+	touch scan-build.stamp
+
+$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp
+	@true
+
+#### templates ####
+
+tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
+	@echo 'gtk-doc: Rebuilding template files'
+	@-chmod -R u+w $(srcdir)
+	cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS)
+	touch tmpl-build.stamp
+
+tmpl.stamp: tmpl-build.stamp
+	@true
+
+tmpl/*.sgml:
+	@true
+
+
+#### xml ####
+
+sgml-build.stamp: tmpl.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files)
+	@echo 'gtk-doc: Building XML'
+	@-chmod -R u+w $(srcdir)
+	cd $(srcdir) && \
+	gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
+	touch sgml-build.stamp
+
+sgml.stamp: sgml-build.stamp
+	@true
+
+#### html ####
+
+html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
+	@echo 'gtk-doc: Building HTML'
+	@-chmod -R u+w $(srcdir)
+	rm -rf $(srcdir)/html
+	mkdir $(srcdir)/html
+	cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
+	test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
+	@echo 'gtk-doc: Fixing cross-references'
+	cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
+	touch html-build.stamp
+
+##############
+
+clean-local:
+	rm -f *~ *.bak
+	rm -rf .libs
+
+distclean-local:
+	cd $(srcdir) && \
+	  rm -rf xml $(REPORT_FILES) \
+	         $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
+
+maintainer-clean-local: clean
+	cd $(srcdir) && rm -rf xml html
+
+install-data-local:
+	installfiles=`echo $(srcdir)/html/*`; \
+	if test "$$installfiles" = '$(srcdir)/html/*'; \
+	then echo '-- Nothing to install' ; \
+	else \
+	  $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR); \
+	  for i in $$installfiles; do \
+	    echo '-- Installing '$$i ; \
+	    $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
+	  done; \
+	  echo '-- Installing $(srcdir)/html/index.sgml' ; \
+	  $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR) || :; \
+	  (which gtkdoc-rebase >& /dev/null && \
+            gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$(DESTDIR)$(TARGET_DIR)) || : ; \
+	fi
+	
+
+uninstall-local:
+	rm -f $(DESTDIR)$(TARGET_DIR)/*
+
+#
+# Require gtk-doc when making dist
+#
+if ENABLE_GTK_DOC
+dist-check-gtkdoc:
+else
+dist-check-gtkdoc:
+	@echo "*** gtk-doc must be installed and enabled in order to make dist"
+	@false
+endif
+
+dist-hook: dist-check-gtkdoc dist-hook-local
+	mkdir $(distdir)/tmpl
+	mkdir $(distdir)/xml
+	mkdir $(distdir)/html
+	-cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
+	-cp $(srcdir)/xml/*.xml $(distdir)/xml
+	cp $(srcdir)/html/* $(distdir)/html
+	-cp $(srcdir)/$(DOC_MODULE).types $(distdir)/
+	-cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/
+	cd $(distdir) && rm -f $(DISTCLEANFILES)
+	-gtkdoc-rebase --online --relative --html-dir=$(distdir)/html
+
+.PHONY : dist-hook-local docs

Added: libgpod/trunk/libgpod/branches/upstream/current/install-sh
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/install-sh	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/install-sh	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,519 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2006-12-25.00
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "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.
+#
+# 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
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+nl='
+'
+IFS=" ""	$nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit=${DOITPROG-}
+if test -z "$doit"; then
+  doit_exec=exec
+else
+  doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+  test "$posix_glob" != "?" || {
+    if (set -f) 2>/dev/null; then
+      posix_glob=
+    else
+      posix_glob=:
+    fi
+  }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+     --help     display this help and exit.
+     --version  display version info and exit.
+
+  -c            (ignored)
+  -C            install only if different (preserve the last data modification time)
+  -d            create directories instead of installing files.
+  -g GROUP      $chgrpprog installed files to GROUP.
+  -m MODE       $chmodprog installed files to MODE.
+  -o USER       $chownprog installed files to USER.
+  -s            $stripprog installed files.
+  -t DIRECTORY  install into DIRECTORY.
+  -T            report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+  RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+  case $1 in
+    -c) ;;
+
+    -C) copy_on_change=true;;
+
+    -d) dir_arg=true;;
+
+    -g) chgrpcmd="$chgrpprog $2"
+	shift;;
+
+    --help) echo "$usage"; exit $?;;
+
+    -m) mode=$2
+	case $mode in
+	  *' '* | *'	'* | *'
+'*	  | *'*'* | *'?'* | *'['*)
+	    echo "$0: invalid mode: $mode" >&2
+	    exit 1;;
+	esac
+	shift;;
+
+    -o) chowncmd="$chownprog $2"
+	shift;;
+
+    -s) stripcmd=$stripprog;;
+
+    -t) dst_arg=$2
+	shift;;
+
+    -T) no_target_directory=true;;
+
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    --)	shift
+	break;;
+
+    -*)	echo "$0: invalid option: $1" >&2
+	exit 1;;
+
+    *)  break;;
+  esac
+  shift
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+  # When -d is used, all remaining arguments are directories to create.
+  # When -t is used, the destination is already specified.
+  # Otherwise, the last argument is the destination.  Remove it from $@.
+  for arg
+  do
+    if test -n "$dst_arg"; then
+      # $@ is not empty: it contains at least $arg.
+      set fnord "$@" "$dst_arg"
+      shift # fnord
+    fi
+    shift # arg
+    dst_arg=$arg
+  done
+fi
+
+if test $# -eq 0; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
+
+if test -z "$dir_arg"; then
+  trap '(exit $?); exit' 1 2 13 15
+
+  # Set umask so as not to create temps with too-generous modes.
+  # However, 'strip' requires both read and write access to temps.
+  case $mode in
+    # Optimize common cases.
+    *644) cp_umask=133;;
+    *755) cp_umask=22;;
+
+    *[0-7])
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw='% 200'
+      fi
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+    *)
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw=,u+rw
+      fi
+      cp_umask=$mode$u_plus_rw;;
+  esac
+fi
+
+for src
+do
+  # Protect names starting with `-'.
+  case $src in
+    -*) src=./$src;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    dstdir=$dst
+    test -d "$dstdir"
+    dstdir_status=$?
+  else
+
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dst_arg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+
+    dst=$dst_arg
+    # Protect names starting with `-'.
+    case $dst in
+      -*) dst=./$dst;;
+    esac
+
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+	echo "$0: $dst_arg: Is a directory" >&2
+	exit 1
+      fi
+      dstdir=$dst
+      dst=$dstdir/`basename "$src"`
+      dstdir_status=0
+    else
+      # Prefer dirname, but fall back on a substitute if dirname fails.
+      dstdir=`
+	(dirname "$dst") 2>/dev/null ||
+	expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	     X"$dst" : 'X\(//\)[^/]' \| \
+	     X"$dst" : 'X\(//\)$' \| \
+	     X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+	echo X"$dst" |
+	    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)[^/].*/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\).*/{
+		   s//\1/
+		   q
+		 }
+		 s/.*/./; q'
+      `
+
+      test -d "$dstdir"
+      dstdir_status=$?
+    fi
+  fi
+
+  obsolete_mkdir_used=false
+
+  if test $dstdir_status != 0; then
+    case $posix_mkdir in
+      '')
+	# Create intermediate dirs using mode 755 as modified by the umask.
+	# This is like FreeBSD 'install' as of 1997-10-28.
+	umask=`umask`
+	case $stripcmd.$umask in
+	  # Optimize common cases.
+	  *[2367][2367]) mkdir_umask=$umask;;
+	  .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+	  *[0-7])
+	    mkdir_umask=`expr $umask + 22 \
+	      - $umask % 100 % 40 + $umask % 20 \
+	      - $umask % 10 % 4 + $umask % 2
+	    `;;
+	  *) mkdir_umask=$umask,go-w;;
+	esac
+
+	# With -d, create the new directory with the user-specified mode.
+	# Otherwise, rely on $mkdir_umask.
+	if test -n "$dir_arg"; then
+	  mkdir_mode=-m$mode
+	else
+	  mkdir_mode=
+	fi
+
+	posix_mkdir=false
+	case $umask in
+	  *[123567][0-7][0-7])
+	    # POSIX mkdir -p sets u+wx bits regardless of umask, which
+	    # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+	    ;;
+	  *)
+	    tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+	    trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+	    if (umask $mkdir_umask &&
+		exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+	    then
+	      if test -z "$dir_arg" || {
+		   # Check for POSIX incompatibilities with -m.
+		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+		   # other-writeable bit of parent directory when it shouldn't.
+		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
+		   case $ls_ld_tmpdir in
+		     d????-?r-*) different_mode=700;;
+		     d????-?--*) different_mode=755;;
+		     *) false;;
+		   esac &&
+		   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+		     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+		     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+		   }
+		 }
+	      then posix_mkdir=:
+	      fi
+	      rmdir "$tmpdir/d" "$tmpdir"
+	    else
+	      # Remove any dirs left behind by ancient mkdir implementations.
+	      rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+	    fi
+	    trap '' 0;;
+	esac;;
+    esac
+
+    if
+      $posix_mkdir && (
+	umask $mkdir_umask &&
+	$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+      )
+    then :
+    else
+
+      # The umask is ridiculous, or mkdir does not conform to POSIX,
+      # or it failed possibly due to a race condition.  Create the
+      # directory the slow way, step by step, checking for races as we go.
+
+      case $dstdir in
+	/*) prefix='/';;
+	-*) prefix='./';;
+	*)  prefix='';;
+      esac
+
+      eval "$initialize_posix_glob"
+
+      oIFS=$IFS
+      IFS=/
+      $posix_glob set -f
+      set fnord $dstdir
+      shift
+      $posix_glob set +f
+      IFS=$oIFS
+
+      prefixes=
+
+      for d
+      do
+	test -z "$d" && continue
+
+	prefix=$prefix$d
+	if test -d "$prefix"; then
+	  prefixes=
+	else
+	  if $posix_mkdir; then
+	    (umask=$mkdir_umask &&
+	     $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+	    # Don't fail if two instances are running concurrently.
+	    test -d "$prefix" || exit 1
+	  else
+	    case $prefix in
+	      *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+	      *) qprefix=$prefix;;
+	    esac
+	    prefixes="$prefixes '$qprefix'"
+	  fi
+	fi
+	prefix=$prefix/
+      done
+
+      if test -n "$prefixes"; then
+	# Don't fail if two instances are running concurrently.
+	(umask $mkdir_umask &&
+	 eval "\$doit_exec \$mkdirprog $prefixes") ||
+	  test -d "$dstdir" || exit 1
+	obsolete_mkdir_used=true
+      fi
+    fi
+  fi
+
+  if test -n "$dir_arg"; then
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+  else
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+    # Copy the file name to the temp name.
+    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+    # If -C, don't bother to copy if it wouldn't change the file.
+    if $copy_on_change &&
+       old=`LC_ALL=C ls -dlL "$dst"	2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp"	2>/dev/null` &&
+
+       eval "$initialize_posix_glob" &&
+       $posix_glob set -f &&
+       set X $old && old=:$2:$4:$5:$6 &&
+       set X $new && new=:$2:$4:$5:$6 &&
+       $posix_glob set +f &&
+
+       test "$old" = "$new" &&
+       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+    then
+      rm -f "$dsttmp"
+    else
+      # Rename the file to the real destination.
+      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+      # The rename failed, perhaps because mv can't rename something else
+      # to itself, or perhaps because mv is so ancient that it does not
+      # support -f.
+      {
+	# Now remove or move aside any old file at destination location.
+	# We try this two ways since rm can't unlink itself on some
+	# systems and the destination file might be busy for other
+	# reasons.  In this case, the final cleanup might fail but the new
+	# file should still install successfully.
+	{
+	  test ! -f "$dst" ||
+	  $doit $rmcmd -f "$dst" 2>/dev/null ||
+	  { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+	    { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+	  } ||
+	  { echo "$0: cannot unlink or rename $dst" >&2
+	    (exit 1); exit 1
+	  }
+	} &&
+
+	# Now rename the file to the real destination.
+	$doit $mvcmd "$dsttmp" "$dst"
+      }
+    fi || exit 1
+
+    trap '' 0
+  fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:


Property changes on: libgpod/trunk/libgpod/branches/upstream/current/install-sh
___________________________________________________________________
Added: svn:executable
   + 

Added: libgpod/trunk/libgpod/branches/upstream/current/intltool-extract.in
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/intltool-extract.in	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/intltool-extract.in	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,875 @@
+#!@INTLTOOL_PERL@ -w 
+# -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4  -*-
+
+#
+#  The Intltool Message Extractor
+#
+#  Copyright (C) 2000-2001, 2003 Free Software Foundation.
+#
+#  Intltool 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.
+#
+#  Intltool 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.
+#
+#  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.
+#
+#  Authors: Kenneth Christiansen <kenneth at gnu.org>
+#           Darin Adler <darin at bentspoon.com>
+#
+
+## Release information
+my $PROGRAM      = "intltool-extract";
+my $PACKAGE      = "intltool";
+my $VERSION      = "0.37.1";
+
+## Loaded modules
+use strict; 
+use File::Basename;
+use Getopt::Long;
+
+## Scalars used by the option stuff
+my $TYPE_ARG	= "0";
+my $LOCAL_ARG	= "0";
+my $HELP_ARG 	= "0";
+my $VERSION_ARG = "0";
+my $UPDATE_ARG  = "0";
+my $QUIET_ARG   = "0";
+my $SRCDIR_ARG	= ".";
+
+my $FILE;
+my $OUTFILE;
+
+my $gettext_type = "";
+my $input;
+my %messages = ();
+my %loc = ();
+my %count = ();
+my %comments = ();
+my $strcount = 0;
+
+my $XMLCOMMENT = "";
+
+## Use this instead of \w for XML files to handle more possible characters.
+my $w = "[-A-Za-z0-9._:]";
+
+## Always print first
+$| = 1;
+
+## Handle options
+GetOptions (
+	    "type=s"     => \$TYPE_ARG,
+            "local|l"    => \$LOCAL_ARG,
+            "help|h"     => \$HELP_ARG,
+            "version|v"  => \$VERSION_ARG,
+            "update"     => \$UPDATE_ARG,
+	    "quiet|q"    => \$QUIET_ARG,
+	    "srcdir=s"	 => \$SRCDIR_ARG,
+            ) or &error;
+
+&split_on_argument;
+
+
+## Check for options. 
+## This section will check for the different options.
+
+sub split_on_argument {
+
+    if ($VERSION_ARG) {
+        &version;
+
+    } elsif ($HELP_ARG) {
+	&help;
+        
+    } elsif ($LOCAL_ARG) {
+        &place_local;
+        &extract;
+
+    } elsif ($UPDATE_ARG) {
+	&place_normal;
+	&extract;
+
+    } elsif (@ARGV > 0) {
+	&place_normal;
+	&message;
+	&extract;
+
+    } else {
+	&help;
+
+    }  
+}    
+
+sub place_normal {
+    $FILE	 = $ARGV[0];
+    $OUTFILE     = "$FILE.h";
+
+    my $dirname = dirname ($OUTFILE);
+    if (! -d "$dirname" && $dirname ne "") {
+        system ("mkdir -p $dirname");
+    }
+}   
+
+sub place_local {
+    $FILE	 = $ARGV[0];
+    $OUTFILE     = fileparse($FILE, ());
+    if (!-e "tmp/") { 
+        system("mkdir tmp/"); 
+    }
+    $OUTFILE     = "./tmp/$OUTFILE.h"
+}
+
+sub determine_type {
+   if ($TYPE_ARG =~ /^gettext\/(.*)/) {
+	$gettext_type=$1
+   }
+}
+
+## Sub for printing release information
+sub version{
+    print <<_EOF_;
+${PROGRAM} (${PACKAGE}) $VERSION
+Copyright (C) 2000, 2003 Free Software Foundation, Inc.
+Written by Kenneth Christiansen, 2000.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+_EOF_
+    exit;
+}
+
+## Sub for printing usage information
+sub help {
+    print <<_EOF_;
+Usage: ${PROGRAM} [OPTION]... [FILENAME]
+Generates a header file from an XML source file.
+
+It grabs all strings between <_translatable_node> and its end tag in
+XML files. Read manpage (man ${PROGRAM}) for more info.
+
+      --type=TYPE   Specify the file type of FILENAME. Currently supports:
+                    "gettext/glade", "gettext/ini", "gettext/keys"
+                    "gettext/rfc822deb", "gettext/schemas",
+                    "gettext/scheme", "gettext/xml", "gettext/quoted",
+                    "gettext/quotedxml"
+  -l, --local       Writes output into current working directory
+                    (conflicts with --update)
+      --update      Writes output into the same directory the source file 
+                    reside (conflicts with --local)
+      --srcdir      Root of the source tree
+  -v, --version     Output version information and exit
+  -h, --help        Display this help and exit
+  -q, --quiet       Quiet mode
+
+Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE")
+or send email to <xml-i18n-tools\@gnome.org>.
+_EOF_
+    exit;
+}
+
+## Sub for printing error messages
+sub error{
+    print STDERR "Try `${PROGRAM} --help' for more information.\n";
+    exit;
+}
+
+sub message {
+    print "Generating C format header file for translation.\n" unless $QUIET_ARG;
+}
+
+sub extract {
+    &determine_type;
+
+    &convert;
+
+    open OUT, ">$OUTFILE";
+    binmode (OUT) if $^O eq 'MSWin32';
+    &msg_write;
+    close OUT;
+
+    print "Wrote $OUTFILE\n" unless $QUIET_ARG;
+}
+
+sub convert {
+
+    ## Reading the file
+    {
+	local (*IN);
+	local $/; #slurp mode
+	open (IN, "<$SRCDIR_ARG/$FILE") || die "can't open $SRCDIR_ARG/$FILE: $!";
+	$input = <IN>;
+    }
+
+    &type_ini if $gettext_type eq "ini";
+    &type_keys if $gettext_type eq "keys";
+    &type_xml if $gettext_type eq "xml";
+    &type_glade if $gettext_type eq "glade";
+    &type_scheme if $gettext_type eq "scheme";
+    &type_schemas  if $gettext_type eq "schemas";
+    &type_rfc822deb  if $gettext_type eq "rfc822deb";
+    &type_quoted if $gettext_type eq "quoted";
+    &type_quotedxml if $gettext_type eq "quotedxml";
+}
+
+sub entity_decode_minimal
+{
+    local ($_) = @_;
+
+    s/&apos;/'/g; # '
+    s/&quot;/"/g; # "
+    s/&amp;/&/g;
+
+    return $_;
+}
+
+sub entity_decode
+{
+    local ($_) = @_;
+
+    s/&apos;/'/g; # '
+    s/&quot;/"/g; # "
+    s/&lt;/</g;
+    s/&gt;/>/g;
+    s/&amp;/&/g;
+
+    return $_;
+}
+
+sub escape_char
+{
+    return '\"' if $_ eq '"';
+    return '\n' if $_ eq "\n";
+    return '\\\\' if $_ eq '\\';
+
+    return $_;
+}
+
+sub escape
+{
+    my ($string) = @_;
+    return join "", map &escape_char, split //, $string;
+}
+
+sub type_ini {
+    ### For generic translatable desktop files ###
+    while ($input =~ /^(#(.+)\n)?^_.*=(.*)$/mg) {
+        if (defined($2))  {
+            $comments{$3} = $2;
+        }
+        $messages{$3} = [];
+    }
+}
+
+sub type_keys {
+    ### For generic translatable mime/keys files ###
+    while ($input =~ /^\s*_\w+=(.*)$/mg) {
+        $messages{$1} = [];
+    }
+}
+
+sub type_xml {
+    ### For generic translatable XML files ###
+    my $tree = readXml($input);
+    parseTree(0, $tree);
+}
+
+sub print_var {
+    my $var = shift;
+    my $vartype = ref $var;
+    
+    if ($vartype =~ /ARRAY/) {
+        my @arr = @{$var};
+        print "[ ";
+        foreach my $el (@arr) {
+            print_var($el);
+            print ", ";
+        }
+        print "] ";
+    } elsif ($vartype =~ /HASH/) {
+        my %hash = %{$var};
+        print "{ ";
+        foreach my $key (keys %hash) {
+            print "$key => ";
+            print_var($hash{$key});
+            print ", ";
+        }
+        print "} ";
+    } else {
+        print $var;
+    }
+}
+
+# Same syntax as getAttributeString in intltool-merge.in.in, similar logic (look for ## differences comment)
+sub getAttributeString
+{
+    my $sub = shift;
+    my $do_translate = shift || 1;
+    my $language = shift || "";
+    my $translate = shift;
+    my $result = "";
+    foreach my $e (reverse(sort(keys %{ $sub }))) {
+	my $key    = $e;
+	my $string = $sub->{$e};
+	my $quote = '"';
+	
+	$string =~ s/^[\s]+//;
+	$string =~ s/[\s]+$//;
+	
+	if ($string =~ /^'.*'$/)
+	{
+	    $quote = "'";
+	}
+	$string =~ s/^['"]//g;
+	$string =~ s/['"]$//g;
+
+        ## differences from intltool-merge.in.in
+	if ($key =~ /^_/) {
+            $comments{entity_decode($string)} = $XMLCOMMENT if $XMLCOMMENT;
+            $messages{entity_decode($string)} = [];
+            $$translate = 2;
+	}
+        ## differences end here from intltool-merge.in.in
+	$result .= " $key=$quote$string$quote";
+    }
+    return $result;
+}
+
+# Verbatim copy from intltool-merge.in.in
+sub getXMLstring
+{
+    my $ref = shift;
+    my $spacepreserve = shift || 0;
+    my @list = @{ $ref };
+    my $result = "";
+
+    my $count = scalar(@list);
+    my $attrs = $list[0];
+    my $index = 1;
+
+    $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
+    $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/));
+
+    while ($index < $count) {
+	my $type = $list[$index];
+	my $content = $list[$index+1];
+        if (! $type ) {
+	    # We've got CDATA
+	    if ($content) {
+		# lets strip the whitespace here, and *ONLY* here
+                $content =~ s/\s+/ /gs if (!$spacepreserve);
+		$result .= $content;
+	    }
+	} elsif ( "$type" ne "1" ) {
+	    # We've got another element
+	    $result .= "<$type";
+	    $result .= getAttributeString(@{$content}[0], 0); # no nested translatable elements
+	    if ($content) {
+		my $subresult = getXMLstring($content, $spacepreserve);
+		if ($subresult) {
+		    $result .= ">".$subresult . "</$type>";
+		} else {
+		    $result .= "/>";
+		}
+	    } else {
+		$result .= "/>";
+	    }
+	}
+	$index += 2;
+    }
+    return $result;
+}
+
+# Verbatim copy from intltool-merge.in.in, except for MULTIPLE_OUTPUT handling removed
+# Translate list of nodes if necessary
+sub translate_subnodes
+{
+    my $fh = shift;
+    my $content = shift;
+    my $language = shift || "";
+    my $singlelang = shift || 0;
+    my $spacepreserve = shift || 0;
+
+    my @nodes = @{ $content };
+
+    my $count = scalar(@nodes);
+    my $index = 0;
+    while ($index < $count) {
+        my $type = $nodes[$index];
+        my $rest = $nodes[$index+1];
+        traverse($fh, $type, $rest, $language, $spacepreserve);
+        $index += 2;
+    }
+}
+
+# Based on traverse() in intltool-merge.in.in
+sub traverse
+{
+    my $fh = shift; # unused, to allow us to sync code between -merge and -extract
+    my $nodename = shift;
+    my $content = shift;
+    my $language = shift || "";
+    my $spacepreserve = shift || 0;
+
+    if ($nodename && "$nodename" eq "1") {
+        $XMLCOMMENT = $content;
+    } elsif ($nodename) {
+	# element
+	my @all = @{ $content };
+	my $attrs = shift @all;
+	my $translate = 0;
+	my $outattr = getAttributeString($attrs, 1, $language, \$translate);
+
+	if ($nodename =~ /^_/) {
+	    $translate = 1;
+	    $nodename =~ s/^_//;
+	}
+	my $lookup = '';
+
+        $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/));
+        $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
+
+	if ($translate) {
+	    $lookup = getXMLstring($content, $spacepreserve);
+            if (!$spacepreserve) {
+                $lookup =~ s/^\s+//s;
+                $lookup =~ s/\s+$//s;
+            }
+
+	    if ($lookup && $translate != 2) {
+                $comments{$lookup} = $XMLCOMMENT if $XMLCOMMENT;
+                $messages{$lookup} = [];
+            } elsif ($translate == 2) {
+                translate_subnodes($fh, \@all, $language, 1, $spacepreserve);
+	    }
+	} else {
+            $XMLCOMMENT = "";
+	    my $count = scalar(@all);
+	    if ($count > 0) {
+                my $index = 0;
+                while ($index < $count) {
+                    my $type = $all[$index];
+                    my $rest = $all[$index+1];
+                    traverse($fh, $type, $rest, $language, $spacepreserve);
+                    $index += 2;
+                }
+	    }
+	}
+        $XMLCOMMENT = "";
+    }
+}
+
+
+# Verbatim copy from intltool-merge.in.in, $fh for compatibility
+sub parseTree
+{
+    my $fh        = shift;
+    my $ref       = shift;
+    my $language  = shift || "";
+
+    my $name = shift @{ $ref };
+    my $cont = shift @{ $ref };
+
+    while (!$name || "$name" eq "1") {
+        $name = shift @{ $ref };
+        $cont = shift @{ $ref };
+    }
+
+    my $spacepreserve = 0;
+    my $attrs = @{$cont}[0];
+    $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
+
+    traverse($fh, $name, $cont, $language, $spacepreserve);
+}
+
+# Verbatim copy from intltool-merge.in.in
+sub intltool_tree_comment
+{
+    my $expat = shift;
+    my $data  = $expat->original_string();
+    my $clist = $expat->{Curlist};
+    my $pos   = $#$clist;
+
+    $data =~ s/^<!--//s;
+    $data =~ s/-->$//s;
+    push @$clist, 1 => $data;
+}
+
+# Verbatim copy from intltool-merge.in.in
+sub intltool_tree_cdatastart
+{
+    my $expat    = shift;
+    my $clist = $expat->{Curlist};
+    my $pos   = $#$clist;
+
+    push @$clist, 0 => $expat->original_string();
+}
+
+# Verbatim copy from intltool-merge.in.in
+sub intltool_tree_cdataend
+{
+    my $expat    = shift;
+    my $clist = $expat->{Curlist};
+    my $pos   = $#$clist;
+
+    $clist->[$pos] .= $expat->original_string();
+}
+
+# Verbatim copy from intltool-merge.in.in
+sub intltool_tree_char
+{
+    my $expat = shift;
+    my $text  = shift;
+    my $clist = $expat->{Curlist};
+    my $pos   = $#$clist;
+
+    # Use original_string so that we retain escaped entities
+    # in CDATA sections.
+    #
+    if ($pos > 0 and $clist->[$pos - 1] eq '0') {
+        $clist->[$pos] .= $expat->original_string();
+    } else {
+        push @$clist, 0 => $expat->original_string();
+    }
+}
+
+# Verbatim copy from intltool-merge.in.in
+sub intltool_tree_start
+{
+    my $expat    = shift;
+    my $tag      = shift;
+    my @origlist = ();
+
+    # Use original_string so that we retain escaped entities
+    # in attribute values.  We must convert the string to an
+    # @origlist array to conform to the structure of the Tree
+    # Style.
+    #
+    my @original_array = split /\x/, $expat->original_string();
+    my $source         = $expat->original_string();
+
+    # Remove leading tag.
+    #
+    $source =~ s|^\s*<\s*(\S+)||s;
+
+    # Grab attribute key/value pairs and push onto @origlist array.
+    #
+    while ($source)
+    {
+       if ($source =~ /^\s*([\w:-]+)\s*[=]\s*["]/)
+       {
+           $source =~ s|^\s*([\w:-]+)\s*[=]\s*["]([^"]*)["]||s;
+           push @origlist, $1;
+           push @origlist, '"' . $2 . '"';
+       }
+       elsif ($source =~ /^\s*([\w:-]+)\s*[=]\s*[']/)
+       {
+           $source =~ s|^\s*([\w:-]+)\s*[=]\s*[']([^']*)[']||s;
+           push @origlist, $1;
+           push @origlist, "'" . $2 . "'";
+       }
+       else
+       {
+           last;
+       }
+    }
+
+    my $ol = [ { @origlist } ];
+
+    push @{ $expat->{Lists} }, $expat->{Curlist};
+    push @{ $expat->{Curlist} }, $tag => $ol;
+    $expat->{Curlist} = $ol;
+}
+
+# Copied from intltool-merge.in.in and added comment handler.
+sub readXml
+{
+    my $xmldoc = shift || return;
+    my $ret = eval 'require XML::Parser';
+    if(!$ret) {
+        die "You must have XML::Parser installed to run $0\n\n";
+    }
+    my $xp = new XML::Parser(Style => 'Tree');
+    $xp->setHandlers(Char => \&intltool_tree_char);
+    $xp->setHandlers(Start => \&intltool_tree_start);
+    $xp->setHandlers(CdataStart => \&intltool_tree_cdatastart);
+    $xp->setHandlers(CdataEnd => \&intltool_tree_cdataend);
+
+    ## differences from intltool-merge.in.in
+    $xp->setHandlers(Comment => \&intltool_tree_comment);
+    ## differences end here from intltool-merge.in.in
+
+    my $tree = $xp->parse($xmldoc);
+    #print_var($tree);
+
+# <foo><!-- comment --><head id="a">Hello <em>there</em></head><bar>Howdy<ref/></bar>do</foo>
+# would be:
+# [foo, [{}, 1, "comment", head, [{id => "a"}, 0, "Hello ",  em, [{}, 0, "there"]], bar, 
+# [{}, 0, "Howdy",  ref, [{}]], 0, "do" ] ]
+
+    return $tree;
+}
+
+sub type_schemas {
+    ### For schemas XML files ###
+         
+    # FIXME: We should handle escaped < (less than)
+    while ($input =~ /
+                      <locale\ name="C">\s*
+                          (<default>\s*(?:<!--([^>]*?)-->\s*)?(.*?)\s*<\/default>\s*)?
+                          (<short>\s*(?:<!--([^>]*?)-->\s*)?(.*?)\s*<\/short>\s*)?
+                          (<long>\s*(?:<!--([^>]*?)-->\s*)?(.*?)\s*<\/long>\s*)?
+                      <\/locale>
+                     /sgx) {
+        my @totranslate = ($3,$6,$9);
+        my @eachcomment = ($2,$5,$8);
+        foreach (@totranslate) {
+            my $currentcomment = shift @eachcomment;
+            next if !$_;
+            s/\s+/ /g;
+            $messages{entity_decode_minimal($_)} = [];
+            $comments{entity_decode_minimal($_)} = $currentcomment if (defined($currentcomment));
+        }
+    }
+}
+
+sub type_rfc822deb {
+    ### For rfc822-style Debian configuration files ###
+
+    my $lineno = 1;
+    my $type = '';
+    while ($input =~ /\G(.*?)(^|\n)(_+)([^:]+):[ \t]*(.*?)(?=\n\S|$)/sg)
+    {
+        my ($pre, $newline, $underscore, $tag, $text) = ($1, $2, $3, $4, $5);
+        while ($pre =~ m/\n/g)
+        {
+            $lineno ++;
+        }
+        $lineno += length($newline);
+        my @str_list = rfc822deb_split(length($underscore), $text);
+        for my $str (@str_list)
+        {
+            $strcount++;
+            $messages{$str} = [];
+            $loc{$str} = $lineno;
+            $count{$str} = $strcount;
+            my $usercomment = '';
+            while($pre =~ s/(^|\n)#([^\n]*)$//s)
+            {
+                $usercomment = "\n" . $2 . $usercomment;
+            }
+            $comments{$str} = $tag . $usercomment;
+        }
+        $lineno += ($text =~ s/\n//g);
+    }
+}
+
+sub rfc822deb_split {
+    # Debian defines a special way to deal with rfc822-style files:
+    # when a value contain newlines, it consists of
+    #   1.  a short form (first line)
+    #   2.  a long description, all lines begin with a space,
+    #       and paragraphs are separated by a single dot on a line
+    # This routine returns an array of all paragraphs, and reformat
+    # them.
+    # When first argument is 2, the string is a comma separated list of
+    # values.
+    my $type = shift;
+    my $text = shift;
+    $text =~ s/^[ \t]//mg;
+    return (split(/, */, $text, 0)) if $type ne 1;
+    return ($text) if $text !~ /\n/;
+
+    $text =~ s/([^\n]*)\n//;
+    my @list = ($1);
+    my $str = '';
+    for my $line (split (/\n/, $text))
+    {
+        chomp $line;
+        if ($line =~ /^\.\s*$/)
+        {
+            #  New paragraph
+            $str =~ s/\s*$//;
+            push(@list, $str);
+            $str = '';
+        }
+        elsif ($line =~ /^\s/)
+        {
+            #  Line which must not be reformatted
+            $str .= "\n" if length ($str) && $str !~ /\n$/;
+            $line =~ s/\s+$//;
+            $str .= $line."\n";
+        }
+        else
+        {
+            #  Continuation line, remove newline
+            $str .= " " if length ($str) && $str !~ /\n$/;
+            $str .= $line;
+        }
+    }
+    $str =~ s/\s*$//;
+    push(@list, $str) if length ($str);
+    return @list;
+}
+
+sub type_quoted {
+    while ($input =~ /\"(([^\"]|\\\")*[^\\\"])\"/g) {
+        my $message = $1;
+        my $before = $`;
+        $message =~ s/\\\"/\"/g;
+        $before =~ s/[^\n]//g;
+        $messages{$message} = [];
+        $loc{$message} = length ($before) + 2;
+    }
+}
+
+sub type_quotedxml {
+    while ($input =~ /\"(([^\"]|\\\")*[^\\\"])\"/g) {
+        my $message = $1;
+        my $before = $`;
+        $message =~ s/\\\"/\"/g;
+        $message = entity_decode($message);
+        $before =~ s/[^\n]//g;
+        $messages{$message} = [];
+        $loc{$message} = length ($before) + 2;
+    }
+}
+
+sub type_glade {
+    ### For translatable Glade XML files ###
+
+    my $tags = "label|title|text|format|copyright|comments|preview_text|tooltip|message";
+
+    while ($input =~ /<($tags)>([^<]+)<\/($tags)>/sg) {
+	# Glade sometimes uses tags that normally mark translatable things for
+        # little bits of non-translatable content. We work around this by not
+        # translating strings that only includes something like label4 or window1.
+	$messages{entity_decode($2)} = [] unless $2 =~ /^(window|label|dialog)[0-9]+$/;
+    }
+    
+    while ($input =~ /<items>(..[^<]*)<\/items>/sg) {
+	for my $item (split (/\n/, $1)) {
+	    $messages{entity_decode($item)} = [];
+	}
+    }
+
+    ## handle new glade files
+    while ($input =~ /<(property|atkproperty)\s+[^>]*translatable\s*=\s*"yes"(?:\s+[^>]*comments\s*=\s*"([^"]*)")?[^>]*>([^<]+)<\/\1>/sg) {
+	$messages{entity_decode($3)} = [] unless $3 =~ /^(window|label)[0-9]+$/;
+        if (defined($2) and !($3 =~ /^(window|label)[0-9]+$/)) {
+	   $comments{entity_decode($3)} = entity_decode($2) ;
+        }
+    }
+    while ($input =~ /<atkaction\s+action_name="([^>]*)"\s+description="([^>]+)"\/>/sg) {
+        $messages{entity_decode_minimal($2)} = [];
+    }
+}
+
+sub type_scheme {
+    my ($line, $i, $state, $str, $trcomment, $char);
+    for $line (split(/\n/, $input)) {
+        $i = 0;
+        $state = 0; # 0 - nothing, 1 - string, 2 - translatable string
+        while ($i < length($line)) {
+            if (substr($line,$i,1) eq "\"") {
+                if ($state == 2) {
+                    $comments{$str} = $trcomment if ($trcomment);
+                    $messages{$str} = [];
+                    $str = '';
+                    $state = 0; $trcomment = "";
+                } elsif ($state == 1) {
+                    $str = '';
+                    $state = 0; $trcomment = "";
+                } else {
+                    $state = 1;
+                    $str = '';
+                    if ($i>0 && substr($line,$i-1,1) eq '_') {
+                        $state = 2;
+                    }
+                }
+            } elsif (!$state) {
+                if (substr($line,$i,1) eq ";") {
+                    $trcomment = substr($line,$i+1);
+                    $trcomment =~ s/^;*\s*//;
+                    $i = length($line);
+                } elsif ($trcomment && substr($line,$i,1) !~ /\s|\(|\)|_/) {
+                    $trcomment = "";
+                }
+            } else {
+                if (substr($line,$i,1) eq "\\") {
+                    $char = substr($line,$i+1,1);
+                    if ($char ne "\"" && $char ne "\\") {
+                       $str = $str . "\\";
+                    }
+                    $i++;
+                }
+                $str = $str . substr($line,$i,1);
+            }
+            $i++;
+        }
+    }
+}
+
+sub msg_write {
+    my @msgids;
+    if (%count)
+    {
+        @msgids = sort { $count{$a} <=> $count{$b} } keys %count;
+    }
+    else
+    {
+        @msgids = sort keys %messages;
+    }
+    for my $message (@msgids)
+    {
+	my $offsetlines = 1;
+	$offsetlines++ if $message =~ /%/;
+	if (defined ($comments{$message}))
+	{
+		while ($comments{$message} =~ m/\n/g)
+		{
+		    $offsetlines++;
+		}
+	}
+	print OUT "# ".($loc{$message} - $offsetlines).  " \"$FILE\"\n"
+	        if defined $loc{$message};
+   	print OUT "/* ".$comments{$message}." */\n"
+                if defined $comments{$message};
+   	print OUT "/* xgettext:no-c-format */\n" if $message =~ /%/;
+        
+    	my @lines = split (/\n/, $message, -1);
+    	for (my $n = 0; $n < @lines; $n++)
+	{
+            if ($n == 0)
+            {
+ 		print OUT "char *s = N_(\""; 
+            }
+            else
+            {  
+                print OUT "             \""; 
+            }
+
+            print OUT escape($lines[$n]);
+
+            if ($n < @lines - 1)
+            {
+                print OUT "\\n\"\n"; 
+            }
+            else
+            {
+                print OUT "\");\n";  
+	    }
+        }
+    }
+}
+

Added: libgpod/trunk/libgpod/branches/upstream/current/intltool-merge.in
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/intltool-merge.in	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/intltool-merge.in	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,1506 @@
+#!@INTLTOOL_PERL@ -w
+# -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4  -*-
+
+#
+#  The Intltool Message Merger
+#
+#  Copyright (C) 2000, 2003 Free Software Foundation.
+#  Copyright (C) 2000, 2001 Eazel, Inc
+#
+#  Intltool is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License 
+#  version 2 published by the Free Software Foundation.
+#
+#  Intltool 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.
+#
+#  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.
+#
+#  Authors:  Maciej Stachowiak <mjs at noisehavoc.org>
+#            Kenneth Christiansen <kenneth at gnu.org>
+#            Darin Adler <darin at bentspoon.com>
+#
+#  Proper XML UTF-8'ification written by Cyrille Chepelov <chepelov at calixo.net>
+#
+
+## Release information
+my $PROGRAM = "intltool-merge";
+my $PACKAGE = "intltool";
+my $VERSION = "0.37.1";
+
+## Loaded modules
+use strict; 
+use Getopt::Long;
+use Text::Wrap;
+use File::Basename;
+
+my $must_end_tag      = -1;
+my $last_depth        = -1;
+my $translation_depth = -1;
+my @tag_stack = ();
+my @entered_tag = ();
+my @translation_strings = ();
+my $leading_space = "";
+
+## Scalars used by the option stuff
+my $HELP_ARG = 0;
+my $VERSION_ARG = 0;
+my $BA_STYLE_ARG = 0;
+my $XML_STYLE_ARG = 0;
+my $KEYS_STYLE_ARG = 0;
+my $DESKTOP_STYLE_ARG = 0;
+my $SCHEMAS_STYLE_ARG = 0;
+my $RFC822DEB_STYLE_ARG = 0;
+my $QUOTED_STYLE_ARG = 0;
+my $QUOTEDXML_STYLE_ARG = 0;
+my $QUIET_ARG = 0;
+my $PASS_THROUGH_ARG = 0;
+my $UTF8_ARG = 0;
+my $MULTIPLE_OUTPUT = 0;
+my $cache_file;
+
+## Handle options
+GetOptions 
+(
+ "help" => \$HELP_ARG,
+ "version" => \$VERSION_ARG,
+ "quiet|q" => \$QUIET_ARG,
+ "oaf-style|o" => \$BA_STYLE_ARG, ## for compatibility
+ "ba-style|b" => \$BA_STYLE_ARG,
+ "xml-style|x" => \$XML_STYLE_ARG,
+ "keys-style|k" => \$KEYS_STYLE_ARG,
+ "desktop-style|d" => \$DESKTOP_STYLE_ARG,
+ "schemas-style|s" => \$SCHEMAS_STYLE_ARG,
+ "rfc822deb-style|r" => \$RFC822DEB_STYLE_ARG,
+ "quoted-style" => \$QUOTED_STYLE_ARG,
+ "quotedxml-style" => \$QUOTEDXML_STYLE_ARG,
+ "pass-through|p" => \$PASS_THROUGH_ARG,
+ "utf8|u" => \$UTF8_ARG,
+ "multiple-output|m" => \$MULTIPLE_OUTPUT,
+ "cache|c=s" => \$cache_file
+ ) or &error;
+
+my $PO_DIR;
+my $FILE;
+my $OUTFILE;
+
+my %po_files_by_lang = ();
+my %translations = ();
+my $iconv = $ENV{"ICONV"} || "iconv";
+my $devnull = ($^O eq 'MSWin32' ? 'NUL:' : '/dev/null');
+
+sub isProgramInPath
+{
+    my ($file) = @_;
+    # If either a file exists, or when run it returns 0 exit status
+    return 1 if ((-x $file) or (system("$file -l >$devnull") == 0));
+    return 0;
+}
+
+if (! isProgramInPath ("$iconv"))
+{
+	print STDERR " *** iconv is not found on this system!\n".
+		     " *** Without it, intltool-merge can not convert encodings.\n";
+	exit;
+}
+
+# Use this instead of \w for XML files to handle more possible characters.
+my $w = "[-A-Za-z0-9._:]";
+
+# XML quoted string contents
+my $q = "[^\\\"]*";
+
+## Check for options. 
+
+if ($VERSION_ARG) 
+{
+	&print_version;
+} 
+elsif ($HELP_ARG) 
+{
+	&print_help;
+} 
+elsif ($BA_STYLE_ARG && @ARGV > 2) 
+{
+	&utf8_sanity_check;
+	&preparation;
+	&print_message;
+	&ba_merge_translations;
+	&finalize;
+} 
+elsif ($XML_STYLE_ARG && @ARGV > 2) 
+{
+	&utf8_sanity_check;
+	&preparation;
+	&print_message;
+	&xml_merge_output;
+	&finalize;
+} 
+elsif ($KEYS_STYLE_ARG && @ARGV > 2) 
+{
+	&utf8_sanity_check;
+	&preparation;
+	&print_message;
+        &keys_merge_translations;
+	&finalize;
+} 
+elsif ($DESKTOP_STYLE_ARG && @ARGV > 2) 
+{
+	&utf8_sanity_check;
+	&preparation;
+	&print_message;
+	&desktop_merge_translations;
+	&finalize;
+} 
+elsif ($SCHEMAS_STYLE_ARG && @ARGV > 2) 
+{
+	&utf8_sanity_check;
+	&preparation;
+	&print_message;
+	&schemas_merge_translations;
+	&finalize;
+} 
+elsif ($RFC822DEB_STYLE_ARG && @ARGV > 2) 
+{
+	&preparation;
+	&print_message;
+	&rfc822deb_merge_translations;
+	&finalize;
+} 
+elsif (($QUOTED_STYLE_ARG || $QUOTEDXML_STYLE_ARG) && @ARGV > 2)
+{
+	&utf8_sanity_check;
+	&preparation;
+	&print_message;
+	&quoted_merge_translations($QUOTEDXML_STYLE_ARG);
+	&finalize;
+} 
+else 
+{
+	&print_help;
+}
+
+exit;
+
+## Sub for printing release information
+sub print_version
+{
+    print <<_EOF_;
+${PROGRAM} (${PACKAGE}) ${VERSION}
+Written by Maciej Stachowiak, Darin Adler and Kenneth Christiansen.
+
+Copyright (C) 2000-2003 Free Software Foundation, Inc.
+Copyright (C) 2000-2001 Eazel, Inc.
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+_EOF_
+    exit;
+}
+
+## Sub for printing usage information
+sub print_help
+{
+    print <<_EOF_;
+Usage: ${PROGRAM} [OPTION]... PO_DIRECTORY FILENAME OUTPUT_FILE
+Generates an output file that includes some localized attributes from an
+untranslated source file.
+
+Mandatory options: (exactly one must be specified)
+  -b, --ba-style         includes translations in the bonobo-activation style
+  -d, --desktop-style    includes translations in the desktop style
+  -k, --keys-style       includes translations in the keys style
+  -s, --schemas-style    includes translations in the schemas style
+  -r, --rfc822deb-style  includes translations in the RFC822 style
+      --quoted-style     includes translations in the quoted string style
+      --quotedxml-style  includes translations in the quoted xml string style
+  -x, --xml-style        includes translations in the standard xml style
+
+Other options:
+  -u, --utf8             convert all strings to UTF-8 before merging 
+                         (default for everything except RFC822 style)
+  -p, --pass-through     deprecated, does nothing and issues a warning
+  -m, --multiple-output  output one localized file per locale, instead of 
+	                 a single file containing all localized elements
+  -c, --cache=FILE       specify cache file name
+                         (usually \$top_builddir/po/.intltool-merge-cache)
+  -q, --quiet            suppress most messages
+      --help             display this help and exit
+      --version          output version information and exit
+
+Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE")
+or send email to <xml-i18n-tools\@gnome.org>.
+_EOF_
+    exit;
+}
+
+
+## Sub for printing error messages
+sub print_error
+{
+    print STDERR "Try `${PROGRAM} --help' for more information.\n";
+    exit;
+}
+
+
+sub print_message 
+{
+    print "Merging translations into $OUTFILE.\n" unless $QUIET_ARG;
+}
+
+
+sub preparation 
+{
+    $PO_DIR = $ARGV[0];
+    $FILE = $ARGV[1];
+    $OUTFILE = $ARGV[2];
+
+    &gather_po_files;
+    &get_translation_database;
+}
+
+# General-purpose code for looking up translations in .po files
+
+sub po_file2lang
+{
+    my ($tmp) = @_; 
+    $tmp =~ s/^.*\/(.*)\.po$/$1/; 
+    return $tmp; 
+}
+
+sub gather_po_files
+{
+    if (my $linguas = $ENV{"LINGUAS"})
+    {
+        for my $lang (split / /, $linguas) {
+            my $po_file = $PO_DIR . "/" . $lang . ".po";
+            if (-e $po_file) {
+                $po_files_by_lang{$lang} = $po_file;
+            }
+        }
+    }
+    else
+    {
+        if (open LINGUAS_FILE, "$PO_DIR/LINGUAS")
+        {
+            while (<LINGUAS_FILE>)
+            {
+                next if /^#/;
+
+                for my $lang (split)
+                {
+                    chomp ($lang);
+                    my $po_file = $PO_DIR . "/" . $lang . ".po";
+                    if (-e $po_file) {
+                        $po_files_by_lang{$lang} = $po_file;
+                    }
+                }
+            }
+
+            close LINGUAS_FILE;
+        }
+        else
+        {
+            for my $po_file (glob "$PO_DIR/*.po") {
+                $po_files_by_lang{po_file2lang($po_file)} = $po_file;
+            }
+        }
+    }
+}
+
+sub get_local_charset
+{
+    my ($encoding) = @_;
+    my $alias_file = $ENV{"G_CHARSET_ALIAS"} || "@INTLTOOL_LIBDIR@/charset.alias";
+
+    # seek character encoding aliases in charset.alias (glib)
+
+    if (open CHARSET_ALIAS, $alias_file) 
+    {
+	while (<CHARSET_ALIAS>) 
+        {
+            next if /^\#/;
+            return $1 if (/^\s*([-._a-zA-Z0-9]+)\s+$encoding\b/i)
+        }
+
+        close CHARSET_ALIAS;
+    }
+
+    # if not found, return input string
+
+    return $encoding;
+}
+
+sub get_po_encoding
+{
+    my ($in_po_file) = @_;
+    my $encoding = "";
+
+    open IN_PO_FILE, $in_po_file or die;
+    while (<IN_PO_FILE>) 
+    {
+        ## example: "Content-Type: text/plain; charset=ISO-8859-1\n"
+        if (/Content-Type\:.*charset=([-a-zA-Z0-9]+)\\n/) 
+        {
+            $encoding = $1; 
+            last;
+        }
+    }
+    close IN_PO_FILE;
+
+    if (!$encoding) 
+    {
+        print STDERR "Warning: no encoding found in $in_po_file. Assuming ISO-8859-1\n" unless $QUIET_ARG;
+        $encoding = "ISO-8859-1";
+    }
+
+    system ("$iconv -f $encoding -t UTF-8 <$devnull 2>$devnull");
+    if ($?) {
+	$encoding = get_local_charset($encoding);
+    }
+
+    return $encoding
+}
+
+sub utf8_sanity_check 
+{
+    print STDERR "Warning: option --pass-through has been removed.\n" if $PASS_THROUGH_ARG;
+    $UTF8_ARG = 1;
+}
+
+sub get_translation_database
+{
+    if ($cache_file) {
+	&get_cached_translation_database;
+    } else {
+        &create_translation_database;
+    }
+}
+
+sub get_newest_po_age
+{
+    my $newest_age;
+
+    foreach my $file (values %po_files_by_lang) 
+    {
+	my $file_age = -M $file;
+	$newest_age = $file_age if !$newest_age || $file_age < $newest_age;
+    }
+
+    $newest_age = 0 if !$newest_age;
+
+    return $newest_age;
+}
+
+sub create_cache
+{
+    print "Generating and caching the translation database\n" unless $QUIET_ARG;
+
+    &create_translation_database;
+
+    open CACHE, ">$cache_file" || die;
+    print CACHE join "\x01", %translations;
+    close CACHE;
+}
+
+sub load_cache 
+{
+    print "Found cached translation database\n" unless $QUIET_ARG;
+
+    my $contents;
+    open CACHE, "<$cache_file" || die;
+    {
+        local $/;
+        $contents = <CACHE>;
+    }
+    close CACHE;
+    %translations = split "\x01", $contents;
+}
+
+sub get_cached_translation_database
+{
+    my $cache_file_age = -M $cache_file;
+    if (defined $cache_file_age) 
+    {
+        if ($cache_file_age <= &get_newest_po_age) 
+        {
+            &load_cache;
+            return;
+        }
+        print "Found too-old cached translation database\n" unless $QUIET_ARG;
+    }
+
+    &create_cache;
+}
+
+sub create_translation_database
+{
+    for my $lang (keys %po_files_by_lang) 
+    {
+    	my $po_file = $po_files_by_lang{$lang};
+
+        if ($UTF8_ARG) 
+        {
+            my $encoding = get_po_encoding ($po_file);
+
+            if (lc $encoding eq "utf-8") 
+            {
+                open PO_FILE, "<$po_file";	
+            } 
+            else 
+            {
+		print "NOTICE: $po_file is not in UTF-8 but $encoding, converting...\n" unless $QUIET_ARG;;
+
+                open PO_FILE, "$iconv -f $encoding -t UTF-8 $po_file|";	
+            }
+        } 
+        else 
+        {
+            open PO_FILE, "<$po_file";	
+        }
+
+	my $nextfuzzy = 0;
+	my $inmsgid = 0;
+	my $inmsgstr = 0;
+	my $msgid = "";
+	my $msgstr = "";
+
+        while (<PO_FILE>) 
+        {
+	    $nextfuzzy = 1 if /^#, fuzzy/;
+       
+	    if (/^msgid "((\\.|[^\\]+)*)"/ ) 
+            {
+		$translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr;
+		$msgid = "";
+		$msgstr = "";
+
+		if ($nextfuzzy) {
+		    $inmsgid = 0;
+		} else {
+		    $msgid = unescape_po_string($1);
+		    $inmsgid = 1;
+		}
+		$inmsgstr = 0;
+		$nextfuzzy = 0;
+	    }
+
+	    if (/^msgstr "((\\.|[^\\]+)*)"/) 
+            {
+	        $msgstr = unescape_po_string($1);
+		$inmsgstr = 1;
+		$inmsgid = 0;
+	    }
+
+	    if (/^"((\\.|[^\\]+)*)"/) 
+            {
+	        $msgid .= unescape_po_string($1) if $inmsgid;
+	        $msgstr .= unescape_po_string($1) if $inmsgstr;
+	    }
+	}
+	$translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr;
+    }
+}
+
+sub finalize
+{
+}
+
+sub unescape_one_sequence
+{
+    my ($sequence) = @_;
+
+    return "\\" if $sequence eq "\\\\";
+    return "\"" if $sequence eq "\\\"";
+    return "\n" if $sequence eq "\\n";
+    return "\r" if $sequence eq "\\r";
+    return "\t" if $sequence eq "\\t";
+    return "\b" if $sequence eq "\\b";
+    return "\f" if $sequence eq "\\f";
+    return "\a" if $sequence eq "\\a";
+    return chr(11) if $sequence eq "\\v"; # vertical tab, see ascii(7)
+
+    return chr(hex($1)) if ($sequence =~ /\\x([0-9a-fA-F]{2})/);
+    return chr(oct($1)) if ($sequence =~ /\\([0-7]{3})/);
+
+    # FIXME: Is \0 supported as well? Kenneth and Rodney don't want it, see bug #48489
+
+    return $sequence;
+}
+
+sub unescape_po_string
+{
+    my ($string) = @_;
+
+    $string =~ s/(\\x[0-9a-fA-F]{2}|\\[0-7]{3}|\\.)/unescape_one_sequence($1)/eg;
+
+    return $string;
+}
+
+sub entity_decode
+{
+    local ($_) = @_;
+
+    s/&apos;/'/g; # '
+    s/&quot;/"/g; # "
+    s/&lt;/</g;
+    s/&gt;/>/g;
+    s/&amp;/&/g;
+
+    return $_;
+}
+ 
+# entity_encode: (string)
+#
+# Encode the given string to XML format (encode '<' etc).
+
+sub entity_encode
+{
+    my ($pre_encoded) = @_;
+
+    my @list_of_chars = unpack ('C*', $pre_encoded);
+
+    # with UTF-8 we only encode minimalistic
+    return join ('', map (&entity_encode_int_minimalist, @list_of_chars));
+}
+
+sub entity_encode_int_minimalist
+{
+    return "&quot;" if $_ == 34;
+    return "&amp;" if $_ == 38;
+    return "&apos;" if $_ == 39;
+    return "&lt;" if $_ == 60;
+    return "&gt;" if $_ == 62;
+    return chr $_;
+}
+
+sub entity_encoded_translation
+{
+    my ($lang, $string) = @_;
+
+    my $translation = $translations{$lang, $string};
+    return $string if !$translation;
+    return entity_encode ($translation);
+}
+
+## XML (bonobo-activation specific) merge code
+
+sub ba_merge_translations
+{
+    my $source;
+
+    {
+       local $/; # slurp mode
+       open INPUT, "<$FILE" or die "can't open $FILE: $!";
+       $source = <INPUT>;
+       close INPUT;
+    }
+
+    open OUTPUT, ">$OUTFILE" or die "can't open $OUTFILE: $!";
+    # Binmode so that selftest works ok if using a native Win32 Perl...
+    binmode (OUTPUT) if $^O eq 'MSWin32';
+
+    while ($source =~ s|^(.*?)([ \t]*<\s*$w+\s+($w+\s*=\s*"$q"\s*)+/?>)([ \t]*\n)?||s) 
+    {
+        print OUTPUT $1;
+
+        my $node = $2 . "\n";
+
+        my @strings = ();
+        $_ = $node;
+	while (s/(\s)_($w+\s*=\s*"($q)")/$1$2/s) {
+             push @strings, entity_decode($3);
+        }
+	print OUTPUT;
+
+	my %langs;
+	for my $string (@strings) 
+        {
+	    for my $lang (keys %po_files_by_lang) 
+            {
+                $langs{$lang} = 1 if $translations{$lang, $string};
+	    }
+	}
+	
+	for my $lang (sort keys %langs) 
+        {
+	    $_ = $node;
+	    s/(\sname\s*=\s*)"($q)"/$1"$2-$lang"/s;
+	    s/(\s)_($w+\s*=\s*")($q)"/$1 . $2 . entity_encoded_translation($lang, $3) . '"'/seg;
+	    print OUTPUT;
+        }
+    }
+
+    print OUTPUT $source;
+
+    close OUTPUT;
+}
+
+
+## XML (non-bonobo-activation) merge code
+
+
+# Process tag attributes
+#   Only parameter is a HASH containing attributes -> values mapping
+sub getAttributeString
+{
+    my $sub = shift;
+    my $do_translate = shift || 0;
+    my $language = shift || "";
+    my $result = "";
+    my $translate = shift;
+    foreach my $e (reverse(sort(keys %{ $sub }))) {
+	my $key    = $e;
+	my $string = $sub->{$e};
+	my $quote = '"';
+	
+	$string =~ s/^[\s]+//;
+	$string =~ s/[\s]+$//;
+	
+	if ($string =~ /^'.*'$/)
+	{
+	    $quote = "'";
+	}
+	$string =~ s/^['"]//g;
+	$string =~ s/['"]$//g;
+
+	if ($do_translate && $key =~ /^_/) {
+	    $key =~ s|^_||g;
+	    if ($language) {
+		# Handle translation
+		my $decode_string = entity_decode($string);
+		my $translation = $translations{$language, $decode_string};
+		if ($translation) {
+		    $translation = entity_encode($translation);
+		    $string = $translation;
+                }
+                $$translate = 2;
+            } else {
+                 $$translate = 2 if ($translate && (!$$translate)); # watch not to "overwrite" $translate
+            }
+	}
+	
+	$result .= " $key=$quote$string$quote";
+    }
+    return $result;
+}
+
+# Returns a translatable string from XML node, it works on contents of every node in XML::Parser tree
+sub getXMLstring
+{
+    my $ref = shift;
+    my $spacepreserve = shift || 0;
+    my @list = @{ $ref };
+    my $result = "";
+
+    my $count = scalar(@list);
+    my $attrs = $list[0];
+    my $index = 1;
+
+    $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
+    $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/));
+
+    while ($index < $count) {
+	my $type = $list[$index];
+	my $content = $list[$index+1];
+        if (! $type ) {
+	    # We've got CDATA
+	    if ($content) {
+		# lets strip the whitespace here, and *ONLY* here
+                $content =~ s/\s+/ /gs if (!$spacepreserve);
+		$result .= $content;
+	    }
+	} elsif ( "$type" ne "1" ) {
+	    # We've got another element
+	    $result .= "<$type";
+	    $result .= getAttributeString(@{$content}[0], 0); # no nested translatable elements
+	    if ($content) {
+		my $subresult = getXMLstring($content, $spacepreserve);
+		if ($subresult) {
+		    $result .= ">".$subresult . "</$type>";
+		} else {
+		    $result .= "/>";
+		}
+	    } else {
+		$result .= "/>";
+	    }
+	}
+	$index += 2;
+    }
+    return $result;
+}
+
+# Translate list of nodes if necessary
+sub translate_subnodes
+{
+    my $fh = shift;
+    my $content = shift;
+    my $language = shift || "";
+    my $singlelang = shift || 0;
+    my $spacepreserve = shift || 0;
+
+    my @nodes = @{ $content };
+
+    my $count = scalar(@nodes);
+    my $index = 0;
+    while ($index < $count) {
+        my $type = $nodes[$index];
+        my $rest = $nodes[$index+1];
+        if ($singlelang) {
+            my $oldMO = $MULTIPLE_OUTPUT;
+            $MULTIPLE_OUTPUT = 1;
+            traverse($fh, $type, $rest, $language, $spacepreserve);
+            $MULTIPLE_OUTPUT = $oldMO;
+        } else {
+            traverse($fh, $type, $rest, $language, $spacepreserve);
+        }
+        $index += 2;
+    }
+}
+
+sub isWellFormedXmlFragment
+{
+    my $ret = eval 'require XML::Parser';
+    if(!$ret) {
+        die "You must have XML::Parser installed to run $0\n\n";
+    } 
+
+    my $fragment = shift;
+    return 0 if (!$fragment);
+
+    $fragment = "<root>$fragment</root>";
+    my $xp = new XML::Parser(Style => 'Tree');
+    my $tree = 0;
+    eval { $tree = $xp->parse($fragment); };
+    return $tree;
+}
+
+sub traverse
+{
+    my $fh = shift; 
+    my $nodename = shift;
+    my $content = shift;
+    my $language = shift || "";
+    my $spacepreserve = shift || 0;
+
+    if (!$nodename) {
+	if ($content =~ /^[\s]*$/) {
+	    $leading_space .= $content;
+	}
+	print $fh $content;
+    } else {
+	# element
+	my @all = @{ $content };
+	my $attrs = shift @all;
+	my $translate = 0;
+	my $outattr = getAttributeString($attrs, 1, $language, \$translate);
+
+	if ($nodename =~ /^_/) {
+	    $translate = 1;
+	    $nodename =~ s/^_//;
+	}
+	my $lookup = '';
+
+        $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/));
+        $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
+
+	print $fh "<$nodename", $outattr;
+	if ($translate) {
+	    $lookup = getXMLstring($content, $spacepreserve);
+            if (!$spacepreserve) {
+                $lookup =~ s/^\s+//s;
+                $lookup =~ s/\s+$//s;
+            }
+
+	    if ($lookup || $translate == 2) {
+                my $translation = $translations{$language, $lookup} if isWellFormedXmlFragment($translations{$language, $lookup});
+                if ($MULTIPLE_OUTPUT && ($translation || $translate == 2)) {
+                    $translation = $lookup if (!$translation);
+                    print $fh " xml:lang=\"", $language, "\"" if $language;
+                    print $fh ">";
+                    if ($translate == 2) {
+                        translate_subnodes($fh, \@all, $language, 1, $spacepreserve);
+                    } else {
+                        print $fh $translation;
+                    }
+                    print $fh "</$nodename>";
+
+                    return; # this means there will be no same translation with xml:lang="$language"...
+                            # if we want them both, just remove this "return"
+                } else {
+                    print $fh ">";
+                    if ($translate == 2) {
+                        translate_subnodes($fh, \@all, $language, 1, $spacepreserve);
+                    } else {
+                        print $fh $lookup;
+                    }
+                    print $fh "</$nodename>";
+                }
+	    } else {
+		print $fh "/>";
+	    }
+
+	    for my $lang (sort keys %po_files_by_lang) {
+                    if ($MULTIPLE_OUTPUT && $lang ne "$language") {
+                        next;
+                    }
+		    if ($lang) {
+                        # Handle translation
+                        #
+                        my $translate = 0;
+                        my $localattrs = getAttributeString($attrs, 1, $lang, \$translate);
+                        my $translation = $translations{$lang, $lookup} if isWellFormedXmlFragment($translations{$lang, $lookup});
+                        if ($translate && !$translation) {
+                            $translation = $lookup;
+                        }
+
+                        if ($translation || $translate) {
+			    print $fh "\n";
+			    $leading_space =~ s/.*\n//g;
+			    print $fh $leading_space;
+ 			    print $fh "<", $nodename, " xml:lang=\"", $lang, "\"", $localattrs, ">";
+                            if ($translate == 2) {
+                               translate_subnodes($fh, \@all, $lang, 1, $spacepreserve);
+                            } else {
+                                print $fh $translation;
+                            }
+                            print $fh "</$nodename>";
+			}
+                    }
+	    }
+
+	} else {
+	    my $count = scalar(@all);
+	    if ($count > 0) {
+		print $fh ">";
+                my $index = 0;
+                while ($index < $count) {
+                    my $type = $all[$index];
+                    my $rest = $all[$index+1];
+                    traverse($fh, $type, $rest, $language, $spacepreserve);
+                    $index += 2;
+                }
+		print $fh "</$nodename>";
+	    } else {
+		print $fh "/>";
+	    }
+	}
+    }
+}
+
+sub intltool_tree_comment
+{
+    my $expat = shift;
+    my $data  = shift;
+    my $clist = $expat->{Curlist};
+    my $pos   = $#$clist;
+
+    push @$clist, 1 => $data;
+}
+
+sub intltool_tree_cdatastart
+{
+    my $expat    = shift;
+    my $clist = $expat->{Curlist};
+    my $pos   = $#$clist;
+
+    push @$clist, 0 => $expat->original_string();
+}
+
+sub intltool_tree_cdataend
+{
+    my $expat    = shift;
+    my $clist = $expat->{Curlist};
+    my $pos   = $#$clist;
+
+    $clist->[$pos] .= $expat->original_string();
+}
+
+sub intltool_tree_char
+{
+    my $expat = shift;
+    my $text  = shift;
+    my $clist = $expat->{Curlist};
+    my $pos   = $#$clist;
+
+    # Use original_string so that we retain escaped entities
+    # in CDATA sections.
+    #
+    if ($pos > 0 and $clist->[$pos - 1] eq '0') {
+        $clist->[$pos] .= $expat->original_string();
+    } else {
+        push @$clist, 0 => $expat->original_string();
+    }
+}
+
+sub intltool_tree_start
+{
+    my $expat    = shift;
+    my $tag      = shift;
+    my @origlist = ();
+
+    # Use original_string so that we retain escaped entities
+    # in attribute values.  We must convert the string to an
+    # @origlist array to conform to the structure of the Tree
+    # Style.
+    #
+    my @original_array = split /\x/, $expat->original_string();
+    my $source         = $expat->original_string();
+
+    # Remove leading tag.
+    #
+    $source =~ s|^\s*<\s*(\S+)||s;
+
+    # Grab attribute key/value pairs and push onto @origlist array.
+    #
+    while ($source)
+    {
+       if ($source =~ /^\s*([\w:-]+)\s*[=]\s*["]/)
+       {
+           $source =~ s|^\s*([\w:-]+)\s*[=]\s*["]([^"]*)["]||s;
+           push @origlist, $1;
+           push @origlist, '"' . $2 . '"';
+       }
+       elsif ($source =~ /^\s*([\w:-]+)\s*[=]\s*[']/)
+       {
+           $source =~ s|^\s*([\w:-]+)\s*[=]\s*[']([^']*)[']||s;
+           push @origlist, $1;
+           push @origlist, "'" . $2 . "'";
+       }
+       else
+       {
+           last;
+       }
+    }
+
+    my $ol = [ { @origlist } ];
+
+    push @{ $expat->{Lists} }, $expat->{Curlist};
+    push @{ $expat->{Curlist} }, $tag => $ol;
+    $expat->{Curlist} = $ol;
+}
+
+sub readXml
+{
+    my $filename = shift || return;
+    if(!-f $filename) {
+        die "ERROR Cannot find filename: $filename\n";
+    }
+
+    my $ret = eval 'require XML::Parser';
+    if(!$ret) {
+        die "You must have XML::Parser installed to run $0\n\n";
+    } 
+    my $xp = new XML::Parser(Style => 'Tree');
+    $xp->setHandlers(Char => \&intltool_tree_char);
+    $xp->setHandlers(Start => \&intltool_tree_start);
+    $xp->setHandlers(CdataStart => \&intltool_tree_cdatastart);
+    $xp->setHandlers(CdataEnd => \&intltool_tree_cdataend);
+    my $tree = $xp->parsefile($filename);
+
+# <foo><head id="a">Hello <em>there</em></head><bar>Howdy<ref/></bar>do</foo>
+# would be:
+# [foo, [{}, head, [{id => "a"}, 0, "Hello ",  em, [{}, 0, "there"]], bar, [{},
+# 0, "Howdy",  ref, [{}]], 0, "do" ] ]
+
+    return $tree;
+}
+
+sub print_header
+{
+    my $infile = shift;
+    my $fh = shift;
+    my $source;
+
+    if(!-f $infile) {
+        die "ERROR Cannot find filename: $infile\n";
+    }
+
+    print $fh qq{<?xml version="1.0" encoding="UTF-8"?>\n};
+    {
+        local $/;
+        open DOCINPUT, "<${FILE}" or die;
+        $source = <DOCINPUT>;
+        close DOCINPUT;
+    }
+    if ($source =~ /(<!DOCTYPE.*\[.*\]\s*>)/s)
+    {
+        print $fh "$1\n";
+    }
+    elsif ($source =~ /(<!DOCTYPE[^>]*>)/s)
+    {
+        print $fh "$1\n";
+    }
+}
+
+sub parseTree
+{
+    my $fh        = shift;
+    my $ref       = shift;
+    my $language  = shift || "";
+
+    my $name = shift @{ $ref };
+    my $cont = shift @{ $ref };
+    
+    while (!$name || "$name" eq "1") {
+        $name = shift @{ $ref };
+        $cont = shift @{ $ref };
+    }
+
+    my $spacepreserve = 0;
+    my $attrs = @{$cont}[0];
+    $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
+
+    traverse($fh, $name, $cont, $language, $spacepreserve);
+}
+
+sub xml_merge_output
+{
+    my $source;
+
+    if ($MULTIPLE_OUTPUT) {
+        for my $lang (sort keys %po_files_by_lang) {
+	    if ( ! -d $lang ) {
+	        mkdir $lang or -d $lang or die "Cannot create subdirectory $lang: $!\n";
+            }
+            open OUTPUT, ">$lang/$OUTFILE" or die "Cannot open $lang/$OUTFILE: $!\n";
+            binmode (OUTPUT) if $^O eq 'MSWin32';
+            my $tree = readXml($FILE);
+            print_header($FILE, \*OUTPUT);
+            parseTree(\*OUTPUT, $tree, $lang);
+            close OUTPUT;
+            print "CREATED $lang/$OUTFILE\n" unless $QUIET_ARG;
+        }
+        if ( ! -d "C" ) {
+            mkdir "C" or -d "C" or die "Cannot create subdirectory C: $!\n";
+        }
+        open OUTPUT, ">C/$OUTFILE" or die "Cannot open C/$OUTFILE: $!\n";
+        binmode (OUTPUT) if $^O eq 'MSWin32';
+        my $tree = readXml($FILE);
+        print_header($FILE, \*OUTPUT);
+        parseTree(\*OUTPUT, $tree);
+        close OUTPUT;
+        print "CREATED C/$OUTFILE\n" unless $QUIET_ARG;
+    } else {
+        open OUTPUT, ">$OUTFILE" or die "Cannot open $OUTFILE: $!\n";
+        binmode (OUTPUT) if $^O eq 'MSWin32';
+        my $tree = readXml($FILE);
+        print_header($FILE, \*OUTPUT);
+        parseTree(\*OUTPUT, $tree);
+        close OUTPUT;
+        print "CREATED $OUTFILE\n" unless $QUIET_ARG;
+    }
+}
+
+sub keys_merge_translation
+{
+    my ($lang) = @_;
+
+    if ( ! -d $lang && $MULTIPLE_OUTPUT)
+    {
+        mkdir $lang or -d $lang or die "Cannot create subdirectory $lang: $!\n";
+    }
+
+    open INPUT, "<${FILE}" or die "Cannot open ${FILE}: $!\n";
+    open OUTPUT, ">$lang/$OUTFILE" or die "Cannot open $lang/$OUTFILE: $!\n";
+    binmode (OUTPUT) if $^O eq 'MSWin32';
+
+    while (<INPUT>)
+    {
+        if (s/^(\s*)_(\w+=(.*))/$1$2/)
+        {
+            my $string = $3;
+
+            if (!$MULTIPLE_OUTPUT)
+            {
+                print OUTPUT;
+
+                my $non_translated_line = $_;
+
+                for my $lang (sort keys %po_files_by_lang)
+                {
+                    my $translation = $translations{$lang, $string};
+                    next if !$translation;
+
+                    $_ = $non_translated_line;
+                    s/(\w+)=.*/[$lang]$1=$translation/;
+                    print OUTPUT;
+                }
+            }
+            else
+            {
+                my $non_translated_line = $_;
+                my $translation = $translations{$lang, $string};
+                $translation = $string if !$translation;
+
+                $_ = $non_translated_line;
+                s/(\w+)=.*/$1=$translation/;
+                print OUTPUT;
+            }
+        }
+        else
+        {
+            print OUTPUT;
+        }
+    }
+
+    close OUTPUT;
+    close INPUT;
+
+    print "CREATED $lang/$OUTFILE\n" unless $QUIET_ARG;
+}
+
+sub keys_merge_translations
+{
+    if ($MULTIPLE_OUTPUT)
+    {
+        for my $lang (sort keys %po_files_by_lang)
+        {
+            keys_merge_translation ($lang);
+        }
+        keys_merge_translation ("C");
+    }
+    else
+    {
+        keys_merge_translation (".");
+    }
+}
+
+sub desktop_merge_translations
+{
+    open INPUT, "<${FILE}" or die;
+    open OUTPUT, ">${OUTFILE}" or die;
+    binmode (OUTPUT) if $^O eq 'MSWin32';
+
+    while (<INPUT>) 
+    {
+        if (s/^(\s*)_(\w+=(.*))/$1$2/)  
+        {
+	    my $string = $3;
+
+            print OUTPUT;
+
+	    my $non_translated_line = $_;
+
+            for my $lang (sort keys %po_files_by_lang) 
+            {
+                my $translation = $translations{$lang, $string};
+                next if !$translation;
+
+                $_ = $non_translated_line;
+                s/(\w+)=.*/${1}[$lang]=$translation/;
+                print OUTPUT;
+            }
+	} 
+        else 
+        {
+            print OUTPUT;
+        }
+    }
+
+    close OUTPUT;
+    close INPUT;
+}
+
+sub schemas_merge_translations
+{
+    my $source;
+
+    {
+       local $/; # slurp mode
+       open INPUT, "<$FILE" or die "can't open $FILE: $!";
+       $source = <INPUT>;
+       close INPUT;
+    }
+
+    open OUTPUT, ">$OUTFILE" or die;
+    binmode (OUTPUT) if $^O eq 'MSWin32';
+
+    # FIXME: support attribute translations
+
+    # Empty nodes never need translation, so unmark all of them.
+    # For example, <_foo/> is just replaced by <foo/>.
+    $source =~ s|<\s*_($w+)\s*/>|<$1/>|g;
+
+    while ($source =~ s/
+                        (.*?)
+                        (\s+)(<locale\ name="C">(\s*)
+                            (<default>\s*(?:<!--[^>]*?-->\s*)?(.*?)\s*<\/default>)?(\s*)
+                            (<short>\s*(?:<!--[^>]*?-->\s*)?(.*?)\s*<\/short>)?(\s*)
+                            (<long>\s*(?:<!--[^>]*?-->\s*)?(.*?)\s*<\/long>)?(\s*)
+                        <\/locale>)
+                       //sx) 
+    {
+        print OUTPUT $1;
+
+	my $locale_start_spaces = $2 ? $2 : '';
+	my $default_spaces = $4 ? $4 : '';
+	my $short_spaces = $7 ? $7 : '';
+	my $long_spaces = $10 ? $10 : '';
+	my $locale_end_spaces = $13 ? $13 : '';
+	my $c_default_block = $3 ? $3 : '';
+	my $default_string = $6 ? $6 : '';
+	my $short_string = $9 ? $9 : '';
+	my $long_string = $12 ? $12 : '';
+
+	print OUTPUT "$locale_start_spaces$c_default_block";
+
+        $default_string =~ s/\s+/ /g;
+        $default_string = entity_decode($default_string);
+	$short_string =~ s/\s+/ /g;
+	$short_string = entity_decode($short_string);
+	$long_string =~ s/\s+/ /g;
+	$long_string = entity_decode($long_string);
+
+	for my $lang (sort keys %po_files_by_lang) 
+        {
+	    my $default_translation = $translations{$lang, $default_string};
+	    my $short_translation = $translations{$lang, $short_string};
+	    my $long_translation  = $translations{$lang, $long_string};
+
+	    next if (!$default_translation && !$short_translation && 
+                     !$long_translation);
+
+	    print OUTPUT "\n$locale_start_spaces<locale name=\"$lang\">";
+
+        print OUTPUT "$default_spaces";    
+
+        if ($default_translation)
+        {
+            $default_translation = entity_encode($default_translation);
+            print OUTPUT "<default>$default_translation</default>";
+        }
+
+	    print OUTPUT "$short_spaces";
+
+	    if ($short_translation)
+	    {
+			$short_translation = entity_encode($short_translation);
+			print OUTPUT "<short>$short_translation</short>";
+	    }
+
+	    print OUTPUT "$long_spaces";
+
+	    if ($long_translation)
+	    {
+			$long_translation = entity_encode($long_translation);
+			print OUTPUT "<long>$long_translation</long>";
+	    }	    
+
+	    print OUTPUT "$locale_end_spaces</locale>";
+        }
+    }
+
+    print OUTPUT $source;
+
+    close OUTPUT;
+}
+
+sub rfc822deb_merge_translations
+{
+    my %encodings = ();
+    for my $lang (keys %po_files_by_lang) {
+        $encodings{$lang} = ($UTF8_ARG ? 'UTF-8' : get_po_encoding($po_files_by_lang{$lang}));
+    }
+
+    my $source;
+
+    $Text::Wrap::huge = 'overflow';
+    $Text::Wrap::break = qr/\n|\s(?=\S)/;
+
+    {
+       local $/; # slurp mode
+       open INPUT, "<$FILE" or die "can't open $FILE: $!";
+       $source = <INPUT>;
+       close INPUT;
+    }
+
+    open OUTPUT, ">${OUTFILE}" or die;
+    binmode (OUTPUT) if $^O eq 'MSWin32';
+
+    while ($source =~ /(^|\n+)(_*)([^:\s]+)(:[ \t]*)(.*?)(?=\n[\S\n]|$)/sg)
+    {
+	    my $sep = $1;
+	    my $non_translated_line = $3.$4;
+	    my $string = $5;
+	    my $underscore = length($2);
+	    next if $underscore eq 0 && $non_translated_line =~ /^#/;
+	    #  Remove [] dummy strings
+	    my $stripped = $string;
+	    $stripped =~ s/\[\s[^\[\]]*\],/,/g if $underscore eq 2;
+	    $stripped =~ s/\[\s[^\[\]]*\]$//;
+	    $non_translated_line .= $stripped;
+
+	    print OUTPUT $sep.$non_translated_line;
+    
+	    if ($underscore) 
+	    {
+	        my @str_list = rfc822deb_split($underscore, $string);
+
+	        for my $lang (sort keys %po_files_by_lang) 
+                {
+                    my $is_translated = 1;
+                    my $str_translated = '';
+                    my $first = 1;
+                
+                    for my $str (@str_list) 
+                    {
+                        my $translation = $translations{$lang, $str};
+                    
+                        if (!$translation) 
+                        {
+                            $is_translated = 0;
+                            last;
+                        }
+
+	                #  $translation may also contain [] dummy
+                        #  strings, mostly to indicate an empty string
+	                $translation =~ s/\[\s[^\[\]]*\]$//;
+                        
+                        if ($first) 
+                        {
+                            if ($underscore eq 2)
+                            {
+                                $str_translated .= $translation;
+                            }
+                            else
+                            {
+                                $str_translated .=
+                                    Text::Tabs::expand($translation) .
+                                    "\n";
+                            }
+                        } 
+                        else 
+                        {
+                            if ($underscore eq 2)
+                            {
+                                $str_translated .= ', ' . $translation;
+                            }
+                            else
+                            {
+                                $str_translated .= Text::Tabs::expand(
+                                    Text::Wrap::wrap(' ', ' ', $translation)) .
+                                    "\n .\n";
+                            }
+                        }
+                        $first = 0;
+
+                        #  To fix some problems with Text::Wrap::wrap
+                        $str_translated =~ s/(\n )+\n/\n .\n/g;
+                    }
+                    next unless $is_translated;
+
+                    $str_translated =~ s/\n \.\n$//;
+                    $str_translated =~ s/\s+$//;
+
+                    $_ = $non_translated_line;
+                    s/^(\w+):\s*.*/$sep${1}-$lang.$encodings{$lang}: $str_translated/s;
+                    print OUTPUT;
+                }
+	    }
+    }
+    print OUTPUT "\n";
+
+    close OUTPUT;
+    close INPUT;
+}
+
+sub rfc822deb_split 
+{
+    # Debian defines a special way to deal with rfc822-style files:
+    # when a value contain newlines, it consists of
+    #   1.  a short form (first line)
+    #   2.  a long description, all lines begin with a space,
+    #       and paragraphs are separated by a single dot on a line
+    # This routine returns an array of all paragraphs, and reformat
+    # them.
+    # When first argument is 2, the string is a comma separated list of
+    # values.
+    my $type = shift;
+    my $text = shift;
+    $text =~ s/^[ \t]//mg;
+    return (split(/, */, $text, 0)) if $type ne 1;
+    return ($text) if $text !~ /\n/;
+
+    $text =~ s/([^\n]*)\n//;
+    my @list = ($1);
+    my $str = '';
+
+    for my $line (split (/\n/, $text)) 
+    {
+        chomp $line;
+        if ($line =~ /^\.\s*$/)
+        {
+            #  New paragraph
+            $str =~ s/\s*$//;
+            push(@list, $str);
+            $str = '';
+        } 
+        elsif ($line =~ /^\s/) 
+        {
+            #  Line which must not be reformatted
+            $str .= "\n" if length ($str) && $str !~ /\n$/;
+            $line =~ s/\s+$//;
+            $str .= $line."\n";
+        } 
+        else 
+        {
+            #  Continuation line, remove newline
+            $str .= " " if length ($str) && $str !~ /\n$/;
+            $str .= $line;
+        }
+    }
+
+    $str =~ s/\s*$//;
+    push(@list, $str) if length ($str);
+
+    return @list;
+}
+
+sub quoted_translation
+{
+    my ($xml_mode, $lang, $string) = @_;
+
+    $string = entity_decode($string) if $xml_mode;
+    $string =~ s/\\\"/\"/g;
+
+    my $translation = $translations{$lang, $string};
+    $translation = $string if !$translation;
+    $translation = entity_encode($translation) if $xml_mode;
+    $translation =~ s/\"/\\\"/g;
+    return $translation
+}
+
+sub quoted_merge_translations
+{
+    my ($xml_mode) = @_;
+
+    if (!$MULTIPLE_OUTPUT) {
+        print "Quoted only supports Multiple Output.\n";
+        exit(1);
+    }
+
+    for my $lang (sort keys %po_files_by_lang) {
+        if ( ! -d $lang ) {
+            mkdir $lang or -d $lang or die "Cannot create subdirectory $lang: $!\n";
+        }
+        open INPUT, "<${FILE}" or die;
+        open OUTPUT, ">$lang/$OUTFILE" or die "Cannot open $lang/$OUTFILE: $!\n";
+        binmode (OUTPUT) if $^O eq 'MSWin32';
+        while (<INPUT>) 
+        {
+            s/\"(([^\"]|\\\")*[^\\\"])\"/"\"" . &quoted_translation($xml_mode, $lang, $1) . "\""/ge;
+            print OUTPUT;
+        }
+        close OUTPUT;
+        close INPUT;
+    }
+}

Added: libgpod/trunk/libgpod/branches/upstream/current/intltool-update.in
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/intltool-update.in	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/intltool-update.in	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,1166 @@
+#!@INTLTOOL_PERL@ -w
+# -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4  -*-
+
+#
+#  The Intltool Message Updater
+#
+#  Copyright (C) 2000-2003 Free Software Foundation.
+#
+#  Intltool is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License 
+#  version 2 published by the Free Software Foundation.
+#
+#  Intltool 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.
+#
+#  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.
+#
+#  Authors: Kenneth Christiansen <kenneth at gnu.org>
+#           Maciej Stachowiak
+#           Darin Adler <darin at bentspoon.com>
+
+## Release information
+my $PROGRAM = "intltool-update";
+my $VERSION = "0.37.1";
+my $PACKAGE = "intltool";
+
+## Loaded modules
+use strict;
+use Getopt::Long;
+use Cwd;
+use File::Copy;
+use File::Find;
+
+## Scalars used by the option stuff
+my $HELP_ARG 	   = 0;
+my $VERSION_ARG    = 0;
+my $DIST_ARG	   = 0;
+my $POT_ARG	   = 0;
+my $HEADERS_ARG    = 0;
+my $MAINTAIN_ARG   = 0;
+my $REPORT_ARG     = 0;
+my $VERBOSE	   = 0;
+my $GETTEXT_PACKAGE = "";
+my $OUTPUT_FILE    = "";
+
+my @languages;
+my %varhash = ();
+my %po_files_by_lang = ();
+
+# Regular expressions to categorize file types.
+# FIXME: Please check if the following is correct
+
+my $xml_support =
+"xml(?:\\.in)*|".	# http://www.w3.org/XML/ (Note: .in is not required)
+"ui|".			# Bonobo specific - User Interface desc. files
+"lang|".		# ?
+"glade2?(?:\\.in)*|".	# Glade specific - User Interface desc. files (Note: .in is not required)
+"scm(?:\\.in)*|".	# ? (Note: .in is not required)
+"oaf(?:\\.in)+|".	# DEPRECATED: Replaces by Bonobo .server files 
+"etspec|".		# ?
+"server(?:\\.in)+|".	# Bonobo specific
+"sheet(?:\\.in)+|".	# ?
+"schemas(?:\\.in)+|".	# GConf specific
+"pong(?:\\.in)+|".	# DEPRECATED: PONG is not used [by GNOME] any longer.
+"kbd(?:\\.in)+|".	# GOK specific. 
+"policy(?:\\.in)+";	# PolicyKit files
+
+my $ini_support =
+"icon(?:\\.in)+|".	# http://www.freedesktop.org/Standards/icon-theme-spec
+"desktop(?:\\.in)+|".	# http://www.freedesktop.org/Standards/menu-spec
+"caves(?:\\.in)+|".	# GNOME Games specific
+"directory(?:\\.in)+|".	# http://www.freedesktop.org/Standards/menu-spec
+"soundlist(?:\\.in)+|".	# GNOME specific
+"keys(?:\\.in)+|".	# GNOME Mime database specific
+"theme(?:\\.in)+|".	# http://www.freedesktop.org/Standards/icon-theme-spec
+"service(?:\\.in)+";    # DBus specific
+
+my $buildin_gettext_support = 
+"c|y|cs|cc|cpp|c\\+\\+|h|hh|gob|py";
+
+## Always flush buffer when printing
+$| = 1;
+
+## Sometimes the source tree will be rooted somewhere else.
+my $SRCDIR = $ENV{"srcdir"} || ".";
+my $POTFILES_in;
+
+$POTFILES_in = "<$SRCDIR/POTFILES.in";
+
+my $devnull = ($^O eq 'MSWin32' ? 'NUL:' : '/dev/null');
+
+## Handle options
+GetOptions 
+(
+ "help" 	       => \$HELP_ARG,
+ "version" 	       => \$VERSION_ARG,
+ "dist|d"	       => \$DIST_ARG,
+ "pot|p"	       => \$POT_ARG,
+ "headers|s"	       => \$HEADERS_ARG,
+ "maintain|m"	       => \$MAINTAIN_ARG,
+ "report|r"	       => \$REPORT_ARG,
+ "verbose|x"	       => \$VERBOSE,
+ "gettext-package|g=s" => \$GETTEXT_PACKAGE,
+ "output-file|o=s"     => \$OUTPUT_FILE,
+ ) or &Console_WriteError_InvalidOption;
+
+&Console_Write_IntltoolHelp if $HELP_ARG;
+&Console_Write_IntltoolVersion if $VERSION_ARG;
+
+my $arg_count = ($DIST_ARG > 0)
+    + ($POT_ARG > 0)
+    + ($HEADERS_ARG > 0)
+    + ($MAINTAIN_ARG > 0)
+    + ($REPORT_ARG > 0);
+
+&Console_Write_IntltoolHelp if $arg_count > 1;
+
+my $PKGNAME = FindPackageName ();
+
+# --version and --help don't require a module name
+my $MODULE = $GETTEXT_PACKAGE || $PKGNAME || "unknown";
+
+if ($POT_ARG)
+{
+    &GenerateHeaders;
+    &GeneratePOTemplate;
+}
+elsif ($HEADERS_ARG)
+{
+    &GenerateHeaders;
+}
+elsif ($MAINTAIN_ARG)
+{
+    &FindLeftoutFiles;
+}
+elsif ($REPORT_ARG)
+{
+    &GenerateHeaders;
+    &GeneratePOTemplate;
+    &Console_Write_CoverageReport;
+}
+elsif ((defined $ARGV[0]) && $ARGV[0] =~ /^[a-z]/)
+{
+    my $lang = $ARGV[0];
+
+    ## Report error if the language file supplied
+    ## to the command line is non-existent
+    &Console_WriteError_NotExisting("$SRCDIR/$lang.po")
+        if ! -s "$SRCDIR/$lang.po";
+
+    if (!$DIST_ARG)
+    {
+	print "Working, please wait..." if $VERBOSE;
+	&GenerateHeaders;
+	&GeneratePOTemplate;
+    }
+    &POFile_Update ($lang, $OUTPUT_FILE);
+    &Console_Write_TranslationStatus ($lang, $OUTPUT_FILE);
+} 
+else 
+{
+    &Console_Write_IntltoolHelp;
+}
+
+exit;
+
+#########
+
+sub Console_Write_IntltoolVersion
+{
+    print <<_EOF_;
+${PROGRAM} (${PACKAGE}) $VERSION
+Written by Kenneth Christiansen, Maciej Stachowiak, and Darin Adler.
+
+Copyright (C) 2000-2003 Free Software Foundation, Inc.
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+_EOF_
+    exit;
+}
+
+sub Console_Write_IntltoolHelp
+{
+    print <<_EOF_;
+Usage: ${PROGRAM} [OPTION]... LANGCODE
+Updates PO template files and merge them with the translations.
+
+Mode of operation (only one is allowed):
+  -p, --pot                   generate the PO template only
+  -s, --headers               generate the header files in POTFILES.in
+  -m, --maintain              search for left out files from POTFILES.in
+  -r, --report                display a status report for the module
+  -d, --dist                  merge LANGCODE.po with existing PO template
+
+Extra options:
+  -g, --gettext-package=NAME  override PO template name, useful with --pot
+  -o, --output-file=FILE      write merged translation to FILE
+  -x, --verbose               display lots of feedback
+      --help                  display this help and exit
+      --version               output version information and exit
+
+Examples of use:
+${PROGRAM} --pot    just create a new PO template
+${PROGRAM} xy       create new PO template and merge xy.po with it
+
+Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE")
+or send email to <xml-i18n-tools\@gnome.org>.
+_EOF_
+    exit;
+}
+
+sub echo_n
+{
+    my $str = shift;
+    my $ret = `echo "$str"`;
+
+    $ret =~ s/\n$//; # do we need the "s" flag?
+
+    return $ret;
+}
+
+sub POFile_DetermineType ($) 
+{
+   my $type = $_;
+   my $gettext_type;
+
+   my $xml_regex     = "(?:" . $xml_support . ")";
+   my $ini_regex     = "(?:" . $ini_support . ")";
+   my $buildin_regex = "(?:" . $buildin_gettext_support . ")";
+
+   if ($type =~ /\[type: gettext\/([^\]].*)]/) 
+   {
+	$gettext_type=$1;
+   }
+   elsif ($type =~ /schemas(\.in)+$/) 
+   {
+	$gettext_type="schemas";
+   }
+   elsif ($type =~ /glade2?(\.in)*$/) 
+   {
+       $gettext_type="glade";
+   }
+   elsif ($type =~ /scm(\.in)*$/) 
+   {
+       $gettext_type="scheme";
+   }
+   elsif ($type =~ /keys(\.in)+$/) 
+   {
+       $gettext_type="keys";
+   }
+
+   # bucket types
+
+   elsif ($type =~ /$xml_regex$/) 
+   {
+       $gettext_type="xml";
+   }
+   elsif ($type =~ /$ini_regex$/) 
+   { 
+       $gettext_type="ini";
+   }
+   elsif ($type =~ /$buildin_regex$/) 
+   {
+       $gettext_type="buildin";
+   }
+   else
+   { 
+       $gettext_type="unknown"; 
+   }
+
+   return "gettext\/$gettext_type";
+}
+
+sub TextFile_DetermineEncoding ($) 
+{
+    my $gettext_code="ASCII"; # All files are ASCII by default
+    my $filetype=`file $_ | cut -d ' ' -f 2`;
+
+    if ($? eq "0")
+    {
+	if ($filetype =~ /^(ISO|UTF)/)
+	{
+	    chomp ($gettext_code = $filetype);
+	}
+	elsif ($filetype =~ /^XML/)
+	{
+	    $gettext_code="UTF-8"; # We asume that .glade and other .xml files are UTF-8
+	}
+    }
+
+    return $gettext_code;
+}
+
+sub isNotValidMissing
+{
+    my ($file) = @_;
+
+    return if $file =~ /^\{arch\}\/.*$/;
+    return if $file =~ /^$varhash{"PACKAGE"}-$varhash{"VERSION"}\/.*$/;
+}
+
+sub FindLeftoutFiles
+{
+    my (@buf_i18n_plain,
+	@buf_i18n_xml,
+	@buf_i18n_xml_unmarked,
+	@buf_i18n_ini,
+	@buf_potfiles,
+	@buf_potfiles_ignore,
+	@buf_allfiles,
+	@buf_allfiles_sorted,
+	@buf_potfiles_sorted,
+        @buf_potfiles_ignore_sorted
+    );
+
+    ## Search and find all translatable files
+    find sub { 
+	push @buf_i18n_plain,        "$File::Find::name" if /\.($buildin_gettext_support)$/;
+	push @buf_i18n_xml,          "$File::Find::name" if /\.($xml_support)$/;
+	push @buf_i18n_ini,          "$File::Find::name" if /\.($ini_support)$/;
+	push @buf_i18n_xml_unmarked, "$File::Find::name" if /\.(schemas(\.in)+)$/;
+	}, "..";
+    find sub { 
+	push @buf_i18n_plain,        "$File::Find::name" if /\.($buildin_gettext_support)$/;
+	push @buf_i18n_xml,          "$File::Find::name" if /\.($xml_support)$/;
+	push @buf_i18n_ini,          "$File::Find::name" if /\.($ini_support)$/;
+	push @buf_i18n_xml_unmarked, "$File::Find::name" if /\.(schemas(\.in)+)$/;
+	}, "$SRCDIR/.." if "$SRCDIR" ne ".";
+
+    open POTFILES, $POTFILES_in or die "$PROGRAM:  there's no POTFILES.in!\n";
+    @buf_potfiles = grep !/^(#|\s*$)/, <POTFILES>;
+    close POTFILES;
+
+    foreach (@buf_potfiles) {
+	s/^\[.*]\s*//;
+    }
+
+    print "Searching for missing translatable files...\n" if $VERBOSE;
+
+    ## Check if we should ignore some found files, when
+    ## comparing with POTFILES.in
+    foreach my $ignore ("POTFILES.skip", "POTFILES.ignore")
+    {
+	(-s "$SRCDIR/$ignore") or next;
+
+	if ("$ignore" eq "POTFILES.ignore")
+	{
+	    print "The usage of POTFILES.ignore is deprecated. Please consider moving the\n".
+		  "content of this file to POTFILES.skip.\n";
+	}
+
+	print "Found $ignore: Ignoring files...\n" if $VERBOSE;
+	open FILE, "<$SRCDIR/$ignore" or die "ERROR: Failed to open $SRCDIR/$ignore!\n";
+	    
+	while (<FILE>)
+	{
+	    push @buf_potfiles_ignore, $_ unless /^(#|\s*$)/;
+	}
+	close FILE;
+
+	@buf_potfiles_ignore_sorted = sort (@buf_potfiles_ignore);
+    }
+
+    foreach my $file (@buf_i18n_plain)
+    {
+	my $in_comment = 0;
+	my $in_macro = 0;
+
+	open FILE, "<$file";
+	while (<FILE>)
+	{
+	    # Handle continued multi-line comment.
+	    if ($in_comment)
+	    {
+		next unless s-.*\*/--;
+		$in_comment = 0;
+	    }
+
+	    # Handle continued macro.
+	    if ($in_macro)
+	    {
+		$in_macro = 0 unless /\\$/;
+		next;
+	    }
+
+	    # Handle start of macro (or any preprocessor directive).
+	    if (/^\s*\#/)
+	    {
+		$in_macro = 1 if /^([^\\]|\\.)*\\$/;
+		next;
+	    }
+
+	    # Handle comments and quoted text.
+	    while (m-(/\*|//|\'|\")-) # \' and \" keep emacs perl mode happy
+	    {
+		my $match = $1;
+		if ($match eq "/*")
+		{
+		    if (!s-/\*.*?\*/--)
+		    {
+			s-/\*.*--;
+			$in_comment = 1;
+		    }
+		}
+		elsif ($match eq "//")
+		{
+		    s-//.*--;
+		}
+		else # ' or "
+		{
+		    if (!s-$match([^\\]|\\.)*?$match-QUOTEDTEXT-)
+		    {
+			warn "mismatched quotes at line $. in $file\n";
+			s-$match.*--;
+		    }
+		}
+	    }	    
+
+	    if (/\w\.GetString *\(QUOTEDTEXT/)
+	    {
+                if (defined isNotValidMissing (unpack("x3 A*", $file))) {
+                    ## Remove the first 3 chars and add newline
+                    push @buf_allfiles, unpack("x3 A*", $file) . "\n";
+                }
+		last;
+	    }
+
+            ## C_ N_ Q_ and _ are the macros defined in gi8n.h
+	    if (/[CNQ]?_ *\(QUOTEDTEXT/)
+	    {
+                if (defined isNotValidMissing (unpack("x3 A*", $file))) {
+                    ## Remove the first 3 chars and add newline
+                    push @buf_allfiles, unpack("x3 A*", $file) . "\n";
+                }
+		last;
+	    }
+	}
+	close FILE;
+    }
+
+    foreach my $file (@buf_i18n_xml) 
+    {
+	open FILE, "<$file";
+	
+	while (<FILE>) 
+	{
+	    # FIXME: share the pattern matching code with intltool-extract
+	    if (/\s_[-A-Za-z0-9._:]+\s*=\s*\"([^"]+)\"/ || /<_[^>]+>/ || /translatable=\"yes\"/)
+	    {
+                if (defined isNotValidMissing (unpack("x3 A*", $file))) {
+                    push @buf_allfiles, unpack("x3 A*", $file) . "\n";
+                }
+		last;
+	    }
+	}
+	close FILE;
+    }
+
+    foreach my $file (@buf_i18n_ini)
+    {
+	open FILE, "<$file";
+	while (<FILE>) 
+	{
+	    if (/_(.*)=/)
+	    {
+                if (defined isNotValidMissing (unpack("x3 A*", $file))) {
+                    push @buf_allfiles, unpack("x3 A*", $file) . "\n";
+                }
+		last;
+	    }
+	}
+	close FILE;
+    }
+
+    foreach my $file (@buf_i18n_xml_unmarked)
+    {
+        if (defined isNotValidMissing (unpack("x3 A*", $file))) {
+            push @buf_allfiles, unpack("x3 A*", $file) . "\n";
+        }
+    }
+
+
+    @buf_allfiles_sorted = sort (@buf_allfiles);
+    @buf_potfiles_sorted = sort (@buf_potfiles);
+
+    my %in2;
+    foreach (@buf_potfiles_sorted) 
+    {
+        s#^$SRCDIR/../##;
+        s#^$SRCDIR/##;
+	$in2{$_} = 1;
+    }
+
+    foreach (@buf_potfiles_ignore_sorted) 
+    {
+        s#^$SRCDIR/../##;
+        s#^$SRCDIR/##;
+	$in2{$_} = 1;
+    }
+
+    my @result;
+
+    foreach (@buf_allfiles_sorted)
+    {
+        my $dummy = $_;
+        my $srcdir = $SRCDIR;
+
+        $srcdir =~ s#^../##;
+        $dummy =~ s#^$srcdir/../##;
+        $dummy =~ s#^$srcdir/##;
+        $dummy =~ s#_build/##;
+	if (!exists($in2{$dummy}))
+	{
+	    push @result, $dummy
+	}
+    }
+
+    my @buf_potfiles_notexist;
+
+    foreach (@buf_potfiles_sorted)
+    {
+	chomp (my $dummy = $_);
+	if ("$dummy" ne "" and !(-f "$SRCDIR/../$dummy" or -f "../$dummy"))
+	{
+	    push @buf_potfiles_notexist, $_;
+	}
+    }
+
+    ## Save file with information about the files missing
+    ## if any, and give information about this procedure.
+    if (@result + @buf_potfiles_notexist > 0)
+    {
+	if (@result) 
+	{
+	    print "\n" if $VERBOSE;
+	    unlink "missing";
+	    open OUT, ">missing";
+	    print OUT @result;
+	    close OUT;
+	    warn "\e[1mThe following files contain translations and are currently not in use. Please\e[0m\n".
+	         "\e[1mconsider adding these to the POTFILES.in file, located in the po/ directory.\e[0m\n\n";
+	    print STDERR @result, "\n";
+	    warn "If some of these files are left out on purpose then please add them to\n".
+		 "POTFILES.skip instead of POTFILES.in. A file \e[1m'missing'\e[0m containing this list\n".
+		 "of left out files has been written in the current directory.\n";
+	}
+	if (@buf_potfiles_notexist)
+	{
+	    unlink "notexist";
+	    open OUT, ">notexist";
+	    print OUT @buf_potfiles_notexist;
+	    close OUT;
+	    warn "\n" if ($VERBOSE or @result);
+	    warn "\e[1mThe following files do not exist anymore:\e[0m\n\n";
+	    warn @buf_potfiles_notexist, "\n";
+	    warn "Please remove them from POTFILES.in. A file \e[1m'notexist'\e[0m\n".
+		 "containing this list of absent files has been written in the current directory.\n";
+	}
+    }
+
+    ## If there is nothing to complain about, notify the user
+    else {
+	print "\nAll files containing translations are present in POTFILES.in.\n" if $VERBOSE;
+    }
+}
+
+sub Console_WriteError_InvalidOption
+{
+    ## Handle invalid arguments
+    print STDERR "Try `${PROGRAM} --help' for more information.\n";
+    exit 1;
+}
+
+sub isProgramInPath
+{
+    my ($file) = @_;
+    # If either a file exists, or when run it returns 0 exit status
+    return 1 if ((-x $file) or (system("$file --version >$devnull") == 0));
+    return 0;
+}
+
+sub isGNUGettextTool
+{
+    my ($file) = @_;
+    # Check that we are using GNU gettext tools
+    if (isProgramInPath ($file))
+    {
+        my $version = `$file --version`;
+        return 1 if ($version =~ m/.*\(GNU .*\).*/);
+    }
+    return 0;
+}
+
+sub GenerateHeaders
+{
+    my $EXTRACT = $ENV{"INTLTOOL_EXTRACT"} || "intltool-extract";
+
+    ## Generate the .h header files, so we can allow glade and
+    ## xml translation support
+    if (! isProgramInPath ("$EXTRACT"))
+    {
+	print STDERR "\n *** The intltool-extract script wasn't found!"
+	     ."\n *** Without it, intltool-update can not generate files.\n";
+	exit;
+    }
+    else
+    {
+	open (FILE, $POTFILES_in) or die "$PROGRAM: POTFILES.in not found.\n";
+	
+	while (<FILE>) 
+	{
+	   chomp;
+	   next if /^\[\s*encoding/;
+
+	   ## Find xml files in POTFILES.in and generate the
+	   ## files with help from the extract script
+
+	   my $gettext_type= &POFile_DetermineType ($1);
+
+	   if (/\.($xml_support|$ini_support)$/ || /^\[/)
+	   {
+	       s/^\[[^\[].*]\s*//;
+
+	       my $filename = "../$_";
+
+	       if ($VERBOSE)
+	       {
+		   system ($EXTRACT, "--update", "--srcdir=$SRCDIR",
+			   "--type=$gettext_type", $filename);
+	       } 
+	       else 
+	       {
+	 	   system ($EXTRACT, "--update", "--type=$gettext_type", 
+			   "--srcdir=$SRCDIR", "--quiet", $filename);
+	       }
+	   }
+       }
+       close FILE;
+   }
+}
+
+#
+# Generate .pot file from POTFILES.in
+#
+sub GeneratePOTemplate
+{
+    my $XGETTEXT = $ENV{"XGETTEXT"} || "xgettext";
+    my $XGETTEXT_ARGS = $ENV{"XGETTEXT_ARGS"} || '';
+    chomp $XGETTEXT;
+
+    if (! isGNUGettextTool ("$XGETTEXT"))
+    {
+	print STDERR " *** GNU xgettext is not found on this system!\n".
+		     " *** Without it, intltool-update can not extract strings.\n";
+	exit;
+    }
+
+    print "Building $MODULE.pot...\n" if $VERBOSE;
+
+    open INFILE, $POTFILES_in;
+    unlink "POTFILES.in.temp";
+    open OUTFILE, ">POTFILES.in.temp" or die("Cannot open POTFILES.in.temp for writing");
+
+    my $gettext_support_nonascii = 0;
+
+    # checks for GNU gettext >= 0.12
+    my $dummy = `$XGETTEXT --version --from-code=UTF-8 >$devnull 2>$devnull`;
+    if ($? == 0)
+    {
+	$gettext_support_nonascii = 1;
+    }
+    else
+    {
+	# urge everybody to upgrade gettext
+	print STDERR "WARNING: This version of gettext does not support extracting non-ASCII\n".
+		     "         strings. That means you should install a version of gettext\n".
+		     "         that supports non-ASCII strings (such as GNU gettext >= 0.12),\n".
+		     "         or have to let non-ASCII strings untranslated. (If there is any)\n";
+    }
+
+    my $encoding = "ASCII";
+    my $forced_gettext_code;
+    my @temp_headers;
+    my $encoding_problem_is_reported = 0;
+
+    while (<INFILE>) 
+    {
+	next if (/^#/ or /^\s*$/);
+
+	chomp;
+
+	my $gettext_code;
+
+	if (/^\[\s*encoding:\s*(.*)\s*\]/)
+	{
+	    $forced_gettext_code=$1;
+	}
+	elsif (/\.($xml_support|$ini_support)$/ || /^\[/)
+	{
+	    s/^\[.*]\s*//;
+            print OUTFILE "../$_.h\n";
+	    push @temp_headers, "../$_.h";
+	    $gettext_code = &TextFile_DetermineEncoding ("../$_.h") if ($gettext_support_nonascii and not defined $forced_gettext_code);
+	} 
+	else 
+	{
+            print OUTFILE "$SRCDIR/../$_\n";
+	    $gettext_code = &TextFile_DetermineEncoding ("$SRCDIR/../$_") if ($gettext_support_nonascii and not defined $forced_gettext_code);
+	}
+
+	next if (! $gettext_support_nonascii);
+
+	if (defined $forced_gettext_code)
+	{
+	    $encoding=$forced_gettext_code;
+	}
+	elsif (defined $gettext_code and "$encoding" ne "$gettext_code")
+	{
+	    if ($encoding eq "ASCII")
+	    {
+		$encoding=$gettext_code;
+	    }
+	    elsif ($gettext_code ne "ASCII")
+	    {
+		# Only report once because the message is quite long
+		if (! $encoding_problem_is_reported)
+		{
+		    print STDERR "WARNING: You should use the same file encoding for all your project files,\n".
+				 "         but $PROGRAM thinks that most of the source files are in\n".
+				 "         $encoding encoding, while \"$_\" is (likely) in\n".
+		       		 "         $gettext_code encoding. If you are sure that all translatable strings\n".
+				 "         are in same encoding (say UTF-8), please \e[1m*prepend*\e[0m the following\n".
+				 "         line to POTFILES.in:\n\n".
+				 "                 [encoding: UTF-8]\n\n".
+				 "         and make sure that configure.in/ac checks for $PACKAGE >= 0.27 .\n".
+				 "(such warning message will only be reported once.)\n";
+		    $encoding_problem_is_reported = 1;
+		}
+	    }
+	}
+    }
+
+    close OUTFILE;
+    close INFILE;
+
+    unlink "$MODULE.pot";
+    my @xgettext_argument=("$XGETTEXT",
+			   "--add-comments",
+			   "--directory\=.",
+                           "--default-domain\=$MODULE",
+                           "--flag\=g_strdup_printf:1:c-format",
+                           "--flag\=g_string_printf:2:c-format",
+                           "--flag\=g_string_append_printf:2:c-format",
+                           "--flag\=g_error_new:3:c-format",
+                           "--flag\=g_set_error:4:c-format",
+                           "--flag\=g_markup_printf_escaped:1:c-format",
+                           "--flag\=g_log:3:c-format",
+                           "--flag\=g_print:1:c-format",
+                           "--flag\=g_printerr:1:c-format",
+                           "--flag\=g_printf:1:c-format",
+                           "--flag\=g_fprintf:2:c-format",
+                           "--flag\=g_sprintf:2:c-format",
+                           "--flag\=g_snprintf:3:c-format",
+                           "--flag\=g_scanner_error:2:c-format",
+                           "--flag\=g_scanner_warn:2:c-format",
+			   "--output\=$MODULE\.pot",
+			   "--files-from\=\.\/POTFILES\.in\.temp");
+    my $XGETTEXT_KEYWORDS = &FindPOTKeywords;
+    push @xgettext_argument, $XGETTEXT_KEYWORDS;
+    my $MSGID_BUGS_ADDRESS = &FindMakevarsBugAddress;
+    push @xgettext_argument, "--msgid-bugs-address\=\"$MSGID_BUGS_ADDRESS\"" if $MSGID_BUGS_ADDRESS;
+    push @xgettext_argument, "--from-code\=$encoding" if ($gettext_support_nonascii);
+    push @xgettext_argument, $XGETTEXT_ARGS if $XGETTEXT_ARGS;
+    my $xgettext_command = join ' ', @xgettext_argument;
+
+    # intercept xgettext error message
+    print "Running $xgettext_command\n" if $VERBOSE;
+    my $xgettext_error_msg = `$xgettext_command 2>\&1`;
+    my $command_failed = $?;
+
+    unlink "POTFILES.in.temp";
+
+    print "Removing generated header (.h) files..." if $VERBOSE;
+    unlink foreach (@temp_headers);
+    print "done.\n" if $VERBOSE;
+
+    if (! $command_failed)
+    {
+	if (! -e "$MODULE.pot")
+	{
+	    print "None of the files in POTFILES.in contain strings marked for translation.\n" if $VERBOSE;
+	}
+	else
+	{
+	    print "Wrote $MODULE.pot\n" if $VERBOSE;
+	}
+    }
+    else
+    {
+	if ($xgettext_error_msg =~ /--from-code/)
+	{
+	    # replace non-ASCII error message with a more useful one.
+	    print STDERR "ERROR: xgettext failed to generate PO template file because there is non-ASCII\n".
+			 "       string marked for translation. Please make sure that all strings marked\n".
+			 "       for translation are in uniform encoding (say UTF-8), then \e[1m*prepend*\e[0m the\n".
+			 "       following line to POTFILES.in and rerun $PROGRAM:\n\n".
+			 "           [encoding: UTF-8]\n\n";
+	}
+	else
+	{
+	    print STDERR "$xgettext_error_msg";
+	    if (-e "$MODULE.pot")
+	    {
+		# is this possible?
+		print STDERR "ERROR: xgettext failed but still managed to generate PO template file.\n".
+			     "       Please consult error message above if there is any.\n";
+	    }
+	    else
+	    {
+		print STDERR "ERROR: xgettext failed to generate PO template file. Please consult\n".
+			     "       error message above if there is any.\n";
+	    }
+	}
+	exit (1);
+    }
+}
+
+sub POFile_Update
+{
+    -f "$MODULE.pot" or die "$PROGRAM: $MODULE.pot does not exist.\n";
+
+    my $MSGMERGE = $ENV{"MSGMERGE"} || "msgmerge";
+    my ($lang, $outfile) = @_;
+
+    if (! isGNUGettextTool ("$MSGMERGE"))
+    {
+	print STDERR " *** GNU msgmerge is not found on this system!\n".
+		     " *** Without it, intltool-update can not extract strings.\n";
+	exit;
+    }
+
+    print "Merging $SRCDIR/$lang.po with $MODULE.pot..." if $VERBOSE;
+
+    my $infile = "$SRCDIR/$lang.po";
+    $outfile = "$SRCDIR/$lang.po" if ($outfile eq "");
+
+    # I think msgmerge won't overwrite old file if merge is not successful
+    system ("$MSGMERGE", "-o", $outfile, $infile, "$MODULE.pot");
+}
+
+sub Console_WriteError_NotExisting
+{
+    my ($file) = @_;
+
+    ## Report error if supplied language file is non-existing
+    print STDERR "$PROGRAM: $file does not exist!\n";
+    print STDERR "Try '$PROGRAM --help' for more information.\n";
+    exit;
+}
+
+sub GatherPOFiles
+{
+    my @po_files = glob ("./*.po");
+
+    @languages = map (&POFile_GetLanguage, @po_files);
+
+    foreach my $lang (@languages) 
+    {
+	$po_files_by_lang{$lang} = shift (@po_files);
+    }
+}
+
+sub POFile_GetLanguage ($)
+{
+    s/^(.*\/)?(.+)\.po$/$2/;
+    return $_;
+}
+
+sub Console_Write_TranslationStatus
+{
+    my ($lang, $output_file) = @_;
+    my $MSGFMT = $ENV{"MSGFMT"} || "msgfmt";
+
+    if (! isGNUGettextTool ("$MSGFMT"))
+    {
+	print STDERR " *** GNU msgfmt is not found on this system!\n".
+		     " *** Without it, intltool-update can not extract strings.\n";
+	exit;
+    }
+
+    $output_file = "$SRCDIR/$lang.po" if ($output_file eq "");
+
+    system ("$MSGFMT", "-o", "$devnull", "--verbose", $output_file);
+}
+
+sub Console_Write_CoverageReport
+{
+    my $MSGFMT = $ENV{"MSGFMT"} || "msgfmt";
+
+    if (! isGNUGettextTool ("$MSGFMT"))
+    {
+	print STDERR " *** GNU msgfmt is not found on this system!\n".
+		     " *** Without it, intltool-update can not extract strings.\n";
+	exit;
+    }
+
+    &GatherPOFiles;
+
+    foreach my $lang (@languages) 
+    {
+	print STDERR "$lang: ";
+	&POFile_Update ($lang, "");
+    }
+
+    print STDERR "\n\n * Current translation support in $MODULE \n\n";
+
+    foreach my $lang (@languages)
+    {
+	print STDERR "$lang: ";
+	system ("$MSGFMT", "-o", "$devnull", "--verbose", "$SRCDIR/$lang.po");
+    }
+}
+
+sub SubstituteVariable
+{
+    my ($str) = @_;
+    
+    # always need to rewind file whenever it has been accessed
+    seek (CONF, 0, 0);
+
+    # cache each variable. varhash is global to we can add
+    # variables elsewhere.
+    while (<CONF>)
+    {
+	if (/^(\w+)=(.*)$/)
+	{
+	    ($varhash{$1} = $2) =~  s/^["'](.*)["']$/$1/;
+	}
+    }
+    
+    if ($str =~ /^(.*)\${?([A-Z_]+)}?(.*)$/)
+    {
+	my $rest = $3;
+	my $untouched = $1;
+	my $sub = "";
+        # Ignore recursive definitions of variables
+        $sub = $varhash{$2} if defined $varhash{$2} and $varhash{$2} !~ /\${?$2}?/;
+
+	return SubstituteVariable ("$untouched$sub$rest");
+    }
+    
+    # We're using Perl backticks ` and "echo -n" here in order to 
+    # expand any shell escapes (such as backticks themselves) in every variable
+    return echo_n ($str);
+}
+
+sub CONF_Handle_Open
+{
+    my $base_dirname = getcwd();
+    $base_dirname =~ s at .*/@@;
+
+    my ($conf_in, $src_dir);
+
+    if ($base_dirname =~ /^po(-.+)?$/) 
+    {
+	if (-f "Makevars") 
+	{
+	    my $makefile_source;
+
+	    local (*IN);
+	    open (IN, "<Makevars") || die "can't open Makevars: $!";
+
+	    while (<IN>) 
+	    {
+		if (/^top_builddir[ \t]*=/) 
+		{
+		    $src_dir = $_;
+		    $src_dir =~ s/^top_builddir[ \t]*=[ \t]*([^ \t\n\r]*)/$1/;
+
+		    chomp $src_dir;
+                    if (-f "$src_dir" . "/configure.ac") {
+                        $conf_in = "$src_dir" . "/configure.ac" . "\n";
+                    } else {
+                        $conf_in = "$src_dir" . "/configure.in" . "\n";
+                    }
+		    last;
+		}
+	    }
+	    close IN;
+
+	    $conf_in || die "Cannot find top_builddir in Makevars.";
+	}
+	elsif (-f "$SRCDIR/../configure.ac") 
+	{
+	    $conf_in = "$SRCDIR/../configure.ac";
+	} 
+	elsif (-f "$SRCDIR/../configure.in") 
+	{
+	    $conf_in = "$SRCDIR/../configure.in";
+	} 
+	else 
+	{
+	    my $makefile_source;
+
+	    local (*IN);
+	    open (IN, "<Makefile") || return;
+
+	    while (<IN>) 
+	    {
+		if (/^top_srcdir[ \t]*=/) 
+		{
+		    $src_dir = $_;		    
+		    $src_dir =~ s/^top_srcdir[ \t]*=[ \t]*([^ \t\n\r]*)/$1/;
+
+		    chomp $src_dir;
+		    $conf_in = "$src_dir" . "/configure.in" . "\n";
+
+		    last;
+		}
+	    }
+	    close IN;
+
+	    $conf_in || die "Cannot find top_srcdir in Makefile.";
+	}
+
+	open (CONF, "<$conf_in");
+    }
+    else
+    {
+	print STDERR "$PROGRAM: Unable to proceed.\n" .
+		     "Make sure to run this script inside the po directory.\n";
+	exit;
+    }
+}
+
+sub FindPackageName
+{
+    my $version;
+    my $domain = &FindMakevarsDomain;
+    my $name = $domain || "untitled";
+
+    &CONF_Handle_Open;
+
+    my $conf_source; {
+	local (*IN);
+	open (IN, "<&CONF") || return $name;
+	seek (IN, 0, 0);
+	local $/; # slurp mode
+	$conf_source = <IN>;
+	close IN;
+    }
+
+    # priority for getting package name:
+    # 1. GETTEXT_PACKAGE
+    # 2. first argument of AC_INIT (with >= 2 arguments)
+    # 3. first argument of AM_INIT_AUTOMAKE (with >= 2 argument)
+
+    # /^AM_INIT_AUTOMAKE\([\s\[]*([^,\)\s\]]+)/m 
+    # the \s makes this not work, why?
+    if ($conf_source =~ /^AM_INIT_AUTOMAKE\(([^,\)]+),([^,\)]+)/m)
+    {
+	($name, $version) = ($1, $2);
+	$name    =~ s/[\[\]\s]//g;
+	$version =~ s/[\[\]\s]//g;
+	$varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/);
+	$varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/);
+	$varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/);
+	$varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/);
+    }
+    
+    if ($conf_source =~ /^AC_INIT\(([^,\)]+),([^,\)]+)/m) 
+    {
+	($name, $version) = ($1, $2);
+	$name    =~ s/[\[\]\s]//g;
+	$version =~ s/[\[\]\s]//g;
+	$varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/);
+	$varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/);
+	$varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/);
+	$varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/);
+    }
+
+    # \s makes this not work, why?
+    $name = $1 if $conf_source =~ /^GETTEXT_PACKAGE=\[?([^\n\]]+)/m;
+    
+    # m4 macros AC_PACKAGE_NAME, AC_PACKAGE_VERSION etc. have same value
+    # as corresponding $PACKAGE_NAME, $PACKAGE_VERSION etc. shell variables.
+    $name =~ s/\bAC_PACKAGE_/\$PACKAGE_/g;
+
+    $name = $domain if $domain;
+
+    $name = SubstituteVariable ($name);
+    $name =~ s/^["'](.*)["']$/$1/;
+
+    return $name if $name;
+}
+
+
+sub FindPOTKeywords
+{
+
+    my $keywords = "--keyword\=\_ --keyword\=N\_ --keyword\=U\_ --keyword\=Q\_";
+    my $varname = "XGETTEXT_OPTIONS";
+    my $make_source; {
+	local (*IN);
+	open (IN, "<Makevars") || (open(IN, "<Makefile.in.in") && ($varname = "XGETTEXT_KEYWORDS")) || return $keywords;
+	seek (IN, 0, 0);
+	local $/; # slurp mode
+	$make_source = <IN>;
+	close IN;
+    }
+
+    # unwrap lines split with a trailing \
+    $make_source =~  s/\\ $ \n/ /mxg;
+    $keywords = $1 if $make_source =~ /^$varname[ ]*=\[?([^\n\]]+)/m;
+    
+    return $keywords;
+}
+
+sub FindMakevarsDomain
+{
+
+    my $domain = "";
+    my $makevars_source; { 
+	local (*IN);
+	open (IN, "<Makevars") || return $domain;
+	seek (IN, 0, 0);
+	local $/; # slurp mode
+	$makevars_source = <IN>;
+	close IN;
+    }
+
+    $domain = $1 if $makevars_source =~ /^DOMAIN[ ]*=\[?([^\n\]\$]+)/m;
+    $domain =~ s/^\s+//;
+    $domain =~ s/\s+$//;
+    
+    return $domain;
+}
+
+sub FindMakevarsBugAddress
+{
+
+    my $address = "";
+    my $makevars_source; { 
+	local (*IN);
+	open (IN, "<Makevars") || return undef;
+	seek (IN, 0, 0);
+	local $/; # slurp mode
+	$makevars_source = <IN>;
+	close IN;
+    }
+
+    $address = $1 if $makevars_source =~ /^MSGID_BUGS_ADDRESS[ ]*=\[?([^\n\]\$]+)/m;
+    $address =~ s/^\s+//;
+    $address =~ s/\s+$//;
+    
+    return $address;
+}

Added: libgpod/trunk/libgpod/branches/upstream/current/libgpod-1.0.pc.in
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/libgpod-1.0.pc.in	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/libgpod-1.0.pc.in	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libgpod
+Description: A library to manipulate songs and playlists stored on an ipod
+Version: @VERSION@
+Requires: glib-2.0 >= 2.8.0 gobject-2.0 @GDKPIXBUF_REQ@
+Libs: -L${libdir} -lgpod
+Cflags: -I${includedir}/gpod-1.0

Added: libgpod/trunk/libgpod/branches/upstream/current/ltmain.sh
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/ltmain.sh	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/ltmain.sh	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,6930 @@
+# 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, 2003, 2004, 2005, 2006,
+# 2007  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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+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"
+
+# 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.24
+TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)"
+
+# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Check that we have a working $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, and then maybe $echo will work.
+  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+$*
+EOF
+  exit $EXIT_SUCCESS
+fi
+
+default_mode=
+help="Try \`$progname --help' for more information."
+magic="%%%MAGIC variable%%%"
+mkdir="mkdir"
+mv="mv -f"
+rm="rm -f"
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed="${SED}"' -e 1s/^X//'
+sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+  SP2NL='tr \040 \012'
+  NL2SP='tr \015\012 \040\040'
+  ;;
+ *) # EBCDIC based system
+  SP2NL='tr \100 \n'
+  NL2SP='tr \r\n \100\100'
+  ;;
+esac
+
+# NLS nuisances.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+# We save the old values to restore during execute mode.
+for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+  eval "if test \"\${$lt_var+set}\" = set; then
+	  save_$lt_var=\$$lt_var
+	  $lt_var=C
+	  export $lt_var
+	fi"
+done
+
+# Make sure IFS has a sensible default
+lt_nl='
+'
+IFS=" 	$lt_nl"
+
+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 $EXIT_FAILURE
+fi
+
+# Global variables.
+mode=$default_mode
+nonopt=
+prev=
+prevopt=
+run=
+show="$echo"
+show_help=
+execute_dlfiles=
+duplicate_deps=no
+preserve_args=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
+
+#####################################
+# Shell function definitions:
+# This seems to be the best place for them
+
+# func_mktempdir [string]
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible.  If
+# given, STRING is the basename for that directory.
+func_mktempdir ()
+{
+    my_template="${TMPDIR-/tmp}/${1-$progname}"
+
+    if test "$run" = ":"; then
+      # Return a directory name, but don't create it in dry-run mode
+      my_tmpdir="${my_template}-$$"
+    else
+
+      # If mktemp works, use that first and foremost
+      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+
+      if test ! -d "$my_tmpdir"; then
+	# Failing that, at least try and use $RANDOM to avoid a race
+	my_tmpdir="${my_template}-${RANDOM-0}$$"
+
+	save_mktempdir_umask=`umask`
+	umask 0077
+	$mkdir "$my_tmpdir"
+	umask $save_mktempdir_umask
+      fi
+
+      # If we're not in dry-run mode, bomb out on failure
+      test -d "$my_tmpdir" || {
+        $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
+	exit $EXIT_FAILURE
+      }
+    fi
+
+    $echo "X$my_tmpdir" | $Xsed
+}
+
+
+# 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 /{
+			s,.*,import,
+			p
+			q
+			}
+		}'`
+      case $win32_nmres in
+      import*)  win32_libid_type="x86 archive import";;
+      *)        win32_libid_type="x86 archive static";;
+      esac
+    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
+	    case "$@ " in
+	      " $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_an_archive dir oldlib
+func_extract_an_archive ()
+{
+    f_ex_an_ar_dir="$1"; shift
+    f_ex_an_ar_oldlib="$1"
+
+    $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
+    $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
+    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+     :
+    else
+      $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
+      exit $EXIT_FAILURE
+    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_xlib_u=$my_xlib
+      while :; do
+        case " $extracted_archives " in
+	*" $my_xlib_u "*)
+	  extracted_serial=`expr $extracted_serial + 1`
+	  my_xlib_u=lt$extracted_serial-$my_xlib ;;
+	*) break ;;
+	esac
+      done
+      extracted_archives="$extracted_archives $my_xlib_u"
+      my_xdir="$my_gentop/$my_xlib_u"
+
+      $show "${rm}r $my_xdir"
+      $run ${rm}r "$my_xdir"
+      $show "$mkdir $my_xdir"
+      $run $mkdir "$my_xdir"
+      exit_status=$?
+      if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
+	exit $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=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
+	  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}"
+	      cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+	      func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+	      cd "$darwin_curdir"
+	      $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+	    done # $darwin_arches
+      ## Okay now we have a bunch of thin objects, gotta fatten them up :)
+	    darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| 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}r unfat-$$
+	    cd "$darwin_orig_dir"
+	  else
+	    cd "$darwin_orig_dir"
+ 	    func_extract_an_archive "$my_xdir" "$my_xabs"
+	  fi # $darwin_arches
+	fi # $run
+	;;
+      *)
+        func_extract_an_archive "$my_xdir" "$my_xabs"
+        ;;
+      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\"
+
+disable_libs=no
+
+# Parse our command line options once, thoroughly.
+while test "$#" -gt 0
+do
+  arg="$1"
+  shift
+
+  case $arg in
+  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) optarg= ;;
+  esac
+
+  # If the previous option needs an argument, assign it.
+  if test -n "$prev"; then
+    case $prev in
+    execute_dlfiles)
+      execute_dlfiles="$execute_dlfiles $arg"
+      ;;
+    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 $EXIT_FAILURE
+	;;
+      esac
+
+      case $tagname in
+      CC)
+	# Don't test for the "default" C tag, as we know, it's there, but
+	# not specially marked.
+	;;
+      *)
+	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' < $progpath`"
+	else
+	  $echo "$progname: ignoring unknown tag $tagname" 1>&2
+	fi
+	;;
+      esac
+      ;;
+    *)
+      eval "$prev=\$arg"
+      ;;
+    esac
+
+    prev=
+    prevopt=
+    continue
+  fi
+
+  # Have we seen a non-optional argument yet?
+  case $arg in
+  --help)
+    show_help=yes
+    ;;
+
+  --version)
+    echo "\
+$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
+
+Copyright (C) 2007  Free Software Foundation, Inc.
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+    exit $?
+    ;;
+
+  --config)
+    ${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" < "$progpath"
+    done
+    exit $?
+    ;;
+
+  --debug)
+    $echo "$progname: enabling shell trace mode"
+    set -x
+    preserve_args="$preserve_args $arg"
+    ;;
+
+  --dry-run | -n)
+    run=:
+    ;;
+
+  --features)
+    $echo "host: $host"
+    if test "$build_libtool_libs" = yes; then
+      $echo "enable shared libraries"
+    else
+      $echo "disable shared libraries"
+    fi
+    if test "$build_old_libs" = yes; then
+      $echo "enable static libraries"
+    else
+      $echo "disable static libraries"
+    fi
+    exit $?
+    ;;
+
+  --finish) mode="finish" ;;
+
+  --mode) prevopt="--mode" prev=mode ;;
+  --mode=*) mode="$optarg" ;;
+
+  --preserve-dup-deps) duplicate_deps="yes" ;;
+
+  --quiet | --silent)
+    show=:
+    preserve_args="$preserve_args $arg"
+    ;;
+
+  --tag)
+    prevopt="--tag"
+    prev=tag
+    preserve_args="$preserve_args --tag"
+    ;;
+  --tag=*)
+    set tag "$optarg" ${1+"$@"}
+    shift
+    prev=tag
+    preserve_args="$preserve_args --tag"
+    ;;
+
+  -dlopen)
+    prevopt="-dlopen"
+    prev=execute_dlfiles
+    ;;
+
+  -*)
+    $echo "$modename: unrecognized option \`$arg'" 1>&2
+    $echo "$help" 1>&2
+    exit $EXIT_FAILURE
+    ;;
+
+  *)
+    nonopt="$arg"
+    break
+    ;;
+  esac
+done
+
+if test -n "$prevopt"; then
+  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
+  $echo "$help" 1>&2
+  exit $EXIT_FAILURE
+fi
+
+case $disable_libs in
+no) 
+  ;;
+shared)
+  build_libtool_libs=no
+  build_old_libs=yes
+  ;;
+static)
+  build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+  ;;
+esac
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end.  This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+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 | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
+      mode=link
+      for arg
+      do
+	case $arg in
+	-c)
+	   mode=compile
+	   break
+	   ;;
+	esac
+      done
+      ;;
+    *db | *dbx | *strace | *truss)
+      mode=execute
+      ;;
+    *install*|cp|mv)
+      mode=install
+      ;;
+    *rm)
+      mode=uninstall
+      ;;
+    *)
+      # If we have no mode, but dlfiles were specified, then do execute mode.
+      test -n "$execute_dlfiles" && mode=execute
+
+      # Just use the default operation mode.
+      if test -z "$mode"; then
+	if test -n "$nonopt"; then
+	  $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
+	else
+	  $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
+	fi
+      fi
+      ;;
+    esac
+  fi
+
+  # Only execute mode is allowed to have -dlopen flags.
+  if test -n "$execute_dlfiles" && test "$mode" != execute; then
+    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
+    $echo "$help" 1>&2
+    exit $EXIT_FAILURE
+  fi
+
+  # Change the help message to a mode-specific one.
+  generic_help="$help"
+  help="Try \`$modename --help --mode=$mode' for more information."
+
+  # These modes are in order of execution frequency so that they run quickly.
+  case $mode in
+  # libtool compile mode
+  compile)
+    modename="$modename: compile"
+    # Get the compilation command and the source file.
+    base_compile=
+    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
+    suppress_opt=yes
+    suppress_output=
+    arg_mode=normal
+    libobj=
+    later=
+
+    for arg
+    do
+      case $arg_mode in
+      arg  )
+	# do not "continue".  Instead, add this to base_compile
+	lastarg="$arg"
+	arg_mode=normal
+	;;
+
+      target )
+	libobj="$arg"
+	arg_mode=normal
+	continue
+	;;
+
+      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 | -prefer-pic | -prefer-non-pic)
+	  later="$later $arg"
+	  continue
+	  ;;
+
+	-no-suppress)
+	  suppress_opt=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.
+
+	-Wc,*)
+	  args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
+	  lastarg=
+	  save_ifs="$IFS"; IFS=','
+ 	  for arg in $args; do
+	    IFS="$save_ifs"
+
+	    # 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.
+	  base_compile="$base_compile $lastarg"
+	  continue
+	  ;;
+
+	* )
+	  # Accept the current argument as the source file.
+	  # The previous "srcfile" becomes the current argument.
+	  #
+	  lastarg="$srcfile"
+	  srcfile="$arg"
+	  ;;
+	esac  #  case $arg
+	;;
+      esac    #  case $arg_mode
+
+      # Aesthetically quote the previous argument.
+      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, and some SunOS ksh mistreat backslash-escaping
+      # in scan sets (worked around with variable expansion),
+      # and furthermore cannot handle '|' '&' '(' ')' in scan sets 
+      # at all, so we specify them separately.
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	lastarg="\"$lastarg\""
+	;;
+      esac
+
+      base_compile="$base_compile $lastarg"
+    done # for arg
+
+    case $arg_mode in
+    arg)
+      $echo "$modename: you must specify an argument for -Xcompile"
+      exit $EXIT_FAILURE
+      ;;
+    target)
+      $echo "$modename: you must specify a target with \`-o'" 1>&2
+      exit $EXIT_FAILURE
+      ;;
+    *)
+      # Get the name of the library object.
+      [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
+      ;;
+    esac
+
+    # Recognize several different file suffixes.
+    # If the user specifies -o file.o, it is replaced with file.lo
+    xform='[cCFSifmso]'
+    case $libobj in
+    *.ada) xform=ada ;;
+    *.adb) xform=adb ;;
+    *.ads) xform=ads ;;
+    *.asm) xform=asm ;;
+    *.c++) xform=c++ ;;
+    *.cc) xform=cc ;;
+    *.ii) xform=ii ;;
+    *.class) xform=class ;;
+    *.cpp) xform=cpp ;;
+    *.cxx) xform=cxx ;;
+    *.[fF][09]?) xform=[fF][09]. ;;
+    *.for) xform=for ;;
+    *.java) xform=java ;;
+    *.obj) xform=obj ;;
+    esac
+
+    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
+
+    case $libobj in
+    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
+    *)
+      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
+      exit $EXIT_FAILURE
+      ;;
+    esac
+
+    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
+    done
+
+    qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
+    case $qlibobj in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	qlibobj="\"$qlibobj\"" ;;
+    esac
+    test "X$libobj" != "X$qlibobj" \
+	&& $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' 	&()|`$[]' \
+	&& $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
+    objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+    xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
+    if test "X$xdir" = "X$obj"; then
+      xdir=
+    else
+      xdir=$xdir/
+    fi
+    lobj=${xdir}$objdir/$objname
+
+    if test -z "$base_compile"; then
+      $echo "$modename: you must specify a compilation command" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    # Delete any leftover library objects.
+    if test "$build_old_libs" = yes; then
+      removelist="$obj $lobj $libobj ${libobj}T"
+    else
+      removelist="$lobj $libobj ${libobj}T"
+    fi
+
+    $run $rm $removelist
+    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
+    cygwin* | mingw* | pw32* | os2*)
+      pic_mode=default
+      ;;
+    esac
+    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+      # non-PIC code in shared libraries is not supported
+      pic_mode=default
+    fi
+
+    # Calculate the filename of the output object if compiler does
+    # not support -o with -c
+    if test "$compiler_c_o" = no; 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 $EXIT_FAILURE" 1 2 15
+    else
+      output_obj=
+      need_locks=no
+      lockfile=
+    fi
+
+    # 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 "$progpath" "$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 "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$run $rm $removelist
+	exit $EXIT_FAILURE
+      fi
+      $echo "$srcfile" > "$lockfile"
+    fi
+
+    if test -n "$fix_srcfile_path"; then
+      eval srcfile=\"$fix_srcfile_path\"
+    fi
+    qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
+    case $qsrcfile in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+      qsrcfile="\"$qsrcfile\"" ;;
+    esac
+
+    $run $rm "$libobj" "${libobj}T"
+
+    # Create a libtool object file (analogous to a ".la" file),
+    # but don't create it if we're doing a dry run.
+    test -z "$run" && cat > ${libobj}T <<EOF
+# $libobj - a libtool object file
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+EOF
+
+    # Only build a PIC object if we are building libtool libraries.
+    if test "$build_libtool_libs" = yes; then
+      # Without this assignment, base_compile gets emptied.
+      fbsd_hideous_sh_bug=$base_compile
+
+      if test "$pic_mode" != no; then
+	command="$base_compile $qsrcfile $pic_flag"
+      else
+	# Don't build PIC code
+	command="$base_compile $qsrcfile"
+      fi
+
+      if test ! -d "${xdir}$objdir"; then
+	$show "$mkdir ${xdir}$objdir"
+	$run $mkdir ${xdir}$objdir
+	exit_status=$?
+	if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
+	  exit $exit_status
+	fi
+      fi
+
+      if test -z "$output_obj"; then
+	# Place PIC objects in $objdir
+	command="$command -o $lobj"
+      fi
+
+      $run $rm "$lobj" "$output_obj"
+
+      $show "$command"
+      if $run eval "$command"; then :
+      else
+	test -n "$output_obj" && $run $rm $removelist
+	exit $EXIT_FAILURE
+      fi
+
+      if test "$need_locks" = warn &&
+	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+	$echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$run $rm $removelist
+	exit $EXIT_FAILURE
+      fi
+
+      # Just move the object if needed, then go on to compile the next one
+      if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+	$show "$mv $output_obj $lobj"
+	if $run $mv $output_obj $lobj; then :
+	else
+	  error=$?
+	  $run $rm $removelist
+	  exit $error
+	fi
+      fi
+
+      # Append the name of the PIC object to the libtool object file.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+pic_object='$objdir/$objname'
+
+EOF
+
+      # Allow error messages only from the first compilation.
+      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.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+pic_object=none
+
+EOF
+    fi
+
+    # Only build a position-dependent object if we build old libraries.
+    if test "$build_old_libs" = yes; then
+      if test "$pic_mode" != yes; then
+	# Don't build PIC code
+	command="$base_compile $qsrcfile"
+      else
+	command="$base_compile $qsrcfile $pic_flag"
+      fi
+      if test "$compiler_c_o" = yes; then
+	command="$command -o $obj"
+      fi
+
+      # Suppress compiler output if we already did a PIC compilation.
+      command="$command$suppress_output"
+      $run $rm "$obj" "$output_obj"
+      $show "$command"
+      if $run eval "$command"; then :
+      else
+	$run $rm $removelist
+	exit $EXIT_FAILURE
+      fi
+
+      if test "$need_locks" = warn &&
+	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+	$echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$run $rm $removelist
+	exit $EXIT_FAILURE
+      fi
+
+      # Just move the object if needed
+      if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+	$show "$mv $output_obj $obj"
+	if $run $mv $output_obj $obj; then :
+	else
+	  error=$?
+	  $run $rm $removelist
+	  exit $error
+	fi
+      fi
+
+      # Append the name of the non-PIC object the libtool object file.
+      # Only append if the libtool object file exists.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+# Name of the non-PIC object.
+non_pic_object='$objname'
+
+EOF
+    else
+      # Append the name of the non-PIC object the libtool object file.
+      # Only append if the libtool object file exists.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+# Name of the non-PIC object.
+non_pic_object=none
+
+EOF
+    fi
+
+    $run $mv "${libobj}T" "${libobj}"
+
+    # Unlock the critical section if it was locked
+    if test "$need_locks" != no; then
+      $run $rm "$lockfile"
+    fi
+
+    exit $EXIT_SUCCESS
+    ;;
+
+  # libtool link mode
+  link | relink)
+    modename="$modename: link"
+    case $host in
+    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+      # 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 invocation.
+      # allow_undefined=no
+
+      # FIXME: Unfortunately, there are problems with the above when trying
+      # to make a dll which has undefined symbols, in which case not
+      # even a static library is built.  For now, we need to specify
+      # -no-undefined on the libtool link line when we can be certain
+      # that all symbols are satisfied, otherwise we get a static library.
+      allow_undefined=yes
+      ;;
+    *)
+      allow_undefined=yes
+      ;;
+    esac
+    libtool_args="$nonopt"
+    base_compile="$nonopt $@"
+    compile_command="$nonopt"
+    finalize_command="$nonopt"
+
+    compile_rpath=
+    finalize_rpath=
+    compile_shlibpath=
+    finalize_shlibpath=
+    convenience=
+    old_convenience=
+    deplibs=
+    old_deplibs=
+    compiler_flags=
+    linker_flags=
+    dllsearchpath=
+    lib_search_path=`pwd`
+    inst_prefix_dir=
+
+    avoid_version=no
+    dlfiles=
+    dlprefiles=
+    dlself=no
+    export_dynamic=no
+    export_symbols=
+    export_symbols_regex=
+    generated=
+    libobjs=
+    ltlibs=
+    module=no
+    no_install=no
+    objs=
+    non_pic_objects=
+    notinst_path= # paths that contain not-installed libtool libraries
+    precious_files_regex=
+    prefer_static_libs=no
+    preload=no
+    prev=
+    prevarg=
+    release=
+    rpath=
+    xrpath=
+    perm_rpath=
+    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
+    do
+      case $arg in
+      -all-static | -static | -static-libtool-libs)
+	case $arg in
+	-all-static)
+	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+	    $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
+	  fi
+	  if test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	  prefer_static_libs=yes
+	  ;;
+	-static)
+	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	  prefer_static_libs=built
+	  ;;
+	-static-libtool-libs)
+	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	  prefer_static_libs=yes
+	  ;;
+	esac
+	build_libtool_libs=no
+	build_old_libs=yes
+	break
+	;;
+      esac
+    done
+
+    # See if our shared archives depend on static archives.
+    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+    # Go through the arguments, transforming them on the way.
+    while test "$#" -gt 0; do
+      arg="$1"
+      shift
+      case $arg in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
+	;;
+      *) qarg=$arg ;;
+      esac
+      libtool_args="$libtool_args $qarg"
+
+      # If the previous option needs an argument, assign it.
+      if test -n "$prev"; then
+	case $prev in
+	output)
+	  compile_command="$compile_command @OUTPUT@"
+	  finalize_command="$finalize_command @OUTPUT@"
+	  ;;
+	esac
+
+	case $prev in
+	dlfiles|dlprefiles)
+	  if test "$preload" = no; then
+	    # Add the symbol object into the linking commands.
+	    compile_command="$compile_command @SYMFILE@"
+	    finalize_command="$finalize_command @SYMFILE@"
+	    preload=yes
+	  fi
+	  case $arg in
+	  *.la | *.lo) ;;  # We handle these cases below.
+	  force)
+	    if test "$dlself" = no; then
+	      dlself=needless
+	      export_dynamic=yes
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  self)
+	    if test "$prev" = dlprefiles; then
+	      dlself=yes
+	    elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+	      dlself=yes
+	    else
+	      dlself=needless
+	      export_dynamic=yes
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  *)
+	    if test "$prev" = dlfiles; then
+	      dlfiles="$dlfiles $arg"
+	    else
+	      dlprefiles="$dlprefiles $arg"
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  esac
+	  ;;
+	expsyms)
+	  export_symbols="$arg"
+	  if test ! -f "$arg"; then
+	    $echo "$modename: symbol file \`$arg' does not exist"
+	    exit $EXIT_FAILURE
+	  fi
+	  prev=
+	  continue
+	  ;;
+	expsyms_regex)
+	  export_symbols_regex="$arg"
+	  prev=
+	  continue
+	  ;;
+	inst_prefix)
+	  inst_prefix_dir="$arg"
+	  prev=
+	  continue
+	  ;;
+	precious_regex)
+	  precious_files_regex="$arg"
+	  prev=
+	  continue
+	  ;;
+	release)
+	  release="-$arg"
+	  prev=
+	  continue
+	  ;;
+	objectlist)
+	  if test -f "$arg"; then
+	    save_arg=$arg
+	    moreargs=
+	    for fil in `cat $save_arg`
+	    do
+#	      moreargs="$moreargs $fil"
+	      arg=$fil
+	      # A libtool-controlled object.
+
+	      # Check to see that this really is a libtool object.
+	      if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+		pic_object=
+		non_pic_object=
+
+		# Read the .lo file
+		# If there is no directory component, then add one.
+		case $arg in
+		*/* | *\\*) . $arg ;;
+		*) . ./$arg ;;
+		esac
+
+		if test -z "$pic_object" || \
+		   test -z "$non_pic_object" ||
+		   test "$pic_object" = none && \
+		   test "$non_pic_object" = none; then
+		  $echo "$modename: cannot find name of object for \`$arg'" 1>&2
+		  exit $EXIT_FAILURE
+		fi
+
+		# Extract subdirectory from the argument.
+		xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+		if test "X$xdir" = "X$arg"; then
+		  xdir=
+		else
+		  xdir="$xdir/"
+		fi
+
+		if test "$pic_object" != none; then
+		  # Prepend the subdirectory the object is found in.
+		  pic_object="$xdir$pic_object"
+
+		  if test "$prev" = dlfiles; then
+		    if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+		      dlfiles="$dlfiles $pic_object"
+		      prev=
+		      continue
+		    else
+		      # If libtool objects are unsupported, then we need to preload.
+		      prev=dlprefiles
+		    fi
+		  fi
+
+		  # CHECK ME:  I think I busted this.  -Ossama
+		  if test "$prev" = dlprefiles; then
+		    # Preload the old-style object.
+		    dlprefiles="$dlprefiles $pic_object"
+		    prev=
+		  fi
+
+		  # A PIC object.
+		  libobjs="$libobjs $pic_object"
+		  arg="$pic_object"
+		fi
+
+		# Non-PIC object.
+		if test "$non_pic_object" != none; then
+		  # Prepend the subdirectory the object is found in.
+		  non_pic_object="$xdir$non_pic_object"
+
+		  # A standard non-PIC object
+		  non_pic_objects="$non_pic_objects $non_pic_object"
+		  if test -z "$pic_object" || test "$pic_object" = none ; then
+		    arg="$non_pic_object"
+		  fi
+		else
+		  # If the PIC object exists, use it instead.
+		  # $xdir was prepended to $pic_object above.
+		  non_pic_object="$pic_object"
+		  non_pic_objects="$non_pic_objects $non_pic_object"
+		fi
+	      else
+		# 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 $EXIT_FAILURE
+		else
+		  # Dry-run case.
+
+		  # Extract subdirectory from the argument.
+		  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+		  if test "X$xdir" = "X$arg"; then
+		    xdir=
+		  else
+		    xdir="$xdir/"
+		  fi
+
+		  pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
+		  non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
+		  libobjs="$libobjs $pic_object"
+		  non_pic_objects="$non_pic_objects $non_pic_object"
+		fi
+	      fi
+	    done
+	  else
+	    $echo "$modename: link input file \`$save_arg' does not exist"
+	    exit $EXIT_FAILURE
+	  fi
+	  arg=$save_arg
+	  prev=
+	  continue
+	  ;;
+	rpath | xrpath)
+	  # We need an absolute path.
+	  case $arg in
+	  [\\/]* | [A-Za-z]:[\\/]*) ;;
+	  *)
+	    $echo "$modename: only absolute run-paths are allowed" 1>&2
+	    exit $EXIT_FAILURE
+	    ;;
+	  esac
+	  if test "$prev" = rpath; then
+	    case "$rpath " in
+	    *" $arg "*) ;;
+	    *) rpath="$rpath $arg" ;;
+	    esac
+	  else
+	    case "$xrpath " in
+	    *" $arg "*) ;;
+	    *) xrpath="$xrpath $arg" ;;
+	    esac
+	  fi
+	  prev=
+	  continue
+	  ;;
+	xcompiler)
+	  compiler_flags="$compiler_flags $qarg"
+	  prev=
+	  compile_command="$compile_command $qarg"
+	  finalize_command="$finalize_command $qarg"
+	  continue
+	  ;;
+	xlinker)
+	  linker_flags="$linker_flags $qarg"
+	  compiler_flags="$compiler_flags $wl$qarg"
+	  prev=
+	  compile_command="$compile_command $wl$qarg"
+	  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
+	  ;;
+	darwin_framework|darwin_framework_skip)
+	  test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
+	  compile_command="$compile_command $arg"
+	  finalize_command="$finalize_command $arg"
+	  prev=
+	  continue
+	  ;;
+	*)
+	  eval "$prev=\"\$arg\""
+	  prev=
+	  continue
+	  ;;
+	esac
+      fi # test -n "$prev"
+
+      prevarg="$arg"
+
+      case $arg in
+      -all-static)
+	if test -n "$link_static_flag"; then
+	  compile_command="$compile_command $link_static_flag"
+	  finalize_command="$finalize_command $link_static_flag"
+	fi
+	continue
+	;;
+
+      -allow-undefined)
+	# FIXME: remove this flag sometime in the future.
+	$echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
+	continue
+	;;
+
+      -avoid-version)
+	avoid_version=yes
+	continue
+	;;
+
+      -dlopen)
+	prev=dlfiles
+	continue
+	;;
+
+      -dlpreopen)
+	prev=dlprefiles
+	continue
+	;;
+
+      -export-dynamic)
+	export_dynamic=yes
+	continue
+	;;
+
+      -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 $EXIT_FAILURE
+	fi
+	if test "X$arg" = "X-export-symbols"; then
+	  prev=expsyms
+	else
+	  prev=expsyms_regex
+	fi
+	continue
+	;;
+
+      -framework|-arch|-isysroot)
+	case " $CC " in
+	  *" ${arg} ${1} "* | *" ${arg}	${1} "*) 
+		prev=darwin_framework_skip ;;
+	  *) compiler_flags="$compiler_flags $arg"
+	     prev=darwin_framework ;;
+	esac
+	compile_command="$compile_command $arg"
+	finalize_command="$finalize_command $arg"
+	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]*:*)
+	case $with_gcc/$host in
+	no/*-*-irix* | /*-*-irix*)
+	  compile_command="$compile_command $arg"
+	  finalize_command="$finalize_command $arg"
+	  ;;
+	esac
+	continue
+	;;
+
+      -L*)
+	dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
+	# We need an absolute path.
+	case $dir in
+	[\\/]* | [A-Za-z]:[\\/]*) ;;
+	*)
+	  absdir=`cd "$dir" && pwd`
+	  if test -z "$absdir"; then
+	    $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
+	    absdir="$dir"
+	    notinst_path="$notinst_path $dir"
+	  fi
+	  dir="$absdir"
+	  ;;
+	esac
+	case "$deplibs " in
+	*" -L$dir "*) ;;
+	*)
+	  deplibs="$deplibs -L$dir"
+	  lib_search_path="$lib_search_path $dir"
+	  ;;
+	esac
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+	  testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
+	  case :$dllsearchpath: in
+	  *":$dir:"*) ;;
+	  *) dllsearchpath="$dllsearchpath:$dir";;
+	  esac
+	  case :$dllsearchpath: in
+	  *":$testbindir:"*) ;;
+	  *) dllsearchpath="$dllsearchpath:$testbindir";;
+	  esac
+	  ;;
+	esac
+	continue
+	;;
+
+      -l*)
+	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+	  case $host in
+	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
+	    # These systems don't actually have a C or math library (as such)
+	    continue
+	    ;;
+	  *-*-os2*)
+	    # These systems don't actually have a C library (as such)
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	    # Do not include libc due to us having libc/libc_r.
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-rhapsody* | *-*-darwin1.[012])
+	    # Rhapsody C and math libraries are in the System framework
+	    deplibs="$deplibs -framework System"
+	    continue
+	    ;;
+	  *-*-sco3.2v5* | *-*-sco5v6*)
+	    # Causes problems with __ctype
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+	    # Compiler inserts libc in the correct place for threads to work
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  esac
+	elif test "X$arg" = "X-lc_r"; then
+	 case $host in
+	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	   # Do not include libc_r directly, use -pthread flag.
+	   continue
+	   ;;
+	 esac
+	fi
+	deplibs="$deplibs $arg"
+	continue
+	;;
+
+      # Tru64 UNIX uses -model [arg] to determine the layout of C++
+      # classes, name mangling, and exception handling.
+      -model)
+	compile_command="$compile_command $arg"
+	compiler_flags="$compiler_flags $arg"
+	finalize_command="$finalize_command $arg"
+	prev=xcompiler
+	continue
+	;;
+
+     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+	compiler_flags="$compiler_flags $arg"
+	compile_command="$compile_command $arg"
+	finalize_command="$finalize_command $arg"
+	continue
+	;;
+
+      -module)
+	module=yes
+	continue
+	;;
+
+      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
+      # -r[0-9][0-9]* specifies the processor on the SGI compiler
+      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
+      # +DA*, +DD* enable 64-bit mode on the HP compiler
+      # -q* pass through compiler args for the IBM compiler
+      # -m* pass through architecture-specific compiler args for GCC
+      # -m*, -t[45]*, -txscale* pass through architecture-specific
+      # compiler args for GCC
+      # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+      # -F/path gives path to uninstalled frameworks, gcc on darwin
+      # @file GCC response files
+      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
+
+	# 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"
+        compiler_flags="$compiler_flags $arg"
+        continue
+        ;;
+
+      -shrext)
+	prev=shrext
+	continue
+	;;
+
+      -no-fast-install)
+	fast_install=no
+	continue
+	;;
+
+      -no-install)
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
+	  # The PATH hackery in wrapper scripts is required on Windows
+	  # and Darwin in order for the loader to find any dlls it needs.
+	  $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
+	  $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
+	  fast_install=no
+	  ;;
+	*) no_install=yes ;;
+	esac
+	continue
+	;;
+
+      -no-undefined)
+	allow_undefined=no
+	continue
+	;;
+
+      -objectlist)
+	prev=objectlist
+	continue
+	;;
+
+      -o) prev=output ;;
+
+      -precious-files-regex)
+	prev=precious_regex
+	continue
+	;;
+
+      -release)
+	prev=release
+	continue
+	;;
+
+      -rpath)
+	prev=rpath
+	continue
+	;;
+
+      -R)
+	prev=xrpath
+	continue
+	;;
+
+      -R*)
+	dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
+	# We need an absolute path.
+	case $dir in
+	[\\/]* | [A-Za-z]:[\\/]*) ;;
+	*)
+	  $echo "$modename: only absolute run-paths are allowed" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+	case "$xrpath " in
+	*" $dir "*) ;;
+	*) xrpath="$xrpath $dir" ;;
+	esac
+	continue
+	;;
+
+      -static | -static-libtool-libs)
+	# The effects of -static are defined in a previous loop.
+	# We used to do the same as -all-static on platforms that
+	# didn't have a PIC flag, but the assumption that the effects
+	# would be equivalent was wrong.  It would break on at least
+	# Digital Unix and AIX.
+	continue
+	;;
+
+      -thread-safe)
+	thread_safe=yes
+	continue
+	;;
+
+      -version-info)
+	prev=vinfo
+	continue
+	;;
+      -version-number)
+	prev=vinfo
+	vinfo_number=yes
+	continue
+	;;
+
+      -Wc,*)
+	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
+	arg=
+	save_ifs="$IFS"; IFS=','
+	for flag in $args; do
+	  IFS="$save_ifs"
+	  case $flag in
+	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	    flag="\"$flag\""
+	    ;;
+	  esac
+	  arg="$arg $wl$flag"
+	  compiler_flags="$compiler_flags $flag"
+	done
+	IFS="$save_ifs"
+	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+	;;
+
+      -Wl,*)
+	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
+	arg=
+	save_ifs="$IFS"; IFS=','
+	for flag in $args; do
+	  IFS="$save_ifs"
+	  case $flag in
+	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	    flag="\"$flag\""
+	    ;;
+	  esac
+	  arg="$arg $wl$flag"
+	  compiler_flags="$compiler_flags $wl$flag"
+	  linker_flags="$linker_flags $flag"
+	done
+	IFS="$save_ifs"
+	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+	;;
+
+      -Xcompiler)
+	prev=xcompiler
+	continue
+	;;
+
+      -Xlinker)
+	prev=xlinker
+	continue
+	;;
+
+      -XCClinker)
+	prev=xcclinker
+	continue
+	;;
+
+      # Some other compiler flag.
+      -* | +*)
+	# 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
+	;;
+
+      *.$objext)
+	# A standard object.
+	objs="$objs $arg"
+	;;
+
+      *.lo)
+	# A libtool-controlled object.
+
+	# Check to see that this really is a libtool object.
+	if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	  pic_object=
+	  non_pic_object=
+
+	  # Read the .lo file
+	  # If there is no directory component, then add one.
+	  case $arg in
+	  */* | *\\*) . $arg ;;
+	  *) . ./$arg ;;
+	  esac
+
+	  if test -z "$pic_object" || \
+	     test -z "$non_pic_object" ||
+	     test "$pic_object" = none && \
+	     test "$non_pic_object" = none; then
+	    $echo "$modename: cannot find name of object for \`$arg'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+
+	  # Extract subdirectory from the argument.
+	  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+	  if test "X$xdir" = "X$arg"; then
+	    xdir=
+ 	  else
+	    xdir="$xdir/"
+	  fi
+
+	  if test "$pic_object" != none; then
+	    # Prepend the subdirectory the object is found in.
+	    pic_object="$xdir$pic_object"
+
+	    if test "$prev" = dlfiles; then
+	      if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+		dlfiles="$dlfiles $pic_object"
+		prev=
+		continue
+	      else
+		# If libtool objects are unsupported, then we need to preload.
+		prev=dlprefiles
+	      fi
+	    fi
+
+	    # CHECK ME:  I think I busted this.  -Ossama
+	    if test "$prev" = dlprefiles; then
+	      # Preload the old-style object.
+	      dlprefiles="$dlprefiles $pic_object"
+	      prev=
+	    fi
+
+	    # A PIC object.
+	    libobjs="$libobjs $pic_object"
+	    arg="$pic_object"
+	  fi
+
+	  # Non-PIC object.
+	  if test "$non_pic_object" != none; then
+	    # Prepend the subdirectory the object is found in.
+	    non_pic_object="$xdir$non_pic_object"
+
+	    # A standard non-PIC object
+	    non_pic_objects="$non_pic_objects $non_pic_object"
+	    if test -z "$pic_object" || test "$pic_object" = none ; then
+	      arg="$non_pic_object"
+	    fi
+	  else
+	    # If the PIC object exists, use it instead.
+	    # $xdir was prepended to $pic_object above.
+	    non_pic_object="$pic_object"
+	    non_pic_objects="$non_pic_objects $non_pic_object"
+	  fi
+	else
+	  # 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 $EXIT_FAILURE
+	  else
+	    # Dry-run case.
+
+	    # Extract subdirectory from the argument.
+	    xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+	    if test "X$xdir" = "X$arg"; then
+	      xdir=
+	    else
+	      xdir="$xdir/"
+	    fi
+
+	    pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
+	    non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
+	    libobjs="$libobjs $pic_object"
+	    non_pic_objects="$non_pic_objects $non_pic_object"
+	  fi
+	fi
+	;;
+
+      *.$libext)
+	# An archive.
+	deplibs="$deplibs $arg"
+	old_deplibs="$old_deplibs $arg"
+	continue
+	;;
+
+      *.la)
+	# A libtool-controlled library.
+
+	if test "$prev" = dlfiles; then
+	  # This library was specified with -dlopen.
+	  dlfiles="$dlfiles $arg"
+	  prev=
+	elif test "$prev" = dlprefiles; then
+	  # The library was specified with -dlpreopen.
+	  dlprefiles="$dlprefiles $arg"
+	  prev=
+	else
+	  deplibs="$deplibs $arg"
+	fi
+	continue
+	;;
+
+      # Some other compiler argument.
+      *)
+	# 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
+	;;
+      esac # arg
+
+      # Now actually substitute the argument into the commands.
+      if test -n "$arg"; then
+	compile_command="$compile_command $arg"
+	finalize_command="$finalize_command $arg"
+      fi
+    done # argument parsing loop
+
+    if test -n "$prev"; then
+      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+      eval arg=\"$export_dynamic_flag_spec\"
+      compile_command="$compile_command $arg"
+      finalize_command="$finalize_command $arg"
+    fi
+
+    oldlibs=
+    # calculate the name of the file, without its directory
+    outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
+    libobjs_save="$libobjs"
+
+    if test -n "$shlibpath_var"; then
+      # get the directories listed in $shlibpath_var
+      eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+    else
+      shlib_search_path=
+    fi
+    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+    output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
+    if test "X$output_objdir" = "X$output"; then
+      output_objdir="$objdir"
+    else
+      output_objdir="$output_objdir/$objdir"
+    fi
+    # Create the object directory.
+    if test ! -d "$output_objdir"; then
+      $show "$mkdir $output_objdir"
+      $run $mkdir $output_objdir
+      exit_status=$?
+      if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
+	exit $exit_status
+      fi
+    fi
+
+    # Determine the type of output
+    case $output in
+    "")
+      $echo "$modename: you must specify an output file" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+      ;;
+    *.$libext) linkmode=oldlib ;;
+    *.lo | *.$objext) linkmode=obj ;;
+    *.la) linkmode=lib ;;
+    *) 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)
+    for deplib in $deplibs; do
+      if test "X$duplicate_deps" = "Xyes" ; then
+	case "$libs " in
+	*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	esac
+      fi
+      libs="$libs $deplib"
+    done
+
+    if test "$linkmode" = lib; then
+      libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+      # Compute libraries that are listed more than once in $predeps
+      # $postdeps and mark them as special (i.e., whose duplicates are
+      # not to be eliminated).
+      pre_post_deps=
+      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" ;;
+	  esac
+	  pre_post_deps="$pre_post_deps $pre_post_dep"
+	done
+      fi
+      pre_post_deps=
+    fi
+
+    deplibs=
+    newdependency_libs=
+    newlib_search_path=
+    need_relink=no # whether we're linking any uninstalled libtool libraries
+    notinst_deplibs= # not-installed libtool libraries
+    case $linkmode in
+    lib)
+	passes="conv link"
+	for file in $dlfiles $dlprefiles; do
+	  case $file in
+	  *.la) ;;
+	  *)
+	    $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
+	    exit $EXIT_FAILURE
+	    ;;
+	  esac
+	done
+	;;
+    prog)
+	compile_deplibs=
+	finalize_deplibs=
+	alldeplibs=no
+	newdlfiles=
+	newdlprefiles=
+	passes="conv scan dlopen dlpreopen link"
+	;;
+    *)  passes="conv"
+	;;
+    esac
+    for pass in $passes; do
+      if test "$linkmode,$pass" = "lib,link" ||
+	 test "$linkmode,$pass" = "prog,scan"; then
+	libs="$deplibs"
+	deplibs=
+      fi
+      if test "$linkmode" = prog; then
+	case $pass in
+	dlopen) libs="$dlfiles" ;;
+	dlpreopen) libs="$dlprefiles" ;;
+	link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+	esac
+      fi
+      if test "$pass" = dlopen; then
+	# Collect dlpreopened libraries
+	save_deplibs="$deplibs"
+	deplibs=
+      fi
+      for deplib in $libs; do
+	lib=
+	found=no
+	case $deplib in
+	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+	  if test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$deplib $compile_deplibs"
+	    finalize_deplibs="$deplib $finalize_deplibs"
+	  else
+	    compiler_flags="$compiler_flags $deplib"
+	  fi
+	  continue
+	  ;;
+	-l*)
+	  if test "$linkmode" != lib && test "$linkmode" != prog; then
+	    $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
+	    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
+	    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
+	    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
+	  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*)
+	  case $linkmode in
+	  lib)
+	    deplibs="$deplib $deplibs"
+	    test "$pass" = conv && continue
+	    newdependency_libs="$deplib $newdependency_libs"
+	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+	    ;;
+	  prog)
+	    if test "$pass" = conv; then
+	      deplibs="$deplib $deplibs"
+	      continue
+	    fi
+	    if test "$pass" = scan; then
+	      deplibs="$deplib $deplibs"
+	    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
+	    ;;
+	  esac # linkmode
+	  continue
+	  ;; # -L
+	-R*)
+	  if test "$pass" = link; then
+	    dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
+	    # Make sure the xrpath contains only unique directories.
+	    case "$xrpath " in
+	    *" $dir "*) ;;
+	    *) xrpath="$xrpath $dir" ;;
+	    esac
+	  fi
+	  deplibs="$deplib $deplibs"
+	  continue
+	  ;;
+	*.la) lib="$deplib" ;;
+	*.$libext)
+	  if test "$pass" = conv; then
+	    deplibs="$deplib $deplibs"
+	    continue
+	  fi
+	  case $linkmode in
+	  lib)
+	    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!"
+	      deplibs="$deplib $deplibs"
+	    fi
+	    continue
+	    ;;
+	  prog)
+	    if test "$pass" != link; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    fi
+	    continue
+	    ;;
+	  esac # linkmode
+	  ;; # *.$libext
+	*.lo | *.$objext)
+	  if test "$pass" = conv; then
+	    deplibs="$deplib $deplibs"
+	  elif test "$linkmode" = prog; then
+	    if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+	      # If there is no dlopen support or we're linking statically,
+	      # we need to preload.
+	      newdlprefiles="$newdlprefiles $deplib"
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    else
+	      newdlfiles="$newdlfiles $deplib"
+	    fi
+	  fi
+	  continue
+	  ;;
+	%DEPLIBS%)
+	  alldeplibs=yes
+	  continue
+	  ;;
+	esac # case $deplib
+	if test "$found" = yes || test -f "$lib"; then :
+	else
+	  $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	# Check to see that this really is a libtool archive.
+	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 $EXIT_FAILURE
+	fi
+
+	ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
+	test "X$ladir" = "X$lib" && ladir="."
+
+	dlname=
+	dlopen=
+	dlpreopen=
+	libdir=
+	library_names=
+	old_library=
+	# If the library was installed with an old release of libtool,
+	# it will not redefine variables installed, or shouldnotlink
+	installed=yes
+	shouldnotlink=no
+	avoidtemprpath=
+
+
+	# Read the .la file
+	case $lib in
+	*/* | *\\*) . $lib ;;
+	*) . ./$lib ;;
+	esac
+
+	if test "$linkmode,$pass" = "lib,link" ||
+	   test "$linkmode,$pass" = "prog,scan" ||
+	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+	  test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
+	  test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
+	fi
+
+	if test "$pass" = conv; then
+	  # Only check for convenience libraries
+	  deplibs="$lib $deplibs"
+	  if test -z "$libdir"; then
+	    if test -z "$old_library"; then
+	      $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
+	      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 $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
+	  linklib="$l"
+	done
+	if test -z "$linklib"; then
+	  $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
+	  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 $EXIT_FAILURE
+	  fi
+	  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
+	    # bomb out in the load deplibs phase.
+	    dlprefiles="$dlprefiles $lib $dependency_libs"
+	  else
+	    newdlfiles="$newdlfiles $lib"
+	  fi
+	  continue
+	fi # $pass = dlopen
+
+	# We need an absolute path.
+	case $ladir in
+	[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+	*)
+	  abs_ladir=`cd "$ladir" && pwd`
+	  if test -z "$abs_ladir"; then
+	    $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
+	    $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
+	    abs_ladir="$ladir"
+	  fi
+	  ;;
+	esac
+	laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+
+	# Find the relevant object directory and library name.
+	if test "X$installed" = Xyes; then
+	  if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+	    $echo "$modename: warning: library \`$lib' was moved." 1>&2
+	    dir="$ladir"
+	    absdir="$abs_ladir"
+	    libdir="$abs_ladir"
+	  else
+	    dir="$libdir"
+	    absdir="$libdir"
+	  fi
+	  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+	else
+	  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//'`
+
+	# This library was specified with -dlpreopen.
+	if test "$pass" = dlpreopen; then
+	  if test -z "$libdir"; then
+	    $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	  # Prefer using a static library (so that no silly _DYNAMIC symbols
+	  # are required to link).
+	  if test -n "$old_library"; then
+	    newdlprefiles="$newdlprefiles $dir/$old_library"
+	  # Otherwise, use the dlname, so that lt_dlopen finds it.
+	  elif test -n "$dlname"; then
+	    newdlprefiles="$newdlprefiles $dir/$dlname"
+	  else
+	    newdlprefiles="$newdlprefiles $dir/$linklib"
+	  fi
+	fi # $pass = dlpreopen
+
+	if test -z "$libdir"; then
+	  # Link the convenience library
+	  if test "$linkmode" = lib; then
+	    deplibs="$dir/$old_library $deplibs"
+	  elif test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$dir/$old_library $compile_deplibs"
+	    finalize_deplibs="$dir/$old_library $finalize_deplibs"
+	  else
+	    deplibs="$lib $deplibs" # used for prog,scan pass
+	  fi
+	  continue
+	fi
+
+
+	if test "$linkmode" = prog && test "$pass" != link; then
+	  newlib_search_path="$newlib_search_path $ladir"
+	  deplibs="$lib $deplibs"
+
+	  linkalldeplibs=no
+	  if test "$link_all_deplibs" != no || test -z "$library_names" ||
+	     test "$build_libtool_libs" = no; then
+	    linkalldeplibs=yes
+	  fi
+
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    case $deplib in
+	    -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
+	    esac
+	    # Need to link against all dependency_libs?
+	    if test "$linkalldeplibs" = yes; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      # Need to hardcode shared library paths
+	      # or/and link against static libraries
+	      newdependency_libs="$deplib $newdependency_libs"
+	    fi
+	    if test "X$duplicate_deps" = "Xyes" ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      esac
+	    fi
+	    tmp_libs="$tmp_libs $deplib"
+	  done # for deplib
+	  continue
+	fi # $linkmode = prog...
+
+	if test "$linkmode,$pass" = "prog,link"; then
+	  if test -n "$library_names" &&
+	     { { test "$prefer_static_libs" = no ||
+		 test "$prefer_static_libs,$installed" = "built,yes"; } ||
+	       test -z "$old_library"; }; then
+	    # We need to hardcode the library path
+	    if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
+	      # Make sure the rpath contains only unique directories.
+	      case "$temp_rpath " in
+	      *" $dir "*) ;;
+	      *" $absdir "*) ;;
+	      *) temp_rpath="$temp_rpath $absdir" ;;
+	      esac
+	    fi
+
+	    # Hardcode the library path.
+	    # Skip directories that are in the system default run-time
+	    # search path.
+	    case " $sys_lib_dlsearch_path " in
+	    *" $absdir "*) ;;
+	    *)
+	      case "$compile_rpath " in
+	      *" $absdir "*) ;;
+	      *) compile_rpath="$compile_rpath $absdir"
+	      esac
+	      ;;
+	    esac
+	    case " $sys_lib_dlsearch_path " in
+	    *" $libdir "*) ;;
+	    *)
+	      case "$finalize_rpath " in
+	      *" $libdir "*) ;;
+	      *) finalize_rpath="$finalize_rpath $libdir"
+	      esac
+	      ;;
+	    esac
+	  fi # $linkmode,$pass = prog,link...
+
+	  if test "$alldeplibs" = yes &&
+	     { test "$deplibs_check_method" = pass_all ||
+	       { test "$build_libtool_libs" = yes &&
+		 test -n "$library_names"; }; }; then
+	    # We only need to search for static libraries
+	    continue
+	  fi
+	fi
+
+	link_static=no # Whether the deplib will be linked statically
+	use_static_libs=$prefer_static_libs
+	if test "$use_static_libs" = built && test "$installed" = yes ; then
+	  use_static_libs=no
+	fi
+	if test -n "$library_names" &&
+	   { test "$use_static_libs" = no || test -z "$old_library"; }; then
+	  if test "$installed" = no; then
+	    notinst_deplibs="$notinst_deplibs $lib"
+	    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.
+	    # Skip directories that are in the system default run-time
+	    # search path.
+	    case " $sys_lib_dlsearch_path " in
+	    *" $absdir "*) ;;
+	    *)
+	      case "$compile_rpath " in
+	      *" $absdir "*) ;;
+	      *) compile_rpath="$compile_rpath $absdir"
+	      esac
+	      ;;
+	    esac
+	    case " $sys_lib_dlsearch_path " in
+	    *" $libdir "*) ;;
+	    *)
+	      case "$finalize_rpath " in
+	      *" $libdir "*) ;;
+	      *) finalize_rpath="$finalize_rpath $libdir"
+	      esac
+	      ;;
+	    esac
+	  fi
+
+	  if test -n "$old_archive_from_expsyms_cmds"; then
+	    # figure out the soname
+	    set dummy $library_names
+	    realname="$2"
+	    shift; shift
+	    libname=`eval \\$echo \"$libname_spec\"`
+	    # use dlname if we got it. it's perfectly good, no?
+	    if test -n "$dlname"; then
+	      soname="$dlname"
+	    elif test -n "$soname_spec"; then
+	      # bleh windows
+	      case $host in
+	      *cygwin* | mingw*)
+		major=`expr $current - $age`
+		versuffix="-$major"
+		;;
+	      esac
+	      eval soname=\"$soname_spec\"
+	    else
+	      soname="$realname"
+	    fi
+
+	    # 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"
+
+	    # 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='~'
+	      cmds=$extract_expsyms_cmds
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
+		$show "$cmd"
+		$run eval "$cmd" || exit $?
+	      done
+	      IFS="$save_ifs"
+	    fi
+
+	    # Create $newlib
+	    if test -f "$output_objdir/$newlib"; then :; else
+	      $show "generating import library for \`$soname'"
+	      save_ifs="$IFS"; IFS='~'
+	      cmds=$old_archive_from_expsyms_cmds
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
+		$show "$cmd"
+		$run eval "$cmd" || exit $?
+	      done
+	      IFS="$save_ifs"
+	    fi
+	    # make sure the library variables are pointing to the new library
+	    dir=$output_objdir
+	    linklib=$newlib
+	  fi # test -n "$old_archive_from_expsyms_cmds"
+
+	  if test "$linkmode" = prog || test "$mode" != relink; then
+	    add_shlibpath=
+	    add_dir=
+	    add=
+	    lib_linked=yes
+	    case $hardcode_action in
+	    immediate | unsupported)
+	      if test "$hardcode_direct" = no; then
+		add="$dir/$linklib"
+		case $host in
+		  *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
+		  *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+		  *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+		    *-*-unixware7*) 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" ;;
+		esac
+		add_dir="-L$dir"
+		add="-l$name"
+	      elif test "$hardcode_shlibpath_var" = no; then
+		add_shlibpath="$dir"
+		add="-l$name"
+	      else
+		lib_linked=no
+	      fi
+	      ;;
+	    relink)
+	      if test "$hardcode_direct" = yes; then
+		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"
+		add="-l$name"
+	      else
+		lib_linked=no
+	      fi
+	      ;;
+	    *) lib_linked=no ;;
+	    esac
+
+	    if test "$lib_linked" != yes; then
+	      $echo "$modename: configuration error: unsupported hardcode properties"
+	      exit $EXIT_FAILURE
+	    fi
+
+	    if test -n "$add_shlibpath"; then
+	      case :$compile_shlibpath: in
+	      *":$add_shlibpath:"*) ;;
+	      *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+	      esac
+	    fi
+	    if test "$linkmode" = prog; then
+	      test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+	      test -n "$add" && compile_deplibs="$add $compile_deplibs"
+	    else
+	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
+	      test -n "$add" && deplibs="$add $deplibs"
+	      if test "$hardcode_direct" != yes && \
+		 test "$hardcode_minus_L" != yes && \
+		 test "$hardcode_shlibpath_var" = yes; then
+		case :$finalize_shlibpath: in
+		*":$libdir:"*) ;;
+		*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+		esac
+	      fi
+	    fi
+	  fi
+
+	  if test "$linkmode" = prog || test "$mode" = relink; then
+	    add_shlibpath=
+	    add_dir=
+	    add=
+	    # Finalize command for both is simple: just hardcode it.
+	    if test "$hardcode_direct" = yes; then
+	      add="$libdir/$linklib"
+	    elif test "$hardcode_minus_L" = yes; then
+	      add_dir="-L$libdir"
+	      add="-l$name"
+	    elif test "$hardcode_shlibpath_var" = yes; then
+	      case :$finalize_shlibpath: in
+	      *":$libdir:"*) ;;
+	      *) 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
+
+	    if test "$linkmode" = prog; then
+	      test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+	      test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+	    else
+	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
+	      test -n "$add" && deplibs="$add $deplibs"
+	    fi
+	  fi
+	elif test "$linkmode" = prog; then
+	  # Here we assume that one of hardcode_direct or hardcode_minus_L
+	  # is not unsupported.  This is valid on all known static and
+	  # shared platforms.
+	  if test "$hardcode_direct" != unsupported; then
+	    test -n "$old_library" && linklib="$old_library"
+	    compile_deplibs="$dir/$linklib $compile_deplibs"
+	    finalize_deplibs="$dir/$linklib $finalize_deplibs"
+	  else
+	    compile_deplibs="-l$name -L$dir $compile_deplibs"
+	    finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+	  fi
+	elif test "$build_libtool_libs" = yes; then
+	  # Not a shared library
+	  if test "$deplibs_check_method" != pass_all; then
+	    # We're trying link a shared library against a static one
+	    # but the system doesn't support it.
+
+	    # 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."
+	    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."
+	      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."
+	      fi
+	      if test "$build_old_libs" = no; then
+		build_libtool_libs=module
+		build_old_libs=yes
+	      else
+		build_libtool_libs=no
+	      fi
+	    fi
+	  else
+	    deplibs="$dir/$old_library $deplibs"
+	    link_static=yes
+	  fi
+	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
+	    # Extract -R from dependency_libs
+	    temp_deplibs=
+	    for libdir in $dependency_libs; do
+	      case $libdir in
+	      -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
+		   case " $xrpath " in
+		   *" $temp_xrpath "*) ;;
+		   *) xrpath="$xrpath $temp_xrpath";;
+		   esac;;
+	      *) temp_deplibs="$temp_deplibs $libdir";;
+	      esac
+	    done
+	    dependency_libs="$temp_deplibs"
+	  fi
+
+	  newlib_search_path="$newlib_search_path $absdir"
+	  # Link against this library
+	  test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+	  # ... and its dependency_libs
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    newdependency_libs="$deplib $newdependency_libs"
+	    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 "$link_all_deplibs" != no; then
+	    # Add the search paths of all dependency libraries
+	    for deplib in $dependency_libs; do
+	      case $deplib in
+	      -L*) path="$deplib" ;;
+	      *.la)
+		dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
+		test "X$dir" = "X$deplib" && dir="."
+		# We need an absolute path.
+		case $dir in
+		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+		*)
+		  absdir=`cd "$dir" && pwd`
+		  if test -z "$absdir"; then
+		    $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
+		    absdir="$dir"
+		  fi
+		  ;;
+		esac
+		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
+	      *" $path "*) ;;
+	      *) deplibs="$path $deplibs" ;;
+	      esac
+	      case " $deplibs " in
+	      *" $depdepl "*) ;;
+	      *) deplibs="$depdepl $deplibs" ;;
+	      esac
+	    done
+	  fi # link_all_deplibs != no
+	fi # linkmode = lib
+      done # for deplib in $libs
+      dependency_libs="$newdependency_libs"
+      if test "$pass" = dlpreopen; then
+	# Link the dlpreopened libraries before other libraries
+	for deplib in $save_deplibs; do
+	  deplibs="$deplib $deplibs"
+	done
+      fi
+      if test "$pass" != dlopen; then
+	if test "$pass" != conv; then
+	  # Make sure lib_search_path contains only unique directories.
+	  lib_search_path=
+	  for dir in $newlib_search_path; do
+	    case "$lib_search_path " in
+	    *" $dir "*) ;;
+	    *) lib_search_path="$lib_search_path $dir" ;;
+	    esac
+	  done
+	  newlib_search_path=
+	fi
+
+	if test "$linkmode,$pass" != "prog,link"; then
+	  vars="deplibs"
+	else
+	  vars="compile_deplibs finalize_deplibs"
+	fi
+	for var in $vars dependency_libs; do
+	  # Add libraries to $var in reverse order
+	  eval tmp_libs=\"\$$var\"
+	  new_libs=
+	  for deplib in $tmp_libs; do
+	    # FIXME: Pedantically, this is the right thing to do, so
+	    #        that some nasty dependency loop isn't accidentally
+	    #        broken:
+	    #new_libs="$deplib $new_libs"
+	    # Pragmatically, this seems to cause very few problems in
+	    # 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
+	      # is implicitly linked in more than once by the
+	      # compiler, it is considered special, and multiple
+	      # occurrences thereof are not removed.  Compare this
+	      # with having the same library being listed as a
+	      # dependency of multiple other libraries: in this case,
+	      # we know (pedantically, we assume) the library does not
+	      # need to be listed more than once, so we keep only the
+	      # last copy.  This is not always right, but it is rare
+	      # enough that we require users that really mean to play
+	      # such unportable linking tricks to link the library
+	      # using -Wl,-lname, so that libtool does not consider it
+	      # for duplicate removal.
+	      case " $specialdeplibs " in
+	      *" $deplib "*) new_libs="$deplib $new_libs" ;;
+	      *)
+		case " $new_libs " in
+		*" $deplib "*) ;;
+		*) new_libs="$deplib $new_libs" ;;
+		esac
+		;;
+	      esac
+	      ;;
+	    esac
+	  done
+	  tmp_libs=
+	  for deplib in $new_libs; do
+	    case $deplib in
+	    -L*)
+	      case " $tmp_libs " in
+	      *" $deplib "*) ;;
+	      *) tmp_libs="$tmp_libs $deplib" ;;
+	      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"
+      dlprefiles="$newdlprefiles"
+    fi
+
+    case $linkmode in
+    oldlib)
+      if test -n "$deplibs"; then
+	$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
+      fi
+
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$rpath"; then
+	$echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$xrpath"; then
+	$echo "$modename: warning: \`-R' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$vinfo"; then
+	$echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$release"; then
+	$echo "$modename: warning: \`-release' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+	$echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
+      fi
+
+      # Now set the variables for building old libraries.
+      build_libtool_libs=no
+      oldlibs="$output"
+      objs="$objs$old_deplibs"
+      ;;
+
+    lib)
+      # Make sure we only generate libraries of the form `libNAME.la'.
+      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 $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$//'`
+	fi
+	;;
+      esac
+
+      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 $EXIT_FAILURE
+	else
+	  $echo
+	  $echo "*** Warning: Linking the shared library $output against the non-libtool"
+	  $echo "*** objects $objs is not portable!"
+	  libobjs="$libobjs $objs"
+	fi
+      fi
+
+      if test "$dlself" != no; then
+	$echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
+      fi
+
+      set dummy $rpath
+      if test "$#" -gt 2; then
+	$echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
+      fi
+      install_libdir="$2"
+
+      oldlibs=
+      if test -z "$rpath"; then
+	if test "$build_libtool_libs" = yes; then
+	  # Building a libtool convenience library.
+	  # Some compilers have problems with a `.al' extension so
+	  # convenience libraries should have the same extension an
+	  # archive normally would.
+	  oldlibs="$output_objdir/$libname.$libext $oldlibs"
+	  build_libtool_libs=convenience
+	  build_old_libs=yes
+	fi
+
+	if test -n "$vinfo"; then
+	  $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
+	fi
+
+	if test -n "$release"; then
+	  $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
+	fi
+      else
+
+	# Parse the version information argument.
+	save_ifs="$IFS"; IFS=':'
+	set dummy $vinfo 0 0 0
+	IFS="$save_ifs"
+
+	if test -n "$8"; then
+	  $echo "$modename: too many parameters to \`-version-info'" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	# 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|none)
+	    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`
+	    age="$number_minor"
+	    revision="$number_minor"
+	    lt_irix_increment=no
+	    ;;
+	  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]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+	*)
+	  $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+
+	case $revision in
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+	*)
+	  $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+
+	case $age in
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+	*)
+	  $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  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 $EXIT_FAILURE
+	fi
+
+	# Calculate the version variables.
+	major=
+	versuffix=
+	verstring=
+	case $version_type in
+	none) ;;
+
+	darwin)
+	  # Like Linux, but with the current version available in
+	  # verstring for coding it into the library header
+	  major=.`expr $current - $age`
+	  versuffix="$major.$age.$revision"
+	  # Darwin ld doesn't like 0 for these options...
+	  minor_current=`expr $current + 1`
+	  xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+	  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+	  ;;
+
+	freebsd-aout)
+	  major=".$current"
+	  versuffix=".$current.$revision";
+	  ;;
+
+	freebsd-elf)
+	  major=".$current"
+	  versuffix=".$current";
+	  ;;
+
+	irix | nonstopux)
+	  if test "X$lt_irix_increment" = "Xno"; then
+	    major=`expr $current - $age`
+	  else
+	    major=`expr $current - $age + 1`
+	  fi
+	  case $version_type in
+	    nonstopux) verstring_prefix=nonstopux ;;
+	    *)         verstring_prefix=sgi ;;
+	  esac
+	  verstring="$verstring_prefix$major.$revision"
+
+	  # Add in all the interfaces that we are compatible with.
+	  loop=$revision
+	  while test "$loop" -ne 0; do
+	    iface=`expr $revision - $loop`
+	    loop=`expr $loop - 1`
+	    verstring="$verstring_prefix$major.$iface:$verstring"
+	  done
+
+	  # Before this point, $major must not contain `.'.
+	  major=.$major
+	  versuffix="$major.$revision"
+	  ;;
+
+	linux)
+	  major=.`expr $current - $age`
+	  versuffix="$major.$age.$revision"
+	  ;;
+
+	osf)
+	  major=.`expr $current - $age`
+	  versuffix=".$current.$age.$revision"
+	  verstring="$current.$age.$revision"
+
+	  # Add in all the interfaces that we are compatible with.
+	  loop=$age
+	  while test "$loop" -ne 0; do
+	    iface=`expr $current - $loop`
+	    loop=`expr $loop - 1`
+	    verstring="$verstring:${iface}.0"
+	  done
+
+	  # Make executables depend on our current version.
+	  verstring="$verstring:${current}.0"
+	  ;;
+
+	sunos)
+	  major=".$current"
+	  versuffix=".$current.$revision"
+	  ;;
+
+	windows)
+	  # Use '-' rather than '.', since we only want one
+	  # extension on DOS 8.3 filesystems.
+	  major=`expr $current - $age`
+	  versuffix="-$major"
+	  ;;
+
+	*)
+	  $echo "$modename: unknown library version type \`$version_type'" 1>&2
+	  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+
+	# Clear the version info if we defaulted, and they specified a release.
+	if test -z "$vinfo" && test -n "$release"; then
+	  major=
+	  case $version_type in
+	  darwin)
+	    # we can't check for "0.0" in archive_cmds due to quoting
+	    # problems, so we reset it completely
+	    verstring=
+	    ;;
+	  *)
+	    verstring="0.0"
+	    ;;
+	  esac
+	  if test "$need_version" = no; then
+	    versuffix=
+	  else
+	    versuffix=".0.0"
+	  fi
+	fi
+
+	# Remove version info from name if versioning should be avoided
+	if test "$avoid_version" = yes && test "$need_version" = no; then
+	  major=
+	  versuffix=
+	  verstring=""
+	fi
+
+	# Check to see if the archive will have undefined symbols.
+	if test "$allow_undefined" = yes; then
+	  if test "$allow_undefined_flag" = unsupported; then
+	    $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
+	    build_libtool_libs=no
+	    build_old_libs=yes
+	  fi
+	else
+	  # Don't allow undefined symbols.
+	  allow_undefined_flag="$no_undefined_flag"
+	fi
+      fi
+
+      if test "$mode" != relink; then
+	# Remove our outputs, but don't remove object files since they
+	# may have been created when compiling PIC objects.
+	removelist=
+	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"
+	       ;;
+	    *) ;;
+	  esac
+	done
+	if test -n "$removelist"; then
+	  $show "${rm}r $removelist"
+	  $run ${rm}r $removelist
+	fi
+      fi
+
+      # Now set the variables for building old libraries.
+      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+	oldlibs="$oldlibs $output_objdir/$libname.$libext"
+
+	# Transform .lo files to .o files.
+	oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+      fi
+
+      # 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"`
+      #done
+
+      if test -n "$xrpath"; then
+	# If the user specified any rpath flags, then add them.
+	temp_xrpath=
+	for libdir in $xrpath; do
+	  temp_xrpath="$temp_xrpath -R$libdir"
+	  case "$finalize_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_rpath="$finalize_rpath $libdir" ;;
+	  esac
+	done
+	if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+	  dependency_libs="$temp_xrpath $dependency_libs"
+	fi
+      fi
+
+      # Make sure dlfiles contains only unique files that won't be dlpreopened
+      old_dlfiles="$dlfiles"
+      dlfiles=
+      for lib in $old_dlfiles; do
+	case " $dlprefiles $dlfiles " in
+	*" $lib "*) ;;
+	*) dlfiles="$dlfiles $lib" ;;
+	esac
+      done
+
+      # Make sure dlprefiles contains only unique files
+      old_dlprefiles="$dlprefiles"
+      dlprefiles=
+      for lib in $old_dlprefiles; do
+	case "$dlprefiles " in
+	*" $lib "*) ;;
+	*) dlprefiles="$dlprefiles $lib" ;;
+	esac
+      done
+
+      if test "$build_libtool_libs" = yes; then
+	if test -n "$rpath"; then
+	  case $host in
+	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
+	    # these systems don't actually have a c library (as such)!
+	    ;;
+	  *-*-rhapsody* | *-*-darwin1.[012])
+	    # Rhapsody C library is in the System framework
+	    deplibs="$deplibs -framework System"
+	    ;;
+	  *-*-netbsd*)
+	    # Don't link with libc until the a.out ld.so is fixed.
+	    ;;
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	    # Do not include libc due to us having libc/libc_r.
+	    ;;
+	  *-*-sco3.2v5* | *-*-sco5v6*)
+	    # Causes problems with __ctype
+	    ;;
+	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+	    # Compiler inserts libc in the correct place for threads to work
+	    ;;
+ 	  *)
+	    # Add libc to deplibs on all other systems if necessary.
+	    if test "$build_libtool_need_lc" = "yes"; then
+	      deplibs="$deplibs -lc"
+	    fi
+	    ;;
+	  esac
+	fi
+
+	# Transform deplibs into only deplibs that can be linked in shared.
+	name_save=$name
+	libname_save=$libname
+	release_save=$release
+	versuffix_save=$versuffix
+	major_save=$major
+	# I'm not sure if I'm treating the release correctly.  I think
+	# release should show up in the -l (ie -lgmp5) so we don't want to
+	# add it in twice.  Is that correct?
+	release=""
+	versuffix=""
+	major=""
+	newdeplibs=
+	droppeddeps=no
+	case $deplibs_check_method in
+	pass_all)
+	  # Don't check for shared/static.  Everything works.
+	  # 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 behavior.
+	  newdeplibs=$deplibs
+	  ;;
+	test_compile)
+	  # This code stresses the "libraries are programs" paradigm to its
+	  # limits. Maybe even breaks it.  We compile a program, linking it
+	  # against the deplibs as a proxy for the library.  Then we can check
+	  # whether they linked in statically or dynamically with ldd.
+	  $rm conftest.c
+	  cat > conftest.c <<EOF
+	  int main() { return 0; }
+EOF
+	  $rm conftest
+	  if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+	    ldd_output=`ldd conftest`
+	    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 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 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
+		$rm conftest
+		if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+		  ldd_output=`ldd conftest`
+		  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."
+		fi
+	      else
+		newdeplibs="$newdeplibs $i"
+	      fi
+	    done
+	  fi
+	  ;;
+	file_magic*)
+	  set dummy $deplibs_check_method
+	  file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+	  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
+	      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
+			continue
+		      fi
+		      # The statement above tries to avoid entering an
+		      # endless loop below, in case of cyclic links.
+		      # We might still enter an endless loop, since a link
+		      # loop can be closed while we follow links,
+		      # but so what?
+		      potlib="$potent_lib"
+		      while test -h "$potlib" 2>/dev/null; do
+			potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
+			case $potliblink in
+			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+			*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+			esac
+		      done
+		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
+			 | ${SED} 10q \
+			 | $EGREP "$file_magic_regex" > /dev/null; then
+			newdeplibs="$newdeplibs $a_deplib"
+			a_deplib=""
+			break 2
+		      fi
+		  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"
+		if test -z "$potlib" ; then
+		  $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"
+		fi
+	      fi
+	    else
+	      # Add a -L argument.
+	      newdeplibs="$newdeplibs $a_deplib"
+	    fi
+	  done # Gone through all deplibs.
+	  ;;
+	match_pattern*)
+	  set dummy $deplibs_check_method
+	  match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+	  for a_deplib in $deplibs; do
+	    name=`expr $a_deplib : '-l\(.*\)'`
+	    # If $name is empty we are operating on a -L argument.
+	    if test -n "$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
+		    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
+	      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"
+		if test -z "$potlib" ; then
+		  $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"
+		fi
+	      fi
+	    else
+	      # Add a -L argument.
+	      newdeplibs="$newdeplibs $a_deplib"
+	    fi
+	  done # Gone through all deplibs.
+	  ;;
+	none | unknown | *)
+	  newdeplibs=""
+	  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."
+	    else
+	      $echo "*** Warning: inter-library dependencies are not known to be supported."
+	    fi
+	    $echo "*** All declared inter-library dependencies are being dropped."
+	    droppeddeps=yes
+	  fi
+	  ;;
+	esac
+	versuffix=$versuffix_save
+	major=$major_save
+	release=$release_save
+	libname=$libname_save
+	name=$name_save
+
+	case $host in
+	*-*-rhapsody* | *-*-darwin1.[012])
+	  # On Rhapsody replace the C library is the System framework
+	  newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
+	  ;;
+	esac
+
+	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."
+	    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."
+	    fi
+	    if test "$build_old_libs" = no; then
+	      oldlibs="$output_objdir/$libname.$libext"
+	      build_libtool_libs=module
+	      build_old_libs=yes
+	    else
+	      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."
+
+	    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."
+	      if test "$build_old_libs" = no; then
+		oldlibs="$output_objdir/$libname.$libext"
+		build_libtool_libs=module
+		build_old_libs=yes
+	      else
+		build_libtool_libs=no
+	      fi
+	    fi
+	  fi
+	fi
+	# Done checking deplibs!
+	deplibs=$newdeplibs
+      fi
+
+
+      # move library search paths that coincide with paths to not yet
+      # installed libraries to the beginning of the library search list
+      new_libs=
+      for path in $notinst_path; do
+	case " $new_libs " in
+	*" -L$path/$objdir "*) ;;
+	*)
+	  case " $deplibs " in
+	  *" -L$path/$objdir "*)
+	    new_libs="$new_libs -L$path/$objdir" ;;
+	  esac
+	  ;;
+	esac
+      done
+      for deplib in $deplibs; do
+	case $deplib in
+	-L*)
+	  case " $new_libs " in
+	  *" $deplib "*) ;;
+	  *) new_libs="$new_libs $deplib" ;;
+	  esac
+	  ;;
+	*) new_libs="$new_libs $deplib" ;;
+	esac
+      done
+      deplibs="$new_libs"
+
+
+      # All the library-specific variables (install_libdir is set above).
+      library_names=
+      old_library=
+      dlname=
+
+      # Test again, we may have decided not to build it any more
+      if test "$build_libtool_libs" = yes; then
+	if test "$hardcode_into_libs" = yes; then
+	  # Hardcode the library paths
+	  hardcode_libdirs=
+	  dep_rpath=
+	  rpath="$finalize_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
+		if test -z "$hardcode_libdirs"; then
+		  hardcode_libdirs="$libdir"
+		else
+		  # Just accumulate the unique libdirs.
+		  case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+		  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		    ;;
+		  *)
+		    hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		    ;;
+		  esac
+		fi
+	      else
+		eval flag=\"$hardcode_libdir_flag_spec\"
+		dep_rpath="$dep_rpath $flag"
+	      fi
+	    elif test -n "$runpath_var"; then
+	      case "$perm_rpath " in
+	      *" $libdir "*) ;;
+	      *) perm_rpath="$perm_rpath $libdir" ;;
+	      esac
+	    fi
+	  done
+	  # Substitute the hardcoded libdirs into the rpath.
+	  if test -n "$hardcode_libdir_separator" &&
+	     test -n "$hardcode_libdirs"; then
+	    libdir="$hardcode_libdirs"
+	    if test -n "$hardcode_libdir_flag_spec_ld"; then
+	      case $archive_cmds in
+	      *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;;
+	      *)      eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;;
+	      esac
+	    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.
+	    rpath=
+	    for dir in $perm_rpath; do
+	      rpath="$rpath$dir:"
+	    done
+	    eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+	  fi
+	  test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+	fi
+
+	shlibpath="$finalize_shlibpath"
+	test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+	if test -n "$shlibpath"; then
+	  eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+	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"
+	shift; shift
+
+	if test -n "$soname_spec"; then
+	  eval soname=\"$soname_spec\"
+	else
+	  soname="$realname"
+	fi
+	if test -z "$dlname"; then
+	  dlname=$soname
+	fi
+
+	lib="$output_objdir/$realname"
+	linknames=
+	for link
+	do
+	  linknames="$linknames $link"
+	done
+
+	# Use standard objects if they are pic
+	test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+
+	# Prepare the list of exported symbols
+	if test -z "$export_symbols"; then
+	  if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+	    $show "generating symbol list for \`$libname.la'"
+	    export_symbols="$output_objdir/$libname.exp"
+	    $run $rm $export_symbols
+	    cmds=$export_symbols_cmds
+	    save_ifs="$IFS"; IFS='~'
+	    for cmd in $cmds; do
+	      IFS="$save_ifs"
+	      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=:
+		# Break out early, otherwise skipped_export may be
+		# set to false by a later but shorter cmd.
+		break
+	      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 "$mv \"${export_symbols}T\" \"$export_symbols\""
+	      $run eval '$mv "${export_symbols}T" "$export_symbols"'
+	    fi
+	  fi
+	fi
+
+	if test -n "$export_symbols" && test -n "$include_expsyms"; then
+	  $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"
+	    generated="$generated $gentop"
+
+	    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"
+	fi
+
+	# Make a backup of the uninstalled library when relinking
+	if test "$mode" = relink; then
+	  $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
+	fi
+
+	# 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 test_cmds=\"$archive_expsym_cmds\"
+	  cmds=$archive_expsym_cmds
+	else
+	  eval test_cmds=\"$archive_cmds\"
+	  cmds=$archive_cmds
+	  fi
+	fi
+
+	if test "X$skipped_export" != "X:" &&
+	   len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
+	   test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	  :
+	else
+	  # The command line is too long to link in one step, link piecewise.
+	  $echo "creating reloadable object files..."
+
+	  # Save the value of $output and $libobjs because we want to
+	  # use them later.  If we have whole_archive_flag_spec, we
+	  # want to use save_libobjs as it was before
+	  # whole_archive_flag_spec was expanded, because we can't
+	  # assume the linker understands whole_archive_flag_spec.
+	  # This may have to be revisited, in case too many
+	  # convenience libraries get linked in and end up exceeding
+	  # the spec.
+	  if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+	    save_libobjs=$libobjs
+	  fi
+	  save_output=$output
+	  output_la=`$echo "X$output" | $Xsed -e "$basename"`
+
+	  # Clear the reloadable object creation command queue and
+	  # initialize k to one.
+	  test_cmds=
+	  concat_cmds=
+	  objlist=
+	  delfiles=
+	  last_robj=
+	  k=1
+	  output=$output_objdir/$output_la-${k}.$objext
+	  # Loop over the list of objects to be linked.
+	  for obj in $save_libobjs
+	  do
+	    eval test_cmds=\"$reload_cmds $objlist $last_robj\"
+	    if test "X$objlist" = X ||
+	       { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
+		 test "$len" -le "$max_cmd_len"; }; then
+	      objlist="$objlist $obj"
+	    else
+	      # The command $test_cmds is almost too long, add a
+	      # command to the queue.
+	      if test "$k" -eq 1 ; then
+		# The first file doesn't have a previous command to add.
+		eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
+	      else
+		# All subsequent reloadable object files will link in
+		# the last one created.
+		eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
+	      fi
+	      last_robj=$output_objdir/$output_la-${k}.$objext
+	      k=`expr $k + 1`
+	      output=$output_objdir/$output_la-${k}.$objext
+	      objlist=$obj
+	      len=1
+	    fi
+	  done
+	  # Handle the remaining objects by creating one last
+	  # reloadable object file.  All subsequent reloadable object
+	  # files will link in the last one created.
+	  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 reloadable object files
+	  # after they are used.
+	  i=0
+	  while test "$i" -lt "$k"
+	  do
+	    i=`expr $i + 1`
+	    delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
+	  done
+
+	  $echo "creating a temporary reloadable object file: $output"
+
+	  # Loop through the commands generated above and execute them.
+	  save_ifs="$IFS"; IFS='~'
+	  for cmd in $concat_cmds; do
+	    IFS="$save_ifs"
+	    $show "$cmd"
+	    $run eval "$cmd" || exit $?
+	  done
+	  IFS="$save_ifs"
+
+	  libobjs=$output
+	  # Restore the value of output.
+	  output=$save_output
+
+	  if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+	  fi
+	  # Expand the library linking commands again to reset the
+	  # 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
+	    cmds=$archive_expsym_cmds
+	  else
+	    cmds=$archive_cmds
+	    fi
+	  fi
+
+	  # Append the command to remove the reloadable object files
+	  # to the just-reset $cmds.
+	  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" || {
+	    lt_exit=$?
+
+	    # Restore the uninstalled library and exit
+	    if test "$mode" = relink; then
+	      $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
+	    fi
+
+	    exit $lt_exit
+	  }
+	done
+	IFS="$save_ifs"
+
+	# 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 $?
+
+	  if test -n "$convenience"; then
+	    if test -z "$whole_archive_flag_spec"; then
+	      $show "${rm}r $gentop"
+	      $run ${rm}r "$gentop"
+	    fi
+	  fi
+
+	  exit $EXIT_SUCCESS
+	fi
+
+	# Create links to the real library.
+	for linkname in $linknames; do
+	  if test "$realname" != "$linkname"; then
+	    $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
+	    $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
+	  fi
+	done
+
+	# If -module or -export-dynamic was specified, set the dlname.
+	if test "$module" = yes || test "$export_dynamic" = yes; then
+	  # On all known operating systems, these are identical.
+	  dlname="$soname"
+	fi
+      fi
+      ;;
+
+    obj)
+      if test -n "$deplibs"; then
+	$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
+      fi
+
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	$echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$rpath"; then
+	$echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$xrpath"; then
+	$echo "$modename: warning: \`-R' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$vinfo"; then
+	$echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$release"; then
+	$echo "$modename: warning: \`-release' is ignored for objects" 1>&2
+      fi
+
+      case $output in
+      *.lo)
+	if test -n "$objs$old_deplibs"; then
+	  $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+	libobj="$output"
+	obj=`$echo "X$output" | $Xsed -e "$lo2o"`
+	;;
+      *)
+	libobj=
+	obj="$output"
+	;;
+      esac
+
+      # Delete the old objects.
+      $run $rm $obj $libobj
+
+      # Objects from convenience libraries.  This assumes
+      # single-version convenience libraries.  Whenever we create
+      # different ones for PIC/non-PIC, this we'll have to duplicate
+      # the extraction.
+      reload_conv_objs=
+      gentop=
+      # reload_cmds runs $LD directly, so let us get rid of
+      # -Wl from whole_archive_flag_spec and hope we can get by with
+      # turning comma into space..
+      wl=
+
+      if test -n "$convenience"; then
+	if test -n "$whole_archive_flag_spec"; then
+	  eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+	  reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
+	else
+	  gentop="$output_objdir/${obj}x"
+	  generated="$generated $gentop"
+
+	  func_extract_archives $gentop $convenience
+	  reload_conv_objs="$reload_objs $func_extract_archives_result"
+	fi
+      fi
+
+      # Create the old-style object.
+      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"
+      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
+      IFS="$save_ifs"
+
+      # Exit if we aren't doing a library object file.
+      if test -z "$libobj"; then
+	if test -n "$gentop"; then
+	  $show "${rm}r $gentop"
+	  $run ${rm}r $gentop
+	fi
+
+	exit $EXIT_SUCCESS
+      fi
+
+      if test "$build_libtool_libs" != yes; then
+	if test -n "$gentop"; then
+	  $show "${rm}r $gentop"
+	  $run ${rm}r $gentop
+	fi
+
+	# Create an invalid libtool object if no PIC, so that we don't
+	# accidentally link it into a program.
+	# $show "echo timestamp > $libobj"
+	# $run eval "echo timestamp > $libobj" || exit $?
+	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"
+	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
+	IFS="$save_ifs"
+      fi
+
+      if test -n "$gentop"; then
+	$show "${rm}r $gentop"
+	$run ${rm}r $gentop
+      fi
+
+      exit $EXIT_SUCCESS
+      ;;
+
+    prog)
+      case $host in
+	*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
+      fi
+
+      if test -n "$release"; then
+	$echo "$modename: warning: \`-release' is ignored for programs" 1>&2
+      fi
+
+      if test "$preload" = yes; then
+	if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
+	   test "$dlopen_self_static" = unknown; then
+	  $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
+	fi
+      fi
+
+      case $host in
+      *-*-rhapsody* | *-*-darwin1.[012])
+	# On Rhapsody replace the C library is the System framework
+	compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
+	finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
+	;;
+      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
+
+
+      # move library search paths that coincide with paths to not yet
+      # installed libraries to the beginning of the library search list
+      new_libs=
+      for path in $notinst_path; do
+	case " $new_libs " in
+	*" -L$path/$objdir "*) ;;
+	*)
+	  case " $compile_deplibs " in
+	  *" -L$path/$objdir "*)
+	    new_libs="$new_libs -L$path/$objdir" ;;
+	  esac
+	  ;;
+	esac
+      done
+      for deplib in $compile_deplibs; do
+	case $deplib in
+	-L*)
+	  case " $new_libs " in
+	  *" $deplib "*) ;;
+	  *) new_libs="$new_libs $deplib" ;;
+	  esac
+	  ;;
+	*) new_libs="$new_libs $deplib" ;;
+	esac
+      done
+      compile_deplibs="$new_libs"
+
+
+      compile_command="$compile_command $compile_deplibs"
+      finalize_command="$finalize_command $finalize_deplibs"
+
+      if test -n "$rpath$xrpath"; then
+	# If the user specified any rpath flags, then add them.
+	for libdir in $rpath $xrpath; do
+	  # This is the magic to use -rpath.
+	  case "$finalize_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_rpath="$finalize_rpath $libdir" ;;
+	  esac
+	done
+      fi
+
+      # Now hardcode the library paths
+      rpath=
+      hardcode_libdirs=
+      for libdir in $compile_rpath $finalize_rpath; do
+	if test -n "$hardcode_libdir_flag_spec"; then
+	  if test -n "$hardcode_libdir_separator"; then
+	    if test -z "$hardcode_libdirs"; then
+	      hardcode_libdirs="$libdir"
+	    else
+	      # Just accumulate the unique libdirs.
+	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		;;
+	      *)
+		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		;;
+	      esac
+	    fi
+	  else
+	    eval flag=\"$hardcode_libdir_flag_spec\"
+	    rpath="$rpath $flag"
+	  fi
+	elif test -n "$runpath_var"; then
+	  case "$perm_rpath " in
+	  *" $libdir "*) ;;
+	  *) perm_rpath="$perm_rpath $libdir" ;;
+	  esac
+	fi
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+	  testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
+	  case :$dllsearchpath: in
+	  *":$libdir:"*) ;;
+	  *) dllsearchpath="$dllsearchpath:$libdir";;
+	  esac
+	  case :$dllsearchpath: in
+	  *":$testbindir:"*) ;;
+	  *) dllsearchpath="$dllsearchpath:$testbindir";;
+	  esac
+	  ;;
+	esac
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+	 test -n "$hardcode_libdirs"; then
+	libdir="$hardcode_libdirs"
+	eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      compile_rpath="$rpath"
+
+      rpath=
+      hardcode_libdirs=
+      for libdir in $finalize_rpath; do
+	if test -n "$hardcode_libdir_flag_spec"; then
+	  if test -n "$hardcode_libdir_separator"; then
+	    if test -z "$hardcode_libdirs"; then
+	      hardcode_libdirs="$libdir"
+	    else
+	      # Just accumulate the unique libdirs.
+	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		;;
+	      *)
+		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		;;
+	      esac
+	    fi
+	  else
+	    eval flag=\"$hardcode_libdir_flag_spec\"
+	    rpath="$rpath $flag"
+	  fi
+	elif test -n "$runpath_var"; then
+	  case "$finalize_perm_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+	  esac
+	fi
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+	 test -n "$hardcode_libdirs"; then
+	libdir="$hardcode_libdirs"
+	eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      finalize_rpath="$rpath"
+
+      if test -n "$libobjs" && test "$build_old_libs" = yes; then
+	# Transform all the library objects into standard objects.
+	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+      fi
+
+      dlsyms=
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	if test -n "$NM" && test -n "$global_symbol_pipe"; then
+	  dlsyms="${outputname}S.c"
+	else
+	  $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
+	fi
+      fi
+
+      if test -n "$dlsyms"; then
+	case $dlsyms in
+	"") ;;
+	*.c)
+	  # Discover the nlist of each of the dlfiles.
+	  nlist="$output_objdir/${outputname}.nm"
+
+	  $show "$rm $nlist ${nlist}S ${nlist}T"
+	  $run $rm "$nlist" "${nlist}S" "${nlist}T"
+
+	  # Parse the name list into a source file.
+	  $show "creating $output_objdir/$dlsyms"
+
+	  test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
+/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
+/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+/* Prevent the only kind of declaration conflicts we can make. */
+#define lt_preloaded_symbols some_other_symbol
+
+/* External symbol declarations for the compiler. */\
+"
+
+	  if test "$dlself" = yes; then
+	    $show "generating symbol list for \`$output'"
+
+	    test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
+
+	    # Add our own program objects to the symbol list.
+	    progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	    for arg in $progfiles; do
+	      $show "extracting global C symbols from \`$arg'"
+	      $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+	    done
+
+	    if test -n "$exclude_expsyms"; then
+	      $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 '$mv "$nlist"T "$nlist"'
+	    fi
+
+	    # Prepare the list of exported symbols
+	    if test -z "$export_symbols"; then
+	      export_symbols="$output_objdir/$outputname.exp"
+	      $run $rm $export_symbols
+	      $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+              case $host in
+              *cygwin* | *mingw* )
+	        $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+		$run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+                ;;
+              esac
+	    else
+	      $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+	      $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+	      $run eval 'mv "$nlist"T "$nlist"'
+              case $host in
+              *cygwin* | *mingw* )
+	        $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+		$run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+                ;;
+              esac
+	    fi
+	  fi
+
+	  for arg in $dlprefiles; do
+	    $show "extracting global C symbols from \`$arg'"
+	    name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
+	    $run eval '$echo ": $name " >> "$nlist"'
+	    $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+	  done
+
+	  if test -z "$run"; then
+	    # Make sure we have at least an empty file.
+	    test -f "$nlist" || : > "$nlist"
+
+	    if test -n "$exclude_expsyms"; then
+	      $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+	      $mv "$nlist"T "$nlist"
+	    fi
+
+	    # Try sorting and uniquifying the output.
+	    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
+	    fi
+
+	    if test -f "$nlist"S; then
+	      eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
+	    else
+	      $echo '/* NONE */' >> "$output_objdir/$dlsyms"
+	    fi
+
+	    $echo >> "$output_objdir/$dlsyms" "\
+
+#undef lt_preloaded_symbols
+
+#if defined (__STDC__) && __STDC__
+# define lt_ptr void *
+#else
+# define lt_ptr char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+"
+
+	    case $host in
+	    *cygwin* | *mingw* )
+	  $echo >> "$output_objdir/$dlsyms" "\
+/* DATA imports from DLLs on WIN32 can't be const, because
+   runtime relocations are performed -- see ld's documentation
+   on pseudo-relocs */
+struct {
+"
+	      ;;
+	    * )
+	  $echo >> "$output_objdir/$dlsyms" "\
+const struct {
+"
+	      ;;
+	    esac
+
+
+	  $echo >> "$output_objdir/$dlsyms" "\
+  const char *name;
+  lt_ptr address;
+}
+lt_preloaded_symbols[] =
+{\
+"
+
+	    eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
+
+	    $echo >> "$output_objdir/$dlsyms" "\
+  {0, (lt_ptr) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+	  fi
+
+	  pic_flag_for_symtable=
+	  case $host in
+	  # compiling the symbol table file with pic_flag works around
+	  # a FreeBSD bug that causes programs to crash when -lm is
+	  # linked before any other PIC object.  But we must not use
+	  # pic_flag when linking with -static.  The problem exists in
+	  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+	  *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+	    case "$compile_command " in
+	    *" -static "*) ;;
+	    *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
+	    esac;;
+	  *-*-hpux*)
+	    case "$compile_command " in
+	    *" -static "*) ;;
+	    *) pic_flag_for_symtable=" $pic_flag";;
+	    esac
+	  esac
+
+	  # Now compile the dynamic symbol file.
+	  $show "(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
+	  $run eval '(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
+
+	  # Clean up the generated files.
+	  $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
+	  $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
+
+	  # Transform the symbol file into the correct name.
+          case $host in
+          *cygwin* | *mingw* )
+            if test -f "$output_objdir/${outputname}.def" ; then
+              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
+              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
+            else
+              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+             fi
+            ;;
+          * )
+            compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+            finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+            ;;
+          esac
+	  ;;
+	*)
+	  $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+      else
+	# We keep going just in case the user didn't refer to
+	# lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
+	# really was required.
+
+	# Nullify the symbol file.
+	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
+	finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
+      fi
+
+      if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+	# Replace the output file specification.
+	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
+	link_command="$compile_command$compile_rpath"
+
+	# We have no uninstalled library dependencies, so finalize right now.
+	$show "$link_command"
+	$run eval "$link_command"
+	exit_status=$?
+
+	# Delete the generated files.
+	if test -n "$dlsyms"; then
+	  $show "$rm $output_objdir/${outputname}S.${objext}"
+	  $run $rm "$output_objdir/${outputname}S.${objext}"
+	fi
+
+	exit $exit_status
+      fi
+
+      if test -n "$shlibpath_var"; then
+	# We should set the shlibpath_var
+	rpath=
+	for dir in $temp_rpath; do
+	  case $dir in
+	  [\\/]* | [A-Za-z]:[\\/]*)
+	    # Absolute path.
+	    rpath="$rpath$dir:"
+	    ;;
+	  *)
+	    # Relative path: add a thisdir entry.
+	    rpath="$rpath\$thisdir/$dir:"
+	    ;;
+	  esac
+	done
+	temp_rpath="$rpath"
+      fi
+
+      if test -n "$compile_shlibpath$finalize_shlibpath"; then
+	compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+      fi
+      if test -n "$finalize_shlibpath"; then
+	finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+      fi
+
+      compile_var=
+      finalize_var=
+      if test -n "$runpath_var"; then
+	if test -n "$perm_rpath"; then
+	  # We should set the runpath_var.
+	  rpath=
+	  for dir in $perm_rpath; do
+	    rpath="$rpath$dir:"
+	  done
+	  compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+	fi
+	if test -n "$finalize_perm_rpath"; then
+	  # We should set the runpath_var.
+	  rpath=
+	  for dir in $finalize_perm_rpath; do
+	    rpath="$rpath$dir:"
+	  done
+	  finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+	fi
+      fi
+
+      if test "$no_install" = yes; then
+	# We don't need to create a wrapper script.
+	link_command="$compile_var$compile_command$compile_rpath"
+	# Replace the output file specification.
+	link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+	# Delete the old output file.
+	$run $rm $output
+	# Link the executable and exit
+	$show "$link_command"
+	$run eval "$link_command" || exit $?
+	exit $EXIT_SUCCESS
+      fi
+
+      if test "$hardcode_action" = relink; then
+	# Fast installation is not supported
+	link_command="$compile_var$compile_command$compile_rpath"
+	relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+	$echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
+	$echo "$modename: \`$output' will be relinked during installation" 1>&2
+      else
+	if test "$fast_install" != no; then
+	  link_command="$finalize_var$compile_command$finalize_rpath"
+	  if test "$fast_install" = yes; then
+	    relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
+	  else
+	    # fast_install is set to needless
+	    relink_command=
+	  fi
+	else
+	  link_command="$compile_var$compile_command$compile_rpath"
+	  relink_command="$finalize_var$finalize_command$finalize_rpath"
+	fi
+      fi
+
+      # Replace the output file specification.
+      link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+      # Delete the old output files.
+      $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+      $show "$link_command"
+      $run eval "$link_command" || exit $?
+
+      # Now create the wrapper script.
+      $show "creating $output"
+
+      # Quote the relink command for shipping.
+      if test -n "$relink_command"; then
+	# Preserve any variables that may affect compiler behavior
+	for var in $variables_saved_for_relink; do
+	  if eval test -z \"\${$var+set}\"; then
+	    relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+	  elif eval var_value=\$$var; test -z "$var_value"; then
+	    relink_command="$var=; export $var; $relink_command"
+	  else
+	    var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+	    relink_command="$var=\"$var_value\"; export $var; $relink_command"
+	  fi
+	done
+	relink_command="(cd `pwd`; $relink_command)"
+	relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
+      fi
+
+      # Quote $echo for shipping.
+      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
+	qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
+      fi
+
+      # Only actually do things if our run command is non-null.
+      if test -z "$run"; then
+	# 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$,,'` ;;
+	esac
+	# test for cygwin because mv fails w/o .exe extensions
+	case $host in
+	  *cygwin*)
+	    exeext=.exe
+	    outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
+	  *) exeext= ;;
+	esac
+	case $host in
+	  *cygwin* | *mingw* )
+            output_name=`basename $output`
+            output_path=`dirname $output`
+            cwrappersource="$output_path/$objdir/lt-$output_name.c"
+            cwrapper="$output_path/$output_name.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>
+#include <string.h>
+#include <ctype.h>
+#include <sys/stat.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 '/'
+# define PATH_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
+# ifndef PATH_SEPARATOR_2
+#  define PATH_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 */
+
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
+#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+  if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+/* -DDEBUG is fairly common in CFLAGS.  */
+#undef DEBUG
+#if defined DEBUGWRAPPER
+# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
+#else
+# define DEBUG(format, ...)
+#endif
+
+const char *program_name = NULL;
+
+void * xmalloc (size_t num);
+char * xstrdup (const char *string);
+const char * base_name (const char *name);
+char * find_executable(const char *wrapper);
+int    check_executable(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 (base_name (argv[0]));
+  DEBUG("(main) argv[0]      : %s\n",argv[0]);
+  DEBUG("(main) program_name : %s\n",program_name);
+  newargz = XMALLOC(char *, argc+2);
+EOF
+
+            cat >> $cwrappersource <<EOF
+  newargz[0] = (char *) xstrdup("$SHELL");
+EOF
+
+            cat >> $cwrappersource <<"EOF"
+  newargz[1] = find_executable(argv[0]);
+  if (newargz[1] == NULL)
+    lt_fatal("Couldn't find %s", argv[0]);
+  DEBUG("(main) found exe at : %s\n",newargz[1]);
+  /* 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;
+
+  for (i=0; i<argc+1; i++)
+  {
+    DEBUG("(main) newargz[%d]   : %s\n",i,newargz[i]);
+    ;
+  }
+
+EOF
+
+            case $host_os in
+              mingw*)
+                cat >> $cwrappersource <<EOF
+  execv("$SHELL",(char const **)newargz);
+EOF
+              ;;
+              *)
+                cat >> $cwrappersource <<EOF
+  execv("$SHELL",newargz);
+EOF
+              ;;
+            esac
+
+            cat >> $cwrappersource <<"EOF"
+  return 127;
+}
+
+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
+;
+}
+
+const char *
+base_name (const char *name)
+{
+  const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  /* Skip over the disk name in MSDOS pathnames. */
+  if (isalpha ((unsigned char)name[0]) && name[1] == ':')
+    name += 2;
+#endif
+
+  for (base = name; *name; name++)
+    if (IS_DIR_SEPARATOR (*name))
+      base = name + 1;
+  return base;
+}
+
+int
+check_executable(const char * path)
+{
+  struct stat st;
+
+  DEBUG("(check_executable)  : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
+  if ((!path) || (!*path))
+    return 0;
+
+  if ((stat (path, &st) >= 0) &&
+      (
+        /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
+#if defined (S_IXOTH)
+       ((st.st_mode & S_IXOTH) == S_IXOTH) ||
+#endif
+#if defined (S_IXGRP)
+       ((st.st_mode & S_IXGRP) == S_IXGRP) ||
+#endif
+       ((st.st_mode & S_IXUSR) == S_IXUSR))
+      )
+    return 1;
+  else
+    return 0;
+}
+
+/* Searches for the full path of the wrapper.  Returns
+   newly allocated full path name if found, NULL otherwise */
+char *
+find_executable (const char* wrapper)
+{
+  int has_slash = 0;
+  const char* p;
+  const char* p_next;
+  /* static buffer for getcwd */
+  char tmp[LT_PATHMAX + 1];
+  int tmp_len;
+  char* concat_name;
+
+  DEBUG("(find_executable)  : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
+
+  if ((wrapper == NULL) || (*wrapper == '\0'))
+    return NULL;
+
+  /* Absolute path? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
+  {
+    concat_name = xstrdup (wrapper);
+    if (check_executable(concat_name))
+      return concat_name;
+    XFREE(concat_name);
+  }
+  else
+  {
+#endif
+    if (IS_DIR_SEPARATOR (wrapper[0]))
+    {
+      concat_name = xstrdup (wrapper);
+      if (check_executable(concat_name))
+        return concat_name;
+      XFREE(concat_name);
+    }
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  }
+#endif
+
+  for (p = wrapper; *p; p++)
+    if (*p == '/')
+    {
+      has_slash = 1;
+      break;
+    }
+  if (!has_slash)
+  {
+    /* no slashes; search PATH */
+    const char* path = getenv ("PATH");
+    if (path != NULL)
+    {
+      for (p = path; *p; p = p_next)
+      {
+        const char* q;
+        size_t p_len;
+        for (q = p; *q; q++)
+          if (IS_PATH_SEPARATOR(*q))
+            break;
+        p_len = q - p;
+        p_next = (*q == '\0' ? q : q + 1);
+        if (p_len == 0)
+        {
+          /* empty path: current directory */
+          if (getcwd (tmp, LT_PATHMAX) == NULL)
+            lt_fatal ("getcwd failed");
+          tmp_len = strlen(tmp);
+          concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
+          memcpy (concat_name, tmp, tmp_len);
+          concat_name[tmp_len] = '/';
+          strcpy (concat_name + tmp_len + 1, wrapper);
+        }
+        else
+        {
+          concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
+          memcpy (concat_name, p, p_len);
+          concat_name[p_len] = '/';
+          strcpy (concat_name + p_len + 1, wrapper);
+        }
+        if (check_executable(concat_name))
+          return concat_name;
+        XFREE(concat_name);
+      }
+    }
+    /* not found in PATH; assume curdir */
+  }
+  /* Relative path | not found in path: prepend cwd */
+  if (getcwd (tmp, LT_PATHMAX) == NULL)
+    lt_fatal ("getcwd failed");
+  tmp_len = strlen(tmp);
+  concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
+  memcpy (concat_name, tmp, tmp_len);
+  concat_name[tmp_len] = '/';
+  strcpy (concat_name + tmp_len + 1, wrapper);
+
+  if (check_executable(concat_name))
+    return concat_name;
+  XFREE(concat_name);
+  return NULL;
+}
+
+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 $LTCFLAGS -s -o $cwrapper $cwrappersource
+          ;;
+        esac
+        $rm $output
+        trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
+
+	$echo > $output "\
+#! $SHELL
+
+# $output - temporary wrapper script 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 script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='${SED} -e 1s/^X//'
+sed_quote_subst='$sed_quote_subst'
+
+# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
+else
+  case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# 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
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+  # install mode needs the following variable:
+  notinst_deplibs='$notinst_deplibs'
+else
+  # When we are sourced in execute mode, \$file and \$echo are already set.
+  if test \"\$libtool_execute_magic\" != \"$magic\"; then
+    echo=\"$qecho\"
+    file=\"\$0\"
+    # Make sure echo works.
+    if test \"X\$1\" = X--no-reexec; then
+      # Discard the --no-reexec flag, and continue.
+      shift
+    elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
+      # Yippee, \$echo works!
+      :
+    else
+      # Restart under the correct shell, and then maybe \$echo will work.
+      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
+    fi
+  fi\
+"
+	$echo >> $output "\
+
+  # Find the directory that this script lives in.
+  thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+  # Follow symbolic links until we get to the real thisdir.
+  file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
+  while test -n \"\$file\"; do
+    destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+
+    # If there was a directory component, then change thisdir.
+    if test \"x\$destdir\" != \"x\$file\"; then
+      case \"\$destdir\" in
+      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+      *) thisdir=\"\$thisdir/\$destdir\" ;;
+      esac
+    fi
+
+    file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
+    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
+  done
+
+  # Try to get the absolute directory name.
+  absdir=\`cd \"\$thisdir\" && pwd\`
+  test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+	if test "$fast_install" = yes; then
+	  $echo >> $output "\
+  program=lt-'$outputname'$exeext
+  progdir=\"\$thisdir/$objdir\"
+
+  if test ! -f \"\$progdir/\$program\" || \\
+     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
+       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+    file=\"\$\$-\$program\"
+
+    if test ! -d \"\$progdir\"; then
+      $mkdir \"\$progdir\"
+    else
+      $rm \"\$progdir/\$file\"
+    fi"
+
+	  $echo >> $output "\
+
+    # relink executable if necessary
+    if test -n \"\$relink_command\"; then
+      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+      else
+	$echo \"\$relink_command_output\" >&2
+	$rm \"\$progdir/\$file\"
+	exit $EXIT_FAILURE
+      fi
+    fi
+
+    $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+    { $rm \"\$progdir/\$program\";
+      $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+    $rm \"\$progdir/\$file\"
+  fi"
+	else
+	  $echo >> $output "\
+  program='$outputname'
+  progdir=\"\$thisdir/$objdir\"
+"
+	fi
+
+	$echo >> $output "\
+
+  if test -f \"\$progdir/\$program\"; then"
+
+	# Export our shlibpath_var if we have one.
+	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+	  $echo >> $output "\
+    # Add our own library path to $shlibpath_var
+    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+    # Some systems cannot cope with colon-terminated $shlibpath_var
+    # The second colon is a workaround for a bug in BeOS R4 sed
+    $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+
+    export $shlibpath_var
+"
+	fi
+
+	# fixup the dll searchpath if we need to.
+	if test -n "$dllsearchpath"; then
+	  $echo >> $output "\
+    # Add the dll search path components to the executable PATH
+    PATH=$dllsearchpath:\$PATH
+"
+	fi
+
+	$echo >> $output "\
+    if test \"\$libtool_execute_magic\" != \"$magic\"; then
+      # Run the actual program with our arguments.
+"
+	case $host in
+	# Backslashes separate directories on plain windows
+	*-*-mingw | *-*-os2*)
+	  $echo >> $output "\
+      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+	  ;;
+
+	*)
+	  $echo >> $output "\
+      exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+	  ;;
+	esac
+	$echo >> $output "\
+      \$echo \"\$0: cannot exec \$program \$*\"
+      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 $EXIT_FAILURE
+  fi
+fi\
+"
+	chmod +x $output
+      fi
+      exit $EXIT_SUCCESS
+      ;;
+    esac
+
+    # See if we need to build an old-fashioned archive.
+    for oldlib in $oldlibs; do
+
+      if test "$build_libtool_libs" = convenience; then
+	oldobjs="$libobjs_save"
+	addlibs="$convenience"
+	build_libtool_libs=no
+      else
+	if test "$build_libtool_libs" = module; then
+	  oldobjs="$libobjs_save"
+	  build_libtool_libs=no
+	else
+	  oldobjs="$old_deplibs $non_pic_objects"
+	fi
+	addlibs="$old_convenience"
+      fi
+
+      if test -n "$addlibs"; then
+	gentop="$output_objdir/${outputname}x"
+	generated="$generated $gentop"
+
+	func_extract_archives $gentop $addlibs
+	oldobjs="$oldobjs $func_extract_archives_result"
+      fi
+
+      # Do each command in the archive commands.
+      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+       cmds=$old_archive_from_new_cmds
+      else
+	# POSIX demands no paths to be encoded in archives.  We have
+	# to avoid creating archives with duplicate basenames if we
+	# might have to extract them afterwards, e.g., when creating a
+	# static archive out of a convenience library, or when linking
+	# the entirety of a libtool archive into another (currently
+	# not supported by libtool).
+	if (for obj in $oldobjs
+	    do
+	      $echo "X$obj" | $Xsed -e 's%^.*/%%'
+	    done | sort | sort -uc >/dev/null 2>&1); then
+	  :
+	else
+	  $echo "copying selected object files to avoid basename conflicts..."
+
+	  if test -z "$gentop"; then
+	    gentop="$output_objdir/${outputname}x"
+	    generated="$generated $gentop"
+
+	    $show "${rm}r $gentop"
+	    $run ${rm}r "$gentop"
+	    $show "$mkdir $gentop"
+	    $run $mkdir "$gentop"
+	    exit_status=$?
+	    if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
+	      exit $exit_status
+	    fi
+	  fi
+
+	  save_oldobjs=$oldobjs
+	  oldobjs=
+	  counter=1
+	  for obj in $save_oldobjs
+	  do
+	    objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+	    case " $oldobjs " in
+	    " ") oldobjs=$obj ;;
+	    *[\ /]"$objbase "*)
+	      while :; do
+		# Make sure we don't pick an alternate name that also
+		# overlaps.
+		newobj=lt$counter-$objbase
+		counter=`expr $counter + 1`
+		case " $oldobjs " in
+		*[\ /]"$newobj "*) ;;
+		*) if test ! -f "$gentop/$newobj"; then break; fi ;;
+		esac
+	      done
+	      $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+	      $run ln "$obj" "$gentop/$newobj" ||
+	      $run cp "$obj" "$gentop/$newobj"
+	      oldobjs="$oldobjs $gentop/$newobj"
+	      ;;
+	    *) oldobjs="$oldobjs $obj" ;;
+	    esac
+	  done
+	fi
+
+	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..."
+	  save_RANLIB=$RANLIB
+	  RANLIB=:
+	  objlist=
+	  concat_cmds=
+	  save_oldobjs=$oldobjs
+
+	  # 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"
+	    objlist="$objlist $obj"
+	    eval test_cmds=\"$old_archive_cmds\"
+	    if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
+	       test "$len" -le "$max_cmd_len"; then
+	      :
+	    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=
+	    fi
+	  done
+	  RANLIB=$save_RANLIB
+	  oldobjs=$objlist
+	  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 $?
+      done
+      IFS="$save_ifs"
+    done
+
+    if test -n "$generated"; then
+      $show "${rm}r$generated"
+      $run ${rm}r$generated
+    fi
+
+    # Now create the libtool archive.
+    case $output in
+    *.la)
+      old_library=
+      test "$build_old_libs" = yes && old_library="$libname.$libext"
+      $show "creating $output"
+
+      # Preserve any variables that may affect compiler behavior
+      for var in $variables_saved_for_relink; do
+	if eval test -z \"\${$var+set}\"; then
+	  relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+	elif eval var_value=\$$var; test -z "$var_value"; then
+	  relink_command="$var=; export $var; $relink_command"
+	else
+	  var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+	  relink_command="$var=\"$var_value\"; export $var; $relink_command"
+	fi
+      done
+      # Quote the link command for shipping.
+      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+      relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
+      if test "$hardcode_automatic" = yes ; then
+	relink_command=
+      fi
+
+
+      # Only create the output if not a dry run.
+      if test -z "$run"; then
+	for installed in no yes; do
+	  if test "$installed" = yes; then
+	    if test -z "$install_libdir"; then
+	      break
+	    fi
+	    output="$output_objdir/$outputname"i
+	    # Replace all uninstalled libtool libraries with the installed ones
+	    newdependency_libs=
+	    for deplib in $dependency_libs; do
+	      case $deplib in
+	      *.la)
+		name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
+		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
+		newdependency_libs="$newdependency_libs $libdir/$name"
+		;;
+	      *) newdependency_libs="$newdependency_libs $deplib" ;;
+	      esac
+	    done
+	    dependency_libs="$newdependency_libs"
+	    newdlfiles=
+	    for lib in $dlfiles; do
+	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+	      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 $EXIT_FAILURE
+	      fi
+	      newdlfiles="$newdlfiles $libdir/$name"
+	    done
+	    dlfiles="$newdlfiles"
+	    newdlprefiles=
+	    for lib in $dlprefiles; do
+	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+	      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 $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 | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+	  esac
+	  $echo > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+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; then
+	    $echo >> $output "\
+relink_command=\"$relink_command\""
+	  fi
+	done
+      fi
+
+      # Do a symbolic link so that the libtool archive can be found in
+      # LD_LIBRARY_PATH before the program is installed.
+      $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
+      $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
+      ;;
+    esac
+    exit $EXIT_SUCCESS
+    ;;
+
+  # libtool install mode
+  install)
+    modename="$modename: install"
+
+    # There may be an optional sh(1) argument at the beginning of
+    # install_prog (especially on Windows NT).
+    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+       # Allow the use of GNU shtool's install command.
+       $echo "X$nonopt" | grep shtool > /dev/null; then
+      # Aesthetically quote it.
+      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
+      case $arg in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	arg="\"$arg\""
+	;;
+      esac
+      install_prog="$arg "
+      arg="$1"
+      shift
+    else
+      install_prog=
+      arg=$nonopt
+    fi
+
+    # The real first argument should be the name of the installation program.
+    # Aesthetically quote it.
+    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+    case $arg in
+    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+      arg="\"$arg\""
+      ;;
+    esac
+    install_prog="$install_prog$arg"
+
+    # We need to accept at least all the BSD install flags.
+    dest=
+    files=
+    opts=
+    prev=
+    install_type=
+    isdir=no
+    stripme=
+    for arg
+    do
+      if test -n "$dest"; then
+	files="$files $dest"
+	dest=$arg
+	continue
+      fi
+
+      case $arg in
+      -d) isdir=yes ;;
+      -f) 
+      	case " $install_prog " in
+	*[\\\ /]cp\ *) ;;
+	*) prev=$arg ;;
+	esac
+	;;
+      -g | -m | -o) prev=$arg ;;
+      -s)
+	stripme=" -s"
+	continue
+	;;
+      -*)
+	;;
+      *)
+	# If the previous option needed an argument, then skip it.
+	if test -n "$prev"; then
+	  prev=
+	else
+	  dest=$arg
+	  continue
+	fi
+	;;
+      esac
+
+      # Aesthetically quote the argument.
+      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+      case $arg in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	arg="\"$arg\""
+	;;
+      esac
+      install_prog="$install_prog $arg"
+    done
+
+    if test -z "$install_prog"; then
+      $echo "$modename: you must specify an install program" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    if test -n "$prev"; then
+      $echo "$modename: the \`$prev' option requires an argument" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    if test -z "$files"; then
+      if test -z "$dest"; then
+	$echo "$modename: no file or destination specified" 1>&2
+      else
+	$echo "$modename: you must specify a destination" 1>&2
+      fi
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    # Strip any trailing slash from the destination.
+    dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
+
+    # Check to see that the destination is a directory.
+    test -d "$dest" && isdir=yes
+    if test "$isdir" = yes; then
+      destdir="$dest"
+      destname=
+    else
+      destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
+      test "X$destdir" = "X$dest" && destdir=.
+      destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
+
+      # Not a directory, so check to see that there is only one file specified.
+      set dummy $files
+      if test "$#" -gt 2; then
+	$echo "$modename: \`$dest' is not a directory" 1>&2
+	$echo "$help" 1>&2
+	exit $EXIT_FAILURE
+      fi
+    fi
+    case $destdir in
+    [\\/]* | [A-Za-z]:[\\/]*) ;;
+    *)
+      for file in $files; do
+	case $file in
+	*.lo) ;;
+	*)
+	  $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+      done
+      ;;
+    esac
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    staticlibs=
+    future_libdirs=
+    current_libdirs=
+    for file in $files; do
+
+      # Do each installation.
+      case $file in
+      *.$libext)
+	# Do the static libraries later.
+	staticlibs="$staticlibs $file"
+	;;
+
+      *.la)
+	# Check to see that this really is a libtool archive.
+	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 $EXIT_FAILURE
+	fi
+
+	library_names=
+	old_library=
+	relink_command=
+	# If there is no directory component, then add one.
+	case $file in
+	*/* | *\\*) . $file ;;
+	*) . ./$file ;;
+	esac
+
+	# Add the libdir to current_libdirs if it is the destination.
+	if test "X$destdir" = "X$libdir"; then
+	  case "$current_libdirs " in
+	  *" $libdir "*) ;;
+	  *) current_libdirs="$current_libdirs $libdir" ;;
+	  esac
+	else
+	  # Note the libdir as a future libdir.
+	  case "$future_libdirs " in
+	  *" $libdir "*) ;;
+	  *) future_libdirs="$future_libdirs $libdir" ;;
+	  esac
+	fi
+
+	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
+	test "X$dir" = "X$file/" && dir=
+	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" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
+	  else
+	    relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
+	  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
+	    exit $EXIT_FAILURE
+	  fi
+	fi
+
+	# See the names of the shared library.
+	set dummy $library_names
+	if test -n "$2"; then
+	  realname="$2"
+	  shift
+	  shift
+
+	  srcname="$realname"
+	  test -n "$relink_command" && srcname="$realname"T
+
+	  # Install the shared library and build the symlinks.
+	  $show "$install_prog $dir/$srcname $destdir/$realname"
+	  $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
+	  if test -n "$stripme" && test -n "$striplib"; then
+	    $show "$striplib $destdir/$realname"
+	    $run eval "$striplib $destdir/$realname" || exit $?
+	  fi
+
+	  if test "$#" -gt 0; then
+	    # Delete the old symlinks, and create new ones.
+	    # Try `ln -sf' first, because the `ln' binary might depend on
+	    # the symlink we replace!  Solaris /bin/ln does not understand -f,
+	    # so we also need to try rm && ln -s.
+	    for linkname
+	    do
+	      if test "$linkname" != "$realname"; then
+                $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
+                $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
+	      fi
+	    done
+	  fi
+
+	  # Do each command in the postinstall commands.
+	  lib="$destdir/$realname"
+	  cmds=$postinstall_cmds
+	  save_ifs="$IFS"; IFS='~'
+	  for cmd in $cmds; do
+	    IFS="$save_ifs"
+	    eval cmd=\"$cmd\"
+	    $show "$cmd"
+	    $run eval "$cmd" || {
+	      lt_exit=$?
+
+	      # Restore the uninstalled library and exit
+	      if test "$mode" = relink; then
+		$run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
+	      fi
+
+	      exit $lt_exit
+	    }
+	  done
+	  IFS="$save_ifs"
+	fi
+
+	# Install the pseudo-library for information purposes.
+	name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+	instname="$dir/$name"i
+	$show "$install_prog $instname $destdir/$name"
+	$run eval "$install_prog $instname $destdir/$name" || exit $?
+
+	# Maybe install the static library, too.
+	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+	;;
+
+      *.lo)
+	# Install (i.e. copy) a libtool object.
+
+	# Figure out destination file name, if it wasn't already specified.
+	if test -n "$destname"; then
+	  destfile="$destdir/$destname"
+	else
+	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+	  destfile="$destdir/$destfile"
+	fi
+
+	# Deduce the name of the destination old-style object file.
+	case $destfile in
+	*.lo)
+	  staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
+	  ;;
+	*.$objext)
+	  staticdest="$destfile"
+	  destfile=
+	  ;;
+	*)
+	  $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+
+	# Install the libtool object if requested.
+	if test -n "$destfile"; then
+	  $show "$install_prog $file $destfile"
+	  $run eval "$install_prog $file $destfile" || exit $?
+	fi
+
+	# Install the old object if enabled.
+	if test "$build_old_libs" = yes; then
+	  # Deduce the name of the old-style object file.
+	  staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
+
+	  $show "$install_prog $staticobj $staticdest"
+	  $run eval "$install_prog \$staticobj \$staticdest" || exit $?
+	fi
+	exit $EXIT_SUCCESS
+	;;
+
+      *)
+	# Figure out destination file name, if it wasn't already specified.
+	if test -n "$destname"; then
+	  destfile="$destdir/$destname"
+	else
+	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+	  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=$file
+	    ;;
+	esac
+	if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
+	  notinst_deplibs=
+	  relink_command=
+
+	  # Note that it is not necessary on cygwin/mingw to append a dot to
+	  # foo even if both foo and FILE.exe exist: automatic-append-.exe
+	  # behavior happens only for exec(3), not for open(2)!  Also, sourcing
+	  # `FILE.' does not work on cygwin managed mounts.
+	  #
+	  # If there is no directory component, then add one.
+	  case $wrapper in
+	  */* | *\\*) . ${wrapper} ;;
+	  *) . ./${wrapper} ;;
+	  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 $EXIT_FAILURE
+	  fi
+
+	  finalize=yes
+	  for lib in $notinst_deplibs; do
+	    # Check to see that each library is installed.
+	    libdir=
+	    if test -f "$lib"; then
+	      # If there is no directory component, then add one.
+	      case $lib in
+	      */* | *\\*) . $lib ;;
+	      *) . ./$lib ;;
+	      esac
+	    fi
+	    libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
+	    if test -n "$libdir" && test ! -f "$libfile"; then
+	      $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
+	      finalize=no
+	    fi
+	  done
+
+	  relink_command=
+	  # Note that it is not necessary on cygwin/mingw to append a dot to
+	  # foo even if both foo and FILE.exe exist: automatic-append-.exe
+	  # behavior happens only for exec(3), not for open(2)!  Also, sourcing
+	  # `FILE.' does not work on cygwin managed mounts.
+	  #
+	  # If there is no directory component, then add one.
+	  case $wrapper in
+	  */* | *\\*) . ${wrapper} ;;
+	  *) . ./${wrapper} ;;
+	  esac
+
+	  outputname=
+	  if test "$fast_install" = no && test -n "$relink_command"; then
+	    if test "$finalize" = yes && test -z "$run"; then
+	      tmpdir=`func_mktempdir`
+	      file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
+	      outputname="$tmpdir/$file"
+	      # Replace the output file specification.
+	      relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
+
+	      $show "$relink_command"
+	      if $run eval "$relink_command"; then :
+	      else
+		$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+		${rm}r "$tmpdir"
+		continue
+	      fi
+	      file="$outputname"
+	    else
+	      $echo "$modename: warning: cannot relink \`$file'" 1>&2
+	    fi
+	  else
+	    # Install the binary that we compiled earlier.
+	    file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+	  fi
+	fi
+
+	# remove .exe since cygwin /usr/bin/install will append another
+	# one anyway 
+	case $install_prog,$host in
+	*/usr/bin/install*,*cygwin*)
+	  case $file:$destfile in
+	  *.exe:*.exe)
+	    # this is ok
+	    ;;
+	  *.exe:*)
+	    destfile=$destfile.exe
+	    ;;
+	  *:*.exe)
+	    destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
+	    ;;
+	  esac
+	  ;;
+	esac
+	$show "$install_prog$stripme $file $destfile"
+	$run eval "$install_prog\$stripme \$file \$destfile" || exit $?
+	test -n "$outputname" && ${rm}r "$tmpdir"
+	;;
+      esac
+    done
+
+    for file in $staticlibs; do
+      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+
+      # Set up the ranlib parameters.
+      oldlib="$destdir/$name"
+
+      $show "$install_prog $file $oldlib"
+      $run eval "$install_prog \$file \$oldlib" || exit $?
+
+      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.
+      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
+      IFS="$save_ifs"
+    done
+
+    if test -n "$future_libdirs"; then
+      $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
+    fi
+
+    if test -n "$current_libdirs"; then
+      # Maybe just do a dry run.
+      test -n "$run" && current_libdirs=" -n$current_libdirs"
+      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+    else
+      exit $EXIT_SUCCESS
+    fi
+    ;;
+
+  # libtool finish mode
+  finish)
+    modename="$modename: finish"
+    libdirs="$nonopt"
+    admincmds=
+
+    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+      for dir
+      do
+	libdirs="$libdirs $dir"
+      done
+
+      for libdir in $libdirs; do
+	if test -n "$finish_cmds"; then
+	  # Do each command in the finish commands.
+	  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"
+	  done
+	  IFS="$save_ifs"
+	fi
+	if test -n "$finish_eval"; then
+	  # Do the single finish_eval.
+	  eval cmds=\"$finish_eval\"
+	  $run eval "$cmds" || admincmds="$admincmds
+       $cmds"
+	fi
+      done
+    fi
+
+    # Exit here if they wanted silent mode.
+    test "$show" = : && exit $EXIT_SUCCESS
+
+    $echo "X----------------------------------------------------------------------" | $Xsed
+    $echo "Libraries have been installed in:"
+    for libdir in $libdirs; do
+      $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:"
+    if test -n "$shlibpath_var"; then
+      $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"
+    fi
+    if test -n "$hardcode_libdir_flag_spec"; then
+      libdir=LIBDIR
+      eval flag=\"$hardcode_libdir_flag_spec\"
+
+      $echo "   - use the \`$flag' linker flag"
+    fi
+    if test -n "$admincmds"; then
+      $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'"
+    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 "X----------------------------------------------------------------------" | $Xsed
+    exit $EXIT_SUCCESS
+    ;;
+
+  # libtool execute mode
+  execute)
+    modename="$modename: execute"
+
+    # The first argument is the command name.
+    cmd="$nonopt"
+    if test -z "$cmd"; then
+      $echo "$modename: you must specify a COMMAND" 1>&2
+      $echo "$help"
+      exit $EXIT_FAILURE
+    fi
+
+    # Handle -dlopen flags immediately.
+    for file in $execute_dlfiles; do
+      if test ! -f "$file"; then
+	$echo "$modename: \`$file' is not a file" 1>&2
+	$echo "$help" 1>&2
+	exit $EXIT_FAILURE
+      fi
+
+      dir=
+      case $file in
+      *.la)
+	# Check to see that this really is a libtool archive.
+	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 $EXIT_FAILURE
+	fi
+
+	# Read the libtool library.
+	dlname=
+	library_names=
+
+	# If there is no directory component, then add one.
+	case $file in
+	*/* | *\\*) . $file ;;
+	*) . ./$file ;;
+	esac
+
+	# Skip this library if it cannot be dlopened.
+	if test -z "$dlname"; then
+	  # Warn if it was a shared library.
+	  test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
+	  continue
+	fi
+
+	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+	test "X$dir" = "X$file" && dir=.
+
+	if test -f "$dir/$objdir/$dlname"; then
+	  dir="$dir/$objdir"
+	else
+	  if test ! -f "$dir/$dlname"; then
+	    $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	fi
+	;;
+
+      *.lo)
+	# Just add the directory containing the .lo file.
+	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+	test "X$dir" = "X$file" && dir=.
+	;;
+
+      *)
+	$echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
+	continue
+	;;
+      esac
+
+      # Get the absolute pathname.
+      absdir=`cd "$dir" && pwd`
+      test -n "$absdir" && dir="$absdir"
+
+      # Now add the directory to shlibpath_var.
+      if eval "test -z \"\$$shlibpath_var\""; then
+	eval "$shlibpath_var=\"\$dir\""
+      else
+	eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+      fi
+    done
+
+    # This variable tells wrapper scripts just to set shlibpath_var
+    # rather than running their programs.
+    libtool_execute_magic="$magic"
+
+    # Check if any of the arguments is a wrapper script.
+    args=
+    for file
+    do
+      case $file in
+      -*) ;;
+      *)
+	# Do a test to see if this is really a libtool program.
+	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 ;;
+	  *) . ./$file ;;
+	  esac
+
+	  # Transform arg to wrapped name.
+	  file="$progdir/$program"
+	fi
+	;;
+      esac
+      # Quote arguments (to preserve shell metacharacters).
+      file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
+      args="$args \"$file\""
+    done
+
+    if test -z "$run"; then
+      if test -n "$shlibpath_var"; then
+	# Export the shlibpath_var.
+	eval "export $shlibpath_var"
+      fi
+
+      # Restore saved environment variables
+      for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+      do
+	eval "if test \"\${save_$lt_var+set}\" = set; then
+		$lt_var=\$save_$lt_var; export $lt_var
+	      fi"
+      done
+
+      # Now prepare to actually exec the command.
+      exec_cmd="\$cmd$args"
+    else
+      # Display what would be done.
+      if test -n "$shlibpath_var"; then
+	eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
+	$echo "export $shlibpath_var"
+      fi
+      $echo "$cmd$args"
+      exit $EXIT_SUCCESS
+    fi
+    ;;
+
+  # libtool clean and uninstall mode
+  clean | uninstall)
+    modename="$modename: $mode"
+    rm="$nonopt"
+    files=
+    rmforce=
+    exit_status=0
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    for arg
+    do
+      case $arg in
+      -f) rm="$rm $arg"; rmforce=yes ;;
+      -*) rm="$rm $arg" ;;
+      *) files="$files $arg" ;;
+      esac
+    done
+
+    if test -z "$rm"; then
+      $echo "$modename: you must specify an RM program" 1>&2
+      $echo "$help" 1>&2
+      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="$origobjdir"
+      else
+	objdir="$dir/$origobjdir"
+      fi
+      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+      test "$mode" = uninstall && objdir="$dir"
+
+      # Remember objdir for removal later, being careful to avoid duplicates
+      if test "$mode" = clean; then
+	case " $rmdirs " in
+	  *" $objdir "*) ;;
+	  *) rmdirs="$rmdirs $objdir" ;;
+	esac
+      fi
+
+      # Don't error if the file doesn't exist and rm -f was used.
+      if (test -L "$file") >/dev/null 2>&1 \
+	|| (test -h "$file") >/dev/null 2>&1 \
+	|| test -f "$file"; then
+	:
+      elif test -d "$file"; then
+	exit_status=1
+	continue
+      elif test "$rmforce" = yes; then
+	continue
+      fi
+
+      rmfiles="$file"
+
+      case $name in
+      *.la)
+	# Possibly a libtool archive, so verify it.
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	  . $dir/$name
+
+	  # Delete the libtool libraries and symlinks.
+	  for n in $library_names; do
+	    rmfiles="$rmfiles $objdir/$n"
+	  done
+	  test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+
+	  case "$mode" in
+	  clean)
+	    case "  $library_names " in
+	    # "  " in the beginning catches empty $dlname
+	    *" $dlname "*) ;;
+	    *) rmfiles="$rmfiles $objdir/$dlname" ;;
+	    esac
+	     test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+	    ;;
+	  uninstall)
+	    if test -n "$library_names"; then
+	      # Do each command in the postuninstall commands.
+	      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
+		  exit_status=1
+		fi
+	      done
+	      IFS="$save_ifs"
+	    fi
+
+	    if test -n "$old_library"; then
+	      # Do each command in the old_postuninstall commands.
+	      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
+		  exit_status=1
+		fi
+	      done
+	      IFS="$save_ifs"
+	    fi
+	    # FIXME: should reinstall the best remaining shared library.
+	    ;;
+	  esac
+	fi
+	;;
+
+      *.lo)
+	# Possibly a libtool object, so verify it.
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+
+	  # Read the .lo file
+	  . $dir/$name
+
+	  # Add PIC object to the list of files to remove.
+	  if test -n "$pic_object" \
+	     && test "$pic_object" != none; then
+	    rmfiles="$rmfiles $dir/$pic_object"
+	  fi
+
+	  # Add non-PIC object to the list of files to remove.
+	  if test -n "$non_pic_object" \
+	     && test "$non_pic_object" != none; then
+	    rmfiles="$rmfiles $dir/$non_pic_object"
+	  fi
+	fi
+	;;
+
+      *)
+	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
+
+	    # 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
+	;;
+      esac
+      $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
+      if test -d "$dir"; then
+	$show "rmdir $dir"
+	$run rmdir $dir >/dev/null 2>&1
+      fi
+    done
+
+    exit $exit_status
+    ;;
+
+  "")
+    $echo "$modename: you must specify a MODE" 1>&2
+    $echo "$generic_help" 1>&2
+    exit $EXIT_FAILURE
+    ;;
+  esac
+
+  if test -z "$exec_cmd"; then
+    $echo "$modename: invalid operation mode \`$mode'" 1>&2
+    $echo "$generic_help" 1>&2
+    exit $EXIT_FAILURE
+  fi
+fi # test -z "$show_help"
+
+if test -n "$exec_cmd"; then
+  eval exec $exec_cmd
+  exit $EXIT_FAILURE
+fi
+
+# We need to display help for each of the modes.
+case $mode in
+"") $echo \
+"Usage: $modename [OPTION]... [MODE-ARG]...
+
+Provide generalized library-building support services.
+
+    --config          show all configuration variables
+    --debug           enable verbose shell tracing
+-n, --dry-run         display commands without modifying any files
+    --features        display basic configuration information and exit
+    --finish          same as \`--mode=finish'
+    --help            display this help message and exit
+    --mode=MODE       use operation mode MODE [default=inferred from MODE-ARGS]
+    --quiet           same as \`--silent'
+    --silent          don't print informational messages
+    --tag=TAG         use configuration variables from tag TAG
+    --version         print version information
+
+MODE must be one of the following:
+
+      clean           remove files from the build directory
+      compile         compile a source file into a libtool object
+      execute         automatically set library path, then run a program
+      finish          complete the installation of libtool libraries
+      install         install libraries or executables
+      link            create a library or an executable
+      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.
+
+Report bugs to <bug-libtool at gnu.org>."
+  exit $EXIT_SUCCESS
+  ;;
+
+clean)
+  $echo \
+"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+  ;;
+
+compile)
+  $echo \
+"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
+  -prefer-pic       try to building PIC objects only
+  -prefer-non-pic   try to building non-PIC objects only
+  -static           always build a \`.o' file suitable for static linking
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+  ;;
+
+execute)
+  $echo \
+"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+  -dlopen FILE      add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+  ;;
+
+finish)
+  $echo \
+"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges.  Use
+the \`--dry-run' option if you just want to see what would be executed."
+  ;;
+
+install)
+  $echo \
+"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command.  The first component should be
+either the \`install' or \`cp' program.
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+  ;;
+
+link)
+  $echo \
+"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+  -all-static       do not do any dynamic linking at all
+  -avoid-version    do not add a version suffix if possible
+  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
+  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
+  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+  -export-symbols SYMFILE
+                    try to export only the symbols listed in SYMFILE
+  -export-symbols-regex REGEX
+                    try to export only the symbols matching REGEX
+  -LLIBDIR          search LIBDIR for required installed libraries
+  -lNAME            OUTPUT-FILE requires the installed library libNAME
+  -module           build a library that can dlopened
+  -no-fast-install  disable the fast-install mode
+  -no-install       link a not-installable executable
+  -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
+  -static           do not do any dynamic linking of uninstalled libtool libraries
+  -static-libtool-libs
+                    do not do any dynamic linking of libtool libraries
+  -version-info CURRENT[:REVISION[:AGE]]
+                    specify library version info [each variable defaults to 0]
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename.  Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+  ;;
+
+uninstall)
+  $echo \
+"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+  ;;
+
+*)
+  $echo "$modename: invalid operation mode \`$mode'" 1>&2
+  $echo "$help" 1>&2
+  exit $EXIT_FAILURE
+  ;;
+esac
+
+$echo
+$echo "Try \`$modename --help' for more information about other modes."
+
+exit $?
+
+# The TAGs below are defined such that we never get into a situation
+# in which we disable both kinds of libraries.  Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them.  This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration.  But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+disable_libs=shared
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+disable_libs=static
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:

Added: libgpod/trunk/libgpod/branches/upstream/current/m4/Makefile.am
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/m4/Makefile.am	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/m4/Makefile.am	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1 @@
+EXTRA_DIST = python.m4 swig.m4

Added: libgpod/trunk/libgpod/branches/upstream/current/m4/Makefile.in
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/m4/Makefile.in	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/m4/Makefile.in	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,406 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  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@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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 = m4
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \
+	$(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/python.m4 \
+	$(top_srcdir)/m4/swig.m4 $(top_srcdir)/configure.ac
+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 =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+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@
+GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@
+GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@
+GDKPIXBUF_REQ = @GDKPIXBUF_REQ@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+HALCALLOUTSDIR = @HALCALLOUTSDIR@
+HALFDIDIR = @HALFDIDIR@
+HAL_CFLAGS = @HAL_CFLAGS@
+HAL_LIBS = @HAL_LIBS@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
+INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
+INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
+INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
+INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
+INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
+INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
+INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
+INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@
+INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
+INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
+INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
+INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
+INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
+INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
+LDFLAGS = @LDFLAGS@
+LIBGPOD_CFLAGS = @LIBGPOD_CFLAGS@
+LIBGPOD_LIBS = @LIBGPOD_LIBS@
+LIBGPOD_MAJOR_VERSION = @LIBGPOD_MAJOR_VERSION@
+LIBGPOD_MICRO_VERSION = @LIBGPOD_MICRO_VERSION@
+LIBGPOD_MINOR_VERSION = @LIBGPOD_MINOR_VERSION@
+LIBGPOD_SO_VERSION = @LIBGPOD_SO_VERSION@
+LIBGPOD_VERSION = @LIBGPOD_VERSION@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_LIBS = @LIBXML_LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+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@
+PKG_CONFIG = @PKG_CONFIG@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+PYGOBJECT_CFLAGS = @PYGOBJECT_CFLAGS@
+PYGOBJECT_LIBS = @PYGOBJECT_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SGUTILS_LIBS = @SGUTILS_LIBS@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SWIG = @SWIG@
+SWIG_LIB = @SWIG_LIB@
+TAGLIB_CFLAGS = @TAGLIB_CFLAGS@
+TAGLIB_LIBS = @TAGLIB_LIBS@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+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@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+EXTRA_DIST = python.m4 swig.m4
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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) --gnu  m4/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  m4/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    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_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-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+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:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	distclean distclean-generic distclean-libtool distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-pdf \
+	install-pdf-am install-ps install-ps-am 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
+
+# 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:

Added: libgpod/trunk/libgpod/branches/upstream/current/m4/gtk-doc.m4
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/m4/gtk-doc.m4	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/m4/gtk-doc.m4	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,39 @@
+dnl -*- mode: autoconf -*-
+
+# serial 1
+
+dnl Usage:
+dnl   GTK_DOC_CHECK([minimum-gtk-doc-version])
+AC_DEFUN([GTK_DOC_CHECK],
+[
+  AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
+  AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
+  dnl for overriding the documentation installation directory
+  AC_ARG_WITH([html-dir],
+    AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
+    [with_html_dir='${datadir}/gtk-doc/html'])
+  HTML_DIR="$with_html_dir"
+  AC_SUBST([HTML_DIR])
+
+  dnl enable/disable documentation building
+  AC_ARG_ENABLE([gtk-doc],
+    AS_HELP_STRING([--enable-gtk-doc],
+                   [use gtk-doc to build documentation [[default=no]]]),,
+    [enable_gtk_doc=no])
+
+  if test x$enable_gtk_doc = xyes; then
+    ifelse([$1],[],
+      [PKG_CHECK_EXISTS([gtk-doc],,
+                        AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
+      [PKG_CHECK_EXISTS([gtk-doc >= $1],,
+                        AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build gtk-doc]))])
+  fi
+
+  AC_MSG_CHECKING([whether to build gtk-doc documentation])
+  AC_MSG_RESULT($enable_gtk_doc)
+
+  AC_PATH_PROGS(GTKDOC_CHECK,gtkdoc-check,)
+
+  AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
+  AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
+])

Added: libgpod/trunk/libgpod/branches/upstream/current/m4/intltool.m4
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/m4/intltool.m4	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/m4/intltool.m4	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,234 @@
+## intltool.m4 - Configure intltool for the target system. -*-Shell-script-*-
+## Copyright (C) 2001 Eazel, Inc.
+## Author: Maciej Stachowiak <mjs at noisehavoc.org>
+##         Kenneth Christiansen <kenneth at gnu.org>
+##
+## 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.
+
+dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
+# serial 36 IT_PROG_INTLTOOL
+AC_DEFUN([IT_PROG_INTLTOOL],
+[AC_PREREQ([2.50])dnl
+
+case "$am__api_version" in
+    1.[01234])
+	AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
+    ;;
+    *)
+    ;;
+esac
+
+if test -n "$1"; then
+    AC_MSG_CHECKING([for intltool >= $1])
+
+    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
+    INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
+    [INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in`
+    ]
+    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
+    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
+	AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
+fi
+
+  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
+     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
+      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+
+AC_SUBST(INTLTOOL_DESKTOP_RULE)
+AC_SUBST(INTLTOOL_DIRECTORY_RULE)
+AC_SUBST(INTLTOOL_KEYS_RULE)
+AC_SUBST(INTLTOOL_PROP_RULE)
+AC_SUBST(INTLTOOL_OAF_RULE)
+AC_SUBST(INTLTOOL_PONG_RULE)
+AC_SUBST(INTLTOOL_SERVER_RULE)
+AC_SUBST(INTLTOOL_SHEET_RULE)
+AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
+AC_SUBST(INTLTOOL_UI_RULE)
+AC_SUBST(INTLTOOL_XAM_RULE)
+AC_SUBST(INTLTOOL_KBD_RULE)
+AC_SUBST(INTLTOOL_XML_RULE)
+AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
+AC_SUBST(INTLTOOL_CAVES_RULE)
+AC_SUBST(INTLTOOL_SCHEMAS_RULE)
+AC_SUBST(INTLTOOL_THEME_RULE)
+AC_SUBST(INTLTOOL_SERVICE_RULE)
+AC_SUBST(INTLTOOL_POLICY_RULE)
+
+# Check the gettext tools to make sure they are GNU
+AC_PATH_PROG(XGETTEXT, xgettext)
+AC_PATH_PROG(MSGMERGE, msgmerge)
+AC_PATH_PROG(MSGFMT, msgfmt)
+if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
+    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
+fi
+xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
+mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
+mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
+if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
+    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
+fi
+
+# Use the tools built into the package, not the ones that are installed.
+AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
+AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge')
+AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update')
+
+AC_PATH_PROG(INTLTOOL_PERL, perl)
+if test -z "$INTLTOOL_PERL"; then
+   AC_MSG_ERROR([perl not found; required for intltool])
+fi
+if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
+   AC_MSG_ERROR([perl 5.x required for intltool])
+fi
+if test "x$2" != "xno-xml"; then
+   AC_MSG_CHECKING([for XML::Parser])
+   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
+       AC_MSG_RESULT([ok])
+   else
+       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
+   fi
+fi
+
+# Substitute ALL_LINGUAS so we can use it in po/Makefile
+AC_SUBST(ALL_LINGUAS)
+
+# Set DATADIRNAME correctly if it is not set yet
+# (copied from glib-gettext.m4)
+if test -z "$DATADIRNAME"; then
+  AC_LINK_IFELSE(
+    [AC_LANG_PROGRAM([[]],
+                     [[extern int _nl_msg_cat_cntr;
+                       return _nl_msg_cat_cntr]])],
+    [DATADIRNAME=share],
+    [case $host in
+    *-*-solaris*)
+    dnl On Solaris, if bind_textdomain_codeset is in libc,
+    dnl GNU format message catalog is always supported,
+    dnl since both are added to the libc all together.
+    dnl Hence, we'd like to go with DATADIRNAME=share
+    dnl in this case.
+    AC_CHECK_FUNC(bind_textdomain_codeset,
+      [DATADIRNAME=share], [DATADIRNAME=lib])
+    ;;
+    *)
+    [DATADIRNAME=lib]
+    ;;
+    esac])
+fi
+AC_SUBST(DATADIRNAME)
+
+IT_PO_SUBDIR([po])
+
+dnl The following is very similar to
+dnl
+dnl	AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])
+dnl
+dnl with the following slight differences:
+dnl  - the *.in files are in ac_aux_dir,
+dnl  - if the file haven't changed upon reconfigure, it's not touched,
+dnl  - the evaluation of the third parameter enables a hack which computes
+dnl    the actual value of $libdir,
+dnl  - the user sees "executing intltool commands", instead of
+dnl    "creating intltool-extract" and such.
+dnl
+dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were
+dnl a reason for it.
+
+AC_CONFIG_COMMANDS([intltool], [
+
+for file in intltool-extract intltool-merge intltool-update; do
+  sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
+      -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
+      -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
+	< ${ac_aux_dir}/${file}.in > ${file}.out
+  if cmp -s ${file} ${file}.out 2>/dev/null; then
+    rm -f ${file}.out
+  else
+    mv -f ${file}.out ${file}
+  fi
+  chmod ugo+x ${file}
+  chmod u+w ${file}
+done
+
+],
+[INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
+prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir" 
+INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}'])
+
+])
+
+
+# IT_PO_SUBDIR(DIRNAME)
+# ---------------------
+# All po subdirs have to be declared with this macro; the subdir "po" is
+# declared by IT_PROG_INTLTOOL.
+#
+AC_DEFUN([IT_PO_SUBDIR],
+[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
+dnl
+dnl The following CONFIG_COMMANDS should be exetuted at the very end
+dnl of config.status.
+AC_CONFIG_COMMANDS_PRE([
+  AC_CONFIG_COMMANDS([$1/stamp-it], [
+    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
+    >"$1/stamp-it.tmp"
+    [sed '/^#/d
+	 s/^[[].*] *//
+	 /^[ 	]*$/d
+	'"s|^|	$ac_top_srcdir/|" \
+      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
+    ]
+    if test ! -f "$1/Makefile"; then
+      AC_MSG_ERROR([$1/Makefile is not ready.])
+    fi
+    mv "$1/Makefile" "$1/Makefile.tmp"
+    [sed '/^POTFILES =/,/[^\\]$/ {
+		/^POTFILES =/!d
+		r $1/POTFILES
+	  }
+	 ' "$1/Makefile.tmp" >"$1/Makefile"]
+    rm -f "$1/Makefile.tmp"
+    mv "$1/stamp-it.tmp" "$1/stamp-it"
+  ])
+])dnl
+])
+
+
+# deprecated macros
+AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
+# A hint is needed for aclocal from Automake <= 1.9.4:
+# AC_DEFUN([AC_PROG_INTLTOOL], ...)
+

Added: libgpod/trunk/libgpod/branches/upstream/current/m4/python.m4
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/m4/python.m4	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/m4/python.m4	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,148 @@
+dnl copied from pygtk
+dnl
+dnl a macro to check for ability to create python extensions
+dnl  AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
+dnl function also defines PYTHON_INCLUDES
+AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
+[AC_REQUIRE([AM_PATH_PYTHON])
+AC_MSG_CHECKING(for python development headers)
+dnl deduce PYTHON_INCLUDES
+py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
+py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
+PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
+if test "$py_prefix" != "$py_exec_prefix"; then
+  PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
+fi
+AC_SUBST(PYTHON_INCLUDES)
+dnl check if the headers exist:
+save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
+AC_TRY_CPP([#include <Python.h>],dnl
+[AC_MSG_RESULT(found)
+$1],dnl
+[AC_MSG_RESULT(not found)
+$2])
+CPPFLAGS="$save_CPPFLAGS"
+])
+
+dnl copied and modified from gnome-python
+dnl
+dnl AM_CHECK_PYMOD(MODNAME [,VERSION, VERSION_MATCHER [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]])
+dnl Check if a module of a particular version is visible to python.
+AC_DEFUN([AM_CHECK_PYMOD],
+[AC_REQUIRE([AM_PATH_PYTHON])
+py_mod_var=`echo $1`
+AC_MSG_CHECKING(for python module $1 ifelse([$2],[],,[>= $2]))
+AC_CACHE_VAL(py_cv_mod_$py_mod_var, [
+ifelse([$2],[], [prog="
+import sys
+try:
+        import $1
+except ImportError:
+        sys.exit(1)
+except:
+        sys.exit(0)
+sys.exit(0)"], [prog="
+import sys, string, $1
+curverstr = $3
+# use method from AM_PYTHON_CHECK_VERSION
+minver = map(int, string.split('$2', '.'))
+length = len[(minver)]
+minver += [[0, 0, 0]]
+minverhex = 0
+for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[[i]]
+curver = map(int, string.split(curverstr, '.')[[:length]])
+curver += [[0, 0, 0]]
+curverhex = 0
+for i in xrange(0, 4): curverhex = (curverhex << 8) + curver[[i]]
+if (curverhex >= minverhex):
+        sys.exit(0)
+else:
+        sys.exit(1)
+sys.exit(0)"])
+if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC
+  then
+    eval "py_cv_mod_$py_mod_var=yes"
+  else
+    eval "py_cv_mod_$py_mod_var=no"
+  fi
+])
+py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"`
+if test "x$py_val" != xno; then
+  AC_MSG_RESULT(yes)
+  ifelse([$4], [],, [$4
+])dnl
+else
+  AC_MSG_RESULT(no)
+  ifelse([$5], [],, [$5
+])dnl
+fi
+])
+
+dnl check for python
+AC_DEFUN([LIBGPOD_CHECK_PYTHON],
+[
+    dnl aclocal-1.7 is missing this when version is used in AM_PATH_PYTHON, fudge it
+    am_display_PYTHON=python
+
+    AC_ARG_WITH(python,
+        AC_HELP_STRING([--with-python=PATH],
+            [build python bindings [[default=yes]]]),
+        [with_python=$withval],[with_python=yes])
+
+    AC_MSG_CHECKING(whether to build python bindings)
+    if test "X$with_python" != Xno; then
+        if test "X$with_python" != Xyes; then
+            PYTHON=$with_python
+        fi
+        with_python=yes
+    fi
+    AC_MSG_RESULT($with_python)
+
+    if test "X$with_python" = Xyes; then
+        if test -z "$PYTHON"; then
+            AC_PATH_PROG(PYTHON, python)
+        fi
+    
+        if test -n "$PYTHON"; then
+            AM_PATH_PYTHON($PYTHON_MIN_VERSION)
+            AM_CHECK_PYTHON_HEADERS(with_python="yes",with_python="no")
+    
+            if test "X$with_python" = Xyes; then
+                dnl test for python ldflags
+                dnl copied from the Redland RDF bindings, http://librdf.org/
+                if test `uname` = Darwin; then
+                    PYTHON_LDFLAGS="-Wl,-F. -Wl,-F. -bundle"
+                    if $PYTHON -c 'import sys, string; sys.exit(string.find(sys.prefix,"Framework")+1)'; then
+                        :
+                    else
+                        PYTHON_LDFLAGS="$PYTHON_LDFLAGS -framework Python"
+                    fi
+                else
+                    PYTHON_LDFLAGS="-shared"
+                fi
+                AC_SUBST(PYTHON_LDFLAGS)
+
+                dnl check for mutagen module >= $PYTHON_MUTAGEN_MIN_VERSION
+                AM_CHECK_PYMOD(mutagen,$PYTHON_MUTAGEN_MIN_VERSION,mutagen.version_string,,with_python=no)
+
+                dnl this test should perhaps be re-enabled, but only produce a warning -- tmz
+                dnl if test "X$have_gdkpixbuf" = "Xyes" -a "X$have_pygobject" = "Xyes"; then
+                dnl     dnl check for gtk module >= $PYTHON_GTK_MIN_VERSION
+                dnl     AM_CHECK_PYMOD(gtk,$PYTHON_GTK_MIN_VERSION,'.'.join(map(str, gtk.ver)),,with_python=no)
+                dnl fi
+
+                dnl check for swig
+                if test "X$with_python" = Xyes; then
+                    AC_PROG_SWIG($SWIG_MIN_VERSION)
+                    with_python="$has_swig"
+                fi
+            fi
+        else
+            AC_MSG_WARN(python not found.  try --with-python=/path/to/python)
+            with_python="no"
+        fi
+    fi
+    AM_CONDITIONAL(HAVE_PYTHON, test x$with_python = xyes)
+])dnl
+

Added: libgpod/trunk/libgpod/branches/upstream/current/m4/swig.m4
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/m4/swig.m4	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/m4/swig.m4	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,156 @@
+dnl @synopsis AC_PROG_SWIG([major.minor.micro])
+dnl
+dnl This macro searches for a SWIG installation on your system. If
+dnl found you should call SWIG via $(SWIG). You can use the optional
+dnl first argument to check if the version of the available SWIG is
+dnl greater than or equal to the value of the argument. It should have
+dnl the format: N[.N[.N]] (N is a number between 0 and 999. Only the
+dnl first N is mandatory.)
+dnl
+dnl If the version argument is given (e.g. 1.3.17), AC_PROG_SWIG checks
+dnl that the swig package is this version number or higher.
+dnl
+dnl In configure.in, use as:
+dnl
+dnl             AC_PROG_SWIG(1.3.17)
+dnl             SWIG_ENABLE_CXX
+dnl             SWIG_MULTI_MODULE_SUPPORT
+dnl             SWIG_PYTHON
+dnl
+dnl @category InstalledPackages
+dnl @author Sebastian Huber <sebastian-huber at web.de>
+dnl @author Alan W. Irwin <irwin at beluga.phys.uvic.ca>
+dnl @author Rafael Laboissiere <rafael at laboissiere.net>
+dnl @author Andrew Collier <abcollier at yahoo.com>
+dnl @version 2004-09-20
+dnl @license GPLWithACException
+
+AC_DEFUN([AC_PROG_SWIG],[
+        AC_PATH_PROG([SWIG],[swig])
+        if test -z "$SWIG" ; then
+                AC_MSG_WARN([cannot find 'swig' program. You should look at http://www.swig.org])
+                SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false'
+        elif test -n "$1" ; then
+                AC_MSG_CHECKING([for SWIG version])
+                [swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`]
+                AC_MSG_RESULT([$swig_version])
+                if test -n "$swig_version" ; then
+                        # Calculate the required version number components
+                        [required=$1]
+                        [required_major=`echo $required | sed 's/[^0-9].*//'`]
+                        if test -z "$required_major" ; then
+                                [required_major=0]
+                        fi
+                        [required=`echo $required | sed 's/[0-9]*[^0-9]//'`]
+                        [required_minor=`echo $required | sed 's/[^0-9].*//'`]
+                        if test -z "$required_minor" ; then
+                                [required_minor=0]
+                        fi
+                        [required=`echo $required | sed 's/[0-9]*[^0-9]//'`]
+                        [required_patch=`echo $required | sed 's/[^0-9].*//'`]
+                        if test -z "$required_patch" ; then
+                                [required_patch=0]
+                        fi
+                        # Calculate the available version number components
+                        [available=$swig_version]
+                        [available_major=`echo $available | sed 's/[^0-9].*//'`]
+                        if test -z "$available_major" ; then
+                                [available_major=0]
+                        fi
+                        [available=`echo $available | sed 's/[0-9]*[^0-9]//'`]
+                        [available_minor=`echo $available | sed 's/[^0-9].*//'`]
+                        if test -z "$available_minor" ; then
+                                [available_minor=0]
+                        fi
+                        [available=`echo $available | sed 's/[0-9]*[^0-9]//'`]
+                        [available_patch=`echo $available | sed 's/[^0-9].*//'`]
+                        if test -z "$available_patch" ; then
+                                [available_patch=0]
+                        fi
+                        if test $available_major -ne $required_major \
+                                -o $available_minor -ne $required_minor \
+                                -o $available_patch -lt $required_patch ; then
+                                AC_MSG_WARN([SWIG version >= $1 is required.  You have $swig_version.  You should look at http://www.swig.org])
+                                SWIG='echo "Error: SWIG version >= $1 is required.  You have '"$swig_version"'.  You should look at http://www.swig.org" ; false'
+                                has_swig="no"
+                        else
+                                SWIG_LIB=`$SWIG -swiglib`
+                                has_swig="yes"
+                        fi
+                else
+                        AC_MSG_WARN([cannot determine SWIG version])
+                        SWIG='echo "Error: Cannot determine SWIG version.  You should look at http://www.swig.org" ; false'
+                        has_swig="no"
+                fi
+        fi
+        AC_SUBST([SWIG_LIB])
+])
+
+# SWIG_ENABLE_CXX()
+#
+# Enable SWIG C++ support.  This affects all invocations of $(SWIG).
+AC_DEFUN([SWIG_ENABLE_CXX],[
+        AC_REQUIRE([AC_PROG_SWIG])
+        AC_REQUIRE([AC_PROG_CXX])
+        SWIG="$SWIG -c++"
+])
+
+# SWIG_MULTI_MODULE_SUPPORT()
+#
+# Enable support for multiple modules.  This effects all invocations
+# of $(SWIG).  You have to link all generated modules against the
+# appropriate SWIG runtime library.  If you want to build Python
+# modules for example, use the SWIG_PYTHON() macro and link the
+# modules against $(SWIG_PYTHON_LIBS).
+#
+AC_DEFUN([SWIG_MULTI_MODULE_SUPPORT],[
+        AC_REQUIRE([AC_PROG_SWIG])
+        SWIG="$SWIG -noruntime"
+])
+
+# SWIG_PYTHON([use-shadow-classes = {no, yes}])
+#
+# Checks for Python and provides the $(SWIG_PYTHON_CPPFLAGS),
+# and $(SWIG_PYTHON_OPT) output variables.
+#
+# $(SWIG_PYTHON_OPT) contains all necessary SWIG options to generate
+# code for Python.  Shadow classes are enabled unless the value of the
+# optional first argument is exactly 'no'.  If you need multi module
+# support (provided by the SWIG_MULTI_MODULE_SUPPORT() macro) use
+# $(SWIG_PYTHON_LIBS) to link against the appropriate library.  It
+# contains the SWIG Python runtime library that is needed by the type
+# check system for example.
+AC_DEFUN([SWIG_PYTHON],[
+        AC_REQUIRE([AC_PROG_SWIG])
+        AC_REQUIRE([AC_PYTHON_DEVEL])
+        test "x$1" != "xno" || swig_shadow=" -noproxy"
+        AC_SUBST([SWIG_PYTHON_OPT],[-python$swig_shadow])
+        AC_SUBST([SWIG_PYTHON_CPPFLAGS],[$PYTHON_CPPFLAGS])
+])
+
+
+dnl @synopsis AC_LIB_WAD
+dnl
+dnl This macro searches for installed WAD library.
+dnl
+AC_DEFUN([AC_LIB_WAD],
+[
+        AC_REQUIRE([AC_PYTHON_DEVEL])
+        AC_ARG_ENABLE(wad,
+        AC_HELP_STRING([--enable-wad], [enable wad module]),
+        [
+                case "${enableval}" in
+                        no)     ;;
+                        *)      if test "x${enableval}" = xyes;
+                                then
+                                        check_wad="yes"
+                                fi ;;
+                esac
+        ], [])
+
+        if test -n "$check_wad";
+        then
+                AC_CHECK_LIB(wadpy, _init, [WADPY=-lwadpy], [], $PYTHON_LDFLAGS $PYTHON_EXTRA_LIBS)
+                AC_SUBST(WADPY)
+        fi
+])

Added: libgpod/trunk/libgpod/branches/upstream/current/missing
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/missing	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/missing	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,367 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2006-05-10.23
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
+#   Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard at iro.umontreal.ca>, 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, 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., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+  configure_ac=configure.ac
+else
+  configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case $1 in
+--run)
+  # Try to run requested program, and just exit if it succeeds.
+  run=
+  shift
+  "$@" && exit 0
+  # Exit code 63 means version mismatch.  This often happens
+  # when the user try to use an ancient version of a tool on
+  # a file that requires a minimum version.  In this case we
+  # we should proceed has if the program had been absent, or
+  # if --run hadn't been passed.
+  if test $? = 63; then
+    run=:
+    msg="probably too old"
+  fi
+  ;;
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+  --run           try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
+  autom4te     touch the output file, or create a stub one
+  automake     touch all \`Makefile.in' files
+  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
+  flex         create \`lex.yy.c', if possible, from existing .c
+  help2man     touch the output file
+  lex          create \`lex.yy.c', if possible, from existing .c
+  makeinfo     touch the output file
+  tar          try tar, gnutar, gtar, then tar without non-portable flags
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Send bug reports to <bug-automake at gnu.org>."
+    exit $?
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing $scriptversion (GNU Automake)"
+    exit $?
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+esac
+
+# Now exit if we have it, but it failed.  Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).
+case $1 in
+  lex|yacc)
+    # Not GNU programs, they don't have --version.
+    ;;
+
+  tar)
+    if test -n "$run"; then
+       echo 1>&2 "ERROR: \`tar' requires --run"
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       exit 1
+    fi
+    ;;
+
+  *)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       # Could not run --version or --help.  This is probably someone
+       # running `$TOOL --version' or `$TOOL --help' to check whether
+       # $TOOL exists and not knowing $TOOL uses missing.
+       exit 1
+    fi
+    ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case $1 in
+  aclocal*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
+         any GNU archive site."
+    touch aclocal.m4
+    ;;
+
+  autoconf)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`${configure_ac}'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+         archive site."
+    touch configure
+    ;;
+
+  autoheader)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+         from any GNU archive site."
+    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+    test -z "$files" && files="config.h"
+    touch_files=
+    for f in $files; do
+      case $f in
+      *:*) touch_files="$touch_files "`echo "$f" |
+				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+      *) touch_files="$touch_files $f.in";;
+      esac
+    done
+    touch $touch_files
+    ;;
+
+  automake*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+         You might want to install the \`Automake' and \`Perl' packages.
+         Grab them from any GNU archive site."
+    find . -type f -name Makefile.am -print |
+	   sed 's/\.am$/.in/' |
+	   while read f; do touch "$f"; done
+    ;;
+
+  autom4te)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.
+         You can get \`$1' as part of \`Autoconf' from any GNU
+         archive site."
+
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo "#! /bin/sh"
+	echo "# Created by GNU Automake missing as a replacement of"
+	echo "#  $ $@"
+	echo "exit 0"
+	chmod +x $file
+	exit 1
+    fi
+    ;;
+
+  bison|yacc)
+    echo 1>&2 "\
+WARNING: \`$1' $msg.  You should only need it if
+         you modified a \`.y' file.  You may need the \`Bison' package
+         in order for those modifications to take effect.  You can get
+         \`Bison' from any GNU archive site."
+    rm -f y.tab.c y.tab.h
+    if test $# -ne 1; then
+        eval LASTARG="\${$#}"
+	case $LASTARG in
+	*.y)
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+	    if test -f "$SRCFILE"; then
+	         cp "$SRCFILE" y.tab.c
+	    fi
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+	    if test -f "$SRCFILE"; then
+	         cp "$SRCFILE" y.tab.h
+	    fi
+	  ;;
+	esac
+    fi
+    if test ! -f y.tab.h; then
+	echo >y.tab.h
+    fi
+    if test ! -f y.tab.c; then
+	echo 'main() { return 0; }' >y.tab.c
+    fi
+    ;;
+
+  lex|flex)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.l' file.  You may need the \`Flex' package
+         in order for those modifications to take effect.  You can get
+         \`Flex' from any GNU archive site."
+    rm -f lex.yy.c
+    if test $# -ne 1; then
+        eval LASTARG="\${$#}"
+	case $LASTARG in
+	*.l)
+	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+	    if test -f "$SRCFILE"; then
+	         cp "$SRCFILE" lex.yy.c
+	    fi
+	  ;;
+	esac
+    fi
+    if test ! -f lex.yy.c; then
+	echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  help2man)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+	 you modified a dependency of a manual page.  You may need the
+	 \`Help2man' package in order for those modifications to take
+	 effect.  You can get \`Help2man' from any GNU archive site."
+
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo ".ab help2man is required to generate this page"
+	exit 1
+    fi
+    ;;
+
+  makeinfo)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
+         indirectly affecting the aspect of the manual.  The spurious
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
+    # The file to touch is that specified with -o ...
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -z "$file"; then
+      # ... or it is the one specified with @setfilename ...
+      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '
+	/^@setfilename/{
+	  s/.* \([^ ]*\) *$/\1/
+	  p
+	  q
+	}' $infile`
+      # ... or it is derived from the source name (dir/f.texi becomes f.info)
+      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+    fi
+    # If the file does not exist, the user really needs makeinfo;
+    # let's fail without touching anything.
+    test -f $file || exit 1
+    touch $file
+    ;;
+
+  tar)
+    shift
+
+    # We have already tried tar in the generic part.
+    # Look for gnutar/gtar before invocation to avoid ugly error
+    # messages.
+    if (gnutar --version > /dev/null 2>&1); then
+       gnutar "$@" && exit 0
+    fi
+    if (gtar --version > /dev/null 2>&1); then
+       gtar "$@" && exit 0
+    fi
+    firstarg="$1"
+    if shift; then
+	case $firstarg in
+	*o*)
+	    firstarg=`echo "$firstarg" | sed s/o//`
+	    tar "$firstarg" "$@" && exit 0
+	    ;;
+	esac
+	case $firstarg in
+	*h*)
+	    firstarg=`echo "$firstarg" | sed s/h//`
+	    tar "$firstarg" "$@" && exit 0
+	    ;;
+	esac
+    fi
+
+    echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+         You may want to install GNU tar or Free paxutils, or check the
+         command line arguments."
+    exit 1
+    ;;
+
+  *)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.  Check the \`README' file,
+         it often tells you about the needed prerequisites for installing
+         this package.  You may also peek at any GNU archive site, in case
+         some other package would contain this missing \`$1' program."
+    exit 1
+    ;;
+esac
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:


Property changes on: libgpod/trunk/libgpod/branches/upstream/current/missing
___________________________________________________________________
Added: svn:executable
   + 

Added: libgpod/trunk/libgpod/branches/upstream/current/mkinstalldirs
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/mkinstalldirs	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/mkinstalldirs	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,161 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+
+scriptversion=2006-05-11.19
+
+# Original author: Noah Friedman <friedman at prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain.
+#
+# This file is maintained in Automake, please report
+# bugs to <bug-automake at gnu.org> or send patches to
+# <automake-patches at gnu.org>.
+
+nl='
+'
+IFS=" ""	$nl"
+errstatus=0
+dirmode=
+
+usage="\
+Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
+
+Create each directory DIR (with mode MODE, if specified), including all
+leading file name components.
+
+Report bugs to <bug-automake at gnu.org>."
+
+# process command line arguments
+while test $# -gt 0 ; do
+  case $1 in
+    -h | --help | --h*)         # -h for help
+      echo "$usage"
+      exit $?
+      ;;
+    -m)                         # -m PERM arg
+      shift
+      test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
+      dirmode=$1
+      shift
+      ;;
+    --version)
+      echo "$0 $scriptversion"
+      exit $?
+      ;;
+    --)                         # stop option processing
+      shift
+      break
+      ;;
+    -*)                         # unknown option
+      echo "$usage" 1>&2
+      exit 1
+      ;;
+    *)                          # first non-opt arg
+      break
+      ;;
+  esac
+done
+
+for file
+do
+  if test -d "$file"; then
+    shift
+  else
+    break
+  fi
+done
+
+case $# in
+  0) exit 0 ;;
+esac
+
+# Solaris 8's mkdir -p isn't thread-safe.  If you mkdir -p a/b and
+# mkdir -p a/c at the same time, both will detect that a is missing,
+# one will create a, then the other will try to create a and die with
+# a "File exists" error.  This is a problem when calling mkinstalldirs
+# from a parallel make.  We use --version in the probe to restrict
+# ourselves to GNU mkdir, which is thread-safe.
+case $dirmode in
+  '')
+    if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+      echo "mkdir -p -- $*"
+      exec 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.
+      test -d ./-p && rmdir ./-p
+      test -d ./--version && rmdir ./--version
+    fi
+    ;;
+  *)
+    if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
+       test ! -d ./--version; then
+      echo "mkdir -m $dirmode -p -- $*"
+      exec mkdir -m "$dirmode" -p -- "$@"
+    else
+      # Clean up after NextStep and OpenStep mkdir.
+      for d in ./-m ./-p ./--version "./$dirmode";
+      do
+        test -d $d && rmdir $d
+      done
+    fi
+    ;;
+esac
+
+for file
+do
+  case $file in
+    /*) pathcomp=/ ;;
+    *)  pathcomp= ;;
+  esac
+  oIFS=$IFS
+  IFS=/
+  set fnord $file
+  shift
+  IFS=$oIFS
+
+  for d
+  do
+    test "x$d" = x && continue
+
+    pathcomp=$pathcomp$d
+    case $pathcomp in
+      -*) pathcomp=./$pathcomp ;;
+    esac
+
+    if test ! -d "$pathcomp"; then
+      echo "mkdir $pathcomp"
+
+      mkdir "$pathcomp" || lasterr=$?
+
+      if test ! -d "$pathcomp"; then
+	errstatus=$lasterr
+      else
+	if test ! -z "$dirmode"; then
+	  echo "chmod $dirmode $pathcomp"
+	  lasterr=
+	  chmod "$dirmode" "$pathcomp" || lasterr=$?
+
+	  if test ! -z "$lasterr"; then
+	    errstatus=$lasterr
+	  fi
+	fi
+      fi
+    fi
+
+    pathcomp=$pathcomp/
+  done
+done
+
+exit $errstatus
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:


Property changes on: libgpod/trunk/libgpod/branches/upstream/current/mkinstalldirs
___________________________________________________________________
Added: svn:executable
   + 

Added: libgpod/trunk/libgpod/branches/upstream/current/po/Makefile.in.in
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/po/Makefile.in.in	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/po/Makefile.in.in	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,218 @@
+# Makefile for program source directory in GNU NLS utilities package.
+# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper at gnu.ai.mit.edu>
+# Copyright (C) 2004-2008 Rodney Dawes <dobey.pwns at gmail.com>
+#
+# This file may be copied and used freely without restrictions.  It may
+# be used in projects which are not available under a GNU Public License,
+# but which still want to provide support for the GNU gettext functionality.
+#
+# - Modified by Owen Taylor <otaylor at redhat.com> to use GETTEXT_PACKAGE
+#   instead of PACKAGE and to look for po2tbl in ./ not in intl/
+#
+# - Modified by jacob berkman <jacob at ximian.com> to install
+#   Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
+#
+# - Modified by Rodney Dawes <dobey.pwns at gmail.com> for use with intltool
+#
+# We have the following line for use by intltoolize:
+# INTLTOOL_MAKEFILE
+
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = /bin/sh
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+top_builddir = @top_builddir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datadir = @datadir@
+datarootdir = @datarootdir@
+libdir = @libdir@
+DATADIRNAME = @DATADIRNAME@
+itlocaledir = $(prefix)/$(DATADIRNAME)/locale
+subdir = po
+install_sh = @install_sh@
+# Automake >= 1.8 provides @mkdir_p at .
+# Until it can be supposed, use the safe fallback:
+mkdir_p = $(install_sh) -d
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+
+GMSGFMT = @GMSGFMT@
+MSGFMT = @MSGFMT@
+XGETTEXT = @XGETTEXT@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
+GENPOT   = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
+
+ALL_LINGUAS = @ALL_LINGUAS@
+
+PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; fi)
+
+USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep ^$$lang$$ $(srcdir)/LINGUAS`" -o -n "`echo $$ALINGUAS|grep ' ?$$lang ?'`"; then printf "$$lang "; fi; done; fi)
+
+USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
+
+POFILES=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
+
+DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(POFILES)
+EXTRA_DISTFILES = POTFILES.skip Makevars LINGUAS
+
+POTFILES = \
+# This comment gets stripped out
+
+CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
+
+.SUFFIXES:
+.SUFFIXES: .po .pox .gmo .mo .msg .cat
+
+.po.pox:
+	$(MAKE) $(GETTEXT_PACKAGE).pot
+	$(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
+
+.po.mo:
+	$(MSGFMT) -o $@ $<
+
+.po.gmo:
+	file=`echo $* | sed 's,.*/,,'`.gmo \
+	  && rm -f $$file && $(GMSGFMT) -o $$file $<
+
+.po.cat:
+	sed -f ../intl/po2msg.sed < $< > $*.msg \
+	  && rm -f $@ && gencat $@ $*.msg
+
+
+all: all- at USE_NLS@
+
+all-yes: $(CATALOGS)
+all-no:
+
+$(GETTEXT_PACKAGE).pot: $(POTFILES)
+	$(GENPOT)
+
+install: install-data
+install-data: install-data- at USE_NLS@
+install-data-no: all
+install-data-yes: all
+	$(mkdir_p) $(DESTDIR)$(itlocaledir)
+	linguas="$(USE_LINGUAS)"; \
+	for lang in $$linguas; do \
+	  dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
+	  $(mkdir_p) $$dir; \
+	  if test -r $$lang.gmo; then \
+	    $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
+	    echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
+	  else \
+	    $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
+	    echo "installing $(srcdir)/$$lang.gmo as" \
+		 "$$dir/$(GETTEXT_PACKAGE).mo"; \
+	  fi; \
+	  if test -r $$lang.gmo.m; then \
+	    $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
+	    echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
+	  else \
+	    if test -r $(srcdir)/$$lang.gmo.m ; then \
+	      $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
+		$$dir/$(GETTEXT_PACKAGE).mo.m; \
+	      echo "installing $(srcdir)/$$lang.gmo.m as" \
+		   "$$dir/$(GETTEXT_PACKAGE).mo.m"; \
+	    else \
+	      true; \
+	    fi; \
+	  fi; \
+	done
+
+# Empty stubs to satisfy archaic automake needs
+dvi info tags TAGS ID:
+
+# Define this as empty until I found a useful application.
+install-exec installcheck:
+
+uninstall:
+	linguas="$(USE_LINGUAS)"; \
+	for lang in $$linguas; do \
+	  rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
+	  rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
+	done
+
+check: all $(GETTEXT_PACKAGE).pot
+	rm -f missing notexist
+	srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m
+	if [ -r missing -o -r notexist ]; then \
+	  exit 1; \
+	fi
+
+mostlyclean:
+	rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
+	rm -f .intltool-merge-cache
+
+clean: mostlyclean
+
+distclean: clean
+	rm -f Makefile Makefile.in POTFILES stamp-it
+	rm -f *.mo *.msg *.cat *.cat.m *.gmo
+
+maintainer-clean: distclean
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+	rm -f Makefile.in.in
+
+distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: $(DISTFILES)
+	dists="$(DISTFILES)"; \
+	extra_dists="$(EXTRA_DISTFILES)"; \
+	for file in $$extra_dists; do \
+	  test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
+	done; \
+	for file in $$dists; do \
+	  test -f $$file || file="$(srcdir)/$$file"; \
+	  ln $$file $(distdir) 2> /dev/null \
+	    || cp -p $$file $(distdir); \
+	done
+
+update-po: Makefile
+	$(MAKE) $(GETTEXT_PACKAGE).pot
+	tmpdir=`pwd`; \
+	linguas="$(USE_LINGUAS)"; \
+	for lang in $$linguas; do \
+	  echo "$$lang:"; \
+	  result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
+	  if $$result; then \
+	    if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+	      rm -f $$tmpdir/$$lang.new.po; \
+            else \
+	      if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+	        :; \
+	      else \
+	        echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+	        rm -f $$tmpdir/$$lang.new.po; \
+	        exit 1; \
+	      fi; \
+	    fi; \
+	  else \
+	    echo "msgmerge for $$lang.gmo failed!"; \
+	    rm -f $$tmpdir/$$lang.new.po; \
+	  fi; \
+	done
+
+Makefile POTFILES: stamp-it
+	@if test ! -f $@; then \
+	  rm -f stamp-it; \
+	  $(MAKE) stamp-it; \
+	fi
+
+stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
+	       $(SHELL) ./config.status
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

Added: libgpod/trunk/libgpod/branches/upstream/current/po/POTFILES.in
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/po/POTFILES.in	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/po/POTFILES.in	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,24 @@
+# List of source files containing translatable strings (output of
+# ls src/*.c tests/*.c tools/*.c)
+
+src/db-artwork-debug.c
+src/db-artwork-parser.c
+src/db-artwork-writer.c
+src/db-image-parser.c
+src/db-parse-context.c
+src/itdb_artwork.c
+src/itdb_device.c
+src/itdb_itunesdb.c
+src/itdb_photoalbum.c
+src/itdb_playlist.c
+src/itdb_thumb.c
+src/itdb_track.c
+src/ithumb-writer.c
+tests/itdb_main.c
+tests/test-covers.c
+tests/test-ls.c
+tests/test-photos.c
+tests/test-write-covers.c
+tests/test-init-ipod.c
+tools/ipod-time-sync.c
+tools/read-sysinfoextended-sgutils.c

Added: libgpod/trunk/libgpod/branches/upstream/current/po/POTFILES.skip
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/po/POTFILES.skip	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/po/POTFILES.skip	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1 @@
+bindings/python/tests/tests.py

Added: libgpod/trunk/libgpod/branches/upstream/current/po/de.po
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/po/de.po	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/po/de.po	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,931 @@
+# German language translation for gtkpod
+# Copyright (C) 2003-2005 Jörg Schuler
+# Jörg Schuler <jcsjcs at users.sourceforge.net>
+#
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gtkpod 0.52\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-04-03 16:08-0400\n"
+"PO-Revision-Date: 2009-01-05 10:22+0100\n"
+"Last-Translator: Jonas Cleve <jonas_cleve at yahoo.de>\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+
+#: ../src/db-artwork-parser.c:140
+#, c-format
+msgid "Unexpected mhod string type: %d\n"
+msgstr "Unerwarteter mhod Stringtyp: %d\n"
+
+#: ../src/db-artwork-parser.c:460
+#, c-format
+msgid "Unexpected mhsd index: %d\n"
+msgstr "Unerwarteter mhsd-Index: %d\n"
+
+#: ../src/db-artwork-parser.c:540
+#, c-format
+msgid "Could not find corresponding track (dbid: %s) for artwork entry.\n"
+msgstr ""
+"Konnte zugehöriges Musikstück (dbid: %s) für Artworkeintrag nicht finden.\n"
+
+#: ../src/db-artwork-parser.c:548
+#, c-format
+msgid "iTunesDB and ArtworkDB artwork sizes inconsistent (%d+%d != %d)\n"
+msgstr "Artwork-Größen in iTunesDB und ArtworkDB inkonsistent (%d+%d != %d)\n"
+
+#: ../src/db-image-parser.c:91
+#, c-format
+msgid "Unexpected image type in mhni: %d, offset: %d\n"
+msgstr "Unerwarter Bildtyp in mhni: %d, Offset: %d\n"
+
+#: ../src/itdb_artwork.c:163
+#, c-format
+msgid "Could not access file '%s'."
+msgstr "Datei nicht auf Datei zugreifen: '%s'."
+
+#: ../src/itdb_artwork.c:181 ../src/itdb_artwork.c:241
+#: ../src/itdb_artwork.c:298
+#, c-format
+msgid "Artwork support not compiled into libgpod."
+msgstr "Artwork-Unterstützung ist nicht in libgpod einkompiliert worden."
+
+#: ../src/itdb_artwork.c:668
+#, c-format
+msgid "Could not find on iPod: '%s'\n"
+msgstr "Nicht auf dem iPod gefunden: '%s'\n"
+
+#: ../src/itdb_artwork.c:828
+#, c-format
+msgid ""
+"Unable to retrieve thumbnail (appears to be on iPod, but no image info "
+"available): filename: '%s'\n"
+msgstr ""
+"Thumbnail konnte nicht geladen werden (Thumbnail scheint auf dem iPod zu "
+"sein, aber die Bilddaten sind nicht verfügbar): Dateiname: '%s'\n"
+
+#: ../src/itdb_device.c:263
+msgid "Invalid"
+msgstr "Ungültig"
+
+#: ../src/itdb_device.c:264 ../src/itdb_device.c:305
+msgid "Unknown"
+msgstr "Unbekannt"
+
+#: ../src/itdb_device.c:265
+msgid "Color"
+msgstr "Color"
+
+#: ../src/itdb_device.c:266
+msgid "Color U2"
+msgstr "Color U2"
+
+#: ../src/itdb_device.c:267
+msgid "Grayscale"
+msgstr "Grayscale"
+
+#: ../src/itdb_device.c:268
+msgid "Grayscale U2"
+msgstr "Grayscale U2"
+
+#: ../src/itdb_device.c:269
+msgid "Mini (Silver)"
+msgstr "Mini (silber)"
+
+#: ../src/itdb_device.c:270
+msgid "Mini (Blue)"
+msgstr "Mini (blau)"
+
+#: ../src/itdb_device.c:271
+msgid "Mini (Pink)"
+msgstr "Mini (pink)"
+
+#: ../src/itdb_device.c:272
+msgid "Mini (Green)"
+msgstr "Mini (grün)"
+
+#: ../src/itdb_device.c:273
+msgid "Mini (Gold)"
+msgstr "Mini (gold)"
+
+#: ../src/itdb_device.c:274
+msgid "Shuffle"
+msgstr "Shuffle"
+
+#: ../src/itdb_device.c:275
+msgid "Nano (White)"
+msgstr "Nano (weiß)"
+
+#: ../src/itdb_device.c:276
+msgid "Nano (Black)"
+msgstr "Nano (schwarz)"
+
+#: ../src/itdb_device.c:277
+msgid "Video (White)"
+msgstr "Video (weiß)"
+
+#: ../src/itdb_device.c:278
+msgid "Video (Black)"
+msgstr "Video (schwarz)"
+
+#: ../src/itdb_device.c:279
+msgid "Mobile (1)"
+msgstr "Mobiltelefon (1)"
+
+#: ../src/itdb_device.c:280
+msgid "Video U2"
+msgstr "Video U2"
+
+#: ../src/itdb_device.c:281
+msgid "Nano (Silver)"
+msgstr "Nano (silber)"
+
+# Nano (blau)
+#: ../src/itdb_device.c:282
+msgid "Nano (Blue)"
+msgstr "Nano (blau)"
+
+#: ../src/itdb_device.c:283
+msgid "Nano (Green)"
+msgstr "Nano (grün)"
+
+#: ../src/itdb_device.c:284
+msgid "Nano (Pink)"
+msgstr "Nano (pink)"
+
+# Nano (blau)
+#: ../src/itdb_device.c:285
+msgid "Nano (Red)"
+msgstr "Nano (rot)"
+
+# Nano (blau)
+#: ../src/itdb_device.c:286
+msgid "Nano (Yellow)"
+msgstr "Nano (geld)"
+
+# Nano (blau)
+#: ../src/itdb_device.c:287
+msgid "Nano (Purple)"
+msgstr "Nano (lila)"
+
+#: ../src/itdb_device.c:288
+msgid "Nano (Orange)"
+msgstr "Nano (orange)"
+
+#: ../src/itdb_device.c:289
+msgid "iPhone (1)"
+msgstr "iPhone (1)"
+
+#: ../src/itdb_device.c:290
+msgid "Shuffle (Silver)"
+msgstr "Shuffle (silber)"
+
+#: ../src/itdb_device.c:291
+msgid "Shuffle (Pink)"
+msgstr "Shuffle (pink)"
+
+#: ../src/itdb_device.c:292
+msgid "Shuffle (Blue)"
+msgstr "Shuffle (blau)"
+
+#: ../src/itdb_device.c:293
+msgid "Shuffle (Green)"
+msgstr "Shuffle (grün)"
+
+#: ../src/itdb_device.c:294
+msgid "Shuffle (Orange)"
+msgstr "Shuffle (orange)"
+
+#: ../src/itdb_device.c:295
+msgid "Shuffle (Purple)"
+msgstr "Shuffle (lila)"
+
+#: ../src/itdb_device.c:296
+msgid "Shuffle (Red)"
+msgstr "Shuffle (rot)"
+
+#: ../src/itdb_device.c:297
+msgid "Classic (Silver)"
+msgstr "Classic (silber)"
+
+#: ../src/itdb_device.c:298
+msgid "Classic (Black)"
+msgstr "Classic (schwarz)"
+
+#: ../src/itdb_device.c:299
+msgid "Touch (Black)"
+msgstr "Touch (schwarz)"
+
+#: ../src/itdb_device.c:306
+msgid "Regular (1st Gen.)"
+msgstr "Standard (1. Generation)"
+
+#: ../src/itdb_device.c:307
+msgid "Regular (2nd Gen.)"
+msgstr "Standard (2. Generation)"
+
+#: ../src/itdb_device.c:308
+msgid "Regular (3rd Gen.)"
+msgstr "Standard (3. Generation)"
+
+#: ../src/itdb_device.c:309
+msgid "Regular (4th Gen.)"
+msgstr "Standard (4. Generation)"
+
+#: ../src/itdb_device.c:310
+msgid "Photo"
+msgstr "Photo"
+
+#: ../src/itdb_device.c:311
+msgid "Mobile Phones"
+msgstr "Mobiltelefone"
+
+#: ../src/itdb_device.c:312
+msgid "Mini (1st Gen.)"
+msgstr "Mini (1. Generation)"
+
+#: ../src/itdb_device.c:313
+msgid "Mini (2nd Gen.)"
+msgstr "Mini (2. Generation)"
+
+#: ../src/itdb_device.c:314
+msgid "Shuffle (1st Gen.)"
+msgstr "Shuffle (1. Generation)"
+
+#: ../src/itdb_device.c:315
+msgid "Shuffle (2nd Gen.)"
+msgstr "Shuffle (2. Generation)"
+
+#: ../src/itdb_device.c:316
+msgid "Shuffle (3rd Gen.)"
+msgstr "Shuffle (3. Generation)"
+
+#: ../src/itdb_device.c:317
+msgid "Nano (1st Gen.)"
+msgstr "Nano (1. Generation)"
+
+#: ../src/itdb_device.c:318
+msgid "Nano (2nd Gen.)"
+msgstr "Nano (2. Generation)"
+
+#: ../src/itdb_device.c:319
+msgid "Nano Video (3rd Gen.)"
+msgstr "Nano Vide (3. Generation)"
+
+#: ../src/itdb_device.c:320
+msgid "Nano Video (4th Gen.)"
+msgstr "Nano Video (4. Generation)"
+
+#: ../src/itdb_device.c:321
+msgid "Video (1st Gen.)"
+msgstr "Video (1. Generation)"
+
+#: ../src/itdb_device.c:322
+msgid "Video (2nd Gen.)"
+msgstr "Video (2. Generation)"
+
+#: ../src/itdb_device.c:323 ../src/itdb_device.c:324
+msgid "Classic"
+msgstr "Classic"
+
+#: ../src/itdb_device.c:325
+msgid "Touch"
+msgstr "Touch"
+
+#: ../src/itdb_device.c:326
+msgid "iPhone"
+msgstr "iPhone"
+
+#: ../src/itdb_device.c:327 ../src/itdb_device.c:328
+msgid "Unused"
+msgstr "Nicht benutzt"
+
+#: ../src/itdb_device.c:928
+#, c-format
+msgid "Could not open '%s' for writing."
+msgstr "'%s' konnte nicht zum Schreiben geöffnet werden."
+
+#: ../src/itdb_device.c:937
+#, c-format
+msgid "Device directory does not exist."
+msgstr "Das 'Device'-Verzeichnis existiert nicht."
+
+#: ../src/itdb_itunesdb.c:507
+#, c-format
+msgid "Illegal seek to offset %ld (length %ld) in file '%s'."
+msgstr "Illegaler seek bei Offset %ld (Länge %ld) in Datei '%s'."
+
+#: ../src/itdb_itunesdb.c:910
+#, c-format
+msgid "Not a Play Counts file: '%s' (missing mhdp header)."
+msgstr "Keine Play Counts Datei: '%s' (mhdp-Header fehlt)."
+
+#: ../src/itdb_itunesdb.c:925
+#, c-format
+msgid "Play Counts file ('%s'): header length smaller than expected (%d<96)."
+msgstr "Play Counts Datei ('%s'): Headerlänge kleiner als erwarted (%d<96)."
+
+#: ../src/itdb_itunesdb.c:939
+#, c-format
+msgid "Play Counts file ('%s'): entry length smaller than expected (%d<12)."
+msgstr ""
+"Play Counts Datei ('%s'): Länge der Einträge kleiner als erwartet (%d<12)."
+
+#: ../src/itdb_itunesdb.c:1014
+#, c-format
+msgid "iTunesStats file ('%s'): entry length smaller than expected (%d<18)."
+msgstr ""
+"iTunesStats Datei ('%s'): Länge der Einträge kleiner als erwartet (%d<18)."
+
+#: ../src/itdb_itunesdb.c:1333
+#, c-format
+msgid "iTunesDB corrupt: no MHOD at offset %ld in file '%s'."
+msgstr "iTunesDB beschädigt: kein MHOD bei Offset %ld in Datei '%s'."
+
+#: ../src/itdb_itunesdb.c:1519
+#, c-format
+msgid "Unknown smart rule action at %ld: %x. Trying to continue.\n"
+msgstr ""
+"Unbekannte Aktion für Smart Playlist bei %ld: %x. Es wird trotzdem versucht, "
+"weiterzumachen.\n"
+
+#: ../src/itdb_itunesdb.c:1550
+#, c-format
+msgid ""
+"Length of smart playlist rule field (%d) not as expected. Trying to continue "
+"anyhow.\n"
+msgstr ""
+"Die Länge einer Regel (%d) einer intelligenten Wiedergabeliste weicht von "
+"der erwarteten Länge ab. Es wird versucht fortzufahren.\n"
+
+#: ../src/itdb_itunesdb.c:1593
+#, c-format
+msgid "iTunesDB corrupt: no SLst at offset %ld in file '%s'."
+msgstr "iTunesDB beschädigt: kein SLst-Eintrag bei Offset %ld in Datei '%s'."
+
+#: ../src/itdb_itunesdb.c:1606
+#, c-format
+msgid ""
+"Encountered unknown MHOD type (%d) while parsing the iTunesDB. Ignoring.\n"
+"\n"
+msgstr ""
+"Unbekannter MHOD-Typ (%d) während des Parsens der iTunesDB gefunden. Es wird "
+"versucht fortzufahren.\n"
+"\n"
+
+#: ../src/itdb_itunesdb.c:1689
+#, c-format
+msgid "iTunesDB corrupt: hunk length 0 for hunk at %ld in file '%s'."
+msgstr ""
+"iTunesDB beschädigt: Hunklänge ist Null für den Hunk an Offset %ld in Datei "
+"'%s'."
+
+#: ../src/itdb_itunesdb.c:1702
+#, c-format
+msgid ""
+"iTunesDB corrupt: no section '%s' found in section '%s' starting at %ld."
+msgstr ""
+"iTunesDB beschädigt: kein '%s'-Eintrag in Sektion '%s' (startend bei %ld) "
+"gefunden."
+
+#: ../src/itdb_itunesdb.c:1716
+#, c-format
+msgid ""
+"header length of '%s' smaller than expected (%d < %d) at offset %ld in file "
+"'%s'."
+msgstr ""
+"Header-Länge des Abschnitts '%s' ist kleiner als erwartet (%d < %d) an "
+"Offset %ld in Datei '%s'."
+
+#: ../src/itdb_itunesdb.c:1801
+#, c-format
+msgid "Not a iTunesDB: '%s' (missing mhdb header)."
+msgstr "Keine iTunesDB Datei: '%s' (kein mhdb-Header)."
+
+#: ../src/itdb_itunesdb.c:1818
+#, c-format
+msgid ""
+"iTunesDB ('%s'): header length of mhsd hunk smaller than expected (%d<32). "
+"Aborting."
+msgstr ""
+"iTunesDB ('%s'): Headerlänge des mhsd-Hunks is kleiner als erwartet (%d<32). "
+"Breche ab."
+
+#: ../src/itdb_itunesdb.c:1839
+#, c-format
+msgid "iTunesDB '%s' corrupt: mhsd expected at %ld."
+msgstr ""
+"Die iTunesDB '%s' ist beschädigt: bei Offset %ld wird ein mhsd-Abschnitt "
+"erwartet."
+
+#: ../src/itdb_itunesdb.c:1944
+#, c-format
+msgid "Number of MHODs in mhip at %ld inconsistent in file '%s'."
+msgstr ""
+"Anzahl der MHODs-Abschnitte in der mhip-Sektion an Offset %ld ist in der "
+"Datei '%s' nicht konsistent."
+
+#: ../src/itdb_itunesdb.c:2121
+#, c-format
+msgid "Number of MHODs in mhyp at %ld inconsistent in file '%s'."
+msgstr ""
+"Anzahl der MHOD-Abschnitte in der mhyp-Sektion bei Offset %ld in der Datei '%"
+"s' ist inkonsistent."
+
+#: ../src/itdb_itunesdb.c:2131
+msgid "Master-PL"
+msgstr "Haupt-PL"
+
+#: ../src/itdb_itunesdb.c:2135
+msgid "Podcasts"
+msgstr "Podcasts"
+
+#: ../src/itdb_itunesdb.c:2137
+msgid "Playlist"
+msgstr "Wiedergabeliste"
+
+#: ../src/itdb_itunesdb.c:2159
+#, c-format
+msgid ""
+"iTunesDB corrupt: number of mhip sections inconsistent in mhyp starting at %"
+"ld in file '%s'."
+msgstr ""
+"Die iTunesDB ist beschädigt: die Anzahl der mhip-Sektionen im mhyp-Abschnit "
+"startend bei %ld in Datei '%s' ist inkonsistent."
+
+#: ../src/itdb_itunesdb.c:2180
+#, c-format
+msgid "Itdb_Track ID '%d' not found.\n"
+msgstr "Itdb_Track ID '%d' nicht gefunden.\n"
+
+#: ../src/itdb_itunesdb.c:2524
+msgid "OTG Playlist"
+msgstr "OTG-Wiedergabeliste"
+
+#: ../src/itdb_itunesdb.c:2542
+#, c-format
+msgid "Not a OTG playlist file: '%s' (missing mhpo header)."
+msgstr "Keine OTG (On-The-Go) Wiedergabelistendatei: '%s' (mhpo-Header fehlt)."
+
+#: ../src/itdb_itunesdb.c:2556
+#, c-format
+msgid "OTG playlist file ('%s'): header length smaller than expected (%d<20)."
+msgstr ""
+"OTG (On-The-Go) Wiedergabelistendatei ('%s'): Headerlänger kleiner als "
+"erwartet (%d<20)."
+
+#: ../src/itdb_itunesdb.c:2568
+#, c-format
+msgid "OTG playlist file ('%s'): entry length smaller than expected (%d<4)."
+msgstr ""
+"OTG (On-The-Go) Wiedergabelistendatei ('%s'): Länge der Einträge ist kleiner "
+"als erwartet (%d<4)."
+
+#: ../src/itdb_itunesdb.c:2603
+#, c-format
+msgid "OTG playlist file '%s': reference to non-existent track (%d)."
+msgstr ""
+"OTG (On-The-Go) Wiedergabelistendateii '%s' bezieht sich auf ein nicht "
+"existierendes Stück (%d)."
+
+#: ../src/itdb_itunesdb.c:2648
+#, c-format
+msgid "OTG Playlist %d"
+msgstr "OTG-Wiedergabeliste %d"
+
+#. this should not be -- issue warning
+#: ../src/itdb_itunesdb.c:2716
+msgid ""
+"iTunesDB corrupt: number of tracks (mhit hunks) inconsistent. Trying to "
+"continue.\n"
+msgstr ""
+"Die iTunesDB ist beschädigt: Anzahl der Stücke (mhit-Hunks) ist nicht "
+"konsistent. Versuche fortzufahren.\n"
+
+#. this should not be -- issue warning
+#: ../src/itdb_itunesdb.c:2779
+msgid ""
+"iTunesDB possibly corrupt: number of playlists (mhyp hunks) inconsistent. "
+"Trying to continue.\n"
+msgstr ""
+"iTunesDB möglicherweise beschädigt: Anzahl der Wiedergabelisten (mhyp-Hunks) "
+"ist nicht konsistent. Versuche fortzufahren.\n"
+
+#: ../src/itdb_itunesdb.c:2826
+#, c-format
+msgid ""
+"iTunesDB '%s' corrupt: Could not find tracklist (no mhsd type 1 section "
+"found)"
+msgstr ""
+"Die iTunesDB '%s' ist beschädigt: die Trackliste konnte nicht gefunden "
+"werden (kein mhsd-Abschnitt des Typs 1 gefunden)."
+
+#: ../src/itdb_itunesdb.c:2855
+#, c-format
+msgid ""
+"iTunesDB '%s' corrupt: Could not find playlists (no mhsd type 2 or type 3 "
+"sections found)"
+msgstr ""
+"Die iTunesDB '%s' ist beschädigt: die Playlisten konnten nicht gefunden "
+"werden (keine mhsd-Abschnitte des Typs 2 oder 3 gefunden)."
+
+#: ../src/itdb_itunesdb.c:2877
+#, c-format
+msgid "iTunes directory not found: '%s' (or similar)."
+msgstr ""
+"Das 'iTunes'-Verzeichnis konnte nicht gefunden werden: '%s' (oder ähnlich)."
+
+#: ../src/itdb_itunesdb.c:2894
+#, c-format
+msgid "Music directory not found: '%s' (or similar)."
+msgstr ""
+"Das 'Music'-Verzeichnis konnte nicht gefunden werden: '%s' (oder ähnlich)."
+
+#: ../src/itdb_itunesdb.c:2912
+#, c-format
+msgid "Control directory not found: '%s' (or similar)."
+msgstr ""
+"Das 'Control'-Verzeichnis konnte nicht gefunden werden: '%s' (oder ähnlich)."
+
+#: ../src/itdb_itunesdb.c:3033
+#, c-format
+msgid "File not found: '%s'."
+msgstr "Datei nicht gefunden: '%s'."
+
+#: ../src/itdb_itunesdb.c:5533
+#, c-format
+msgid "Path not found: '%s' (or similar)."
+msgstr "Pfad nicht gefunden: '%s' (oder ähnlich)."
+
+#: ../src/itdb_itunesdb.c:5742
+#, c-format
+msgid "Error renaming '%s' to '%s' (%s)."
+msgstr "Fehler beim Umbenennen von '%s' nach '%s' (%s)."
+
+#: ../src/itdb_itunesdb.c:5759 ../src/itdb_itunesdb.c:5776
+#: ../src/itdb_itunesdb.c:5793
+#, c-format
+msgid "Error removing '%s' (%s)."
+msgstr "Fehler beim Entfernen von '%s' (%s)."
+
+#: ../src/itdb_itunesdb.c:5960 ../src/itdb_itunesdb.c:6133
+#, c-format
+msgid "Mountpoint not set."
+msgstr "Mountpoint wurde nicht gesetzt."
+
+#: ../src/itdb_itunesdb.c:6000
+#, c-format
+msgid "No 'F..' directories found in '%s'."
+msgstr "No 'F..' directories were found in '%s'."
+
+#: ../src/itdb_itunesdb.c:6021
+#, c-format
+msgid "Path not found: '%s'."
+msgstr "Pfad nicht gefunden: '%s'."
+
+#: ../src/itdb_itunesdb.c:6142
+#, c-format
+msgid "'%s' could not be accessed (%s)."
+msgstr "Auf Datei '%s' konnte nicht zugegriffen werden (%s)."
+
+#: ../src/itdb_itunesdb.c:6152
+#, c-format
+msgid ""
+"Destination file '%s' does not appear to be on the iPod mounted at '%s'."
+msgstr ""
+"Zieldatei '%s' scheint nicht auf dem iPod zu sein, welcher bei '%s' "
+"eingebunden ist."
+
+#: ../src/itdb_itunesdb.c:6360
+#, c-format
+msgid "Error opening '%s' for reading (%s)."
+msgstr "Fehler beim Öffnen von '%s' zum Lesen (%s)."
+
+#: ../src/itdb_itunesdb.c:6372
+#, c-format
+msgid "Error opening '%s' for writing (%s)."
+msgstr "Fehler beim Öffnen von '%s' zum Schreiben (%s)."
+
+#: ../src/itdb_itunesdb.c:6388
+#, c-format
+msgid "Error while reading from '%s' (%s)."
+msgstr "Fehler beim Lesen aus '%s' (%s)."
+
+#: ../src/itdb_itunesdb.c:6403
+#, c-format
+msgid "Error while writing to '%s' (%s)."
+msgstr "Fehler beim Schreiben in die Datei '%s' (%s)."
+
+#: ../src/itdb_itunesdb.c:6416 ../src/itdb_itunesdb.c:6426
+#, c-format
+msgid "Error when closing '%s' (%s)."
+msgstr "Fehler beim Schließen der Datei '%s' (%s)."
+
+#: ../src/itdb_itunesdb.c:6856
+msgid "iPod"
+msgstr "iPod"
+
+#: ../src/itdb_itunesdb.c:7178
+#, c-format
+msgid "Problem creating iPod directory or file: '%s'."
+msgstr ""
+"Problem beim Erstellen eines Verzeichnisses oder einer Datei auf dem iPod: '%"
+"s'."
+
+#: ../src/itdb_photoalbum.c:111
+#, c-format
+msgid "Photos directory not found: '%s' (or similar)."
+msgstr ""
+"Der Pfad zum Fotoverzeichnis konnte nicht gefunden werden: '%s' (oder "
+"ähnlich)."
+
+#: ../src/itdb_photoalbum.c:266 ../src/itdb_photoalbum.c:460
+msgid "Photo Library"
+msgstr "Fotoarchiv"
+
+#: ../src/itdb_photoalbum.c:386
+#, c-format
+msgid "You need to specify the iPod model used before photos can be added."
+msgstr ""
+"Siem müssen das iPod-Model angeben, bevor Fotos hinzugefügt werden können."
+
+#: ../src/itdb_photoalbum.c:407
+#, c-format
+msgid ""
+"Your iPod does not seem to support photos. Maybe you need to specify the "
+"correct iPod model number? It is currently set to 'x%s' (%s/%s)."
+msgstr ""
+"Ihr iPod scheint Fotos nicht zu unterstützen. Eventuell müssen Sie auch nur "
+"das korrekte iPod-Model angeben. Zur Zeit haben Sie folgendes Modell "
+"eingestellt: 'x%s' (%s/%s)."
+
+#: ../src/itdb_photoalbum.c:419
+#, c-format
+msgid "Could not access file '%s'. Photo not added."
+msgstr "Konnte nicht auf die Datei '%s' zugreifen. Foto nicht hinzugefügt."
+
+#: ../src/itdb_photoalbum.c:448
+#, c-format
+msgid ""
+"Unexpected error in itdb_photodb_add_photo_internal() while adding photo, "
+"please report."
+msgstr ""
+"Unerwarteter Fehler in itdb_photodb_add_photo_internal() während des "
+"Hinzufügens eines Fotos. Bitter teilen Sie uns diesen Vorgang mit."
+
+#: ../src/itdb_photoalbum.c:468
+#, c-format
+msgid ""
+"Library compiled without gdk-pixbuf support. Picture support is disabled."
+msgstr ""
+"Die Bibliothek wurde ohne gdk-pixbuf-Unterstützung kompiliert. Fotos werden "
+"daher nicht unterstützt."
+
+#. New action!
+#: ../src/itdb_playlist.c:78
+#, c-format
+msgid "Unknown action (%d) in smart playlist will be ignored.\n"
+msgstr ""
+"Unbekannte Aktion (%d) in intelligenter Wiedergabeliste wird ignoriert.\n"
+
+#: ../src/itdb_thumb.c:326
+#, c-format
+msgid "Illegal filename: '%s'.\n"
+msgstr "Nicht zulässiger Dateiname: '%s'.\n"
+
+#: ../src/itdb_thumb.c:331
+#, c-format
+msgid "Mountpoint not set.\n"
+msgstr "Mountpoint wurde nicht gesetzt.\n"
+
+#: ../tests/test-photos.c:41
+#, c-format
+msgid ""
+"Usage to add photos:\n"
+"  %s add <mountpoint> <albumname> [<filename(s)>]\n"
+"  <albumname> should be set to 'NULL' to add photos to the master photo "
+"album\n"
+"  (Photo Library) only. If you don't specify any filenames an empty album "
+"will\n"
+"  be created.\n"
+msgstr ""
+"Syntax, um Fotos hinzuzufügen:\n"
+"  %s add <Mountpoint> <Name des Albums> [<Dateiname(n)>]\n"
+"  <Name des Albums> sollte als 'NULL' angegeben, um Fotos zum nur Haupalbum\n"
+"  (Fotoarchiv) hinzuzufügen. Wenn keine Dateinamen angegeben werden, wird\n"
+"  ein leeres Album erstellt.\n"
+
+#: ../tests/test-photos.c:42
+#, c-format
+msgid ""
+"Usage to dump all photos to <output_dir>:\n"
+"  %s dump <mountpoint> <output_dir>\n"
+msgstr ""
+"Syntax, um alle vorhandenen Fotos nach <Verzeichnis> zu kopieren:\n"
+"  %s dump <mountpoint> <Verzeichnis>\n"
+
+#: ../tests/test-photos.c:43
+#, c-format
+msgid ""
+"Usage to list all photos IDs to stdout:\n"
+"  %s list <mountpoint>\n"
+msgstr ""
+"Syntax,  um eine Liste der IDs aller vorhandenen Fotos auszugeben:\n"
+"  %s list <mountpoint>\n"
+
+#: ../tests/test-photos.c:44
+#, c-format
+msgid ""
+"Usage to remove photo IDs from Photo Library:\n"
+"  %s remove <mountpoint> <albumname> [<ID(s)>]\n"
+"  <albumname> should be set to 'NULL' to remove photos from the iPod\n"
+"  altogether. If you don't specify any IDs, the photoalbum will be removed\n"
+"  instead.\n"
+"  WARNING: IDs may change when writing the PhotoDB file.\n"
+msgstr ""
+"Syntax, um Fotos aus dem Fotoarchiv zu entfernen:\n"
+"  %s remove <Mountpoint> <Name des Albums> [<ID(s)>]\n"
+"  <Name des Albums> sollte als 'Null' angegeben werden, um Fotos "
+"vollständig\n"
+"  vom iPod zu entfernen. Wenn keine IDs angegeben werden, wird stattdessen\n"
+"  das bezeichnete Fotoalbum entfernt.\n"
+"  Vorsicht: IDs können sich verändern, wenn die Datenbank geschrieben wird.\n"
+
+#: ../tests/test-photos.c:119
+#, c-format
+msgid "Wrong number of command line arguments.\n"
+msgstr "Falsche Anzahl an Kommandozeilenargumenten.\n"
+
+#: ../tests/test-photos.c:128
+#, c-format
+msgid "Error creating '%s' (mkdir)\n"
+msgstr "Fehler beim Erstellen von '%s' (mkdir).\n"
+
+#: ../tests/test-photos.c:134
+#, c-format
+msgid "Error: '%s' is not a directory\n"
+msgstr "Fehler: '%s' ist kein Verzeichnis\n"
+
+#: ../tests/test-photos.c:143 ../tests/test-photos.c:177
+#: ../tests/test-photos.c:306
+#, c-format
+msgid "Error reading iPod photo database (%s).\n"
+msgstr "Fehler beim Lesen des iPod Fotobarchivs (%s).\n"
+
+#: ../tests/test-photos.c:149 ../tests/test-photos.c:183
+#: ../tests/test-photos.c:313
+#, c-format
+msgid "Error reading iPod photo database.\n"
+msgstr "Fehler beim Lesen der iPod Fotodatenbank.\n"
+
+#: ../tests/test-photos.c:167 ../tests/test-photos.c:226
+#: ../tests/test-photos.c:296 ../tests/test-photos.c:379
+#, c-format
+msgid "Insufficient number of command line arguments.\n"
+msgstr "Unzureichende Anzahl von Kommandozeilenargumenten.\n"
+
+#: ../tests/test-photos.c:194
+msgid "<Unnamed>"
+msgstr "<Unbenannt>"
+
+#: ../tests/test-photos.c:209
+#, c-format
+msgid "<No members>\n"
+msgstr "<Keine Einträge>\n"
+
+#: ../tests/test-photos.c:236
+#, c-format
+msgid ""
+"Error reading iPod photo database (%s).\n"
+"Will attempt to create a new database.\n"
+msgstr ""
+"Fehler beim Lesen der iPod Fotobibliothek (%s).\n"
+"Es wird versucht, eine neue Datenbank zu erstellen.\n"
+
+#: ../tests/test-photos.c:242
+#, c-format
+msgid ""
+"Error reading iPod photo database, will attempt to create a new database\n"
+msgstr ""
+"Fehler beim Lesen der iPod Fotodatenbank. Es wird versucht, eine neue "
+"Datenbank zu erstellen.\n"
+
+#: ../tests/test-photos.c:267
+#, c-format
+msgid "Error adding photo (%s) to photo database: %s\n"
+msgstr "Fehler beim Hinzufügen des Fotos (%s) zur Fotobibliothek: %s\n"
+
+#: ../tests/test-photos.c:324
+#, c-format
+msgid "Specified album '%s' not found. Aborting.\n"
+msgstr "Gewünschtes Album '%s' nicht gefunden. Breche ab.\n"
+
+#: ../tests/test-photos.c:336
+#, c-format
+msgid "Cannot remove Photo Library playlist. Aborting.\n"
+msgstr ""
+"Es ist nicht möglich, die 'Fotoarchiv'-Wiedergabeliste zu entfernen. Breche "
+"ab.\n"
+
+#: ../tests/test-photos.c:357
+#, c-format
+msgid "Warning: could not find photo with ID <%d>. Skipping...\n"
+msgstr ""
+"Warnung: das Foto mit der ID <%d> konnte nicht gefunden werden. Ich mache "
+"mit dem nächsten Foto weiter...\n"
+
+#: ../tests/test-photos.c:403
+#, c-format
+msgid "Unknown command '%s'\n"
+msgstr "Unbekanntes Kommando: '%s'\n"
+
+#: ../tests/test-init-ipod.c:66
+#, c-format
+msgid "Error initialising iPod: %s\n"
+msgstr "Konnte iPod nicht initialisieren: %s\n"
+
+#: ../tests/test-init-ipod.c:73
+#, c-format
+msgid "Error initialising iPod, unknown error\n"
+msgstr "Konnte iPod nicht initialisieren: unbekannte Fehler\n"
+
+#: ../tools/ipod-time-sync.c:37
+#, fuzzy, c-format
+msgid "usage: %s <device> [timezone]\n"
+msgstr "Benutzung: %s <Gerät> <Mountpoint>\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:39
+#, c-format
+msgid "usage: %s <device> <mountpoint>\n"
+msgstr "Benutzung: %s <Gerät> <Mountpoint>\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:45
+#, c-format
+msgid "Couldn't read xml sysinfo from %s\n"
+msgstr "Konnte xml SysInfoExtended nicht von %s lesen\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:56
+#, c-format
+msgid "Couldn't resolve Device directory path on %s"
+msgstr "Konnte den Device Ordnerpfad auf %s nicht auflösen"
+
+#: ../tools/read-sysinfoextended-sgutils.c:64
+#, c-format
+msgid "Couldn't resolve SysInfoExtended path on %s"
+msgstr "Konnte SysInfoExtended-Pfad auf %s nicht auflösen"
+
+#: ../tools/read-sysinfoextended-sgutils.c:74
+#, c-format
+msgid "Couldn't write SysInfoExtended to %s"
+msgstr "Konnte SysInfoExtended nicht nach %s schreiben"
+
+#~ msgid "Could not find artwork entry (mhii id: %u) for track (dbid: %s).\n"
+#~ msgstr ""
+#~ "Konnte Bildeintrag (mhii id: %u) für Track (dbid: %s) nicht finden.\n"
+
+#~ msgid "First Generation"
+#~ msgstr "Erste Generation"
+
+#~ msgid "Second Generation"
+#~ msgstr "Zweite Generation"
+
+#~ msgid "Third Generation"
+#~ msgstr "Dritte Generation"
+
+#~ msgid "Fourth Generation"
+#~ msgstr "Vierte Generation"
+
+#~ msgid "Fifth Generation"
+#~ msgstr "Fünfte Generation"
+
+#~ msgid "Sixth Generation"
+#~ msgstr "Sechste Generation"
+
+#~ msgid "Opening of '%s' for writing failed (%s)."
+#~ msgstr "Öffnen der Datei '%s' zum Schreiben ist fehlgeschlagen (%s)."
+
+#~ msgid "Writing to '%s' failed (%s)."
+#~ msgstr "Schreiben in die Datei '%s' ist fehlgeschlagen (%s)."
+
+#~ msgid "Cannot write mhod of type %d\n"
+#~ msgstr "Schreiben eines mhod-Hunks vom Typ %d ist nicht unterstützt.\n"
+
+#~ msgid "Error reading iPod photo database"
+#~ msgstr "Fehler beim Lesen des iPod Fotoarchivs"
+
+#~ msgid "Writing to '%s' failed."
+#~ msgstr "Fehler beim Schreiben in die Datei '%s'."
+
+#~ msgid "Database in memory corrupt (track pointer == NULL). Aborting export."
+#~ msgstr ""
+#~ "Datenbank im Speicher beschädigt (Zeiger auf Stück == NULL). Der Export "
+#~ "wird abgebrochen."
+
+#~ msgid ""
+#~ "Database in memory corrupt (playlist pointer == NULL). Aborting export."
+#~ msgstr ""
+#~ "Datenbank im Speicher beschädigt (Zeiger auf Wiedergabeliste == NULL). "
+#~ "Der Export wird abgebrochen."

Added: libgpod/trunk/libgpod/branches/upstream/current/po/es.po
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/po/es.po	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/po/es.po	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,875 @@
+# translation of libgpod.es.po to spanish
+# Alejandro Lamas Daviña <alejandro.lamas at ific.uv.es>, 2006, 2007, 2008.
+# This file is distributed under the same license as the libgpod package.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER.
+msgid ""
+msgstr ""
+"Project-Id-Version: libgpod\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-04-03 16:08-0400\n"
+"PO-Revision-Date: 2008-12-26 14:57+0100\n"
+"Last-Translator: Alejandro Lamas Daviña <alejandro.lamas at ific.uv.es>\n"
+"Language-Team: spanish <es_ES>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: KBabel 1.11.4\n"
+
+#: ../src/db-artwork-parser.c:140
+#, c-format
+msgid "Unexpected mhod string type: %d\n"
+msgstr "Tipo de cadena mhod no esperado: %d\n"
+
+#: ../src/db-artwork-parser.c:460
+#, c-format
+msgid "Unexpected mhsd index: %d\n"
+msgstr "Índice mhsd no esperado: %d\n"
+
+#: ../src/db-artwork-parser.c:540
+#, c-format
+msgid "Could not find corresponding track (dbid: %s) for artwork entry.\n"
+msgstr ""
+"No se ha podido encontrar la pista correspondiente (dbid: %s) a la "
+"carátula.\n"
+
+#: ../src/db-artwork-parser.c:548
+#, c-format
+msgid "iTunesDB and ArtworkDB artwork sizes inconsistent (%d+%d != %d)\n"
+msgstr ""
+"El tamaño de las carátulas de iTunesDB y ArtworkDB no es consistente (%d+%d !"
+"= %d)\n"
+
+#: ../src/db-image-parser.c:91
+#, c-format
+msgid "Unexpected image type in mhni: %d, offset: %d\n"
+msgstr "Tipo de imagen inesperado en mhni: %d, desplazamiento: %d\n"
+
+#: ../src/itdb_artwork.c:163
+#, c-format
+msgid "Could not access file '%s'."
+msgstr "No se ha podido acceder al fichero '%s'"
+
+#: ../src/itdb_artwork.c:181 ../src/itdb_artwork.c:241
+#: ../src/itdb_artwork.c:298
+#, c-format
+msgid "Artwork support not compiled into libgpod."
+msgstr "libgpod compilado sin soporte de carátulas."
+
+#: ../src/itdb_artwork.c:668
+#, c-format
+msgid "Could not find on iPod: '%s'\n"
+msgstr "Fichero no encontrado en el iPod: '%s'\n"
+
+#: ../src/itdb_artwork.c:828
+#, c-format
+msgid ""
+"Unable to retrieve thumbnail (appears to be on iPod, but no image info "
+"available): filename: '%s'\n"
+msgstr ""
+"Imposible cargar la imagen de muestra (parece estar en el iPod, pero no hay "
+"información disponible de la imagen): nombre de fichero: '%s'\n"
+
+#: ../src/itdb_device.c:263
+msgid "Invalid"
+msgstr "Inválido"
+
+#: ../src/itdb_device.c:264 ../src/itdb_device.c:305
+msgid "Unknown"
+msgstr "Desconocido"
+
+#: ../src/itdb_device.c:265
+msgid "Color"
+msgstr "Color"
+
+#: ../src/itdb_device.c:266
+msgid "Color U2"
+msgstr "Color U2"
+
+#: ../src/itdb_device.c:267
+msgid "Grayscale"
+msgstr "Escala de grises"
+
+#: ../src/itdb_device.c:268
+msgid "Grayscale U2"
+msgstr "Escala de grises U2"
+
+#: ../src/itdb_device.c:269
+msgid "Mini (Silver)"
+msgstr "Mini (Plata)"
+
+#: ../src/itdb_device.c:270
+msgid "Mini (Blue)"
+msgstr "Mini (Azul)"
+
+#: ../src/itdb_device.c:271
+msgid "Mini (Pink)"
+msgstr "Mini (Rosa)"
+
+#: ../src/itdb_device.c:272
+msgid "Mini (Green)"
+msgstr "Mini (Verde)"
+
+#: ../src/itdb_device.c:273
+msgid "Mini (Gold)"
+msgstr "Mini (Oro)"
+
+#: ../src/itdb_device.c:274
+msgid "Shuffle"
+msgstr "Shuffle"
+
+#: ../src/itdb_device.c:275
+msgid "Nano (White)"
+msgstr "Nano (Blanco)"
+
+#: ../src/itdb_device.c:276
+msgid "Nano (Black)"
+msgstr "Nano (Negro)"
+
+#: ../src/itdb_device.c:277
+msgid "Video (White)"
+msgstr "Video (Blanco)"
+
+#: ../src/itdb_device.c:278
+msgid "Video (Black)"
+msgstr "Video (Negro)"
+
+#: ../src/itdb_device.c:279
+msgid "Mobile (1)"
+msgstr "Móvil (1)"
+
+#: ../src/itdb_device.c:280
+msgid "Video U2"
+msgstr "Video U2"
+
+#: ../src/itdb_device.c:281
+msgid "Nano (Silver)"
+msgstr "Nano (Plata)"
+
+#: ../src/itdb_device.c:282
+msgid "Nano (Blue)"
+msgstr "Nano (Azul)"
+
+#: ../src/itdb_device.c:283
+msgid "Nano (Green)"
+msgstr "Nano (Verde)"
+
+#: ../src/itdb_device.c:284
+msgid "Nano (Pink)"
+msgstr "Nano (Rosa)"
+
+#: ../src/itdb_device.c:285
+msgid "Nano (Red)"
+msgstr "Nano (Rojo)"
+
+#: ../src/itdb_device.c:286
+msgid "Nano (Yellow)"
+msgstr "Nano (Amarillo)"
+
+#: ../src/itdb_device.c:287
+msgid "Nano (Purple)"
+msgstr "Nano (Púrpura)"
+
+#: ../src/itdb_device.c:288
+msgid "Nano (Orange)"
+msgstr "Nano (Naranja)"
+
+#: ../src/itdb_device.c:289
+msgid "iPhone (1)"
+msgstr "iPhone (1)"
+
+#: ../src/itdb_device.c:290
+msgid "Shuffle (Silver)"
+msgstr "Shuffle (Plata)"
+
+#: ../src/itdb_device.c:291
+msgid "Shuffle (Pink)"
+msgstr "Shuffle (Rosa)"
+
+#: ../src/itdb_device.c:292
+msgid "Shuffle (Blue)"
+msgstr "Shuffle (Azul)"
+
+#: ../src/itdb_device.c:293
+msgid "Shuffle (Green)"
+msgstr "Shuffle (Verde)"
+
+#: ../src/itdb_device.c:294
+msgid "Shuffle (Orange)"
+msgstr "Shuffle (Naranja)"
+
+#: ../src/itdb_device.c:295
+msgid "Shuffle (Purple)"
+msgstr "Shuffle (Púrpura)"
+
+#: ../src/itdb_device.c:296
+msgid "Shuffle (Red)"
+msgstr "Shuffle (Rojo)"
+
+#: ../src/itdb_device.c:297
+msgid "Classic (Silver)"
+msgstr "Clásico (Plata)"
+
+#: ../src/itdb_device.c:298
+msgid "Classic (Black)"
+msgstr "Clásico (Negro)"
+
+#: ../src/itdb_device.c:299
+msgid "Touch (Black)"
+msgstr "Touch (Negro)"
+
+#: ../src/itdb_device.c:306
+msgid "Regular (1st Gen.)"
+msgstr "Normal (1ª generación)"
+
+#: ../src/itdb_device.c:307
+msgid "Regular (2nd Gen.)"
+msgstr "Normal (2ª generación)"
+
+#: ../src/itdb_device.c:308
+msgid "Regular (3rd Gen.)"
+msgstr "Normal (3ª generación)"
+
+#: ../src/itdb_device.c:309
+msgid "Regular (4th Gen.)"
+msgstr "Normal (4ª generación)"
+
+#: ../src/itdb_device.c:310
+msgid "Photo"
+msgstr "Foto"
+
+#: ../src/itdb_device.c:311
+msgid "Mobile Phones"
+msgstr "Teléfonos móviles"
+
+#: ../src/itdb_device.c:312
+msgid "Mini (1st Gen.)"
+msgstr "Mini (1ª generación)"
+
+#: ../src/itdb_device.c:313
+msgid "Mini (2nd Gen.)"
+msgstr "Mini (2ª generación)"
+
+#: ../src/itdb_device.c:314
+msgid "Shuffle (1st Gen.)"
+msgstr "Shuffle (1ª generación)"
+
+#: ../src/itdb_device.c:315
+msgid "Shuffle (2nd Gen.)"
+msgstr "Suffle (2ª generación)"
+
+#: ../src/itdb_device.c:316
+msgid "Shuffle (3rd Gen.)"
+msgstr "Suffle (3ª generación)"
+
+#: ../src/itdb_device.c:317
+msgid "Nano (1st Gen.)"
+msgstr "Nano (1ª generación)"
+
+#: ../src/itdb_device.c:318
+msgid "Nano (2nd Gen.)"
+msgstr "Nano (2ª generación)"
+
+#: ../src/itdb_device.c:319
+msgid "Nano Video (3rd Gen.)"
+msgstr "Nano Video (3ª generación)"
+
+#: ../src/itdb_device.c:320
+msgid "Nano Video (4th Gen.)"
+msgstr "Nano Video (4ª generación)"
+
+#: ../src/itdb_device.c:321
+msgid "Video (1st Gen.)"
+msgstr "Video (1ª generación)"
+
+#: ../src/itdb_device.c:322
+msgid "Video (2nd Gen.)"
+msgstr "Video (2ª generación)"
+
+#: ../src/itdb_device.c:323 ../src/itdb_device.c:324
+msgid "Classic"
+msgstr "Clásico"
+
+#: ../src/itdb_device.c:325
+msgid "Touch"
+msgstr "Touch"
+
+#: ../src/itdb_device.c:326
+msgid "iPhone"
+msgstr "iPhone"
+
+#: ../src/itdb_device.c:327 ../src/itdb_device.c:328
+msgid "Unused"
+msgstr "Sin usar"
+
+#: ../src/itdb_device.c:928
+#, c-format
+msgid "Could not open '%s' for writing."
+msgstr "Error al abrir '%s' para su escritura."
+
+#: ../src/itdb_device.c:937
+#, c-format
+msgid "Device directory does not exist."
+msgstr "No existe el directorio del dispositivo."
+
+#: ../src/itdb_itunesdb.c:507
+#, c-format
+msgid "Illegal seek to offset %ld (length %ld) in file '%s'."
+msgstr "Acceso ilegal al desplazamiento %ld (tamaño %ld) en el fichero '%s'."
+
+#: ../src/itdb_itunesdb.c:910
+#, c-format
+msgid "Not a Play Counts file: '%s' (missing mhdp header)."
+msgstr "No es un fichero cuenta reproducciones: '%s' (falta cabecera mhdp)."
+
+#: ../src/itdb_itunesdb.c:925
+#, c-format
+msgid "Play Counts file ('%s'): header length smaller than expected (%d<96)."
+msgstr ""
+"Fichero cuenta reproducciones ('%s'): tamaño de la cabecera menor del "
+"esperado (%d<96)."
+
+#: ../src/itdb_itunesdb.c:939
+#, c-format
+msgid "Play Counts file ('%s'): entry length smaller than expected (%d<12)."
+msgstr ""
+"Fichero cuenta reproducciones ('%s'): tamaño de la entrada menor del "
+"esperado (%d<12)."
+
+#: ../src/itdb_itunesdb.c:1014
+#, c-format
+msgid "iTunesStats file ('%s'): entry length smaller than expected (%d<18)."
+msgstr ""
+"Fichero cuenta reproducciones ('%s'): tamaño de la entrada menor del "
+"esperado (%d<18)."
+
+#: ../src/itdb_itunesdb.c:1333
+#, c-format
+msgid "iTunesDB corrupt: no MHOD at offset %ld in file '%s'."
+msgstr ""
+"iTunesDB corrupta: no hay MHOD en el desplazamiento %ld del fichero '%s'."
+
+#: ../src/itdb_itunesdb.c:1519
+#, c-format
+msgid "Unknown smart rule action at %ld: %x. Trying to continue.\n"
+msgstr "Regla de acción desconocida en %ld: %x. Intentando continuar.\n"
+
+#: ../src/itdb_itunesdb.c:1550
+#, c-format
+msgid ""
+"Length of smart playlist rule field (%d) not as expected. Trying to continue "
+"anyhow.\n"
+msgstr ""
+"La longitud del campo de reglas (%d) de la lista de reproducción inteligente "
+"no es la esperada. Intentando continuar.\n"
+
+#: ../src/itdb_itunesdb.c:1593
+#, c-format
+msgid "iTunesDB corrupt: no SLst at offset %ld in file '%s'."
+msgstr ""
+"iTunesDB corrupta: no hay SLst en el desplazamiento %ld del fichero '%s'."
+
+#: ../src/itdb_itunesdb.c:1606
+#, c-format
+msgid ""
+"Encountered unknown MHOD type (%d) while parsing the iTunesDB. Ignoring.\n"
+"\n"
+msgstr ""
+"Se ha encontrado un tipo MHOD desconocido (%d) al analizar la iTunesDB. "
+"Ignorando.\n"
+"\n"
+
+#: ../src/itdb_itunesdb.c:1689
+#, c-format
+msgid "iTunesDB corrupt: hunk length 0 for hunk at %ld in file '%s'."
+msgstr "iTunesDB corrupta: tamaño 0 para la zona %ld en el fichero '%s'."
+
+#: ../src/itdb_itunesdb.c:1702
+#, c-format
+msgid ""
+"iTunesDB corrupt: no section '%s' found in section '%s' starting at %ld."
+msgstr ""
+"iTunesDB corrupta: no se ha encontrado la sección '%s' en la sección '%s' "
+"empezando en %ld."
+
+#: ../src/itdb_itunesdb.c:1716
+#, c-format
+msgid ""
+"header length of '%s' smaller than expected (%d < %d) at offset %ld in file "
+"'%s'."
+msgstr ""
+"Tamaño de la cabecera de '%s' menor del esperado (%d<%d). en el "
+"desplazamiento %ld del fichero '%s'."
+
+#: ../src/itdb_itunesdb.c:1801
+#, c-format
+msgid "Not a iTunesDB: '%s' (missing mhdb header)."
+msgstr "No es un fichero iTunesDB: '%s' (falta la cabecera mhdb)."
+
+#: ../src/itdb_itunesdb.c:1818
+#, c-format
+msgid ""
+"iTunesDB ('%s'): header length of mhsd hunk smaller than expected (%d<32). "
+"Aborting."
+msgstr ""
+"iTunesDB ('%s'): tamaño de la cabecera de la zona mhsd menor del esperado (%"
+"d<32). Cancelando."
+
+#: ../src/itdb_itunesdb.c:1839
+#, c-format
+msgid "iTunesDB '%s' corrupt: mhsd expected at %ld."
+msgstr "iTunesDB '%s' corrupta: se esperaba mhsd en %ld."
+
+#: ../src/itdb_itunesdb.c:1944
+#, c-format
+msgid "Number of MHODs in mhip at %ld inconsistent in file '%s'."
+msgstr ""
+"El número de MHODs en mhip en %ld no es consistente en el fichero '%s'."
+
+#: ../src/itdb_itunesdb.c:2121
+#, c-format
+msgid "Number of MHODs in mhyp at %ld inconsistent in file '%s'."
+msgstr ""
+"El número de MHODs en mhyp en %ld no es consistente en el fichero '%s'."
+
+#: ../src/itdb_itunesdb.c:2131
+msgid "Master-PL"
+msgstr "Lista de reproducción principal"
+
+#: ../src/itdb_itunesdb.c:2135
+msgid "Podcasts"
+msgstr "Podcasts"
+
+#: ../src/itdb_itunesdb.c:2137
+msgid "Playlist"
+msgstr "Lista de reproducción"
+
+#: ../src/itdb_itunesdb.c:2159
+#, c-format
+msgid ""
+"iTunesDB corrupt: number of mhip sections inconsistent in mhyp starting at %"
+"ld in file '%s'."
+msgstr ""
+"iTunesDB corrupta: el número de secciones mhip no es consistente en mhyp "
+"empezando en %ld en el fichero '%s'."
+
+#: ../src/itdb_itunesdb.c:2180
+#, c-format
+msgid "Itdb_Track ID '%d' not found.\n"
+msgstr "Itdb_Track ID '%d' no encontrada.\n"
+
+#: ../src/itdb_itunesdb.c:2524
+msgid "OTG Playlist"
+msgstr "Lista de reproducción OTG"
+
+#: ../src/itdb_itunesdb.c:2542
+#, c-format
+msgid "Not a OTG playlist file: '%s' (missing mhpo header)."
+msgstr "No es una lista de reproducción: '%s' (falta la cabecera mhpo)."
+
+#: ../src/itdb_itunesdb.c:2556
+#, c-format
+msgid "OTG playlist file ('%s'): header length smaller than expected (%d<20)."
+msgstr ""
+"Fichero de lista de reproducción OTG ('%s'): tamaño de la cabecera menor del "
+"esperado (%d<20)."
+
+#: ../src/itdb_itunesdb.c:2568
+#, c-format
+msgid "OTG playlist file ('%s'): entry length smaller than expected (%d<4)."
+msgstr ""
+"Fichero ('%s') de la lista de reproducción OTG: tamaño de la entrada menor "
+"del esperado (%d<4)."
+
+#: ../src/itdb_itunesdb.c:2603
+#, c-format
+msgid "OTG playlist file '%s': reference to non-existent track (%d)."
+msgstr ""
+"La lista de reproducción OTG '%s': hace referencia a una pista no existente "
+"(%d)."
+
+#: ../src/itdb_itunesdb.c:2648
+#, c-format
+msgid "OTG Playlist %d"
+msgstr "Lista de reproducción OTG %d"
+
+#. this should not be -- issue warning
+#: ../src/itdb_itunesdb.c:2716
+msgid ""
+"iTunesDB corrupt: number of tracks (mhit hunks) inconsistent. Trying to "
+"continue.\n"
+msgstr ""
+"iTunesDB esté corrupta: el número de pistas (zonas mhit) no es consistente. "
+"Intentando continuar.\n"
+
+#. this should not be -- issue warning
+#: ../src/itdb_itunesdb.c:2779
+msgid ""
+"iTunesDB possibly corrupt: number of playlists (mhyp hunks) inconsistent. "
+"Trying to continue.\n"
+msgstr ""
+"Es posible que iTunesDB esté corrupta: el número de listas de reproducción "
+"(zonas mhyp) no es consistente. Intentando continuar.\n"
+
+#: ../src/itdb_itunesdb.c:2826
+#, c-format
+msgid ""
+"iTunesDB '%s' corrupt: Could not find tracklist (no mhsd type 1 section "
+"found)"
+msgstr ""
+"iTunesDB '%s' corrputa: No se ha encontrado la lista de pistas (no se ha "
+"encontrado la sección mhsd de tipo 1)"
+
+#: ../src/itdb_itunesdb.c:2855
+#, c-format
+msgid ""
+"iTunesDB '%s' corrupt: Could not find playlists (no mhsd type 2 or type 3 "
+"sections found)"
+msgstr ""
+"iTunesDB '%s' corrputa: No se han encontrado las listas de reproducción (no "
+"se han encontrado las secciones mhsd de tipo 2 o tipo 3)"
+
+#: ../src/itdb_itunesdb.c:2877
+#, c-format
+msgid "iTunes directory not found: '%s' (or similar)."
+msgstr "Directorio 'iTunes' no encontrado: '%s' (o similar)."
+
+#: ../src/itdb_itunesdb.c:2894
+#, c-format
+msgid "Music directory not found: '%s' (or similar)."
+msgstr "Directorio 'Music' no encontrado: '%s' (o similar)"
+
+#: ../src/itdb_itunesdb.c:2912
+#, c-format
+msgid "Control directory not found: '%s' (or similar)."
+msgstr "Directorio 'iPod Control' no encontrado: '%s' (o similar)."
+
+#: ../src/itdb_itunesdb.c:3033
+#, c-format
+msgid "File not found: '%s'."
+msgstr "Fichero no encontrado: '%s'."
+
+#: ../src/itdb_itunesdb.c:5533
+#, c-format
+msgid "Path not found: '%s' (or similar)."
+msgstr "Ruta no encontrada: '%s' (o similar)."
+
+#: ../src/itdb_itunesdb.c:5742
+#, c-format
+msgid "Error renaming '%s' to '%s' (%s)."
+msgstr "Error al renombrar '%s' a '%s' (%s)."
+
+#: ../src/itdb_itunesdb.c:5759 ../src/itdb_itunesdb.c:5776
+#: ../src/itdb_itunesdb.c:5793
+#, c-format
+msgid "Error removing '%s' (%s)."
+msgstr "Error al borrar '%s' (%s)."
+
+#: ../src/itdb_itunesdb.c:5960 ../src/itdb_itunesdb.c:6133
+#, c-format
+msgid "Mountpoint not set."
+msgstr "Punto de montaje no configurado."
+
+#: ../src/itdb_itunesdb.c:6000
+#, c-format
+msgid "No 'F..' directories found in '%s'."
+msgstr "No se ha encontrado ningún directorio en '%s'."
+
+#: ../src/itdb_itunesdb.c:6021
+#, c-format
+msgid "Path not found: '%s'."
+msgstr "Ruta no encontrada: '%s'."
+
+#: ../src/itdb_itunesdb.c:6142
+#, c-format
+msgid "'%s' could not be accessed (%s)."
+msgstr "No se ha podido acceder al fichero '%s' (%s)."
+
+#: ../src/itdb_itunesdb.c:6152
+#, c-format
+msgid ""
+"Destination file '%s' does not appear to be on the iPod mounted at '%s'."
+msgstr ""
+"El destino del fichero '%s' parece no existir en el iPod montado en '%s'"
+
+#: ../src/itdb_itunesdb.c:6360
+#, c-format
+msgid "Error opening '%s' for reading (%s)."
+msgstr "Error al abrir '%s' para su lectura (%s)."
+
+#: ../src/itdb_itunesdb.c:6372
+#, c-format
+msgid "Error opening '%s' for writing (%s)."
+msgstr "Error al abrir '%s' para su escritura (%s)."
+
+#: ../src/itdb_itunesdb.c:6388
+#, c-format
+msgid "Error while reading from '%s' (%s)."
+msgstr "Error durante la lectura de '%s' (%s)."
+
+#: ../src/itdb_itunesdb.c:6403
+#, c-format
+msgid "Error while writing to '%s' (%s)."
+msgstr "Error durante la escritura de '%s' (%s)."
+
+#: ../src/itdb_itunesdb.c:6416 ../src/itdb_itunesdb.c:6426
+#, c-format
+msgid "Error when closing '%s' (%s)."
+msgstr "Error al cerrar '%s' (%s)."
+
+#: ../src/itdb_itunesdb.c:6856
+msgid "iPod"
+msgstr "iPod"
+
+#: ../src/itdb_itunesdb.c:7178
+#, c-format
+msgid "Problem creating iPod directory or file: '%s'."
+msgstr "Problema al crear el directorio iPod o el fichero: '%s'."
+
+#: ../src/itdb_photoalbum.c:111
+#, c-format
+msgid "Photos directory not found: '%s' (or similar)."
+msgstr "Directorio 'de fotos' no encontrado: '%s' (o similar)."
+
+#: ../src/itdb_photoalbum.c:266 ../src/itdb_photoalbum.c:460
+msgid "Photo Library"
+msgstr "Biblioteca de fotos"
+
+#: ../src/itdb_photoalbum.c:386
+#, c-format
+msgid "You need to specify the iPod model used before photos can be added."
+msgstr ""
+"Es necesario especificar el modelo del iPod antes de poder añadir fotos."
+
+#: ../src/itdb_photoalbum.c:407
+#, c-format
+msgid ""
+"Your iPod does not seem to support photos. Maybe you need to specify the "
+"correct iPod model number? It is currently set to 'x%s' (%s/%s)."
+msgstr ""
+"Parece que el iPod no soporta fotos. Quizás sea necesario especificar el "
+"modelo de iPod correcto. Actualmente está configurado como 'x%s' (%s/%s)."
+
+#: ../src/itdb_photoalbum.c:419
+#, c-format
+msgid "Could not access file '%s'. Photo not added."
+msgstr "No se ha podido acceder al fichero '%s'. No se ha añadido la foto."
+
+#: ../src/itdb_photoalbum.c:448
+#, c-format
+msgid ""
+"Unexpected error in itdb_photodb_add_photo_internal() while adding photo, "
+"please report."
+msgstr ""
+"Error inesperado en  itdb_photodb_add_photo_internal() mientras se añadía la "
+"foto. Informe, por favor."
+
+#: ../src/itdb_photoalbum.c:468
+#, c-format
+msgid ""
+"Library compiled without gdk-pixbuf support. Picture support is disabled."
+msgstr ""
+"Biblioteca compilada sin soporte gdk-pixbuf. Soporte de imágenes desactivado."
+
+#. New action!
+#: ../src/itdb_playlist.c:78
+#, c-format
+msgid "Unknown action (%d) in smart playlist will be ignored.\n"
+msgstr ""
+"Acción desconocida (%d) en la lista de reproducción inteligente. Será "
+"ignorada.\n"
+
+#: ../src/itdb_thumb.c:326
+#, c-format
+msgid "Illegal filename: '%s'.\n"
+msgstr "Nombre de fichero no válido: '%s'.\n"
+
+#: ../src/itdb_thumb.c:331
+#, c-format
+msgid "Mountpoint not set.\n"
+msgstr "Punto de montaje no configurado.\n"
+
+#: ../tests/test-photos.c:41
+#, c-format
+msgid ""
+"Usage to add photos:\n"
+"  %s add <mountpoint> <albumname> [<filename(s)>]\n"
+"  <albumname> should be set to 'NULL' to add photos to the master photo "
+"album\n"
+"  (Photo Library) only. If you don't specify any filenames an empty album "
+"will\n"
+"  be created.\n"
+msgstr ""
+"Uso para añadir fotos:\n"
+"  %s add <punto_de_montaje> <nombre_de_álbum> [<nombre_de_fichero(s)>]\n"
+"  Para añadir fotos al álbum maestro de fotos, debe ponerse "
+"<nombre_de_álbum> como 'NULL' \n"
+"  (Sólo para la biblioteca de fotos). Si no se especifica ningún nombre, se "
+"creará\n"
+" un álbum vacío.\n"
+
+#: ../tests/test-photos.c:42
+#, c-format
+msgid ""
+"Usage to dump all photos to <output_dir>:\n"
+"  %s dump <mountpoint> <output_dir>\n"
+msgstr ""
+"Uso para volcar todas las fotos a <directorio_de_salida>:\n"
+"  %s dump <punto_de_montaje> <directorio_de_salida>\n"
+
+#: ../tests/test-photos.c:43
+#, c-format
+msgid ""
+"Usage to list all photos IDs to stdout:\n"
+"  %s list <mountpoint>\n"
+msgstr ""
+"Uso para listar todas las IDs de las fotos a la salida estándar:\n"
+"  %s list <punto_de_montaje>\n"
+
+#: ../tests/test-photos.c:44
+#, c-format
+msgid ""
+"Usage to remove photo IDs from Photo Library:\n"
+"  %s remove <mountpoint> <albumname> [<ID(s)>]\n"
+"  <albumname> should be set to 'NULL' to remove photos from the iPod\n"
+"  altogether. If you don't specify any IDs, the photoalbum will be removed\n"
+"  instead.\n"
+"  WARNING: IDs may change when writing the PhotoDB file.\n"
+msgstr ""
+"Uso para borrar IDs de fotos de la biblioteca de fotos:\n"
+"  %s remove <punto_de_montaje> <nombre_de_álbum> [<ID(s)>]\n"
+"  Para borrar las fotos también del iPod, debe ponerse <nombre_de_álbum> "
+"como 'NULL'.\n"
+"  En caso de no especificar ningún ID, se borrará el álbum de fotos\n"
+"  AVISO: los IDs pueden cambiar cuando se escribe el fichero PhotoDB.\n"
+
+#: ../tests/test-photos.c:119
+#, c-format
+msgid "Wrong number of command line arguments.\n"
+msgstr "Número de argumentos incorrecto.\n"
+
+#: ../tests/test-photos.c:128
+#, c-format
+msgid "Error creating '%s' (mkdir)\n"
+msgstr "Error al crear '%s' (mkdir)\n"
+
+#: ../tests/test-photos.c:134
+#, c-format
+msgid "Error: '%s' is not a directory\n"
+msgstr "Error: '%s' no es un directorio\n"
+
+#: ../tests/test-photos.c:143 ../tests/test-photos.c:177
+#: ../tests/test-photos.c:306
+#, c-format
+msgid "Error reading iPod photo database (%s).\n"
+msgstr "Error al leer la base de datos de fotos del iPod (%s).\n"
+
+#: ../tests/test-photos.c:149 ../tests/test-photos.c:183
+#: ../tests/test-photos.c:313
+#, c-format
+msgid "Error reading iPod photo database.\n"
+msgstr "Error al leer la base de datos de fotos del iPod.\n"
+
+#: ../tests/test-photos.c:167 ../tests/test-photos.c:226
+#: ../tests/test-photos.c:296 ../tests/test-photos.c:379
+#, c-format
+msgid "Insufficient number of command line arguments.\n"
+msgstr "Número de argumentos insuficiente.\n"
+
+#: ../tests/test-photos.c:194
+msgid "<Unnamed>"
+msgstr "<Sin nombre>"
+
+#: ../tests/test-photos.c:209
+#, c-format
+msgid "<No members>\n"
+msgstr "<No miembros>\n"
+
+#: ../tests/test-photos.c:236
+#, c-format
+msgid ""
+"Error reading iPod photo database (%s).\n"
+"Will attempt to create a new database.\n"
+msgstr ""
+"Error al leer la base de datos de fotos del iPod (%s).\n"
+"Se intentará crear una nueva base de datos.\n"
+
+#: ../tests/test-photos.c:242
+#, c-format
+msgid ""
+"Error reading iPod photo database, will attempt to create a new database\n"
+msgstr ""
+"Error al leer la base de datos de fotos del iPod, se intentará crear una "
+"nueva base de datos\n"
+
+#: ../tests/test-photos.c:267
+#, c-format
+msgid "Error adding photo (%s) to photo database: %s\n"
+msgstr "Error al añadir la foto (%s) a la base de datos de fotos: %s\n"
+
+#: ../tests/test-photos.c:324
+#, c-format
+msgid "Specified album '%s' not found. Aborting.\n"
+msgstr "No se ha encontrado el álbum especificado '%s'. Cancelando.\n"
+
+#: ../tests/test-photos.c:336
+#, c-format
+msgid "Cannot remove Photo Library playlist. Aborting.\n"
+msgstr ""
+"No se puede borrar la lista de reproducción de la biblioteca de fotos. "
+"Cancelando.\n"
+
+#: ../tests/test-photos.c:357
+#, c-format
+msgid "Warning: could not find photo with ID <%d>. Skipping...\n"
+msgstr "Aviso: no se ha podido encontrar la foto con ID <%d>. Ignorando...\n"
+
+#: ../tests/test-photos.c:403
+#, c-format
+msgid "Unknown command '%s'\n"
+msgstr "Comando desconocido '%s'\n"
+
+#: ../tests/test-init-ipod.c:66
+#, c-format
+msgid "Error initialising iPod: %s\n"
+msgstr "Error al inicializar iPod: %s\n"
+
+#: ../tests/test-init-ipod.c:73
+#, c-format
+msgid "Error initialising iPod, unknown error\n"
+msgstr "Error al inicializar iPod, error desconocido\n"
+
+#: ../tools/ipod-time-sync.c:37
+#, fuzzy, c-format
+msgid "usage: %s <device> [timezone]\n"
+msgstr "uso: %s <dispositivo> <punto_de_montaje>\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:39
+#, c-format
+msgid "usage: %s <device> <mountpoint>\n"
+msgstr "uso: %s <dispositivo> <punto_de_montaje>\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:45
+#, c-format
+msgid "Couldn't read xml sysinfo from %s\n"
+msgstr "No se ha podido leer sysinfo xml de %s\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:56
+#, c-format
+msgid "Couldn't resolve Device directory path on %s"
+msgstr "No se ha podido resolver la ruta del directorio de dispositivo en %s"
+
+#: ../tools/read-sysinfoextended-sgutils.c:64
+#, c-format
+msgid "Couldn't resolve SysInfoExtended path on %s"
+msgstr "No se ha podido resolver la ruta SysInfoExtended en%s"
+
+#: ../tools/read-sysinfoextended-sgutils.c:74
+#, c-format
+msgid "Couldn't write SysInfoExtended to %s"
+msgstr "No se ha podido escribir SysInfoExtended a %s"
+
+#~ msgid "Could not find artwork entry (mhii id: %u) for track (dbid: %s).\n"
+#~ msgstr ""
+#~ "No se ha podido encontrar la carátula (mhii id: %u) correspondiente a la "
+#~ "pista (dbid: %s) .\n"

Added: libgpod/trunk/libgpod/branches/upstream/current/po/fr.po
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/po/fr.po	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/po/fr.po	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,870 @@
+# French language translation for gtkpod 
+# Copyright (C) 2005-2008 Éric Lassauge
+# Éric Lassauge <lassauge at users.sf.net>, 2008.
+# Copyright (C) 2003 David Le Brun
+# David Le Brun <david at dyn-ns.net>, 2003.
+#
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libgpod-0.7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-04-03 16:08-0400\n"
+"PO-Revision-Date: 2008-12-11 14:37+0000\n"
+"Last-Translator: Éric Lassauge <rpmfarm at free.fr>\n"
+"Language-Team: FR\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n>1;\n"
+
+#: ../src/db-artwork-parser.c:140
+#, c-format
+msgid "Unexpected mhod string type: %d\n"
+msgstr "Type de chaîne mhod inattendu : %d\n"
+
+#: ../src/db-artwork-parser.c:460
+#, c-format
+msgid "Unexpected mhsd index: %d\n"
+msgstr "Index mhsd inattendu : %d\n"
+
+#: ../src/db-artwork-parser.c:540
+#, c-format
+msgid "Could not find corresponding track (dbid: %s) for artwork entry.\n"
+msgstr "Impossible de trouver la piste (dbid : %s) pour l'image.\n"
+
+#: ../src/db-artwork-parser.c:548
+#, c-format
+msgid "iTunesDB and ArtworkDB artwork sizes inconsistent (%d+%d != %d)\n"
+msgstr ""
+"Tailles inconsistantes pour l'image entre iTunesDB et ArtworkDB (%d+%d != %"
+"d)\n"
+
+#: ../src/db-image-parser.c:91
+#, c-format
+msgid "Unexpected image type in mhni: %d, offset: %d\n"
+msgstr "Type d'image inattendu dans mhni : %d, offset : %d\n"
+
+#: ../src/itdb_artwork.c:163
+#, c-format
+msgid "Could not access file '%s'."
+msgstr "Impossible d'accéder au fichier « %s »."
+
+#: ../src/itdb_artwork.c:181 ../src/itdb_artwork.c:241
+#: ../src/itdb_artwork.c:298
+#, c-format
+msgid "Artwork support not compiled into libgpod."
+msgstr "Pas de support des images dans libgpod."
+
+#: ../src/itdb_artwork.c:668
+#, c-format
+msgid "Could not find on iPod: '%s'\n"
+msgstr "Impossible de trouver sur le iPod : « %s »\n"
+
+#: ../src/itdb_artwork.c:828
+#, c-format
+msgid ""
+"Unable to retrieve thumbnail (appears to be on iPod, but no image info "
+"available): filename: '%s'\n"
+msgstr ""
+"Impossible de récupérer l'imagette (apparemment sur l'iPod, mais aucune info "
+"d'image disponible : fichier : « %s »\n"
+
+#: ../src/itdb_device.c:263
+msgid "Invalid"
+msgstr "Invalide"
+
+#: ../src/itdb_device.c:264 ../src/itdb_device.c:305
+msgid "Unknown"
+msgstr "Inconnu"
+
+#: ../src/itdb_device.c:265
+msgid "Color"
+msgstr "Couleur"
+
+#: ../src/itdb_device.c:266
+msgid "Color U2"
+msgstr "U2 couleur"
+
+#: ../src/itdb_device.c:267
+msgid "Grayscale"
+msgstr "Niveaux de gris"
+
+#: ../src/itdb_device.c:268
+msgid "Grayscale U2"
+msgstr "U2 niveaux de gris"
+
+#: ../src/itdb_device.c:269
+msgid "Mini (Silver)"
+msgstr "Mini (argent)"
+
+#: ../src/itdb_device.c:270
+msgid "Mini (Blue)"
+msgstr "Mini (bleu)"
+
+#: ../src/itdb_device.c:271
+msgid "Mini (Pink)"
+msgstr "Mini (rose)"
+
+#: ../src/itdb_device.c:272
+msgid "Mini (Green)"
+msgstr "Mini (vert)"
+
+#: ../src/itdb_device.c:273
+msgid "Mini (Gold)"
+msgstr "Mini (or)"
+
+#: ../src/itdb_device.c:274
+msgid "Shuffle"
+msgstr "Shuffle"
+
+#: ../src/itdb_device.c:275
+msgid "Nano (White)"
+msgstr "Nano (blanc)"
+
+#: ../src/itdb_device.c:276
+msgid "Nano (Black)"
+msgstr "Nano (noir)"
+
+#: ../src/itdb_device.c:277
+msgid "Video (White)"
+msgstr "Vidéo (blanc)"
+
+#: ../src/itdb_device.c:278
+msgid "Video (Black)"
+msgstr "Vidéo (noir)"
+
+#: ../src/itdb_device.c:279
+msgid "Mobile (1)"
+msgstr "Mobile (1)"
+
+#: ../src/itdb_device.c:280
+msgid "Video U2"
+msgstr "U2 Vidéo"
+
+#: ../src/itdb_device.c:281
+msgid "Nano (Silver)"
+msgstr "Nano (argent)"
+
+#: ../src/itdb_device.c:282
+msgid "Nano (Blue)"
+msgstr "Nano (bleu)"
+
+#: ../src/itdb_device.c:283
+msgid "Nano (Green)"
+msgstr "Nano (vert)"
+
+#: ../src/itdb_device.c:284
+msgid "Nano (Pink)"
+msgstr "Nano (rose)"
+
+#: ../src/itdb_device.c:285
+msgid "Nano (Red)"
+msgstr "Nano (rouge)"
+
+#: ../src/itdb_device.c:286
+msgid "Nano (Yellow)"
+msgstr "Nano (jaune)"
+
+#: ../src/itdb_device.c:287
+msgid "Nano (Purple)"
+msgstr "Nano (violet)"
+
+#: ../src/itdb_device.c:288
+msgid "Nano (Orange)"
+msgstr "Nano (orange)"
+
+#: ../src/itdb_device.c:289
+msgid "iPhone (1)"
+msgstr "iPhone (1)"
+
+#: ../src/itdb_device.c:290
+msgid "Shuffle (Silver)"
+msgstr "Shuffle (argent)"
+
+#: ../src/itdb_device.c:291
+msgid "Shuffle (Pink)"
+msgstr "Shuffle (rose)"
+
+#: ../src/itdb_device.c:292
+msgid "Shuffle (Blue)"
+msgstr "Shuffle (bleu)"
+
+#: ../src/itdb_device.c:293
+msgid "Shuffle (Green)"
+msgstr "Shuffle (vert)"
+
+#: ../src/itdb_device.c:294
+msgid "Shuffle (Orange)"
+msgstr "Shuffle (orange)"
+
+#: ../src/itdb_device.c:295
+msgid "Shuffle (Purple)"
+msgstr "Shuffle (violet)"
+
+#: ../src/itdb_device.c:296
+msgid "Shuffle (Red)"
+msgstr "Shuffle (rouge)"
+
+#: ../src/itdb_device.c:297
+msgid "Classic (Silver)"
+msgstr "Classic (argent)"
+
+#: ../src/itdb_device.c:298
+msgid "Classic (Black)"
+msgstr "Classic (noir)"
+
+#: ../src/itdb_device.c:299
+msgid "Touch (Black)"
+msgstr "Touch (noir)"
+
+#: ../src/itdb_device.c:306
+msgid "Regular (1st Gen.)"
+msgstr "Normal (1ière gen.)"
+
+#: ../src/itdb_device.c:307
+msgid "Regular (2nd Gen.)"
+msgstr "Normal (2nde gen.)"
+
+#: ../src/itdb_device.c:308
+msgid "Regular (3rd Gen.)"
+msgstr "Normal (3ième gen.)"
+
+#: ../src/itdb_device.c:309
+msgid "Regular (4th Gen.)"
+msgstr "Normal (4ième gen.)"
+
+#: ../src/itdb_device.c:310
+msgid "Photo"
+msgstr "Photo"
+
+#: ../src/itdb_device.c:311
+msgid "Mobile Phones"
+msgstr "Téléphones mobiles"
+
+#: ../src/itdb_device.c:312
+msgid "Mini (1st Gen.)"
+msgstr "Mini (1ière gen.)"
+
+#: ../src/itdb_device.c:313
+msgid "Mini (2nd Gen.)"
+msgstr "Mini (2nde gen.)"
+
+#: ../src/itdb_device.c:314
+msgid "Shuffle (1st Gen.)"
+msgstr "Shuffle (1ière gen.)"
+
+#: ../src/itdb_device.c:315
+msgid "Shuffle (2nd Gen.)"
+msgstr "Shuffle (2nde gen.)"
+
+#: ../src/itdb_device.c:316
+msgid "Shuffle (3rd Gen.)"
+msgstr "Shuffle (3ième gen.)"
+
+#: ../src/itdb_device.c:317
+msgid "Nano (1st Gen.)"
+msgstr "Nano (1ière gen.)"
+
+#: ../src/itdb_device.c:318
+msgid "Nano (2nd Gen.)"
+msgstr "Nano (2nde gen.)"
+
+#: ../src/itdb_device.c:319
+msgid "Nano Video (3rd Gen.)"
+msgstr "Nano (3ième gen.)"
+
+#: ../src/itdb_device.c:320
+msgid "Nano Video (4th Gen.)"
+msgstr "Nano vidéo(4ième gen.)"
+
+#: ../src/itdb_device.c:321
+msgid "Video (1st Gen.)"
+msgstr "Vidéo (1ière gen.)"
+
+#: ../src/itdb_device.c:322
+msgid "Video (2nd Gen.)"
+msgstr "Vidéo (2nde gen.)"
+
+#: ../src/itdb_device.c:323 ../src/itdb_device.c:324
+msgid "Classic"
+msgstr "Classic"
+
+#: ../src/itdb_device.c:325
+msgid "Touch"
+msgstr "Touch"
+
+#: ../src/itdb_device.c:326
+msgid "iPhone"
+msgstr "iPhone"
+
+#: ../src/itdb_device.c:327 ../src/itdb_device.c:328
+msgid "Unused"
+msgstr "Inutilisé"
+
+#: ../src/itdb_device.c:928
+#, c-format
+msgid "Could not open '%s' for writing."
+msgstr "Ne peut ouvrir en écriture le fichier « %s »."
+
+#: ../src/itdb_device.c:937
+#, c-format
+msgid "Device directory does not exist."
+msgstr "Le répertoire « Device » n'existe pas."
+
+#: ../src/itdb_itunesdb.c:507
+#, c-format
+msgid "Illegal seek to offset %ld (length %ld) in file '%s'."
+msgstr "Erreur de flux à l'offset %ld (longueur %ld) dans le fichier « %s »."
+
+#: ../src/itdb_itunesdb.c:910
+#, c-format
+msgid "Not a Play Counts file: '%s' (missing mhdp header)."
+msgstr "« %s » n'est pas un fichier de compteur (entête mhdp manquante)."
+
+#: ../src/itdb_itunesdb.c:925
+#, c-format
+msgid "Play Counts file ('%s'): header length smaller than expected (%d<96)."
+msgstr ""
+"Fichier de compteur (« %s ») : longueur de l'entête plus petite que prévue (%"
+"d < 96)."
+
+#: ../src/itdb_itunesdb.c:939
+#, c-format
+msgid "Play Counts file ('%s'): entry length smaller than expected (%d<12)."
+msgstr ""
+"Fichier de compteur (« %s ») : longueur des données plus petite que prévue (%"
+"d < 12)."
+
+#: ../src/itdb_itunesdb.c:1014
+#, c-format
+msgid "iTunesStats file ('%s'): entry length smaller than expected (%d<18)."
+msgstr ""
+"Fichier iTunesStats (« %s ») : longueur des données plus petite que prévue (%"
+"d < 18)."
+
+#: ../src/itdb_itunesdb.c:1333
+#, c-format
+msgid "iTunesDB corrupt: no MHOD at offset %ld in file '%s'."
+msgstr "Corruption d'iTunesDB : pas de MHOD à l'offset %ld du fichier « %s »."
+
+#: ../src/itdb_itunesdb.c:1519
+#, c-format
+msgid "Unknown smart rule action at %ld: %x. Trying to continue.\n"
+msgstr ""
+"Règle de la liste intelligente inattendue %ld : %x. Tentative pour continuer "
+"quand même.\n"
+
+#: ../src/itdb_itunesdb.c:1550
+#, c-format
+msgid ""
+"Length of smart playlist rule field (%d) not as expected. Trying to continue "
+"anyhow.\n"
+msgstr ""
+"Longueur du champ de la règle (%d) de la liste intelligente inattendue. "
+"Tentative pour continuer quand même.\n"
+
+#: ../src/itdb_itunesdb.c:1593
+#, c-format
+msgid "iTunesDB corrupt: no SLst at offset %ld in file '%s'."
+msgstr "Corruption d'iTunesDB : pas de SLst à l'offset %ld du fichier « %s »."
+
+#: ../src/itdb_itunesdb.c:1606
+#, c-format
+msgid ""
+"Encountered unknown MHOD type (%d) while parsing the iTunesDB. Ignoring.\n"
+"\n"
+msgstr "Type MHOD inconnu (%d) lors du parcours de iTunesDB. Erreur ignorée.\n"
+
+#: ../src/itdb_itunesdb.c:1689
+#, c-format
+msgid "iTunesDB corrupt: hunk length 0 for hunk at %ld in file '%s'."
+msgstr "Corruption d'iTunesDB : longueur 0 à %ld du fichier « %s »."
+
+#: ../src/itdb_itunesdb.c:1702
+#, c-format
+msgid ""
+"iTunesDB corrupt: no section '%s' found in section '%s' starting at %ld."
+msgstr ""
+"Corruption d'iTunesDB : pas de section « %s » dans la section « %s » débutant "
+"à l'offset %ld."
+
+#: ../src/itdb_itunesdb.c:1716
+#, c-format
+msgid ""
+"header length of '%s' smaller than expected (%d < %d) at offset %ld in file "
+"'%s'."
+msgstr ""
+"longueur de l'entête « %s » plus petite que prévue (%d <  %d) à l'offset %ld "
+"du fichier « %s »."
+
+#: ../src/itdb_itunesdb.c:1801
+#, c-format
+msgid "Not a iTunesDB: '%s' (missing mhdb header)."
+msgstr "« %s » n'est pas un fichier iTunesDB (entête mhdb manquante)."
+
+#: ../src/itdb_itunesdb.c:1818
+#, c-format
+msgid ""
+"iTunesDB ('%s'): header length of mhsd hunk smaller than expected (%d<32). "
+"Aborting."
+msgstr ""
+"iTunesDB (« %s ») : longueur de l'entête mhsd plus petite que prévue (%"
+"d < 32). Interruption."
+
+#: ../src/itdb_itunesdb.c:1839
+#, c-format
+msgid "iTunesDB '%s' corrupt: mhsd expected at %ld."
+msgstr "Corruption d'iTunesDB « %s » : mhsd attendu à l'offset %ld."
+
+#: ../src/itdb_itunesdb.c:1944
+#, c-format
+msgid "Number of MHODs in mhip at %ld inconsistent in file '%s'."
+msgstr ""
+"Nombre de MHODs dans mhip à l'offset %ld inconsistant dans le fichier « %s »."
+
+#: ../src/itdb_itunesdb.c:2121
+#, c-format
+msgid "Number of MHODs in mhyp at %ld inconsistent in file '%s'."
+msgstr ""
+"Nombre de MHODs dans mhyp à l'offset %ld inconsistant dans le fichier « %s »."
+
+#: ../src/itdb_itunesdb.c:2131
+msgid "Master-PL"
+msgstr "Liste principale"
+
+#: ../src/itdb_itunesdb.c:2135
+msgid "Podcasts"
+msgstr "Podcasts"
+
+#: ../src/itdb_itunesdb.c:2137
+msgid "Playlist"
+msgstr "Liste de lecture"
+
+#: ../src/itdb_itunesdb.c:2159
+#, c-format
+msgid ""
+"iTunesDB corrupt: number of mhip sections inconsistent in mhyp starting at %"
+"ld in file '%s'."
+msgstr ""
+"Corruption d'iTunesDB : nombre de sections mhip inconsistant dans mhyp à "
+"l'offset %ld du fichier « %s »."
+
+#: ../src/itdb_itunesdb.c:2180
+#, c-format
+msgid "Itdb_Track ID '%d' not found.\n"
+msgstr "Itdb_Track ID « %d » introuvable.\n"
+
+#: ../src/itdb_itunesdb.c:2524
+msgid "OTG Playlist"
+msgstr "Liste de lecture OTG"
+
+#: ../src/itdb_itunesdb.c:2542
+#, c-format
+msgid "Not a OTG playlist file: '%s' (missing mhpo header)."
+msgstr ""
+"Le fichier « %s » n'est pas un fichier de liste OTG (entête mhpo manquant)."
+
+#: ../src/itdb_itunesdb.c:2556
+#, c-format
+msgid "OTG playlist file ('%s'): header length smaller than expected (%d<20)."
+msgstr "Fichier de liste OTG (« %s ») : entête plus petit que prévu (%d < 20)."
+
+#: ../src/itdb_itunesdb.c:2568
+#, c-format
+msgid "OTG playlist file ('%s'): entry length smaller than expected (%d<4)."
+msgstr ""
+"Fichier de liste OTG ('%s') : longueur de données plus petite que prévue (%"
+"d<4)."
+
+#: ../src/itdb_itunesdb.c:2603
+#, c-format
+msgid "OTG playlist file '%s': reference to non-existent track (%d)."
+msgstr "Fichier de liste OTG « %s » : référence à un morceau inexistant (%d)."
+
+#: ../src/itdb_itunesdb.c:2648
+#, c-format
+msgid "OTG Playlist %d"
+msgstr "Liste de lecture OTG %d"
+
+#. this should not be -- issue warning
+#: ../src/itdb_itunesdb.c:2716
+msgid ""
+"iTunesDB corrupt: number of tracks (mhit hunks) inconsistent. Trying to "
+"continue.\n"
+msgstr ""
+"Corruption d'iTunesDB : nombre de morceaux (mhit) incohérent. Tentative pour "
+"continuer quand même.\n"
+
+#. this should not be -- issue warning
+#: ../src/itdb_itunesdb.c:2779
+msgid ""
+"iTunesDB possibly corrupt: number of playlists (mhyp hunks) inconsistent. "
+"Trying to continue.\n"
+msgstr ""
+"Corruption possible d'iTunesDB : nombre de listes (mhyp) incohérent. "
+"Tentative pour continuer quand même.\n"
+
+#: ../src/itdb_itunesdb.c:2826
+#, c-format
+msgid ""
+"iTunesDB '%s' corrupt: Could not find tracklist (no mhsd type 1 section "
+"found)"
+msgstr ""
+"Corruption de iTunesDB (« %s ») : impossible de trouver la liste des morceaux "
+"(pas de section mhsd de type 1)"
+
+#: ../src/itdb_itunesdb.c:2855
+#, c-format
+msgid ""
+"iTunesDB '%s' corrupt: Could not find playlists (no mhsd type 2 or type 3 "
+"sections found)"
+msgstr ""
+"Corruption de iTunesDB (« %s ») :  impossible de trouver les listes de "
+"lecture (pas de section mhsd de type 1 ou 3)"
+
+#: ../src/itdb_itunesdb.c:2877
+#, c-format
+msgid "iTunes directory not found: '%s' (or similar)."
+msgstr "Répertoire iTunes introuvable : « %s » (ou similaire)."
+
+#: ../src/itdb_itunesdb.c:2894
+#, c-format
+msgid "Music directory not found: '%s' (or similar)."
+msgstr "Répertoire « Music » introuvable : « %s » (ou similaire)."
+
+#: ../src/itdb_itunesdb.c:2912
+#, c-format
+msgid "Control directory not found: '%s' (or similar)."
+msgstr "Répertoire de contrôle introuvable :  « %s » (ou similaire)."
+
+#: ../src/itdb_itunesdb.c:3033
+#, c-format
+msgid "File not found: '%s'."
+msgstr "Fichier introuvable : « %s »."
+
+#: ../src/itdb_itunesdb.c:5533
+#, c-format
+msgid "Path not found: '%s' (or similar)."
+msgstr "Chemin introuvable : « %s » (ou similaire)."
+
+#: ../src/itdb_itunesdb.c:5742
+#, c-format
+msgid "Error renaming '%s' to '%s' (%s)."
+msgstr "Impossible de renommer « %s » en « %s » (%s)."
+
+#: ../src/itdb_itunesdb.c:5759 ../src/itdb_itunesdb.c:5776
+#: ../src/itdb_itunesdb.c:5793
+#, c-format
+msgid "Error removing '%s' (%s)."
+msgstr "Erreur de suppression du fichier « %s » (%s)."
+
+#: ../src/itdb_itunesdb.c:5960 ../src/itdb_itunesdb.c:6133
+#, c-format
+msgid "Mountpoint not set."
+msgstr "Point de montage non défini."
+
+#: ../src/itdb_itunesdb.c:6000
+#, c-format
+msgid "No 'F..' directories found in '%s'."
+msgstr "Répertoires « F.. » introuvables dans « %s »."
+
+#: ../src/itdb_itunesdb.c:6021
+#, c-format
+msgid "Path not found: '%s'."
+msgstr "Chemin introuvable : « %s »."
+
+#: ../src/itdb_itunesdb.c:6142
+#, c-format
+msgid "'%s' could not be accessed (%s)."
+msgstr "Impossible d'accéder à « %s » (%s)."
+
+#: ../src/itdb_itunesdb.c:6152
+#, c-format
+msgid ""
+"Destination file '%s' does not appear to be on the iPod mounted at '%s'."
+msgstr ""
+"Le fichier de destination « %s » ne semble pas être présent dans l'iPod monté "
+"dans « %s »."
+
+#: ../src/itdb_itunesdb.c:6360
+#, c-format
+msgid "Error opening '%s' for reading (%s)."
+msgstr "Échec de l'ouverture en lecture de « %s » (%s)."
+
+#: ../src/itdb_itunesdb.c:6372
+#, c-format
+msgid "Error opening '%s' for writing (%s)."
+msgstr "Échec de l'ouverture en écriture de « %s » (%s)."
+
+#: ../src/itdb_itunesdb.c:6388
+#, c-format
+msgid "Error while reading from '%s' (%s)."
+msgstr "Erreur lors de la lecture à partir de « %s » (%s)."
+
+#: ../src/itdb_itunesdb.c:6403
+#, c-format
+msgid "Error while writing to '%s' (%s)."
+msgstr "Erreur lors de l'écriture dans « %s » (%s)."
+
+#: ../src/itdb_itunesdb.c:6416 ../src/itdb_itunesdb.c:6426
+#, c-format
+msgid "Error when closing '%s' (%s)."
+msgstr "Erreur à la fermeture de « %s » (%s)."
+
+#: ../src/itdb_itunesdb.c:6856
+msgid "iPod"
+msgstr "iPod"
+
+#: ../src/itdb_itunesdb.c:7178
+#, c-format
+msgid "Problem creating iPod directory or file: '%s'."
+msgstr "Problème à la création du répertoire ou du fichier iPod : « %s »."
+
+#: ../src/itdb_photoalbum.c:111
+#, c-format
+msgid "Photos directory not found: '%s' (or similar)."
+msgstr "Répertoire « Photos » introuvable : « %s » (ou similaire)."
+
+#: ../src/itdb_photoalbum.c:266 ../src/itdb_photoalbum.c:460
+msgid "Photo Library"
+msgstr "Librairie Photos"
+
+#: ../src/itdb_photoalbum.c:386
+#, c-format
+msgid "You need to specify the iPod model used before photos can be added."
+msgstr ""
+"Vous devez préciser le modèle du iPod avant de pouvoir ajouter des photos."
+
+#: ../src/itdb_photoalbum.c:407
+#, c-format
+msgid ""
+"Your iPod does not seem to support photos. Maybe you need to specify the "
+"correct iPod model number? It is currently set to 'x%s' (%s/%s)."
+msgstr ""
+"Votre iPod ne semble pas supporter les photos. Peut-être devriez-vous "
+"spécifier le modèle correct d'iPod ? Il est actuellement configuré à « x%"
+"s » (%s/%s)."
+
+#: ../src/itdb_photoalbum.c:419
+#, c-format
+msgid "Could not access file '%s'. Photo not added."
+msgstr "Impossible d'accéder au fichier « %s ». Photo non ajoutée."
+
+#: ../src/itdb_photoalbum.c:448
+#, c-format
+msgid ""
+"Unexpected error in itdb_photodb_add_photo_internal() while adding photo, "
+"please report."
+msgstr ""
+"Erreur inattendue dans « itdb_photodb_add_photo_internal() » pendant l'ajout "
+"d'une photo, pensez à le signaler."
+
+#: ../src/itdb_photoalbum.c:468
+#, c-format
+msgid ""
+"Library compiled without gdk-pixbuf support. Picture support is disabled."
+msgstr ""
+"Librairie compilée sans le support gdk-pixbuf. La gestion des photos est "
+"inhibée"
+
+#. New action!
+#: ../src/itdb_playlist.c:78
+#, c-format
+msgid "Unknown action (%d) in smart playlist will be ignored.\n"
+msgstr "L'action inconnue (%d) dans la liste intelligente sera ignorée.\n"
+
+#: ../src/itdb_thumb.c:326
+#, c-format
+msgid "Illegal filename: '%s'.\n"
+msgstr "Nom de fichier illégal : « %s ».\n"
+
+#: ../src/itdb_thumb.c:331
+#, c-format
+msgid "Mountpoint not set.\n"
+msgstr "Point de montage non défini.\n"
+
+#: ../tests/test-photos.c:41
+#, c-format
+msgid ""
+"Usage to add photos:\n"
+"  %s add <mountpoint> <albumname> [<filename(s)>]\n"
+"  <albumname> should be set to 'NULL' to add photos to the master photo "
+"album\n"
+"  (Photo Library) only. If you don't specify any filenames an empty album "
+"will\n"
+"  be created.\n"
+msgstr ""
+"Utilisation pour ajouter des photos :\n"
+"    %s add <point_de_montage> <album> [<fichier(s)>]\n"
+"    Le nom de l'album doit être « NULL » pour ajouter des photos\n"
+"    dans l'album photo principal.\n"
+"    Si vous ne précisez pas de nom de fichier un album vide sera créé.\n"
+
+#: ../tests/test-photos.c:42
+#, c-format
+msgid ""
+"Usage to dump all photos to <output_dir>:\n"
+"  %s dump <mountpoint> <output_dir>\n"
+msgstr ""
+"Utilisation pour copier toutes les photos dans <répertoire_de_copie> :\n"
+"  %s dump <point_de_montage> <répertoire_de_copie>\n"
+
+#: ../tests/test-photos.c:43
+#, c-format
+msgid ""
+"Usage to list all photos IDs to stdout:\n"
+"  %s list <mountpoint>\n"
+msgstr ""
+"Utilisation pour afficher tous les identifiants des photos :\n"
+"  %s list <point_de_montage>\n"
+
+#: ../tests/test-photos.c:44
+#, c-format
+msgid ""
+"Usage to remove photo IDs from Photo Library:\n"
+"  %s remove <mountpoint> <albumname> [<ID(s)>]\n"
+"  <albumname> should be set to 'NULL' to remove photos from the iPod\n"
+"  altogether. If you don't specify any IDs, the photoalbum will be removed\n"
+"  instead.\n"
+"  WARNING: IDs may change when writing the PhotoDB file.\n"
+msgstr ""
+"Utilisation pour supprimer des photos dans la librairie des photos :\n"
+"    %s remove <point_de_montage> <album> [<ID(s)>]\n"
+"    Le nom de l'album doit être « NULL » pour supprimer complètement\n"
+"    les photos dans l'iPod.\n"
+"    Si vous ne précisez pas d'identifiants, seul l'album sera supprimé.\n"
+"    Attention : les identifiants peuvent changer lors de l'écriture\n"
+"    du fichier « PhotoDB ».\n"
+
+#: ../tests/test-photos.c:119
+#, c-format
+msgid "Wrong number of command line arguments.\n"
+msgstr "Nombre d'arguments incorrect pour la ligne de commande.\n"
+
+#: ../tests/test-photos.c:128
+#, c-format
+msgid "Error creating '%s' (mkdir)\n"
+msgstr "Erreur à la création de « %s » (mkdir)\n"
+
+#: ../tests/test-photos.c:134
+#, c-format
+msgid "Error: '%s' is not a directory\n"
+msgstr "Erreur : « %s » n'est pas un répertoire\n"
+
+#: ../tests/test-photos.c:143 ../tests/test-photos.c:177
+#: ../tests/test-photos.c:306
+#, c-format
+msgid "Error reading iPod photo database (%s).\n"
+msgstr "Erreur à la lecture de la base de données des photos iPod (%s).\n"
+
+#: ../tests/test-photos.c:149 ../tests/test-photos.c:183
+#: ../tests/test-photos.c:313
+#, c-format
+msgid "Error reading iPod photo database.\n"
+msgstr "Erreur à la lecture de la base de données des photos iPod.\n"
+
+#: ../tests/test-photos.c:167 ../tests/test-photos.c:226
+#: ../tests/test-photos.c:296 ../tests/test-photos.c:379
+#, c-format
+msgid "Insufficient number of command line arguments.\n"
+msgstr "Nombre d'arguments insuffisant pour la ligne de commande.\n"
+
+#: ../tests/test-photos.c:194
+msgid "<Unnamed>"
+msgstr "<sans_nom>"
+
+#: ../tests/test-photos.c:209
+#, c-format
+msgid "<No members>\n"
+msgstr "<sans membre>\n"
+
+#: ../tests/test-photos.c:236
+#, c-format
+msgid ""
+"Error reading iPod photo database (%s).\n"
+"Will attempt to create a new database.\n"
+msgstr ""
+"Erreur à la lecture de la base de données des photos iPod (%s).\n"
+"Tentative de créer une nouvelle base de données.\n"
+
+#: ../tests/test-photos.c:242
+#, c-format
+msgid ""
+"Error reading iPod photo database, will attempt to create a new database\n"
+msgstr ""
+"Erreur à la lecture de la base de données des photos iPod, Tentative de "
+"créer une nouvelle base de données.\n"
+
+#: ../tests/test-photos.c:267
+#, c-format
+msgid "Error adding photo (%s) to photo database: %s\n"
+msgstr ""
+"Erreur à l'ajout de la photo (%s) dans la base de données des photos iPod : %"
+"s\n"
+
+#: ../tests/test-photos.c:324
+#, c-format
+msgid "Specified album '%s' not found. Aborting.\n"
+msgstr "Album « %s » non trouvé. Abandon.\n"
+
+#: ../tests/test-photos.c:336
+#, c-format
+msgid "Cannot remove Photo Library playlist. Aborting.\n"
+msgstr "Impossible de supprimer la liste de la librairie Photo. Abandon.\n"
+
+#: ../tests/test-photos.c:357
+#, c-format
+msgid "Warning: could not find photo with ID <%d>. Skipping...\n"
+msgstr ""
+"Attention : impossible de trouver la photo avec l'identifiant <%d>. On passe "
+"à la suivante…\n"
+
+#: ../tests/test-photos.c:403
+#, c-format
+msgid "Unknown command '%s'\n"
+msgstr "Commande inconnue « %s »\n"
+
+#: ../tests/test-init-ipod.c:66
+#, c-format
+msgid "Error initialising iPod: %s\n"
+msgstr "Erreur d'initialisation du iPod : %s\n"
+
+#: ../tests/test-init-ipod.c:73
+#, c-format
+msgid "Error initialising iPod, unknown error\n"
+msgstr "Erreur d'initialisation du iPod : erreur inconnue\n"
+
+#: ../tools/ipod-time-sync.c:37
+#, fuzzy, c-format
+msgid "usage: %s <device> [timezone]\n"
+msgstr "utilisation : %s <périphérique> <point_de_montage>\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:39
+#, c-format
+msgid "usage: %s <device> <mountpoint>\n"
+msgstr "utilisation : %s <périphérique> <point_de_montage>\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:45
+#, c-format
+msgid "Couldn't read xml sysinfo from %s\n"
+msgstr "Impossible de lire les « sysinfo xml » depuis %s\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:56
+#, c-format
+msgid "Couldn't resolve Device directory path on %s"
+msgstr "Impossible de trouver le répertoire « Device » dans %s"
+
+#: ../tools/read-sysinfoextended-sgutils.c:64
+#, c-format
+msgid "Couldn't resolve SysInfoExtended path on %s"
+msgstr "Impossible de trouver le chemin de « SysInfoExtended » dans %s"
+
+#: ../tools/read-sysinfoextended-sgutils.c:74
+#, c-format
+msgid "Couldn't write SysInfoExtended to %s"
+msgstr "Impossible d'écrire « SysInfoExtended » dans %s"
+
+#~ msgid "Could not find artwork entry (mhii id: %u) for track (dbid: %s).\n"
+#~ msgstr ""
+#~ "Impossible de trouver l'image (mhii id : %u) pour la piste (dbid : %s).\n"

Added: libgpod/trunk/libgpod/branches/upstream/current/po/he.po
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/po/he.po	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/po/he.po	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,830 @@
+# translation of gtkpod.po to HEBREW
+# This file is distributed under the same license as the gtkpod package
+# Assaf Gillat <gillata at gmail.com>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gtkpod\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-04-03 16:08-0400\n"
+"PO-Revision-Date: 2008-12-09 23:07+0200\n"
+"Last-Translator: Assaf Gillat <gillata at gmail.com>\n"
+"Language-Team: HEBREW <kde-il at yahoogroups.com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: poedit\n"
+
+#: ../src/db-artwork-parser.c:140
+#, c-format
+msgid "Unexpected mhod string type: %d\n"
+msgstr "סוג מחרוזת mhod לא צפוי: %d\n"
+
+#: ../src/db-artwork-parser.c:460
+#, c-format
+msgid "Unexpected mhsd index: %d\n"
+msgstr "אינדקס mhsd לא צפוי: %d\n"
+
+#: ../src/db-artwork-parser.c:540
+#, c-format
+msgid "Could not find corresponding track (dbid: %s) for artwork entry.\n"
+msgstr "אי אפשר היה למצוא רצועה מתאימה (dbid: %s) עבור רשומת תמונת גלרייה.\n"
+
+#: ../src/db-artwork-parser.c:548
+#, c-format
+msgid "iTunesDB and ArtworkDB artwork sizes inconsistent (%d+%d != %d)\n"
+msgstr "גודל תמונות הגלריה בין הiTunesDB והArtworkDB לא עקבי (%d+%d != %d)\n"
+
+#: ../src/db-image-parser.c:91
+#, c-format
+msgid "Unexpected image type in mhni: %d, offset: %d\n"
+msgstr "סוג תמונה לא צפוי ב mhni: %d, היסט: %d\n"
+
+#: ../src/itdb_artwork.c:163
+#, c-format
+msgid "Could not access file '%s'."
+msgstr "אי אפשר לגשת לקובץ: '%s'."
+
+#: ../src/itdb_artwork.c:181 ../src/itdb_artwork.c:241
+#: ../src/itdb_artwork.c:298
+#, c-format
+msgid "Artwork support not compiled into libgpod."
+msgstr "תמיכה בגלריית תמונות לא הודרה לתוך libgpod."
+
+#: ../src/itdb_artwork.c:668
+#, c-format
+msgid "Could not find on iPod: '%s'\n"
+msgstr "אי אפשר למצוא iPod: '%s'.\n"
+
+#: ../src/itdb_artwork.c:828
+#, c-format
+msgid ""
+"Unable to retrieve thumbnail (appears to be on iPod, but no image info "
+"available): filename: '%s'\n"
+msgstr ""
+"אי אפשר היה לאחזר את התמונות הממוזערות (כנראה הן על הiPod, אבל אין מידע "
+"תמונה זמין): קובץ '%s'\n"
+
+#: ../src/itdb_device.c:263
+msgid "Invalid"
+msgstr "לא תקין"
+
+#: ../src/itdb_device.c:264 ../src/itdb_device.c:305
+msgid "Unknown"
+msgstr "לא ידוע"
+
+#: ../src/itdb_device.c:265
+msgid "Color"
+msgstr "צבע"
+
+#: ../src/itdb_device.c:266
+msgid "Color U2"
+msgstr "צבע U2"
+
+#: ../src/itdb_device.c:267
+msgid "Grayscale"
+msgstr "גווני אפור"
+
+#: ../src/itdb_device.c:268
+msgid "Grayscale U2"
+msgstr "גווני אפור U2"
+
+#: ../src/itdb_device.c:269
+msgid "Mini (Silver)"
+msgstr "מיני (כסוף)"
+
+#: ../src/itdb_device.c:270
+msgid "Mini (Blue)"
+msgstr "מיני (כחול)"
+
+#: ../src/itdb_device.c:271
+msgid "Mini (Pink)"
+msgstr "מיני (ורוד)"
+
+#: ../src/itdb_device.c:272
+msgid "Mini (Green)"
+msgstr "מיני (ירוק)"
+
+#: ../src/itdb_device.c:273
+msgid "Mini (Gold)"
+msgstr "מיני (זהב)"
+
+#: ../src/itdb_device.c:274
+msgid "Shuffle"
+msgstr "שאפל"
+
+#: ../src/itdb_device.c:275
+msgid "Nano (White)"
+msgstr "נאנו (לבן)"
+
+#: ../src/itdb_device.c:276
+msgid "Nano (Black)"
+msgstr "נאנו (שחור)"
+
+#: ../src/itdb_device.c:277
+msgid "Video (White)"
+msgstr "וידאו (לבן)"
+
+#: ../src/itdb_device.c:278
+msgid "Video (Black)"
+msgstr "וידאו (שחור)"
+
+#: ../src/itdb_device.c:279
+msgid "Mobile (1)"
+msgstr "נייד (1)"
+
+#: ../src/itdb_device.c:280
+msgid "Video U2"
+msgstr "וידאו U2"
+
+#: ../src/itdb_device.c:281
+msgid "Nano (Silver)"
+msgstr "נאנו (כסוף)"
+
+#: ../src/itdb_device.c:282
+msgid "Nano (Blue)"
+msgstr "נאנו (כחול)"
+
+#: ../src/itdb_device.c:283
+msgid "Nano (Green)"
+msgstr "נאנו (ירוק)"
+
+#: ../src/itdb_device.c:284
+msgid "Nano (Pink)"
+msgstr "נאנו (ורוד)"
+
+#: ../src/itdb_device.c:285
+msgid "Nano (Red)"
+msgstr "נאנו (אדום)"
+
+#: ../src/itdb_device.c:286
+msgid "Nano (Yellow)"
+msgstr "נאנו (צהוב)"
+
+#: ../src/itdb_device.c:287
+msgid "Nano (Purple)"
+msgstr "נאנו (סגול)"
+
+#: ../src/itdb_device.c:288
+msgid "Nano (Orange)"
+msgstr "נאנו (כתום)"
+
+#: ../src/itdb_device.c:289
+msgid "iPhone (1)"
+msgstr "אייפון (1)"
+
+#: ../src/itdb_device.c:290
+msgid "Shuffle (Silver)"
+msgstr "שאפל (כסוף)"
+
+#: ../src/itdb_device.c:291
+msgid "Shuffle (Pink)"
+msgstr "שאפל (ורוד)"
+
+#: ../src/itdb_device.c:292
+msgid "Shuffle (Blue)"
+msgstr "שאפל (כחול)"
+
+#: ../src/itdb_device.c:293
+msgid "Shuffle (Green)"
+msgstr "שאפל (ירוק)"
+
+#: ../src/itdb_device.c:294
+msgid "Shuffle (Orange)"
+msgstr "שאפל (כתום)"
+
+#: ../src/itdb_device.c:295
+msgid "Shuffle (Purple)"
+msgstr "שאפל (סגול)"
+
+#: ../src/itdb_device.c:296
+msgid "Shuffle (Red)"
+msgstr "שאפל (אדום)"
+
+#: ../src/itdb_device.c:297
+msgid "Classic (Silver)"
+msgstr "קלאסי (כסוף)"
+
+#: ../src/itdb_device.c:298
+msgid "Classic (Black)"
+msgstr "קלאסי (שחור)"
+
+#: ../src/itdb_device.c:299
+msgid "Touch (Black)"
+msgstr "טאץ (שחור)"
+
+#: ../src/itdb_device.c:306
+msgid "Regular (1st Gen.)"
+msgstr "רגיל (דור ראשון)"
+
+#: ../src/itdb_device.c:307
+msgid "Regular (2nd Gen.)"
+msgstr "רגיל (דור שני)"
+
+#: ../src/itdb_device.c:308
+msgid "Regular (3rd Gen.)"
+msgstr "רגיל (דור שלישי)"
+
+#: ../src/itdb_device.c:309
+msgid "Regular (4th Gen.)"
+msgstr "רגיל (דור רביעי)"
+
+#: ../src/itdb_device.c:310
+msgid "Photo"
+msgstr "פוטו"
+
+#: ../src/itdb_device.c:311
+msgid "Mobile Phones"
+msgstr "טלפונים סלולריים"
+
+#: ../src/itdb_device.c:312
+msgid "Mini (1st Gen.)"
+msgstr "מיני (דור ראשון)"
+
+#: ../src/itdb_device.c:313
+msgid "Mini (2nd Gen.)"
+msgstr "מיני (דור שני)"
+
+#: ../src/itdb_device.c:314
+msgid "Shuffle (1st Gen.)"
+msgstr "שאפל (דור ראשון)"
+
+#: ../src/itdb_device.c:315
+msgid "Shuffle (2nd Gen.)"
+msgstr "שאפל (דור שני)"
+
+#: ../src/itdb_device.c:316
+msgid "Shuffle (3rd Gen.)"
+msgstr "שאפל (דור שלישי)"
+
+#: ../src/itdb_device.c:317
+msgid "Nano (1st Gen.)"
+msgstr "נאנו (דור ראשון)"
+
+#: ../src/itdb_device.c:318
+msgid "Nano (2nd Gen.)"
+msgstr "נאנו (דור שני)"
+
+#: ../src/itdb_device.c:319
+msgid "Nano Video (3rd Gen.)"
+msgstr "נאנו וידאו (דור שלישי)"
+
+#: ../src/itdb_device.c:320
+msgid "Nano Video (4th Gen.)"
+msgstr "נאנו וידאו (דור רביעי)"
+
+#: ../src/itdb_device.c:321
+msgid "Video (1st Gen.)"
+msgstr "וידאו (דור ראשון)"
+
+#: ../src/itdb_device.c:322
+msgid "Video (2nd Gen.)"
+msgstr "וידאו (דור שני)"
+
+#: ../src/itdb_device.c:323 ../src/itdb_device.c:324
+msgid "Classic"
+msgstr "קלאסי"
+
+#: ../src/itdb_device.c:325
+msgid "Touch"
+msgstr "טאץ"
+
+#: ../src/itdb_device.c:326
+msgid "iPhone"
+msgstr "אייפון"
+
+#: ../src/itdb_device.c:327 ../src/itdb_device.c:328
+msgid "Unused"
+msgstr "לא בשימוש"
+
+#: ../src/itdb_device.c:928
+#, c-format
+msgid "Could not open '%s' for writing."
+msgstr "אי אפשר לפתוח את '%s' לכתיבה."
+
+#: ../src/itdb_device.c:937
+#, c-format
+msgid "Device directory does not exist."
+msgstr "תיקיית מכשיר לא קיימת."
+
+#: ../src/itdb_itunesdb.c:507
+#, c-format
+msgid "Illegal seek to offset %ld (length %ld) in file '%s'."
+msgstr "חיפוש לא חוקי בהיסט %ld (אורך %ld) בקובץ '%s'."
+
+#: ../src/itdb_itunesdb.c:910
+#, c-format
+msgid "Not a Play Counts file: '%s' (missing mhdp header)."
+msgstr "זהו לא קובץ ספירת השמעה: '%s' (חסר תחילית mhdp)"
+
+#: ../src/itdb_itunesdb.c:925
+#, c-format
+msgid "Play Counts file ('%s'): header length smaller than expected (%d<96)."
+msgstr "קובץ ספירת השמעה ('%s'): אורך תחילית קטן מהצפוי (%d<96)."
+
+#: ../src/itdb_itunesdb.c:939
+#, c-format
+msgid "Play Counts file ('%s'): entry length smaller than expected (%d<12)."
+msgstr "קובץ ספירת השמעה ('%s'): אורך רשומה קטן מהצפוי (%d<12)."
+
+#: ../src/itdb_itunesdb.c:1014
+#, c-format
+msgid "iTunesStats file ('%s'): entry length smaller than expected (%d<18)."
+msgstr "קובץ iTunesStats ('%s'): אורך רשומה קטן מהצפוי (%d<18)."
+
+#: ../src/itdb_itunesdb.c:1333
+#, c-format
+msgid "iTunesDB corrupt: no MHOD at offset %ld in file '%s'."
+msgstr "הiTunesDB שבור: אין MHOD בהיסט %ld בקובץ '%s'."
+
+#: ../src/itdb_itunesdb.c:1519
+#, c-format
+msgid "Unknown smart rule action at %ld: %x. Trying to continue.\n"
+msgstr "פעולת חוק חכם לא ידועה ב-%ld: %x . מנסה להמשיך.\n"
+
+#: ../src/itdb_itunesdb.c:1550
+#, c-format
+msgid ""
+"Length of smart playlist rule field (%d) not as expected. Trying to continue "
+"anyhow.\n"
+msgstr ""
+"אורך שדה של חוק (%d) רשימת השמעה חכמה הוא לא כצפוי. מנסה להמשיך בכל זאת.\n"
+
+#: ../src/itdb_itunesdb.c:1593
+#, c-format
+msgid "iTunesDB corrupt: no SLst at offset %ld in file '%s'."
+msgstr "הiTunesDB שבור: אין SLst בהיסט %ld בקובץ '%s'."
+
+#: ../src/itdb_itunesdb.c:1606
+#, c-format
+msgid ""
+"Encountered unknown MHOD type (%d) while parsing the iTunesDB. Ignoring.\n"
+"\n"
+msgstr ""
+"נתקלנו בסוג לא ידוע של MHOD (%d) בזמן ניתוח ה-iTuneDB. מתעלם.\n"
+"\n"
+
+#: ../src/itdb_itunesdb.c:1689
+#, c-format
+msgid "iTunesDB corrupt: hunk length 0 for hunk at %ld in file '%s'."
+msgstr "הiTunesDB שבור: אורך חתיכה 0 בחתיכה  %ld בקובץ '%s'."
+
+#: ../src/itdb_itunesdb.c:1702
+#, c-format
+msgid ""
+"iTunesDB corrupt: no section '%s' found in section '%s' starting at %ld."
+msgstr "הiTunesDB שבור: מקטע '%s' לא נמצא במקטע '%s' המתחיל ב- %ld."
+
+#: ../src/itdb_itunesdb.c:1716
+#, c-format
+msgid ""
+"header length of '%s' smaller than expected (%d < %d) at offset %ld in file "
+"'%s'."
+msgstr "גודל תחילית של המקטע '%s' קטן מהצפוי (%d < %d) בהיסט %ld בקובץ '%s'."
+
+#: ../src/itdb_itunesdb.c:1801
+#, c-format
+msgid "Not a iTunesDB: '%s' (missing mhdb header)."
+msgstr "זהו לא iTunesDB: '%s' (חסרה תחילית mhdb)."
+
+#: ../src/itdb_itunesdb.c:1818
+#, c-format
+msgid ""
+"iTunesDB ('%s'): header length of mhsd hunk smaller than expected (%d<32). "
+"Aborting."
+msgstr ""
+"הiTunesDB ('%s'): גודל התחילית של המקטע mhsd קטנה מהצפוי (%d<32). מבטל."
+
+#: ../src/itdb_itunesdb.c:1839
+#, c-format
+msgid "iTunesDB '%s' corrupt: mhsd expected at %ld."
+msgstr "הiTunesDB '%s' שבור: mhsd צפוי ב-%ld."
+
+#: ../src/itdb_itunesdb.c:1944
+#, c-format
+msgid "Number of MHODs in mhip at %ld inconsistent in file '%s'."
+msgstr "מספר ה-MHODים ב-mhip ב-%ld הם לא עקביים בקובץ \"%s\"."
+
+#: ../src/itdb_itunesdb.c:2121
+#, c-format
+msgid "Number of MHODs in mhyp at %ld inconsistent in file '%s'."
+msgstr "מספר ה-MHOD ב-mhyp ב-%ld לא עקביים בקובץ '%s'."
+
+#: ../src/itdb_itunesdb.c:2131
+msgid "Master-PL"
+msgstr "רשימת ראשית"
+
+#: ../src/itdb_itunesdb.c:2135
+msgid "Podcasts"
+msgstr "פודקאסט"
+
+#: ../src/itdb_itunesdb.c:2137
+msgid "Playlist"
+msgstr "רשימת השמעה"
+
+#: ../src/itdb_itunesdb.c:2159
+#, c-format
+msgid ""
+"iTunesDB corrupt: number of mhip sections inconsistent in mhyp starting at %"
+"ld in file '%s'."
+msgstr ""
+"הiTunesDB שבור: מספר קטעי ה-mhip לא עקביים ב-mhyp המתחילים ב- %ld בקובץ '%s'."
+
+#: ../src/itdb_itunesdb.c:2180
+#, c-format
+msgid "Itdb_Track ID '%d' not found.\n"
+msgstr "מזהה Itdb_Track '%d' לא נמצא.\n"
+
+#: ../src/itdb_itunesdb.c:2524
+msgid "OTG Playlist"
+msgstr "רשימת השמעה OTG"
+
+#: ../src/itdb_itunesdb.c:2542
+#, c-format
+msgid "Not a OTG playlist file: '%s' (missing mhpo header)."
+msgstr "זהו לא קובץ רשימת השמעה OTG: '%s' (חסרה תחילת קובץ mhpo)."
+
+#: ../src/itdb_itunesdb.c:2556
+#, c-format
+msgid "OTG playlist file ('%s'): header length smaller than expected (%d<20)."
+msgstr "קובץ רשימת השמעה OTG ('%s'): גודל תחילית קטן מהצפוי (%d<20)."
+
+#: ../src/itdb_itunesdb.c:2568
+#, c-format
+msgid "OTG playlist file ('%s'): entry length smaller than expected (%d<4)."
+msgstr "קובץ רשימת השמעה OTG ('%s'): גודל רשומה קטן מהצפוי (%d<4)."
+
+#: ../src/itdb_itunesdb.c:2603
+#, c-format
+msgid "OTG playlist file '%s': reference to non-existent track (%d)."
+msgstr "רשימת השמעה OTG '%s': התייחסות לרצועה לא קיימת (%d)."
+
+#: ../src/itdb_itunesdb.c:2648
+#, c-format
+msgid "OTG Playlist %d"
+msgstr "רשימת השמעה OTG %d"
+
+#. this should not be -- issue warning
+#: ../src/itdb_itunesdb.c:2716
+msgid ""
+"iTunesDB corrupt: number of tracks (mhit hunks) inconsistent. Trying to "
+"continue.\n"
+msgstr "הiTuneDB שבור: מספר רצועות (mhit חתיכות) לא עקביות. מנסה להמשיך.\n"
+
+#. this should not be -- issue warning
+#: ../src/itdb_itunesdb.c:2779
+msgid ""
+"iTunesDB possibly corrupt: number of playlists (mhyp hunks) inconsistent. "
+"Trying to continue.\n"
+msgstr ""
+"יכול להיות ש-iTuneDB שבור: מספר רשימות השמעה (mhyp חתיכות) לא עקביות. מנסה "
+"להמשיך.\n"
+
+#: ../src/itdb_itunesdb.c:2826
+#, c-format
+msgid ""
+"iTunesDB '%s' corrupt: Could not find tracklist (no mhsd type 1 section "
+"found)"
+msgstr ""
+"הiTunesDB '%s' שבור: אי אפשר למצוא רשימת רצועות (לא קיים מקטע mhsd סוג 1)"
+
+#: ../src/itdb_itunesdb.c:2855
+#, c-format
+msgid ""
+"iTunesDB '%s' corrupt: Could not find playlists (no mhsd type 2 or type 3 "
+"sections found)"
+msgstr ""
+"הiTunesDB '%s' שבור: אי אפשר למצוא רשימת השמעה (לא נמצאו mhsd מסוג 2 או 3)"
+
+#: ../src/itdb_itunesdb.c:2877
+#, c-format
+msgid "iTunes directory not found: '%s' (or similar)."
+msgstr "תיקיית iTunes לא נמצאה: '%s' (או דומה)."
+
+#: ../src/itdb_itunesdb.c:2894
+#, c-format
+msgid "Music directory not found: '%s' (or similar)."
+msgstr "תיקיית מוזיקה לא נמצאה: '%s' (או דומה)."
+
+#: ../src/itdb_itunesdb.c:2912
+#, c-format
+msgid "Control directory not found: '%s' (or similar)."
+msgstr "תיקיית בקרה לא נמצאה: '%s' (או דומה)."
+
+#: ../src/itdb_itunesdb.c:3033
+#, c-format
+msgid "File not found: '%s'."
+msgstr "קובץ לא קיים: '%s'."
+
+#: ../src/itdb_itunesdb.c:5533
+#, c-format
+msgid "Path not found: '%s' (or similar)."
+msgstr "נתיב לא נמצא: '%s' (או דומה)."
+
+#: ../src/itdb_itunesdb.c:5742
+#, c-format
+msgid "Error renaming '%s' to '%s' (%s)."
+msgstr "תקלה בשינוי שם '%s' ל '%s' (%s)."
+
+#: ../src/itdb_itunesdb.c:5759 ../src/itdb_itunesdb.c:5776
+#: ../src/itdb_itunesdb.c:5793
+#, c-format
+msgid "Error removing '%s' (%s)."
+msgstr "תקלה בהסרת '%s' (%s)"
+
+#: ../src/itdb_itunesdb.c:5960 ../src/itdb_itunesdb.c:6133
+#, c-format
+msgid "Mountpoint not set."
+msgstr "לא נקבעה נקודת עגינה."
+
+#: ../src/itdb_itunesdb.c:6000
+#, c-format
+msgid "No 'F..' directories found in '%s'."
+msgstr "לא נמצאו תיקיות מסוג \"F..\" ב-\"%s\"."
+
+#: ../src/itdb_itunesdb.c:6021
+#, c-format
+msgid "Path not found: '%s'."
+msgstr "נתיב לא נמצא: '%s'."
+
+#: ../src/itdb_itunesdb.c:6142
+#, c-format
+msgid "'%s' could not be accessed (%s)."
+msgstr "אי אפשר לגשת אל '%s' (%s)."
+
+#: ../src/itdb_itunesdb.c:6152
+#, c-format
+msgid ""
+"Destination file '%s' does not appear to be on the iPod mounted at '%s'."
+msgstr "קובץ יעד \"%s\" כנראה לא מופיע על ה-iPod המעוגן בנקודה \"%s\"."
+
+#: ../src/itdb_itunesdb.c:6360
+#, c-format
+msgid "Error opening '%s' for reading (%s)."
+msgstr "תקלה בפתיחת '%s' לקריאה (%s)."
+
+#: ../src/itdb_itunesdb.c:6372
+#, c-format
+msgid "Error opening '%s' for writing (%s)."
+msgstr "תקלה בפתיחת '%s' לכתיבה (%s)."
+
+#: ../src/itdb_itunesdb.c:6388
+#, c-format
+msgid "Error while reading from '%s' (%s)."
+msgstr "תקלה בזמן קריאה מ '%s' (%s)."
+
+#: ../src/itdb_itunesdb.c:6403
+#, c-format
+msgid "Error while writing to '%s' (%s)."
+msgstr "תקלה בזמן כתיבה ל '%s' (%s)."
+
+#: ../src/itdb_itunesdb.c:6416 ../src/itdb_itunesdb.c:6426
+#, c-format
+msgid "Error when closing '%s' (%s)."
+msgstr "תקלה בזמן סגירה '%s' (%s)."
+
+#: ../src/itdb_itunesdb.c:6856
+msgid "iPod"
+msgstr "iPod"
+
+#: ../src/itdb_itunesdb.c:7178
+#, c-format
+msgid "Problem creating iPod directory or file: '%s'."
+msgstr "בעייה ביצירת תיקיית iPod או קובץ: \"%s\"."
+
+#: ../src/itdb_photoalbum.c:111
+#, c-format
+msgid "Photos directory not found: '%s' (or similar)."
+msgstr "נתיב תמונות לא נמצא: '%s' (או דומה)."
+
+#: ../src/itdb_photoalbum.c:266 ../src/itdb_photoalbum.c:460
+msgid "Photo Library"
+msgstr "ספריית תמונות"
+
+#: ../src/itdb_photoalbum.c:386
+#, c-format
+msgid "You need to specify the iPod model used before photos can be added."
+msgstr "צריך לציין את סוג ה-iPod לפני שניתן יהיה להוסיף תמונות."
+
+#: ../src/itdb_photoalbum.c:407
+#, c-format
+msgid ""
+"Your iPod does not seem to support photos. Maybe you need to specify the "
+"correct iPod model number? It is currently set to 'x%s' (%s/%s)."
+msgstr ""
+"נראה שה-iPod שלך לא תומך בתמונות. אולי צריך לציין את הסוג המדוייק של ה-iPod? "
+"הוא כרגע מכוון ל  'x%s' (%s/%s)."
+
+#: ../src/itdb_photoalbum.c:419
+#, c-format
+msgid "Could not access file '%s'. Photo not added."
+msgstr "אי אפשר לגשת לקובץ '%s'. התמונה לא הוספה."
+
+#: ../src/itdb_photoalbum.c:448
+#, c-format
+msgid ""
+"Unexpected error in itdb_photodb_add_photo_internal() while adding photo, "
+"please report."
+msgstr ""
+"תקלה לא צפוייה ב-itdb_photodb_add_photo_internal() בזמן הוספת תמונה, אנא "
+"דווח על התקלה."
+
+#: ../src/itdb_photoalbum.c:468
+#, c-format
+msgid ""
+"Library compiled without gdk-pixbuf support. Picture support is disabled."
+msgstr "הספרייה הודרה ללא תמיכה ב-gdk-pixbuf. תמיכה בתמונות לא מאופשרת."
+
+#. New action!
+#: ../src/itdb_playlist.c:78
+#, c-format
+msgid "Unknown action (%d) in smart playlist will be ignored.\n"
+msgstr "התעלמות מפעולה לא ידועה (%d) ברשימת השמעה חכמה.\n"
+
+#: ../src/itdb_thumb.c:326
+#, c-format
+msgid "Illegal filename: '%s'.\n"
+msgstr "שם קובץ לא חוקי: '%s'.\n"
+
+#: ../src/itdb_thumb.c:331
+#, c-format
+msgid "Mountpoint not set.\n"
+msgstr "לא נקבעה נקודת עגינה.\n"
+
+#: ../tests/test-photos.c:41
+#, c-format
+msgid ""
+"Usage to add photos:\n"
+"  %s add <mountpoint> <albumname> [<filename(s)>]\n"
+"  <albumname> should be set to 'NULL' to add photos to the master photo "
+"album\n"
+"  (Photo Library) only. If you don't specify any filenames an empty album "
+"will\n"
+"  be created.\n"
+msgstr ""
+"הוראות שימוש להוספת תמונות:\n"
+"  %s add <mountpoint> <albumname> [<filename(s)>]\n"
+"  <albumname> צריך להיות 'NULL' על מנת להוסיף תמונות אל האלבום הראשי\n"
+"  (Photo Library) בלבד.אם לא יצויין שום קובץ יווצר אלבום ריק.\n"
+
+#: ../tests/test-photos.c:42
+#, c-format
+msgid ""
+"Usage to dump all photos to <output_dir>:\n"
+"  %s dump <mountpoint> <output_dir>\n"
+msgstr ""
+"הוראות שימוש על מנת לשלוף את כל התמונות אל <תיקיית הפלט>:\n"
+"%s dump <mountpoint> <output_dir>\n"
+
+#: ../tests/test-photos.c:43
+#, c-format
+msgid ""
+"Usage to list all photos IDs to stdout:\n"
+"  %s list <mountpoint>\n"
+msgstr ""
+"הוראות שימוש על מנת להדפיס את רשימת כל מזהי התמונות אל הפלט הסטנדרטי:\n"
+"  %s list <mountpoint>\n"
+
+#: ../tests/test-photos.c:44
+#, c-format
+msgid ""
+"Usage to remove photo IDs from Photo Library:\n"
+"  %s remove <mountpoint> <albumname> [<ID(s)>]\n"
+"  <albumname> should be set to 'NULL' to remove photos from the iPod\n"
+"  altogether. If you don't specify any IDs, the photoalbum will be removed\n"
+"  instead.\n"
+"  WARNING: IDs may change when writing the PhotoDB file.\n"
+msgstr ""
+"הוראות שימוש על מנת להסיר את מזהי התמונות מספריית התמונות:\n"
+"  %s remove <mountpoint> <albumname> [<ID(s)>]\n"
+"  <albumname> צריך להיות 'NULL' על מנת להסיר תמונות לגמרי מה- iPod.\n"
+"  אם לא יצויין כל מזהה, כל אלבום התמונות יוסר במקום.\n"
+"אזהרה: המזהים עלולים להשתנות בזמן כתיבת אל קובץ ה-PhotoDB.\n"
+
+#: ../tests/test-photos.c:119
+#, c-format
+msgid "Wrong number of command line arguments.\n"
+msgstr "מספר לא נכון של פרמטרים בשורת הפקודה.\n"
+
+#: ../tests/test-photos.c:128
+#, c-format
+msgid "Error creating '%s' (mkdir)\n"
+msgstr "תקלה ביצירת '%s' (mkdir)\n"
+
+#: ../tests/test-photos.c:134
+#, c-format
+msgid "Error: '%s' is not a directory\n"
+msgstr "שגיאה: '%s' היא לא תיקייה\n"
+
+#: ../tests/test-photos.c:143 ../tests/test-photos.c:177
+#: ../tests/test-photos.c:306
+#, c-format
+msgid "Error reading iPod photo database (%s).\n"
+msgstr "תקלה בקריאת מסד נתונים של iPod photo במיקום (%s).\n"
+
+#: ../tests/test-photos.c:149 ../tests/test-photos.c:183
+#: ../tests/test-photos.c:313
+#, c-format
+msgid "Error reading iPod photo database.\n"
+msgstr "תקלה בקריאת מסד נתונים של iPod photo.\n"
+
+#: ../tests/test-photos.c:167 ../tests/test-photos.c:226
+#: ../tests/test-photos.c:296 ../tests/test-photos.c:379
+#, c-format
+msgid "Insufficient number of command line arguments.\n"
+msgstr "מספר לא מספק של פרמטרים לשורת הפקודה.\n"
+
+#: ../tests/test-photos.c:194
+msgid "<Unnamed>"
+msgstr "<ללא שם>"
+
+#: ../tests/test-photos.c:209
+#, c-format
+msgid "<No members>\n"
+msgstr "<ללא חברים>\n"
+
+#: ../tests/test-photos.c:236
+#, c-format
+msgid ""
+"Error reading iPod photo database (%s).\n"
+"Will attempt to create a new database.\n"
+msgstr ""
+"תקלה בזמן קריאת מסד נתונים של iPod photo (%s).\n"
+"יעשה ניסיון ליצור מסד נתוני חדש.\n"
+
+#: ../tests/test-photos.c:242
+#, c-format
+msgid ""
+"Error reading iPod photo database, will attempt to create a new database\n"
+msgstr ""
+"תקלה בזמן קריאת מסד נתונים של iPod photo, יעשה ניסיון ליצור מסד נתונים חדש\n"
+
+#: ../tests/test-photos.c:267
+#, c-format
+msgid "Error adding photo (%s) to photo database: %s\n"
+msgstr "תקלה בזמן הוספת תמונה (%s) אל מסד הנתונים של התמונות: %s\n"
+
+#: ../tests/test-photos.c:324
+#, c-format
+msgid "Specified album '%s' not found. Aborting.\n"
+msgstr "האלבום המצויין '%s' לא נמצא. מבטל.\n"
+
+#: ../tests/test-photos.c:336
+#, c-format
+msgid "Cannot remove Photo Library playlist. Aborting.\n"
+msgstr "אי אפשר היה להסיר רשימת תמונות ספריה. מבטל.\n"
+
+#: ../tests/test-photos.c:357
+#, c-format
+msgid "Warning: could not find photo with ID <%d>. Skipping...\n"
+msgstr "אזהרה: אי אפשר למצוא תמונה עם מזהה <%d>. מדלג...\n"
+
+#: ../tests/test-photos.c:403
+#, c-format
+msgid "Unknown command '%s'\n"
+msgstr "פקודה לא ידועה '%s'\n"
+
+#: ../tests/test-init-ipod.c:66
+#, c-format
+msgid "Error initialising iPod: %s\n"
+msgstr "תקלה באתחול ה-iPod: %s\n"
+
+#: ../tests/test-init-ipod.c:73
+#, c-format
+msgid "Error initialising iPod, unknown error\n"
+msgstr "תקלה באתחול ה-iPod, תקלה לא ידועה\n"
+
+#: ../tools/ipod-time-sync.c:37
+#, fuzzy, c-format
+msgid "usage: %s <device> [timezone]\n"
+msgstr "הוראות שימוש: %s <device> <mountpoint>\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:39
+#, c-format
+msgid "usage: %s <device> <mountpoint>\n"
+msgstr "הוראות שימוש: %s <device> <mountpoint>\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:45
+#, c-format
+msgid "Couldn't read xml sysinfo from %s\n"
+msgstr "אי אפשר לקרוא xml sysinfo מ %s\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:56
+#, c-format
+msgid "Couldn't resolve Device directory path on %s"
+msgstr "אי אפשר לפענח נתיב תיקייה מכשיר ב %s"
+
+#: ../tools/read-sysinfoextended-sgutils.c:64
+#, c-format
+msgid "Couldn't resolve SysInfoExtended path on %s"
+msgstr "אי אפשר לפענח נתיב SysInfoExtended ב %s"
+
+#: ../tools/read-sysinfoextended-sgutils.c:74
+#, c-format
+msgid "Couldn't write SysInfoExtended to %s"
+msgstr "אי אפשר לכתוב SysInfoExtended אל %s"
+
+#~ msgid "Could not find artwork entry (mhii id: %u) for track (dbid: %s).\n"
+#~ msgstr ""
+#~ "אי אפשר למצוא רשומת גלריית תמונות (mhii id: %u) עבור רצועה (dbid: %s).\n"

Added: libgpod/trunk/libgpod/branches/upstream/current/po/it.po
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/po/it.po	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/po/it.po	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,887 @@
+# Italian language translation for libgpod.
+# Copyright (C) 2003 Edward Matteucci
+# Copyright (C) 2007-2008 Daniele Forsi <daniele at forsi.it>
+#
+# This file is distributed under the same license as the libgpod package.
+#
+# Edward Matteucci <edward.matteucci at libero.it>, 2003, 2005.
+msgid ""
+msgstr ""
+"Project-Id-Version: it\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-04-03 16:08-0400\n"
+"PO-Revision-Date: 2008-12-16 21:44+0100\n"
+"Last-Translator: Daniele Forsi <daniele at forsi.it>\n"
+"Language-Team: Italian <tp at lists.linux.it>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+
+#: ../src/db-artwork-parser.c:140
+#, c-format
+msgid "Unexpected mhod string type: %d\n"
+msgstr "Tipo di stringa mhod inatteso: %d\n"
+
+#: ../src/db-artwork-parser.c:460
+#, c-format
+msgid "Unexpected mhsd index: %d\n"
+msgstr "Indice mhsd inatteso: %d\n"
+
+#: ../src/db-artwork-parser.c:540
+#, c-format
+msgid "Could not find corresponding track (dbid: %s) for artwork entry.\n"
+msgstr ""
+"Impossibile trovare la traccia corrispondente (dbid: %s) per l'elemento "
+"artwork.\n"
+
+#: ../src/db-artwork-parser.c:548
+#, c-format
+msgid "iTunesDB and ArtworkDB artwork sizes inconsistent (%d+%d != %d)\n"
+msgstr ""
+"Le dimensioni dell'artwork in iTunesDB e in ArtworkDB sono incompatibili (%d+"
+"%d != %d)\n"
+
+#: ../src/db-image-parser.c:91
+#, c-format
+msgid "Unexpected image type in mhni: %d, offset: %d\n"
+msgstr "Tipo di immagine inatteso in mhni: dimensioni: %d, offset: %d\n"
+
+#: ../src/itdb_artwork.c:163
+#, c-format
+msgid "Could not access file '%s'."
+msgstr "Impossibile accedere al file '%s'."
+
+#: ../src/itdb_artwork.c:181 ../src/itdb_artwork.c:241
+#: ../src/itdb_artwork.c:298
+#, c-format
+msgid "Artwork support not compiled into libgpod."
+msgstr "Supporto per artwork non compilato in libgpod."
+
+#: ../src/itdb_artwork.c:668
+#, c-format
+msgid "Could not find on iPod: '%s'\n"
+msgstr "Impossibile trovare sull'iPod: '%s'\n"
+
+#: ../src/itdb_artwork.c:828
+#, c-format
+msgid ""
+"Unable to retrieve thumbnail (appears to be on iPod, but no image info "
+"available): filename: '%s'\n"
+msgstr ""
+"Impossibile recuperare il provino (sembra che sia sull'iPod, ma non sono "
+"disponibili informazioni sull'immagine): nome del file: '%s'\n"
+
+#: ../src/itdb_device.c:263
+msgid "Invalid"
+msgstr "Non valido"
+
+#: ../src/itdb_device.c:264 ../src/itdb_device.c:305
+msgid "Unknown"
+msgstr "Sconosciuto"
+
+# NdT: al 6/5/2007 la pagina su come identificare i modelli di iPod
+# http://docs.info.apple.com/article.html?artnum=61688-it
+# non è tradotta in Italiano, quindi presumo che si tratti di nomi
+# propri e traduco solo il colore
+#: ../src/itdb_device.c:265
+msgid "Color"
+msgstr "Color"
+
+#: ../src/itdb_device.c:266
+msgid "Color U2"
+msgstr "Color U2"
+
+#: ../src/itdb_device.c:267
+msgid "Grayscale"
+msgstr "Grayscale"
+
+#: ../src/itdb_device.c:268
+msgid "Grayscale U2"
+msgstr "Grayscale U2"
+
+#: ../src/itdb_device.c:269
+msgid "Mini (Silver)"
+msgstr "Mini (argento)"
+
+#: ../src/itdb_device.c:270
+msgid "Mini (Blue)"
+msgstr "Mini (blu)"
+
+#: ../src/itdb_device.c:271
+msgid "Mini (Pink)"
+msgstr "Mini (rosa)"
+
+#: ../src/itdb_device.c:272
+msgid "Mini (Green)"
+msgstr "Mini (verde)"
+
+#: ../src/itdb_device.c:273
+msgid "Mini (Gold)"
+msgstr "Mini (oro)"
+
+#: ../src/itdb_device.c:274
+msgid "Shuffle"
+msgstr "Shuffle"
+
+#: ../src/itdb_device.c:275
+msgid "Nano (White)"
+msgstr "Nano (bianco)"
+
+#: ../src/itdb_device.c:276
+msgid "Nano (Black)"
+msgstr "Nano (Nero)"
+
+#: ../src/itdb_device.c:277
+msgid "Video (White)"
+msgstr "Video (bianco)"
+
+#: ../src/itdb_device.c:278
+msgid "Video (Black)"
+msgstr "Video (nero)"
+
+#: ../src/itdb_device.c:279
+msgid "Mobile (1)"
+msgstr "Mobile (1)"
+
+#: ../src/itdb_device.c:280
+msgid "Video U2"
+msgstr "Video U2"
+
+#: ../src/itdb_device.c:281
+msgid "Nano (Silver)"
+msgstr "Nano (argento)"
+
+#: ../src/itdb_device.c:282
+msgid "Nano (Blue)"
+msgstr "Nano (blu)"
+
+#: ../src/itdb_device.c:283
+msgid "Nano (Green)"
+msgstr "Nano (verde)"
+
+#: ../src/itdb_device.c:284
+msgid "Nano (Pink)"
+msgstr "Nano (verde)"
+
+#: ../src/itdb_device.c:285
+msgid "Nano (Red)"
+msgstr "Nano (rosso)"
+
+#: ../src/itdb_device.c:286
+msgid "Nano (Yellow)"
+msgstr "Nano (giallo)"
+
+#: ../src/itdb_device.c:287
+msgid "Nano (Purple)"
+msgstr "Nano (viola)"
+
+#: ../src/itdb_device.c:288
+msgid "Nano (Orange)"
+msgstr "Nano (arancione)"
+
+#: ../src/itdb_device.c:289
+msgid "iPhone (1)"
+msgstr "iPhone (1)"
+
+#: ../src/itdb_device.c:290
+msgid "Shuffle (Silver)"
+msgstr "Shuffle (argento)"
+
+#: ../src/itdb_device.c:291
+msgid "Shuffle (Pink)"
+msgstr "Shuffle (rosa)"
+
+#: ../src/itdb_device.c:292
+msgid "Shuffle (Blue)"
+msgstr "Shuffle (blu)"
+
+#: ../src/itdb_device.c:293
+msgid "Shuffle (Green)"
+msgstr "Shuffle (verde)"
+
+#: ../src/itdb_device.c:294
+msgid "Shuffle (Orange)"
+msgstr "Shuffle (arancione)"
+
+#: ../src/itdb_device.c:295
+msgid "Shuffle (Purple)"
+msgstr "Shuffle (viola)"
+
+#: ../src/itdb_device.c:296
+msgid "Shuffle (Red)"
+msgstr "Shuffle (rosso)"
+
+#: ../src/itdb_device.c:297
+msgid "Classic (Silver)"
+msgstr "Classic (argento)"
+
+#: ../src/itdb_device.c:298
+msgid "Classic (Black)"
+msgstr "Classic (nero)"
+
+#: ../src/itdb_device.c:299
+msgid "Touch (Black)"
+msgstr "Touch (Nero)"
+
+#: ../src/itdb_device.c:306
+msgid "Regular (1st Gen.)"
+msgstr "Normale (1ᵃ gen.) "
+
+#: ../src/itdb_device.c:307
+msgid "Regular (2nd Gen.)"
+msgstr "Normale (2ᵃ gen.) "
+
+#: ../src/itdb_device.c:308
+msgid "Regular (3rd Gen.)"
+msgstr "Normale (3ᵃ gen.) "
+
+#: ../src/itdb_device.c:309
+msgid "Regular (4th Gen.)"
+msgstr "Normale (4ᵃ gen.) "
+
+#: ../src/itdb_device.c:310
+msgid "Photo"
+msgstr "Photo"
+
+#: ../src/itdb_device.c:311
+msgid "Mobile Phones"
+msgstr "Telefoni cellulari"
+
+#: ../src/itdb_device.c:312
+msgid "Mini (1st Gen.)"
+msgstr "Mini (1ᵃ gen.)"
+
+#: ../src/itdb_device.c:313
+msgid "Mini (2nd Gen.)"
+msgstr "Mini (2ᵃ gen.)"
+
+#: ../src/itdb_device.c:314
+msgid "Shuffle (1st Gen.)"
+msgstr "Shuffle (1ᵃ gen.)"
+
+#: ../src/itdb_device.c:315
+msgid "Shuffle (2nd Gen.)"
+msgstr "Shuffle (2ᵃ gen.)"
+
+#: ../src/itdb_device.c:316
+msgid "Shuffle (3rd Gen.)"
+msgstr "Shuffle (3ᵃ gen.)"
+
+#: ../src/itdb_device.c:317
+msgid "Nano (1st Gen.)"
+msgstr "Nano (1ᵃ gen.)"
+
+#: ../src/itdb_device.c:318
+msgid "Nano (2nd Gen.)"
+msgstr "Nano (2ᵃ gen.)"
+
+#: ../src/itdb_device.c:319
+msgid "Nano Video (3rd Gen.)"
+msgstr "Nano Video (3ᵃ gen.)"
+
+#: ../src/itdb_device.c:320
+msgid "Nano Video (4th Gen.)"
+msgstr "Nano Video (4ᵃ gen.)"
+
+#: ../src/itdb_device.c:321
+msgid "Video (1st Gen.)"
+msgstr "Video (1ᵃ gen.)"
+
+#: ../src/itdb_device.c:322
+msgid "Video (2nd Gen.)"
+msgstr "Video (2ᵃ gen.)"
+
+#: ../src/itdb_device.c:323 ../src/itdb_device.c:324
+msgid "Classic"
+msgstr "Classic"
+
+#: ../src/itdb_device.c:325
+msgid "Touch"
+msgstr "Touch"
+
+#: ../src/itdb_device.c:326
+msgid "iPhone"
+msgstr "iPhone"
+
+#: ../src/itdb_device.c:327 ../src/itdb_device.c:328
+msgid "Unused"
+msgstr "Non usato"
+
+#: ../src/itdb_device.c:928
+#, c-format
+msgid "Could not open '%s' for writing."
+msgstr "Impossibile aprire '%s' in scrittura."
+
+#: ../src/itdb_device.c:937
+#, c-format
+msgid "Device directory does not exist."
+msgstr "La directory del dispositivo non esiste."
+
+#: ../src/itdb_itunesdb.c:507
+#, c-format
+msgid "Illegal seek to offset %ld (length %ld) in file '%s'."
+msgstr "Spostamento non ammesso all'offset %ld (lunghezza %ld) nel file '%s'."
+
+#: ../src/itdb_itunesdb.c:910
+#, c-format
+msgid "Not a Play Counts file: '%s' (missing mhdp header)."
+msgstr "Non è un file conta riproduzioni: '%s' (manca l'intestazione mhdp)."
+
+#: ../src/itdb_itunesdb.c:925
+#, c-format
+msgid "Play Counts file ('%s'): header length smaller than expected (%d<96)."
+msgstr ""
+"File conta riproduzioni ('%s'): lunghezza dell'intestazione più piccola di "
+"quanto previsto (%d<96)."
+
+#: ../src/itdb_itunesdb.c:939
+#, c-format
+msgid "Play Counts file ('%s'): entry length smaller than expected (%d<12)."
+msgstr ""
+"File conta riproduzioni ('%s'): lunghezza della voce più piccola di quanto "
+"previsto (%d<12)."
+
+#: ../src/itdb_itunesdb.c:1014
+#, c-format
+msgid "iTunesStats file ('%s'): entry length smaller than expected (%d<18)."
+msgstr ""
+"File iTunesStats ('%s'): lunghezza della voce più piccola di quanto previsto "
+"(%d<18)."
+
+#: ../src/itdb_itunesdb.c:1333
+#, c-format
+msgid "iTunesDB corrupt: no MHOD at offset %ld in file '%s'."
+msgstr "iTunesDB corrotto: nessun MHOD all'offset %ld nel file '%s'."
+
+#: ../src/itdb_itunesdb.c:1519
+#, c-format
+msgid "Unknown smart rule action at %ld: %x. Trying to continue.\n"
+msgstr ""
+"Azione «smart rule» sconosciuta alla posizione %ld: %x. Si prova a "
+"continuare.\n"
+
+#: ../src/itdb_itunesdb.c:1550
+#, c-format
+msgid ""
+"Length of smart playlist rule field (%d) not as expected. Trying to continue "
+"anyhow.\n"
+msgstr ""
+"La lunghezza del campo della regola della scaletta intelligente (%d) non è "
+"come previsto. Si prova a continuare comunque.\n"
+
+#: ../src/itdb_itunesdb.c:1593
+#, c-format
+msgid "iTunesDB corrupt: no SLst at offset %ld in file '%s'."
+msgstr "iTunesDB corrotto: nessun SLst MHOD all'offset %ld nel file '%s'."
+
+#: ../src/itdb_itunesdb.c:1606
+#, c-format
+msgid ""
+"Encountered unknown MHOD type (%d) while parsing the iTunesDB. Ignoring.\n"
+"\n"
+msgstr ""
+"Incontrato un tipo MHOD sconosciuto (%d) durante l'interpretazione di "
+"iTunesDB. Ignorato.\n"
+"\n"
+
+#: ../src/itdb_itunesdb.c:1689
+#, c-format
+msgid "iTunesDB corrupt: hunk length 0 for hunk at %ld in file '%s'."
+msgstr ""
+"iTunesDB corrotto: hunk di lunghezza 0 per l'hunk alla posizione %ld nel "
+"file '%s'."
+
+#: ../src/itdb_itunesdb.c:1702
+#, c-format
+msgid ""
+"iTunesDB corrupt: no section '%s' found in section '%s' starting at %ld."
+msgstr ""
+"iTunesDB corrotto: nessuna sezione '%s' trovata nella sezione '%s' che "
+"inizia alla posizione %ld."
+
+#: ../src/itdb_itunesdb.c:1716
+#, c-format
+msgid ""
+"header length of '%s' smaller than expected (%d < %d) at offset %ld in file "
+"'%s'."
+msgstr ""
+"la lunghezza dell'intestazione di '%s' più piccola di quanto previsto (%d < %"
+"d) alla posizione %ld nel file '%s'."
+
+#: ../src/itdb_itunesdb.c:1801
+#, c-format
+msgid "Not a iTunesDB: '%s' (missing mhdb header)."
+msgstr "Non è un file iTunesDB: '%s' (manca l'intestazione mhdb)."
+
+#: ../src/itdb_itunesdb.c:1818
+#, c-format
+msgid ""
+"iTunesDB ('%s'): header length of mhsd hunk smaller than expected (%d<32). "
+"Aborting."
+msgstr ""
+"iTunesDB ('%s'): lunghezza dell'intestazione dell'hunk mhsd più piccola di "
+"quanto previsto (%d<32). Interruzione."
+
+#: ../src/itdb_itunesdb.c:1839
+#, c-format
+msgid "iTunesDB '%s' corrupt: mhsd expected at %ld."
+msgstr "iTunesDB '%s' corrotto: mhsd previsto alla posizione %ld."
+
+#: ../src/itdb_itunesdb.c:1944
+#, c-format
+msgid "Number of MHODs in mhip at %ld inconsistent in file '%s'."
+msgstr ""
+"Il numero di MHOD nel mhip alla posizione %ld nel file '%s' è incompatibile."
+
+#: ../src/itdb_itunesdb.c:2121
+#, c-format
+msgid "Number of MHODs in mhyp at %ld inconsistent in file '%s'."
+msgstr ""
+"Il numero di MHOD nel mhyp alla posizione %ld nel file '%s' è incompatibile."
+
+# L'interfaccia italiana dell'iPod usa "Playlist"
+#: ../src/itdb_itunesdb.c:2131
+msgid "Master-PL"
+msgstr "Playlist principale"
+
+#: ../src/itdb_itunesdb.c:2135
+msgid "Podcasts"
+msgstr "Podcast"
+
+#: ../src/itdb_itunesdb.c:2137
+msgid "Playlist"
+msgstr "Playlist"
+
+#: ../src/itdb_itunesdb.c:2159
+#, c-format
+msgid ""
+"iTunesDB corrupt: number of mhip sections inconsistent in mhyp starting at %"
+"ld in file '%s'."
+msgstr ""
+"iTunesDB corrotto: il numero di sezioni mhip è incompatibile nel mhyp che "
+"inizia alla posizione %ld nel file '%s'."
+
+#: ../src/itdb_itunesdb.c:2180
+#, c-format
+msgid "Itdb_Track ID '%d' not found.\n"
+msgstr "itDB_Track ID '%d' non trovato.\n"
+
+# L'interfaccia italiana dell'iPod usa solo "On-The-Go"
+#: ../src/itdb_itunesdb.c:2524
+msgid "OTG Playlist"
+msgstr "Playlist OTG"
+
+#: ../src/itdb_itunesdb.c:2542
+#, c-format
+msgid "Not a OTG playlist file: '%s' (missing mhpo header)."
+msgstr "Non è un file di playlist OTG: '%s' (manca l'intestazione mhpo)."
+
+#: ../src/itdb_itunesdb.c:2556
+#, c-format
+msgid "OTG playlist file ('%s'): header length smaller than expected (%d<20)."
+msgstr ""
+"File di playlist OTG ('%s'): la lunghezza dell'intestazione è più piccola di "
+"quanto previsto (%d<20)."
+
+#: ../src/itdb_itunesdb.c:2568
+#, c-format
+msgid "OTG playlist file ('%s'): entry length smaller than expected (%d<4)."
+msgstr ""
+"File di playlist OTG ('%s'): la lunghezza della voce è più piccola di quanto "
+"previsto (%d<4)."
+
+#: ../src/itdb_itunesdb.c:2603
+#, c-format
+msgid "OTG playlist file '%s': reference to non-existent track (%d)."
+msgstr "Playlist OTG '%s': riferimento ad una traccia non esistente (%d)."
+
+#: ../src/itdb_itunesdb.c:2648
+#, c-format
+msgid "OTG Playlist %d"
+msgstr "Playlist OTG %d"
+
+#. this should not be -- issue warning
+#: ../src/itdb_itunesdb.c:2716
+msgid ""
+"iTunesDB corrupt: number of tracks (mhit hunks) inconsistent. Trying to "
+"continue.\n"
+msgstr ""
+"iTunesDB corrotto: il numero di tracce (hunk di tipo mhit) è incompatibile. "
+"Provo a continuare.\n"
+
+#. this should not be -- issue warning
+#: ../src/itdb_itunesdb.c:2779
+msgid ""
+"iTunesDB possibly corrupt: number of playlists (mhyp hunks) inconsistent. "
+"Trying to continue.\n"
+msgstr ""
+"iTunesDB è probabilmente corrotto: il numero di playlist (hunk di tipo mhyp) "
+"è incompatibile. Provo a continuare.\n"
+
+#: ../src/itdb_itunesdb.c:2826
+#, c-format
+msgid ""
+"iTunesDB '%s' corrupt: Could not find tracklist (no mhsd type 1 section "
+"found)"
+msgstr ""
+"iTunesDB '%s' corrotto: impossibile trovare la lista delle tracce (nessuna "
+"sezione mhsd di tipo 1 è stata trovata)"
+
+#: ../src/itdb_itunesdb.c:2855
+#, c-format
+msgid ""
+"iTunesDB '%s' corrupt: Could not find playlists (no mhsd type 2 or type 3 "
+"sections found)"
+msgstr ""
+"iTunesDB '%s' corrotto: impossibile trovare delle playlist (nessuna sezione "
+"mhsd di tipo 2 o di tipo 3 è stata trovata)"
+
+#: ../src/itdb_itunesdb.c:2877
+#, c-format
+msgid "iTunes directory not found: '%s' (or similar)."
+msgstr "Directory di iTunes non trovata: '%s' (o simile)."
+
+#: ../src/itdb_itunesdb.c:2894
+#, c-format
+msgid "Music directory not found: '%s' (or similar)."
+msgstr "Directory della musica non trovata: '%s' (o simile)."
+
+#: ../src/itdb_itunesdb.c:2912
+#, c-format
+msgid "Control directory not found: '%s' (or similar)."
+msgstr "Directory di controllo non trovata: '%s' (o simile)."
+
+#: ../src/itdb_itunesdb.c:3033
+#, c-format
+msgid "File not found: '%s'."
+msgstr "File non trovato: '%s'."
+
+#: ../src/itdb_itunesdb.c:5533
+#, c-format
+msgid "Path not found: '%s' (or similar)."
+msgstr "Percorso non trovato: '%s' (o simile)."
+
+#: ../src/itdb_itunesdb.c:5742
+#, c-format
+msgid "Error renaming '%s' to '%s' (%s)."
+msgstr "Errore rinominando '%s' in '%s' (%s)."
+
+#: ../src/itdb_itunesdb.c:5759 ../src/itdb_itunesdb.c:5776
+#: ../src/itdb_itunesdb.c:5793
+#, c-format
+msgid "Error removing '%s' (%s)."
+msgstr "Errore nella rimozione di '%s' (%s)."
+
+#: ../src/itdb_itunesdb.c:5960 ../src/itdb_itunesdb.c:6133
+#, c-format
+msgid "Mountpoint not set."
+msgstr "Punto di mount non impostato."
+
+#: ../src/itdb_itunesdb.c:6000
+#, c-format
+msgid "No 'F..' directories found in '%s'."
+msgstr "Nessuna directory 'F..' trovata in '%s'."
+
+#: ../src/itdb_itunesdb.c:6021
+#, c-format
+msgid "Path not found: '%s'."
+msgstr "Percorso non trovato: '%s'."
+
+#: ../src/itdb_itunesdb.c:6142
+#, c-format
+msgid "'%s' could not be accessed (%s)."
+msgstr "Impossibile accedere a '%s' (%s)."
+
+#: ../src/itdb_itunesdb.c:6152
+#, c-format
+msgid ""
+"Destination file '%s' does not appear to be on the iPod mounted at '%s'."
+msgstr ""
+"Il file di destinazione '%s' sembra che non sia sull'iPod montato in '%s'."
+
+#: ../src/itdb_itunesdb.c:6360
+#, c-format
+msgid "Error opening '%s' for reading (%s)."
+msgstr "Errore nell'apertura in lettura di '%s' (%s)."
+
+#: ../src/itdb_itunesdb.c:6372
+#, c-format
+msgid "Error opening '%s' for writing (%s)."
+msgstr "Errore nell'apertura in scrittura di '%s' (%s)."
+
+#: ../src/itdb_itunesdb.c:6388
+#, c-format
+msgid "Error while reading from '%s' (%s)."
+msgstr "Errore nella lettura da '%s' (%s)."
+
+#: ../src/itdb_itunesdb.c:6403
+#, c-format
+msgid "Error while writing to '%s' (%s)."
+msgstr "Errore nella scrittura su '%s' (%s)."
+
+#: ../src/itdb_itunesdb.c:6416 ../src/itdb_itunesdb.c:6426
+#, c-format
+msgid "Error when closing '%s' (%s)."
+msgstr "Errore nella chiusura di '%s' (%s)."
+
+#: ../src/itdb_itunesdb.c:6856
+msgid "iPod"
+msgstr "iPod"
+
+#: ../src/itdb_itunesdb.c:7178
+#, c-format
+msgid "Problem creating iPod directory or file: '%s'."
+msgstr "Problema nel creare una directory o un file sull'iPod: '%s'."
+
+#: ../src/itdb_photoalbum.c:111
+#, c-format
+msgid "Photos directory not found: '%s' (or similar)."
+msgstr "Directory delle foto non trovata: '%s' (o simile)."
+
+#: ../src/itdb_photoalbum.c:266 ../src/itdb_photoalbum.c:460
+msgid "Photo Library"
+msgstr "Album fotografico"
+
+#: ../src/itdb_photoalbum.c:386
+#, c-format
+msgid "You need to specify the iPod model used before photos can be added."
+msgstr ""
+"È necessario specificare il modello di iPod prima di poter aggiungere delle "
+"fotografie."
+
+#: ../src/itdb_photoalbum.c:407
+#, c-format
+msgid ""
+"Your iPod does not seem to support photos. Maybe you need to specify the "
+"correct iPod model number? It is currently set to 'x%s' (%s/%s)."
+msgstr ""
+"L'iPod in uso non gestisce le fotografie. È possibile che si debba "
+"specificare il numero esatto del modello di iPod. Ora è impostato come 'x%"
+"s' (%s/%s)."
+
+#: ../src/itdb_photoalbum.c:419
+#, c-format
+msgid "Could not access file '%s'. Photo not added."
+msgstr "Impossibile accedere al file '%s'. La fotografia non è stata aggiunta."
+
+#: ../src/itdb_photoalbum.c:448
+#, c-format
+msgid ""
+"Unexpected error in itdb_photodb_add_photo_internal() while adding photo, "
+"please report."
+msgstr ""
+"Errore inatteso in itdb_photodb_add_photo_internal() durante l'aggiunta di "
+"una fotografia, si invii una segnalazione."
+
+#: ../src/itdb_photoalbum.c:468
+#, c-format
+msgid ""
+"Library compiled without gdk-pixbuf support. Picture support is disabled."
+msgstr ""
+"La libreria è stata compilata senza il supporto per gdk-pixbuf. Il supporto "
+"per le immagini è disabilitato."
+
+#. New action!
+#: ../src/itdb_playlist.c:78
+#, c-format
+msgid "Unknown action (%d) in smart playlist will be ignored.\n"
+msgstr ""
+"L'azione sconosciuta (%d) nella playlist intelligente verrà ignorata.\n"
+
+#: ../src/itdb_thumb.c:326
+#, c-format
+msgid "Illegal filename: '%s'.\n"
+msgstr "Nome file inaccettabile: '%s'.\n"
+
+#: ../src/itdb_thumb.c:331
+#, c-format
+msgid "Mountpoint not set.\n"
+msgstr "Punto di mount non impostato.\n"
+
+#: ../tests/test-photos.c:41
+#, c-format
+msgid ""
+"Usage to add photos:\n"
+"  %s add <mountpoint> <albumname> [<filename(s)>]\n"
+"  <albumname> should be set to 'NULL' to add photos to the master photo "
+"album\n"
+"  (Photo Library) only. If you don't specify any filenames an empty album "
+"will\n"
+"  be created.\n"
+msgstr ""
+"Uso per aggiungere fotografie:\n"
+"  %s add <puntodimount> <nomealbum> [<nomifile>]\n"
+"  <nomealbum> deve essere impostato a 'NULL' per aggiungere le fotografie "
+"solamente all'album di fotografie principale\n"
+"  (Album fotografico). Se non si specificano nomi di file verrà creato un "
+"album vuoto.\n"
+
+#: ../tests/test-photos.c:42
+#, c-format
+msgid ""
+"Usage to dump all photos to <output_dir>:\n"
+"  %s dump <mountpoint> <output_dir>\n"
+msgstr ""
+"Uso per scaricare tutte le fotografie in <output_dir>:\n"
+"  %s dump <puntodimount> <output_dir>\n"
+
+#: ../tests/test-photos.c:43
+#, c-format
+msgid ""
+"Usage to list all photos IDs to stdout:\n"
+"  %s list <mountpoint>\n"
+msgstr ""
+"Uso per elencare tutti gli ID delle fotografie su stdout:\n"
+"  %s list <puntodimount>\n"
+
+#: ../tests/test-photos.c:44
+#, c-format
+msgid ""
+"Usage to remove photo IDs from Photo Library:\n"
+"  %s remove <mountpoint> <albumname> [<ID(s)>]\n"
+"  <albumname> should be set to 'NULL' to remove photos from the iPod\n"
+"  altogether. If you don't specify any IDs, the photoalbum will be removed\n"
+"  instead.\n"
+"  WARNING: IDs may change when writing the PhotoDB file.\n"
+msgstr ""
+"Uso per rimuovere gli ID delle fotografie dall'album fotografico:\n"
+"  %s remove <puntodimount> <nomealbum> [<ID(s)>]\n"
+"  <nomealbum> deve essere impostato a 'NULL' per rimuovere completamente\n"
+"  le fotografie dall'iPod. Se non si specifica un ID invece sarà rimosso\n"
+"  l'album.\n"
+"  ATTENZIONE: gli ID possono cambiare durante la scrittura del file "
+"PhotoDB.\n"
+
+#: ../tests/test-photos.c:119
+#, c-format
+msgid "Wrong number of command line arguments.\n"
+msgstr "Numero errato di argomenti sulla riga di comando.\n"
+
+#: ../tests/test-photos.c:128
+#, c-format
+msgid "Error creating '%s' (mkdir)\n"
+msgstr "Errore nella creazione di '%s' (mkdir)\n"
+
+#: ../tests/test-photos.c:134
+#, c-format
+msgid "Error: '%s' is not a directory\n"
+msgstr "Errore: '%s' non è una directory\n"
+
+#: ../tests/test-photos.c:143 ../tests/test-photos.c:177
+#: ../tests/test-photos.c:306
+#, c-format
+msgid "Error reading iPod photo database (%s).\n"
+msgstr "Errore durante la lettura del database di fotografie dell'iPod (%s).\n"
+
+#: ../tests/test-photos.c:149 ../tests/test-photos.c:183
+#: ../tests/test-photos.c:313
+#, c-format
+msgid "Error reading iPod photo database.\n"
+msgstr "Errore durante la lettura del database di fotografie dell'iPod.\n"
+
+#: ../tests/test-photos.c:167 ../tests/test-photos.c:226
+#: ../tests/test-photos.c:296 ../tests/test-photos.c:379
+#, c-format
+msgid "Insufficient number of command line arguments.\n"
+msgstr "Numero insufficiente di argomenti sulla riga di comando.\n"
+
+#: ../tests/test-photos.c:194
+msgid "<Unnamed>"
+msgstr "<Senza nome>"
+
+#: ../tests/test-photos.c:209
+#, c-format
+msgid "<No members>\n"
+msgstr "<Nessun membro>\n"
+
+#: ../tests/test-photos.c:236
+#, c-format
+msgid ""
+"Error reading iPod photo database (%s).\n"
+"Will attempt to create a new database.\n"
+msgstr ""
+"Errore durante la lettura del database di fotografie dell'iPod (%s).\n"
+"Verrà fatto un tentativo per creare un nuovo database.\n"
+
+#: ../tests/test-photos.c:242
+#, c-format
+msgid ""
+"Error reading iPod photo database, will attempt to create a new database\n"
+msgstr ""
+"Errore durante la lettura del database di fotografie dell'iPod, verrà fatto "
+"un tentativo per creare un nuovo database.\n"
+
+#: ../tests/test-photos.c:267
+#, c-format
+msgid "Error adding photo (%s) to photo database: %s\n"
+msgstr ""
+"Errore durante l'aggiunta della fotografia (%s) al database delle "
+"fotografie: %s.\n"
+
+#: ../tests/test-photos.c:324
+#, c-format
+msgid "Specified album '%s' not found. Aborting.\n"
+msgstr "L'album specificato '%s' non è stato trovato. Interruzione.\n"
+
+#: ../tests/test-photos.c:336
+#, c-format
+msgid "Cannot remove Photo Library playlist. Aborting.\n"
+msgstr ""
+"Impossibile rimuovere la playlist dell'album fotografico. Interruzione.\n"
+
+#: ../tests/test-photos.c:357
+#, c-format
+msgid "Warning: could not find photo with ID <%d>. Skipping...\n"
+msgstr ""
+"Attenzione: impossibile trovare la fotografia con ID <%d>. Saltata...\n"
+
+#: ../tests/test-photos.c:403
+#, c-format
+msgid "Unknown command '%s'\n"
+msgstr "Comando sconosciuto '%s'\n"
+
+#: ../tests/test-init-ipod.c:66
+#, c-format
+msgid "Error initialising iPod: %s\n"
+msgstr "Errore durante l'inizializzazione dell'iPod: %s\n"
+
+#: ../tests/test-init-ipod.c:73
+#, c-format
+msgid "Error initialising iPod, unknown error\n"
+msgstr "Errore durante l'inizializzazione dell'iPod: errore sconosciuto\n"
+
+#: ../tools/ipod-time-sync.c:37
+#, fuzzy, c-format
+msgid "usage: %s <device> [timezone]\n"
+msgstr "Uso: %s <device> <punto_di_mount>\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:39
+#, c-format
+msgid "usage: %s <device> <mountpoint>\n"
+msgstr "Uso: %s <device> <punto_di_mount>\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:45
+#, c-format
+msgid "Couldn't read xml sysinfo from %s\n"
+msgstr "Impossibile sysinfo xml da %s\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:56
+#, c-format
+msgid "Couldn't resolve Device directory path on %s"
+msgstr "Impossible risolvere il percorso della directory del device su %s"
+
+#: ../tools/read-sysinfoextended-sgutils.c:64
+#, c-format
+msgid "Couldn't resolve SysInfoExtended path on %s"
+msgstr "Impossibile risolvere il percorso di SysInfoExtended su %s"
+
+#: ../tools/read-sysinfoextended-sgutils.c:74
+#, c-format
+msgid "Couldn't write SysInfoExtended to %s"
+msgstr "Impossibile scrivere SysInfoExtended su %s"
+
+#~ msgid "Could not find artwork entry (mhii id: %u) for track (dbid: %s).\n"
+#~ msgstr ""
+#~ "Impossibile trovare la voce della copertina (id mhii: %u) per la traccia "
+#~ "(dbid: %s).\n"

Added: libgpod/trunk/libgpod/branches/upstream/current/po/ja.po
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/po/ja.po	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/po/ja.po	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,903 @@
+# Japanese Translation Catalogue
+# Copyright (C) 2007 libgpod
+# This file is distributed under the same license as the libgpod package.
+# Jorg Schuler <jcsjcs at users.sourceforge.net>, 2003.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gtkpod 0.40\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-04-03 16:08-0400\n"
+"PO-Revision-Date: 2006-02-14 16:48+0900\n"
+"Last-Translator: Kentaro Fukuchi <fukuchi at users.sourceforge.net>\n"
+"Language-Team: n/a\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=euc-jp\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#: ../src/db-artwork-parser.c:140
+#, fuzzy, c-format
+msgid "Unexpected mhod string type: %d\n"
+msgstr "ͽ´ü¤»¤Ì mhod3 string type ¤Ç¤¹: %d\n"
+
+#: ../src/db-artwork-parser.c:460
+#, c-format
+msgid "Unexpected mhsd index: %d\n"
+msgstr "ͽ´ü¤»¤Ì mhsd index: %d\n"
+
+#: ../src/db-artwork-parser.c:540
+#, c-format
+msgid "Could not find corresponding track (dbid: %s) for artwork entry.\n"
+msgstr "¥¢¡¼¥È¥ï¡¼¥¯¤ËÂбþ¤¹¤ë¶Ê (dbid: %s) ¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó.\n"
+
+#: ../src/db-artwork-parser.c:548
+#, c-format
+msgid "iTunesDB and ArtworkDB artwork sizes inconsistent (%d+%d != %d)\n"
+msgstr ""
+"iTunesDB Æâ¤Î¾ðÊó¤È ArtworkDB ¤Î¥¢¡¼¥È¥ï¡¼¥¯¤Î¥µ¥¤¥º¤¬°ìÃפ·¤Þ¤»¤ó (%d+%d != "
+"%d)\n"
+
+#: ../src/db-image-parser.c:91
+#, fuzzy, c-format
+msgid "Unexpected image type in mhni: %d, offset: %d\n"
+msgstr "mhni ¤Ëͽ´ü¤»¤Ì¥¤¥á¡¼¥¸¥¿¥¤¥×: size: %ux%u (%d), offset: %d\n"
+
+#: ../src/itdb_artwork.c:163
+#, c-format
+msgid "Could not access file '%s'."
+msgstr "¥Õ¥¡¥¤¥ë '%s' ¤Ë¥¢¥¯¥»¥¹¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿."
+
+#: ../src/itdb_artwork.c:181 ../src/itdb_artwork.c:241
+#: ../src/itdb_artwork.c:298
+#, c-format
+msgid "Artwork support not compiled into libgpod."
+msgstr "libgpod ¤Ë¥¢¡¼¥È¥ï¡¼¥¯¤Î¥µ¥Ý¡¼¥È¤¬ÁȤ߹þ¤Þ¤ì¤Æ¤¤¤Þ¤»¤ó."
+
+#: ../src/itdb_artwork.c:668
+#, c-format
+msgid "Could not find on iPod: '%s'\n"
+msgstr "iPod ¤ÎÃæ¤Ë¸«Åö¤¿¤ê¤Þ¤»¤ó: '%s'\n"
+
+#: ../src/itdb_artwork.c:828
+#, fuzzy, c-format
+msgid ""
+"Unable to retrieve thumbnail (appears to be on iPod, but no image info "
+"available): filename: '%s'\n"
+msgstr ""
+"¥µ¥à¥Í¥¤¥ë¤ò¼èÆÀ¤Ç¤­¤Þ¤»¤ó (iPod ¤ÎÃæ¤Ë¤¢¤ëȦ¤Ç¤¹¤¬, ²èÁü¾ðÊ󤬸«¤Ä¤«¤ê¤Þ¤»"
+"¤ó): type: %d, filename: '%s'\n"
+
+#: ../src/itdb_device.c:263
+msgid "Invalid"
+msgstr "°Û¾ï"
+
+#: ../src/itdb_device.c:264 ../src/itdb_device.c:305
+msgid "Unknown"
+msgstr "ÉÔÌÀ"
+
+#: ../src/itdb_device.c:265
+msgid "Color"
+msgstr ""
+
+#: ../src/itdb_device.c:266
+msgid "Color U2"
+msgstr ""
+
+#: ../src/itdb_device.c:267
+msgid "Grayscale"
+msgstr ""
+
+#: ../src/itdb_device.c:268
+msgid "Grayscale U2"
+msgstr ""
+
+#: ../src/itdb_device.c:269
+msgid "Mini (Silver)"
+msgstr "Mini (¶ä)"
+
+#: ../src/itdb_device.c:270
+msgid "Mini (Blue)"
+msgstr "Mini (ÀÄ)"
+
+#: ../src/itdb_device.c:271
+msgid "Mini (Pink)"
+msgstr "Mini (¥Ô¥ó¥¯)"
+
+#: ../src/itdb_device.c:272
+msgid "Mini (Green)"
+msgstr "Mini (ÎÐ)"
+
+#: ../src/itdb_device.c:273
+msgid "Mini (Gold)"
+msgstr "Mini (¶â)"
+
+#: ../src/itdb_device.c:274
+msgid "Shuffle"
+msgstr ""
+
+#: ../src/itdb_device.c:275
+msgid "Nano (White)"
+msgstr "Nano (Çò)"
+
+#: ../src/itdb_device.c:276
+msgid "Nano (Black)"
+msgstr "Nano (¹õ)"
+
+#: ../src/itdb_device.c:277
+msgid "Video (White)"
+msgstr "Video (Çò)"
+
+#: ../src/itdb_device.c:278
+msgid "Video (Black)"
+msgstr "Video (¹õ)"
+
+#: ../src/itdb_device.c:279
+msgid "Mobile (1)"
+msgstr ""
+
+#: ../src/itdb_device.c:280
+msgid "Video U2"
+msgstr ""
+
+#: ../src/itdb_device.c:281
+msgid "Nano (Silver)"
+msgstr "Nano (¶ä)"
+
+#: ../src/itdb_device.c:282
+msgid "Nano (Blue)"
+msgstr "Nano (ÀÄ)"
+
+#: ../src/itdb_device.c:283
+msgid "Nano (Green)"
+msgstr "Nano (ÎÐ)"
+
+#: ../src/itdb_device.c:284
+msgid "Nano (Pink)"
+msgstr "Nano (¥Ô¥ó¥¯)"
+
+#: ../src/itdb_device.c:285
+#, fuzzy
+msgid "Nano (Red)"
+msgstr "Nano (ÀÄ)"
+
+#: ../src/itdb_device.c:286
+#, fuzzy
+msgid "Nano (Yellow)"
+msgstr "Nano (ÀÄ)"
+
+#: ../src/itdb_device.c:287
+#, fuzzy
+msgid "Nano (Purple)"
+msgstr "Nano (ÀÄ)"
+
+#: ../src/itdb_device.c:288
+#, fuzzy
+msgid "Nano (Orange)"
+msgstr "Nano (ÎÐ)"
+
+#: ../src/itdb_device.c:289
+msgid "iPhone (1)"
+msgstr ""
+
+#: ../src/itdb_device.c:290
+#, fuzzy
+msgid "Shuffle (Silver)"
+msgstr "Mini (¶ä)"
+
+#: ../src/itdb_device.c:291
+msgid "Shuffle (Pink)"
+msgstr ""
+
+#: ../src/itdb_device.c:292
+msgid "Shuffle (Blue)"
+msgstr ""
+
+#: ../src/itdb_device.c:293
+msgid "Shuffle (Green)"
+msgstr ""
+
+#: ../src/itdb_device.c:294
+msgid "Shuffle (Orange)"
+msgstr ""
+
+#: ../src/itdb_device.c:295
+msgid "Shuffle (Purple)"
+msgstr ""
+
+#: ../src/itdb_device.c:296
+msgid "Shuffle (Red)"
+msgstr ""
+
+#: ../src/itdb_device.c:297
+#, fuzzy
+msgid "Classic (Silver)"
+msgstr "Mini (¶ä)"
+
+#: ../src/itdb_device.c:298
+#, fuzzy
+msgid "Classic (Black)"
+msgstr "Nano (¹õ)"
+
+#: ../src/itdb_device.c:299
+#, fuzzy
+msgid "Touch (Black)"
+msgstr "Nano (¹õ)"
+
+#: ../src/itdb_device.c:306
+msgid "Regular (1st Gen.)"
+msgstr ""
+
+#: ../src/itdb_device.c:307
+msgid "Regular (2nd Gen.)"
+msgstr ""
+
+#: ../src/itdb_device.c:308
+msgid "Regular (3rd Gen.)"
+msgstr ""
+
+#: ../src/itdb_device.c:309
+msgid "Regular (4th Gen.)"
+msgstr ""
+
+#: ../src/itdb_device.c:310
+msgid "Photo"
+msgstr ""
+
+#: ../src/itdb_device.c:311
+#, fuzzy
+msgid "Mobile Phones"
+msgstr "·ÈÂÓÅÅÏÃ"
+
+#: ../src/itdb_device.c:312
+#, fuzzy
+msgid "Mini (1st Gen.)"
+msgstr "Mini (ÎÐ)"
+
+#: ../src/itdb_device.c:313
+#, fuzzy
+msgid "Mini (2nd Gen.)"
+msgstr "Mini (ÎÐ)"
+
+#: ../src/itdb_device.c:314
+msgid "Shuffle (1st Gen.)"
+msgstr ""
+
+#: ../src/itdb_device.c:315
+msgid "Shuffle (2nd Gen.)"
+msgstr ""
+
+#: ../src/itdb_device.c:316
+msgid "Shuffle (3rd Gen.)"
+msgstr ""
+
+#: ../src/itdb_device.c:317
+#, fuzzy
+msgid "Nano (1st Gen.)"
+msgstr "Nano (ÎÐ)"
+
+#: ../src/itdb_device.c:318
+#, fuzzy
+msgid "Nano (2nd Gen.)"
+msgstr "Nano (ÎÐ)"
+
+#: ../src/itdb_device.c:319
+#, fuzzy
+msgid "Nano Video (3rd Gen.)"
+msgstr "Nano (ÎÐ)"
+
+#: ../src/itdb_device.c:320
+#, fuzzy
+msgid "Nano Video (4th Gen.)"
+msgstr "Nano (ÎÐ)"
+
+#: ../src/itdb_device.c:321
+#, fuzzy
+msgid "Video (1st Gen.)"
+msgstr "Video (Çò)"
+
+#: ../src/itdb_device.c:322
+#, fuzzy
+msgid "Video (2nd Gen.)"
+msgstr "Video (Çò)"
+
+#: ../src/itdb_device.c:323 ../src/itdb_device.c:324
+msgid "Classic"
+msgstr ""
+
+#: ../src/itdb_device.c:325
+msgid "Touch"
+msgstr ""
+
+#: ../src/itdb_device.c:326
+#, fuzzy
+msgid "iPhone"
+msgstr "·ÈÂÓÅÅÏÃ"
+
+#: ../src/itdb_device.c:327 ../src/itdb_device.c:328
+msgid "Unused"
+msgstr ""
+
+#: ../src/itdb_device.c:928
+#, c-format
+msgid "Could not open '%s' for writing."
+msgstr "'%s' ¤ò½ñ¤­¹þ¤ßÍѤ˳«¤¯¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó."
+
+#: ../src/itdb_device.c:937
+#, c-format
+msgid "Device directory does not exist."
+msgstr "¥Ç¥Ð¥¤¥¹¥Ç¥£¥ì¥¯¥È¥ê¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó."
+
+#: ../src/itdb_itunesdb.c:507
+#, c-format
+msgid "Illegal seek to offset %ld (length %ld) in file '%s'."
+msgstr "ÉÔÀµ¤Ê¥·¡¼¥¯: '%3$s', ¥ª¥Õ¥»¥Ã¥È %1$ld (Ťµ %2$ld)"
+
+#: ../src/itdb_itunesdb.c:910
+#, c-format
+msgid "Not a Play Counts file: '%s' (missing mhdp header)."
+msgstr "ºÆÀ¸²ó¿ô¥Õ¥¡¥¤¥ë¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó: '%s' (mhdp ¥Ø¥Ã¥À¤¬Ìµ¤¤)"
+
+#: ../src/itdb_itunesdb.c:925
+#, c-format
+msgid "Play Counts file ('%s'): header length smaller than expected (%d<96)."
+msgstr "ºÆÀ¸²ó¿ô¥Õ¥¡¥¤¥ë ('%s'): ¥Ø¥Ã¥À¤ÎŤµ¤¬Â­¤ê¤Þ¤»¤ó (%d<96)."
+
+#: ../src/itdb_itunesdb.c:939
+#, c-format
+msgid "Play Counts file ('%s'): entry length smaller than expected (%d<12)."
+msgstr "ºÆÀ¸²ó¿ô¥Õ¥¡¥¤¥ë ('%s'): ¥¨¥ó¥È¥ê¤ÎŤµ¤¬Â­¤ê¤Þ¤»¤ó (%d<12)."
+
+#: ../src/itdb_itunesdb.c:1014
+#, c-format
+msgid "iTunesStats file ('%s'): entry length smaller than expected (%d<18)."
+msgstr "iTunesStats ¥Õ¥¡¥¤¥ë ('%s'): ¥¨¥ó¥È¥ê¤ÎŤµ¤¬Â­¤ê¤Þ¤»¤ó (%d<18)."
+
+#: ../src/itdb_itunesdb.c:1333
+#, c-format
+msgid "iTunesDB corrupt: no MHOD at offset %ld in file '%s'."
+msgstr ""
+"iTunesDB ¤¬²õ¤ì¤Æ¤¤¤Þ¤¹: MHOD ¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó (¥Õ¥¡¥¤¥ë '%2$s', ¥ª¥Õ¥»¥Ã¥È %"
+"1$ld)."
+
+#: ../src/itdb_itunesdb.c:1519
+#, c-format
+msgid "Unknown smart rule action at %ld: %x. Trying to continue.\n"
+msgstr ""
+
+#: ../src/itdb_itunesdb.c:1550
+#, c-format
+msgid ""
+"Length of smart playlist rule field (%d) not as expected. Trying to continue "
+"anyhow.\n"
+msgstr ""
+"¥¹¥Þ¡¼¥È¥×¥ì¥¤¥ê¥¹¥È¤Î¥ë¡¼¥ë¤ÎŤµ (%d) ¤¬´üÂÔ¤µ¤ì¤ëŤµ¤È°Û¤Ê¤ê¤Þ¤¹. ½èÍý¤ò"
+"³¤±¤Þ¤¹.\n"
+
+#: ../src/itdb_itunesdb.c:1593
+#, c-format
+msgid "iTunesDB corrupt: no SLst at offset %ld in file '%s'."
+msgstr ""
+"iTunesDB ¤¬²õ¤ì¤Æ¤¤¤Þ¤¹: SLst ¤¬¸«ÉÕ¤«¤ê¤Þ¤»¤ó (¥Õ¥¡¥¤¥ë '%2$s', ¥ª¥Õ¥»¥Ã¥È %"
+"1$ld)."
+
+#: ../src/itdb_itunesdb.c:1606
+#, c-format
+msgid ""
+"Encountered unknown MHOD type (%d) while parsing the iTunesDB. Ignoring.\n"
+"\n"
+msgstr ""
+"iTunesDB ¤ÎÆɤ߹þ¤ßÃæ¤Ë, ̤ÃΤΠMHOD ¥¿¥¤¥× (%d) ¤òȯ¸«¤·¤Þ¤·¤¿. ̵»ë¤·¤Þ"
+"¤¹.\n"
+"\n"
+
+#: ../src/itdb_itunesdb.c:1689
+#, c-format
+msgid "iTunesDB corrupt: hunk length 0 for hunk at %ld in file '%s'."
+msgstr ""
+"iTunesDB ¤¬²õ¤ì¤Æ¤¤¤Þ¤¹: hunk ¤ÎŤµ¤¬ 0 ¤Ç¤¹ (¥Õ¥¡¥¤¥ë '%2$s', ¥ª¥Õ¥»¥Ã¥È %1"
+"$ld)."
+
+#: ../src/itdb_itunesdb.c:1702
+#, c-format
+msgid ""
+"iTunesDB corrupt: no section '%s' found in section '%s' starting at %ld."
+msgstr ""
+"iTunesDB ¤¬²õ¤ì¤Æ¤¤¤Þ¤¹: %3$ld ¤Î°ÌÃ֤ˤ¢¤ë¥»¥¯¥·¥ç¥ó '%2$s' ¤ÎÃæ¤Ë¥»¥¯¥·¥ç"
+"¥ó '%1$s' ¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó."
+
+#: ../src/itdb_itunesdb.c:1716
+#, c-format
+msgid ""
+"header length of '%s' smaller than expected (%d < %d) at offset %ld in file "
+"'%s'."
+msgstr ""
+"'%1$s' ¤Î¥Ø¥Ã¥À¤ÎŤµ¤¬Â­¤ê¤Þ¤»¤ó (%2$d < %3$d) (¥Õ¥¡¥¤¥ë '%5$s', ¥ª¥Õ¥»¥Ã¥È "
+"%4$ld)."
+
+#: ../src/itdb_itunesdb.c:1801
+#, c-format
+msgid "Not a iTunesDB: '%s' (missing mhdb header)."
+msgstr "iTunesDB ¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó: '%s' (mhdb ¥Ø¥Ã¥À¤¬Ìµ¤¤)."
+
+#: ../src/itdb_itunesdb.c:1818
+#, c-format
+msgid ""
+"iTunesDB ('%s'): header length of mhsd hunk smaller than expected (%d<32). "
+"Aborting."
+msgstr "iTunesDB ('%s'): mhsd ¤Î¥Ø¥Ã¥À¤ÎŤµ¤¬Â­¤ê¤Þ¤»¤ó (%d<32). Ãæ»ß¤·¤Þ¤¹."
+
+#: ../src/itdb_itunesdb.c:1839
+#, c-format
+msgid "iTunesDB '%s' corrupt: mhsd expected at %ld."
+msgstr "iTunesDB '%s' ¤¬²õ¤ì¤Æ¤¤¤Þ¤¹: mhsd ¤¬ %ld ¤Î°ÌÃ֤˸«¤Ä¤«¤ê¤Þ¤»¤ó."
+
+#: ../src/itdb_itunesdb.c:1944
+#, c-format
+msgid "Number of MHODs in mhip at %ld inconsistent in file '%s'."
+msgstr ""
+"mhip Ãæ¤Î MHOD ¤Î¿ô¤¬¿©¤¤°ã¤Ã¤Æ¤¤¤Þ¤¹ (¥Õ¥¡¥¤¥ë '%2$s', ¥ª¥Õ¥»¥Ã¥È %1$ld)."
+
+#: ../src/itdb_itunesdb.c:2121
+#, c-format
+msgid "Number of MHODs in mhyp at %ld inconsistent in file '%s'."
+msgstr ""
+"mhyp Ãæ¤Î MHOD ¤Î¿ô¤¬¿©¤¤°ã¤Ã¤Æ¤¤¤Þ¤¹ (¥Õ¥¡¥¤¥ë '%2$s', ¥ª¥Õ¥»¥Ã¥È %1$ld)."
+
+#: ../src/itdb_itunesdb.c:2131
+msgid "Master-PL"
+msgstr ""
+
+#: ../src/itdb_itunesdb.c:2135
+msgid "Podcasts"
+msgstr ""
+
+#: ../src/itdb_itunesdb.c:2137
+msgid "Playlist"
+msgstr "¥×¥ì¥¤¥ê¥¹¥È"
+
+#: ../src/itdb_itunesdb.c:2159
+#, c-format
+msgid ""
+"iTunesDB corrupt: number of mhip sections inconsistent in mhyp starting at %"
+"ld in file '%s'."
+msgstr ""
+"iTunesDB ¤¬²õ¤ì¤Æ¤¤¤Þ¤¹: mhyp Ãæ¤Î mhip ¥»¥¯¥·¥ç¥ó¤Î¿ô¤¬¿©¤¤°ã¤Ã¤Æ¤¤¤Þ¤¹ "
+"(¥Õ¥¡¥¤¥ë '%2$s', ¥ª¥Õ¥»¥Ã¥È %1$ld)."
+
+#: ../src/itdb_itunesdb.c:2180
+#, c-format
+msgid "Itdb_Track ID '%d' not found.\n"
+msgstr "Itdb_Track ID '%d' ¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó.\n"
+
+#: ../src/itdb_itunesdb.c:2524
+msgid "OTG Playlist"
+msgstr "OTG ¥×¥ì¥¤¥ê¥¹¥È"
+
+#: ../src/itdb_itunesdb.c:2542
+#, c-format
+msgid "Not a OTG playlist file: '%s' (missing mhpo header)."
+msgstr "OTG ¥×¥ì¥¤¥ê¥¹¥È¤Î¥Õ¥¡¥¤¥ë¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó: '%s' (mhpo ¥Ø¥Ã¥À¤¬Ìµ¤¤)."
+
+#: ../src/itdb_itunesdb.c:2556
+#, c-format
+msgid "OTG playlist file ('%s'): header length smaller than expected (%d<20)."
+msgstr "OTG ¥×¥ì¥¤¥ê¥¹¥È¥Õ¥¡¥¤¥ë ('%s'): ¥Ø¥Ã¥À¤ÎŤµ¤¬Â­¤ê¤Þ¤»¤ó (%d<20)."
+
+#: ../src/itdb_itunesdb.c:2568
+#, fuzzy, c-format
+msgid "OTG playlist file ('%s'): entry length smaller than expected (%d<4)."
+msgstr "OTG ¥×¥ì¥¤¥ê¥¹¥È¥Õ¥¡¥¤¥ë ('%s'): ¥¨¥ó¥È¥ê¤ÎŤµ¤¬Â­¤ê¤Þ¤»¤ó (%d<4)."
+
+#: ../src/itdb_itunesdb.c:2603
+#, c-format
+msgid "OTG playlist file '%s': reference to non-existent track (%d)."
+msgstr ""
+"OTG ¥×¥ì¥¤¥ê¥¹¥È¥Õ¥¡¥¤¥ë ('%s'): ¸ºß¤·¤Ê¤¤¶ÊÈÖ¹æ (%d) ¤Ø¤Î»²¾È¤¬¤¢¤ê¤Þ¤¹."
+
+#: ../src/itdb_itunesdb.c:2648
+#, c-format
+msgid "OTG Playlist %d"
+msgstr "OTG ¥×¥ì¥¤¥ê¥¹¥È %d"
+
+#. this should not be -- issue warning
+#: ../src/itdb_itunesdb.c:2716
+msgid ""
+"iTunesDB corrupt: number of tracks (mhit hunks) inconsistent. Trying to "
+"continue.\n"
+msgstr ""
+"iTunesDB ¤¬²õ¤ì¤Æ¤¤¤Þ¤¹: ¶Ê¿ô (mhit ¤Î¿ô) ¤¬¿©¤¤°ã¤Ã¤Æ¤¤¤Þ¤¹. ½èÍý¤ò³¤±¤Þ"
+"¤¹.\n"
+
+#. this should not be -- issue warning
+#: ../src/itdb_itunesdb.c:2779
+msgid ""
+"iTunesDB possibly corrupt: number of playlists (mhyp hunks) inconsistent. "
+"Trying to continue.\n"
+msgstr ""
+"iTunesDB ¤¬Â¿Ê¬²õ¤ì¤Æ¤¤¤Þ¤¹: ¥×¥ì¥¤¥ê¥¹¥È¤Î¿ô (mhyp ¤Î¿ô) ¤¬¿©¤¤°ã¤Ã¤Æ¤¤¤Þ"
+"¤¹. ½èÍý¤ò³¤±¤Þ¤¹.\n"
+
+#: ../src/itdb_itunesdb.c:2826
+#, c-format
+msgid ""
+"iTunesDB '%s' corrupt: Could not find tracklist (no mhsd type 1 section "
+"found)"
+msgstr ""
+"iTunesDB '%s' ¤¬²õ¤ì¤Æ¤¤¤Þ¤¹: ¶Ê¥ê¥¹¥È¤¬¸«ÉÕ¤«¤ê¤Þ¤»¤ó. (mhsd ¥¿¥¤¥× 1 ¥»¥¯"
+"¥·¥ç¥ó¤¬¸«¤Ä¤«¤é¤Ê¤¤)"
+
+#: ../src/itdb_itunesdb.c:2855
+#, c-format
+msgid ""
+"iTunesDB '%s' corrupt: Could not find playlists (no mhsd type 2 or type 3 "
+"sections found)"
+msgstr ""
+"iTunesDB '%s' ¤¬²õ¤ì¤Æ¤¤¤Þ¤¹: ¥×¥ì¥¤¥ê¥¹¥È¤¬¸«ÉÕ¤«¤ê¤Þ¤»¤ó. (mhsd ¥¿¥¤¥× 2 "
+"¤È ¥¿¥¤¥× 3 ¤Î¥»¥¯¥·¥ç¥ó¤¬¸«¤Ä¤«¤é¤Ê¤¤)"
+
+#: ../src/itdb_itunesdb.c:2877
+#, c-format
+msgid "iTunes directory not found: '%s' (or similar)."
+msgstr "iTunes ¥Ç¥£¥ì¥¯¥È¥ê¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó: '%s' (¤Ê¤É)."
+
+#: ../src/itdb_itunesdb.c:2894
+#, c-format
+msgid "Music directory not found: '%s' (or similar)."
+msgstr "Music ¥Ç¥£¥ì¥¯¥È¥ê¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó: '%s' (¤Ê¤É)."
+
+#: ../src/itdb_itunesdb.c:2912
+#, c-format
+msgid "Control directory not found: '%s' (or similar)."
+msgstr "Control ¥Ç¥£¥ì¥¯¥È¥ê¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó: '%s' (¤Ê¤É)."
+
+#: ../src/itdb_itunesdb.c:3033
+#, c-format
+msgid "File not found: '%s'."
+msgstr "¥Õ¥¡¥¤¥ë¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó: '%s'."
+
+#: ../src/itdb_itunesdb.c:5533
+#, c-format
+msgid "Path not found: '%s' (or similar)."
+msgstr "¥Ñ¥¹¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó: '%s' (¤Ê¤É)."
+
+#: ../src/itdb_itunesdb.c:5742
+#, c-format
+msgid "Error renaming '%s' to '%s' (%s)."
+msgstr "'%s' ¤ò '%s' ¤ËÊѹ¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó (%s)."
+
+#: ../src/itdb_itunesdb.c:5759 ../src/itdb_itunesdb.c:5776
+#: ../src/itdb_itunesdb.c:5793
+#, c-format
+msgid "Error removing '%s' (%s)."
+msgstr "'%s' ¤Îºï½üÃæ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿ (%s)."
+
+#: ../src/itdb_itunesdb.c:5960 ../src/itdb_itunesdb.c:6133
+#, fuzzy, c-format
+msgid "Mountpoint not set."
+msgstr "¥Þ¥¦¥ó¥È¾ì½ê¤¬ÀßÄꤵ¤ì¤Æ¤¤¤Þ¤»¤ó.\n"
+
+#: ../src/itdb_itunesdb.c:6000
+#, c-format
+msgid "No 'F..' directories found in '%s'."
+msgstr "'F..' ¥Ç¥£¥ì¥¯¥È¥ê¤¬ '%s' ¤ÎÃæ¤Ë¤¢¤ê¤Þ¤»¤ó."
+
+#: ../src/itdb_itunesdb.c:6021
+#, c-format
+msgid "Path not found: '%s'."
+msgstr "¥Ñ¥¹¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó: '%s'."
+
+#: ../src/itdb_itunesdb.c:6142
+#, fuzzy, c-format
+msgid "'%s' could not be accessed (%s)."
+msgstr "¥Õ¥¡¥¤¥ë '%s' ¤Ë¥¢¥¯¥»¥¹¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿."
+
+#: ../src/itdb_itunesdb.c:6152
+#, c-format
+msgid ""
+"Destination file '%s' does not appear to be on the iPod mounted at '%s'."
+msgstr ""
+
+#: ../src/itdb_itunesdb.c:6360
+#, c-format
+msgid "Error opening '%s' for reading (%s)."
+msgstr "'%s' ¤òÆɤ߹þ¤ßÍѤ˳«¤¯¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó (%s)."
+
+#: ../src/itdb_itunesdb.c:6372
+#, c-format
+msgid "Error opening '%s' for writing (%s)."
+msgstr "'%s' ¤ò½ñ¤­¹þ¤ßÍѤ˳«¤¯¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó (%s)."
+
+#: ../src/itdb_itunesdb.c:6388
+#, c-format
+msgid "Error while reading from '%s' (%s)."
+msgstr "'%s' ¤ÎÆɤ߹þ¤ßÃæ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿ (%s)."
+
+#: ../src/itdb_itunesdb.c:6403
+#, c-format
+msgid "Error while writing to '%s' (%s)."
+msgstr "'%s' ¤Î½ñ¤­¹þ¤ßÃæ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿ (%s)."
+
+#: ../src/itdb_itunesdb.c:6416 ../src/itdb_itunesdb.c:6426
+#, c-format
+msgid "Error when closing '%s' (%s)."
+msgstr "'%s' ¤òÊĤ¸¤ëºÝ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿ (%s)."
+
+#: ../src/itdb_itunesdb.c:6856
+msgid "iPod"
+msgstr ""
+
+#: ../src/itdb_itunesdb.c:7178
+#, c-format
+msgid "Problem creating iPod directory or file: '%s'."
+msgstr "iPod ¥Ç¥£¥ì¥¯¥È¥ê¤ÎºîÀ®¤Þ¤¿¤Ï¥Õ¥¡¥¤¥ë '%s' ¤ÎºîÀ®¤Ë¼ºÇÔ¤·¤Þ¤·¤¿."
+
+#: ../src/itdb_photoalbum.c:111
+#, c-format
+msgid "Photos directory not found: '%s' (or similar)."
+msgstr "Photos ¥Ç¥£¥ì¥¯¥È¥ê¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó: '%s' (¤Ê¤É)."
+
+#: ../src/itdb_photoalbum.c:266 ../src/itdb_photoalbum.c:460
+msgid "Photo Library"
+msgstr "¼Ì¿¿¥é¥¤¥Ö¥é¥ê"
+
+#: ../src/itdb_photoalbum.c:386
+#, c-format
+msgid "You need to specify the iPod model used before photos can be added."
+msgstr ""
+"¼Ì¿¿¤òÄɲ乤ëÁ°¤Ë, »ÈÍѤ·¤Æ¤¤¤ë iPod ¤Î¥â¥Ç¥ë¤òÀßÄꤹ¤ëɬÍפ¬¤¢¤ê¤Þ¤¹."
+
+#: ../src/itdb_photoalbum.c:407
+#, c-format
+msgid ""
+"Your iPod does not seem to support photos. Maybe you need to specify the "
+"correct iPod model number? It is currently set to 'x%s' (%s/%s)."
+msgstr ""
+"¤ª»È¤¤¤Î iPod ¤Ï¼Ì¿¿¤Îɽ¼¨¤¬¤Ç¤­¤Þ¤»¤ó. ¤ª¤½¤é¤¯Àµ¤·¤¤ iPod ¤Î¥â¥Ç¥ë¤òÀßÄꤷ"
+"¤Æ¤¤¤Ê¤¤¤â¤Î¤È»×¤ï¤ì¤Þ¤¹. ¸½ºß¥â¥Ç¥ëÈÖ¹æ¤Ï 'x%s' ¤ËÀßÄꤵ¤ì¤Æ¤¤¤Þ¤¹ (%s%s)."
+
+#: ../src/itdb_photoalbum.c:419
+#, c-format
+msgid "Could not access file '%s'. Photo not added."
+msgstr "¥Õ¥¡¥¤¥ë '%s' ¤Ë¥¢¥¯¥»¥¹¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿. ¼Ì¿¿¤ÏÄɲ䵤ì¤Þ¤»¤ó."
+
+#: ../src/itdb_photoalbum.c:448
+#, c-format
+msgid ""
+"Unexpected error in itdb_photodb_add_photo_internal() while adding photo, "
+"please report."
+msgstr ""
+"¼Ì¿¿¤ÎÄɲÃÃæ¤Ë itdb_photodb_add_photo_internal() Æâ¤Çͽ´ü¤»¤Ì¥¨¥é¡¼¤¬È¯À¸¤·¤Þ"
+"¤·¤¿. ³«È¯¼Ô¤Ø¤ÎÊó¹ð¤ò¤ª´ê¤¤¤·¤Þ¤¹."
+
+#: ../src/itdb_photoalbum.c:468
+#, c-format
+msgid ""
+"Library compiled without gdk-pixbuf support. Picture support is disabled."
+msgstr ""
+"¤³¤Î¥½¥Õ¥È¤¬ gdkpixbuf ¤ò»È¤ï¤º¤Ë¥³¥ó¥Ñ¥¤¥ë¤µ¤ì¤Æ¤¤¤Þ¤¹. ¼Ì¿¿¤Î¥µ¥Ý¡¼¥È¤Ï̵¸ú"
+"¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹."
+
+#. New action!
+#: ../src/itdb_playlist.c:78
+#, c-format
+msgid "Unknown action (%d) in smart playlist will be ignored.\n"
+msgstr "¥¹¥Þ¡¼¥È¥×¥ì¥¤¥ê¥¹¥ÈÆâ¤Î̤ÃΤΥ¢¥¯¥·¥ç¥ó (%d) ¤Ï̵»ë¤µ¤ì¤Þ¤¹.\n"
+
+#: ../src/itdb_thumb.c:326
+#, c-format
+msgid "Illegal filename: '%s'.\n"
+msgstr "ÉÔÀµ¤Ê¥Õ¥¡¥¤¥ë̾: '%s'.\n"
+
+#: ../src/itdb_thumb.c:331
+#, c-format
+msgid "Mountpoint not set.\n"
+msgstr "¥Þ¥¦¥ó¥È¾ì½ê¤¬ÀßÄꤵ¤ì¤Æ¤¤¤Þ¤»¤ó.\n"
+
+#: ../tests/test-photos.c:41
+#, c-format
+msgid ""
+"Usage to add photos:\n"
+"  %s add <mountpoint> <albumname> [<filename(s)>]\n"
+"  <albumname> should be set to 'NULL' to add photos to the master photo "
+"album\n"
+"  (Photo Library) only. If you don't specify any filenames an empty album "
+"will\n"
+"  be created.\n"
+msgstr ""
+"¼Ì¿¿¤òÄɲ乤ë:\n"
+"  %s add <¥Þ¥¦¥ó¥È¾ì½ê> <¥¢¥ë¥Ð¥à̾> [<¥Õ¥¡¥¤¥ë̾>]\n"
+"  ¥Þ¥¹¥¿¡¼¥¢¥ë¥Ð¥à¤Ë¤Î¤ß¼Ì¿¿¤òÄɲ乤ë¾ì¹ç¤Ï, <albumname> ¤ò 'NULL' ¤È¤·¤Æ¤¯"
+"¤À\n"
+"  ¤µ¤¤. ¥Õ¥¡¥¤¥ë̾¤ò»ØÄꤷ¤Ê¤¤¤È, ¶õ¤Î¥¢¥ë¥Ð¥à¤¬ºîÀ®¤µ¤ì¤Þ¤¹.\n"
+
+#: ../tests/test-photos.c:42
+#, c-format
+msgid ""
+"Usage to dump all photos to <output_dir>:\n"
+"  %s dump <mountpoint> <output_dir>\n"
+msgstr ""
+"¤¹¤Ù¤Æ¤Î¼Ì¿¿¤ò <½ÐÎÏÀè¥Ç¥£¥ì¥¯¥È¥ê> ¤ËÊݸ¤¹¤ë:\n"
+"  %s dump <¥Þ¥¦¥ó¥È¾ì½ê> <½ÐÎÏÀè¥Ç¥£¥ì¥¯¥È¥ê>\n"
+
+#: ../tests/test-photos.c:43
+#, c-format
+msgid ""
+"Usage to list all photos IDs to stdout:\n"
+"  %s list <mountpoint>\n"
+msgstr ""
+"¤¹¤Ù¤Æ¤Î¼Ì¿¿¤Î ID ¤òɸ½à½ÐÎϤ˽ÐÎϤ¹¤ë:\n"
+"  %s list <¥Þ¥¦¥ó¥È¾ì½ê>\n"
+
+#: ../tests/test-photos.c:44
+#, fuzzy, c-format
+msgid ""
+"Usage to remove photo IDs from Photo Library:\n"
+"  %s remove <mountpoint> <albumname> [<ID(s)>]\n"
+"  <albumname> should be set to 'NULL' to remove photos from the iPod\n"
+"  altogether. If you don't specify any IDs, the photoalbum will be removed\n"
+"  instead.\n"
+"  WARNING: IDs may change when writing the PhotoDB file.\n"
+msgstr ""
+"¼Ì¿¿ ID ¤ò ¥é¥¤¥Ö¥é¥ê¤«¤éºï½ü¤¹¤ë:\n"
+"  %s remove <¥Þ¥¦¥ó¥È¾ì½ê> <¥¢¥ë¥Ð¥à̾> [<ID(s)>]\n"
+"  <¥¢¥ë¥Ð¥à̾> ¤ò 'NULL' ¤Ë¤¹¤ë¤È¤½¤Î¼Ì¿¿¤ò iPod ¤«¤é´°Á´¤Ëºï½ü¤·¤Þ¤¹.\n"
+"  ID ¤ò»ØÄꤷ¤Ê¤¤¤È, ¥¢¥ë¥Ð¥à¤½¤Î¤â¤Î¤òºï½ü¤·¤Þ¤¹.\n"
+"  ·Ù¹ð: PhotoDB ¥Õ¥¡¥¤¥ë¤ò¹¹¿·¤¹¤ë¤È ID ¤âÊѲ½¤·¤Æ¤¤¤ë²ÄǽÀ­¤¬¤¢¤ê¤Þ¤¹.\n"
+
+#: ../tests/test-photos.c:119
+#, c-format
+msgid "Wrong number of command line arguments.\n"
+msgstr "¥³¥Þ¥ó¥É¥é¥¤¥ó¤Î°ú¿ô¤Î¿ô¤¬Àµ¤·¤¯¤¢¤ê¤Þ¤»¤ó.\n"
+
+#: ../tests/test-photos.c:128
+#, c-format
+msgid "Error creating '%s' (mkdir)\n"
+msgstr "'%s' ¤òºîÀ®¤Ç¤­¤Þ¤»¤ó (mkdir)\n"
+
+#: ../tests/test-photos.c:134
+#, c-format
+msgid "Error: '%s' is not a directory\n"
+msgstr "'%s' ¤Ï¥Ç¥£¥ì¥¯¥È¥ê¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó\n"
+
+#: ../tests/test-photos.c:143 ../tests/test-photos.c:177
+#: ../tests/test-photos.c:306
+#, c-format
+msgid "Error reading iPod photo database (%s).\n"
+msgstr "iPod ¤Î¼Ì¿¿¥Ç¡¼¥¿¥Ù¡¼¥¹¤òÆɤ߹þ¤á¤Þ¤»¤ó (%s).\n"
+
+#: ../tests/test-photos.c:149 ../tests/test-photos.c:183
+#: ../tests/test-photos.c:313
+#, c-format
+msgid "Error reading iPod photo database.\n"
+msgstr "iPod ¤Î¼Ì¿¿¥Ç¡¼¥¿¥Ù¡¼¥¹¤òÆɤ߹þ¤á¤Þ¤»¤ó.\n"
+
+#: ../tests/test-photos.c:167 ../tests/test-photos.c:226
+#: ../tests/test-photos.c:296 ../tests/test-photos.c:379
+#, c-format
+msgid "Insufficient number of command line arguments.\n"
+msgstr "¥³¥Þ¥ó¥É¥é¥¤¥ó¤Î°ú¿ô¤Î¿ô¤¬Àµ¤·¤¯¤¢¤ê¤Þ¤»¤ó.\n"
+
+#: ../tests/test-photos.c:194
+msgid "<Unnamed>"
+msgstr "<̵̾¤·>"
+
+#: ../tests/test-photos.c:209
+#, c-format
+msgid "<No members>\n"
+msgstr ""
+
+#: ../tests/test-photos.c:236
+#, c-format
+msgid ""
+"Error reading iPod photo database (%s).\n"
+"Will attempt to create a new database.\n"
+msgstr ""
+"iPod ¤Î¼Ì¿¿¥Ç¡¼¥¿¥Ù¡¼¥¹¤òÆɤ߹þ¤á¤Þ¤»¤ó (%s).\n"
+"¿·µ¬¤Ë¥Ç¡¼¥¿¥Ù¡¼¥¹¤òºîÀ®¤·¤Þ¤¹.\n"
+
+#: ../tests/test-photos.c:242
+#, c-format
+msgid ""
+"Error reading iPod photo database, will attempt to create a new database\n"
+msgstr ""
+"iPod ¤Î¼Ì¿¿¥Ç¡¼¥¿¥Ù¡¼¥¹¤òÆɤ߹þ¤á¤Þ¤»¤ó. ¿·µ¬¤Ë¥Ç¡¼¥¿¥Ù¡¼¥¹¤òºîÀ®¤·¤Þ¤¹.\n"
+
+#: ../tests/test-photos.c:267
+#, c-format
+msgid "Error adding photo (%s) to photo database: %s\n"
+msgstr "¼Ì¿¿ (%s) ¤ÎÄɲä˼ºÇÔ¤·¤Þ¤·¤¿: %s\n"
+
+#: ../tests/test-photos.c:324
+#, c-format
+msgid "Specified album '%s' not found. Aborting.\n"
+msgstr "»ØÄꤵ¤ì¤¿¥¢¥ë¥Ð¥à '%s' ¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó. Ãæ»ß¤·¤Þ¤¹.\n"
+
+#: ../tests/test-photos.c:336
+#, c-format
+msgid "Cannot remove Photo Library playlist. Aborting.\n"
+msgstr "¼Ì¿¿¥é¥¤¥Ö¥é¥ê¤òºï½ü¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿. Ãæ»ß¤·¤Þ¤¹.\n"
+
+#: ../tests/test-photos.c:357
+#, fuzzy, c-format
+msgid "Warning: could not find photo with ID <%d>. Skipping...\n"
+msgstr "¼Ì¿¿ ID <%d> ¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó. Èô¤Ð¤·¤Þ¤¹...\n"
+
+#: ../tests/test-photos.c:403
+#, c-format
+msgid "Unknown command '%s'\n"
+msgstr "̤ÃΤΥ³¥Þ¥ó¥É '%s'\n"
+
+#: ../tests/test-init-ipod.c:66
+#, c-format
+msgid "Error initialising iPod: %s\n"
+msgstr ""
+
+#: ../tests/test-init-ipod.c:73
+#, c-format
+msgid "Error initialising iPod, unknown error\n"
+msgstr ""
+
+#: ../tools/ipod-time-sync.c:37
+#, c-format
+msgid "usage: %s <device> [timezone]\n"
+msgstr ""
+
+#: ../tools/read-sysinfoextended-sgutils.c:39
+#, c-format
+msgid "usage: %s <device> <mountpoint>\n"
+msgstr ""
+
+#: ../tools/read-sysinfoextended-sgutils.c:45
+#, c-format
+msgid "Couldn't read xml sysinfo from %s\n"
+msgstr ""
+
+#: ../tools/read-sysinfoextended-sgutils.c:56
+#, c-format
+msgid "Couldn't resolve Device directory path on %s"
+msgstr ""
+
+#: ../tools/read-sysinfoextended-sgutils.c:64
+#, c-format
+msgid "Couldn't resolve SysInfoExtended path on %s"
+msgstr ""
+
+#: ../tools/read-sysinfoextended-sgutils.c:74
+#, c-format
+msgid "Couldn't write SysInfoExtended to %s"
+msgstr ""
+
+#, fuzzy
+#~ msgid "Could not find artwork entry (mhii id: %u) for track (dbid: %s).\n"
+#~ msgstr "¥¢¡¼¥È¥ï¡¼¥¯¤ËÂбþ¤¹¤ë¶Ê (dbid: %s) ¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó.\n"
+
+#~ msgid "First Generation"
+#~ msgstr "1G"
+
+#~ msgid "Second Generation"
+#~ msgstr "2G"
+
+#~ msgid "Third Generation"
+#~ msgstr "3G"
+
+#~ msgid "Fourth Generation"
+#~ msgstr "4G"
+
+#~ msgid "Fifth Generation"
+#~ msgstr "5G"
+
+#~ msgid "Sixth Generation"
+#~ msgstr "6G"
+
+#~ msgid "Opening of '%s' for writing failed (%s)."
+#~ msgstr "'%s' ¤ò½ñ¤­¹þ¤ßÍѤ˳«¤¯¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó (%s)."
+
+#~ msgid "Writing to '%s' failed (%s)."
+#~ msgstr "'%s'¤Î½ñ¤­¹þ¤ß¤Ë¼ºÇÔ¤·¤Þ¤·¤¿ (%s)."
+
+#~ msgid "Cannot write mhod of type %d\n"
+#~ msgstr "mhod ¥¿¥¤¥× %d ¤¬½ñ¤­¹þ¤á¤Þ¤»¤ó.\n"
+
+#~ msgid "Error reading iPod photo database"
+#~ msgstr "iPod ¤Î¼Ì¿¿¥Ç¡¼¥¿¥Ù¡¼¥¹¤òÆɤ߹þ¤á¤Þ¤»¤ó"

Added: libgpod/trunk/libgpod/branches/upstream/current/po/ro.po
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/po/ro.po	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/po/ro.po	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,906 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: gtkpod\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-04-03 16:08-0400\n"
+"PO-Revision-Date: 2009-01-14 02:11+0200\n"
+"Last-Translator: alexef <alex at eftimie.ro>\n"
+"Language-Team: Romanian <tradu at softwareliber.ro>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms:  nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < "
+"20)) ? 1 : 2;\n"
+"X-Generator: Narro 0.9.3 on http://tradu.softwareliber.ro\n"
+
+#: ../src/db-artwork-parser.c:140
+#, fuzzy, c-format
+msgid "Unexpected mhod string type: %d\n"
+msgstr "Tip ÅŸir mhod3 nepotrivit: %d\n"
+
+#: ../src/db-artwork-parser.c:460
+#, c-format
+msgid "Unexpected mhsd index: %d\n"
+msgstr "Index mhsd nepotrivit: %d\n"
+
+#: ../src/db-artwork-parser.c:540
+#, c-format
+msgid "Could not find corresponding track (dbid: %s) for artwork entry.\n"
+msgstr ""
+"Nu am putut găsi piesa corespunzpătoare (dbid: %s) pentru obiectul artwork.\n"
+
+#: ../src/db-artwork-parser.c:548
+#, c-format
+msgid "iTunesDB and ArtworkDB artwork sizes inconsistent (%d+%d != %d)\n"
+msgstr ""
+"Dimesniunile artwork iTunesDB ÅŸi ArtworkDB sunt inconsistente (%d+%d != %d)\n"
+
+#: ../src/db-image-parser.c:91
+#, fuzzy, c-format
+msgid "Unexpected image type in mhni: %d, offset: %d\n"
+msgstr "Tip imagine nepotrivit în mhni: size: %ux%u (%d), offset: %d\n"
+
+#: ../src/itdb_artwork.c:163
+#, c-format
+msgid "Could not access file '%s'."
+msgstr "Nu am putut accesa fiÅŸierul '%s'."
+
+#: ../src/itdb_artwork.c:181 ../src/itdb_artwork.c:241
+#: ../src/itdb_artwork.c:298
+#, c-format
+msgid "Artwork support not compiled into libgpod."
+msgstr "Suportul pentru artwork nu a fost compilat în libgpod."
+
+#: ../src/itdb_artwork.c:668
+#, c-format
+msgid "Could not find on iPod: '%s'\n"
+msgstr "Nu am putut găsi pe iPod: '%s'\n"
+
+#: ../src/itdb_artwork.c:828
+#, fuzzy, c-format
+msgid ""
+"Unable to retrieve thumbnail (appears to be on iPod, but no image info "
+"available): filename: '%s'\n"
+msgstr ""
+"Nu am putut obţine miniatura (apare ca fiind pe iPod, dar nu sunt "
+"disponibile informaţii despre imagine): tip: %d, nume fişier: '%s'\n"
+
+#: ../src/itdb_device.c:263
+msgid "Invalid"
+msgstr "Nevalid"
+
+#: ../src/itdb_device.c:264 ../src/itdb_device.c:305
+msgid "Unknown"
+msgstr "Necunoscut"
+
+#: ../src/itdb_device.c:265
+msgid "Color"
+msgstr "Color"
+
+#: ../src/itdb_device.c:266
+msgid "Color U2"
+msgstr "Color U2"
+
+#: ../src/itdb_device.c:267
+msgid "Grayscale"
+msgstr "CenuÅŸiu"
+
+#: ../src/itdb_device.c:268
+msgid "Grayscale U2"
+msgstr "CenuÅŸiu U2"
+
+#: ../src/itdb_device.c:269
+msgid "Mini (Silver)"
+msgstr "Mini (Argintiu)"
+
+#: ../src/itdb_device.c:270
+msgid "Mini (Blue)"
+msgstr "Mini (Albastru)"
+
+#: ../src/itdb_device.c:271
+msgid "Mini (Pink)"
+msgstr "Mini (Roz)"
+
+#: ../src/itdb_device.c:272
+msgid "Mini (Green)"
+msgstr "Mini (Verde)"
+
+#: ../src/itdb_device.c:273
+msgid "Mini (Gold)"
+msgstr "Mini (Auriu)"
+
+#: ../src/itdb_device.c:274
+msgid "Shuffle"
+msgstr "Amestecat"
+
+#: ../src/itdb_device.c:275
+msgid "Nano (White)"
+msgstr "Nano (Alb)"
+
+#: ../src/itdb_device.c:276
+msgid "Nano (Black)"
+msgstr "Nano (Negru)"
+
+#: ../src/itdb_device.c:277
+msgid "Video (White)"
+msgstr "Video (Alb)"
+
+#: ../src/itdb_device.c:278
+msgid "Video (Black)"
+msgstr "Video (Negru)"
+
+#: ../src/itdb_device.c:279
+msgid "Mobile (1)"
+msgstr "Mobil (1)"
+
+#: ../src/itdb_device.c:280
+msgid "Video U2"
+msgstr "Video U2"
+
+#: ../src/itdb_device.c:281
+msgid "Nano (Silver)"
+msgstr "Nano (Argintiu)"
+
+#: ../src/itdb_device.c:282
+msgid "Nano (Blue)"
+msgstr "Nano (Albastru)"
+
+#: ../src/itdb_device.c:283
+msgid "Nano (Green)"
+msgstr "Nano (Verde)"
+
+#: ../src/itdb_device.c:284
+msgid "Nano (Pink)"
+msgstr "Nano (Roz)"
+
+#: ../src/itdb_device.c:285
+#, fuzzy
+msgid "Nano (Red)"
+msgstr "Nano (Albastru)"
+
+#: ../src/itdb_device.c:286
+#, fuzzy
+msgid "Nano (Yellow)"
+msgstr "Nano (Albastru)"
+
+#: ../src/itdb_device.c:287
+#, fuzzy
+msgid "Nano (Purple)"
+msgstr "Nano (Albastru)"
+
+#: ../src/itdb_device.c:288
+#, fuzzy
+msgid "Nano (Orange)"
+msgstr "Nano (Verde)"
+
+#: ../src/itdb_device.c:289
+#, fuzzy
+msgid "iPhone (1)"
+msgstr "Mobil (1)"
+
+#: ../src/itdb_device.c:290
+#, fuzzy
+msgid "Shuffle (Silver)"
+msgstr "Mini (Argintiu)"
+
+#: ../src/itdb_device.c:291
+#, fuzzy
+msgid "Shuffle (Pink)"
+msgstr "Amestecat"
+
+#: ../src/itdb_device.c:292
+#, fuzzy
+msgid "Shuffle (Blue)"
+msgstr "Amestecat"
+
+#: ../src/itdb_device.c:293
+#, fuzzy
+msgid "Shuffle (Green)"
+msgstr "Amestecat"
+
+#: ../src/itdb_device.c:294
+#, fuzzy
+msgid "Shuffle (Orange)"
+msgstr "Amestecat"
+
+#: ../src/itdb_device.c:295
+#, fuzzy
+msgid "Shuffle (Purple)"
+msgstr "Amestecat"
+
+#: ../src/itdb_device.c:296
+#, fuzzy
+msgid "Shuffle (Red)"
+msgstr "Amestecat"
+
+#: ../src/itdb_device.c:297
+#, fuzzy
+msgid "Classic (Silver)"
+msgstr "Mini (Argintiu)"
+
+#: ../src/itdb_device.c:298
+#, fuzzy
+msgid "Classic (Black)"
+msgstr "Nano (Negru)"
+
+#: ../src/itdb_device.c:299
+#, fuzzy
+msgid "Touch (Black)"
+msgstr "Nano (Negru)"
+
+#: ../src/itdb_device.c:306
+msgid "Regular (1st Gen.)"
+msgstr ""
+
+#: ../src/itdb_device.c:307
+msgid "Regular (2nd Gen.)"
+msgstr ""
+
+#: ../src/itdb_device.c:308
+msgid "Regular (3rd Gen.)"
+msgstr ""
+
+#: ../src/itdb_device.c:309
+msgid "Regular (4th Gen.)"
+msgstr ""
+
+#: ../src/itdb_device.c:310
+msgid "Photo"
+msgstr ""
+
+#: ../src/itdb_device.c:311
+#, fuzzy
+msgid "Mobile Phones"
+msgstr "Telefon mobil"
+
+#: ../src/itdb_device.c:312
+#, fuzzy
+msgid "Mini (1st Gen.)"
+msgstr "Mini (Verde)"
+
+#: ../src/itdb_device.c:313
+#, fuzzy
+msgid "Mini (2nd Gen.)"
+msgstr "Mini (Verde)"
+
+#: ../src/itdb_device.c:314
+msgid "Shuffle (1st Gen.)"
+msgstr ""
+
+#: ../src/itdb_device.c:315
+msgid "Shuffle (2nd Gen.)"
+msgstr ""
+
+#: ../src/itdb_device.c:316
+msgid "Shuffle (3rd Gen.)"
+msgstr ""
+
+#: ../src/itdb_device.c:317
+#, fuzzy
+msgid "Nano (1st Gen.)"
+msgstr "Nano (Verde)"
+
+#: ../src/itdb_device.c:318
+#, fuzzy
+msgid "Nano (2nd Gen.)"
+msgstr "Nano (Verde)"
+
+#: ../src/itdb_device.c:319
+#, fuzzy
+msgid "Nano Video (3rd Gen.)"
+msgstr "Nano (Verde)"
+
+#: ../src/itdb_device.c:320
+#, fuzzy
+msgid "Nano Video (4th Gen.)"
+msgstr "Nano (Verde)"
+
+#: ../src/itdb_device.c:321
+#, fuzzy
+msgid "Video (1st Gen.)"
+msgstr "Video (Alb)"
+
+#: ../src/itdb_device.c:322
+#, fuzzy
+msgid "Video (2nd Gen.)"
+msgstr "Video (Alb)"
+
+#: ../src/itdb_device.c:323 ../src/itdb_device.c:324
+msgid "Classic"
+msgstr ""
+
+#: ../src/itdb_device.c:325
+msgid "Touch"
+msgstr ""
+
+#: ../src/itdb_device.c:326
+#, fuzzy
+msgid "iPhone"
+msgstr "Telefon mobil"
+
+#: ../src/itdb_device.c:327 ../src/itdb_device.c:328
+msgid "Unused"
+msgstr ""
+
+#: ../src/itdb_device.c:928
+#, c-format
+msgid "Could not open '%s' for writing."
+msgstr "Nu am putut deschide '%s' pentru scriere."
+
+#: ../src/itdb_device.c:937
+#, c-format
+msgid "Device directory does not exist."
+msgstr "Dosarul dispozitivului nu există"
+
+#: ../src/itdb_itunesdb.c:507
+#, c-format
+msgid "Illegal seek to offset %ld (length %ld) in file '%s'."
+msgstr "Căutare ilegală la deplasarea %ld (lungime %ld) în fişierul '%s'."
+
+#: ../src/itdb_itunesdb.c:910
+#, c-format
+msgid "Not a Play Counts file: '%s' (missing mhdp header)."
+msgstr "Nu un fişier de contorizare a redărilor: '%s' (lipseşte antetul mhdp)."
+
+#: ../src/itdb_itunesdb.c:925
+#, c-format
+msgid "Play Counts file ('%s'): header length smaller than expected (%d<96)."
+msgstr ""
+"Fişier de contorizare a redărilor ('%s'): lungimea antetului mai mică decât "
+"este aÅŸteptat (%d<96)."
+
+#: ../src/itdb_itunesdb.c:939
+#, c-format
+msgid "Play Counts file ('%s'): entry length smaller than expected (%d<12)."
+msgstr ""
+"Fişier de contorizare a redărilor ('%s'): lungimea intrării mai mică decât "
+"este aÅŸteptat (%d<96)."
+
+#: ../src/itdb_itunesdb.c:1014
+#, c-format
+msgid "iTunesStats file ('%s'): entry length smaller than expected (%d<18)."
+msgstr ""
+"Fişier iTunesStats ('%s'): lungimea intrării mai mică decât este aşteptat (%"
+"d<18)."
+
+#: ../src/itdb_itunesdb.c:1333
+#, c-format
+msgid "iTunesDB corrupt: no MHOD at offset %ld in file '%s'."
+msgstr "iTunesDB coruptă: lipsă MHOD la deplasarea %ld în fişierul '%s'."
+
+#: ../src/itdb_itunesdb.c:1519
+#, c-format
+msgid "Unknown smart rule action at %ld: %x. Trying to continue.\n"
+msgstr ""
+"Acţiune regulă inteligentă necunoscută la %ld: %x. Încercând să continuu.\n"
+
+#: ../src/itdb_itunesdb.c:1550
+#, c-format
+msgid ""
+"Length of smart playlist rule field (%d) not as expected. Trying to continue "
+"anyhow.\n"
+msgstr ""
+"Lungimea câmpului regulă a listei de redare inteligentă (%d) neaşteptată. "
+"Încercând să continuu oricum\n"
+
+#: ../src/itdb_itunesdb.c:1593
+#, c-format
+msgid "iTunesDB corrupt: no SLst at offset %ld in file '%s'."
+msgstr "iTunesDB coruptă: lipsă SLst la deplasarea %ld în fişierul '%s'."
+
+#: ../src/itdb_itunesdb.c:1606
+#, c-format
+msgid ""
+"Encountered unknown MHOD type (%d) while parsing the iTunesDB. Ignoring.\n"
+"\n"
+msgstr ""
+"Tip MHOD necunoscut (%d) întâlnit la prelucrarea iTunesDB. Ignorând.\n"
+"\n"
+
+#: ../src/itdb_itunesdb.c:1689
+#, c-format
+msgid "iTunesDB corrupt: hunk length 0 for hunk at %ld in file '%s'."
+msgstr "iTunesDB coruptă: lungime 0 pentru bucata de la %ld în fişierul '%s'."
+
+#: ../src/itdb_itunesdb.c:1702
+#, c-format
+msgid ""
+"iTunesDB corrupt: no section '%s' found in section '%s' starting at %ld."
+msgstr ""
+"iTunesDB coruptă: secţiunea '%s' nu a fost găsită în secţiunea '%s' începând "
+"de la %ld"
+
+#: ../src/itdb_itunesdb.c:1716
+#, c-format
+msgid ""
+"header length of '%s' smaller than expected (%d < %d) at offset %ld in file "
+"'%s'."
+msgstr ""
+"lungimea antetului '%s' mai mică decât este aşteptat (%d < %d) la deplasarea "
+"%ldîn fişierul '%s'."
+
+#: ../src/itdb_itunesdb.c:1801
+#, c-format
+msgid "Not a iTunesDB: '%s' (missing mhdb header)."
+msgstr "Nu o iTunesDB: '%s' (lipsă antet mhdb)."
+
+#: ../src/itdb_itunesdb.c:1818
+#, c-format
+msgid ""
+"iTunesDB ('%s'): header length of mhsd hunk smaller than expected (%d<32). "
+"Aborting."
+msgstr ""
+"iTunesDB ('%s'): lungimea antetului bucăţii mhsd mai mică decât aşteptat (%"
+"d<32). Renunţând"
+
+#: ../src/itdb_itunesdb.c:1839
+#, c-format
+msgid "iTunesDB '%s' corrupt: mhsd expected at %ld."
+msgstr "iTunesDB '%s' coruptă: mhsd aşteptat la %ld."
+
+#: ../src/itdb_itunesdb.c:1944
+#, c-format
+msgid "Number of MHODs in mhip at %ld inconsistent in file '%s'."
+msgstr "Numărul de MHOD în mhip la %ld inconsistent în fişierul '%s'."
+
+#: ../src/itdb_itunesdb.c:2121
+#, c-format
+msgid "Number of MHODs in mhyp at %ld inconsistent in file '%s'."
+msgstr "Numărul de MHOD în mhyp la %ld inconsistent în fişierul '%s'."
+
+#: ../src/itdb_itunesdb.c:2131
+msgid "Master-PL"
+msgstr "LR-Principală"
+
+#: ../src/itdb_itunesdb.c:2135
+msgid "Podcasts"
+msgstr "Podcasturi"
+
+#: ../src/itdb_itunesdb.c:2137
+msgid "Playlist"
+msgstr "Listă redare"
+
+#: ../src/itdb_itunesdb.c:2159
+#, c-format
+msgid ""
+"iTunesDB corrupt: number of mhip sections inconsistent in mhyp starting at %"
+"ld in file '%s'."
+msgstr ""
+"iTunesDV coruptă: numărul de secţiuni mhip inconsistent în mhyp începând la%"
+"ld în fişierul '%s'."
+
+#: ../src/itdb_itunesdb.c:2180
+#, c-format
+msgid "Itdb_Track ID '%d' not found.\n"
+msgstr "Itdb_Track ID '%d' nu a fost găsit.\n"
+
+#: ../src/itdb_itunesdb.c:2524
+msgid "OTG Playlist"
+msgstr "Listă redare OTG"
+
+#: ../src/itdb_itunesdb.c:2542
+#, c-format
+msgid "Not a OTG playlist file: '%s' (missing mhpo header)."
+msgstr "Nu un fişier listă redare OTG: '%s' (lipsă antet mhpo)."
+
+#: ../src/itdb_itunesdb.c:2556
+#, c-format
+msgid "OTG playlist file ('%s'): header length smaller than expected (%d<20)."
+msgstr ""
+"Fişier listă redare OTG ('%s'): lungimea antetului mai mică decât aşteptat (%"
+"d<20)."
+
+#: ../src/itdb_itunesdb.c:2568
+#, c-format
+msgid "OTG playlist file ('%s'): entry length smaller than expected (%d<4)."
+msgstr ""
+"Fişier listă redare OTG ('%s'): lungimea intrării mai mică decât aşteptat (%"
+"d<4)."
+
+#: ../src/itdb_itunesdb.c:2603
+#, c-format
+msgid "OTG playlist file '%s': reference to non-existent track (%d)."
+msgstr ""
+"Fişier listă redare OTG ('%s'): referinţă către o piesă inexistentă (%d)."
+
+#: ../src/itdb_itunesdb.c:2648
+#, c-format
+msgid "OTG Playlist %d"
+msgstr "Listă redare OTG %d"
+
+#. this should not be -- issue warning
+#: ../src/itdb_itunesdb.c:2716
+msgid ""
+"iTunesDB corrupt: number of tracks (mhit hunks) inconsistent. Trying to "
+"continue.\n"
+msgstr ""
+"Baza de date coruptă: numărul pieselor este necorespunzător. Încerc să "
+"continuu.\n"
+
+#. this should not be -- issue warning
+#: ../src/itdb_itunesdb.c:2779
+msgid ""
+"iTunesDB possibly corrupt: number of playlists (mhyp hunks) inconsistent. "
+"Trying to continue.\n"
+msgstr ""
+"Bază de date coruptă: număr liste de redare inconsistent. Încerc să "
+"continuu.\n"
+
+#: ../src/itdb_itunesdb.c:2826
+#, c-format
+msgid ""
+"iTunesDB '%s' corrupt: Could not find tracklist (no mhsd type 1 section "
+"found)"
+msgstr ""
+"iTunesDB '%s' coruptă: Nu am putut găsi lista de piese (lipsă secţiuni mhsd "
+"de tip 1)"
+
+#: ../src/itdb_itunesdb.c:2855
+#, c-format
+msgid ""
+"iTunesDB '%s' corrupt: Could not find playlists (no mhsd type 2 or type 3 "
+"sections found)"
+msgstr ""
+"iTunesDB '%s' coruptă: Nu am putut găsi liste de redare (lipsă secţiuni mhsd "
+"de tip 2 sau 3)"
+
+#: ../src/itdb_itunesdb.c:2877
+#, c-format
+msgid "iTunes directory not found: '%s' (or similar)."
+msgstr "Dosar iTunes negăsit: '%s' (sau similar)."
+
+#: ../src/itdb_itunesdb.c:2894
+#, c-format
+msgid "Music directory not found: '%s' (or similar)."
+msgstr "Dosar muzică negăsit: '%s' (sau similar)."
+
+#: ../src/itdb_itunesdb.c:2912
+#, c-format
+msgid "Control directory not found: '%s' (or similar)."
+msgstr "Dosar de control negăsit: '%s' (sau similar)."
+
+#: ../src/itdb_itunesdb.c:3033
+#, c-format
+msgid "File not found: '%s'."
+msgstr "Fişier negăsit: '%s'."
+
+#: ../src/itdb_itunesdb.c:5533
+#, c-format
+msgid "Path not found: '%s' (or similar)."
+msgstr "Cale negăsită: '%s' (sau similară)."
+
+#: ../src/itdb_itunesdb.c:5742
+#, c-format
+msgid "Error renaming '%s' to '%s' (%s)."
+msgstr "Eroare la redenumirea '%s' în '%s' (%s)."
+
+#: ../src/itdb_itunesdb.c:5759 ../src/itdb_itunesdb.c:5776
+#: ../src/itdb_itunesdb.c:5793
+#, c-format
+msgid "Error removing '%s' (%s)."
+msgstr "Eroare la ÅŸtergerea '%s' (%s)."
+
+#: ../src/itdb_itunesdb.c:5960 ../src/itdb_itunesdb.c:6133
+#, c-format
+msgid "Mountpoint not set."
+msgstr "Punct de montare nestabilit."
+
+#: ../src/itdb_itunesdb.c:6000
+#, c-format
+msgid "No 'F..' directories found in '%s'."
+msgstr "Nici un dosar 'F..' nu a fost găsit în '%s'."
+
+#: ../src/itdb_itunesdb.c:6021
+#, c-format
+msgid "Path not found: '%s'."
+msgstr "Cale negăsită: '%s'."
+
+#: ../src/itdb_itunesdb.c:6142
+#, c-format
+msgid "'%s' could not be accessed (%s)."
+msgstr "'%s' nu a putut fi accesat (%s)."
+
+#: ../src/itdb_itunesdb.c:6152
+#, c-format
+msgid ""
+"Destination file '%s' does not appear to be on the iPod mounted at '%s'."
+msgstr "Fişierul destinaţie '%s' nu pare să fie pe iPodul montat la '%s'."
+
+#: ../src/itdb_itunesdb.c:6360
+#, c-format
+msgid "Error opening '%s' for reading (%s)."
+msgstr "Eroare la deschiderea '%s' pentru citire (%s)."
+
+#: ../src/itdb_itunesdb.c:6372
+#, c-format
+msgid "Error opening '%s' for writing (%s)."
+msgstr "Eroare la deschiderea '%s' pentru scriere (%s)."
+
+#: ../src/itdb_itunesdb.c:6388
+#, c-format
+msgid "Error while reading from '%s' (%s)."
+msgstr "Eroarea la citirea din '%s' (%s)"
+
+#: ../src/itdb_itunesdb.c:6403
+#, c-format
+msgid "Error while writing to '%s' (%s)."
+msgstr "Eroare la scrierea în '%s' (%s)."
+
+#: ../src/itdb_itunesdb.c:6416 ../src/itdb_itunesdb.c:6426
+#, c-format
+msgid "Error when closing '%s' (%s)."
+msgstr "Eroare la închiderea '%s' (%s)."
+
+#: ../src/itdb_itunesdb.c:6856
+msgid "iPod"
+msgstr "iPod"
+
+#: ../src/itdb_itunesdb.c:7178
+#, c-format
+msgid "Problem creating iPod directory or file: '%s'."
+msgstr "Problemă la crearea dosarului iPod sau a fişierului: '%s'."
+
+#: ../src/itdb_photoalbum.c:111
+#, c-format
+msgid "Photos directory not found: '%s' (or similar)."
+msgstr "Dosarul imagini nu a fost găsit: '%s' (sau similar)."
+
+#: ../src/itdb_photoalbum.c:266 ../src/itdb_photoalbum.c:460
+msgid "Photo Library"
+msgstr "Biblioteca foto"
+
+#: ../src/itdb_photoalbum.c:386
+#, c-format
+msgid "You need to specify the iPod model used before photos can be added."
+msgstr ""
+"Trebuie să specificaţi modelul de iPod folosit înainte de a puteaadăuga "
+"imagini."
+
+#: ../src/itdb_photoalbum.c:407
+#, c-format
+msgid ""
+"Your iPod does not seem to support photos. Maybe you need to specify the "
+"correct iPod model number? It is currently set to 'x%s' (%s/%s)."
+msgstr ""
+"Modelul dvs de iPod se pare că nu suportă imagini. Poate trebuie "
+"săspecificaţi modelul corect de iPod? În prezent este setat ca 'x%s' (%s/%s)."
+
+#: ../src/itdb_photoalbum.c:419
+#, c-format
+msgid "Could not access file '%s'. Photo not added."
+msgstr "Nu am putut accesa fişierul '%s'. Imaginea nu a fost adăugată."
+
+#: ../src/itdb_photoalbum.c:448
+#, c-format
+msgid ""
+"Unexpected error in itdb_photodb_add_photo_internal() while adding photo, "
+"please report."
+msgstr ""
+"Eroare neaşte_ptată în itdbphotodb_addphoto_internal() la adăugarea "
+"imaginii, vă rugăm raportaţi-o."
+
+#: ../src/itdb_photoalbum.c:468
+#, c-format
+msgid ""
+"Library compiled without gdk-pixbuf support. Picture support is disabled."
+msgstr ""
+"Biblioteca a fost compilată fără suport pentru gdk-pixbuf. Suportul pentru "
+"imagini este dezactivat."
+
+#. New action!
+#: ../src/itdb_playlist.c:78
+#, c-format
+msgid "Unknown action (%d) in smart playlist will be ignored.\n"
+msgstr ""
+"Acţiune necunoscută (%d) în lista de redare inteligentă va fi ignorată.\n"
+
+#: ../src/itdb_thumb.c:326
+#, c-format
+msgid "Illegal filename: '%s'.\n"
+msgstr "Nume de fiÅŸier ilegal: '%s'.\n"
+
+#: ../src/itdb_thumb.c:331
+#, c-format
+msgid "Mountpoint not set.\n"
+msgstr "Punctul de montare nu a fost stabilit\n"
+
+#: ../tests/test-photos.c:41
+#, c-format
+msgid ""
+"Usage to add photos:\n"
+"  %s add <mountpoint> <albumname> [<filename(s)>]\n"
+"  <albumname> should be set to 'NULL' to add photos to the master photo "
+"album\n"
+"  (Photo Library) only. If you don't specify any filenames an empty album "
+"will\n"
+"  be created.\n"
+msgstr ""
+"Mod de utilizare pentru a adăuga imagini:\n"
+"  %s add <mountpoint> <albumname> [<filename(s)>]\n"
+"  <albumname> trebuie setat ca 'NULL' pentru a adăuga imagini la albumulfoto "
+"principal\n"
+"  Numai pentru (Photo Library). Dacă nu specificaţi nici un nume de fişier "
+"un album nou\n"
+"  va fi creat.\n"
+
+#: ../tests/test-photos.c:42
+#, c-format
+msgid ""
+"Usage to dump all photos to <output_dir>:\n"
+"  %s dump <mountpoint> <output_dir>\n"
+msgstr ""
+"Mod de utilizare pentru a afiÅŸa toate imaginile la <output_dir>:\n"
+"  %s dump <mountpoint> <output_dir>\n"
+
+#: ../tests/test-photos.c:43
+#, c-format
+msgid ""
+"Usage to list all photos IDs to stdout:\n"
+"  %s list <mountpoint>\n"
+msgstr ""
+"Mod de utilizare pentru a lista toate IDurile imaginilor la stdout:\n"
+"  %s list <mountpoint>\n"
+
+#: ../tests/test-photos.c:44
+#, c-format
+msgid ""
+"Usage to remove photo IDs from Photo Library:\n"
+"  %s remove <mountpoint> <albumname> [<ID(s)>]\n"
+"  <albumname> should be set to 'NULL' to remove photos from the iPod\n"
+"  altogether. If you don't specify any IDs, the photoalbum will be removed\n"
+"  instead.\n"
+"  WARNING: IDs may change when writing the PhotoDB file.\n"
+msgstr ""
+"Mod de utilizare pentru ÅŸtergerea ID de imagini din Biblioteca foto:\n"
+"  %s remove <mountpoint> <albumname> [<ID(s)>]\n"
+"  <albumname> trebuie lăsat 'NULL' pentru a şterge mai multe imagini\n"
+"  de pe iPod la un loc. Dacă nu specificaţi ID, tot albumul va fi şters.\n"
+"  ATENÅ¢IE: IDurile se pot schimba la scrierea fiÅŸierului PhotoDB.\n"
+
+#: ../tests/test-photos.c:119
+#, c-format
+msgid "Wrong number of command line arguments.\n"
+msgstr "Număr incorect de argumente în linia de comandă.\n"
+
+#: ../tests/test-photos.c:128
+#, c-format
+msgid "Error creating '%s' (mkdir)\n"
+msgstr "Eroare la crearea '%s' (mkdir)\n"
+
+#: ../tests/test-photos.c:134
+#, c-format
+msgid "Error: '%s' is not a directory\n"
+msgstr "Eroare: '%s' nu este un dosar\n"
+
+#: ../tests/test-photos.c:143 ../tests/test-photos.c:177
+#: ../tests/test-photos.c:306
+#, c-format
+msgid "Error reading iPod photo database (%s).\n"
+msgstr "Eroare la citirea bazei de date foto a iPod (%s).\n"
+
+#: ../tests/test-photos.c:149 ../tests/test-photos.c:183
+#: ../tests/test-photos.c:313
+#, c-format
+msgid "Error reading iPod photo database.\n"
+msgstr "Eroare la citirea bazei de date foto a iPod.\n"
+
+#: ../tests/test-photos.c:167 ../tests/test-photos.c:226
+#: ../tests/test-photos.c:296 ../tests/test-photos.c:379
+#, c-format
+msgid "Insufficient number of command line arguments.\n"
+msgstr "Număr de argumente în linia de comandă insuficient.\n"
+
+#: ../tests/test-photos.c:194
+msgid "<Unnamed>"
+msgstr "<Nedenumit>"
+
+#: ../tests/test-photos.c:209
+#, c-format
+msgid "<No members>\n"
+msgstr "<Fără membri>\n"
+
+#: ../tests/test-photos.c:236
+#, c-format
+msgid ""
+"Error reading iPod photo database (%s).\n"
+"Will attempt to create a new database.\n"
+msgstr ""
+"Eroare la citirea bazei de date foto a iPod (%s).\n"
+"Se încearcă să se creeze una nouă.\n"
+
+#: ../tests/test-photos.c:242
+#, c-format
+msgid ""
+"Error reading iPod photo database, will attempt to create a new database\n"
+msgstr ""
+"Eroare la citirea bazei de date foto a iPod, se încearcă să se creeze una "
+"nouă\n"
+
+#: ../tests/test-photos.c:267
+#, c-format
+msgid "Error adding photo (%s) to photo database: %s\n"
+msgstr "Eroare la adăugarea imaginii (%s) la baza de date de imagini: %s\n"
+
+#: ../tests/test-photos.c:324
+#, c-format
+msgid "Specified album '%s' not found. Aborting.\n"
+msgstr "Albumul specificat '%s' nu a fost găsit. Abandonând.\n"
+
+#: ../tests/test-photos.c:336
+#, c-format
+msgid "Cannot remove Photo Library playlist. Aborting.\n"
+msgstr "Nu am putut înlătura lista de redare Bibliotecă foto. Abandonând.\n"
+
+#: ../tests/test-photos.c:357
+#, c-format
+msgid "Warning: could not find photo with ID <%d>. Skipping...\n"
+msgstr "Avertizare: nu am putut găsi imaginea cu ID <%d>. Omiţând...\n"
+
+#: ../tests/test-photos.c:403
+#, c-format
+msgid "Unknown command '%s'\n"
+msgstr "Comandă necunoscută '%s' \n"
+
+#: ../tests/test-init-ipod.c:66
+#, c-format
+msgid "Error initialising iPod: %s\n"
+msgstr ""
+
+#: ../tests/test-init-ipod.c:73
+#, c-format
+msgid "Error initialising iPod, unknown error\n"
+msgstr ""
+
+#: ../tools/ipod-time-sync.c:37
+#, c-format
+msgid "usage: %s <device> [timezone]\n"
+msgstr ""
+
+#: ../tools/read-sysinfoextended-sgutils.c:39
+#, c-format
+msgid "usage: %s <device> <mountpoint>\n"
+msgstr ""
+
+#: ../tools/read-sysinfoextended-sgutils.c:45
+#, c-format
+msgid "Couldn't read xml sysinfo from %s\n"
+msgstr ""
+
+#: ../tools/read-sysinfoextended-sgutils.c:56
+#, c-format
+msgid "Couldn't resolve Device directory path on %s"
+msgstr ""
+
+#: ../tools/read-sysinfoextended-sgutils.c:64
+#, c-format
+msgid "Couldn't resolve SysInfoExtended path on %s"
+msgstr ""
+
+#: ../tools/read-sysinfoextended-sgutils.c:74
+#, c-format
+msgid "Couldn't write SysInfoExtended to %s"
+msgstr ""
+
+#~ msgid "First Generation"
+#~ msgstr "Prima generaţie"
+
+#~ msgid "Second Generation"
+#~ msgstr "A doua generaţie"
+
+#~ msgid "Third Generation"
+#~ msgstr "A treia generaţie"
+
+#~ msgid "Fourth Generation"
+#~ msgstr "A patra generaţie"
+
+#~ msgid "Fifth Generation"
+#~ msgstr "A cincea generaţie"
+
+#~ msgid "Sixth Generation"
+#~ msgstr "A şasea generaţie"
+
+#~ msgid "Opening of '%s' for writing failed (%s)."
+#~ msgstr "Deschiderea '%s' pentru scriere eşuată (%s)."
+
+#~ msgid "Writing to '%s' failed (%s)."
+#~ msgstr "Scriere în '%s' eşuată (%s)."

Added: libgpod/trunk/libgpod/branches/upstream/current/po/sv.po
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/po/sv.po	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/po/sv.po	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,848 @@
+# Translation of libgpod to Swedish.
+# This file is distributed under the same license as libgpod.
+# Copyright (C) Stefan Asserhäll <stefan.asserhall at comhem.se>, 2004, 2005, 2007, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: sv\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-04-03 16:08-0400\n"
+"PO-Revision-Date: 2008-12-09 20:05+0100\n"
+"Last-Translator: Stefan Asserhäll <stefan.asserhall at comhem.se>\n"
+"Language-Team: Svenska <sv at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms:  nplurals=2; plural=(n != 1);\n"
+"X-Generator: KBabel 1.11.4\n"
+
+#: ../src/db-artwork-parser.c:140
+#, c-format
+msgid "Unexpected mhod string type: %d\n"
+msgstr "Oväntad mhod strängtyp; %d\n"
+
+#: ../src/db-artwork-parser.c:460
+#, c-format
+msgid "Unexpected mhsd index: %d\n"
+msgstr "Oväntat mhsd index: %d\n"
+
+#: ../src/db-artwork-parser.c:540
+#, c-format
+msgid "Could not find corresponding track (dbid: %s) for artwork entry.\n"
+msgstr "Kunde inte hitta motsvarande spår (dbid: %s) för grafikpost.\n"
+
+#: ../src/db-artwork-parser.c:548
+#, c-format
+msgid "iTunesDB and ArtworkDB artwork sizes inconsistent (%d+%d != %d)\n"
+msgstr ""
+"Grafikstorlekar i iTunes databas och grafikdatabas inte konseventa (%d + %d !"
+"= %d)\n"
+
+#: ../src/db-image-parser.c:91
+#, c-format
+msgid "Unexpected image type in mhni: %d, offset: %d\n"
+msgstr "Oväntad bildtyp i mhni: %d, position: %d\n"
+
+#: ../src/itdb_artwork.c:163
+#, c-format
+msgid "Could not access file '%s'."
+msgstr "Kunde inte komma åt filen '%s'."
+
+#: ../src/itdb_artwork.c:181 ../src/itdb_artwork.c:241
+#: ../src/itdb_artwork.c:298
+#, c-format
+msgid "Artwork support not compiled into libgpod."
+msgstr "Grafikstöd inte kompilerat i libgpod."
+
+#: ../src/itdb_artwork.c:668
+#, c-format
+msgid "Could not find on iPod: '%s'\n"
+msgstr "Kunde inte hitta på iPod: '%s'\n"
+
+#: ../src/itdb_artwork.c:828
+#, c-format
+msgid ""
+"Unable to retrieve thumbnail (appears to be on iPod, but no image info "
+"available): filename: '%s'\n"
+msgstr ""
+"Kunde inte hämta miniatyrbild (verkar finnas på iPod, men någon "
+"bildinformation är inte tillgänglig): filnamne: '%s'\n"
+
+#: ../src/itdb_device.c:263
+msgid "Invalid"
+msgstr "Ogiltig"
+
+#: ../src/itdb_device.c:264 ../src/itdb_device.c:305
+msgid "Unknown"
+msgstr "Okänd"
+
+#: ../src/itdb_device.c:265
+msgid "Color"
+msgstr "Färg"
+
+#: ../src/itdb_device.c:266
+msgid "Color U2"
+msgstr "Färg U2"
+
+#: ../src/itdb_device.c:267
+msgid "Grayscale"
+msgstr "Gråskala"
+
+#: ../src/itdb_device.c:268
+msgid "Grayscale U2"
+msgstr "Gråskala U2"
+
+#: ../src/itdb_device.c:269
+msgid "Mini (Silver)"
+msgstr "Mini (silver)"
+
+#: ../src/itdb_device.c:270
+msgid "Mini (Blue)"
+msgstr "Mini (blå)"
+
+#: ../src/itdb_device.c:271
+msgid "Mini (Pink)"
+msgstr "Mini (rosa)"
+
+#: ../src/itdb_device.c:272
+msgid "Mini (Green)"
+msgstr "Mini (grön)"
+
+#: ../src/itdb_device.c:273
+msgid "Mini (Gold)"
+msgstr "Mini (guld)"
+
+#: ../src/itdb_device.c:274
+msgid "Shuffle"
+msgstr "Shuffle"
+
+#: ../src/itdb_device.c:275
+msgid "Nano (White)"
+msgstr "Nano (vit)"
+
+#: ../src/itdb_device.c:276
+msgid "Nano (Black)"
+msgstr "Nano (svart)"
+
+#: ../src/itdb_device.c:277
+msgid "Video (White)"
+msgstr "Video (vit)"
+
+#: ../src/itdb_device.c:278
+msgid "Video (Black)"
+msgstr "Video (svart)"
+
+#: ../src/itdb_device.c:279
+msgid "Mobile (1)"
+msgstr "Mobil (1)"
+
+#: ../src/itdb_device.c:280
+msgid "Video U2"
+msgstr "Video U2"
+
+#: ../src/itdb_device.c:281
+msgid "Nano (Silver)"
+msgstr "Nano (silver)"
+
+#: ../src/itdb_device.c:282
+msgid "Nano (Blue)"
+msgstr "Nano (blå)"
+
+#: ../src/itdb_device.c:283
+msgid "Nano (Green)"
+msgstr "Nano (grön)"
+
+#: ../src/itdb_device.c:284
+msgid "Nano (Pink)"
+msgstr "Nano (rosa)"
+
+#: ../src/itdb_device.c:285
+msgid "Nano (Red)"
+msgstr "Nano (röd)"
+
+#: ../src/itdb_device.c:286
+msgid "Nano (Yellow)"
+msgstr "Nano (gul)"
+
+#: ../src/itdb_device.c:287
+msgid "Nano (Purple)"
+msgstr "Nano (violett)"
+
+#: ../src/itdb_device.c:288
+msgid "Nano (Orange)"
+msgstr "Nano (orange)"
+
+#: ../src/itdb_device.c:289
+msgid "iPhone (1)"
+msgstr "iPhone (1)"
+
+#: ../src/itdb_device.c:290
+msgid "Shuffle (Silver)"
+msgstr "Shuffle (silver)"
+
+#: ../src/itdb_device.c:291
+msgid "Shuffle (Pink)"
+msgstr "Shuffle (rosa)"
+
+#: ../src/itdb_device.c:292
+msgid "Shuffle (Blue)"
+msgstr "Shuffle (blå)"
+
+#: ../src/itdb_device.c:293
+msgid "Shuffle (Green)"
+msgstr "Shuffle (grön)"
+
+#: ../src/itdb_device.c:294
+msgid "Shuffle (Orange)"
+msgstr "Shuffle (orange)"
+
+#: ../src/itdb_device.c:295
+msgid "Shuffle (Purple)"
+msgstr "Shuffle (violett)"
+
+#: ../src/itdb_device.c:296
+msgid "Shuffle (Red)"
+msgstr "Shuffle (röd)"
+
+#: ../src/itdb_device.c:297
+msgid "Classic (Silver)"
+msgstr "Klassisk (silver)"
+
+#: ../src/itdb_device.c:298
+msgid "Classic (Black)"
+msgstr "Klassisk (svart)"
+
+#: ../src/itdb_device.c:299
+msgid "Touch (Black)"
+msgstr "Touch (svart)"
+
+#: ../src/itdb_device.c:306
+msgid "Regular (1st Gen.)"
+msgstr "Vanlig (1:a gen.)"
+
+#: ../src/itdb_device.c:307
+msgid "Regular (2nd Gen.)"
+msgstr "Vanlig (2:a gen.)"
+
+#: ../src/itdb_device.c:308
+msgid "Regular (3rd Gen.)"
+msgstr "Vanlig (3:e gen.)"
+
+#: ../src/itdb_device.c:309
+msgid "Regular (4th Gen.)"
+msgstr "Vanlig (4:e gen.)"
+
+#: ../src/itdb_device.c:310
+msgid "Photo"
+msgstr "Foto"
+
+#: ../src/itdb_device.c:311
+msgid "Mobile Phones"
+msgstr "Mobiltelefoner"
+
+#: ../src/itdb_device.c:312
+msgid "Mini (1st Gen.)"
+msgstr "Mini (1:a gen.)"
+
+#: ../src/itdb_device.c:313
+msgid "Mini (2nd Gen.)"
+msgstr "Mini (2:a gen.)"
+
+#: ../src/itdb_device.c:314
+msgid "Shuffle (1st Gen.)"
+msgstr "Shuffle (1:a gen.)"
+
+#: ../src/itdb_device.c:315
+msgid "Shuffle (2nd Gen.)"
+msgstr "Shuffle (2:a gen.)"
+
+#: ../src/itdb_device.c:316
+msgid "Shuffle (3rd Gen.)"
+msgstr "Shuffle (3:e gen.)"
+
+#: ../src/itdb_device.c:317
+msgid "Nano (1st Gen.)"
+msgstr "Nano (1:a gen.)"
+
+#: ../src/itdb_device.c:318
+msgid "Nano (2nd Gen.)"
+msgstr "Nano (2:a gen.)"
+
+#: ../src/itdb_device.c:319
+msgid "Nano Video (3rd Gen.)"
+msgstr "Nano video (3:e gen.)"
+
+#: ../src/itdb_device.c:320
+msgid "Nano Video (4th Gen.)"
+msgstr "Nano video (4:e gen.)"
+
+#: ../src/itdb_device.c:321
+msgid "Video (1st Gen.)"
+msgstr "Video (1:a gen.)"
+
+#: ../src/itdb_device.c:322
+msgid "Video (2nd Gen.)"
+msgstr "Video (2:a gen.)"
+
+#: ../src/itdb_device.c:323 ../src/itdb_device.c:324
+msgid "Classic"
+msgstr "Klassisk"
+
+#: ../src/itdb_device.c:325
+msgid "Touch"
+msgstr "Touch"
+
+#: ../src/itdb_device.c:326
+msgid "iPhone"
+msgstr "iPhone"
+
+#: ../src/itdb_device.c:327 ../src/itdb_device.c:328
+msgid "Unused"
+msgstr "Oanvänd"
+
+#: ../src/itdb_device.c:928
+#, c-format
+msgid "Could not open '%s' for writing."
+msgstr "Kunde inte öppna '%s' för skrivning."
+
+#: ../src/itdb_device.c:937
+#, c-format
+msgid "Device directory does not exist."
+msgstr "Enhetskatalog finns inte."
+
+#: ../src/itdb_itunesdb.c:507
+#, c-format
+msgid "Illegal seek to offset %ld (length %ld) in file '%s'."
+msgstr "Ogiltig sökning till position %ld (längd %ld) i filen '%s'."
+
+#: ../src/itdb_itunesdb.c:910
+#, c-format
+msgid "Not a Play Counts file: '%s' (missing mhdp header)."
+msgstr "Inte en uppspelningsdatafil: '%s' (saknar mhdp-huvud)."
+
+#: ../src/itdb_itunesdb.c:925
+#, c-format
+msgid "Play Counts file ('%s'): header length smaller than expected (%d<96)."
+msgstr "Uppspelningsdatafil ('%s'): Huvudlängd mindre än väntat (%d < 96)"
+
+#: ../src/itdb_itunesdb.c:939
+#, c-format
+msgid "Play Counts file ('%s'): entry length smaller than expected (%d<12)."
+msgstr "Uppspelningsdatafil ('%s'): Postlängd mindre än väntat (%d < 12)"
+
+#: ../src/itdb_itunesdb.c:1014
+#, c-format
+msgid "iTunesStats file ('%s'): entry length smaller than expected (%d<18)."
+msgstr "iTunes statistikfil ('%s'): Postlängd mindre än väntat (%d < 18)"
+
+#: ../src/itdb_itunesdb.c:1333
+#, c-format
+msgid "iTunesDB corrupt: no MHOD at offset %ld in file '%s'."
+msgstr "iTunes databas skadad: Ingen MHOD på position %ld i filen '%s'."
+
+#: ../src/itdb_itunesdb.c:1519
+#, c-format
+msgid "Unknown smart rule action at %ld: %x. Trying to continue.\n"
+msgstr "Okänd smart regelåtgärd vid %ld: %x. Försöker fortsätta.\n"
+
+#: ../src/itdb_itunesdb.c:1550
+#, c-format
+msgid ""
+"Length of smart playlist rule field (%d) not as expected. Trying to continue "
+"anyhow.\n"
+msgstr ""
+"Regelfältets längd (%d) i den smarta spellistan är inte den förväntade. "
+"Försöker fortsätta ändå.\n"
+
+#: ../src/itdb_itunesdb.c:1593
+#, c-format
+msgid "iTunesDB corrupt: no SLst at offset %ld in file '%s'."
+msgstr "iTunes databas skadad: Ingen SLst på position %ld i filen '%s'."
+
+#: ../src/itdb_itunesdb.c:1606
+#, c-format
+msgid ""
+"Encountered unknown MHOD type (%d) while parsing the iTunesDB. Ignoring.\n"
+"\n"
+msgstr ""
+"Stötte på okänd MHOD-typ (%d) under tolkning av iTunes databas. Ignorerar "
+"den.\n"
+"\n"
+
+#: ../src/itdb_itunesdb.c:1689
+#, c-format
+msgid "iTunesDB corrupt: hunk length 0 for hunk at %ld in file '%s'."
+msgstr ""
+"iTunes databas skadad: Datalängd 0 för data på position %ld i filen '%s'."
+
+#: ../src/itdb_itunesdb.c:1702
+#, c-format
+msgid ""
+"iTunesDB corrupt: no section '%s' found in section '%s' starting at %ld."
+msgstr ""
+"iTunes databas skadad: NÃ¥gon sektion '%s' hittades inte i sektion '%s' med "
+"början på %ld."
+
+#: ../src/itdb_itunesdb.c:1716
+#, c-format
+msgid ""
+"header length of '%s' smaller than expected (%d < %d) at offset %ld in file "
+"'%s'."
+msgstr ""
+"Huvudlängd för '%s' mindre än väntat (%d < %d) på position %ld i filen '%s'."
+
+#: ../src/itdb_itunesdb.c:1801
+#, c-format
+msgid "Not a iTunesDB: '%s' (missing mhdb header)."
+msgstr "Inte en iTunes databas: '%s' (saknar mhdb-huvud)."
+
+#: ../src/itdb_itunesdb.c:1818
+#, c-format
+msgid ""
+"iTunesDB ('%s'): header length of mhsd hunk smaller than expected (%d<32). "
+"Aborting."
+msgstr ""
+"iTunes databas ('%s'): Huvudlängd för mhsd-data mindre än väntat (%d < 32). "
+"Avbryter."
+
+#: ../src/itdb_itunesdb.c:1839
+#, c-format
+msgid "iTunesDB '%s' corrupt: mhsd expected at %ld."
+msgstr "iTunes databas '%s' skadad: Förväntade mhsd på position %ld."
+
+#: ../src/itdb_itunesdb.c:1944
+#, c-format
+msgid "Number of MHODs in mhip at %ld inconsistent in file '%s'."
+msgstr "Antal MHOD i mhip på position %ld inte konsekvent i filen '%s'."
+
+#: ../src/itdb_itunesdb.c:2121
+#, c-format
+msgid "Number of MHODs in mhyp at %ld inconsistent in file '%s'."
+msgstr "Antal MHOD i mhyp på position %ld inte konsekvent i filen '%s'."
+
+#: ../src/itdb_itunesdb.c:2131
+msgid "Master-PL"
+msgstr "Huvudspellista"
+
+#: ../src/itdb_itunesdb.c:2135
+msgid "Podcasts"
+msgstr "Podradiosändningar"
+
+#: ../src/itdb_itunesdb.c:2137
+msgid "Playlist"
+msgstr "Spellista"
+
+#: ../src/itdb_itunesdb.c:2159
+#, c-format
+msgid ""
+"iTunesDB corrupt: number of mhip sections inconsistent in mhyp starting at %"
+"ld in file '%s'."
+msgstr ""
+"iTunes databas skadad: Antal mhip sektioner inte konsekvent i mhyp med "
+"början på %ld i filen '%s'."
+
+#: ../src/itdb_itunesdb.c:2180
+#, c-format
+msgid "Itdb_Track ID '%d' not found.\n"
+msgstr "ITunes databas spår-id '%d' hittades inte.\n"
+
+#: ../src/itdb_itunesdb.c:2524
+msgid "OTG Playlist"
+msgstr "OTG-spellista"
+
+#: ../src/itdb_itunesdb.c:2542
+#, c-format
+msgid "Not a OTG playlist file: '%s' (missing mhpo header)."
+msgstr "Inte en OTG-spellistefil: '%s' (saknar mhpo-huvud)."
+
+#: ../src/itdb_itunesdb.c:2556
+#, c-format
+msgid "OTG playlist file ('%s'): header length smaller than expected (%d<20)."
+msgstr "OTG-spellistefil ('%s'): Huvudlängd mindre än väntat (%d < 20)"
+
+#: ../src/itdb_itunesdb.c:2568
+#, c-format
+msgid "OTG playlist file ('%s'): entry length smaller than expected (%d<4)."
+msgstr "OTG-spellistefil ('%s'): Postlängd mindre än väntat (%d < 4)."
+
+#: ../src/itdb_itunesdb.c:2603
+#, c-format
+msgid "OTG playlist file '%s': reference to non-existent track (%d)."
+msgstr "OTG-spellistefil '%s': Referens till spår som inte finns (%d)."
+
+#: ../src/itdb_itunesdb.c:2648
+#, c-format
+msgid "OTG Playlist %d"
+msgstr "OTG-spellista %d"
+
+#. this should not be -- issue warning
+#: ../src/itdb_itunesdb.c:2716
+msgid ""
+"iTunesDB corrupt: number of tracks (mhit hunks) inconsistent. Trying to "
+"continue.\n"
+msgstr ""
+"iTunes databas skadad: Antal spår (mhit-data) inte konsekvent. Försöker "
+"fortsätta.\n"
+
+#. this should not be -- issue warning
+#: ../src/itdb_itunesdb.c:2779
+msgid ""
+"iTunesDB possibly corrupt: number of playlists (mhyp hunks) inconsistent. "
+"Trying to continue.\n"
+msgstr ""
+"iTunes databas möjligen skadad: Antal spellistor (mhyp-data) inte "
+"konsekvent. Försöker fortsätta.\n"
+
+#: ../src/itdb_itunesdb.c:2826
+#, c-format
+msgid ""
+"iTunesDB '%s' corrupt: Could not find tracklist (no mhsd type 1 section "
+"found)"
+msgstr ""
+"iTunes databas '%s' skadad: Kunde inte hitta spårlista (någon mhsd av typ 1 "
+"hittades inte)"
+
+#: ../src/itdb_itunesdb.c:2855
+#, c-format
+msgid ""
+"iTunesDB '%s' corrupt: Could not find playlists (no mhsd type 2 or type 3 "
+"sections found)"
+msgstr ""
+"iTunes databas '%s' skadad: Kunde inte hitta spellistor (någon mhsd av typ 2 "
+"eller typ 3 hittades)"
+
+#: ../src/itdb_itunesdb.c:2877
+#, c-format
+msgid "iTunes directory not found: '%s' (or similar)."
+msgstr "iTunes katalog hittades inte: '%s' (eller liknande)."
+
+#: ../src/itdb_itunesdb.c:2894
+#, c-format
+msgid "Music directory not found: '%s' (or similar)."
+msgstr "Musikkatalog hittades inte: '%s' (eller liknande)."
+
+#: ../src/itdb_itunesdb.c:2912
+#, c-format
+msgid "Control directory not found: '%s' (or similar)."
+msgstr "Styrkatalog hittades inte: '%s' (eller liknande)."
+
+#: ../src/itdb_itunesdb.c:3033
+#, c-format
+msgid "File not found: '%s'."
+msgstr "Filen hittades inte: '%s'."
+
+#: ../src/itdb_itunesdb.c:5533
+#, c-format
+msgid "Path not found: '%s' (or similar)."
+msgstr "Sökväg hittades inte: '%s' (eller liknande)."
+
+#: ../src/itdb_itunesdb.c:5742
+#, c-format
+msgid "Error renaming '%s' to '%s' (%s)."
+msgstr "Fel vid byte av namn på '%s' till '%s' (%s)."
+
+#: ../src/itdb_itunesdb.c:5759 ../src/itdb_itunesdb.c:5776
+#: ../src/itdb_itunesdb.c:5793
+#, c-format
+msgid "Error removing '%s' (%s)."
+msgstr "Fel vid borttagning av '%s' (%s)."
+
+#: ../src/itdb_itunesdb.c:5960 ../src/itdb_itunesdb.c:6133
+#, c-format
+msgid "Mountpoint not set."
+msgstr "Monteringsplats inte inställd."
+
+#: ../src/itdb_itunesdb.c:6000
+#, c-format
+msgid "No 'F..' directories found in '%s'."
+msgstr "NÃ¥gra 'F..'-kataloger hittades inte i '%s'."
+
+#: ../src/itdb_itunesdb.c:6021
+#, c-format
+msgid "Path not found: '%s'."
+msgstr "Sökväg hittades inte: '%s'."
+
+#: ../src/itdb_itunesdb.c:6142
+#, c-format
+msgid "'%s' could not be accessed (%s)."
+msgstr "Kunde inte komma åt '%s' (%s)."
+
+#: ../src/itdb_itunesdb.c:6152
+#, c-format
+msgid ""
+"Destination file '%s' does not appear to be on the iPod mounted at '%s'."
+msgstr "Målfilen '%s' verkar inte finnas på iPod monterad som '%s'."
+
+#: ../src/itdb_itunesdb.c:6360
+#, c-format
+msgid "Error opening '%s' for reading (%s)."
+msgstr "Fel när '%s' skulle öppnas för läsning (%s)."
+
+#: ../src/itdb_itunesdb.c:6372
+#, c-format
+msgid "Error opening '%s' for writing (%s)."
+msgstr "Fel när '%s' skulle öppnas för skrivning (%s)."
+
+#: ../src/itdb_itunesdb.c:6388
+#, c-format
+msgid "Error while reading from '%s' (%s)."
+msgstr "Fel vid läsning från '%s' (%s)."
+
+#: ../src/itdb_itunesdb.c:6403
+#, c-format
+msgid "Error while writing to '%s' (%s)."
+msgstr "Fel vid skrivning till '%s' (%s)."
+
+#: ../src/itdb_itunesdb.c:6416 ../src/itdb_itunesdb.c:6426
+#, c-format
+msgid "Error when closing '%s' (%s)."
+msgstr "Fel när '%s' skulle stängas (%s)."
+
+#: ../src/itdb_itunesdb.c:6856
+msgid "iPod"
+msgstr "iPod"
+
+#: ../src/itdb_itunesdb.c:7178
+#, c-format
+msgid "Problem creating iPod directory or file: '%s'."
+msgstr "Problem att skapa iPod-katalog eller fil: '%s'."
+
+#: ../src/itdb_photoalbum.c:111
+#, c-format
+msgid "Photos directory not found: '%s' (or similar)."
+msgstr "Fotokatalog hittades inte: '%s' (eller liknande)."
+
+#: ../src/itdb_photoalbum.c:266 ../src/itdb_photoalbum.c:460
+msgid "Photo Library"
+msgstr "Fotobibliotek"
+
+#: ../src/itdb_photoalbum.c:386
+#, c-format
+msgid "You need to specify the iPod model used before photos can be added."
+msgstr ""
+"Du måste ange vilken iPod-modell som används innan foton kan läggas till."
+
+#: ../src/itdb_photoalbum.c:407
+#, c-format
+msgid ""
+"Your iPod does not seem to support photos. Maybe you need to specify the "
+"correct iPod model number? It is currently set to 'x%s' (%s/%s)."
+msgstr ""
+"Din iPod verkar inte stödja foton. Kanske måste du ange rätt iPod-"
+"modellnummer? För närvarande är det inställt till 'x%s' (%s/%s)."
+
+#: ../src/itdb_photoalbum.c:419
+#, c-format
+msgid "Could not access file '%s'. Photo not added."
+msgstr "Kunde inte komma åt filen '%s'. Fotot har inte lagts till."
+
+#: ../src/itdb_photoalbum.c:448
+#, c-format
+msgid ""
+"Unexpected error in itdb_photodb_add_photo_internal() while adding photo, "
+"please report."
+msgstr ""
+"Oväntat fel i itdb_photodb_add_photo_internal() vid tillägg av foto. "
+"Rapportera gärna felet."
+
+#: ../src/itdb_photoalbum.c:468
+#, c-format
+msgid ""
+"Library compiled without gdk-pixbuf support. Picture support is disabled."
+msgstr ""
+"Biblioteket kompilerat utan stöd för gdk-pixbuf. Stöd för bilder är "
+"inaktiverat."
+
+#. New action!
+#: ../src/itdb_playlist.c:78
+#, c-format
+msgid "Unknown action (%d) in smart playlist will be ignored.\n"
+msgstr "Okänd åtgärd (%d) i smart spellista kommer att ignoreras.\n"
+
+#: ../src/itdb_thumb.c:326
+#, c-format
+msgid "Illegal filename: '%s'.\n"
+msgstr "Ogiltigt filnamn: '%s'.\n"
+
+#: ../src/itdb_thumb.c:331
+#, c-format
+msgid "Mountpoint not set.\n"
+msgstr "Monteringsplats inte inställd.\n"
+
+#: ../tests/test-photos.c:41
+#, c-format
+msgid ""
+"Usage to add photos:\n"
+"  %s add <mountpoint> <albumname> [<filename(s)>]\n"
+"  <albumname> should be set to 'NULL' to add photos to the master photo "
+"album\n"
+"  (Photo Library) only. If you don't specify any filenames an empty album "
+"will\n"
+"  be created.\n"
+msgstr ""
+"Användning för att lägga till foton:\n"
+"  %s add <monteringsplats> <albumnamn> [<filnamn>]\n"
+"  <albumnamn> ska vara 'NULL' för att bara lägga till foton i huvudalbumet\n"
+"  (Photo Library). Om inga filnamn anges kommer ett tomt album att skapas.\n"
+
+#: ../tests/test-photos.c:42
+#, c-format
+msgid ""
+"Usage to dump all photos to <output_dir>:\n"
+"  %s dump <mountpoint> <output_dir>\n"
+msgstr ""
+"Användning för att lagra alla foton i <utdatakatalog>:\n"
+"  %s dump <mountpoint> <output_dir>\n"
+
+#: ../tests/test-photos.c:43
+#, c-format
+msgid ""
+"Usage to list all photos IDs to stdout:\n"
+"  %s list <mountpoint>\n"
+msgstr ""
+"Användning för att lista id för alla foton på standardutmatningen:\n"
+"  %s list <mountpoint>\n"
+
+#: ../tests/test-photos.c:44
+#, c-format
+msgid ""
+"Usage to remove photo IDs from Photo Library:\n"
+"  %s remove <mountpoint> <albumname> [<ID(s)>]\n"
+"  <albumname> should be set to 'NULL' to remove photos from the iPod\n"
+"  altogether. If you don't specify any IDs, the photoalbum will be removed\n"
+"  instead.\n"
+"  WARNING: IDs may change when writing the PhotoDB file.\n"
+msgstr ""
+"Användning för att ta bort id för foton från fotobiblioteket:\n"
+"  %s remove <monteringsplats> <albumnamn> [<id>]\n"
+"  <albumnamn> ska vara 'NULL' för att ta bort foton från iPod\n"
+"  permanent. Om inget id anges, tas fotoalbumet bort\n"
+"  instället.\n"
+"  VARNING: Id kan ändras när filen PhotoDB skrivs.\n"
+
+#: ../tests/test-photos.c:119
+#, c-format
+msgid "Wrong number of command line arguments.\n"
+msgstr "Fel antal kommandoradsväljare.\n"
+
+#: ../tests/test-photos.c:128
+#, c-format
+msgid "Error creating '%s' (mkdir)\n"
+msgstr "Fel när '%s' skulle skapas (mkdir)\n"
+
+#: ../tests/test-photos.c:134
+#, c-format
+msgid "Error: '%s' is not a directory\n"
+msgstr "Fel: '%s' är inte en katalog\n"
+
+#: ../tests/test-photos.c:143 ../tests/test-photos.c:177
+#: ../tests/test-photos.c:306
+#, c-format
+msgid "Error reading iPod photo database (%s).\n"
+msgstr "Fel vid vid läsning av iPod fotodatabas (%s).\n"
+
+#: ../tests/test-photos.c:149 ../tests/test-photos.c:183
+#: ../tests/test-photos.c:313
+#, c-format
+msgid "Error reading iPod photo database.\n"
+msgstr "Fel vid läsning av iPod fotodatabas.\n"
+
+#: ../tests/test-photos.c:167 ../tests/test-photos.c:226
+#: ../tests/test-photos.c:296 ../tests/test-photos.c:379
+#, c-format
+msgid "Insufficient number of command line arguments.\n"
+msgstr "Otillräckligt antal kommandoradsväljare.\n"
+
+#: ../tests/test-photos.c:194
+msgid "<Unnamed>"
+msgstr "<Namnlös>"
+
+#: ../tests/test-photos.c:209
+#, c-format
+msgid "<No members>\n"
+msgstr "<Inga medlemmar>\n"
+
+#: ../tests/test-photos.c:236
+#, c-format
+msgid ""
+"Error reading iPod photo database (%s).\n"
+"Will attempt to create a new database.\n"
+msgstr ""
+"Fel vid läsning av iPod fotodatabas (%s).\n"
+"Försöker skapa en ny databas.\n"
+
+#: ../tests/test-photos.c:242
+#, c-format
+msgid ""
+"Error reading iPod photo database, will attempt to create a new database\n"
+msgstr "Fel vid läsning av iPod fotodatabas, försöker skapa en ny databas\n"
+
+#: ../tests/test-photos.c:267
+#, c-format
+msgid "Error adding photo (%s) to photo database: %s\n"
+msgstr "Fel vid vid tillägg av foto (%s) i fotodatabas: %s\n"
+
+#: ../tests/test-photos.c:324
+#, c-format
+msgid "Specified album '%s' not found. Aborting.\n"
+msgstr "Angivet album '%s' hittades inte. Avbryter.\n"
+
+#: ../tests/test-photos.c:336
+#, c-format
+msgid "Cannot remove Photo Library playlist. Aborting.\n"
+msgstr "Kan inte ta bort fotobibliotekets spellista. Avbryter.\n"
+
+#: ../tests/test-photos.c:357
+#, c-format
+msgid "Warning: could not find photo with ID <%d>. Skipping...\n"
+msgstr "Varning: Kunde inte hitta foto med id <%d>. Hoppar över det...\n"
+
+#: ../tests/test-photos.c:403
+#, c-format
+msgid "Unknown command '%s'\n"
+msgstr "Okänt kommando '%s'\n"
+
+#: ../tests/test-init-ipod.c:66
+#, c-format
+msgid "Error initialising iPod: %s\n"
+msgstr "Fel vid initiering av iPod: %s\n"
+
+#: ../tests/test-init-ipod.c:73
+#, c-format
+msgid "Error initialising iPod, unknown error\n"
+msgstr "Fel vid initiering av iPod, okänt fel\n"
+
+#: ../tools/ipod-time-sync.c:37
+#, fuzzy, c-format
+msgid "usage: %s <device> [timezone]\n"
+msgstr "användning: %s <enhet> <monteringsplats>\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:39
+#, c-format
+msgid "usage: %s <device> <mountpoint>\n"
+msgstr "användning: %s <enhet> <monteringsplats>\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:45
+#, c-format
+msgid "Couldn't read xml sysinfo from %s\n"
+msgstr "Kunde inte läsa XML-systeminformation från %s\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:56
+#, c-format
+msgid "Couldn't resolve Device directory path on %s"
+msgstr "Kunde inte lösa upp enhetens katalogsökväg på %s"
+
+#: ../tools/read-sysinfoextended-sgutils.c:64
+#, c-format
+msgid "Couldn't resolve SysInfoExtended path on %s"
+msgstr "Kunde inte lösa upp sökväg till utökad systeminformation på %s"
+
+#: ../tools/read-sysinfoextended-sgutils.c:74
+#, c-format
+msgid "Couldn't write SysInfoExtended to %s"
+msgstr "Kunde inte skriva utökad systeminformation på %s"
+
+#~ msgid "Could not find artwork entry (mhii id: %u) for track (dbid: %s).\n"
+#~ msgstr ""
+#~ "Kunde inte hitta motsvarande grafikpost (mhii id: %u) för spår (dbid: %"
+#~ "s).\n"

Added: libgpod/trunk/libgpod/branches/upstream/current/po/zh_CN.po
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/po/zh_CN.po	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/po/zh_CN.po	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,819 @@
+# Simplified Chinese Translation Catalogue
+# Copyright (C) 2003-2009 Jörg Schuler
+# This file is distributed under the same license as the libgpod package.
+# Tan Zhixin <tanzhxin at gmail.com>, 2009.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: libgpod 0.7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-04-03 16:08-0400\n"
+"PO-Revision-Date: 2009-1-5 20:15+0900\n"
+"Last-Translator: Tan Zhxin <tanzhxin at gmail.com>\n"
+"Language-Team: n/a\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../src/db-artwork-parser.c:140
+#, c-format
+msgid "Unexpected mhod string type: %d\n"
+msgstr "未预期的mhod字符串:%d\n"
+
+#: ../src/db-artwork-parser.c:460
+#, c-format
+msgid "Unexpected mhsd index: %d\n"
+msgstr "未预期的mhsd索引:%d\n"
+
+#: ../src/db-artwork-parser.c:540
+#, c-format
+msgid "Could not find corresponding track (dbid: %s) for artwork entry.\n"
+msgstr "无法找到对应专辑封面的音轨(dbid: %s)。\n"
+
+#: ../src/db-artwork-parser.c:548
+#, c-format
+msgid "iTunesDB and ArtworkDB artwork sizes inconsistent (%d+%d != %d)\n"
+msgstr "iTunesDB和ArtworkDB中专辑封面的文件大小不一致 (%d+%d != %d)\n"
+
+#: ../src/db-image-parser.c:91
+#, c-format
+msgid "Unexpected image type in mhni: %d, offset: %d\n"
+msgstr "mhni中未预期的图片类型: %d,位置: %d\n"
+
+#: ../src/itdb_artwork.c:163
+#, c-format
+msgid "Could not access file '%s'."
+msgstr "无法存取文件'%s'"
+
+#: ../src/itdb_artwork.c:181 ../src/itdb_artwork.c:241
+#: ../src/itdb_artwork.c:298
+#, c-format
+msgid "Artwork support not compiled into libgpod."
+msgstr "编译libgpod时未加入专辑封面支持"
+
+#: ../src/itdb_artwork.c:668
+#, c-format
+msgid "Could not find on iPod: '%s'\n"
+msgstr "在iPod中无法找到: '%s'\n"
+
+#: ../src/itdb_artwork.c:828
+#, c-format
+msgid ""
+"Unable to retrieve thumbnail (appears to be on iPod, but no image info "
+"available): filename: '%s'\n"
+msgstr "无法调出缩略图(iPod中存在,但是无法获得图像信息):文件'%s'\n"
+
+#: ../src/itdb_device.c:263
+msgid "Invalid"
+msgstr "无效"
+
+#: ../src/itdb_device.c:264 ../src/itdb_device.c:305
+msgid "Unknown"
+msgstr "未知"
+
+#: ../src/itdb_device.c:265
+msgid "Color"
+msgstr "Color"
+
+#: ../src/itdb_device.c:266
+msgid "Color U2"
+msgstr "Color U2"
+
+#: ../src/itdb_device.c:267
+msgid "Grayscale"
+msgstr "Grayscale"
+
+#: ../src/itdb_device.c:268
+msgid "Grayscale U2"
+msgstr "Grayscale U2"
+
+#: ../src/itdb_device.c:269
+msgid "Mini (Silver)"
+msgstr "Mini(银)"
+
+#: ../src/itdb_device.c:270
+msgid "Mini (Blue)"
+msgstr "Mini(蓝)"
+
+#: ../src/itdb_device.c:271
+msgid "Mini (Pink)"
+msgstr "Mini(粉)"
+
+#: ../src/itdb_device.c:272
+msgid "Mini (Green)"
+msgstr "Mini(绿)"
+
+#: ../src/itdb_device.c:273
+msgid "Mini (Gold)"
+msgstr "Mini(金)"
+
+#: ../src/itdb_device.c:274
+msgid "Shuffle"
+msgstr "Shuffle"
+
+#: ../src/itdb_device.c:275
+msgid "Nano (White)"
+msgstr "Nano(白)"
+
+#: ../src/itdb_device.c:276
+msgid "Nano (Black)"
+msgstr "Nano(黑)"
+
+#: ../src/itdb_device.c:277
+msgid "Video (White)"
+msgstr "Video(白)"
+
+#: ../src/itdb_device.c:278
+msgid "Video (Black)"
+msgstr "Video(黑)"
+
+#: ../src/itdb_device.c:279
+msgid "Mobile (1)"
+msgstr "Mobile(1代)"
+
+#: ../src/itdb_device.c:280
+msgid "Video U2"
+msgstr "Video U2"
+
+#: ../src/itdb_device.c:281
+msgid "Nano (Silver)"
+msgstr "Nano(银)"
+
+#: ../src/itdb_device.c:282
+msgid "Nano (Blue)"
+msgstr "Nano(蓝)"
+
+#: ../src/itdb_device.c:283
+msgid "Nano (Green)"
+msgstr "Nano(绿)"
+
+#: ../src/itdb_device.c:284
+msgid "Nano (Pink)"
+msgstr "Nano(粉)"
+
+#: ../src/itdb_device.c:285
+msgid "Nano (Red)"
+msgstr "Nano(红)"
+
+#: ../src/itdb_device.c:286
+msgid "Nano (Yellow)"
+msgstr "Nano(黄)"
+
+#: ../src/itdb_device.c:287
+msgid "Nano (Purple)"
+msgstr "Nano(ç´«)"
+
+#: ../src/itdb_device.c:288
+msgid "Nano (Orange)"
+msgstr "Nano(æ©™)"
+
+#: ../src/itdb_device.c:289
+msgid "iPhone (1)"
+msgstr "iPhone(1代)"
+
+#: ../src/itdb_device.c:290
+msgid "Shuffle (Silver)"
+msgstr "Shuffle(银)"
+
+#: ../src/itdb_device.c:291
+msgid "Shuffle (Pink)"
+msgstr "Shuffle(粉)"
+
+#: ../src/itdb_device.c:292
+msgid "Shuffle (Blue)"
+msgstr "Shuffle(蓝)"
+
+#: ../src/itdb_device.c:293
+msgid "Shuffle (Green)"
+msgstr "Shuffle(绿)"
+
+#: ../src/itdb_device.c:294
+msgid "Shuffle (Orange)"
+msgstr "Shuffle(æ©™)"
+
+#: ../src/itdb_device.c:295
+msgid "Shuffle (Purple)"
+msgstr "Shuffle(ç´«)"
+
+#: ../src/itdb_device.c:296
+msgid "Shuffle (Red)"
+msgstr "Shuffle(红)"
+
+#: ../src/itdb_device.c:297
+msgid "Classic (Silver)"
+msgstr "Classic(银)"
+
+#: ../src/itdb_device.c:298
+msgid "Classic (Black)"
+msgstr "Classic(黑)"
+
+#: ../src/itdb_device.c:299
+msgid "Touch (Black)"
+msgstr "Touch(黑)"
+
+#: ../src/itdb_device.c:306
+msgid "Regular (1st Gen.)"
+msgstr "标准(1代)"
+
+#: ../src/itdb_device.c:307
+msgid "Regular (2nd Gen.)"
+msgstr "标准(2代)"
+
+#: ../src/itdb_device.c:308
+msgid "Regular (3rd Gen.)"
+msgstr "标准(3代)"
+
+#: ../src/itdb_device.c:309
+msgid "Regular (4th Gen.)"
+msgstr "标准(4代)"
+
+#: ../src/itdb_device.c:310
+msgid "Photo"
+msgstr "Photo"
+
+#: ../src/itdb_device.c:311
+msgid "Mobile Phones"
+msgstr "Mobile Phones"
+
+#: ../src/itdb_device.c:312
+msgid "Mini (1st Gen.)"
+msgstr "Mini(1代)"
+
+#: ../src/itdb_device.c:313
+msgid "Mini (2nd Gen.)"
+msgstr "Mini(2代)"
+
+#: ../src/itdb_device.c:314
+msgid "Shuffle (1st Gen.)"
+msgstr "Shuffle(1代)"
+
+#: ../src/itdb_device.c:315
+msgid "Shuffle (2nd Gen.)"
+msgstr "Shuffle(2代)"
+
+#: ../src/itdb_device.c:316
+msgid "Shuffle (3rd Gen.)"
+msgstr "Shuffle(3代)"
+
+#: ../src/itdb_device.c:317
+msgid "Nano (1st Gen.)"
+msgstr "Nano(1代)"
+
+#: ../src/itdb_device.c:318
+msgid "Nano (2nd Gen.)"
+msgstr "Nano(2代)"
+
+#: ../src/itdb_device.c:319
+msgid "Nano Video (3rd Gen.)"
+msgstr "Nano Video(3代)"
+
+#: ../src/itdb_device.c:320
+msgid "Nano Video (4th Gen.)"
+msgstr "Nano Video(4代)"
+
+#: ../src/itdb_device.c:321
+msgid "Video (1st Gen.)"
+msgstr "Video(1代)"
+
+#: ../src/itdb_device.c:322
+msgid "Video (2nd Gen.)"
+msgstr "Video(2代)"
+
+#: ../src/itdb_device.c:323 ../src/itdb_device.c:324
+msgid "Classic"
+msgstr "Classic"
+
+#: ../src/itdb_device.c:325
+msgid "Touch"
+msgstr "Touch"
+
+#: ../src/itdb_device.c:326
+msgid "iPhone"
+msgstr "iPhone"
+
+#: ../src/itdb_device.c:327 ../src/itdb_device.c:328
+msgid "Unused"
+msgstr "未使用"
+
+#: ../src/itdb_device.c:928
+#, c-format
+msgid "Could not open '%s' for writing."
+msgstr "无法打开'%s'写入。"
+
+#: ../src/itdb_device.c:937
+#, c-format
+msgid "Device directory does not exist."
+msgstr "设备目录不存在。"
+
+#: ../src/itdb_itunesdb.c:507
+#, c-format
+msgid "Illegal seek to offset %ld (length %ld) in file '%s'."
+msgstr "超出文件'%3$s'(长度%2$ld)搜索位置%1$ld"
+
+#: ../src/itdb_itunesdb.c:910
+#, c-format
+msgid "Not a Play Counts file: '%s' (missing mhdp header)."
+msgstr "不是一个播放次数记录文件:'%s'(缺少mhdp头)"
+
+#: ../src/itdb_itunesdb.c:925
+#, c-format
+msgid "Play Counts file ('%s'): header length smaller than expected (%d<96)."
+msgstr "播放次数记录文件('%s'): 文件头长度小于预期(%d<96)。"
+
+#: ../src/itdb_itunesdb.c:939
+#, c-format
+msgid "Play Counts file ('%s'): entry length smaller than expected (%d<12)."
+msgstr "播放次数记录文件('%s'): 项目长度小于预期(%d<12)。"
+
+#: ../src/itdb_itunesdb.c:1014
+#, c-format
+msgid "iTunesStats file ('%s'): entry length smaller than expected (%d<18)."
+msgstr "iTunesStats文件('%s'):项目长度小于预期(%d<18)。"
+
+#: ../src/itdb_itunesdb.c:1333
+#, c-format
+msgid "iTunesDB corrupt: no MHOD at offset %ld in file '%s'."
+msgstr "iTunesDB损坏:文件'%2$s'中 %1$ld 位置没有MHOD。"
+
+#: ../src/itdb_itunesdb.c:1519
+#, c-format
+msgid "Unknown smart rule action at %ld: %x. Trying to continue.\n"
+msgstr "%ld位置有未知的smart规则动作:%x,尝试继续。\n"
+
+#: ../src/itdb_itunesdb.c:1550
+#, c-format
+msgid ""
+"Length of smart playlist rule field (%d) not as expected. Trying to continue "
+"anyhow.\n"
+msgstr "智能播放列表规则区(%d)的长度超出范围,尝试继续。\n"
+
+#: ../src/itdb_itunesdb.c:1593
+#, c-format
+msgid "iTunesDB corrupt: no SLst at offset %ld in file '%s'."
+msgstr "iTunesDB损坏:文件'%2$s'中 %1$ld 位置没有SLst。"
+
+#: ../src/itdb_itunesdb.c:1606
+#, c-format
+msgid ""
+"Encountered unknown MHOD type (%d) while parsing the iTunesDB. Ignoring.\n"
+"\n"
+msgstr ""
+"检查iTunesDB时发现未知MHOD类型(%d),忽略。\n"
+"\n"
+
+#: ../src/itdb_itunesdb.c:1689
+#, c-format
+msgid "iTunesDB corrupt: hunk length 0 for hunk at %ld in file '%s'."
+msgstr "iTunesDB损坏:文件'%2$s'中%1$ld位置大量0。"
+
+#: ../src/itdb_itunesdb.c:1702
+#, c-format
+msgid ""
+"iTunesDB corrupt: no section '%s' found in section '%s' starting at %ld."
+msgstr "iTunesDB损坏:'%2$s'部分%3$ld位置找不到'%1$s'"
+
+#: ../src/itdb_itunesdb.c:1716
+#, c-format
+msgid ""
+"header length of '%s' smaller than expected (%d < %d) at offset %ld in file "
+"'%s'."
+msgstr "文件'%5$s'中%4$ld位置的'%1$s'起始部分长度小于预期(%2$d < %3$d)"
+
+#: ../src/itdb_itunesdb.c:1801
+#, c-format
+msgid "Not a iTunesDB: '%s' (missing mhdb header)."
+msgstr "不是iTunesDB:'%s'(缺少mhdb头)。"
+
+#: ../src/itdb_itunesdb.c:1818
+#, c-format
+msgid ""
+"iTunesDB ('%s'): header length of mhsd hunk smaller than expected (%d<32). "
+"Aborting."
+msgstr "iTunesDB('%s'):mhsd的起始部分长度小于预期(%d<32)。放弃。"
+
+#: ../src/itdb_itunesdb.c:1839
+#, c-format
+msgid "iTunesDB '%s' corrupt: mhsd expected at %ld."
+msgstr "iTunesDB'%s'损坏:mhsd的预期位置为%ld。"
+
+#: ../src/itdb_itunesdb.c:1944
+#, c-format
+msgid "Number of MHODs in mhip at %ld inconsistent in file '%s'."
+msgstr "Number of MHODs in mhip at %ld inconsistent in file '%s'."
+
+#: ../src/itdb_itunesdb.c:2121
+#, c-format
+msgid "Number of MHODs in mhyp at %ld inconsistent in file '%s'."
+msgstr "Number of MHODs in mhyp at %ld inconsistent in file '%s'."
+
+#: ../src/itdb_itunesdb.c:2131
+msgid "Master-PL"
+msgstr "主播放列表"
+
+#: ../src/itdb_itunesdb.c:2135
+msgid "Podcasts"
+msgstr "Podcasts"
+
+#: ../src/itdb_itunesdb.c:2137
+msgid "Playlist"
+msgstr "播放列表"
+
+#: ../src/itdb_itunesdb.c:2159
+#, c-format
+msgid ""
+"iTunesDB corrupt: number of mhip sections inconsistent in mhyp starting at %"
+"ld in file '%s'."
+msgstr ""
+"iTunesDB损坏:number of mhip sections inconsistent in mhyp starting at %ld "
+"in file '%s'."
+
+#: ../src/itdb_itunesdb.c:2180
+#, c-format
+msgid "Itdb_Track ID '%d' not found.\n"
+msgstr "找不到Itdb_Track %d'。\n"
+
+#: ../src/itdb_itunesdb.c:2524
+msgid "OTG Playlist"
+msgstr "OTG播放列表"
+
+#: ../src/itdb_itunesdb.c:2542
+#, c-format
+msgid "Not a OTG playlist file: '%s' (missing mhpo header)."
+msgstr "不是OTG播放列表:'%s'(缺少mhpo头)"
+
+#: ../src/itdb_itunesdb.c:2556
+#, c-format
+msgid "OTG playlist file ('%s'): header length smaller than expected (%d<20)."
+msgstr "OTG播放列表('%s'):起始长度小于预期(%d<20)。"
+
+#: ../src/itdb_itunesdb.c:2568
+#, c-format
+msgid "OTG playlist file ('%s'): entry length smaller than expected (%d<4)."
+msgstr "OTG播放列表('%s'):项目长度小于预期(%d<4)。"
+
+#: ../src/itdb_itunesdb.c:2603
+#, c-format
+msgid "OTG playlist file '%s': reference to non-existent track (%d)."
+msgstr "OTG播放列表('%s'):指向不存在的音轨(%d)。"
+
+#: ../src/itdb_itunesdb.c:2648
+#, c-format
+msgid "OTG Playlist %d"
+msgstr "OTG播放列表%d"
+
+#. this should not be -- issue warning
+#: ../src/itdb_itunesdb.c:2716
+msgid ""
+"iTunesDB corrupt: number of tracks (mhit hunks) inconsistent. Trying to "
+"continue.\n"
+msgstr "iTunesDB损坏:音轨数(mhit块)不一致,尝试继续。\n"
+
+#. this should not be -- issue warning
+#: ../src/itdb_itunesdb.c:2779
+msgid ""
+"iTunesDB possibly corrupt: number of playlists (mhyp hunks) inconsistent. "
+"Trying to continue.\n"
+msgstr "iTunesDB可能损坏:播放列表数(mhyp块)不一致。\n"
+
+#: ../src/itdb_itunesdb.c:2826
+#, c-format
+msgid ""
+"iTunesDB '%s' corrupt: Could not find tracklist (no mhsd type 1 section "
+"found)"
+msgstr "iTunesDB'%s'损坏:找不到音轨列表(找不到mhsd type 1字段)"
+
+#: ../src/itdb_itunesdb.c:2855
+#, c-format
+msgid ""
+"iTunesDB '%s' corrupt: Could not find playlists (no mhsd type 2 or type 3 "
+"sections found)"
+msgstr "iTunesDB'%s'损坏:找不到播放列表(找不到mhsd type 2或type 3字段)"
+
+#: ../src/itdb_itunesdb.c:2877
+#, c-format
+msgid "iTunes directory not found: '%s' (or similar)."
+msgstr "找不到iTunes目录:'%s'(或类似)"
+
+#: ../src/itdb_itunesdb.c:2894
+#, c-format
+msgid "Music directory not found: '%s' (or similar)."
+msgstr "找不到音乐目录:'%s'(或类似)"
+
+#: ../src/itdb_itunesdb.c:2912
+#, c-format
+msgid "Control directory not found: '%s' (or similar)."
+msgstr "找不到控制目录:'%s'(或类似)"
+
+#: ../src/itdb_itunesdb.c:3033
+#, c-format
+msgid "File not found: '%s'."
+msgstr "找不到文件:'%s'"
+
+#: ../src/itdb_itunesdb.c:5533
+#, c-format
+msgid "Path not found: '%s' (or similar)."
+msgstr "找不到路径:'%s'(或类似)"
+
+#: ../src/itdb_itunesdb.c:5742
+#, c-format
+msgid "Error renaming '%s' to '%s' (%s)."
+msgstr "重命名'%s'到'%s'(%s)出现错误。"
+
+#: ../src/itdb_itunesdb.c:5759 ../src/itdb_itunesdb.c:5776
+#: ../src/itdb_itunesdb.c:5793
+#, c-format
+msgid "Error removing '%s' (%s)."
+msgstr "移除'%s'(%s)出现错误。"
+
+#: ../src/itdb_itunesdb.c:5960 ../src/itdb_itunesdb.c:6133
+#, c-format
+msgid "Mountpoint not set."
+msgstr "没有设置挂载点。"
+
+#: ../src/itdb_itunesdb.c:6000
+#, c-format
+msgid "No 'F..' directories found in '%s'."
+msgstr "'%s'中找不到目录。"
+
+#: ../src/itdb_itunesdb.c:6021
+#, c-format
+msgid "Path not found: '%s'."
+msgstr "找不到路径:'%s'"
+
+#: ../src/itdb_itunesdb.c:6142
+#, c-format
+msgid "'%s' could not be accessed (%s)."
+msgstr "无法存取'%s'(%s)"
+
+#: ../src/itdb_itunesdb.c:6152
+#, c-format
+msgid ""
+"Destination file '%s' does not appear to be on the iPod mounted at '%s'."
+msgstr "目标文件'%s'似乎不存在于'%s'上的iPod中"
+
+#: ../src/itdb_itunesdb.c:6360
+#, c-format
+msgid "Error opening '%s' for reading (%s)."
+msgstr "打开'%s'读取时出错(%s)。"
+
+#: ../src/itdb_itunesdb.c:6372
+#, c-format
+msgid "Error opening '%s' for writing (%s)."
+msgstr "打开'%s'写入时出错(%s)。"
+
+#: ../src/itdb_itunesdb.c:6388
+#, c-format
+msgid "Error while reading from '%s' (%s)."
+msgstr "读取'%s'时出错(%s)。"
+
+#: ../src/itdb_itunesdb.c:6403
+#, c-format
+msgid "Error while writing to '%s' (%s)."
+msgstr "写入'%s'时出错(%s)。"
+
+#: ../src/itdb_itunesdb.c:6416 ../src/itdb_itunesdb.c:6426
+#, c-format
+msgid "Error when closing '%s' (%s)."
+msgstr "关闭'%s'时出错(%s)。"
+
+#: ../src/itdb_itunesdb.c:6856
+msgid "iPod"
+msgstr "iPod"
+
+#: ../src/itdb_itunesdb.c:7178
+#, c-format
+msgid "Problem creating iPod directory or file: '%s'."
+msgstr "创建iPod目录或文件时出现问题:'%s'。"
+
+#: ../src/itdb_photoalbum.c:111
+#, c-format
+msgid "Photos directory not found: '%s' (or similar)."
+msgstr "找不到照片目录:'%s'(或类似)"
+
+#: ../src/itdb_photoalbum.c:266 ../src/itdb_photoalbum.c:460
+msgid "Photo Library"
+msgstr "照片库"
+
+#: ../src/itdb_photoalbum.c:386
+#, c-format
+msgid "You need to specify the iPod model used before photos can be added."
+msgstr "在添加照片之前请您先指明使用的iPod型号。"
+
+#: ../src/itdb_photoalbum.c:407
+#, c-format
+msgid ""
+"Your iPod does not seem to support photos. Maybe you need to specify the "
+"correct iPod model number? It is currently set to 'x%s' (%s/%s)."
+msgstr ""
+"你的iPod似乎不支持照片功能,也许你需要一个正确的iPod型号,当前的设置为'x%"
+"s' (%s/%s)."
+
+#: ../src/itdb_photoalbum.c:419
+#, c-format
+msgid "Could not access file '%s'. Photo not added."
+msgstr "无法存取文件'%s',没有添加照片。"
+
+#: ../src/itdb_photoalbum.c:448
+#, c-format
+msgid ""
+"Unexpected error in itdb_photodb_add_photo_internal() while adding photo, "
+"please report."
+msgstr "添加照片时itdb_photodb_add_photo_internal() 发现未预期错误,请报告。"
+
+#: ../src/itdb_photoalbum.c:468
+#, c-format
+msgid ""
+"Library compiled without gdk-pixbuf support. Picture support is disabled."
+msgstr "libgpod编译时没有加入gdk-pixbuf支持,相片功能已关闭"
+
+#. New action!
+#: ../src/itdb_playlist.c:78
+#, c-format
+msgid "Unknown action (%d) in smart playlist will be ignored.\n"
+msgstr "忽略智能播放列表中未知动作(%d)。\n"
+
+#: ../src/itdb_thumb.c:326
+#, c-format
+msgid "Illegal filename: '%s'.\n"
+msgstr "非法文件名:'%s'。\n"
+
+#: ../src/itdb_thumb.c:331
+#, c-format
+msgid "Mountpoint not set.\n"
+msgstr "没有设置挂载点。\n"
+
+#: ../tests/test-photos.c:41
+#, c-format
+msgid ""
+"Usage to add photos:\n"
+"  %s add <mountpoint> <albumname> [<filename(s)>]\n"
+"  <albumname> should be set to 'NULL' to add photos to the master photo "
+"album\n"
+"  (Photo Library) only. If you don't specify any filenames an empty album "
+"will\n"
+"  be created.\n"
+msgstr ""
+"添加照片的用法:\n"
+"  %s add <挂载点> <照片簿名> [<文件名(s)>]\n"
+"  照片簿名可以为空,此时照片添加到主照片簿中。\n"
+"  如果你没有指定文件名则创建一个空白的照片簿。\n"
+
+#: ../tests/test-photos.c:42
+#, c-format
+msgid ""
+"Usage to dump all photos to <output_dir>:\n"
+"  %s dump <mountpoint> <output_dir>\n"
+msgstr ""
+"导出所有照片到指定输出目录的用法:\n"
+"  %s dump <挂载点> <指定输出目录>\n"
+
+#: ../tests/test-photos.c:43
+#, c-format
+msgid ""
+"Usage to list all photos IDs to stdout:\n"
+"  %s list <mountpoint>\n"
+msgstr ""
+"在终端列出所有照片名的用法:\n"
+"  %s list <挂载点>\n"
+
+#: ../tests/test-photos.c:44
+#, c-format
+msgid ""
+"Usage to remove photo IDs from Photo Library:\n"
+"  %s remove <mountpoint> <albumname> [<ID(s)>]\n"
+"  <albumname> should be set to 'NULL' to remove photos from the iPod\n"
+"  altogether. If you don't specify any IDs, the photoalbum will be removed\n"
+"  instead.\n"
+"  WARNING: IDs may change when writing the PhotoDB file.\n"
+msgstr ""
+"从照片库移除照片的用法:\n"
+"   %s remove <挂载点> <照片簿名> [<照片名(s)>] \n"
+"   <照片簿名>可以为空用来同时从iPod移除照片,如果不指定任何照片名,那么就删除"
+"照片簿。\n"
+"   警告:当写入PhotoDB是照片名可能发生了变化。\n"
+
+#: ../tests/test-photos.c:119
+#, c-format
+msgid "Wrong number of command line arguments.\n"
+msgstr "命令行的参数数目不对。\n"
+
+#: ../tests/test-photos.c:128
+#, c-format
+msgid "Error creating '%s' (mkdir)\n"
+msgstr "创建(mkdir)'%s'时出错\n"
+
+#: ../tests/test-photos.c:134
+#, c-format
+msgid "Error: '%s' is not a directory\n"
+msgstr "错误:'%s'不是一个目录。\n"
+
+#: ../tests/test-photos.c:143 ../tests/test-photos.c:177
+#: ../tests/test-photos.c:306
+#, c-format
+msgid "Error reading iPod photo database (%s).\n"
+msgstr "读取iPod照片数据库时出错(%s)。\n"
+
+#: ../tests/test-photos.c:149 ../tests/test-photos.c:183
+#: ../tests/test-photos.c:313
+#, c-format
+msgid "Error reading iPod photo database.\n"
+msgstr "读取iPod照片数据库时出错。\n"
+
+#: ../tests/test-photos.c:167 ../tests/test-photos.c:226
+#: ../tests/test-photos.c:296 ../tests/test-photos.c:379
+#, c-format
+msgid "Insufficient number of command line arguments.\n"
+msgstr "命令行的参数不足。\n"
+
+#: ../tests/test-photos.c:194
+msgid "<Unnamed>"
+msgstr "<未命名的>"
+
+#: ../tests/test-photos.c:209
+#, c-format
+msgid "<No members>\n"
+msgstr "<无成员>\n"
+
+#: ../tests/test-photos.c:236
+#, c-format
+msgid ""
+"Error reading iPod photo database (%s).\n"
+"Will attempt to create a new database.\n"
+msgstr ""
+"读取iPod照片数据库(%s)时出现错误。\n"
+"尝试创建新的数据库。\n"
+
+#: ../tests/test-photos.c:242
+#, c-format
+msgid ""
+"Error reading iPod photo database, will attempt to create a new database\n"
+msgstr "读取iPod照片数据库时出错,尝试创建新的数据库\n"
+
+#: ../tests/test-photos.c:267
+#, c-format
+msgid "Error adding photo (%s) to photo database: %s\n"
+msgstr "加入照片(%s)到数据库时出错:%s\n"
+
+#: ../tests/test-photos.c:324
+#, c-format
+msgid "Specified album '%s' not found. Aborting.\n"
+msgstr "找不到指定照片簿'%s',放弃。\n"
+
+#: ../tests/test-photos.c:336
+#, c-format
+msgid "Cannot remove Photo Library playlist. Aborting.\n"
+msgstr "无法移除照片库,放弃。\n"
+
+#: ../tests/test-photos.c:357
+#, c-format
+msgid "Warning: could not find photo with ID <%d>. Skipping...\n"
+msgstr "警告:无法找到名为<%d>的照片,忽略\n"
+
+#: ../tests/test-photos.c:403
+#, c-format
+msgid "Unknown command '%s'\n"
+msgstr "未知命令'%s'\n"
+
+#: ../tests/test-init-ipod.c:66
+#, c-format
+msgid "Error initialising iPod: %s\n"
+msgstr "初始化iPod错误:%s\n"
+
+#: ../tests/test-init-ipod.c:73
+#, c-format
+msgid "Error initialising iPod, unknown error\n"
+msgstr "初始化iPod出错,未知错误\n"
+
+#: ../tools/ipod-time-sync.c:37
+#, fuzzy, c-format
+msgid "usage: %s <device> [timezone]\n"
+msgstr "用法:%s <设备> <挂载点>\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:39
+#, c-format
+msgid "usage: %s <device> <mountpoint>\n"
+msgstr "用法:%s <设备> <挂载点>\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:45
+#, c-format
+msgid "Couldn't read xml sysinfo from %s\n"
+msgstr "无法从%s中读取xml sysinfo\n"
+
+#: ../tools/read-sysinfoextended-sgutils.c:56
+#, c-format
+msgid "Couldn't resolve Device directory path on %s"
+msgstr "在%s中无法获得设备目录的路径"
+
+#: ../tools/read-sysinfoextended-sgutils.c:64
+#, c-format
+msgid "Couldn't resolve SysInfoExtended path on %s"
+msgstr "在%s中无法找到SysInfoExtende的路径"
+
+#: ../tools/read-sysinfoextended-sgutils.c:74
+#, c-format
+msgid "Couldn't write SysInfoExtended to %s"
+msgstr "无法向%s写入SysInfoExtended"
+
+#~ msgid "Could not find artwork entry (mhii id: %u) for track (dbid: %s).\n"
+#~ msgstr "无法找到对应音轨(dbid:%2$s)的专辑封面(mhii id:%1$u)\n"

Added: libgpod/trunk/libgpod/branches/upstream/current/py-compile
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/py-compile	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/py-compile	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,146 @@
+#!/bin/sh
+# py-compile - Compile a Python program
+
+scriptversion=2005-05-14.22
+
+# Copyright (C) 2000, 2001, 2003, 2004, 2005  Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake at gnu.org> or send patches to
+# <automake-patches at gnu.org>.
+
+if [ -z "$PYTHON" ]; then
+  PYTHON=python
+fi
+
+basedir=
+destdir=
+files=
+while test $# -ne 0; do
+  case "$1" in
+    --basedir)
+      basedir=$2
+      if test -z "$basedir"; then
+        echo "$0: Missing argument to --basedir." 1>&2
+        exit 1
+      fi
+      shift
+      ;;
+    --destdir)
+      destdir=$2
+      if test -z "$destdir"; then
+        echo "$0: Missing argument to --destdir." 1>&2
+        exit 1
+      fi
+      shift
+      ;;
+    -h|--h*)
+      cat <<\EOF
+Usage: py-compile [--help] [--version] [--basedir DIR] [--destdir DIR] FILES..."
+
+Byte compile some python scripts FILES.  Use --destdir to specify any
+leading directory path to the FILES that you don't want to include in the
+byte compiled file.  Specify --basedir for any additional path information you
+do want to be shown in the byte compiled file.
+
+Example:
+  py-compile --destdir /tmp/pkg-root --basedir /usr/share/test test.py test2.py
+
+Report bugs to <bug-automake at gnu.org>.
+EOF
+      exit $?
+      ;;
+    -v|--v*)
+      echo "py-compile $scriptversion"
+      exit $?
+      ;;
+    *)
+      files="$files $1"
+      ;;
+  esac
+  shift
+done
+
+if test -z "$files"; then
+    echo "$0: No files given.  Try \`$0 --help' for more information." 1>&2
+    exit 1
+fi
+
+# if basedir was given, then it should be prepended to filenames before
+# byte compilation.
+if [ -z "$basedir" ]; then
+    pathtrans="path = file"
+else
+    pathtrans="path = os.path.join('$basedir', file)"
+fi
+
+# if destdir was given, then it needs to be prepended to the filename to
+# byte compile but not go into the compiled file.
+if [ -z "$destdir" ]; then
+    filetrans="filepath = path"
+else
+    filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)"
+fi
+
+$PYTHON -c "
+import sys, os, string, py_compile
+
+files = '''$files'''
+
+print 'Byte-compiling python modules...'
+for file in string.split(files):
+    $pathtrans
+    $filetrans
+    if not os.path.exists(filepath) or not (len(filepath) >= 3
+                                            and filepath[-3:] == '.py'):
+	continue
+    print file,
+    sys.stdout.flush()
+    py_compile.compile(filepath, filepath + 'c', path)
+print" || exit $?
+
+# this will fail for python < 1.5, but that doesn't matter ...
+$PYTHON -O -c "
+import sys, os, string, py_compile
+
+files = '''$files'''
+print 'Byte-compiling python modules (optimized versions) ...'
+for file in string.split(files):
+    $pathtrans
+    $filetrans
+    if not os.path.exists(filepath) or not (len(filepath) >= 3
+                                            and filepath[-3:] == '.py'):
+	continue
+    print file,
+    sys.stdout.flush()
+    py_compile.compile(filepath, filepath + 'o', path)
+print" 2>/dev/null || :
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:


Property changes on: libgpod/trunk/libgpod/branches/upstream/current/py-compile
___________________________________________________________________
Added: svn:executable
   + 

Added: libgpod/trunk/libgpod/branches/upstream/current/src/Makefile.am
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/Makefile.am	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/Makefile.am	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,55 @@
+lib_LTLIBRARIES = libgpod.la
+
+libgpod_la_SOURCES = 		\
+	db-artwork-debug.c  	\
+	db-artwork-parser.c 	\
+	db-artwork-writer.c 	\
+	db-image-parser.c   	\
+	db-parse-context.c  	\
+	itdb_artwork.c   	\
+	itdb_chapterdata.c   	\
+	itdb_device.c  		\
+	itdb_itunesdb.c 	\
+	itdb_photoalbum.c 	\
+	itdb_playlist.c  	\
+	itdb_plist.c		\
+	itdb_sha1.c 		\
+	itdb_sysinfo_extended_parser.c \
+	itdb_thumb.c		\
+	itdb_track.c     	\
+	ithumb-writer.c 	\
+	pixmaps.c 		\
+	sha1.c
+
+if WITH_INTERNAL_GCHECKSUM
+libgpod_la_SOURCES += gchecksum.c gchecksum.h
+libgpod_la_CFLAGS = -DWITH_INTERNAL_GCHECKSUM
+endif
+
+libgpod_la_LDFLAGS = -version-info $(LIBGPOD_SO_VERSION) -no-undefined
+
+libgpodincludebase = $(includedir)/gpod-1.0
+libgpodincludedir = $(libgpodincludebase)/gpod
+libgpodinclude_HEADERS = itdb.h
+noinst_HEADERS = 		\
+	db-artwork-debug.h	\
+	db-artwork-parser.h 	\
+	db-image-parser.h   	\
+	db-itunes-parser.h  	\
+	db-parse-context.h  	\
+	itdb_device.h  		\
+	itdb_endianness.h 	\
+	itdb_plist.h		\
+	itdb_private.h   	\
+	itdb_sha1.h 		\
+	itdb_sysinfo_extended_parser.h \
+	itdb_thumb.h		\
+	pixmaps.h		\
+	sha1.h
+
+INCLUDES=$(LIBGPOD_CFLAGS)
+LIBS=$(LIBGPOD_LIBS) -lm
+
+uninstall-hook:
+	-rmdir --ignore-fail-on-non-empty $(DESTDIR)$(libgpodincludedir)
+	-rmdir --ignore-fail-on-non-empty $(DESTDIR)$(libgpodincludebase)

Added: libgpod/trunk/libgpod/branches/upstream/current/src/Makefile.in
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/Makefile.in	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/Makefile.in	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,784 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  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@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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@
+ at WITH_INTERNAL_GCHECKSUM_TRUE@am__append_1 = gchecksum.c gchecksum.h
+subdir = src
+DIST_COMMON = $(libgpodinclude_HEADERS) $(noinst_HEADERS) \
+	$(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \
+	$(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/python.m4 \
+	$(top_srcdir)/m4/swig.m4 $(top_srcdir)/configure.ac
+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)" \
+	"$(DESTDIR)$(libgpodincludedir)"
+libLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(lib_LTLIBRARIES)
+libgpod_la_LIBADD =
+am__libgpod_la_SOURCES_DIST = db-artwork-debug.c db-artwork-parser.c \
+	db-artwork-writer.c db-image-parser.c db-parse-context.c \
+	itdb_artwork.c itdb_chapterdata.c itdb_device.c \
+	itdb_itunesdb.c itdb_photoalbum.c itdb_playlist.c itdb_plist.c \
+	itdb_sha1.c itdb_sysinfo_extended_parser.c itdb_thumb.c \
+	itdb_track.c ithumb-writer.c pixmaps.c sha1.c gchecksum.c \
+	gchecksum.h
+ at WITH_INTERNAL_GCHECKSUM_TRUE@am__objects_1 = libgpod_la-gchecksum.lo
+am_libgpod_la_OBJECTS = libgpod_la-db-artwork-debug.lo \
+	libgpod_la-db-artwork-parser.lo \
+	libgpod_la-db-artwork-writer.lo libgpod_la-db-image-parser.lo \
+	libgpod_la-db-parse-context.lo libgpod_la-itdb_artwork.lo \
+	libgpod_la-itdb_chapterdata.lo libgpod_la-itdb_device.lo \
+	libgpod_la-itdb_itunesdb.lo libgpod_la-itdb_photoalbum.lo \
+	libgpod_la-itdb_playlist.lo libgpod_la-itdb_plist.lo \
+	libgpod_la-itdb_sha1.lo \
+	libgpod_la-itdb_sysinfo_extended_parser.lo \
+	libgpod_la-itdb_thumb.lo libgpod_la-itdb_track.lo \
+	libgpod_la-ithumb-writer.lo libgpod_la-pixmaps.lo \
+	libgpod_la-sha1.lo $(am__objects_1)
+libgpod_la_OBJECTS = $(am_libgpod_la_OBJECTS)
+libgpod_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libgpod_la_CFLAGS) \
+	$(CFLAGS) $(libgpod_la_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -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 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(libgpod_la_SOURCES)
+DIST_SOURCES = $(am__libgpod_la_SOURCES_DIST)
+libgpodincludeHEADERS_INSTALL = $(INSTALL_HEADER)
+HEADERS = $(libgpodinclude_HEADERS) $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+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@
+GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@
+GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@
+GDKPIXBUF_REQ = @GDKPIXBUF_REQ@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+HALCALLOUTSDIR = @HALCALLOUTSDIR@
+HALFDIDIR = @HALFDIDIR@
+HAL_CFLAGS = @HAL_CFLAGS@
+HAL_LIBS = @HAL_LIBS@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
+INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
+INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
+INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
+INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
+INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
+INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
+INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
+INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@
+INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
+INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
+INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
+INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
+INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
+INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
+LDFLAGS = @LDFLAGS@
+LIBGPOD_CFLAGS = @LIBGPOD_CFLAGS@
+LIBGPOD_LIBS = @LIBGPOD_LIBS@
+LIBGPOD_MAJOR_VERSION = @LIBGPOD_MAJOR_VERSION@
+LIBGPOD_MICRO_VERSION = @LIBGPOD_MICRO_VERSION@
+LIBGPOD_MINOR_VERSION = @LIBGPOD_MINOR_VERSION@
+LIBGPOD_SO_VERSION = @LIBGPOD_SO_VERSION@
+LIBGPOD_VERSION = @LIBGPOD_VERSION@
+LIBOBJS = @LIBOBJS@
+LIBS = $(LIBGPOD_LIBS) -lm
+LIBTOOL = @LIBTOOL@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_LIBS = @LIBXML_LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+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@
+PKG_CONFIG = @PKG_CONFIG@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+PYGOBJECT_CFLAGS = @PYGOBJECT_CFLAGS@
+PYGOBJECT_LIBS = @PYGOBJECT_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SGUTILS_LIBS = @SGUTILS_LIBS@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SWIG = @SWIG@
+SWIG_LIB = @SWIG_LIB@
+TAGLIB_CFLAGS = @TAGLIB_CFLAGS@
+TAGLIB_LIBS = @TAGLIB_LIBS@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+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@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+lib_LTLIBRARIES = libgpod.la
+libgpod_la_SOURCES = db-artwork-debug.c db-artwork-parser.c \
+	db-artwork-writer.c db-image-parser.c db-parse-context.c \
+	itdb_artwork.c itdb_chapterdata.c itdb_device.c \
+	itdb_itunesdb.c itdb_photoalbum.c itdb_playlist.c itdb_plist.c \
+	itdb_sha1.c itdb_sysinfo_extended_parser.c itdb_thumb.c \
+	itdb_track.c ithumb-writer.c pixmaps.c sha1.c $(am__append_1)
+ at WITH_INTERNAL_GCHECKSUM_TRUE@libgpod_la_CFLAGS = -DWITH_INTERNAL_GCHECKSUM
+libgpod_la_LDFLAGS = -version-info $(LIBGPOD_SO_VERSION) -no-undefined
+libgpodincludebase = $(includedir)/gpod-1.0
+libgpodincludedir = $(libgpodincludebase)/gpod
+libgpodinclude_HEADERS = itdb.h
+noinst_HEADERS = \
+	db-artwork-debug.h	\
+	db-artwork-parser.h 	\
+	db-image-parser.h   	\
+	db-itunes-parser.h  	\
+	db-parse-context.h  	\
+	itdb_device.h  		\
+	itdb_endianness.h 	\
+	itdb_plist.h		\
+	itdb_private.h   	\
+	itdb_sha1.h 		\
+	itdb_sysinfo_extended_parser.h \
+	itdb_thumb.h		\
+	pixmaps.h		\
+	sha1.h
+
+INCLUDES = $(LIBGPOD_CFLAGS)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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) --gnu  src/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    f=$(am__strip_dir) \
+	    echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
+	    $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+	  else :; fi; \
+	done
+
+uninstall-libLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  p=$(am__strip_dir) \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+	done
+
+clean-libLTLIBRARIES:
+	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libgpod.la: $(libgpod_la_OBJECTS) $(libgpod_la_DEPENDENCIES) 
+	$(libgpod_la_LINK) -rpath $(libdir) $(libgpod_la_OBJECTS) $(libgpod_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-db-artwork-debug.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-db-artwork-parser.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-db-artwork-writer.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-db-image-parser.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-db-parse-context.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-gchecksum.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-itdb_artwork.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-itdb_chapterdata.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-itdb_device.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-itdb_itunesdb.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-itdb_photoalbum.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-itdb_playlist.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-itdb_plist.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-itdb_sha1.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-itdb_sysinfo_extended_parser.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-itdb_thumb.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-itdb_track.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-ithumb-writer.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-pixmaps.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_la-sha1.Plo at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ 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@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ 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@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ 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 $@ $<
+
+libgpod_la-db-artwork-debug.lo: db-artwork-debug.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-db-artwork-debug.lo -MD -MP -MF $(DEPDIR)/libgpod_la-db-artwork-debug.Tpo -c -o libgpod_la-db-artwork-debug.lo `test -f 'db-artwork-debug.c' || echo '$(srcdir)/'`db-artwork-debug.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-db-artwork-debug.Tpo $(DEPDIR)/libgpod_la-db-artwork-debug.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='db-artwork-debug.c' object='libgpod_la-db-artwork-debug.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-db-artwork-debug.lo `test -f 'db-artwork-debug.c' || echo '$(srcdir)/'`db-artwork-debug.c
+
+libgpod_la-db-artwork-parser.lo: db-artwork-parser.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-db-artwork-parser.lo -MD -MP -MF $(DEPDIR)/libgpod_la-db-artwork-parser.Tpo -c -o libgpod_la-db-artwork-parser.lo `test -f 'db-artwork-parser.c' || echo '$(srcdir)/'`db-artwork-parser.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-db-artwork-parser.Tpo $(DEPDIR)/libgpod_la-db-artwork-parser.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='db-artwork-parser.c' object='libgpod_la-db-artwork-parser.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-db-artwork-parser.lo `test -f 'db-artwork-parser.c' || echo '$(srcdir)/'`db-artwork-parser.c
+
+libgpod_la-db-artwork-writer.lo: db-artwork-writer.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-db-artwork-writer.lo -MD -MP -MF $(DEPDIR)/libgpod_la-db-artwork-writer.Tpo -c -o libgpod_la-db-artwork-writer.lo `test -f 'db-artwork-writer.c' || echo '$(srcdir)/'`db-artwork-writer.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-db-artwork-writer.Tpo $(DEPDIR)/libgpod_la-db-artwork-writer.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='db-artwork-writer.c' object='libgpod_la-db-artwork-writer.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-db-artwork-writer.lo `test -f 'db-artwork-writer.c' || echo '$(srcdir)/'`db-artwork-writer.c
+
+libgpod_la-db-image-parser.lo: db-image-parser.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-db-image-parser.lo -MD -MP -MF $(DEPDIR)/libgpod_la-db-image-parser.Tpo -c -o libgpod_la-db-image-parser.lo `test -f 'db-image-parser.c' || echo '$(srcdir)/'`db-image-parser.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-db-image-parser.Tpo $(DEPDIR)/libgpod_la-db-image-parser.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='db-image-parser.c' object='libgpod_la-db-image-parser.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-db-image-parser.lo `test -f 'db-image-parser.c' || echo '$(srcdir)/'`db-image-parser.c
+
+libgpod_la-db-parse-context.lo: db-parse-context.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-db-parse-context.lo -MD -MP -MF $(DEPDIR)/libgpod_la-db-parse-context.Tpo -c -o libgpod_la-db-parse-context.lo `test -f 'db-parse-context.c' || echo '$(srcdir)/'`db-parse-context.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-db-parse-context.Tpo $(DEPDIR)/libgpod_la-db-parse-context.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='db-parse-context.c' object='libgpod_la-db-parse-context.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-db-parse-context.lo `test -f 'db-parse-context.c' || echo '$(srcdir)/'`db-parse-context.c
+
+libgpod_la-itdb_artwork.lo: itdb_artwork.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-itdb_artwork.lo -MD -MP -MF $(DEPDIR)/libgpod_la-itdb_artwork.Tpo -c -o libgpod_la-itdb_artwork.lo `test -f 'itdb_artwork.c' || echo '$(srcdir)/'`itdb_artwork.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-itdb_artwork.Tpo $(DEPDIR)/libgpod_la-itdb_artwork.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='itdb_artwork.c' object='libgpod_la-itdb_artwork.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-itdb_artwork.lo `test -f 'itdb_artwork.c' || echo '$(srcdir)/'`itdb_artwork.c
+
+libgpod_la-itdb_chapterdata.lo: itdb_chapterdata.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-itdb_chapterdata.lo -MD -MP -MF $(DEPDIR)/libgpod_la-itdb_chapterdata.Tpo -c -o libgpod_la-itdb_chapterdata.lo `test -f 'itdb_chapterdata.c' || echo '$(srcdir)/'`itdb_chapterdata.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-itdb_chapterdata.Tpo $(DEPDIR)/libgpod_la-itdb_chapterdata.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='itdb_chapterdata.c' object='libgpod_la-itdb_chapterdata.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-itdb_chapterdata.lo `test -f 'itdb_chapterdata.c' || echo '$(srcdir)/'`itdb_chapterdata.c
+
+libgpod_la-itdb_device.lo: itdb_device.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-itdb_device.lo -MD -MP -MF $(DEPDIR)/libgpod_la-itdb_device.Tpo -c -o libgpod_la-itdb_device.lo `test -f 'itdb_device.c' || echo '$(srcdir)/'`itdb_device.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-itdb_device.Tpo $(DEPDIR)/libgpod_la-itdb_device.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='itdb_device.c' object='libgpod_la-itdb_device.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-itdb_device.lo `test -f 'itdb_device.c' || echo '$(srcdir)/'`itdb_device.c
+
+libgpod_la-itdb_itunesdb.lo: itdb_itunesdb.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-itdb_itunesdb.lo -MD -MP -MF $(DEPDIR)/libgpod_la-itdb_itunesdb.Tpo -c -o libgpod_la-itdb_itunesdb.lo `test -f 'itdb_itunesdb.c' || echo '$(srcdir)/'`itdb_itunesdb.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-itdb_itunesdb.Tpo $(DEPDIR)/libgpod_la-itdb_itunesdb.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='itdb_itunesdb.c' object='libgpod_la-itdb_itunesdb.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-itdb_itunesdb.lo `test -f 'itdb_itunesdb.c' || echo '$(srcdir)/'`itdb_itunesdb.c
+
+libgpod_la-itdb_photoalbum.lo: itdb_photoalbum.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-itdb_photoalbum.lo -MD -MP -MF $(DEPDIR)/libgpod_la-itdb_photoalbum.Tpo -c -o libgpod_la-itdb_photoalbum.lo `test -f 'itdb_photoalbum.c' || echo '$(srcdir)/'`itdb_photoalbum.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-itdb_photoalbum.Tpo $(DEPDIR)/libgpod_la-itdb_photoalbum.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='itdb_photoalbum.c' object='libgpod_la-itdb_photoalbum.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-itdb_photoalbum.lo `test -f 'itdb_photoalbum.c' || echo '$(srcdir)/'`itdb_photoalbum.c
+
+libgpod_la-itdb_playlist.lo: itdb_playlist.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-itdb_playlist.lo -MD -MP -MF $(DEPDIR)/libgpod_la-itdb_playlist.Tpo -c -o libgpod_la-itdb_playlist.lo `test -f 'itdb_playlist.c' || echo '$(srcdir)/'`itdb_playlist.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-itdb_playlist.Tpo $(DEPDIR)/libgpod_la-itdb_playlist.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='itdb_playlist.c' object='libgpod_la-itdb_playlist.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-itdb_playlist.lo `test -f 'itdb_playlist.c' || echo '$(srcdir)/'`itdb_playlist.c
+
+libgpod_la-itdb_plist.lo: itdb_plist.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-itdb_plist.lo -MD -MP -MF $(DEPDIR)/libgpod_la-itdb_plist.Tpo -c -o libgpod_la-itdb_plist.lo `test -f 'itdb_plist.c' || echo '$(srcdir)/'`itdb_plist.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-itdb_plist.Tpo $(DEPDIR)/libgpod_la-itdb_plist.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='itdb_plist.c' object='libgpod_la-itdb_plist.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-itdb_plist.lo `test -f 'itdb_plist.c' || echo '$(srcdir)/'`itdb_plist.c
+
+libgpod_la-itdb_sha1.lo: itdb_sha1.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-itdb_sha1.lo -MD -MP -MF $(DEPDIR)/libgpod_la-itdb_sha1.Tpo -c -o libgpod_la-itdb_sha1.lo `test -f 'itdb_sha1.c' || echo '$(srcdir)/'`itdb_sha1.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-itdb_sha1.Tpo $(DEPDIR)/libgpod_la-itdb_sha1.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='itdb_sha1.c' object='libgpod_la-itdb_sha1.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-itdb_sha1.lo `test -f 'itdb_sha1.c' || echo '$(srcdir)/'`itdb_sha1.c
+
+libgpod_la-itdb_sysinfo_extended_parser.lo: itdb_sysinfo_extended_parser.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-itdb_sysinfo_extended_parser.lo -MD -MP -MF $(DEPDIR)/libgpod_la-itdb_sysinfo_extended_parser.Tpo -c -o libgpod_la-itdb_sysinfo_extended_parser.lo `test -f 'itdb_sysinfo_extended_parser.c' || echo '$(srcdir)/'`itdb_sysinfo_extended_parser.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-itdb_sysinfo_extended_parser.Tpo $(DEPDIR)/libgpod_la-itdb_sysinfo_extended_parser.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='itdb_sysinfo_extended_parser.c' object='libgpod_la-itdb_sysinfo_extended_parser.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-itdb_sysinfo_extended_parser.lo `test -f 'itdb_sysinfo_extended_parser.c' || echo '$(srcdir)/'`itdb_sysinfo_extended_parser.c
+
+libgpod_la-itdb_thumb.lo: itdb_thumb.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-itdb_thumb.lo -MD -MP -MF $(DEPDIR)/libgpod_la-itdb_thumb.Tpo -c -o libgpod_la-itdb_thumb.lo `test -f 'itdb_thumb.c' || echo '$(srcdir)/'`itdb_thumb.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-itdb_thumb.Tpo $(DEPDIR)/libgpod_la-itdb_thumb.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='itdb_thumb.c' object='libgpod_la-itdb_thumb.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-itdb_thumb.lo `test -f 'itdb_thumb.c' || echo '$(srcdir)/'`itdb_thumb.c
+
+libgpod_la-itdb_track.lo: itdb_track.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-itdb_track.lo -MD -MP -MF $(DEPDIR)/libgpod_la-itdb_track.Tpo -c -o libgpod_la-itdb_track.lo `test -f 'itdb_track.c' || echo '$(srcdir)/'`itdb_track.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-itdb_track.Tpo $(DEPDIR)/libgpod_la-itdb_track.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='itdb_track.c' object='libgpod_la-itdb_track.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-itdb_track.lo `test -f 'itdb_track.c' || echo '$(srcdir)/'`itdb_track.c
+
+libgpod_la-ithumb-writer.lo: ithumb-writer.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-ithumb-writer.lo -MD -MP -MF $(DEPDIR)/libgpod_la-ithumb-writer.Tpo -c -o libgpod_la-ithumb-writer.lo `test -f 'ithumb-writer.c' || echo '$(srcdir)/'`ithumb-writer.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-ithumb-writer.Tpo $(DEPDIR)/libgpod_la-ithumb-writer.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='ithumb-writer.c' object='libgpod_la-ithumb-writer.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-ithumb-writer.lo `test -f 'ithumb-writer.c' || echo '$(srcdir)/'`ithumb-writer.c
+
+libgpod_la-pixmaps.lo: pixmaps.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-pixmaps.lo -MD -MP -MF $(DEPDIR)/libgpod_la-pixmaps.Tpo -c -o libgpod_la-pixmaps.lo `test -f 'pixmaps.c' || echo '$(srcdir)/'`pixmaps.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-pixmaps.Tpo $(DEPDIR)/libgpod_la-pixmaps.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='pixmaps.c' object='libgpod_la-pixmaps.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-pixmaps.lo `test -f 'pixmaps.c' || echo '$(srcdir)/'`pixmaps.c
+
+libgpod_la-sha1.lo: sha1.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-sha1.lo -MD -MP -MF $(DEPDIR)/libgpod_la-sha1.Tpo -c -o libgpod_la-sha1.lo `test -f 'sha1.c' || echo '$(srcdir)/'`sha1.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-sha1.Tpo $(DEPDIR)/libgpod_la-sha1.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='sha1.c' object='libgpod_la-sha1.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-sha1.lo `test -f 'sha1.c' || echo '$(srcdir)/'`sha1.c
+
+libgpod_la-gchecksum.lo: gchecksum.c
+ at am__fastdepCC_TRUE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -MT libgpod_la-gchecksum.lo -MD -MP -MF $(DEPDIR)/libgpod_la-gchecksum.Tpo -c -o libgpod_la-gchecksum.lo `test -f 'gchecksum.c' || echo '$(srcdir)/'`gchecksum.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_la-gchecksum.Tpo $(DEPDIR)/libgpod_la-gchecksum.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='gchecksum.c' object='libgpod_la-gchecksum.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_la_CFLAGS) $(CFLAGS) -c -o libgpod_la-gchecksum.lo `test -f 'gchecksum.c' || echo '$(srcdir)/'`gchecksum.c
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-libgpodincludeHEADERS: $(libgpodinclude_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(libgpodincludedir)" || $(MKDIR_P) "$(DESTDIR)$(libgpodincludedir)"
+	@list='$(libgpodinclude_HEADERS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(libgpodincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libgpodincludedir)/$$f'"; \
+	  $(libgpodincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libgpodincludedir)/$$f"; \
+	done
+
+uninstall-libgpodincludeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(libgpodinclude_HEADERS)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(libgpodincludedir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(libgpodincludedir)/$$f"; \
+	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; nonemtpy = 1; } \
+	      END { if (nonempty) { 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; nonempty = 1; } \
+	      END { if (nonempty) { 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=; \
+	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; nonempty = 1; } \
+	      END { if (nonempty) { 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)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    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 $(LTLIBRARIES) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libgpodincludedir)"; 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-libLTLIBRARIES clean-libtool \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-libgpodincludeHEADERS
+
+install-dvi: install-dvi-am
+
+install-exec-am: install-libLTLIBRARIES
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+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-libLTLIBRARIES uninstall-libgpodincludeHEADERS
+	@$(NORMAL_INSTALL)
+	$(MAKE) $(AM_MAKEFLAGS) uninstall-hook
+
+.MAKE: install-am install-strip uninstall-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libLTLIBRARIES 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-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am \
+	install-libLTLIBRARIES install-libgpodincludeHEADERS \
+	install-man install-pdf install-pdf-am install-ps \
+	install-ps-am 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-hook uninstall-libLTLIBRARIES \
+	uninstall-libgpodincludeHEADERS
+
+
+uninstall-hook:
+	-rmdir --ignore-fail-on-non-empty $(DESTDIR)$(libgpodincludedir)
+	-rmdir --ignore-fail-on-non-empty $(DESTDIR)$(libgpodincludebase)
+# 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:

Added: libgpod/trunk/libgpod/branches/upstream/current/src/db-artwork-debug.c
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/db-artwork-debug.c	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/db-artwork-debug.c	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,223 @@
+/*
+ *  Copyright (C) 2005 Christophe Fergeau
+ *
+ * 
+ *  The code contained in this file is free software; you can redistribute
+ *  it and/or modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either version
+ *  2.1 of the License, or (at your option) any later version.
+ *  
+ *  This file 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
+ *  Lesser General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this code; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ * 
+ *  iTunes and iPod are trademarks of Apple
+ * 
+ *  This product is not supported/written/published by Apple!
+ *
+ */
+
+#include "db-artwork-debug.h"
+
+/* FIXME: endianness (whole file) */
+
+#ifdef DEBUG_ARTWORKDB
+G_GNUC_INTERNAL void
+dump_mhif (MhifHeader *mhif)
+{
+
+	g_print ("MHIF (%zd):\n", sizeof (MhifHeader));
+	g_print ("\tHeader length: %d\n", GINT_FROM_LE (mhif->header_len));
+	g_print ("\tTotal length: %d\n", GINT_FROM_LE (mhif->total_len));
+	g_print ("\tUnknown1: %08x\n", GINT_FROM_LE (mhif->unknown1));
+	g_print ("\tFormat ID: %d (=> F%d_1.ithmb)\n", 
+		 GINT_FROM_LE (mhif->format_id),
+		 GINT_FROM_LE (mhif->format_id));
+	g_print ("\tImage size: %d bytes\n", GINT_FROM_LE (mhif->image_size));
+}
+
+G_GNUC_INTERNAL void
+dump_mhia (MhiaHeader *mhia)
+{
+	g_print ("MHIA (%zd):\n", sizeof (MhiaHeader));
+	g_print ("\tHeader length: %d\n", GINT_FROM_LE (mhia->header_len));
+	g_print ("\tTotal length: %d\n", GINT_FROM_LE (mhia->total_len));
+	g_print ("\tUnknown1: %08x\n", GINT_FROM_LE (mhia->unknown1));
+	g_print ("\tImage ID: %08x\n", GINT_FROM_LE (mhia->image_id));
+}
+
+static char *
+get_utf16_string (void* buffer, gint length)
+{
+	char *result;
+	gunichar2 *tmp;
+	int i;
+	/* Byte-swap the utf16 characters if necessary (I'm relying
+	 * on gcc to optimize most of this code away on LE platforms)
+	 */
+	tmp = g_memdup (buffer, length);
+	for (i = 0; i < length/2; i++) {
+		tmp[i] = GINT16_FROM_LE (tmp[i]);
+	}
+	result = g_utf16_to_utf8 (tmp, length/2, NULL, NULL, NULL);
+	g_free (tmp);
+
+	return result;	
+}
+
+G_GNUC_INTERNAL void 
+dump_mhod_string (ArtworkDB_MhodHeaderString *mhod) 
+{
+	gchar *str;
+
+	g_print ("MHOD [artwork type string] (%zd):\n", sizeof (ArtworkDB_MhodHeaderString));
+	g_print ("\tHeader length: %d\n", GINT_FROM_LE (mhod->header_len));
+	g_print ("\tTotal length: %d\n", GINT_FROM_LE (mhod->total_len));
+	g_print ("\tPadding: %04x\n", GINT_FROM_LE (mhod->padding_len));
+	g_print ("\tType: %04x\n", GINT_FROM_LE (mhod->type));
+	g_print ("\tUnknown1: %08x\n", GINT_FROM_LE (mhod->unknown1));
+	g_print ("\tUnknown2: %08x\n", GINT_FROM_LE (mhod->unknown2));
+	g_print ("\tString length: %u\n", GINT_FROM_LE (mhod->string_len));
+	g_print ("\tEncoding: %u\n", GINT_FROM_LE (mhod->encoding));
+	g_print ("\tUnknown4: %08x\n", GINT_FROM_LE (mhod->unknown4));
+	str = get_utf16_string (mhod->string, GINT_FROM_LE (mhod->string_len));
+	g_print ("\tString: %s\n", str);
+	g_free (str);
+}
+
+G_GNUC_INTERNAL void
+dump_mhni (MhniHeader *mhni) 
+{
+	unsigned int width  = GINT16_FROM_LE (mhni->image_width);
+	unsigned int height = GINT16_FROM_LE (mhni->image_height);
+
+	g_print ("MHNI (%zd):\n", sizeof (MhniHeader));
+	g_print ("\tHeader length: %d\n", GINT_FROM_LE (mhni->header_len));
+	g_print ("\tTotal length: %d\n", GINT_FROM_LE (mhni->total_len));
+	g_print ("\tNumber of children: %08x\n", GINT_FROM_LE (mhni->num_children));
+	g_print ("\tFormat ID: %d (=> F%d_1.ithmb)\n", 
+		 GINT_FROM_LE (mhni->format_id),
+		 GINT_FROM_LE (mhni->format_id));
+	g_print ("\tithmb offset: %u bytes\n", GINT_FROM_LE (mhni->ithmb_offset));
+	g_print ("\tImage size: %u bytes\n", GINT_FROM_LE (mhni->image_size));
+	g_print ("\tVertical padding: %d\n", GINT16_FROM_LE (mhni->vertical_padding));
+	g_print ("\tHorizontal padding: %d\n", GINT16_FROM_LE (mhni->horizontal_padding));
+	g_print ("\tImage dimensions: %ux%u\n", width, height);
+}
+
+G_GNUC_INTERNAL void
+dump_mhod (ArtworkDB_MhodHeader *mhod) 
+{
+	g_print ("MHOD (%zd):\n", sizeof (ArtworkDB_MhodHeader));
+	g_print ("\tHeader length: %d\n", GINT_FROM_LE (mhod->header_len));
+	g_print ("\tTotal length: %d\n", GINT_FROM_LE (mhod->total_len));
+	g_print ("\tType: %08x\n", GINT_FROM_LE (mhod->type));
+	g_print ("\tUnknown1: %08x\n", GINT_FROM_LE (mhod->unknown1));
+	g_print ("\tUnknown2: %08x\n", GINT_FROM_LE (mhod->unknown2));
+}
+
+G_GNUC_INTERNAL void
+dump_mhii (MhiiHeader *mhii)
+{
+	g_print ("MHII (%zd):\n", sizeof (MhiiHeader));
+	g_print ("\tHeader length: %d\n", GINT_FROM_LE (mhii->header_len));
+	g_print ("\tTotal length: %d\n", GINT_FROM_LE (mhii->total_len));
+	g_print ("\tNumber of children: %d\n", GINT_FROM_LE (mhii->num_children));
+	g_print ("\tImage ID: %08x\n", GINT_FROM_LE (mhii->image_id));
+	g_print ("\tSong ID: %016"G_GINT64_MODIFIER"x\n", GINT64_FROM_LE (mhii->song_id));
+	g_print ("\tUnknown4: %08x\n", GINT_FROM_LE (mhii->unknown4));
+	g_print ("\tRating: %08x\n", GINT_FROM_LE (mhii->rating));
+	g_print ("\tUnknown6: %08x\n", GINT_FROM_LE (mhii->unknown6));
+	g_print ("\tOrig Date: %08x\n", GINT_FROM_LE (mhii->orig_date));
+	g_print ("\tDigitised Date: %08x\n", GINT_FROM_LE (mhii->digitized_date));
+	g_print ("\tImage size: %d bytes\n", GINT_FROM_LE (mhii->orig_img_size));
+}
+
+G_GNUC_INTERNAL void
+dump_mhl (MhlHeader *mhl, const char *id)
+{
+	GString *str;
+
+	str = g_string_new (id);
+	g_string_ascii_up (str);
+	g_print ("%s (%zd):\n", str->str, sizeof (MhlHeader));
+	g_print ("\tHeader size: %d\n", GINT_FROM_LE (mhl->header_len));
+	g_print ("\tNumber of items: %d\n", GINT_FROM_LE (mhl->num_children));
+	g_string_free (str, TRUE);
+}
+
+G_GNUC_INTERNAL void
+dump_mhsd (ArtworkDB_MhsdHeader *mhsd)
+{
+	g_print ("MHSD (%zd):\n", sizeof (ArtworkDB_MhsdHeader));
+	g_print ("\tHeader length: %d\n", GINT_FROM_LE (mhsd->header_len));
+	g_print ("\tTotal length: %d\n", GINT_FROM_LE (mhsd->total_len));
+	g_print ("\tIndex: %d ", GINT16_FROM_LE (mhsd->index));
+	switch (GINT16_FROM_LE (mhsd->index)) {
+	case MHSD_IMAGE_LIST:
+		g_print ("(Image list)\n");
+		break;
+	case MHSD_ALBUM_LIST:
+		g_print ("(Album list)\n");
+		break;
+	case MHSD_FILE_LIST:
+		g_print ("(File list)\n");
+		break;
+
+	default:
+		g_print ("(Unknown index\n");
+		break;
+	}
+}
+
+G_GNUC_INTERNAL void
+dump_mhfd (MhfdHeader *mhfd)
+{
+	g_print ("MHFD (%zd):\n", sizeof (MhfdHeader));
+	g_print ("\tHeader length: %d\n", GINT_FROM_LE (mhfd->header_len));
+	g_print ("\tTotal length: %d\n", GINT_FROM_LE (mhfd->total_len));
+	g_print ("\tUnknown1: %08x\n", GINT_FROM_LE (mhfd->unknown1));
+	g_print ("\tUnknown2: %08x\n", GINT_FROM_LE (mhfd->unknown2));
+	g_print ("\tNumber of children: %d\n", GINT_FROM_LE (mhfd->num_children));
+	g_print ("\tUnknown3: %08x\n", GINT_FROM_LE (mhfd->unknown3));
+	g_print ("\tNext id: %08x\n", GINT_FROM_LE (mhfd->next_id));
+	g_print ("\tUnknown5: %016"G_GINT64_MODIFIER"x\n", GINT64_FROM_LE (mhfd->unknown5));
+	g_print ("\tUnknown6: %016"G_GINT64_MODIFIER"x\n", GINT64_FROM_LE (mhfd->unknown6));
+	g_print ("\tunknown_flag1: %04x\n", GINT_FROM_LE (mhfd->unknown_flag1));
+	g_print ("\tUnknown8: %08x\n", GINT_FROM_LE (mhfd->unknown8));
+	g_print ("\tUnknown9: %08x\n", GINT_FROM_LE (mhfd->unknown9));
+	g_print ("\tUnknown10: %08x\n", GINT_FROM_LE (mhfd->unknown10));
+	g_print ("\tUnknown11: %08x\n", GINT_FROM_LE (mhfd->unknown11));
+}
+
+G_GNUC_INTERNAL void
+dump_mhba (MhbaHeader *mhba)
+{
+	g_print ("MHBA (%zd):\n", sizeof (MhbaHeader));
+	g_print ("\tHeader length: %d\n", GINT_FROM_LE (mhba->header_len));
+	g_print ("\tTotal length: %d\n", GINT_FROM_LE (mhba->total_len));
+	g_print ("\tNumber of Data Objects: %d\n", GINT_FROM_LE (mhba->num_mhods));
+	g_print ("\tNumber of pictures in the album: %d\n", GINT_FROM_LE (mhba->num_mhias));
+	g_print ("\tAlbum ID: %08x\n", GINT_FROM_LE (mhba->album_id));
+	g_print ("\tUnk024: %04x\n", GINT_FROM_LE (mhba->unk024));
+	g_print ("\tUnk028: %04x\n", GINT16_FROM_LE (mhba->unk028));
+	g_print ("\tAlbum type: %02x\n", GUINT_FROM_LE (mhba->album_type));
+	g_print ("\tPlay music: %02x\n", GUINT_FROM_LE (mhba->playmusic));
+	g_print ("\tRepeat: %02x\n", GUINT_FROM_LE (mhba->repeat));
+	g_print ("\tRandom: %02x\n", GUINT_FROM_LE (mhba->random));
+	g_print ("\tShow titles: %02x\n", GUINT_FROM_LE (mhba->show_titles));
+	g_print ("\tTransition direction: %02x\n", GUINT_FROM_LE (mhba->transition_direction));
+	g_print ("\tSlide duration: %08x\n", GINT_FROM_LE (mhba->slide_duration));
+	g_print ("\tTransition duration: %08x\n", GINT_FROM_LE (mhba->transition_duration));
+	g_print ("\tUnk044: %02x\n", GINT_FROM_LE (mhba->unk044));
+	g_print ("\tUnk048: %02x\n", GINT_FROM_LE (mhba->unk048));
+	g_print ("\tSong ID: %08x\n", GINT_FROM_LE (mhba->song_id));
+	g_print ("\tPrevious album ID: %08x\n", GINT_FROM_LE (mhba->prev_album_id));
+}
+
+#endif

Added: libgpod/trunk/libgpod/branches/upstream/current/src/db-artwork-debug.h
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/db-artwork-debug.h	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/db-artwork-debug.h	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,56 @@
+/*
+ *  Copyright (C) 2005 Christophe Fergeau
+ *
+ * 
+ *  The code contained in this file is free software; you can redistribute
+ *  it and/or modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either version
+ *  2.1 of the License, or (at your option) any later version.
+ *  
+ *  This file 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
+ *  Lesser General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this code; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ * 
+ *  iTunes and iPod are trademarks of Apple
+ * 
+ *  This product is not supported/written/published by Apple!
+ *
+ *  $Id: db-artwork-debug.h 1948 2008-02-03 18:53:55Z teuf $
+ */
+#ifndef DB_ARTWORK_DEBUG_H
+#define DB_ARTWORK_DEBUG_H
+
+#include "db-itunes-parser.h"
+
+/* #define DEBUG_ARTWORKDB */
+
+#ifdef DEBUG_ARTWORKDB
+extern G_GNUC_INTERNAL void dump_mhif (MhifHeader *mhif);
+extern G_GNUC_INTERNAL void dump_mhia (MhiaHeader *mhia);
+extern G_GNUC_INTERNAL void dump_mhod_string (ArtworkDB_MhodHeaderString *mhod);
+extern G_GNUC_INTERNAL void dump_mhni (MhniHeader *mhni);
+extern G_GNUC_INTERNAL void dump_mhod (ArtworkDB_MhodHeader *mhod);
+extern G_GNUC_INTERNAL void dump_mhii (MhiiHeader *mhii);
+extern G_GNUC_INTERNAL void dump_mhl (MhlHeader *mhl, const char *id);
+extern G_GNUC_INTERNAL void dump_mhsd (ArtworkDB_MhsdHeader *mhsd);
+extern G_GNUC_INTERNAL void dump_mhfd (MhfdHeader *mhfd);
+extern G_GNUC_INTERNAL void dump_mhba (MhbaHeader *mhba);
+#else 
+#define dump_mhif(x)
+#define dump_mhia(x)
+#define dump_mhod_string(x)
+#define dump_mhni(x)
+#define dump_mhod(x)
+#define dump_mhii(x)
+#define dump_mhl(x,y)
+#define dump_mhsd(x)
+#define dump_mhfd(x)
+#define dump_mhba(x)
+#endif
+
+#endif

Added: libgpod/trunk/libgpod/branches/upstream/current/src/db-artwork-parser.c
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/db-artwork-parser.c	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/db-artwork-parser.c	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,838 @@
+/*
+ *  Copyright (C) 2005-2007 Christophe Fergeau
+ *
+ * 
+ *  The code contained in this file is free software; you can redistribute
+ *  it and/or modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either version
+ *  2.1 of the License, or (at your option) any later version.
+ *  
+ *  This file 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
+ *  Lesser General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this code; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ * 
+ *  iTunes and iPod are trademarks of Apple
+ * 
+ *  This product is not supported/written/published by Apple!
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
+#include "itdb.h"
+#include "itdb_private.h"
+#include "itdb_endianness.h"
+#include "db-artwork-debug.h"
+#include "db-artwork-parser.h"
+#include "db-image-parser.h"
+#include "db-itunes-parser.h"
+#include "db-parse-context.h"
+#include <glib/gi18n-lib.h>
+
+typedef int (*ParseListItem)(DBParseContext *ctx, GError *error);
+
+
+static int
+parse_mhif (DBParseContext *ctx, GError *error)
+{
+	MhifHeader *mhif;
+
+	mhif = db_parse_context_get_m_header (ctx, MhifHeader, "mhif");
+	if (mhif == NULL) {
+		return -1;
+	}
+	dump_mhif (mhif);
+	db_parse_context_set_total_len (ctx, get_gint32 (mhif->total_len, ctx->byte_order));
+	return 0;
+}
+
+static int
+parse_mhia (DBParseContext *ctx, Itdb_PhotoAlbum *photo_album, GError *error)
+{
+	MhiaHeader *mhia;
+	guint32 image_id;
+
+	mhia = db_parse_context_get_m_header (ctx, MhiaHeader, "mhia");
+	if (mhia == NULL) {
+		return -1;
+	}
+	dump_mhia (mhia);
+	image_id = get_gint32 (mhia->image_id, ctx->byte_order);
+	photo_album->members = g_list_append (photo_album->members,
+					      GUINT_TO_POINTER(image_id));
+	db_parse_context_set_total_len (ctx,
+					get_gint32_db (ctx->db, mhia->total_len));
+	return 0;
+}
+
+static char *
+get_utf16_string (void* buffer, gint length, guint byte_order)
+{
+	char *result;
+	gunichar2 *tmp;
+	int i;
+	/* Byte-swap the utf16 characters if necessary (I'm relying
+	 * on gcc to optimize most of this code away on LE platforms)
+	 */
+	tmp = g_memdup (buffer, length);
+	for (i = 0; i < length/2; i++) {
+		tmp[i] = get_gint16 (tmp[i], byte_order);
+	}
+	result = g_utf16_to_utf8 (tmp, length/2, NULL, NULL, NULL);
+	g_free (tmp);
+
+	return result;
+	
+}
+
+struct ParsedMhodString {
+        enum MhodType mhod_type;
+        char *mhod_string;
+};
+
+static struct ParsedMhodString *
+parse_mhod_string (DBParseContext *ctx, GError *error)
+{
+	struct ParsedMhodString *result;
+	ArtworkDB_MhodHeaderString *mhod_string;
+	ArtworkDB_MhodHeader *mhod;
+	gint len;
+	mhod = db_parse_context_get_m_header (ctx, ArtworkDB_MhodHeader, "mhod");
+	if (mhod == NULL) {
+		return NULL;
+	}
+	db_parse_context_set_total_len (ctx, get_gint32 (mhod->total_len, ctx->byte_order));
+
+	if (get_gint32 (mhod->total_len, ctx->byte_order) < sizeof (ArtworkDB_MhodHeaderString)){
+		return NULL;
+	}
+
+	result = g_new0 (struct ParsedMhodString, 1);
+	if (result == NULL) {
+		return NULL;
+	}
+
+	mhod_string = (ArtworkDB_MhodHeaderString*)mhod;
+	result->mhod_type = get_gint16 (mhod_string->type, ctx->byte_order);
+	len = get_gint32 (mhod_string->string_len, ctx->byte_order);
+	switch (mhod_string->encoding) {
+	case 2:
+		result->mhod_string = get_utf16_string ((gunichar2 *)mhod_string->string,
+							len, ctx->byte_order);
+		break;
+	case 0:
+	case 1: 
+		result->mhod_string = g_strndup (mhod_string->string, len);
+		break;
+	default:
+		g_warning (_("Unexpected mhod string type: %d\n"),
+			   mhod_string->encoding);
+		break;
+	}
+	dump_mhod_string (mhod_string);
+	return result;
+}
+
+static int
+parse_mhod_3 (DBParseContext *ctx,
+	      Itdb_Thumb_Ipod_Item *thumb, GError *error)
+{
+	struct ParsedMhodString *mhod;
+	mhod = parse_mhod_string (ctx, error);
+	if (mhod == NULL) {
+		return -1;
+	}
+	if (mhod->mhod_type != MHOD_ARTWORK_TYPE_FILE_NAME) {
+		g_free (mhod->mhod_string);
+		g_free (mhod);
+		return -1;
+	}
+
+	thumb->filename = mhod->mhod_string;
+	g_free (mhod);
+	return 0;
+}
+
+static int
+parse_photo_mhni (DBParseContext *ctx, Itdb_Thumb_Ipod *thumbs, GError *error)
+{
+	MhniHeader *mhni;
+	DBParseContext *mhod_ctx; 
+	Itdb_Thumb_Ipod_Item *thumb;
+
+	mhni = db_parse_context_get_m_header (ctx, MhniHeader, "mhni");
+	if (mhni == NULL) {
+		return -1;
+	}
+	db_parse_context_set_total_len (ctx, get_gint32 (mhni->total_len, ctx->byte_order));
+	dump_mhni (mhni);
+
+	thumb = ipod_image_new_from_mhni (mhni, ctx->db);
+	if (thumb == NULL) {
+		return 0;
+	}
+    
+        itdb_thumb_ipod_add (thumbs, thumb);
+
+	mhod_ctx = db_parse_context_get_sub_context (ctx, ctx->header_len);
+	if (mhod_ctx == NULL) {
+	  return -1;
+	}
+	parse_mhod_3 (mhod_ctx, thumb, error);
+	g_free (mhod_ctx);
+
+	return 0;
+}
+
+static int
+parse_photo_mhod (DBParseContext *ctx, Itdb_Thumb_Ipod *thumbs, GError *error)
+{
+	ArtworkDB_MhodHeader *mhod;
+	DBParseContext *mhni_ctx;
+	gint32 type;
+
+	mhod = db_parse_context_get_m_header (ctx, ArtworkDB_MhodHeader, "mhod");
+	if (mhod == NULL) {
+		return -1;
+	}
+	db_parse_context_set_total_len (ctx, get_gint32 (mhod->total_len, ctx->byte_order));
+
+	type = get_gint16 (mhod->type, ctx->byte_order);
+
+        dump_mhod (mhod);
+
+	/* if this is a container... */
+	if (type == MHOD_ARTWORK_TYPE_THUMBNAIL) {
+		mhni_ctx = db_parse_context_get_sub_context (ctx, ctx->header_len);
+		if (mhni_ctx == NULL) {
+			return -1;
+		}
+		parse_photo_mhni (mhni_ctx, thumbs, NULL);
+		g_free (mhni_ctx);
+	}
+
+	return 0;
+}
+
+static int
+parse_mhii (DBParseContext *ctx, GError *error)
+{
+	MhiiHeader *mhii;
+	DBParseContext *mhod_ctx;
+	int num_children;
+	off_t cur_offset;
+	Itdb_Artwork *artwork;
+	Itdb_PhotoDB *photodb;
+	guint64 mactime;
+	Itdb_Device *device = db_get_device (ctx->db);
+        Itdb_Thumb_Ipod *thumbs;
+            
+	mhii = db_parse_context_get_m_header (ctx, MhiiHeader, "mhii");
+	if (mhii == NULL)
+	{
+	    return -1;
+	}
+	db_parse_context_set_total_len (ctx, get_gint32 (mhii->total_len, ctx->byte_order));
+	dump_mhii (mhii);
+
+	artwork = itdb_artwork_new ();
+
+	artwork->id = get_gint32 (mhii->image_id, ctx->byte_order);
+	artwork->unk028 = get_gint32 (mhii->unknown4, ctx->byte_order);
+	artwork->rating = get_gint32 (mhii->rating, ctx->byte_order);
+	artwork->unk036 = get_gint32 (mhii->unknown6, ctx->byte_order);
+	mactime = get_gint32 (mhii->orig_date, ctx->byte_order);
+	artwork->creation_date = device_time_mac_to_time_t (device, mactime);
+	mactime = get_gint32 (mhii->digitized_date, ctx->byte_order);
+	artwork->digitized_date = device_time_mac_to_time_t (device, mactime);
+	artwork->artwork_size = get_gint32 (mhii->orig_img_size, ctx->byte_order);
+	artwork->dbid = get_gint64 (mhii->song_id, ctx->byte_order);
+
+        thumbs = (Itdb_Thumb_Ipod *)itdb_thumb_ipod_new ();
+        artwork->thumbnail = (Itdb_Thumb *)thumbs;
+	cur_offset = ctx->header_len;
+	mhod_ctx = db_parse_context_get_sub_context (ctx, cur_offset);
+	num_children = get_gint32 (mhii->num_children, ctx->byte_order);
+	while ((num_children > 0) && (mhod_ctx != NULL))
+	{
+	    parse_photo_mhod (mhod_ctx, thumbs, NULL);
+	    num_children--;
+	    cur_offset += mhod_ctx->total_len;
+	    g_free (mhod_ctx);
+	    mhod_ctx = db_parse_context_get_sub_context (ctx, cur_offset);
+	}
+        g_free (mhod_ctx);
+
+	switch (ctx->db->db_type)
+	{
+	case DB_TYPE_PHOTO:
+	    photodb = db_get_photodb (ctx->db);
+	    g_return_val_if_fail (photodb, -1);
+	    photodb->photos = g_list_append (photodb->photos, artwork);
+	    break;
+	case DB_TYPE_ITUNES:
+	    g_return_val_if_fail (ctx->artwork!=NULL, -1);
+	    *ctx->artwork = g_list_prepend (*ctx->artwork, artwork);
+	    break;
+	default:
+	    g_return_val_if_reached (-1);
+	}
+
+	return 0;
+}
+
+static int
+parse_mhba (DBParseContext *ctx, GError *error)
+{
+	MhbaHeader *mhba;
+	DBParseContext *mhod_ctx;
+	DBParseContext *mhia_ctx;
+	Itdb_PhotoAlbum *album;
+	Itdb_PhotoDB *photodb;
+	int num_children;
+	off_t cur_offset;
+
+	mhba = db_parse_context_get_m_header (ctx, MhbaHeader, "mhba");
+	if (mhba == NULL) {
+		return -1;
+	}
+	db_parse_context_set_total_len (ctx, get_gint32 (mhba->total_len, ctx->byte_order));
+
+	dump_mhba (mhba);
+
+	album = g_new0 (Itdb_PhotoAlbum, 1);
+	album->album_id = get_gint32(mhba->album_id, ctx->byte_order);
+	album->unk024 = get_gint32(mhba->unk024, ctx->byte_order);
+	album->unk028 = get_gint16(mhba->unk028, ctx->byte_order);
+	album->album_type = mhba->album_type;
+	album->playmusic = mhba->playmusic;
+	album->repeat = mhba->repeat;
+	album->random = mhba->random;
+	album->show_titles = mhba->show_titles;
+	album->transition_direction = mhba->transition_direction;
+	album->slide_duration = get_gint32(mhba->slide_duration,
+					   ctx->byte_order);
+	album->transition_duration = get_gint32(mhba->transition_duration,
+						ctx->byte_order);
+	album->unk044 = get_gint32(mhba->unk044, ctx->byte_order);
+	album->unk048 = get_gint32(mhba->unk048, ctx->byte_order);
+	album->song_id = get_gint64(mhba->song_id, ctx->byte_order);
+	album->prev_album_id = get_gint32(mhba->prev_album_id,
+					  ctx->byte_order);
+
+	cur_offset = ctx->header_len;
+	num_children = get_gint32 (mhba->num_mhods, ctx->byte_order);
+
+        mhod_ctx = db_parse_context_get_sub_context (ctx, cur_offset);
+        while ((num_children > 0) && (mhod_ctx != NULL)) {
+		struct ParsedMhodString *mhod;
+
+		mhod = parse_mhod_string (mhod_ctx, error);
+		if (mhod == NULL) {
+			break;
+		}
+		switch (mhod->mhod_type)
+		{  /* FIXME: type==1 is album name. type==2 seems to be
+		    * the transtition type between photos,
+		    * e.g. "Dissolve". Not handled yet. */
+		case MHOD_ARTWORK_TYPE_ALBUM_NAME:
+			g_free (album->name);
+			album->name = mhod->mhod_string;
+			g_free (mhod);
+			break;
+		default:
+			g_free (mhod->mhod_string);
+			g_free (mhod);
+			break;
+		}
+		cur_offset += mhod_ctx->total_len;
+		g_free (mhod_ctx);
+		num_children--;
+		mhod_ctx = db_parse_context_get_sub_context (ctx, cur_offset);
+        }
+	g_free (mhod_ctx);
+
+	mhia_ctx = db_parse_context_get_sub_context (ctx, cur_offset);
+	num_children = get_gint32 (mhba->num_mhias, ctx->byte_order);
+	while ((num_children > 0) && (mhia_ctx != NULL)) {
+		parse_mhia (mhia_ctx, album, NULL);
+		num_children--;
+		cur_offset += mhia_ctx->total_len;
+		g_free (mhia_ctx);
+		mhia_ctx = db_parse_context_get_sub_context (ctx, cur_offset);
+	}
+        g_free (mhia_ctx);
+	photodb = db_get_photodb (ctx->db);
+	g_return_val_if_fail (photodb, -1);
+	album->photodb = photodb;
+	photodb->photoalbums = g_list_append (photodb->photoalbums,
+					      album);
+	return 0;
+}
+
+
+static int
+parse_mhl (DBParseContext *ctx, GError *error, 
+	   const char *id, ParseListItem parse_child)
+{
+	MhlHeader *mhl;
+	int num_children;
+	DBParseContext *mhi_ctx;
+	off_t cur_offset;
+
+	mhl = db_parse_context_get_m_header (ctx, MhlHeader, id);
+	if (mhl == NULL) {
+		return -1;
+	}
+
+	dump_mhl (mhl, id);
+
+	num_children = get_gint32 (mhl->num_children, ctx->byte_order);
+	if (num_children < 0) {
+		return -1;
+	}
+
+	cur_offset = ctx->header_len;
+	mhi_ctx = db_parse_context_get_sub_context (ctx, cur_offset);
+	while ((num_children > 0) && (mhi_ctx != NULL)) {
+		if (parse_child != NULL) {
+			parse_child (mhi_ctx, NULL);
+		}
+		num_children--;
+		cur_offset += mhi_ctx->total_len;
+		g_free (mhi_ctx);
+		mhi_ctx = db_parse_context_get_sub_context (ctx, cur_offset);
+	}
+        g_free (mhi_ctx);
+
+	return 0;
+
+}
+
+
+static int 
+parse_mhsd (DBParseContext *ctx, GError **error)
+{
+	ArtworkDB_MhsdHeader *mhsd;
+
+	mhsd = db_parse_context_get_m_header (ctx, ArtworkDB_MhsdHeader, "mhsd");
+	if (mhsd == NULL) {
+		return -1;
+	}
+
+	db_parse_context_set_total_len (ctx, get_gint32 (mhsd->total_len, ctx->byte_order));
+	dump_mhsd (mhsd);
+	switch (get_gint16_db (ctx->db, mhsd->index)) {
+	case MHSD_IMAGE_LIST: {
+		DBParseContext *mhli_context;
+		mhli_context = db_parse_context_get_next_child (ctx);
+		parse_mhl (mhli_context, NULL, "mhli", parse_mhii);
+		g_free (mhli_context);
+		break;
+	}
+	case MHSD_ALBUM_LIST: {
+		DBParseContext *mhla_context;
+		mhla_context = db_parse_context_get_next_child (ctx);
+		parse_mhl (mhla_context, NULL, "mhla", parse_mhba);
+		g_free (mhla_context);
+		break;
+	}
+	case MHSD_FILE_LIST: {
+		DBParseContext *mhlf_context;
+		mhlf_context = db_parse_context_get_next_child (ctx);
+		parse_mhl (mhlf_context, NULL, "mhlf", parse_mhif);
+		g_free (mhlf_context);
+		break;
+	}
+	default:
+		g_warning (_("Unexpected mhsd index: %d\n"), 
+			   get_gint16_db (ctx->db, mhsd->index));
+		return -1;
+		break;
+	}
+
+	return 0;
+}
+
+
+/* Compares the two guint64 values being pointed to and returns TRUE if
+ * they are equal. It can be passed to g_hash_table_new() as the
+ *  key_equal_func parameter, when using pointers to guint64 as keys
+ * in a GHashTable.
+ */
+static gboolean
+guint64_equal (gconstpointer v1, gconstpointer v2)
+{
+    guint64 i1 = *(const guint64*)v1;
+    guint64 i2 = *(const guint64*)v2;
+    return i1 == i2;
+}
+
+/* Converts a pointer to a guint64 to a hash value. It can be passed to
+ * g_hash_table_new() as the hash_func parameter, when using pointers
+ * to guint64 values as keys in a GHashTable.
+ */
+static guint
+guint64_hash(gconstpointer v)
+{
+    guint64 i = *(const guint64*)v;
+    return i ^ (i >> 32);
+}
+
+/* Apple introduced a new way to associate artwork. The former way
+ * used the dbid to link each artwork (mhii) back to the track. The
+ * new way uses the mhii id to link from each track to the mhii. Above
+ * we only handled the former way */
+static int
+mhfd_associate_itunesdb_artwork (DBParseContext *ctx)
+{
+    GHashTable *mhii_id_hash;
+    GHashTable *song_dbid_hash;
+    Itdb_iTunesDB *itdb;
+    GList *gl;
+
+    g_return_val_if_fail (ctx && ctx->artwork, -1);
+    itdb = db_get_itunesdb (ctx->db);
+    g_return_val_if_fail (itdb, -1);
+
+    /* make a hash linking the dbid with the songs for faster
+       lookup */
+    song_dbid_hash = g_hash_table_new (guint64_hash, guint64_equal);
+
+    for (gl = itdb->tracks; gl != NULL; gl = gl->next) {
+	Itdb_Track *song = (Itdb_Track*)gl->data;
+	g_hash_table_insert (song_dbid_hash, &song->dbid, song);
+    }
+
+    /* make a hash linking the mhii with the artwork for faster
+       lookup */
+    mhii_id_hash = g_hash_table_new_full (g_direct_hash,
+					  g_direct_equal,
+					  NULL,
+					  (GDestroyNotify)itdb_artwork_free);
+
+    for (gl=*ctx->artwork; gl; gl=gl->next)
+    {
+	Itdb_Track *track;
+	Itdb_Artwork *artwork=gl->data;
+	g_return_val_if_fail (artwork, -1);
+
+	g_hash_table_insert (mhii_id_hash, GINT_TO_POINTER (artwork->id), artwork);
+
+	/* add Artwork to track indicated by the dbid for backward
+	   compatibility */
+	track = g_hash_table_lookup (song_dbid_hash, &artwork->dbid);
+	if (track == NULL)
+	{
+	    gchar *strval = g_strdup_printf("%" G_GINT64_FORMAT, artwork->dbid);
+	    g_print (_("Could not find corresponding track (dbid: %s) for artwork entry.\n"), strval);
+	    g_free (strval);
+	}
+	else
+	{
+	    if ((track->artwork_size + track->artwork_count) !=
+		artwork->artwork_size)
+	    {
+		g_warning (_("iTunesDB and ArtworkDB artwork sizes inconsistent (%d+%d != %d)\n"),
+			   track->artwork_size,
+			   track->artwork_count,
+			   track->artwork->artwork_size);
+	    }
+	    itdb_artwork_free (track->artwork);
+	    track->artwork = itdb_artwork_duplicate (artwork);
+	}
+    }
+    /* Now go through all the tracks and add artwork where an
+     * mhii_link is available */
+    for (gl=itdb->tracks; gl; gl=gl->next)
+    {
+	Itdb_Track *track = gl->data;
+	g_return_val_if_fail (track, -1);
+	if (track->mhii_link)
+	{
+	    Itdb_Artwork *artwork;
+	    artwork = g_hash_table_lookup (mhii_id_hash,
+					   GINT_TO_POINTER (track->mhii_link));
+	    if (artwork)
+	    {
+		g_return_val_if_fail (track->artwork, -1);
+		if (track->artwork->id != track->mhii_link)
+		{
+		    itdb_artwork_free (track->artwork);
+		    track->artwork = itdb_artwork_duplicate (artwork);
+		}
+		else
+		{
+		    /* same artwork -- don't copy again */
+		}
+	    }
+	    else
+	    {
+		/* The user can't do much here, so let's not worry them with
+		 * this warning...
+		gchar *strval = g_strdup_printf("%" G_GINT64_FORMAT, track->dbid);
+		g_print (_("Could not find artwork entry (mhii id: %u) for track (dbid: %s).\n"), track->mhii_link, strval);
+		g_free (strval);
+		 */
+
+		/* couldn't find artwork -- make sure track data is in
+		   a consistent state. */
+		itdb_track_remove_thumbnails (track);
+	    }
+	}
+    }
+    g_hash_table_destroy (mhii_id_hash);
+    g_hash_table_destroy (song_dbid_hash);
+    /* The actual ItdbArtwork data was freed through the GHashTable
+       value_destroy_func */
+    g_list_free (*ctx->artwork);
+    ctx->artwork = NULL;
+
+    return 0;
+}
+	
+
+
+/* Database Object */
+static int
+parse_mhfd (DBParseContext *ctx, GError **error)
+{
+	MhfdHeader *mhfd;
+	DBParseContext *mhsd_context;
+	unsigned int cur_pos;
+	gint total_len;
+	gint32 i;
+	GList *artwork_glist = NULL;
+
+	mhfd = db_parse_context_get_m_header (ctx, MhfdHeader, "mhfd");
+	if (mhfd == NULL) {
+		return -1;
+	}
+
+	/* Sanity check */
+	total_len = get_gint32_db (ctx->db, mhfd->total_len);
+	g_return_val_if_fail (total_len == ctx->total_len, -1);
+	dump_mhfd (mhfd);
+	cur_pos = ctx->header_len;
+
+	if (ctx->db->db_type == DB_TYPE_ITUNES)
+	{   /* we need to collect all artwork in this GList for
+	       iTunesDB (see below) */
+	    ctx->artwork = &artwork_glist;
+	}
+
+	for (i=0; i<mhfd->num_children; ++i)
+	{
+	    /* so far all mhfd we know have 3 children, but better be
+	       safe than sorry */
+	    mhsd_context = db_parse_context_get_sub_context (ctx, cur_pos);
+	    if (mhsd_context == NULL) {
+		return -1;
+	    }
+	    parse_mhsd (mhsd_context, NULL);
+	    cur_pos += mhsd_context->total_len;
+	    g_free (mhsd_context);
+	}
+
+	if (ctx->db->db_type == DB_TYPE_ITUNES)
+	{
+	    return mhfd_associate_itunesdb_artwork (ctx);
+	}
+
+	return 0;
+}
+
+
+
+G_GNUC_INTERNAL char *
+ipod_db_get_artwork_db_path (const char *mount_point)
+{
+        gchar *filename=NULL;
+
+	/* fail silently if no mount point given */
+	if (!mount_point)  return NULL;
+
+	filename = itdb_get_artworkdb_path (mount_point);
+
+	/* itdb_resolve_path() only returns existing paths */
+	if (!filename)
+	{
+	    gchar *artwork_dir;
+
+	    artwork_dir = itdb_get_artwork_dir (mount_point);
+	    if (!artwork_dir)
+	    {
+		/* attempt to create Artwork dir */
+		gchar *control_dir = itdb_get_control_dir (mount_point);
+		if (control_dir)
+		{
+		    gchar *dir = g_build_filename (control_dir, "Artwork", NULL);
+		    mkdir (dir, 0777);
+		    g_free (control_dir);
+		    g_free (dir);
+		    artwork_dir = itdb_get_artwork_dir (mount_point);
+		}
+	    }
+	    if (artwork_dir)
+	    {
+		filename = g_build_filename (artwork_dir,
+					     "ArtworkDB", NULL);
+		g_free (artwork_dir);
+	    }
+	}
+
+	return filename;
+}
+
+int
+ipod_parse_artwork_db (Itdb_iTunesDB *itdb)
+{
+	DBParseContext *ctx;
+	char *filename;
+	Itdb_DB db;
+
+	db.db.itdb = itdb;
+	db.db_type = DB_TYPE_ITUNES;
+
+	g_return_val_if_fail (itdb, -1);
+
+	if (!itdb_device_supports_artwork (itdb->device)) {
+		return -1;
+	}
+	ctx = NULL;
+	filename = ipod_db_get_artwork_db_path (itdb_get_mountpoint (itdb));
+	if (filename == NULL) {
+		goto error;
+	}
+	if (!g_file_test (filename, G_FILE_TEST_EXISTS))
+	{
+		goto error;
+	}
+
+	ctx = db_parse_context_new_from_file (filename, &db);
+	g_free (filename);
+
+	if (ctx == NULL) {
+		goto error;
+	}	
+
+	parse_mhfd (ctx, NULL);
+	db_parse_context_destroy (ctx);
+	return 0;
+
+ error:
+	if (ctx != NULL) {
+		db_parse_context_destroy (ctx);
+	}
+	return -1;
+}
+
+
+G_GNUC_INTERNAL char *
+ipod_db_get_photos_db_path (const char *mount_point)
+{
+        gchar *filename=NULL;
+
+	/* fail silently if no mount point given */
+	if (!mount_point)  return NULL;
+
+	filename = itdb_get_photodb_path (mount_point);
+
+	/* itdb_resolve_path() only returns existing paths */
+	if (!filename)
+	{
+	    gchar *photos_dir;
+
+	    photos_dir = itdb_get_photos_dir (mount_point);
+	    if (!photos_dir)
+	    {
+		/* attempt to create Photos dir */
+		gchar *dir = g_build_filename (mount_point, "Photos", NULL);
+		mkdir (dir, 0777);
+		g_free (dir);
+		photos_dir = itdb_get_photos_dir (mount_point);
+	    }
+	    if (photos_dir)
+	    {
+		filename = g_build_filename (photos_dir,
+					     "Photo Database", NULL);
+		g_free (photos_dir);
+	    }
+	}
+
+	return filename;
+}
+
+
+int
+ipod_parse_photo_db (Itdb_PhotoDB *photodb)
+{
+	DBParseContext *ctx;
+	char *filename;
+	Itdb_DB db;
+
+	GList *gl;
+	GHashTable *hash;
+
+	db.db.photodb = photodb;
+	db.db_type = DB_TYPE_PHOTO;
+
+
+	filename = itdb_get_photodb_path (
+	    itdb_photodb_get_mountpoint (photodb));
+	if (filename == NULL) {
+		return -1;
+	}       
+
+	ctx = db_parse_context_new_from_file (filename, &db );
+	g_free (filename);
+	if (ctx == NULL) {
+		return  -1;
+	}
+	parse_mhfd (ctx, NULL);
+	db_parse_context_destroy (ctx);
+
+	/* Now we need to replace references to artwork_ids in the
+	 * photo albums with references to the actual artwork
+	 * structure. Since we cannot guarantee that the list with the
+	 * photos is read before the album list, we cannot safely do
+	 * this at the time of reading the ids. */
+
+	/* Create a hash for faster lookup */
+	hash = g_hash_table_new (g_int_hash, g_int_equal);
+	for (gl=photodb->photos; gl; gl=gl->next)
+	{
+	    Itdb_Artwork *photo = gl->data;
+	    g_return_val_if_fail (photo, -1);
+	    g_hash_table_insert (hash, &photo->id, photo);
+/*	    printf ("id: %d, photo: %p\n", photo->id, photo);*/
+	}
+	for (gl=photodb->photoalbums; gl; gl=gl->next)
+	{
+	    GList *glp;
+	    Itdb_PhotoAlbum *album = gl->data;
+	    g_return_val_if_fail (album, -1);
+	    for (glp=album->members; glp; glp=glp->next)
+	    {
+		guint image_id = GPOINTER_TO_UINT (glp->data);
+		Itdb_Artwork *photo = g_hash_table_lookup (hash, &image_id);
+/*		printf ("id: %d, photo: %p\n", image_id, photo);*/
+		glp->data = photo;
+	    }
+	}
+	g_hash_table_destroy (hash);
+	return 0;
+}
+

Added: libgpod/trunk/libgpod/branches/upstream/current/src/db-artwork-parser.h
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/db-artwork-parser.h	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/db-artwork-parser.h	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,40 @@
+/*
+ *  Copyright (C) 2005 Christophe Fergeau
+ *
+ * 
+ *  The code contained in this file is free software; you can redistribute
+ *  it and/or modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either version
+ *  2.1 of the License, or (at your option) any later version.
+ *  
+ *  This file 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
+ *  Lesser General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this code; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ * 
+ *  iTunes and iPod are trademarks of Apple
+ * 
+ *  This product is not supported/written/published by Apple!
+ *
+ *  $Id: db-artwork-parser.h 2009 2008-06-09 19:53:36Z teuf $
+ */
+
+
+#ifndef DB_PHOTO_PARSER_H
+#define DB_PHOTO_PARSER_H
+
+#include "itdb.h"
+
+#define iPodSong Itdb_Track
+
+G_GNUC_INTERNAL int ipod_parse_artwork_db (Itdb_iTunesDB *db);
+G_GNUC_INTERNAL int ipod_write_artwork_db (Itdb_iTunesDB *itdb);
+G_GNUC_INTERNAL char *ipod_db_get_artwork_db_path (const char *mount_point);
+G_GNUC_INTERNAL char *ipod_db_get_photos_db_path (const char *mount_point);
+G_GNUC_INTERNAL int ipod_parse_photo_db (Itdb_PhotoDB *photodb); 
+G_GNUC_INTERNAL int ipod_write_photo_db (Itdb_PhotoDB *db);
+#endif

Added: libgpod/trunk/libgpod/branches/upstream/current/src/db-artwork-writer.c
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/db-artwork-writer.c	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/db-artwork-writer.c	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,1256 @@
+/*
+ *  Copyright (C) 2005-2007 Christophe Fergeau
+ *
+ *
+ *  The code contained in this file is free software; you can redistribute
+ *  it and/or modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either version
+ *  2.1 of the License, or (at your option) any later version.
+ *
+ *  This file 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
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this code; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *  iTunes and iPod are trademarks of Apple
+ *
+ *  This product is not supported/written/published by Apple!
+ *
+ */
+
+#include <config.h>
+#include "itdb.h"
+#include "itdb_device.h"
+#include "itdb_private.h"
+#include "db-artwork-parser.h"
+
+#if HAVE_GDKPIXBUF
+#include <gdk-pixbuf/gdk-pixbuf.h>
+
+#include "db-artwork-debug.h"
+#include "db-itunes-parser.h"
+#include "db-image-parser.h"
+#include "itdb_endianness.h"
+
+#include <glib/gstdio.h>
+
+#include <errno.h>
+#include <fcntl.h>
+#include <string.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <sys/types.h>
+
+#ifdef WITH_INTERNAL_GCHECKSUM
+#include "gchecksum.h"
+#endif
+
+#define DEFAULT_GSTRING_SIZE 128*1024
+
+struct iPodSharedDataBuffer {
+	GString *data;
+	char *filename;
+	int ref_count;
+};
+
+struct _iPodBuffer {
+	struct iPodSharedDataBuffer *shared;
+	off_t offset;
+	guint byte_order;
+	DbType db_type;
+};
+
+typedef struct _iPodBuffer iPodBuffer;
+
+static gboolean
+ipod_gstring_flush (struct iPodSharedDataBuffer *shared, GError **error)
+{
+	gboolean success;
+
+	success = itdb_file_set_contents (shared->filename, 
+	 	 		          shared->data->str, shared->data->len,
+				          error);
+	if (!success) {
+                return FALSE;
+	}
+	g_string_free (shared->data, TRUE);
+	g_free (shared->filename);
+	g_free (shared);
+
+	return TRUE;
+}
+
+static void
+ipod_buffer_destroy (iPodBuffer *buffer)
+{
+	buffer->shared->ref_count--;
+	if (buffer->shared->ref_count == 0) {
+		ipod_gstring_flush (buffer->shared, NULL);
+	}
+	g_free (buffer);
+}
+
+
+static void *
+ipod_buffer_get_pointer (iPodBuffer *buffer)
+{
+	if (buffer->shared->data->str == NULL) {
+		return NULL;
+	}
+	g_assert (buffer->offset < buffer->shared->data->len);
+	return &((unsigned char *)buffer->shared->data->str)[buffer->offset];
+}
+
+static void
+ipod_buffer_maybe_grow (iPodBuffer *buffer, off_t size)
+{
+	g_string_set_size (buffer->shared->data, 
+			   buffer->shared->data->len + size);
+}
+
+static iPodBuffer *
+ipod_buffer_get_sub_buffer (iPodBuffer *buffer, off_t offset)
+{
+	iPodBuffer *sub_buffer;
+
+	g_assert (buffer->offset + offset <= buffer->shared->data->len);
+
+	sub_buffer = g_new0 (iPodBuffer, 1);
+	if (sub_buffer == NULL) {
+		return NULL;
+	}
+	sub_buffer->shared = buffer->shared;
+	sub_buffer->offset = buffer->offset + offset;
+	sub_buffer->byte_order = buffer->byte_order;
+	sub_buffer->db_type = buffer->db_type;
+
+	buffer->shared->ref_count++;
+
+	return sub_buffer;
+}
+
+static iPodBuffer *
+ipod_buffer_new (const char *filename, guint byte_order, DbType db_type)
+{
+	struct iPodSharedDataBuffer *shared;
+	iPodBuffer *buffer;
+
+	shared = g_new0 (struct iPodSharedDataBuffer, 1);
+	if (shared == NULL) {
+		return NULL;
+	}
+	shared->filename = g_strdup (filename);
+	shared->data = g_string_sized_new (DEFAULT_GSTRING_SIZE);
+	shared->ref_count = 1;
+
+	buffer = g_new0 (iPodBuffer, 1);
+	if (buffer == NULL) {
+		g_free (shared->filename);
+		g_string_free (shared->data, TRUE);
+		g_free (shared);
+		return NULL;
+	}
+	buffer->shared = shared;
+	buffer->byte_order = byte_order;
+	buffer->db_type = db_type;
+
+	return buffer;
+}
+
+enum MhsdType {
+	MHSD_TYPE_MHLI = 1,
+	MHSD_TYPE_MHLA = 2,
+	MHSD_TYPE_MHLF = 3
+};
+
+#define RETURN_SIZE_FOR(id, size) if (strncmp (id, header_id, 4) == 0) return (size)
+
+
+
+/* Returns the "real" size for a header, ie the size iTunes uses for it
+ * (padding included)
+ */
+static int
+get_padded_header_size (gchar header_id[4])
+{
+	RETURN_SIZE_FOR ("mhni", 0x4c);
+	RETURN_SIZE_FOR ("mhii", 0x98);
+	RETURN_SIZE_FOR ("mhsd", 0x60);
+	RETURN_SIZE_FOR ("mhfd", 0x84);
+	RETURN_SIZE_FOR ("mhli", 0x5c);
+	RETURN_SIZE_FOR ("mhla", 0x5c);
+	RETURN_SIZE_FOR ("mhlf", 0x5c);
+	RETURN_SIZE_FOR ("mhif", 0x7c);
+	RETURN_SIZE_FOR ("mhba", 0x94);
+
+	return 0;
+}
+
+static void *
+init_header (iPodBuffer *buffer, gchar _header_id[4], guint header_len)
+{
+	MHeader *mh;
+	int padded_size;
+	gchar *header_id;
+
+	padded_size = get_padded_header_size (_header_id);
+	if (padded_size != 0) {
+		header_len = padded_size;
+	}
+	g_assert (header_len > sizeof (MHeader));
+	ipod_buffer_maybe_grow (buffer, header_len);
+
+	mh = (MHeader*)ipod_buffer_get_pointer (buffer);
+	if (mh == NULL) {
+		return NULL;
+	}
+	memset (mh, 0, header_len);
+
+	header_id = g_strndup (_header_id, 4);
+	if (buffer->byte_order == G_BIG_ENDIAN) {
+		g_strreverse (header_id);
+	}
+	strncpy ((char *)mh->header_id, header_id, 4);
+	mh->header_len = get_gint32 (header_len, buffer->byte_order);
+
+	g_free (header_id);
+	return mh;
+}
+
+
+static int
+write_mhod_type_1 (gchar *string, iPodBuffer *buffer)
+{
+	ArtworkDB_MhodHeaderString *mhod;
+	unsigned int total_bytes;
+	int len;
+	int padding;
+
+	g_assert (string != NULL);
+
+	total_bytes = sizeof (ArtworkDB_MhodHeaderString);
+	mhod = (ArtworkDB_MhodHeaderString *)init_header (buffer, "mhod",
+                                                          total_bytes);
+	if (mhod == NULL) {
+		return -1;
+	}
+	mhod->total_len = get_gint32 (total_bytes, buffer->byte_order);
+	/* Modify header length, since iTunes only puts the length of
+	 * MhodHeader in header_len
+	 */
+	mhod->header_len = get_gint32 (sizeof (ArtworkDB_MhodHeader), buffer->byte_order);
+	mhod->encoding = get_gint32 (0x01, buffer->byte_order);
+	len = strlen (string);
+	mhod->string_len = get_gint32 (len, buffer->byte_order);
+
+	padding = 4 - ( (total_bytes + len) % 4 );
+	if (padding == 4)
+	    padding = 0;
+	mhod->padding_len = padding;
+	mhod->type = get_gint16 (0x01, buffer->byte_order);
+
+	/* Make sure we have enough free space to write the string */
+	ipod_buffer_maybe_grow (buffer, len + padding);
+	mhod = ipod_buffer_get_pointer (buffer);
+	if (mhod == NULL) {
+		return -1;
+	}
+	memcpy (mhod->string, string, len);
+	total_bytes += len + padding;
+	mhod->total_len = get_gint32 (total_bytes, buffer->byte_order);
+
+	dump_mhod_string (mhod);
+
+	return total_bytes;
+}
+
+static int
+write_mhod_type_3 (gchar *string, iPodBuffer *buffer)
+{
+	ArtworkDB_MhodHeaderString *mhod;
+	unsigned int total_bytes;
+	glong len;
+	const gint g2l = sizeof (gunichar2);
+	gunichar2 *utf16, *strp;
+	int i, padding;
+
+	g_assert (string != NULL);
+
+	total_bytes = sizeof (ArtworkDB_MhodHeaderString);
+	mhod = (ArtworkDB_MhodHeaderString *) init_header (buffer, "mhod", 
+                                                           total_bytes);
+	if (mhod == NULL) {
+		return -1;
+	}
+	mhod->total_len = get_gint32 (total_bytes, buffer->byte_order);
+	/* Modify header length, since iTunes only puts the length of
+	 * MhodHeader in header_len
+	 */
+	mhod->header_len = get_gint32 (sizeof (ArtworkDB_MhodHeader),
+				       buffer->byte_order);
+	mhod->type = get_gint16 (3, buffer->byte_order);
+
+	/* FIXME: Tidy this up, combine cases more */
+	/* Some magic: endianess-reversed (BE) mobile phones use UTF8
+	 * (version 1) with padding, standard iPods (LE) use UTF16
+	 * (version 2).*/
+	switch (buffer->byte_order)
+	{
+	case G_LITTLE_ENDIAN:
+	    utf16 = g_utf8_to_utf16 (string, -1, NULL, &len, NULL);
+	    if (utf16 == NULL) {
+		return -1;
+	    }
+
+	    mhod->encoding = 2; /* 8 bit field, no need to byteswap */
+
+	    /* number of bytes of the string encoded in UTF-16 */
+	    mhod->string_len = get_gint32 (g2l * len, buffer->byte_order);
+	    padding = 4 - ( (total_bytes + g2l*len) % 4 );
+	    if (padding == 4)
+		padding = 0;
+	    mhod->padding_len = padding; /* 8 bit field, no need to byteswap */
+
+ 	    total_bytes += g2l*len + padding;
+
+	    /* Make sure we have enough free space to write the string */
+	    ipod_buffer_maybe_grow (buffer, g2l*len + padding);
+	    mhod = ipod_buffer_get_pointer (buffer);
+	    if (mhod == NULL) {
+		    g_free (utf16);
+		    return  -1;
+	    }
+	    strp = (gunichar2 *)mhod->string;
+	    for (i = 0; i < len; i++) {
+		strp[i] = get_gint16 (utf16[i], buffer->byte_order);
+	    }
+	    g_free (utf16);
+	    memset (mhod->string + g2l*len, 0, padding);
+	    break;
+	case G_BIG_ENDIAN:
+	    mhod->encoding = 1; /* 8 bit field, no need to byteswap */
+            /* FIXME: len isn't initialized */
+	    mhod->string_len = get_gint32 (len, buffer->byte_order);
+	    /* pad string if necessary */
+	    /* e.g. len = 7 bytes, len%4 = 3, 4-3=1 -> requires 1 byte
+	       padding */
+	    padding = 4 - ( (total_bytes + len) % 4 );
+	    if (padding == 4)
+		padding = 0;
+	    mhod->padding_len = padding; /* 8 bit field, no need to byteswap */
+
+	    /* Make sure we have enough free space to write the string */
+	    ipod_buffer_maybe_grow (buffer, len+padding);
+	    mhod = ipod_buffer_get_pointer (buffer);
+	    if (mhod == NULL) {
+		    return -1;
+	    }
+	    memcpy (mhod->string, string, len);
+	    memset (mhod->string + len, 0, padding);
+	    total_bytes += (len+padding);
+	}
+	mhod->total_len = get_gint32 (total_bytes, buffer->byte_order);
+
+	dump_mhod_string (mhod);
+
+	return total_bytes;
+}
+
+static int
+write_mhni (Itdb_DB *db, Itdb_Thumb_Ipod_Item *item, iPodBuffer *buffer)
+{
+	MhniHeader *mhni;
+	unsigned int total_bytes;
+	int bytes_written;
+	iPodBuffer *sub_buffer;
+        const Itdb_ArtworkFormat *format;
+
+	if (item == NULL) {
+		return -1;
+	}
+
+	mhni = (MhniHeader *)init_header (buffer, "mhni",
+					  sizeof (MhniHeader));
+	if (mhni == NULL) {
+		return -1;
+	}
+	total_bytes =          get_gint32 (mhni->header_len,
+					   buffer->byte_order);
+	mhni->total_len =      get_gint32 (total_bytes,
+					   buffer->byte_order);
+        format = item->format;
+	mhni->format_id = get_gint32 (format->format_id, buffer->byte_order);
+	mhni->image_width =    get_gint16 (item->width, buffer->byte_order);
+	mhni->image_height =   get_gint16 (item->height, buffer->byte_order);
+	mhni->image_size =     get_gint32 (item->size, buffer->byte_order);
+	mhni->ithmb_offset =   get_gint32 (item->offset, buffer->byte_order);
+	mhni->vertical_padding = get_gint16 (item->vertical_padding,
+					     buffer->byte_order);
+	mhni->horizontal_padding = get_gint16 (item->horizontal_padding,
+					       buffer->byte_order);
+
+	sub_buffer = ipod_buffer_get_sub_buffer (buffer, total_bytes);
+	if (sub_buffer == NULL) {
+		return  -1;
+	}
+	bytes_written = write_mhod_type_3 (item->filename, sub_buffer);
+	ipod_buffer_destroy (sub_buffer);
+	if (bytes_written == -1) {
+		return -1;
+	}
+	total_bytes += bytes_written;
+	mhni = ipod_buffer_get_pointer (buffer);
+	mhni->total_len = get_gint32 (total_bytes, buffer->byte_order);
+	/* Only update number of children when all went well to try to get
+	 * something somewhat consistent when there are errors
+	 */
+	mhni->num_children = get_gint32 (1, buffer->byte_order);
+
+	dump_mhni (mhni);
+
+	return total_bytes;
+}
+
+static int
+write_mhod (Itdb_DB *db, Itdb_Thumb_Ipod_Item *thumb, iPodBuffer *buffer)
+{
+	ArtworkDB_MhodHeader *mhod;
+	unsigned int total_bytes;
+	int bytes_written;
+	iPodBuffer *sub_buffer;
+
+	if (thumb == NULL) {
+		return -1;
+	}
+
+	mhod = (ArtworkDB_MhodHeader *)
+	    init_header (buffer, "mhod",
+			 sizeof (ArtworkDB_MhodHeader));
+	if (mhod == NULL) {
+		return -1;
+	}
+	total_bytes = sizeof (ArtworkDB_MhodHeader);
+	mhod->total_len = get_gint32 (total_bytes, buffer->byte_order);
+	mhod->type = get_gint16 (MHOD_TYPE_LOCATION, buffer->byte_order);
+	sub_buffer = ipod_buffer_get_sub_buffer (buffer, total_bytes);
+	if (sub_buffer == NULL) {
+		return -1;
+	}
+	bytes_written = write_mhni (db, thumb, sub_buffer);
+	ipod_buffer_destroy (sub_buffer);
+	if (bytes_written == -1) {
+		return -1;
+	}
+	total_bytes += bytes_written;
+	mhod = ipod_buffer_get_pointer (buffer);
+	mhod->total_len = get_gint32 (total_bytes, buffer->byte_order);
+
+	dump_mhod (mhod);
+
+	return total_bytes;
+}
+
+static int
+write_mhii (Itdb_DB *db, void *data, iPodBuffer *buffer)
+{
+	MhiiHeader *mhii;
+	unsigned int total_bytes;
+	int bytes_written;
+	int num_children;
+	const GList *it = NULL;
+	Itdb_Track *song;
+	Itdb_Artwork *artwork;
+	guint64 mactime;
+	Itdb_Device *device = db_get_device (db);
+
+	mhii = (MhiiHeader *)init_header (buffer, "mhii", sizeof (MhiiHeader));
+	if (mhii == NULL) {
+		return -1;
+	}
+	total_bytes = get_gint32 (mhii->header_len, buffer->byte_order);
+
+	switch( buffer->db_type) {
+	case DB_TYPE_ITUNES:
+		song = (Itdb_Track *)data;
+		artwork = song->artwork;
+		mhii->song_id = get_gint64 (song->dbid, buffer->byte_order);
+		break;
+	case DB_TYPE_PHOTO:
+		artwork = (Itdb_Artwork *)data;
+		mhii->song_id = get_gint64 (artwork->id + 2, buffer->byte_order);
+		break;
+	default:
+	        g_return_val_if_reached (-1);
+	}
+	mhii->image_id = get_guint32 (artwork->id, buffer->byte_order);
+	mhii->unknown4 = get_gint32 (artwork->unk028, buffer->byte_order);
+	mhii->rating = get_gint32 (artwork->rating, buffer->byte_order);
+	mhii->unknown6 = get_gint32 (artwork->unk036, buffer->byte_order);
+
+	mactime = device_time_time_t_to_mac (device, artwork->creation_date);
+	mhii->orig_date = get_guint32 (mactime, buffer->byte_order);
+
+	mactime = device_time_time_t_to_mac (device, artwork->digitized_date);
+	mhii->digitized_date = get_guint32 (mactime, buffer->byte_order);
+
+	mhii->orig_img_size = get_gint32 (artwork->artwork_size, buffer->byte_order);
+	num_children = 0;
+        /* Before trying to write the artwork or photo database, the ithmb
+         * files have been written, which will have converted all thumbnails 
+         * attached to the tracks to ITDB_THUMB_TYPE_IPOD thumbnails.
+         */
+        g_assert (artwork->thumbnail->data_type == ITDB_THUMB_TYPE_IPOD);
+	for (it=itdb_thumb_ipod_get_thumbs ((Itdb_Thumb_Ipod *)artwork->thumbnail); 
+             it!=NULL; 
+             it=it->next)
+	{
+		iPodBuffer *sub_buffer;
+		Itdb_Thumb_Ipod_Item *thumb;
+
+                thumb = (Itdb_Thumb_Ipod_Item *)it->data;
+                if (thumb->format == NULL) {
+		    /* skip this thumb */
+		    continue;
+		}
+
+		mhii->num_children = get_gint32 (num_children,
+						 buffer->byte_order);
+		mhii->total_len = get_gint32 (total_bytes, buffer->byte_order);
+		sub_buffer = ipod_buffer_get_sub_buffer (buffer, total_bytes);
+		if (sub_buffer == NULL) {
+			return -1;
+		}
+		bytes_written = write_mhod (db, thumb, sub_buffer);
+		ipod_buffer_destroy (sub_buffer);
+		if (bytes_written == -1) {
+			return -1;
+		}
+		total_bytes += bytes_written;
+		mhii = ipod_buffer_get_pointer (buffer);
+		num_children++;
+	}
+
+	mhii->num_children = get_gint32 (num_children, buffer->byte_order);
+	mhii->total_len = get_gint32 (total_bytes, buffer->byte_order);
+
+	dump_mhii (mhii);
+
+	return total_bytes;
+}
+
+static int
+write_mhli (Itdb_DB *db, iPodBuffer *buffer )
+{
+	GList *it = NULL;
+	MhliHeader *mhli;
+	unsigned int total_bytes;
+	int num_thumbs;
+
+	mhli = (MhliHeader *)init_header (buffer, "mhli", sizeof (MhliHeader));
+	if (mhli == NULL) {
+		return -1;
+	}
+
+	num_thumbs = 0;
+	total_bytes = get_gint32 (mhli->header_len, buffer->byte_order);
+	switch (buffer->db_type) {
+	case DB_TYPE_PHOTO:
+		it = db_get_photodb(db)->photos;
+		break;
+	case DB_TYPE_ITUNES:
+		it = db_get_itunesdb(db)->tracks;
+		break;
+	default:
+	        g_return_val_if_reached (-1);
+	}
+	while (it != NULL) {
+		Itdb_Track *song;
+		int bytes_written;
+		iPodBuffer *sub_buffer;
+		if (buffer->db_type == DB_TYPE_ITUNES) {
+			song = (Itdb_Track*)it->data;
+			if (!song->artwork->thumbnail || (song->artwork->dbid == 0)) {
+				it = it->next;
+				continue;
+			}
+		}
+		sub_buffer = ipod_buffer_get_sub_buffer (buffer, total_bytes);
+		if (sub_buffer == NULL) {
+			break;
+		}
+		bytes_written = write_mhii (db, it->data, sub_buffer);
+		ipod_buffer_destroy (sub_buffer);
+		if (bytes_written != -1) {
+			num_thumbs++;
+			total_bytes += bytes_written;
+		}
+		it = it->next;
+	}
+	mhli = ipod_buffer_get_pointer (buffer);
+	mhli->num_children = get_gint32 (num_thumbs, buffer->byte_order);
+	dump_mhl ((MhlHeader *)mhli, "mhli");
+
+	return total_bytes;
+}
+
+static int
+write_mhia (gint image_id, iPodBuffer *buffer)
+{
+	MhiaHeader *mhia;
+	unsigned int total_bytes;
+
+
+	mhia = (MhiaHeader *)init_header (buffer, "mhia", 40);
+	if (mhia == NULL) {
+		return -1;
+	}
+
+	mhia->total_len = mhia->header_len;
+	mhia->image_id = get_gint32 (image_id, buffer->byte_order);
+	total_bytes = get_gint32 (mhia->header_len, buffer->byte_order);
+	dump_mhia( mhia );
+	return total_bytes;
+}
+
+static int
+write_mhba (Itdb_PhotoAlbum *album, iPodBuffer *buffer)
+{
+	GList *it;
+	MhbaHeader *mhba;
+	iPodBuffer *sub_buffer;
+	unsigned int total_bytes;
+	unsigned int bytes_written;
+
+	mhba = (MhbaHeader *)init_header (buffer, "mhba", sizeof (MhbaHeader));
+	if (mhba == NULL) {
+		return -1;
+	}
+	mhba->num_mhods = get_gint32(1, buffer->byte_order);
+	mhba->num_mhias = get_gint32(g_list_length (album->members),
+				     buffer->byte_order);
+	mhba->album_id = get_gint32(album->album_id, buffer->byte_order);
+	mhba->unk024 = get_gint32(album->unk024, buffer->byte_order);
+	mhba->unk028 = get_gint16(album->unk028, buffer->byte_order);
+	mhba->album_type = album->album_type;
+	mhba->playmusic = album->playmusic;
+	mhba->repeat = album->repeat;
+	mhba->random = album->random;
+	mhba->show_titles = album->show_titles;
+	mhba->transition_direction = album->transition_direction;
+	mhba->slide_duration = get_gint32(album->slide_duration,
+					  buffer->byte_order);
+	mhba->transition_duration = get_gint32(album->transition_duration,
+					       buffer->byte_order);
+	mhba->unk044 = get_gint32(album->unk044, buffer->byte_order);
+	mhba->unk048 = get_gint32(album->unk048, buffer->byte_order);
+	mhba->song_id = get_gint64(album->song_id, buffer->byte_order);
+	mhba->prev_album_id = get_gint32(album->prev_album_id,
+					 buffer->byte_order);
+
+	total_bytes = get_gint32 (mhba->header_len, buffer->byte_order);
+
+	/* FIXME: Write other mhods */
+	/* Write album title */
+	sub_buffer = ipod_buffer_get_sub_buffer (buffer, total_bytes);
+	if (sub_buffer == NULL) {
+	    return -1;
+	}
+	bytes_written = write_mhod_type_1 (album->name, sub_buffer);
+	ipod_buffer_destroy (sub_buffer);
+	if (bytes_written == -1) {
+	    return -1;
+	}
+	total_bytes += bytes_written;
+	mhba = ipod_buffer_get_pointer (buffer);
+
+	for (it = album->members; it != NULL; it = it->next) {
+	        Itdb_Artwork *photo = it->data;
+		g_return_val_if_fail (photo, -1);
+
+		sub_buffer = ipod_buffer_get_sub_buffer (buffer, total_bytes);
+		if (sub_buffer == NULL) {
+		    return -1;
+		}
+		bytes_written = write_mhia (photo->id, sub_buffer);
+		ipod_buffer_destroy (sub_buffer);
+		if (bytes_written == -1) {
+		    return -1;
+		}
+		total_bytes += bytes_written;
+	}
+	mhba = ipod_buffer_get_pointer (buffer);
+	mhba->total_len = get_gint32( total_bytes, buffer->byte_order );
+	dump_mhba ( mhba );
+	return total_bytes;
+}
+
+static int
+write_mhla (Itdb_DB *db, iPodBuffer *buffer)
+{
+	GList *it;
+	MhlaHeader *mhla;
+	iPodBuffer *sub_buffer;
+	unsigned int total_bytes;
+
+	mhla = (MhlaHeader *)init_header (buffer, "mhla", sizeof (MhlaHeader));
+	if (mhla == NULL) {
+		return -1;
+	}
+	total_bytes = get_gint32 (mhla->header_len, buffer->byte_order);
+	if (buffer->db_type == DB_TYPE_PHOTO) {
+	    unsigned int bytes_written;
+            unsigned int num_children = 0;
+	    for (it = db_get_photodb(db)->photoalbums; it != NULL; it = it->next) {
+		Itdb_PhotoAlbum *album = (Itdb_PhotoAlbum *)it->data;
+
+		sub_buffer = ipod_buffer_get_sub_buffer (buffer, total_bytes);
+		if (sub_buffer == NULL) {
+		    return -1;
+		}
+		bytes_written = write_mhba (album, sub_buffer);
+		ipod_buffer_destroy (sub_buffer);
+		if (bytes_written == -1) {
+		    return -1;
+		}
+		total_bytes += bytes_written;
+		mhla = ipod_buffer_get_pointer (buffer);
+		num_children++;
+		mhla->num_children = get_gint32 (num_children,
+                                                 buffer->byte_order);
+	    }
+	}
+
+	dump_mhl ((MhlHeader *)mhla, "mhla");
+
+	return total_bytes;
+}
+
+static int
+write_mhif (Itdb_DB *db, iPodBuffer *buffer,
+            const Itdb_ArtworkFormat *img_info)
+{
+	MhifHeader *mhif;
+
+	mhif = (MhifHeader *)init_header (buffer, "mhif", sizeof (MhifHeader));
+	if (mhif == NULL) {
+		return -1;
+	}
+	mhif->total_len = mhif->header_len;
+
+	mhif->format_id = get_gint32 (img_info->format_id,
+		               	      buffer->byte_order);
+	mhif->image_size = get_gint32 (img_info->height * img_info->width * 2,
+				       buffer->byte_order);
+
+	dump_mhif (mhif);
+
+	return get_gint32 (mhif->header_len, buffer->byte_order);
+}
+
+static int
+write_mhlf (Itdb_DB *db, iPodBuffer *buffer)
+{
+	MhlfHeader *mhlf;
+	unsigned int total_bytes;
+	int bytes_written;
+        GList *formats; 
+        GList *it;
+        unsigned int num_children;
+
+	mhlf = (MhlfHeader *)init_header (buffer, "mhlf", sizeof (MhlfHeader));
+	if (mhlf == NULL) {
+		return -1;
+	}
+
+	total_bytes = get_gint32 (mhlf->header_len, buffer->byte_order);
+        num_children = 0;
+        mhlf->num_files = get_gint32 (num_children, buffer->byte_order);
+
+        formats = NULL;
+        switch (buffer->db_type) {
+        case DB_TYPE_ITUNES:
+            formats = itdb_device_get_cover_art_formats(db_get_device(db));
+            break;
+	case DB_TYPE_PHOTO:
+            formats = itdb_device_get_photo_formats(db_get_device(db));
+            break;
+        }
+        if (formats == NULL) {
+                return total_bytes;
+        }
+
+        for (it = formats; it != NULL; it = it->next) {
+                const Itdb_ArtworkFormat *format;
+	        iPodBuffer *sub_buffer;
+                
+                format = (const Itdb_ArtworkFormat *)it->data;
+        	sub_buffer = ipod_buffer_get_sub_buffer (buffer, total_bytes);
+        	if (sub_buffer == NULL) {
+                        g_list_free (formats);
+        		return -1;
+        	}
+
+        	bytes_written = write_mhif (db, sub_buffer, format);
+	        			    
+        	ipod_buffer_destroy (sub_buffer);
+        	if (bytes_written == -1) {
+        		return -1;
+        	}
+        	total_bytes += bytes_written;
+		mhlf = ipod_buffer_get_pointer (buffer);
+
+                num_children++;
+        	/* Only update number of children when all went well to try 
+                 * to get something somewhat consistent when there are errors
+        	 */
+        	mhlf->num_files = get_gint32 (num_children, buffer->byte_order);
+        }
+	dump_mhl ((MhlHeader *)mhlf, "mhlf");
+        g_list_free (formats);
+
+	return total_bytes;
+}
+
+
+static int
+write_mhsd (Itdb_DB *db, iPodBuffer *buffer, enum MhsdType type)
+{
+	ArtworkDB_MhsdHeader *mhsd;
+	unsigned int total_bytes;
+	int bytes_written;
+	iPodBuffer *sub_buffer;
+
+	g_assert (type >= MHSD_TYPE_MHLI);
+	g_assert (type <= MHSD_TYPE_MHLF);
+	mhsd = (ArtworkDB_MhsdHeader *)init_header (buffer, "mhsd", sizeof (ArtworkDB_MhsdHeader));
+	if (mhsd == NULL) {
+		return -1;
+	}
+	total_bytes = get_gint32 (mhsd->header_len, buffer->byte_order);
+	mhsd->total_len = get_gint32 (total_bytes, buffer->byte_order);
+	mhsd->index = get_gint16 (type, buffer->byte_order);
+	bytes_written = -1;
+
+	sub_buffer = ipod_buffer_get_sub_buffer (buffer, total_bytes);
+	if (sub_buffer == NULL) {
+		return -1;
+	}
+	switch (type) {
+	case MHSD_TYPE_MHLI:
+		bytes_written = write_mhli (db, sub_buffer);
+		break;
+	case MHSD_TYPE_MHLA:
+		bytes_written = write_mhla (db, sub_buffer);
+		break;
+	case MHSD_TYPE_MHLF:
+		bytes_written = write_mhlf (db, sub_buffer);
+		break;
+	}
+	ipod_buffer_destroy (sub_buffer);
+	if (bytes_written == -1) {
+		return -1;
+	} else {
+		total_bytes += bytes_written;
+		mhsd = ipod_buffer_get_pointer (buffer);
+		mhsd->total_len = get_gint32 (total_bytes, buffer->byte_order);
+	}
+
+	dump_mhsd (mhsd);
+
+	return total_bytes;
+}
+
+static int
+write_mhfd (Itdb_DB *db, iPodBuffer *buffer, int id_max)
+{
+	MhfdHeader *mhfd;
+	unsigned int total_bytes;
+	int bytes_written;
+	int i;
+
+	
+	mhfd = (MhfdHeader *)init_header (buffer, "mhfd", sizeof (MhfdHeader));
+	if (mhfd == NULL) {
+		return -1;
+	}
+	total_bytes = get_gint32 (mhfd->header_len, buffer->byte_order);
+	mhfd->total_len = get_gint32 (total_bytes, buffer->byte_order);
+	switch (buffer->db_type) {
+	case DB_TYPE_PHOTO:
+		mhfd->unknown2 = get_gint32 (2, buffer->byte_order);
+		break;
+	case DB_TYPE_ITUNES:
+		mhfd->unknown2 = get_gint32 (2, buffer->byte_order);
+		break;
+	}
+	mhfd->next_id = get_gint32 (id_max, buffer->byte_order);
+	mhfd->unknown_flag1 = 2;
+	for (i = 1 ; i <= 3; i++) {
+		iPodBuffer *sub_buffer;
+
+		sub_buffer = ipod_buffer_get_sub_buffer (buffer, total_bytes);
+		if (sub_buffer == NULL) {
+			continue;
+		}
+		bytes_written = write_mhsd (db, sub_buffer, i);
+		ipod_buffer_destroy (sub_buffer);
+		if (bytes_written == -1) {
+			return -1;
+		}
+		total_bytes += bytes_written;
+		mhfd = ipod_buffer_get_pointer (buffer);
+		mhfd->total_len = get_gint32 (total_bytes, buffer->byte_order);
+		mhfd->num_children = get_gint32 (i, buffer->byte_order);
+	}
+
+	dump_mhfd (mhfd);
+
+	return total_bytes;
+}
+
+/* renumber the artwork IDs for all tracks containing artwork and with
+   an ID of != 0 */
+/* if the iPod does not support sparse artwork, renumber consecutively
+   and all artwork */
+/* returns the highest assigned ID or 0 if no IDs were used */
+static guint32
+ipod_artwork_db_set_ids (Itdb_iTunesDB *db)
+{
+    GList *gl;
+    const guint32 min_id = 0x64;
+    guint32 cur_id;
+
+    cur_id = min_id;
+
+    if (itdb_device_supports_sparse_artwork (db->device))
+    {
+	GHashTable *id_hash;
+
+	id_hash = g_hash_table_new (g_direct_hash, g_direct_equal);
+
+	for (gl = db->tracks; gl != NULL; gl = gl->next)
+	{
+	    Itdb_Track *song;
+	    Itdb_Artwork *artwork;
+
+	    song = gl->data;
+	    g_return_val_if_fail (song, -1);
+
+	    artwork = song->artwork;
+	    g_return_val_if_fail (artwork, -1);
+
+	    if (itdb_track_has_thumbnails (song) && (artwork->id != 0))
+	    {
+		gpointer orig_key;
+		gpointer orig_val;
+
+		if (g_hash_table_lookup_extended (id_hash, GINT_TO_POINTER (artwork->id),
+						  &orig_key, &orig_val))
+		{   /* ID was encountered before */
+		    artwork->id = GPOINTER_TO_INT (orig_val);
+		    artwork->dbid = 0;
+		}
+		else
+		{   /* first time we see this ID */
+		    g_hash_table_insert (id_hash, GINT_TO_POINTER (artwork->id),
+					 GINT_TO_POINTER (cur_id));
+		    artwork->id = cur_id++;
+		    artwork->dbid = song->dbid;
+		}
+		song->mhii_link = artwork->id;
+	    }
+	    else
+	    {
+		song->mhii_link = 0;
+	    }
+	}
+	g_hash_table_destroy (id_hash);
+    }
+    else 
+    {   /* iPod does not support sparse artwork -- just renumber */
+	for (gl = db->tracks; gl != NULL; gl = gl->next)
+	{
+	    Itdb_Track *song;
+
+	    song = gl->data;
+	    g_return_val_if_fail (song, -1);
+	    g_return_val_if_fail (song->artwork, -1);
+
+	    song->mhii_link = 0;
+
+	    if (itdb_track_has_thumbnails (song))
+	    {
+		song->artwork->id = cur_id++;
+		song->artwork->dbid = song->dbid;
+	    }
+	    song->mhii_link = song->artwork->id;
+	}
+    }	
+
+    if (cur_id == min_id)
+	return 0;
+    else
+	return cur_id-1;
+}
+
+
+
+/* for all tracks with new artwork (id == 0) do the following:
+   - try to identify if this artwork is identical to previous artwork
+     (within the same album)
+   - if no: assign new ID
+   - if yes: assign same ID
+
+   Returns the highest ID used.
+*/
+static guint32
+ipod_artwork_mark_new_doubles (Itdb_iTunesDB *itdb, guint max_id)
+{
+    GList *gl;
+    GHashTable *hash_file, *hash_memory, *hash_pixbuf;
+
+    hash_file =   g_hash_table_new_full (g_str_hash, g_str_equal,
+					 g_free, NULL);
+    hash_memory = g_hash_table_new_full (g_str_hash, g_str_equal,
+					 g_free, NULL);
+    hash_pixbuf = g_hash_table_new_full (g_str_hash, g_str_equal,
+					 g_free, NULL);
+
+    for (gl=itdb->tracks; gl; gl=gl->next)
+    {
+	Itdb_Artwork *artwork;
+	Itdb_Track *track;
+
+	track= gl->data;
+	g_return_val_if_fail (track, max_id);
+	artwork = track->artwork;
+	g_return_val_if_fail (artwork, max_id);
+
+	if ((artwork->id == 0) && itdb_track_has_thumbnails (track))
+	{
+	    const gchar *checkstring;
+	    GHashTable *hash=NULL;
+	    gpointer orig_val = NULL;
+	    Itdb_Thumb *thumb = artwork->thumbnail;
+	    GChecksum *checksum = g_checksum_new (G_CHECKSUM_SHA1);
+
+	    /* use the album name as part of the checksum */
+	    if (track->album && *track->album)
+	    {
+		g_checksum_update (checksum,
+				   (guchar *)track->album, strlen (track->album));
+	    }
+
+	    switch (thumb->data_type)
+	    {
+	    case ITDB_THUMB_TYPE_MEMORY:
+	    {
+		Itdb_Thumb_Memory *mthumb = (Itdb_Thumb_Memory *)thumb;
+		g_checksum_update (checksum,
+				   mthumb->image_data, mthumb->image_data_len);
+		hash = hash_memory;
+		break;
+	    }
+	    case ITDB_THUMB_TYPE_PIXBUF:
+	    {
+		Itdb_Thumb_Pixbuf *pthumb = (Itdb_Thumb_Pixbuf *)thumb;
+		g_return_val_if_fail (pthumb->pixbuf, max_id);
+		g_checksum_update (checksum,
+				   gdk_pixbuf_get_pixels (pthumb->pixbuf),
+				   gdk_pixbuf_get_height (pthumb->pixbuf) * gdk_pixbuf_get_rowstride (pthumb->pixbuf));
+		hash = hash_pixbuf;
+		break;
+	    }
+	    case ITDB_THUMB_TYPE_FILE:
+	    {
+		Itdb_Thumb_File *fthumb = (Itdb_Thumb_File *)thumb;
+		g_return_val_if_fail (fthumb->filename, max_id);
+		g_checksum_update (checksum,
+				   (guchar *)fthumb->filename,
+				   strlen (fthumb->filename));
+		hash = hash_file;
+		break;
+	    }
+	    case ITDB_THUMB_TYPE_INVALID:
+		/* programming error */
+		g_print ("encountered invalid thumb.\n");
+		g_return_val_if_reached (max_id);
+		break;
+	    case ITDB_THUMB_TYPE_IPOD:
+		/* thumbs on the iPod are definitely not expected to
+		   have an ID of 0 */
+		g_print ("encountered iPod thumb with ID = 0.\n");
+		g_return_val_if_reached (max_id);
+		break;
+	    }
+
+	    checkstring = g_checksum_get_string (checksum);
+	    if (g_hash_table_lookup_extended (hash, checkstring, NULL, &orig_val))
+	    {   /* same artwork was used before */
+		Itdb_Artwork *previous_artwork = orig_val;
+		artwork->id = previous_artwork->id;
+		artwork->dbid = 0;
+	    }
+	    else
+	    {   /* first occurence of this artwork */
+		artwork->id = ++max_id;
+		artwork->dbid = track->dbid;
+		g_hash_table_insert (hash, g_strdup (checkstring), artwork);
+	    }
+	    track->mhii_link = artwork->id;
+	    g_checksum_free (checksum);
+	}
+    }
+
+    g_hash_table_destroy (hash_memory);
+    g_hash_table_destroy (hash_file);
+    g_hash_table_destroy (hash_pixbuf);
+
+    return max_id;
+}
+
+
+/* returns the highest ID used */
+static guint32 itdb_prepare_thumbnails (Itdb_iTunesDB *itdb)
+{
+    gint max_id;
+
+    /* first renumber the old thumbnails to make sure we don't get too
+     * high */
+    max_id = ipod_artwork_db_set_ids (itdb);
+
+    if (itdb_device_supports_sparse_artwork (itdb->device))
+    {
+	/* go through all newly added artwork and pass out new IDs. the
+	   same ID will be assigned to identical artwork within one album */
+	max_id = ipod_artwork_mark_new_doubles (itdb, max_id);
+
+	/* set the IDs again to make sure they are in the right order */
+	max_id = ipod_artwork_db_set_ids (itdb);
+    }
+
+    return max_id;
+}
+
+
+
+
+G_GNUC_INTERNAL int
+ipod_write_artwork_db (Itdb_iTunesDB *itdb)
+{
+	iPodBuffer *buf;
+	int bytes_written;
+	char *filename;
+	int id_max;
+	Itdb_DB db;
+	int status;
+
+	db.db_type = DB_TYPE_ITUNES;
+	db.db.itdb = itdb;
+
+	id_max = itdb_prepare_thumbnails (itdb);
+
+	/* First, let's write the .ithmb files, this will create the
+	 * various thumbnails as well */
+
+	status = itdb_write_ithumb_files (&db);
+	if (status != 0) {
+		return -1;
+	}
+
+	filename = ipod_db_get_artwork_db_path (itdb_get_mountpoint (itdb));
+	if (filename == NULL) {
+		/* FIXME: the iTunesDB will be inconsistent wrt artwork_count
+		 * it might be better to 0 out this field in all tracks
+		 * when we encounter an error
+		 */
+		return -1;
+	}
+	buf = ipod_buffer_new (filename, itdb->device->byte_order, DB_TYPE_ITUNES);
+	if (buf == NULL) {
+		g_print ("Couldn't create %s\n", filename);
+	        g_free (filename);
+		return -1;
+	}
+	g_free (filename);
+	bytes_written = write_mhfd (&db, buf, id_max);
+
+	/* Refcount of the shared buffer should drop to 0 and this should
+	 * sync buffered data to disk
+	 */
+	ipod_buffer_destroy (buf);
+
+	if (bytes_written == -1) {
+		g_print ("Failed to save %s\n", filename);
+		/* FIXME: maybe should unlink the file we may have created */
+		return -1;
+	}
+	return 0;
+}
+
+int
+ipod_write_photo_db (Itdb_PhotoDB *photodb)
+{
+	iPodBuffer *buf;
+	int bytes_written;
+	char *filename;
+	int id_max;
+	Itdb_DB db;
+	int status;
+
+	db.db_type = DB_TYPE_PHOTO;
+	db.db.photodb = photodb;
+
+	filename = ipod_db_get_photos_db_path (db_get_mountpoint (&db));
+
+	status = itdb_write_ithumb_files (&db);
+	if (status != 0) {
+		return -1;
+	}
+
+	if (filename == NULL) {
+		return -1;
+	}
+	buf = ipod_buffer_new (filename, photodb->device->byte_order, DB_TYPE_PHOTO);
+	if (buf == NULL) {
+		g_print ("Couldn't create %s\n", filename);
+		g_free (filename);
+		return -1;
+	}
+	id_max = itdb_get_max_photo_id( photodb );
+	bytes_written = write_mhfd (&db, buf, id_max+1);
+
+	/* Refcount of the shared buffer should drop to 0 and this should
+	 * sync buffered data to disk
+	 */
+	ipod_buffer_destroy (buf);
+        g_free (filename);
+
+	if (bytes_written == -1) {
+		g_print ("Failed to save %s\n", filename);
+		/* FIXME: maybe should unlink the file we may have created */
+		return -1;
+	}
+	return 0;
+}
+#else
+G_GNUC_INTERNAL int
+ipod_write_artwork_db (Itdb_iTunesDB *itdb)
+{
+    return -1;
+}
+
+int
+ipod_write_photo_db (Itdb_PhotoDB *photodb)
+{
+    return -1;
+}
+#endif

Added: libgpod/trunk/libgpod/branches/upstream/current/src/db-image-parser.c
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/db-image-parser.c	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/db-image-parser.c	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,115 @@
+/*
+ *  Copyright (C) 2005 Christophe Fergeau
+ *
+ * 
+ *  The code contained in this file is free software; you can redistribute
+ *  it and/or modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either version
+ *  2.1 of the License, or (at your option) any later version.
+ *  
+ *  This file 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
+ *  Lesser General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this code; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ * 
+ *  iTunes and iPod are trademarks of Apple
+ * 
+ *  This product is not supported/written/published by Apple!
+ *
+ */
+#include <errno.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include "itdb_device.h"
+#include "itdb_endianness.h"
+#include "db-artwork-parser.h"
+#include "db-image-parser.h"
+#include <glib/gi18n-lib.h>
+
+static const Itdb_ArtworkFormat *
+find_format (GList *formats, gint16 format_id)
+{
+        GList *it;
+
+        for (it = formats; it != NULL; it = it->next) {
+                const Itdb_ArtworkFormat *format;
+                format = (const Itdb_ArtworkFormat *)it->data;
+                if (format->format_id == format_id) {
+                        return format;
+                }
+        }
+
+        return NULL;
+}
+
+static const Itdb_ArtworkFormat * 
+image_format_from_id (Itdb_Device *device, gint16 format_id)
+{
+        GList *formats;
+        const Itdb_ArtworkFormat *format;
+
+	if (device == NULL) {
+		return NULL;
+	}
+
+	formats = itdb_device_get_cover_art_formats (device);
+        format = find_format (formats, format_id);
+        g_list_free (formats);
+        if (format != NULL) {
+                return format;
+        }
+
+	formats = itdb_device_get_photo_formats (device);
+        format = find_format (formats, format_id);
+        g_list_free (formats);
+	return format;
+}
+
+G_GNUC_INTERNAL Itdb_Thumb_Ipod_Item *
+ipod_image_new_from_mhni (MhniHeader *mhni, Itdb_DB *db)
+{
+	Itdb_Thumb_Ipod_Item *img;
+        const Itdb_ArtworkFormat *format;
+	gint16 format_id;
+	Itdb_Device *device = NULL;
+
+	device = db_get_device (db);
+	g_return_val_if_fail (device, NULL);
+
+	format_id = get_gint32_db (db, mhni->format_id);
+        format = image_format_from_id (device, format_id);
+        if (format == NULL) {
+            g_warning (_("Unexpected image type in mhni: %d, offset: %d\n"), 
+                       format_id, get_guint32_db (db, mhni->ithmb_offset));
+            return NULL;
+        }
+
+        img = itdb_thumb_new_item_from_ipod (format);
+	if (img == NULL) {
+		return NULL;
+	}
+	img->size   = get_guint32_db (db, mhni->image_size);
+	img->offset = get_guint32_db (db, mhni->ithmb_offset);
+	img->width  = get_gint16_db (db, mhni->image_width);
+	img->height = get_gint16_db (db, mhni->image_height);
+	img->horizontal_padding  =
+	    get_gint16_db (db, mhni->horizontal_padding);
+	img->vertical_padding =
+	    get_gint16_db (db, mhni->vertical_padding);
+
+#if DEBUG_ARTWORK
+	printf ("format_id: %d, of: %6d sz: %6d, x: %3d, y: %3d, xpad: %3d, ypad: %3d\n",
+		format_id, img->offset, img->size, img->width, img->height, img->horizontal_padding, img->vertical_padding);
+#endif
+
+	return img;
+}

Added: libgpod/trunk/libgpod/branches/upstream/current/src/db-image-parser.h
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/db-image-parser.h	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/db-image-parser.h	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,85 @@
+/*
+ *  Copyright (C) 2005 Christophe Fergeau
+ *
+ * 
+ *  The code contained in this file is free software; you can redistribute
+ *  it and/or modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either version
+ *  2.1 of the License, or (at your option) any later version.
+ *  
+ *  This file 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
+ *  Lesser General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this code; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ * 
+ *  iTunes and iPod are trademarks of Apple
+ * 
+ *  This product is not supported/written/published by Apple!
+ *
+ *  $Id: db-image-parser.h 2010 2008-06-09 19:57:02Z teuf $
+ */
+
+#ifndef IMAGE_PARSER_H
+#define IMAGE_PARSER_H
+
+#include "db-itunes-parser.h"
+#include "itdb_device.h"
+#include "itdb_private.h"
+#include "itdb_thumb.h"
+#include "itdb.h"
+
+#define DEBUG_ARTWORK 0
+
+#define RED_BITS_565   5
+#define RED_SHIFT_565 11
+#define RED_MASK_565  (((1 << RED_BITS_565)-1) << RED_SHIFT_565)
+
+#define GREEN_BITS_565 6
+#define GREEN_SHIFT_565 5
+#define GREEN_MASK_565 (((1 << GREEN_BITS_565)-1) << GREEN_SHIFT_565)
+
+#define BLUE_BITS_565 5
+#define BLUE_SHIFT_565 0
+#define BLUE_MASK_565 (((1 << BLUE_BITS_565)-1) << BLUE_SHIFT_565)
+
+#define ALPHA_BITS_555 1
+#define ALPHA_SHIFT_555 15
+#define ALPHA_MASK_555  (((1 << ALPHA_BITS_555)-1) << ALPHA_SHIFT_555)
+
+#define RED_BITS_555   5
+#define RED_SHIFT_555 10
+#define RED_MASK_555  (((1 << RED_BITS_555)-1) << RED_SHIFT_555)
+
+#define GREEN_BITS_555 5
+#define GREEN_SHIFT_555 5
+#define GREEN_MASK_555 (((1 << GREEN_BITS_555)-1) << GREEN_SHIFT_555)
+
+#define BLUE_BITS_555 5
+#define BLUE_SHIFT_555 0
+#define BLUE_MASK_555 (((1 << BLUE_BITS_555)-1) << BLUE_SHIFT_555)
+
+#define ALPHA_BITS_888 8
+#define ALPHA_SHIFT_888 24
+#define ALPHA_MASK_888  (((1 << ALPHA_BITS_888)-1) << ALPHA_SHIFT_888)
+
+#define RED_BITS_888   8
+#define RED_SHIFT_888 16
+#define RED_MASK_888  (((1 << RED_BITS_888)-1) << RED_SHIFT_888)
+
+#define GREEN_BITS_888 8
+#define GREEN_SHIFT_888 8
+#define GREEN_MASK_888 (((1 << GREEN_BITS_888)-1) << GREEN_SHIFT_888)
+
+#define BLUE_BITS_888 8
+#define BLUE_SHIFT_888 0
+#define BLUE_MASK_888 (((1 << BLUE_BITS_888)-1) << BLUE_SHIFT_888)
+
+G_GNUC_INTERNAL Itdb_Thumb_Ipod_Item *ipod_image_new_from_mhni (MhniHeader *mhni, 
+			        			   Itdb_DB *db);
+
+G_GNUC_INTERNAL int itdb_write_ithumb_files (Itdb_DB *db);
+#endif

Added: libgpod/trunk/libgpod/branches/upstream/current/src/db-itunes-parser.h
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/db-itunes-parser.h	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/db-itunes-parser.h	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,650 @@
+/*
+ *  Copyright (C) 2005-2007 Christophe Fergeau
+ *
+ * 
+ *  The code contained in this file is free software; you can redistribute
+ *  it and/or modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either version
+ *  2.1 of the License, or (at your option) any later version.
+ *  
+ *  This file 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
+ *  Lesser General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this code; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ * 
+ *  iTunes and iPod are trademarks of Apple
+ * 
+ *  This product is not supported/written/published by Apple!
+ *
+ * $Id: db-itunes-parser.h 2233 2009-01-21 21:49:08Z teuf $
+ */
+
+
+#ifndef DB_PARSER_H
+#define DB_PARSER_H
+
+#include <glib.h>
+
+struct _MHeader {
+	unsigned char header_id[4];
+	gint32 header_len;
+};
+
+typedef struct _MHeader MHeader;
+
+struct _MhlHeader {
+	unsigned char header_id[4];
+	gint32 header_len;
+	gint32 num_children;
+	unsigned char padding[];
+};
+
+typedef struct _MhlHeader MhlHeader;
+
+
+typedef struct _MhbdHeader MhbdHeader;
+typedef struct _ArtworkDB_MhsdHeader ArtworkDB_MhsdHeader;
+/*typedef struct _MhsdHeader MhsdHeader;*/
+typedef struct _MhltHeader MhltHeader;
+typedef struct _MhlpHeader MhlpHeader;
+typedef struct _MhypHeader MhypHeader;
+typedef struct _MhipHeader MhipHeader;
+typedef struct _MhitHeader MhitHeader;
+typedef struct _ArtworkDB_MhodHeader ArtworkDB_MhodHeader;
+/*typedef struct _MhodHeader MhodHeader;*/
+typedef struct _MhfdHeader MhfdHeader;
+typedef struct _MhliHeader MhliHeader;
+typedef struct _MhiiHeader MhiiHeader;
+typedef struct _MhniHeader MhniHeader;
+typedef struct _MhlaHeader MhlaHeader;
+typedef struct _MhbaHeader MhbaHeader;
+typedef struct _MhlfHeader MhlfHeader;
+typedef struct _MhifHeader MhifHeader;
+typedef struct _MhiaHeader MhiaHeader;
+
+typedef struct _MhitHeader471 MhitHeader471;
+/* MHOD typedef mess */
+typedef struct _ArtworkDB_MhodHeaderString ArtworkDB_MhodHeaderString;
+typedef struct _MhodHeaderString MhodHeaderString;
+typedef struct _MhodHeaderSmartPlaylistData MhodHeaderSmartPlaylistData;
+typedef struct _MhodHeaderSmartPlaylistRuleString MhodHeaderSmartPlaylistRuleString; 
+typedef struct _MhodHeaderSmartPlaylistRuleNonString MhodHeaderSmartPlaylistRuleNonString;
+typedef struct _MhodHeaderSmartPlaylistRule MhodHeaderSmartPlaylistRule;
+
+struct _MhbdHeader {
+	gchar   header_id[4];
+	guint32 header_len;
+	guint32 total_len;
+	guint32 unknown1;
+	guint32 version;
+	guint32 num_children;
+	guint64 db_id;
+	guint16 unknown2;
+	guint32 unknown3;
+	guint64 unknown4;
+	guint16 unknown5;
+	guint16 hashing_scheme;
+	guchar  unknown6[20];
+	gchar   language_id[2];
+	guint64 db_persistent_id;
+	guint32 unknown7;
+	guint32 unknown8;
+	guchar  hash58[20];
+	gint32  timezone_offset;
+	guint16 unknown9;
+	guchar  hash72[46];
+	guchar  padding[];
+} __attribute__((__packed__));
+
+enum MhsdIndexType {
+	MHSD_TRACK_LIST = 1,
+	MHSD_PLAYLIST_LIST = 2
+};
+
+enum MhsdPhotoIndexType {
+	MHSD_IMAGE_LIST = 1,
+	MHSD_ALBUM_LIST = 2,
+	MHSD_FILE_LIST = 3
+};
+
+struct _ArtworkDB_MhsdHeader {
+	unsigned char header_id[4];
+	gint32 header_len;
+	gint32 total_len;
+        /* Strangely, the following field is only 16 bits long in the
+	 * ArtworkDB (it's definitely 32 bits in the iTunesDB). This
+	 * could well be an error with the first generation of mobile
+	 * phones with iPod support).
+	 */
+	gint16 index;
+        gint16 unknown014;
+	unsigned char padding[];
+};
+
+struct _iTunesDB_MhsdHeader {
+	unsigned char header_id[4];
+	gint32 header_len;
+	gint32 total_len;
+	gint32 index;
+	unsigned char padding[];
+};
+struct _MhltHeader {
+	unsigned char header_id[4];
+	gint32 header_len;
+	gint32 num_songs;
+	unsigned char padding[];
+};
+
+struct _MhlpHeader {
+	unsigned char header_id[4];
+	gint32 header_len;
+	gint32 num_playlists;
+	unsigned char padding[];
+};
+
+struct _MhypHeader {
+	unsigned char header_id[4];
+	gint32 header_len;
+	gint32 total_len;
+	gint32 num_mhod;
+	gint32 num_items;
+	gint32 hidden;
+	gint32 timestamp;
+	gint32 playlist_id;
+	gint32 unknown3;
+	gint32 unknown4;
+	gint32 unknown5;
+	unsigned char padding[];
+};
+
+struct _MhipHeader {
+	unsigned char header_id[4];
+	gint32 header_len;
+	gint32 total_len;
+	gint32 unknown1;
+	gint32 format_id;
+	gint32 unknown2;
+	gint32 track_id;
+	gint32 timestamp;
+	unsigned char padding[];
+};
+
+/* MHIT header as written by iTunes 4.7.1, the added fields (from unknown17 to
+ * the end of the struct) are pretty useless, so we don't use this struct
+ */
+struct _MhitHeader471 {
+	unsigned char header_id[4];
+	gint32 header_len;
+	gint32 total_len;
+	gint32 num_mhod;
+	gint32 track_id;
+	gint32 visible;
+	gint32 filetype;
+	/* FIXME: endianness issue with the order of the 3 fields above ? */
+	gint16 type;
+	gchar  compilation;
+	gchar  rating;
+	gint32 date_added;
+	gint32 size;
+	gint32 length;
+	gint32 track_number;
+	gint32 track_total;
+	gint32 year;
+	gint32 bitrate;
+	/* FIXME: endianness issue with the order of the 2 fields above ? */
+	gint16 unknown;
+	gint16 sample_rate;
+	gint32 volume;
+	gint32 start_time;
+	gint32 stop_time;
+	gint32 sound_check;
+	gint32 play_count;
+	gint32 play_count2;
+	gint32 last_played;
+	gint32 disc_number;
+	gint32 disc_total;
+	gint32 user_id;
+	gint32 last_modified;
+	gint32 bookmark_time;
+	gint64 song_id;
+	/* FIXME: endianness issue with the order of the 5 fields above ? */
+	gchar  checked;
+	gchar  app_rating;
+	gint16 bpm;
+	gint16 artwork_count;
+	gint16 unknown9;
+	gint32 artwork_size;
+	gint32 unknown11;
+	gint32 sample_rate2;
+	gint32 unknown13;
+	gint32 unknown14;
+	gint32 unknown15;
+	gint32 unknown16;
+	gint32 unknown17;
+	gint32 unknown18;
+	gint32 unknown19;
+	gint64 song_id2;
+	gint32 unknown20;
+	gint32 unknown21;
+	gint32 unknown22;
+	gint32 unknown23;
+	gint32 unknown24;
+	gint32 unknown25;
+	gint32 unknown26;
+	gint32 unknown27;
+	gint32 unknown28;
+	gint32 unknown29;
+	gint32 unknown30;
+	gint32 unknown31;
+	gint32 unknown32;
+	gint32 unknown33;
+	gint32 unknown34;
+	gint32 unknown35;
+	gint32 unknown36;
+	unsigned char padding[];
+};
+
+struct _MhitHeader {
+	unsigned char header_id[4];
+	gint32 header_len;
+	gint32 total_len;
+	gint32 num_mhod;
+	gint32 track_id;
+	gint32 visible;
+	gint32 filetype;
+	/* FIXME: endianness issue with the order of the 3 fields above ? */
+	gint16 type;
+	gchar  compilation;
+	gchar  rating;
+	gint32 date_added;
+	gint32 size;
+	gint32 length;
+	gint32 track_number;
+	gint32 track_total;
+	gint32 year;
+	gint32 bitrate;
+	/* FIXME: endianness issue with the order of the 2 fields above ? */
+	gint16 unknown;
+	gint16 sample_rate;
+	gint32 volume;
+	gint32 start_time;
+	gint32 stop_time;
+	gint32 sound_check;
+	gint32 play_count;
+	gint32 play_count2;
+	gint32 last_played;
+	gint32 disc_number;
+	gint32 disc_total;
+	gint32 user_id;
+	gint32 last_modified;
+	gint32 bookmark_time;
+	gint64 song_id;
+	/* FIXME: endianness issue with the order of the 5 fields above ? */
+	gchar  checked;
+	gchar  app_rating;
+	gint16 bpm;
+	gint16 artwork_count;
+	gint16 unknown9;
+	gint32 artwork_size;
+	gint32 unknown11;
+	gint32 sample_rate2;
+	gint32 unknown13;
+	gint32 unknown14;
+	gint32 unknown15;
+	gint32 unknown16;
+	unsigned char padding[];
+};
+
+enum MhodEncoding {
+	MHOD_ENCODING_UTF16 = 0,
+	MHOD_ENCODING_UTF8 = 1
+};
+
+enum MhodType {
+	MHOD_TYPE_TITLE = 1,
+	MHOD_TYPE_LOCATION = 2,
+	MHOD_TYPE_ALBUM = 3,
+	MHOD_TYPE_ARTIST = 4,
+	MHOD_TYPE_GENRE = 5,
+	MHOD_TYPE_FILETYPE = 6,
+	MHOD_TYPE_EQ_SETTING = 7,
+	MHOD_TYPE_COMMENT = 8,
+	MHOD_TYPE_COMPOSER = 12,
+	MHOD_TYPE_GROUPING = 13,
+	MHOD_TYPE_SMART_PLAYLIST_DATA = 50,
+	MHOD_TYPE_SMART_PLAYLIST_RULES = 51,
+	MHOD_TYPE_LIBRARY_PLAYLIST_INDEX = 52,
+	MHOD_TYPE_100 = 100
+};
+
+struct _MhodHeader {
+	unsigned char header_id[4];
+	gint32 header_len;
+	gint32 total_len;
+	gint32 type;
+	gint32 unknown1;
+	gint32 unknown2;
+};
+
+struct _ArtworkDB_MhodHeader {
+	unsigned char header_id[4];
+	gint32 header_len;
+	gint32 total_len;
+    /* Strangely, the following field is only 16 bits long in the
+	 * ArtworkDB (it's definitely 32 bits in the iTunesDB). This
+	 * could well be an error with the first generation of mobile
+	 * phones with iPod support).
+	 */
+	gint16 type;
+        gint16 unknown014;
+	gint32 unknown1;
+	gint32 unknown2;
+};
+
+struct _MhodHeaderString {
+	unsigned char header_id[4];
+	gint32 header_len;
+	gint32 total_len;
+	gint32 type; /* < 50 */
+	gint32 unknown1;
+	gint32 unknown2;
+	gint32 position;
+	gint32 string_len;
+	gint32 unknown3; /* It was thought that this was string encoding:
+			  * 0 == UTF-16, 1 == UTF-8, however, recent iTunesDB
+			  * files have had this set to 1 even with UTF-16 strings.
+			  * Therefore this is definitely incorrect, and the
+			  * correct meaning has not yet been discovered yet. */
+	gint32 unknown4;
+	unsigned char string[];
+};
+
+enum MhodArtworkType {
+	MHOD_ARTWORK_TYPE_ALBUM_NAME = 1, /* string:    album name (in the Photo Database) */
+	MHOD_ARTWORK_TYPE_THUMBNAIL  = 2, /* container: thumbnail image */
+	MHOD_ARTWORK_TYPE_FILE_NAME  = 3, /* string:    file name */
+	MHOD_ARTWORK_TYPE_IMAGE      = 5  /* container: full resolution image (in the Photo Database) */
+};
+
+struct _ArtworkDB_MhodHeaderString {
+	unsigned char header_id[4];
+	gint32 header_len;
+	gint32 total_len;
+        gint16 type;
+        gint8  unknown13;
+	gint8  padding_len;
+	gint32 unknown1;
+	gint32 unknown2;
+	gint32 string_len;
+	gint8 encoding; /* 0,1: string is UTF8, 2: string is UTF16-LE */
+        gint8 unknown5;
+        gint16 unknown6;
+	gint32 unknown4;
+        gchar  string[];
+};
+
+enum MhodLimitType {
+	MHOD_LIMIT_MINUTES = 1,
+	MHOD_LIMIT_MEGABYTES = 2,
+	MHOD_LIMIT_SONGS = 3,
+	MHOD_LIMIT_HOURS = 4,
+	MHOD_LIMIT_GIGABYTES = 5
+};
+
+enum MhodLimitSortType {
+	MHOD_LIMIT_SORT_RANDOM = 0x02,
+	MHOD_LIMIT_SORT_SONG_NAME = 0x03,
+	MHOD_LIMIT_SORT_ALBUM = 0x04,
+	MHOD_LIMIT_SORT_ARTIST = 0x05,
+	MHOD_LIMIT_SORT_GENRE = 0x07,
+	MHOD_LIMIT_SORT_MOST_RECENTLY_ADDED = 0x10,
+	MHOD_LIMIT_SORT_MOST_OFTEN_PLAYED = 0x14,
+	MHOD_LIMIT_SORT_MOST_RECENTLY_PLAYED = 0x15,
+	MHOD_LIMIT_SORT_HIGHEST_RATING = 0x17
+};
+
+struct _MhodHeaderSmartPlaylistData {
+	unsigned char header_id[4];
+	gint32 header_len;
+	gint32 total_len;
+	gint32 type; /* 50 */
+	gint32 unknown1;
+	gint32 unknown2;
+	gchar  live_update;
+	gchar  rules_enable;
+	gchar  limit_enable;
+	gchar  limit_type;
+	gchar  limit_sort;
+	gchar  unknow3[3];
+	gint32 limit;
+	gchar  match_checked_only;
+	gchar  reverse_limit_sort;
+	unsigned char padding[];
+};
+
+
+enum MhodSmartPlaylistRuleFieldType {
+	MHOD_FIELD_SONG_NAME = 0x02,
+	MHOD_FIELD_ALBUM = 0x03,
+	MHOD_FIELD_ARTIST = 0x04,
+	MHOD_FIELD_BITRATE = 0x05,
+	MHOD_FIELD_SAMPLE_RATE = 0x06,
+	MHOD_FIELD_YEAR = 0x07,
+	MHOD_FIELD_GENRE = 0x08,
+	MHOD_FIELD_KIND = 0x09,	
+	MHOD_FIELD_DATE_MODIFIED = 0x0a,
+	MHOD_FIELD_TRACK_NUMBER = 0x0b,
+	MHOD_FIELD_SIZE = 0x0c,
+	MHOD_FIELD_TIME = 0x0d,
+	MHOD_FIELD_COMMENT = 0x0e,
+	MHOD_FIELD_DATE_ADDED = 0x10,
+	MHOD_FIELD_COMPOSER = 0x12,
+	MHOD_FIELD_PLAY_COUNT = 0x16,
+	MHOD_FIELD_LAST_PLAYED = 0x17,
+	MHOD_FIELD_DISC_NUMBER = 0x18,
+	MHOD_FIELD_RATING = 0x19,
+	MHOD_FIELD_COMPILATION = 0x1f,
+	MHOD_FIELD_BPM = 0x23,
+	MHOD_FIELD_GROUPING = 0x27,
+	MHOD_FIELD_PLAYLIST = 0x28
+};
+
+enum MhodSmartPlaylistRuleAction {
+	MHOD_RULE_IS = 1 << 0, 
+	MHOD_RULE_CONTAINS = 1 << 1,
+	MHOD_RULE_BEGINS_WITH = 1 << 2,
+	MHOD_RULE_ENDS_WITH = 1 << 3,
+	MHOD_RULE_GREATER_THAN = 1 << 4,
+	MHOD_RULE_GREATER_THAN_OR_EQUAL_TO = 1 << 5,
+	MHOD_RULE_LESS_THAN = 1 << 6,
+	MHOD_RULE_LESS_THAN_OR_EQUAL_TO = 1 << 7,
+	MHOD_RULE_IN_THE_RANGE = 1 << 8,
+	MHOD_RULE_IS_THE_LAST = 1 << 9,
+	MHOD_RULE_NOT = 1 << 24,
+	MHOD_RULE_STRING = 1 << 25
+};
+
+
+struct _MhodHeaderSmartPlaylistRuleString {
+	/* Big endian fields */
+	gint32 field;
+	gint32 action;
+	gchar  padding[44];
+	gint32 string_len;
+	gchar  string[];
+};
+
+struct _MhodHeaderSmartPlaylistRuleNonString {
+	/* Big endian fields */
+	gint32  field;
+	gint32  action;
+	gchar   padding[44];
+	gint32  length;
+	guint64 from_value;
+	gint64  from_date;
+	guint64 from_unit;
+	guint64 to_value;
+	gint64  to_date;
+	guint64 to_unit;
+	gchar   unknown[20];
+};
+
+struct _MhodHeaderSmartPlaylistRule {
+	unsigned char header_id[4];
+	gint32 header_len;
+	gint32 total_len;
+	gint32 type; /* 51 */
+	gint32 unknown1;
+	gint32 unknown2;
+	gchar  rules_id[4];
+	/* Fields stored in big-endian from there */
+	gint32 unknown5;
+	gint32 number_of_rules;
+	gint32 rules_operator;
+	gchar  padding[120];
+	union {
+		MhodHeaderSmartPlaylistRuleString rule_string;
+		MhodHeaderSmartPlaylistRuleNonString rule_non_string;
+	} rule;
+};
+
+
+
+struct _MhfdHeader {
+	unsigned char header_id[4];
+	gint32 header_len;
+	gint32 total_len;
+	gint32 unknown1;
+	gint32 unknown2; /* always seem to be 1 for older databases,
+			    in an ArtworkDB generated by iTunes 4.9 or
+			    above, it's 2. Caution: iTunes7 removes
+			    the whole database if this field is 1 */
+	gint32 num_children;
+	gint32 unknown3;
+	gint32 next_id;
+	gint64 unknown5;
+	gint64 unknown6;
+	gint8  unknown_flag1;
+	gint8  unknown_flag2;
+	gint8  unknown_flag3;
+	gint8  unknown_flag4;
+	gint32 unknown8;
+	gint32 unknown9;
+	gint32 unknown10;
+	gint32 unknown11;
+	unsigned char padding[];
+};
+
+struct _MhliHeader {
+	unsigned char header_id[4];
+	gint32 header_len;
+	gint32 num_children;
+	unsigned char padding[];
+};
+
+struct _MhiiHeader {
+	unsigned char header_id[4];
+	gint32 header_len;
+	gint32 total_len;
+	gint32 num_children;
+	gint32 image_id;
+	gint64 song_id;
+	gint32 unknown4;
+	gint32 rating;
+	gint32 unknown6;
+	gint32 orig_date;
+	gint32 digitized_date;
+	gint32 orig_img_size;
+	unsigned char padding[];
+} __attribute__((__packed__));
+/* I we don't put the 'packed' attribute above, some 64 bit systems
+ * will pad the 64 bit integer to be aligned to an 8-byte boundary.
+ * Hopefully there won't be any systems around that crash when
+ * accessing 64 bit integers not aligned to 8-byte boundaries. */
+
+
+struct _MhniHeader {
+	unsigned char header_id[4];
+	gint32 header_len;
+	gint32 total_len;
+	gint32 num_children;
+	gint32 format_id;
+	gint32 ithmb_offset;
+	gint32 image_size;
+	gint16 vertical_padding;
+	gint16 horizontal_padding;
+	gint16 image_height;
+	gint16 image_width;
+	unsigned char padding[];
+};
+
+struct _MhlaHeader {
+	unsigned char header_id[4];
+	gint32 header_len;
+	gint32 num_children;
+	unsigned char padding[];
+};
+
+struct _MhbaHeader {
+	unsigned char header_id[4];
+	gint32 header_len;
+	gint32 total_len;
+	gint32 num_mhods;  /* number of Data Objects in the List,
+			      probably always 1 */
+	gint32 num_mhias;  /* number of pictures in the album */
+	gint32 album_id;   /* starts out at $64 and increments by 1 */
+	gint32 unk024;     /* unknown, seems to be always 0 */
+	gint16 unk028;     /* unknown, seems to be always 0 */
+	guint8 album_type; /* 1 = master photo list ("Photo Library"),
+			      2 = normal album, sometimes 4 and 5 */
+	guint8 playmusic;  /* play music during slideshow (from iPhoto setting) */
+	guint8 repeat;     /* repeat the slideshow (from iPhoto setting) */
+	guint8 random;     /* show the slides in random order (from iPhoto
+			      setting) */
+	guint8 show_titles;/* show slide captions (from iPhoto setting) */
+	guint8 transition_direction; /* 0=none, 1=left-to-right,
+			      2=right-to-left, 3=top-to-bottom,
+			      4=bottom-to-top (from iPhoto setting) */
+	gint32 slide_duration; /* in seconds (from iPhoto setting) */
+	gint32 transition_duration; /* in milliseconds (from iPhoto setting) */
+	gint32 unk044;     /* unknown, seems to always be 0 */
+	gint32 unk048;     /* unknown, seems to always be 0 */
+	gint64 song_id;    /* dbid2 of track in iTunesDB to play during
+			      slideshow (from iPhoto setting) */
+	gint32 prev_album_id; /* the id of the previous photoalbum */
+	unsigned char padding[];
+};
+
+struct _MhlfHeader {
+	unsigned char header_id[4];
+	gint32 header_len;
+	gint32 num_files;
+	unsigned char padding[];
+};
+
+struct _MhifHeader {
+	unsigned char header_id[4];
+	gint32 header_len;
+	gint32 total_len;
+	gint32 unknown1;
+	gint32 format_id;
+	gint32 image_size;
+	unsigned char padding[];
+};
+
+struct _MhiaHeader {
+	unsigned char header_id[4];
+	gint32 header_len;
+	gint32 total_len; /* probably the size of the header and all child records;
+			   * as there aren't any child records this is equal to header length */
+	gint32 unknown1; /* seems to be zero */
+	guint32 image_id; /* the id of the mhii record this mhia refers to */
+	unsigned char padding[];
+};
+
+
+#endif /* PARSE_DB_H */

Added: libgpod/trunk/libgpod/branches/upstream/current/src/db-parse-context.c
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/db-parse-context.c	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/db-parse-context.c	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,225 @@
+/*
+ *  Copyright (C) 2005 Christophe Fergeau
+ *
+ * 
+ *  The code contained in this file is free software; you can redistribute
+ *  it and/or modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either version
+ *  2.1 of the License, or (at your option) any later version.
+ *  
+ *  This file 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
+ *  Lesser General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this code; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ * 
+ *  iTunes and iPod are trademarks of Apple
+ * 
+ *  This product is not supported/written/published by Apple!
+ *
+ */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <string.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include <glib.h>
+#include <glib/gstdio.h>
+#include "db-parse-context.h"
+#include "db-itunes-parser.h"
+#include "itdb_endianness.h"
+
+DBParseContext *
+db_parse_context_new (const unsigned char *buffer, off_t len, guint byte_order)
+{
+	DBParseContext *result;
+
+	result = g_new0 (DBParseContext, 1);
+	if (result == NULL) {
+		return NULL;
+	}
+
+	result->buffer = buffer;
+	result->cur_pos = buffer;
+	result->total_len = len;
+	result->byte_order = byte_order;
+
+	return result;
+}
+
+void
+db_parse_context_destroy (DBParseContext *ctx) 
+{
+	g_return_if_fail (ctx != NULL);
+
+	if (ctx->mapped_file) {
+		g_mapped_file_free(ctx->mapped_file);
+	}
+
+	g_free (ctx);
+}
+
+static void
+db_parse_context_set_header_len (DBParseContext *ctx, off_t len)
+{
+	/* FIXME: this can probably happen in malformed itunesdb files, 
+	 * don't g_assert on this, only output a warning 
+	 */
+	g_assert ((ctx->cur_pos - ctx->buffer) <= len);
+	g_assert (len <= ctx->total_len);
+	ctx->header_len = len;
+}
+
+void
+db_parse_context_set_total_len (DBParseContext *ctx, off_t len)
+{
+	/* FIXME: this can probably happen in malformed itunesdb files, 
+	 * don't g_assert on this, only output a warning 
+	 */
+	g_assert ((ctx->cur_pos - ctx->buffer) <= len);
+	if (ctx->header_len != 0) {
+		g_assert (len >= ctx->header_len);
+	}
+	ctx->total_len = len;
+}
+
+
+off_t
+db_parse_context_get_remaining_length (DBParseContext *ctx)
+{
+	if (ctx->header_len != 0) {
+		return ctx->header_len - (ctx->cur_pos - ctx->buffer); 
+	} else {
+		return ctx->total_len - (ctx->cur_pos - ctx->buffer); 
+	}
+}
+
+DBParseContext *
+db_parse_context_get_sub_context (DBParseContext *ctx, off_t offset)
+{
+	DBParseContext *sub_ctx;
+
+	if (offset >= ctx->total_len) {
+		return NULL;
+	}
+	sub_ctx = db_parse_context_new (&ctx->buffer[offset], 
+				     ctx->total_len - offset, 
+				     ctx->byte_order);
+	sub_ctx->db = ctx->db;
+	sub_ctx->artwork = ctx->artwork;
+	return sub_ctx;
+}
+
+
+DBParseContext *
+db_parse_context_get_next_child (DBParseContext *ctx)
+{
+	if (ctx->header_len == 0) {
+		return NULL;
+	}
+	if (ctx->header_len >= ctx->total_len) {
+		return NULL;
+	}
+
+	return db_parse_context_get_sub_context (ctx, ctx->header_len);
+}
+
+void *
+db_parse_context_get_m_header_internal (DBParseContext *ctx, const char *id, off_t size) 
+{
+	MHeader *h;
+	char *header_id;
+
+	if (db_parse_context_get_remaining_length (ctx) < 8) {
+		return NULL;
+	}
+
+	h = (MHeader *)ctx->cur_pos;
+	header_id = g_strndup ((char *)h->header_id, 4);
+	if (ctx->byte_order == G_BIG_ENDIAN) {
+		g_strreverse (header_id);
+	}
+	if (strncmp (id, header_id, 4) != 0) {
+	        g_free (header_id);
+		return NULL;
+	}
+
+	g_free (header_id);
+
+	/* FIXME: this test sucks for compat: if a field is smaller than 
+	 * expected, we probably should create a buffer of the appropriate 
+	 * size inited to 0, copy the data that is available in it and use
+	 * that buffer in the rest of the code (maybe it's harmful to have
+	 * some fields at 0 in some headers though...)
+	 */
+	if (get_gint32 (h->header_len, ctx->byte_order) < size) {
+		return NULL;
+	}
+
+	db_parse_context_set_header_len (ctx, get_gint32 (h->header_len, 
+							  ctx->byte_order));
+
+	return h;
+}
+
+DBParseContext *
+db_parse_context_new_from_file (const char *filename, Itdb_DB *db)
+{
+	DBParseContext *ctx;
+	Itdb_Device *device;
+	GError* error;
+	GMappedFile* mapped_file;
+	struct stat stat_buf;
+
+	ctx = NULL;
+	error = NULL;
+	mapped_file = NULL;
+
+	device = db_get_device (db);
+	g_return_val_if_fail (device, NULL);
+
+	if (g_stat (filename, &stat_buf) != 0) {
+		return NULL;	
+	};
+	if (stat_buf.st_size > 64 * 1024 * 1024) {
+		g_warning ("%s is too big to be mmapped (%llu bytes)\n",
+			   filename, (unsigned long long)stat_buf.st_size);
+		return NULL;
+	}
+
+	mapped_file = g_mapped_file_new(filename, FALSE, &error);
+	
+	if (mapped_file == NULL) {
+		g_print ("Error while mapping %s: %s\n", filename, 
+                    error->message);
+		g_error_free(error);
+		return NULL;
+	}
+
+	if (device->byte_order == 0)
+	    itdb_device_autodetect_endianess (device);
+
+	ctx = db_parse_context_new ((guchar *)g_mapped_file_get_contents(mapped_file),
+					g_mapped_file_get_length(mapped_file), 
+					device->byte_order);
+
+	if (ctx == NULL) {
+		g_mapped_file_free(mapped_file);
+		return NULL;
+	}
+	ctx->db = db;
+	ctx->mapped_file = mapped_file;
+
+        return ctx;
+}

Added: libgpod/trunk/libgpod/branches/upstream/current/src/db-parse-context.h
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/db-parse-context.h	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/db-parse-context.h	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,80 @@
+/*
+ *  Copyright (C) 2005 Christophe Fergeau
+ *
+ * 
+ *  The code contained in this file is free software; you can redistribute
+ *  it and/or modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either version
+ *  2.1 of the License, or (at your option) any later version.
+ *  
+ *  This file 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
+ *  Lesser General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this code; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ *  02111-1307 USA
+ * 
+ *  iTunes and iPod are trademarks of Apple
+ * 
+ *  This product is not supported/written/published by Apple!
+ *
+ *  $Id: db-parse-context.h 2154 2008-11-30 10:45:21Z jcsjcs $
+ */
+
+
+#ifndef DB_PARSE_CONTEXT
+#define DB_PARSE_CONTEXT
+
+#include <sys/types.h>
+#include "itdb.h"
+#include "itdb_private.h"
+
+struct _DBParseContext {
+	const unsigned char *buffer;
+	const unsigned char *cur_pos;
+	off_t header_len;
+	off_t total_len;
+	guint byte_order;
+	Itdb_DB *db;
+	GMappedFile *mapped_file;
+	GList **artwork;
+};
+
+typedef struct _DBParseContext DBParseContext;
+
+
+#define db_parse_context_get_m_header(ctx, type, id) (type *)db_parse_context_get_m_header_internal (ctx, id, sizeof (type))
+
+G_GNUC_INTERNAL DBParseContext *
+db_parse_context_new (const unsigned char *buffer, 
+		      off_t len, guint byte_order);
+
+G_GNUC_INTERNAL void 
+db_parse_context_set_total_len (DBParseContext *ctx, off_t len);
+
+G_GNUC_INTERNAL off_t 
+db_parse_context_get_remaining_length (DBParseContext *ctx);
+
+G_GNUC_INTERNAL DBParseContext *
+db_parse_context_get_sub_context (DBParseContext *ctx, off_t offset);
+
+
+G_GNUC_INTERNAL DBParseContext *
+db_parse_context_get_next_child (DBParseContext *ctx);
+
+
+G_GNUC_INTERNAL void *
+db_parse_context_get_m_header_internal (DBParseContext *ctx, 
+					const char *id, off_t size);
+
+G_GNUC_INTERNAL DBParseContext *
+db_parse_context_new_from_file (const char *filename, Itdb_DB *db);
+
+
+G_GNUC_INTERNAL void 
+db_parse_context_destroy (DBParseContext *ctx);
+
+#endif

Added: libgpod/trunk/libgpod/branches/upstream/current/src/gchecksum.c
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/gchecksum.c	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/gchecksum.c	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,1411 @@
+/* gchecksum.h - data hashing functions
+ *
+ * Copyright (C) 2007  Emmanuele Bassi  <ebassi at gnome.org>
+ *
+ * This library 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; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <config.h>
+
+#include <string.h>
+
+#include "glibconfig.h"
+#include "gchecksum.h"
+#include "glib.h"
+
+#define IS_VALID_TYPE(type)     ((type) >= G_CHECKSUM_MD5 && (type) <= G_CHECKSUM_SHA256)
+
+static const gchar hex_digits[] = "0123456789abcdef";
+
+#define MD5_DATASIZE    64
+#define MD5_DIGEST_LEN  16
+
+typedef struct
+{
+  guint32 buf[4];
+  guint32 bits[2];
+  
+  guchar data[MD5_DATASIZE];
+
+  guchar digest[MD5_DIGEST_LEN];
+} Md5sum;
+
+#define SHA1_DATASIZE   64
+#define SHA1_DIGEST_LEN 20
+
+typedef struct
+{
+  guint32 buf[5];
+  guint32 bits[2];
+
+  /* we pack 64 unsigned chars into 16 32-bit unsigned integers */
+  guint32 data[16];
+
+  guchar digest[SHA1_DIGEST_LEN];
+} Sha1sum;
+
+#define SHA256_DATASIZE         64
+#define SHA256_DIGEST_LEN       32
+
+typedef struct
+{
+  guint32 buf[8];
+  guint32 bits[2];
+
+  guint8 data[SHA256_DATASIZE];
+
+  guchar digest[SHA256_DIGEST_LEN];
+} Sha256sum;
+
+struct _GChecksum
+{
+  GChecksumType type;
+
+  gchar *digest_str;
+
+  union {
+    Md5sum md5;
+    Sha1sum sha1;
+    Sha256sum sha256;
+  } sum;
+};
+
+/* we need different byte swapping functions because MD5 expects buffers
+ * to be little-endian, while SHA1 and SHA256 expect them in big-endian
+ * form.
+ */
+
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+#define md5_byte_reverse(buffer,length)
+#else
+/* assume that the passed buffer is integer aligned */
+static inline void
+md5_byte_reverse (guchar *buffer,
+                  gulong  length)
+{
+  guint32 bit;
+
+  do
+    {
+      bit = (guint32) ((unsigned) buffer[3] << 8 | buffer[2]) << 16 |
+                      ((unsigned) buffer[1] << 8 | buffer[0]);
+      * (guint32 *) buffer = bit;
+      buffer += 4;
+    }
+  while (--length);
+}
+#endif /* G_BYTE_ORDER == G_LITTLE_ENDIAN */
+
+#if G_BYTE_ORDER == G_BIG_ENDIAN
+#define sha_byte_reverse(buffer,length)
+#else
+static inline void
+sha_byte_reverse (guint32 *buffer,
+                  gint     length)
+{
+  length /= sizeof (guint32);
+  while (length--)
+    {
+      *buffer = ((guint32) (((*buffer & (guint32) 0x000000ffU) << 24) |
+                            ((*buffer & (guint32) 0x0000ff00U) <<  8) |
+                            ((*buffer & (guint32) 0x00ff0000U) >>  8) |
+                            ((*buffer & (guint32) 0xff000000U) >> 24)));
+      ++buffer;
+    }
+}
+#endif /* G_BYTE_ORDER == G_BIG_ENDIAN */
+
+static gchar *
+digest_to_string (guint8 *digest,
+                  gsize   digest_len)
+{
+  gint len = digest_len * 2;
+  gint i;
+  gchar *retval;
+
+  retval = g_new (gchar, len + 1);
+
+  for (i = 0; i < digest_len; i++)
+    {
+      guint8 byte = digest[i];
+
+      retval[2 * i] = hex_digits[byte >> 4];
+      retval[2 * i + 1] = hex_digits[byte & 0xf];
+    }
+
+  retval[len] = 0;
+
+  return retval;
+}
+
+/*
+ * MD5 Checksum
+ */
+
+/* This MD5 digest computation is based on the equivalent code
+ * written by Colin Plumb. It came with this notice:
+ *
+ * This code implements the MD5 message-digest algorithm.
+ * The algorithm is due to Ron Rivest.  This code was
+ * written by Colin Plumb in 1993, no copyright is claimed.
+ * This code is in the public domain; do with it what you wish.
+ *
+ * Equivalent code is available from RSA Data Security, Inc.
+ * This code has been tested against that, and is equivalent,
+ * except that you don't need to include two pages of legalese
+ * with every copy.
+ */
+
+static void
+md5_sum_init (Md5sum *md5)
+{
+  /* arbitrary constants */
+  md5->buf[0] = 0x67452301;
+  md5->buf[1] = 0xefcdab89;
+  md5->buf[2] = 0x98badcfe;
+  md5->buf[3] = 0x10325476;
+
+  md5->bits[0] = md5->bits[1] = 0;
+}
+
+/*
+ * The core of the MD5 algorithm, this alters an existing MD5 hash to
+ * reflect the addition of 16 longwords of new data.  md5_sum_update()
+ * blocks the data and converts bytes into longwords for this routine.
+ */
+static void 
+md5_transform (guint32	     buf[4],
+	       guint32 const in[16])
+{
+  register guint32 a, b, c, d;
+
+/* The four core functions - F1 is optimized somewhat */
+#define F1(x, y, z)     (z ^ (x & (y ^ z)))
+#define F2(x, y, z)     F1 (z, x, y)
+#define F3(x, y, z)     (x ^ y ^ z)
+#define F4(x, y, z)     (y ^ (x | ~z))
+
+/* This is the central step in the MD5 algorithm. */
+#define md5_step(f, w, x, y, z, data, s) \
+	( w += f (x, y, z) + data,  w = w << s | w >> (32 - s),  w += x )
+
+  a = buf[0];
+  b = buf[1];
+  c = buf[2];
+  d = buf[3];
+
+  md5_step (F1, a, b, c, d, in[0]  + 0xd76aa478,  7);
+  md5_step (F1, d, a, b, c, in[1]  + 0xe8c7b756, 12);
+  md5_step (F1, c, d, a, b, in[2]  + 0x242070db, 17);
+  md5_step (F1, b, c, d, a, in[3]  + 0xc1bdceee, 22);
+  md5_step (F1, a, b, c, d, in[4]  + 0xf57c0faf,  7);
+  md5_step (F1, d, a, b, c, in[5]  + 0x4787c62a, 12);
+  md5_step (F1, c, d, a, b, in[6]  + 0xa8304613, 17);
+  md5_step (F1, b, c, d, a, in[7]  + 0xfd469501, 22);
+  md5_step (F1, a, b, c, d, in[8]  + 0x698098d8,  7);
+  md5_step (F1, d, a, b, c, in[9]  + 0x8b44f7af, 12);
+  md5_step (F1, c, d, a, b, in[10] + 0xffff5bb1, 17);
+  md5_step (F1, b, c, d, a, in[11] + 0x895cd7be, 22);
+  md5_step (F1, a, b, c, d, in[12] + 0x6b901122,  7);
+  md5_step (F1, d, a, b, c, in[13] + 0xfd987193, 12);
+  md5_step (F1, c, d, a, b, in[14] + 0xa679438e, 17);
+  md5_step (F1, b, c, d, a, in[15] + 0x49b40821, 22);
+	
+  md5_step (F2, a, b, c, d, in[1]  + 0xf61e2562,  5);
+  md5_step (F2, d, a, b, c, in[6]  + 0xc040b340,  9);
+  md5_step (F2, c, d, a, b, in[11] + 0x265e5a51, 14);
+  md5_step (F2, b, c, d, a, in[0]  + 0xe9b6c7aa, 20);
+  md5_step (F2, a, b, c, d, in[5]  + 0xd62f105d,  5);
+  md5_step (F2, d, a, b, c, in[10] + 0x02441453,  9);
+  md5_step (F2, c, d, a, b, in[15] + 0xd8a1e681, 14);
+  md5_step (F2, b, c, d, a, in[4]  + 0xe7d3fbc8, 20);
+  md5_step (F2, a, b, c, d, in[9]  + 0x21e1cde6,  5);
+  md5_step (F2, d, a, b, c, in[14] + 0xc33707d6,  9);
+  md5_step (F2, c, d, a, b, in[3]  + 0xf4d50d87, 14);
+  md5_step (F2, b, c, d, a, in[8]  + 0x455a14ed, 20);
+  md5_step (F2, a, b, c, d, in[13] + 0xa9e3e905,  5);
+  md5_step (F2, d, a, b, c, in[2]  + 0xfcefa3f8,  9);
+  md5_step (F2, c, d, a, b, in[7]  + 0x676f02d9, 14);
+  md5_step (F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20);
+
+  md5_step (F3, a, b, c, d, in[5]  + 0xfffa3942,  4);
+  md5_step (F3, d, a, b, c, in[8]  + 0x8771f681, 11);
+  md5_step (F3, c, d, a, b, in[11] + 0x6d9d6122, 16);
+  md5_step (F3, b, c, d, a, in[14] + 0xfde5380c, 23);
+  md5_step (F3, a, b, c, d, in[1]  + 0xa4beea44,  4);
+  md5_step (F3, d, a, b, c, in[4]  + 0x4bdecfa9, 11);
+  md5_step (F3, c, d, a, b, in[7]  + 0xf6bb4b60, 16);
+  md5_step (F3, b, c, d, a, in[10] + 0xbebfbc70, 23);
+  md5_step (F3, a, b, c, d, in[13] + 0x289b7ec6,  4);
+  md5_step (F3, d, a, b, c, in[0]  + 0xeaa127fa, 11);
+  md5_step (F3, c, d, a, b, in[3]  + 0xd4ef3085, 16);
+  md5_step (F3, b, c, d, a, in[6]  + 0x04881d05, 23);
+  md5_step (F3, a, b, c, d, in[9]  + 0xd9d4d039,  4);
+  md5_step (F3, d, a, b, c, in[12] + 0xe6db99e5, 11);
+  md5_step (F3, c, d, a, b, in[15] + 0x1fa27cf8, 16);
+  md5_step (F3, b, c, d, a, in[2]  + 0xc4ac5665, 23);
+
+  md5_step (F4, a, b, c, d, in[0]  + 0xf4292244,  6);
+  md5_step (F4, d, a, b, c, in[7]  + 0x432aff97, 10);
+  md5_step (F4, c, d, a, b, in[14] + 0xab9423a7, 15);
+  md5_step (F4, b, c, d, a, in[5]  + 0xfc93a039, 21);
+  md5_step (F4, a, b, c, d, in[12] + 0x655b59c3,  6);
+  md5_step (F4, d, a, b, c, in[3]  + 0x8f0ccc92, 10);
+  md5_step (F4, c, d, a, b, in[10] + 0xffeff47d, 15);
+  md5_step (F4, b, c, d, a, in[1]  + 0x85845dd1, 21);
+  md5_step (F4, a, b, c, d, in[8]  + 0x6fa87e4f,  6);
+  md5_step (F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10);
+  md5_step (F4, c, d, a, b, in[6]  + 0xa3014314, 15);
+  md5_step (F4, b, c, d, a, in[13] + 0x4e0811a1, 21);
+  md5_step (F4, a, b, c, d, in[4]  + 0xf7537e82,  6);
+  md5_step (F4, d, a, b, c, in[11] + 0xbd3af235, 10);
+  md5_step (F4, c, d, a, b, in[2]  + 0x2ad7d2bb, 15);
+  md5_step (F4, b, c, d, a, in[9]  + 0xeb86d391, 21);
+
+  buf[0] += a;
+  buf[1] += b;
+  buf[2] += c;
+  buf[3] += d;
+
+#undef F1
+#undef F2
+#undef F3
+#undef F4
+#undef md5_step
+}
+
+static void
+md5_sum_update (Md5sum       *md5,
+                const guchar *data,
+                gsize         length)
+{
+  guint32 bit;
+
+  bit = md5->bits[0];
+  md5->bits[0] = bit + ((guint32) length << 3);
+
+  /* carry from low to high */
+  if (md5->bits[0] < bit)
+    md5->bits[1] += 1;
+
+  md5->bits[1] += length >> 29;
+
+  /* bytes already in Md5sum->data */
+  bit = (bit >> 3) & 0x3f;
+
+  /* handle any leading odd-sized chunks */
+  if (bit)
+    {
+      guchar *p = (guchar *) md5->data + bit;
+
+      bit = MD5_DATASIZE - bit;
+      if (length < bit)
+        {
+          memcpy (p, data, length);
+          return;
+        }
+
+      memcpy (p, data, bit);
+      
+      md5_byte_reverse (md5->data, 16);
+      md5_transform (md5->buf, (guint32 *) md5->data);
+
+      data += bit;
+      length -= bit;
+    }
+
+  /* process data in 64-byte chunks */
+  while (length >= MD5_DATASIZE)
+    {
+      memcpy (md5->data, data, MD5_DATASIZE);
+      
+      md5_byte_reverse (md5->data, 16);
+      md5_transform (md5->buf, (guint32 *) md5->data);
+
+      data += MD5_DATASIZE;
+      length -= MD5_DATASIZE;
+    }
+
+  /* handle any remaining bytes of data */
+  memcpy (md5->data, data, length);
+}
+
+/* closes a checksum */
+static void
+md5_sum_close (Md5sum *md5)
+{
+  guint count;
+  guchar *p;
+
+  /* Compute number of bytes mod 64 */
+  count = (md5->bits[0] >> 3) & 0x3F;
+
+  /* Set the first char of padding to 0x80.
+   * This is safe since there is always at least one byte free
+   */
+  p = md5->data + count;
+  *p++ = 0x80;
+
+  /* Bytes of padding needed to make 64 bytes */
+  count = MD5_DATASIZE - 1 - count;
+
+  /* Pad out to 56 mod 64 */
+  if (count < 8)
+    {
+      /* Two lots of padding:  Pad the first block to 64 bytes */
+      memset (p, 0, count);
+      
+      md5_byte_reverse (md5->data, 16);
+      md5_transform (md5->buf, (guint32 *) md5->data);
+
+      /* Now fill the next block with 56 bytes */
+      memset (md5->data, 0, MD5_DATASIZE - 8);
+    }
+  else
+    {
+      /* Pad block to 56 bytes */
+      memset (p, 0, count - 8);
+    }
+
+  md5_byte_reverse (md5->data, 14);
+
+  /* Append length in bits and transform */
+  ((guint32 *) md5->data)[14] = md5->bits[0];
+  ((guint32 *) md5->data)[15] = md5->bits[1];
+
+  md5_transform (md5->buf, (guint32 *) md5->data);
+  md5_byte_reverse ((guchar *) md5->buf, 4);
+  
+  memcpy (md5->digest, md5->buf, 16);
+
+  /* Reset buffers in case they contain sensitive data */
+  memset (md5->buf, 0, sizeof (md5->buf));
+  memset (md5->data, 0, sizeof (md5->data));
+}
+
+static gchar *
+md5_sum_to_string (Md5sum *md5)
+{
+  return digest_to_string (md5->digest, MD5_DIGEST_LEN);
+}
+
+static void
+md5_sum_digest (Md5sum *md5,
+                guint8 *digest)
+{
+  gint i;
+
+  for (i = 0; i < MD5_DIGEST_LEN; i++)
+    digest[i] = md5->digest[i];
+}
+
+/*
+ * SHA-1 Checksum
+ */
+
+/* The following implementation comes from D-Bus dbus-sha.c. I've changed
+ * it to use GLib types and to work more like the MD5 implementation above.
+ * I left the comments to have an history of this code.
+ *      -- Emmanuele Bassi, ebassi at gnome.org
+ */
+
+/* The following comments have the history of where this code
+ * comes from. I actually copied it from GNet in GNOME CVS.
+ * - hp at redhat.com
+ */
+
+/*
+ *  sha.h : Implementation of the Secure Hash Algorithm
+ *
+ * Part of the Python Cryptography Toolkit, version 1.0.0
+ *
+ * Copyright (C) 1995, A.M. Kuchling
+ *
+ * Distribute and use freely; there are no restrictions on further
+ * dissemination and usage except those imposed by the laws of your
+ * country of residence.
+ *
+ */
+
+/* SHA: NIST's Secure Hash Algorithm */
+
+/* Based on SHA code originally posted to sci.crypt by Peter Gutmann
+   in message <30ajo5$oe8 at ccu2.auckland.ac.nz>.
+   Modified to test for endianness on creation of SHA objects by AMK.
+   Also, the original specification of SHA was found to have a weakness
+   by NSA/NIST.  This code implements the fixed version of SHA.
+*/
+
+/* Here's the first paragraph of Peter Gutmann's posting:
+
+The following is my SHA (FIPS 180) code updated to allow use of the "fixed"
+SHA, thanks to Jim Gillogly and an anonymous contributor for the information on
+what's changed in the new version.  The fix is a simple change which involves
+adding a single rotate in the initial expansion function.  It is unknown
+whether this is an optimal solution to the problem which was discovered in the
+SHA or whether it's simply a bandaid which fixes the problem with a minimum of
+effort (for example the reengineering of a great many Capstone chips).
+*/
+
+static void
+sha1_sum_init (Sha1sum *sha1)
+{
+  /* initialize constants */
+  sha1->buf[0] = 0x67452301L;
+  sha1->buf[1] = 0xEFCDAB89L;
+  sha1->buf[2] = 0x98BADCFEL;
+  sha1->buf[3] = 0x10325476L;
+  sha1->buf[4] = 0xC3D2E1F0L;
+
+  /* initialize bits */
+  sha1->bits[0] = sha1->bits[1] = 0;
+}
+
+/* The SHA f()-functions. */
+
+#define f1(x,y,z)       (z ^ (x & (y ^ z)))             /* Rounds  0-19 */
+#define f2(x,y,z)       (x ^ y ^ z)                     /* Rounds 20-39 */
+#define f3(x,y,z)       (( x & y) | (z & (x | y)))      /* Rounds 40-59 */
+#define f4(x,y,z)       (x ^ y ^ z)                     /* Rounds 60-79 */
+
+/* The SHA Mysterious Constants */
+#define K1  0x5A827999L                                 /* Rounds  0-19 */
+#define K2  0x6ED9EBA1L                                 /* Rounds 20-39 */
+#define K3  0x8F1BBCDCL                                 /* Rounds 40-59 */
+#define K4  0xCA62C1D6L                                 /* Rounds 60-79 */
+
+/* 32-bit rotate left - kludged with shifts */
+#define ROTL(n,X) (((X) << n ) | ((X) >> (32 - n)))
+
+/* The initial expanding function.  The hash function is defined over an
+   80-word expanded input array W, where the first 16 are copies of the input
+   data, and the remaining 64 are defined by
+
+        W[ i ] = W[ i - 16 ] ^ W[ i - 14 ] ^ W[ i - 8 ] ^ W[ i - 3 ]
+
+   This implementation generates these values on the fly in a circular
+   buffer - thanks to Colin Plumb, colin at nyx10.cs.du.edu for this
+   optimization.
+
+   The updated SHA changes the expanding function by adding a rotate of 1
+   bit.  Thanks to Jim Gillogly, jim at rand.org, and an anonymous contributor
+   for this information */
+
+#define expand(W,i) (W[ i & 15 ] = ROTL (1, (W[ i       & 15] ^ \
+                                             W[(i - 14) & 15] ^ \
+                                             W[(i -  8) & 15] ^ \
+                                             W[(i -  3) & 15])))
+
+
+/* The prototype SHA sub-round.  The fundamental sub-round is:
+
+        a' = e + ROTL( 5, a ) + f( b, c, d ) + k + data;
+        b' = a;
+        c' = ROTL( 30, b );
+        d' = c;
+        e' = d;
+
+   but this is implemented by unrolling the loop 5 times and renaming the
+   variables ( e, a, b, c, d ) = ( a', b', c', d', e' ) each iteration.
+   This code is then replicated 20 times for each of the 4 functions, using
+   the next 20 values from the W[] array each time */
+
+#define subRound(a, b, c, d, e, f, k, data) \
+   (e += ROTL (5, a) + f(b, c, d) + k + data, b = ROTL (30, b))
+
+static void
+sha1_transform (guint32  buf[5],
+                guint32  in[16])
+{
+  guint32 A, B, C, D, E;
+
+  A = buf[0];
+  B = buf[1];
+  C = buf[2];
+  D = buf[3];
+  E = buf[4];
+
+  /* Heavy mangling, in 4 sub-rounds of 20 interations each. */
+  subRound (A, B, C, D, E, f1, K1, in[0]);
+  subRound (E, A, B, C, D, f1, K1, in[1]);
+  subRound (D, E, A, B, C, f1, K1, in[2]);
+  subRound (C, D, E, A, B, f1, K1, in[3]);
+  subRound (B, C, D, E, A, f1, K1, in[4]);
+  subRound (A, B, C, D, E, f1, K1, in[5]);
+  subRound (E, A, B, C, D, f1, K1, in[6]);
+  subRound (D, E, A, B, C, f1, K1, in[7]);
+  subRound (C, D, E, A, B, f1, K1, in[8]);
+  subRound (B, C, D, E, A, f1, K1, in[9]);
+  subRound (A, B, C, D, E, f1, K1, in[10]);
+  subRound (E, A, B, C, D, f1, K1, in[11]);
+  subRound (D, E, A, B, C, f1, K1, in[12]);
+  subRound (C, D, E, A, B, f1, K1, in[13]);
+  subRound (B, C, D, E, A, f1, K1, in[14]);
+  subRound (A, B, C, D, E, f1, K1, in[15]);
+  subRound (E, A, B, C, D, f1, K1, expand (in, 16));
+  subRound (D, E, A, B, C, f1, K1, expand (in, 17));
+  subRound (C, D, E, A, B, f1, K1, expand (in, 18));
+  subRound (B, C, D, E, A, f1, K1, expand (in, 19));
+
+  subRound (A, B, C, D, E, f2, K2, expand (in, 20));
+  subRound (E, A, B, C, D, f2, K2, expand (in, 21));
+  subRound (D, E, A, B, C, f2, K2, expand (in, 22));
+  subRound (C, D, E, A, B, f2, K2, expand (in, 23));
+  subRound (B, C, D, E, A, f2, K2, expand (in, 24));
+  subRound (A, B, C, D, E, f2, K2, expand (in, 25));
+  subRound (E, A, B, C, D, f2, K2, expand (in, 26));
+  subRound (D, E, A, B, C, f2, K2, expand (in, 27));
+  subRound (C, D, E, A, B, f2, K2, expand (in, 28));
+  subRound (B, C, D, E, A, f2, K2, expand (in, 29));
+  subRound (A, B, C, D, E, f2, K2, expand (in, 30));
+  subRound (E, A, B, C, D, f2, K2, expand (in, 31));
+  subRound (D, E, A, B, C, f2, K2, expand (in, 32));
+  subRound (C, D, E, A, B, f2, K2, expand (in, 33));
+  subRound (B, C, D, E, A, f2, K2, expand (in, 34));
+  subRound (A, B, C, D, E, f2, K2, expand (in, 35));
+  subRound (E, A, B, C, D, f2, K2, expand (in, 36));
+  subRound (D, E, A, B, C, f2, K2, expand (in, 37));
+  subRound (C, D, E, A, B, f2, K2, expand (in, 38));
+  subRound (B, C, D, E, A, f2, K2, expand (in, 39));
+  
+  subRound (A, B, C, D, E, f3, K3, expand (in, 40));
+  subRound (E, A, B, C, D, f3, K3, expand (in, 41));
+  subRound (D, E, A, B, C, f3, K3, expand (in, 42));
+  subRound (C, D, E, A, B, f3, K3, expand (in, 43));
+  subRound (B, C, D, E, A, f3, K3, expand (in, 44));
+  subRound (A, B, C, D, E, f3, K3, expand (in, 45));
+  subRound (E, A, B, C, D, f3, K3, expand (in, 46));
+  subRound (D, E, A, B, C, f3, K3, expand (in, 47));
+  subRound (C, D, E, A, B, f3, K3, expand (in, 48));
+  subRound (B, C, D, E, A, f3, K3, expand (in, 49));
+  subRound (A, B, C, D, E, f3, K3, expand (in, 50));
+  subRound (E, A, B, C, D, f3, K3, expand (in, 51));
+  subRound (D, E, A, B, C, f3, K3, expand (in, 52));
+  subRound (C, D, E, A, B, f3, K3, expand (in, 53));
+  subRound (B, C, D, E, A, f3, K3, expand (in, 54));
+  subRound (A, B, C, D, E, f3, K3, expand (in, 55));
+  subRound (E, A, B, C, D, f3, K3, expand (in, 56));
+  subRound (D, E, A, B, C, f3, K3, expand (in, 57));
+  subRound (C, D, E, A, B, f3, K3, expand (in, 58));
+  subRound (B, C, D, E, A, f3, K3, expand (in, 59));
+
+  subRound (A, B, C, D, E, f4, K4, expand (in, 60));
+  subRound (E, A, B, C, D, f4, K4, expand (in, 61));
+  subRound (D, E, A, B, C, f4, K4, expand (in, 62));
+  subRound (C, D, E, A, B, f4, K4, expand (in, 63));
+  subRound (B, C, D, E, A, f4, K4, expand (in, 64));
+  subRound (A, B, C, D, E, f4, K4, expand (in, 65));
+  subRound (E, A, B, C, D, f4, K4, expand (in, 66));
+  subRound (D, E, A, B, C, f4, K4, expand (in, 67));
+  subRound (C, D, E, A, B, f4, K4, expand (in, 68));
+  subRound (B, C, D, E, A, f4, K4, expand (in, 69));
+  subRound (A, B, C, D, E, f4, K4, expand (in, 70));
+  subRound (E, A, B, C, D, f4, K4, expand (in, 71));
+  subRound (D, E, A, B, C, f4, K4, expand (in, 72));
+  subRound (C, D, E, A, B, f4, K4, expand (in, 73));
+  subRound (B, C, D, E, A, f4, K4, expand (in, 74));
+  subRound (A, B, C, D, E, f4, K4, expand (in, 75));
+  subRound (E, A, B, C, D, f4, K4, expand (in, 76));
+  subRound (D, E, A, B, C, f4, K4, expand (in, 77));
+  subRound (C, D, E, A, B, f4, K4, expand (in, 78));
+  subRound (B, C, D, E, A, f4, K4, expand (in, 79));
+
+  /* Build message digest */
+  buf[0] += A;
+  buf[1] += B;
+  buf[2] += C;
+  buf[3] += D;
+  buf[4] += E;
+}
+
+#undef K1
+#undef K2
+#undef K3
+#undef K4
+#undef f1
+#undef f2
+#undef f3
+#undef f4
+#undef ROTL
+#undef expand
+#undef subRound
+
+static void
+sha1_sum_update (Sha1sum      *sha1,
+                 const guchar *buffer,
+                 gsize         count)
+{
+  guint32 tmp;
+  guint dataCount;
+
+  /* Update bitcount */
+  tmp = sha1->bits[0];
+  if ((sha1->bits[0] = tmp + ((guint32) count << 3) ) < tmp)
+    sha1->bits[1] += 1;             /* Carry from low to high */
+  sha1->bits[1] += count >> 29;
+
+  /* Get count of bytes already in data */
+  dataCount = (guint) (tmp >> 3) & 0x3F;
+
+  /* Handle any leading odd-sized chunks */
+  if (dataCount)
+    {
+      guchar *p = (guchar *) sha1->data + dataCount;
+
+      dataCount = SHA1_DATASIZE - dataCount;
+      if (count < dataCount)
+        {
+          memcpy (p, buffer, count);
+          return;
+        }
+      
+      memcpy (p, buffer, dataCount);
+
+      sha_byte_reverse (sha1->data, SHA1_DATASIZE);
+      sha1_transform (sha1->buf, sha1->data);
+
+      buffer += dataCount;
+      count -= dataCount;
+    }
+
+  /* Process data in SHA1_DATASIZE chunks */
+  while (count >= SHA1_DATASIZE)
+    {
+      memcpy (sha1->data, buffer, SHA1_DATASIZE);
+      
+      sha_byte_reverse (sha1->data, SHA1_DATASIZE);
+      sha1_transform (sha1->buf, sha1->data);
+
+      buffer += SHA1_DATASIZE;
+      count -= SHA1_DATASIZE;
+    }
+
+  /* Handle any remaining bytes of data. */
+  memcpy (sha1->data, buffer, count);
+}
+
+/* Final wrapup - pad to SHA_DATASIZE-byte boundary with the bit pattern
+   1 0* (64-bit count of bits processed, MSB-first) */
+static void
+sha1_sum_close (Sha1sum *sha1)
+{
+  gint count;
+  guchar *data_p;
+
+  /* Compute number of bytes mod 64 */
+  count = (gint) ((sha1->bits[0] >> 3) & 0x3f);
+
+  /* Set the first char of padding to 0x80.  This is safe since there is
+     always at least one byte free */
+  data_p = (guchar *) sha1->data + count;
+  *data_p++ = 0x80;
+
+  /* Bytes of padding needed to make 64 bytes */
+  count = SHA1_DATASIZE - 1 - count;
+
+  /* Pad out to 56 mod 64 */
+  if (count < 8)
+    {
+      /* Two lots of padding:  Pad the first block to 64 bytes */
+      memset (data_p, 0, count);
+
+      sha_byte_reverse (sha1->data, SHA1_DATASIZE);
+      sha1_transform (sha1->buf, sha1->data);
+
+      /* Now fill the next block with 56 bytes */
+      memset (sha1->data, 0, SHA1_DATASIZE - 8);
+    }
+  else
+    {
+      /* Pad block to 56 bytes */
+      memset (data_p, 0, count - 8);
+    }
+
+  /* Append length in bits and transform */
+  sha1->data[14] = sha1->bits[1];
+  sha1->data[15] = sha1->bits[0];
+
+  sha_byte_reverse (sha1->data, SHA1_DATASIZE - 8);
+  sha1_transform (sha1->buf, sha1->data);
+  sha_byte_reverse (sha1->buf, SHA1_DIGEST_LEN);
+
+  memcpy (sha1->digest, sha1->buf, SHA1_DIGEST_LEN);
+
+  /* Reset buffers in case they contain sensitive data */
+  memset (sha1->buf, 0, sizeof (sha1->buf));
+  memset (sha1->data, 0, sizeof (sha1->data));
+}
+
+static gchar *
+sha1_sum_to_string (Sha1sum *sha1)
+{
+  return digest_to_string (sha1->digest, SHA1_DIGEST_LEN);
+}
+
+static void
+sha1_sum_digest (Sha1sum *sha1,
+                 guint8  *digest)
+{
+  gint i;
+
+  for (i = 0; i < SHA1_DIGEST_LEN; i++)
+    digest[i] = sha1->digest[i];
+}
+
+/*
+ * SHA-256 Checksum
+ */
+
+/* adapted from the SHA256 implementation in gsk/src/hash/gskhash.c.
+ *
+ * Copyright (C) 2006 Dave Benson
+ * Released under the terms of the GNU Lesser General Public License
+ */
+
+static void
+sha256_sum_init (Sha256sum *sha256)
+{
+  sha256->buf[0] = 0x6a09e667;
+  sha256->buf[1] = 0xbb67ae85;
+  sha256->buf[2] = 0x3c6ef372;
+  sha256->buf[3] = 0xa54ff53a;
+  sha256->buf[4] = 0x510e527f;
+  sha256->buf[5] = 0x9b05688c;
+  sha256->buf[6] = 0x1f83d9ab;
+  sha256->buf[7] = 0x5be0cd19;
+
+  sha256->bits[0] = sha256->bits[1] = 0;
+}
+
+#define GET_UINT32(n,b,i)               G_STMT_START{   \
+    (n) = ((guint32) (b)[(i)    ] << 24)                \
+        | ((guint32) (b)[(i) + 1] << 16)                \
+        | ((guint32) (b)[(i) + 2] <<  8)                \
+        | ((guint32) (b)[(i) + 3]      ); } G_STMT_END
+
+#define PUT_UINT32(n,b,i)               G_STMT_START{   \
+    (b)[(i)    ] = (guint8) ((n) >> 24);                \
+    (b)[(i) + 1] = (guint8) ((n) >> 16);                \
+    (b)[(i) + 2] = (guint8) ((n) >>  8);                \
+    (b)[(i) + 3] = (guint8) ((n)      ); } G_STMT_END
+
+static void
+sha256_transform (guint32      buf[8],
+                  guint8 const data[64])
+{
+  guint32 temp1, temp2, W[64];
+  guint32 A, B, C, D, E, F, G, H;
+
+  GET_UINT32 (W[0],  data,  0);
+  GET_UINT32 (W[1],  data,  4);
+  GET_UINT32 (W[2],  data,  8);
+  GET_UINT32 (W[3],  data, 12);
+  GET_UINT32 (W[4],  data, 16);
+  GET_UINT32 (W[5],  data, 20);
+  GET_UINT32 (W[6],  data, 24);
+  GET_UINT32 (W[7],  data, 28);
+  GET_UINT32 (W[8],  data, 32);
+  GET_UINT32 (W[9],  data, 36);
+  GET_UINT32 (W[10], data, 40);
+  GET_UINT32 (W[11], data, 44);
+  GET_UINT32 (W[12], data, 48);
+  GET_UINT32 (W[13], data, 52);
+  GET_UINT32 (W[14], data, 56);
+  GET_UINT32 (W[15], data, 60);
+
+#define SHR(x,n)        ((x & 0xFFFFFFFF) >> n)
+#define ROTR(x,n)       (SHR (x,n) | (x << (32 - n)))
+
+#define S0(x) (ROTR (x, 7) ^ ROTR (x,18) ^  SHR (x, 3))
+#define S1(x) (ROTR (x,17) ^ ROTR (x,19) ^  SHR (x,10))
+#define S2(x) (ROTR (x, 2) ^ ROTR (x,13) ^ ROTR (x,22))
+#define S3(x) (ROTR (x, 6) ^ ROTR (x,11) ^ ROTR (x,25))
+
+#define F0(x,y,z) ((x & y) | (z & (x | y)))
+#define F1(x,y,z) (z ^ (x & (y ^ z)))
+
+#define R(t)    (W[t] = S1(W[t -  2]) + W[t -  7] + \
+                        S0(W[t - 15]) + W[t - 16])
+
+#define P(a,b,c,d,e,f,g,h,x,K)          G_STMT_START {  \
+        temp1 = h + S3(e) + F1(e,f,g) + K + x;          \
+        temp2 = S2(a) + F0(a,b,c);                      \
+        d += temp1; h = temp1 + temp2; } G_STMT_END
+
+  A = buf[0];
+  B = buf[1];
+  C = buf[2];
+  D = buf[3];
+  E = buf[4];
+  F = buf[5];
+  G = buf[6];
+  H = buf[7];
+
+  P (A, B, C, D, E, F, G, H, W[ 0], 0x428A2F98);
+  P (H, A, B, C, D, E, F, G, W[ 1], 0x71374491);
+  P (G, H, A, B, C, D, E, F, W[ 2], 0xB5C0FBCF);
+  P (F, G, H, A, B, C, D, E, W[ 3], 0xE9B5DBA5);
+  P (E, F, G, H, A, B, C, D, W[ 4], 0x3956C25B);
+  P (D, E, F, G, H, A, B, C, W[ 5], 0x59F111F1);
+  P (C, D, E, F, G, H, A, B, W[ 6], 0x923F82A4);
+  P (B, C, D, E, F, G, H, A, W[ 7], 0xAB1C5ED5);
+  P (A, B, C, D, E, F, G, H, W[ 8], 0xD807AA98);
+  P (H, A, B, C, D, E, F, G, W[ 9], 0x12835B01);
+  P (G, H, A, B, C, D, E, F, W[10], 0x243185BE);
+  P (F, G, H, A, B, C, D, E, W[11], 0x550C7DC3);
+  P (E, F, G, H, A, B, C, D, W[12], 0x72BE5D74);
+  P (D, E, F, G, H, A, B, C, W[13], 0x80DEB1FE);
+  P (C, D, E, F, G, H, A, B, W[14], 0x9BDC06A7);
+  P (B, C, D, E, F, G, H, A, W[15], 0xC19BF174);
+  P (A, B, C, D, E, F, G, H, R(16), 0xE49B69C1);
+  P (H, A, B, C, D, E, F, G, R(17), 0xEFBE4786);
+  P (G, H, A, B, C, D, E, F, R(18), 0x0FC19DC6);
+  P (F, G, H, A, B, C, D, E, R(19), 0x240CA1CC);
+  P (E, F, G, H, A, B, C, D, R(20), 0x2DE92C6F);
+  P (D, E, F, G, H, A, B, C, R(21), 0x4A7484AA);
+  P (C, D, E, F, G, H, A, B, R(22), 0x5CB0A9DC);
+  P (B, C, D, E, F, G, H, A, R(23), 0x76F988DA);
+  P (A, B, C, D, E, F, G, H, R(24), 0x983E5152);
+  P (H, A, B, C, D, E, F, G, R(25), 0xA831C66D);
+  P (G, H, A, B, C, D, E, F, R(26), 0xB00327C8);
+  P (F, G, H, A, B, C, D, E, R(27), 0xBF597FC7);
+  P (E, F, G, H, A, B, C, D, R(28), 0xC6E00BF3);
+  P (D, E, F, G, H, A, B, C, R(29), 0xD5A79147);
+  P (C, D, E, F, G, H, A, B, R(30), 0x06CA6351);
+  P (B, C, D, E, F, G, H, A, R(31), 0x14292967);
+  P (A, B, C, D, E, F, G, H, R(32), 0x27B70A85);
+  P (H, A, B, C, D, E, F, G, R(33), 0x2E1B2138);
+  P (G, H, A, B, C, D, E, F, R(34), 0x4D2C6DFC);
+  P (F, G, H, A, B, C, D, E, R(35), 0x53380D13);
+  P (E, F, G, H, A, B, C, D, R(36), 0x650A7354);
+  P (D, E, F, G, H, A, B, C, R(37), 0x766A0ABB);
+  P (C, D, E, F, G, H, A, B, R(38), 0x81C2C92E);
+  P (B, C, D, E, F, G, H, A, R(39), 0x92722C85);
+  P (A, B, C, D, E, F, G, H, R(40), 0xA2BFE8A1);
+  P (H, A, B, C, D, E, F, G, R(41), 0xA81A664B);
+  P (G, H, A, B, C, D, E, F, R(42), 0xC24B8B70);
+  P (F, G, H, A, B, C, D, E, R(43), 0xC76C51A3);
+  P (E, F, G, H, A, B, C, D, R(44), 0xD192E819);
+  P (D, E, F, G, H, A, B, C, R(45), 0xD6990624);
+  P (C, D, E, F, G, H, A, B, R(46), 0xF40E3585);
+  P (B, C, D, E, F, G, H, A, R(47), 0x106AA070);
+  P (A, B, C, D, E, F, G, H, R(48), 0x19A4C116);
+  P (H, A, B, C, D, E, F, G, R(49), 0x1E376C08);
+  P (G, H, A, B, C, D, E, F, R(50), 0x2748774C);
+  P (F, G, H, A, B, C, D, E, R(51), 0x34B0BCB5);
+  P (E, F, G, H, A, B, C, D, R(52), 0x391C0CB3);
+  P (D, E, F, G, H, A, B, C, R(53), 0x4ED8AA4A);
+  P (C, D, E, F, G, H, A, B, R(54), 0x5B9CCA4F);
+  P (B, C, D, E, F, G, H, A, R(55), 0x682E6FF3);
+  P (A, B, C, D, E, F, G, H, R(56), 0x748F82EE);
+  P (H, A, B, C, D, E, F, G, R(57), 0x78A5636F);
+  P (G, H, A, B, C, D, E, F, R(58), 0x84C87814);
+  P (F, G, H, A, B, C, D, E, R(59), 0x8CC70208);
+  P (E, F, G, H, A, B, C, D, R(60), 0x90BEFFFA);
+  P (D, E, F, G, H, A, B, C, R(61), 0xA4506CEB);
+  P (C, D, E, F, G, H, A, B, R(62), 0xBEF9A3F7);
+  P (B, C, D, E, F, G, H, A, R(63), 0xC67178F2);
+
+#undef SHR
+#undef ROTR
+#undef S0
+#undef S1
+#undef S2
+#undef S3
+#undef F0
+#undef F1
+#undef R
+#undef P
+
+  buf[0] += A;
+  buf[1] += B;
+  buf[2] += C;
+  buf[3] += D;
+  buf[4] += E;
+  buf[5] += F;
+  buf[6] += G;
+  buf[7] += H;
+}
+
+static void
+sha256_sum_update (Sha256sum    *sha256,
+                   const guchar *buffer,
+                   gsize         length)
+{
+  guint32 left, fill;
+  const guint8 *input = buffer;
+
+  if (length == 0)
+    return;
+
+  left = sha256->bits[0] & 0x3F;
+  fill = 64 - left;
+
+  sha256->bits[0] += length;
+  sha256->bits[0] &= 0xFFFFFFFF;
+
+  if (sha256->bits[0] < length)
+      sha256->bits[1]++;
+
+  if (left > 0 && length >= fill)
+    {
+      memcpy ((sha256->data + left), input, fill);
+
+      sha256_transform (sha256->buf, sha256->data);
+      length -= fill;
+      input += fill;
+
+      left = 0;
+    }
+
+  while (length >= SHA256_DATASIZE)
+    {
+      sha256_transform (sha256->buf, input);
+
+      length -= 64;
+      input += 64;
+    }
+
+  if (length)
+    memcpy (sha256->data + left, input, length);
+}
+
+static guint8 sha256_padding[64] =
+{
+ 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static void
+sha256_sum_close (Sha256sum *sha256)
+{
+  guint32 last, padn;
+  guint32 high, low;
+  guint8 msglen[8];
+
+  high = (sha256->bits[0] >> 29)
+       | (sha256->bits[1] <<  3);
+  low  = (sha256->bits[0] <<  3);
+
+  PUT_UINT32 (high, msglen, 0);
+  PUT_UINT32 (low, msglen, 4);
+
+  last = sha256->bits[0] & 0x3F;
+  padn = (last < 56) ? (56 - last) : (120 - last);
+
+  sha256_sum_update (sha256, sha256_padding, padn);
+  sha256_sum_update (sha256, msglen, 8);
+
+  PUT_UINT32 (sha256->buf[0], sha256->digest,  0);
+  PUT_UINT32 (sha256->buf[1], sha256->digest,  4);
+  PUT_UINT32 (sha256->buf[2], sha256->digest,  8);
+  PUT_UINT32 (sha256->buf[3], sha256->digest, 12);
+  PUT_UINT32 (sha256->buf[4], sha256->digest, 16);
+  PUT_UINT32 (sha256->buf[5], sha256->digest, 20);
+  PUT_UINT32 (sha256->buf[6], sha256->digest, 24);
+  PUT_UINT32 (sha256->buf[7], sha256->digest, 28);
+}
+
+#undef PUT_UINT32
+#undef GET_UINT32
+
+static gchar *
+sha256_sum_to_string (Sha256sum *sha256)
+{
+  return digest_to_string (sha256->digest, SHA256_DIGEST_LEN);
+}
+
+static void
+sha256_sum_digest (Sha256sum *sha256,
+                   guint8    *digest)
+{
+  gint i;
+
+  for (i = 0; i < SHA256_DIGEST_LEN; i++)
+    digest[i] = sha256->digest[i];
+}
+
+
+/*
+ * Public API
+ */
+
+/**
+ * g_checksum_type_get_length:
+ * @checksum_type: a #GChecksumType
+ *
+ * Gets the length in bytes of digests of type @checksum_type
+ *
+ * Return value: the checksum length, or -1 if @checksum_type is
+ * not supported.
+ * 
+ * Since: 2.16
+ */
+gssize
+g_checksum_type_get_length (GChecksumType checksum_type)
+{
+  gssize len = -1;
+
+  switch (checksum_type)
+    {
+    case G_CHECKSUM_MD5:
+      len = MD5_DIGEST_LEN;
+      break;
+    case G_CHECKSUM_SHA1:
+      len = SHA1_DIGEST_LEN;
+      break;
+    case G_CHECKSUM_SHA256:
+      len = SHA256_DIGEST_LEN;
+      break;
+    default:
+      len = -1;
+      break;
+    }
+
+  return len;
+}
+
+/**
+ * g_checksum_new:
+ * @checksum_type: the desired type of checksum
+ *
+ * Creates a new #GChecksum, using the checksum algorithm @checksum_type. 
+ * If the @checksum_type is not known, %NULL is returned.
+ * A #GChecksum can be used to compute the checksum, or digest, of an
+ * arbitrary binary blob, using different hashing algorithms.
+ *
+ * A #GChecksum works by feeding a binary blob through g_checksum_update()
+ * until there is data to be checked; the digest can then be extracted
+ * using g_checksum_get_string(), which will return the checksum as a
+ * hexadecimal string; or g_checksum_get_digest(), which will return a
+ * vector of raw bytes. Once either g_checksum_get_string() or
+ * g_checksum_get_digest() have been called on a #GChecksum, the checksum
+ * will be closed and it won't be possible to call g_checksum_update()
+ * on it anymore.
+ *
+ * Return value: the newly created #GChecksum, or %NULL. 
+ *   Use g_checksum_free() to free the memory allocated by it.
+ *
+ * Since: 2.16
+ */
+GChecksum *
+g_checksum_new (GChecksumType checksum_type)
+{
+  GChecksum *checksum;
+
+  if (! IS_VALID_TYPE (checksum_type))
+    return NULL;
+
+  checksum = g_slice_new0 (GChecksum);
+  checksum->type = checksum_type;
+
+  switch (checksum_type)
+    {
+    case G_CHECKSUM_MD5:
+      md5_sum_init (&(checksum->sum.md5));
+      break;
+    case G_CHECKSUM_SHA1:
+      sha1_sum_init (&(checksum->sum.sha1));
+      break;
+    case G_CHECKSUM_SHA256:
+      sha256_sum_init (&(checksum->sum.sha256));
+      break;
+    default:
+      g_assert_not_reached ();
+      break;
+    }
+
+  return checksum;
+}
+
+/**
+ * g_checksum_copy:
+ * @checksum: the #GChecksum to copy
+ *
+ * Copies a #GChecksum. If @checksum has been closed, by calling
+ * g_checksum_get_string() or g_checksum_get_digest(), the copied
+ * checksum will be closed as well.
+ *
+ * Return value: the copy of the passed #GChecksum. Use g_checksum_free()
+ *   when finished using it.
+ *
+ * Since: 2.16
+ */
+GChecksum *
+g_checksum_copy (const GChecksum *checksum)
+{
+  GChecksum *copy;
+
+  g_return_val_if_fail (checksum != NULL, NULL);
+
+  copy = g_slice_new (GChecksum);
+  *copy = *checksum;
+
+  copy->digest_str = g_strdup (checksum->digest_str);
+
+  return copy;
+}
+
+/**
+ * g_checksum_free:
+ * @checksum: a #GChecksum
+ *
+ * Frees the memory allocated for @checksum.
+ *
+ * Since: 2.16
+ */
+void
+g_checksum_free (GChecksum *checksum)
+{
+  if (G_LIKELY (checksum))
+    {
+      g_free (checksum->digest_str);
+
+      g_slice_free (GChecksum, checksum);
+    }
+}
+
+/**
+ * g_checksum_update:
+ * @checksum: a #GChecksum
+ * @data: buffer used to compute the checksum
+ * @length: size of the buffer, or -1 if it is a null-terminated string.
+ *
+ * Feeds @data into an existing #GChecksum. The checksum must still be
+ * open, that is g_checksum_get_string() or g_checksum_get_digest() must
+ * not have been called on @checksum.
+ *
+ * Since: 2.16
+ */
+void
+g_checksum_update (GChecksum    *checksum,
+                   const guchar *data,
+                   gssize        length)
+{
+  g_return_if_fail (checksum != NULL);
+  g_return_if_fail (data != NULL);
+
+  if (length < 0)
+    length = strlen ((gchar *)data);
+
+  if (checksum->digest_str)
+    {
+      g_warning ("The checksum `%s' has been closed and cannot be updated "
+                 "anymore.",
+                 checksum->digest_str);
+      return;
+    }
+
+  switch (checksum->type)
+    {
+    case G_CHECKSUM_MD5:
+      md5_sum_update (&(checksum->sum.md5), data, length);
+      break;
+    case G_CHECKSUM_SHA1:
+      sha1_sum_update (&(checksum->sum.sha1), data, length);
+      break;
+    case G_CHECKSUM_SHA256:
+      sha256_sum_update (&(checksum->sum.sha256), data, length);
+      break;
+    default:
+      g_assert_not_reached ();
+      break;
+    }
+}
+
+/**
+ * g_checksum_get_string:
+ * @checksum: a #GChecksum
+ *
+ * Gets the digest as an hexadecimal string.
+ *
+ * Once this function has been called the #GChecksum can no longer be
+ * updated with g_checksum_update().
+ *
+ * Return value: the hexadecimal representation of the checksum. The
+ *   returned string is owned by the checksum and should not be modified
+ *   or freed.
+ * 
+ * Since: 2.16
+ */
+G_CONST_RETURN gchar *
+g_checksum_get_string (GChecksum *checksum)
+{
+  gchar *str = NULL;
+
+  g_return_val_if_fail (checksum != NULL, NULL);
+  
+  if (checksum->digest_str)
+    return checksum->digest_str;
+
+  switch (checksum->type)
+    {
+    case G_CHECKSUM_MD5:
+      md5_sum_close (&(checksum->sum.md5));
+      str = md5_sum_to_string (&(checksum->sum.md5));
+      break;
+    case G_CHECKSUM_SHA1:
+      sha1_sum_close (&(checksum->sum.sha1));
+      str = sha1_sum_to_string (&(checksum->sum.sha1));
+      break;
+    case G_CHECKSUM_SHA256:
+      sha256_sum_close (&(checksum->sum.sha256));
+      str = sha256_sum_to_string (&(checksum->sum.sha256));
+      break;
+    default:
+      g_assert_not_reached ();
+      break;
+    }
+
+  checksum->digest_str = str;
+
+  return checksum->digest_str;
+}
+
+/**
+ * g_checksum_get_digest:
+ * @checksum: a #GChecksum
+ * @buffer: output buffer
+ * @digest_len: an inout parameter. The caller initializes it to the size of @buffer.
+ *   After the call it contains the length of the digest.
+ *
+ * Gets the digest from @checksum as a raw binary vector and places it
+ * into @buffer. The size of the digest depends on the type of checksum.
+ *
+ * Once this function has been called, the #GChecksum is closed and can
+ * no longer be updated with g_checksum_update().
+ *
+ * Since: 2.16
+ */
+void
+g_checksum_get_digest (GChecksum  *checksum,
+                       guint8     *buffer,
+                       gsize      *digest_len)
+{
+  gboolean checksum_open = FALSE;
+  gchar *str = NULL;
+  gsize len;
+
+  g_return_if_fail (checksum != NULL);
+
+  len = g_checksum_type_get_length (checksum->type);
+  g_return_if_fail (*digest_len >= len);
+
+  checksum_open = !!(checksum->digest_str == NULL);
+
+  switch (checksum->type)
+    {
+    case G_CHECKSUM_MD5:
+      if (checksum_open)
+        {
+          md5_sum_close (&(checksum->sum.md5));
+          str = md5_sum_to_string (&(checksum->sum.md5));
+        }
+      md5_sum_digest (&(checksum->sum.md5), buffer);
+      break;
+    case G_CHECKSUM_SHA1:
+      if (checksum_open)
+        {
+          sha1_sum_close (&(checksum->sum.sha1));
+          str = sha1_sum_to_string (&(checksum->sum.sha1));
+        }
+      sha1_sum_digest (&(checksum->sum.sha1), buffer);
+      break;
+    case G_CHECKSUM_SHA256:
+      if (checksum_open)
+        {
+          sha256_sum_close (&(checksum->sum.sha256));
+          str = sha256_sum_to_string (&(checksum->sum.sha256));
+        }
+      sha256_sum_digest (&(checksum->sum.sha256), buffer);
+      break;
+    default:
+      g_assert_not_reached ();
+      break;
+    }
+
+  if (str)
+    checksum->digest_str = str;
+
+  *digest_len = len;
+}
+
+/**
+ * g_compute_checksum_for_data:
+ * @checksum_type: a #GChecksumType
+ * @data: binary blob to compute the digest of
+ * @length: length of @data
+ *
+ * Computes the checksum for a binary @data of @length. This is a
+ * convenience wrapper for g_checksum_new(), g_checksum_get_string()
+ * and g_checksum_free().
+ *
+ * Return value: the digest of the binary data as a string in hexadecimal.
+ *   The returned string should be freed with g_free() when done using it.
+ *
+ * Since: 2.16
+ */
+gchar *
+g_compute_checksum_for_data (GChecksumType  checksum_type,
+                             const guchar  *data,
+                             gsize          length)
+{
+  GChecksum *checksum;
+  gchar *retval;
+
+  g_return_val_if_fail (IS_VALID_TYPE (checksum_type), NULL);
+  g_return_val_if_fail (data != NULL, NULL);
+  g_return_val_if_fail (length > 1, NULL);
+
+  checksum = g_checksum_new (checksum_type);
+  if (!checksum)
+    return NULL;
+
+  g_checksum_update (checksum, data, length);
+  retval = g_strdup (g_checksum_get_string (checksum));
+  g_checksum_free (checksum);
+
+  return retval;
+}
+
+/**
+ * g_compute_checksum_for_string:
+ * @checksum_type: a #GChecksumType
+ * @str: the string to compute the checksum of
+ * @length: the length of the string, or -1 if the string is null-terminated.
+ *
+ * Computes the checksum of a string.
+ *
+ * Return value: the checksum as a hexadecimal string. The returned string
+ *   should be freed with g_free() when done using it.
+ *
+ * Since: 2.16
+ */
+gchar *
+g_compute_checksum_for_string (GChecksumType  checksum_type,
+                               const gchar   *str,
+                               gssize         length)
+{
+  g_return_val_if_fail (IS_VALID_TYPE (checksum_type), NULL);
+  g_return_val_if_fail (str != NULL, NULL);
+
+  if (length < 0)
+    length = strlen (str);
+
+  return g_compute_checksum_for_data (checksum_type, (const guchar *) str, length);
+}

Added: libgpod/trunk/libgpod/branches/upstream/current/src/gchecksum.h
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/gchecksum.h	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/gchecksum.h	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,72 @@
+/* gchecksum.h - data hashing functions
+ *
+ * Copyright (C) 2007  Emmanuele Bassi  <ebassi at gnome.org>
+ *
+ * This library 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; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __G_CHECKSUM_H__
+#define __G_CHECKSUM_H__
+
+#include <glib/gtypes.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GChecksumType:
+ * @G_CHECKSUM_MD5: Use the MD5 hashing algorithm
+ * @G_CHECKSUM_SHA1: Use the SHA-1 hashing algorithm
+ * @G_CHECKSUM_SHA256: Use the SHA-256 hashing algorithm
+ *
+ * The hashing algorithm to be used by #GChecksum when performing the
+ * digest of some data.
+ *
+ * Note that the #GChecksumType enumeration may be extended at a later 
+ * date to include new hashing algorithm types. 
+ *
+ * Since: 2.16
+ */
+typedef enum {
+  G_CHECKSUM_MD5,
+  G_CHECKSUM_SHA1,
+  G_CHECKSUM_SHA256
+} GChecksumType;
+
+typedef struct _GChecksum       GChecksum;
+
+gssize                g_checksum_type_get_length (GChecksumType checksum_type);
+
+GChecksum *           g_checksum_new        (GChecksumType     checksum_type);
+GChecksum *           g_checksum_copy       (const GChecksum  *checksum);
+void                  g_checksum_free       (GChecksum        *checksum);
+void                  g_checksum_update     (GChecksum        *checksum,
+                                             const guchar     *data,
+                                             gssize            length);
+G_CONST_RETURN gchar *g_checksum_get_string (GChecksum        *checksum);
+void                  g_checksum_get_digest (GChecksum        *checksum,
+                                             guint8           *buffer,
+                                             gsize            *digest_len);
+
+gchar *g_compute_checksum_for_data   (GChecksumType  checksum_type,
+                                      const guchar  *data,
+                                      gsize          length);
+gchar *g_compute_checksum_for_string (GChecksumType  checksum_type,
+                                      const gchar   *str,
+                                      gssize         length);
+
+G_END_DECLS
+
+#endif /* __G_CHECKSUM_H__ */

Added: libgpod/trunk/libgpod/branches/upstream/current/src/itdb.h
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/itdb.h	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/itdb.h	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,1922 @@
+/*
+|  Copyright (C) 2002-2007 Jorg Schuler <jcsjcs at users sourceforge net>
+|  Part of the gtkpod project.
+| 
+|  URL: http://www.gtkpod.org/
+|  URL: http://gtkpod.sourceforge.net/
+|
+|  Most of the code in this file has been ported from the perl
+|  script "mktunes.pl" (part of the gnupod-tools collection) written
+|  by Adrian Ulrich <pab at blinkenlights.ch>.
+|
+|  gnupod-tools: http://www.blinkenlights.ch/cgi-bin/fm.pl?get=ipod
+|
+|  The code contained in this file is free software; you can redistribute
+|  it and/or modify it under the terms of the GNU Lesser General Public
+|  License as published by the Free Software Foundation; either version
+|  2.1 of the License, or (at your option) any later version.
+|
+|  This file 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
+|  Lesser General Public License for more details.
+|
+|  You should have received a copy of the GNU Lesser General Public
+|  License along with this code; if not, write to the Free Software
+|  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+|
+|  iTunes and iPod are trademarks of Apple
+|
+|  This product is not supported/written/published by Apple!
+|
+|  $Id: itdb.h 2272 2009-03-14 18:02:16Z teuf $
+*/
+
+#ifndef __ITUNESDB_H__
+#define __ITUNESDB_H__
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <sys/types.h>
+#include <time.h>
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+/* G_GNUC_INTERNAL is defined in glib 2.6 */
+#ifndef G_GNUC_INTERNAL
+#define G_GNUC_INTERNAL
+#endif 
+
+/**
+ * ItdbUserDataDestroyFunc:
+ * @userdata: A #gpointer to user data
+ *
+ * Function called to free userdata
+ */
+typedef void (* ItdbUserDataDestroyFunc) (gpointer userdata);
+
+/**
+ * ItdbUserDataDuplicateFunc:
+ * @userdata: A #gpointer to user data
+ *
+ * Function called to duplicate userdata
+ *
+ * Returns: A #gpointer
+ */
+typedef gpointer (* ItdbUserDataDuplicateFunc) (gpointer userdata);
+
+/* public structures */
+typedef struct _Itdb_Device Itdb_Device;
+typedef struct _Itdb_IpodInfo Itdb_IpodInfo;
+typedef struct _Itdb_Artwork Itdb_Artwork;
+typedef struct _Itdb_ArtworkFormat Itdb_ArtworkFormat;
+typedef struct _Itdb_Thumb Itdb_Thumb;
+typedef struct _Itdb_SPLPref Itdb_SPLPref;
+typedef struct _Itdb_SPLRule Itdb_SPLRule;
+typedef struct _Itdb_SPLRules Itdb_SPLRules;
+typedef struct _Itdb_iTunesDB Itdb_iTunesDB;
+typedef struct _Itdb_PhotoDB Itdb_PhotoDB;
+typedef struct _Itdb_Playlist Itdb_Playlist;
+typedef struct _Itdb_PhotoAlbum Itdb_PhotoAlbum;
+typedef struct _Itdb_Track Itdb_Track;
+typedef struct _Itdb_Chapter Itdb_Chapter;
+typedef struct _Itdb_Chapterdata Itdb_Chapterdata;
+
+
+/* ------------------------------------------------------------ *\
+ *
+ * iPod model-relevant definitions
+ *
+\* ------------------------------------------------------------ */
+
+/**
+ * Itdb_IpodGeneration:
+ * @ITDB_IPOD_GENERATION_UNKNOWN:   Unknown iPod
+ * @ITDB_IPOD_GENERATION_FIRST:     First Generation iPod
+ * @ITDB_IPOD_GENERATION_SECOND:    Second Generation iPod
+ * @ITDB_IPOD_GENERATION_THIRD:     Third Generation iPod
+ * @ITDB_IPOD_GENERATION_FOURTH:    Fourth Generation iPod
+ * @ITDB_IPOD_GENERATION_PHOTO:     Photo iPod
+ * @ITDB_IPOD_GENERATION_MOBILE:    Mobile iPod
+ * @ITDB_IPOD_GENERATION_MINI_1:    First Generation iPod Mini
+ * @ITDB_IPOD_GENERATION_MINI_2:    Second Generation iPod Mini
+ * @ITDB_IPOD_GENERATION_SHUFFLE_1: First Generation iPod Shuffle
+ * @ITDB_IPOD_GENERATION_SHUFFLE_2: Second Generation iPod Shuffle
+ * @ITDB_IPOD_GENERATION_SHUFFLE_3: Third Generation iPod Shuffle
+ * @ITDB_IPOD_GENERATION_NANO_1:    First Generation iPod Nano
+ * @ITDB_IPOD_GENERATION_NANO_2:    Second Generation iPod Nano
+ * @ITDB_IPOD_GENERATION_NANO_3:    Third Generation iPod Nano
+ * @ITDB_IPOD_GENERATION_NANO_4:    Fourth Generation iPod Nano
+ * @ITDB_IPOD_GENERATION_VIDEO_1:   First Generation iPod Video (aka 5g)
+ * @ITDB_IPOD_GENERATION_VIDEO_2:   Second Generation iPod Video (aka 5.5g)
+ * @ITDB_IPOD_GENERATION_CLASSIC_1: First Generation iPod Classic
+ * @ITDB_IPOD_GENERATION_CLASSIC_2: Second Generation iPod Classic
+ * @ITDB_IPOD_GENERATION_TOUCH_1:   First Generation iPod Touch
+ * @ITDB_IPOD_GENERATION_IPHONE_1:  First Generation iPhone
+ *
+ * iPod generation information
+ *
+ * See http://support.apple.com/kb/HT1353 and http://en.wikipedia.org/wiki/IPod
+ * for more details.
+ *
+ * Since: 0.4.0
+ */
+typedef enum {
+    ITDB_IPOD_GENERATION_UNKNOWN,
+    ITDB_IPOD_GENERATION_FIRST,
+    ITDB_IPOD_GENERATION_SECOND,
+    ITDB_IPOD_GENERATION_THIRD,
+    ITDB_IPOD_GENERATION_FOURTH,
+    ITDB_IPOD_GENERATION_PHOTO,
+    ITDB_IPOD_GENERATION_MOBILE,
+    ITDB_IPOD_GENERATION_MINI_1,
+    ITDB_IPOD_GENERATION_MINI_2,
+    ITDB_IPOD_GENERATION_SHUFFLE_1,
+    ITDB_IPOD_GENERATION_SHUFFLE_2,
+    ITDB_IPOD_GENERATION_SHUFFLE_3,
+    ITDB_IPOD_GENERATION_NANO_1,
+    ITDB_IPOD_GENERATION_NANO_2,
+    ITDB_IPOD_GENERATION_NANO_3,
+    ITDB_IPOD_GENERATION_NANO_4,
+    ITDB_IPOD_GENERATION_VIDEO_1,
+    ITDB_IPOD_GENERATION_VIDEO_2,
+    ITDB_IPOD_GENERATION_CLASSIC_1,
+    ITDB_IPOD_GENERATION_CLASSIC_2,
+    ITDB_IPOD_GENERATION_TOUCH_1,
+    ITDB_IPOD_GENERATION_IPHONE_1,
+} Itdb_IpodGeneration;
+
+/**
+ * Itdb_IpodModel:
+ * @ITDB_IPOD_MODEL_INVALID:        Invalid model
+ * @ITDB_IPOD_MODEL_UNKNOWN:        Unknown model
+ * @ITDB_IPOD_MODEL_COLOR:          Color iPod
+ * @ITDB_IPOD_MODEL_COLOR_U2:       Color iPod (U2)
+ * @ITDB_IPOD_MODEL_REGULAR:        Regular iPod
+ * @ITDB_IPOD_MODEL_REGULAR_U2:     Regular iPod (U2)
+ * @ITDB_IPOD_MODEL_MINI:           iPod Mini
+ * @ITDB_IPOD_MODEL_MINI_BLUE:      iPod Mini (Blue)
+ * @ITDB_IPOD_MODEL_MINI_PINK:      iPod Mini (Pink)
+ * @ITDB_IPOD_MODEL_MINI_GREEN:     iPod Mini (Green)
+ * @ITDB_IPOD_MODEL_MINI_GOLD:      iPod Mini (Gold)
+ * @ITDB_IPOD_MODEL_SHUFFLE:        iPod Shuffle
+ * @ITDB_IPOD_MODEL_NANO_WHITE:     iPod Nano (White)
+ * @ITDB_IPOD_MODEL_NANO_BLACK:     iPod Nano (Black)
+ * @ITDB_IPOD_MODEL_VIDEO_WHITE:    iPod Video (White)
+ * @ITDB_IPOD_MODEL_VIDEO_BLACK:    iPod Video (Black)
+ * @ITDB_IPOD_MODEL_MOBILE_1:       Mobile iPod
+ * @ITDB_IPOD_MODEL_VIDEO_U2:       iPod Video (U2)
+ * @ITDB_IPOD_MODEL_NANO_SILVER:    iPod Nano (Silver)
+ * @ITDB_IPOD_MODEL_NANO_BLUE:      iPod Nano (Blue)
+ * @ITDB_IPOD_MODEL_NANO_GREEN:     iPod Nano (Green)
+ * @ITDB_IPOD_MODEL_NANO_PINK:      iPod Nano (Pink)
+ * @ITDB_IPOD_MODEL_NANO_RED:       iPod Nano (Red)
+ * @ITDB_IPOD_MODEL_NANO_YELLOW:    iPod Nano (Yellow)
+ * @ITDB_IPOD_MODEL_NANO_PURPLE:    iPod Nano (Purple)
+ * @ITDB_IPOD_MODEL_NANO_ORANGE:    iPod Nano (Orange)
+ * @ITDB_IPOD_MODEL_IPHONE_1:       iPhone
+ * @ITDB_IPOD_MODEL_SHUFFLE_SILVER: iPod Shuffle (Silver)
+ * @ITDB_IPOD_MODEL_SHUFFLE_PINK:   iPod Shuffle (Pink)
+ * @ITDB_IPOD_MODEL_SHUFFLE_BLUE:   iPod Shuffle (Blue)
+ * @ITDB_IPOD_MODEL_SHUFFLE_GREEN:  iPod Shuffle (Green)
+ * @ITDB_IPOD_MODEL_SHUFFLE_ORANGE: iPod Shuffle (Orange)
+ * @ITDB_IPOD_MODEL_SHUFFLE_PURPLE: iPod Shuffle (Purple)
+ * @ITDB_IPOD_MODEL_SHUFFLE_RED:    iPod Shuffle (Red)
+ * @ITDB_IPOD_MODEL_CLASSIC_SILVER: iPod Classic (Silver)
+ * @ITDB_IPOD_MODEL_CLASSIC_BLACK:  iPod Classic (Black)
+ * @ITDB_IPOD_MODEL_TOUCH_BLACK:    iPod Touch (Black)
+ *
+ * iPod model information
+ *
+ * Since: 0.4.0
+ */
+typedef enum {
+    ITDB_IPOD_MODEL_INVALID,
+    ITDB_IPOD_MODEL_UNKNOWN,
+    ITDB_IPOD_MODEL_COLOR,
+    ITDB_IPOD_MODEL_COLOR_U2,
+    ITDB_IPOD_MODEL_REGULAR,
+    ITDB_IPOD_MODEL_REGULAR_U2,
+    ITDB_IPOD_MODEL_MINI,
+    ITDB_IPOD_MODEL_MINI_BLUE,
+    ITDB_IPOD_MODEL_MINI_PINK,
+    ITDB_IPOD_MODEL_MINI_GREEN,
+    ITDB_IPOD_MODEL_MINI_GOLD,
+    ITDB_IPOD_MODEL_SHUFFLE,
+    ITDB_IPOD_MODEL_NANO_WHITE,
+    ITDB_IPOD_MODEL_NANO_BLACK,
+    ITDB_IPOD_MODEL_VIDEO_WHITE,
+    ITDB_IPOD_MODEL_VIDEO_BLACK,
+    ITDB_IPOD_MODEL_MOBILE_1,
+    ITDB_IPOD_MODEL_VIDEO_U2,
+    ITDB_IPOD_MODEL_NANO_SILVER,
+    ITDB_IPOD_MODEL_NANO_BLUE,
+    ITDB_IPOD_MODEL_NANO_GREEN,
+    ITDB_IPOD_MODEL_NANO_PINK,
+    ITDB_IPOD_MODEL_NANO_RED,
+    ITDB_IPOD_MODEL_NANO_YELLOW,
+    ITDB_IPOD_MODEL_NANO_PURPLE,
+    ITDB_IPOD_MODEL_NANO_ORANGE,
+    ITDB_IPOD_MODEL_IPHONE_1,
+    ITDB_IPOD_MODEL_SHUFFLE_SILVER,
+    ITDB_IPOD_MODEL_SHUFFLE_PINK,
+    ITDB_IPOD_MODEL_SHUFFLE_BLUE,
+    ITDB_IPOD_MODEL_SHUFFLE_GREEN,
+    ITDB_IPOD_MODEL_SHUFFLE_ORANGE,
+    ITDB_IPOD_MODEL_SHUFFLE_PURPLE,
+    ITDB_IPOD_MODEL_SHUFFLE_RED,
+    ITDB_IPOD_MODEL_CLASSIC_SILVER,
+    ITDB_IPOD_MODEL_CLASSIC_BLACK,
+    ITDB_IPOD_MODEL_TOUCH_BLACK,
+} Itdb_IpodModel;
+
+/**
+ * Itdb_IpodInfo:
+ * @model_number:    The model number.  This is abbreviated.  If the first
+ *                   character is not numeric, it is ommited. e.g.
+ *                   "MA350 -> A350", "M9829 -> 9829"
+ * @capacity:        The iPod's capacity in gigabytes
+ * @ipod_model:      The iPod model
+ * @ipod_generation: The iPod generation
+ * @musicdirs:       The number of music (Fnn) dirs created by iTunes. The
+ *                   exact number seems to be version dependent. Therefore, the
+ *                   numbers here represent a mixture of reported values and
+ *                   common sense.  Note: this number does not necessarily
+ *                   represent the number of dirs present on a particular iPod.
+ *                   It is used when setting up a new iPod from scratch.
+ * @reserved_int1:   Reserved for future use
+ * @reserved_int2:   Reserved for future use
+ * @reserved1:       Reserved for future use
+ * @reserved2:       Reserved for future use
+ *
+ * Structure representing information about an iPod
+ *
+ * Since: 0.4.0
+ */
+struct _Itdb_IpodInfo {
+    const gchar *model_number;
+    const double capacity;
+    const Itdb_IpodModel ipod_model;
+    const Itdb_IpodGeneration ipod_generation;
+    const guint musicdirs;
+    /* reserved for future use */
+    const gint32 reserved_int1;
+    const gint32 reserved_int2;
+    gconstpointer reserved1;
+    gconstpointer reserved2;
+};
+
+
+/* ------------------------------------------------------------ *\
+ *
+ * Smart Playlists (Rules)
+ *
+\* ------------------------------------------------------------ */
+
+
+/* Most of the knowledge about smart playlists has been provided by
+   Samuel "Otto" Wood (sam dot wood at gmail dot com) who let me dig
+   in his impressive C++ class. Contact him for a complete
+   copy. Further, all enums and #defines below, Itdb_SPLRule, Itdb_SPLRules, and
+   Itdb_SPLPref may also be used under a FreeBSD license. */
+
+/**
+ * ITDB_SPL_STRING_MAXLEN:
+ *
+ * Maximum string length for smart playlists
+ *
+ * Since: 0.5.0
+ */
+#define ITDB_SPL_STRING_MAXLEN 255
+
+/**
+ * ITDB_SPL_DATE_IDENTIFIER:
+ *
+ * Identifier for smart playlist date fields
+ *
+ * Since: 0.5.0
+ */
+#define ITDB_SPL_DATE_IDENTIFIER (G_GINT64_CONSTANT (0x2dae2dae2dae2daeU))
+
+/* Definitions for smart playlists */
+
+/**
+ * ItdbSPLMatch:
+ * @ITDB_SPLMATCH_AND: Logical AND - all of the rules must be true in order for
+ *                     the combined rule to be applied
+ * @ITDB_SPLMATCH_OR:  Logical OR - any of the rules may be true
+ *
+ * Types for smart playlist rules match_operator
+ */
+typedef enum {
+    ITDB_SPLMATCH_AND = 0,
+    ITDB_SPLMATCH_OR = 1
+} ItdbSPLMatch;
+
+/**
+ * ItdbLimitType:
+ * @ITDB_LIMITTYPE_MINUTES: Limit in minutes
+ * @ITDB_LIMITTYPE_MB:      Limit in megabytes
+ * @ITDB_LIMITTYPE_SONGS:   Limit in number of songs
+ * @ITDB_LIMITTYPE_HOURS:   Limit in hours
+ * @ITDB_LIMITTYPE_GB:      Limit in gigabytes
+ *
+ * The type of unit to use when limiting a playlist
+ *
+ * Since: 0.5.0
+ */
+typedef enum {
+    ITDB_LIMITTYPE_MINUTES = 0x01,
+    ITDB_LIMITTYPE_MB      = 0x02,
+    ITDB_LIMITTYPE_SONGS   = 0x03,
+    ITDB_LIMITTYPE_HOURS   = 0x04,
+    ITDB_LIMITTYPE_GB      = 0x05
+} ItdbLimitType;
+
+/**
+ * ItdbLimitSort:
+ * @ITDB_LIMITSORT_RANDOM:                Sort randomly
+ * @ITDB_LIMITSORT_SONG_NAME:             Sort by track name
+ * @ITDB_LIMITSORT_ALBUM:                 Sort by album name
+ * @ITDB_LIMITSORT_ARTIST:                Sort by artist name
+ * @ITDB_LIMITSORT_GENRE:                 Sort by genre
+ * @ITDB_LIMITSORT_MOST_RECENTLY_ADDED:   Sort by most recently added
+ * @ITDB_LIMITSORT_LEAST_RECENTLY_ADDED:  Sort by least recently added
+ * @ITDB_LIMITSORT_MOST_OFTEN_PLAYED:     Sort by most often played
+ * @ITDB_LIMITSORT_LEAST_OFTEN_PLAYED:    Sort by least often played
+ * @ITDB_LIMITSORT_MOST_RECENTLY_PLAYED:  Sort by most recently played
+ * @ITDB_LIMITSORT_LEAST_RECENTLY_PLAYED: Sort by least recently played
+ * @ITDB_LIMITSORT_HIGHEST_RATING:        Sort by highest rating
+ * @ITDB_LIMITSORT_LOWEST_RATING:         Sort by lowest rating
+ *
+ * Which songs to pick when using a limit type
+ *
+ * Note: the values for #ITDB_LIMITSORT_LEAST_RECENTLY_ADDED,
+ * #ITDB_LIMITSORT_LEAST_OFTEN_PLAYED, #ITDB_LIMITSORT_LEAST_RECENTLY_PLAYED,
+ * and #ITDB_LIMITSORT_LOWEST_RATING are really 0x10, 0x14, 0x15, 0x17, with the
+ * 'limitsort_opposite' flag set.  This is the same value as the "positive"
+ * value (i.e. #ITDB_LIMITSORT_LEAST_RECENTLY_ADDED), and is really very
+ * terribly awfully weird, so we map the values to iPodDB specific values with
+ * the high bit set.
+ *
+ * On writing, we check the high bit and write the limitsort_opposite from that.
+ * That way, we don't have to deal with programs using the class needing to set
+ * the wrong limit and then make it into the "opposite", which would be frickin'
+ * annoying.
+ *
+ * Since: 0.5.0
+ */
+typedef enum {
+    ITDB_LIMITSORT_RANDOM = 0x02,
+    ITDB_LIMITSORT_SONG_NAME = 0x03,
+    ITDB_LIMITSORT_ALBUM = 0x04,
+    ITDB_LIMITSORT_ARTIST = 0x05,
+    ITDB_LIMITSORT_GENRE = 0x07,
+    ITDB_LIMITSORT_MOST_RECENTLY_ADDED = 0x10,
+    ITDB_LIMITSORT_LEAST_RECENTLY_ADDED = 0x80000010, /* See note above */
+    ITDB_LIMITSORT_MOST_OFTEN_PLAYED = 0x14,
+    ITDB_LIMITSORT_LEAST_OFTEN_PLAYED = 0x80000014,   /* See note above */
+    ITDB_LIMITSORT_MOST_RECENTLY_PLAYED = 0x15,
+    ITDB_LIMITSORT_LEAST_RECENTLY_PLAYED = 0x80000015,/* See note above */
+    ITDB_LIMITSORT_HIGHEST_RATING = 0x17,
+    ITDB_LIMITSORT_LOWEST_RATING = 0x80000017,        /* See note above */
+} ItdbLimitSort;
+
+/**
+ * ItdbSPLAction:
+ * @ITDB_SPLACTION_IS_INT:              is integer ("Is Set" in iTunes)
+ * @ITDB_SPLACTION_IS_GREATER_THAN:     is greater than ("Is after" in iTunes)
+ * @ITDB_SPLACTION_IS_LESS_THAN:        is less than ("Is Before" in iTunes)
+ * @ITDB_SPLACTION_IS_IN_THE_RANGE:     is in the range
+ * @ITDB_SPLACTION_IS_IN_THE_LAST:      is in the last
+ * @ITDB_SPLACTION_BINARY_AND:          binary AND
+ * @ITDB_SPLACTION_IS_STRING:           is a string
+ * @ITDB_SPLACTION_CONTAINS:            contains
+ * @ITDB_SPLACTION_STARTS_WITH:         starts with
+ * @ITDB_SPLACTION_ENDS_WITH:           ends with
+ * @ITDB_SPLACTION_IS_NOT_INT:          is not an integer ("Is Not Set" in iTunes)
+ * @ITDB_SPLACTION_IS_NOT_GREATER_THAN: is not greater than (not in iTunes)
+ * @ITDB_SPLACTION_IS_NOT_LESS_THAN:    is not less than (not in iTunes)
+ * @ITDB_SPLACTION_IS_NOT_IN_THE_RANGE: is not in the range (not in iTunes)
+ * @ITDB_SPLACTION_IS_NOT_IN_THE_LAST:  is not in the last
+ * @ITDB_SPLACTION_IS_NOT:              is not
+ * @ITDB_SPLACTION_DOES_NOT_CONTAIN:    does not contain
+ * @ITDB_SPLACTION_DOES_NOT_START_WITH: does not start with (not in iTunes)
+ * @ITDB_SPLACTION_DOES_NOT_END_WITH:   does not end with (not in iTunes)
+ *
+ * Smartlist Actions used in smart playlist rules.
+ *
+ * Note by Otto (Samuel Wood):
+ * <informalexample>
+ *  <programlisting>
+ *  really this is a bitmapped field...
+ *  high byte
+ *  bit 0 = "string" values if set, "int" values if not set
+ *  bit 1 = "not", or to negate the check.
+ *  lower 2 bytes
+ *  bit 0 = simple "IS" query
+ *  bit 1 = contains
+ *  bit 2 = begins with
+ *  bit 3 = ends with
+ *  bit 4 = greater than
+ *  bit 5 = unknown, but probably greater than or equal to
+ *  bit 6 = less than
+ *  bit 7 = unknown, but probably less than or equal to
+ *  bit 8 = a range selection
+ *  bit 9 = "in the last"
+ *  </programlisting>
+ * </informalexample>
+ *
+ * Since: 0.5.0
+*/
+typedef enum {
+    ITDB_SPLACTION_IS_INT = 0x00000001,
+    ITDB_SPLACTION_IS_GREATER_THAN = 0x00000010,
+    ITDB_SPLACTION_IS_LESS_THAN = 0x00000040,
+    ITDB_SPLACTION_IS_IN_THE_RANGE = 0x00000100,
+    ITDB_SPLACTION_IS_IN_THE_LAST = 0x00000200,
+    ITDB_SPLACTION_BINARY_AND = 0x00000400,
+
+    ITDB_SPLACTION_IS_STRING = 0x01000001,
+    ITDB_SPLACTION_CONTAINS = 0x01000002,
+    ITDB_SPLACTION_STARTS_WITH = 0x01000004,
+    ITDB_SPLACTION_ENDS_WITH = 0x01000008,
+
+    ITDB_SPLACTION_IS_NOT_INT = 0x02000001,
+    ITDB_SPLACTION_IS_NOT_GREATER_THAN = 0x02000010,
+    ITDB_SPLACTION_IS_NOT_LESS_THAN = 0x02000040,
+    ITDB_SPLACTION_IS_NOT_IN_THE_RANGE = 0x02000100,
+    ITDB_SPLACTION_IS_NOT_IN_THE_LAST = 0x02000200,
+
+    ITDB_SPLACTION_IS_NOT = 0x03000001,
+    ITDB_SPLACTION_DOES_NOT_CONTAIN = 0x03000002,
+    ITDB_SPLACTION_DOES_NOT_START_WITH = 0x03000004,
+    ITDB_SPLACTION_DOES_NOT_END_WITH = 0x03000008,
+} ItdbSPLAction;
+
+/**
+ * ItdbSPLFieldType:
+ * @ITDB_SPLFT_STRING:      string
+ * @ITDB_SPLFT_INT:         integer
+ * @ITDB_SPLFT_BOOLEAN:     boolean
+ * @ITDB_SPLFT_DATE:        date
+ * @ITDB_SPLFT_PLAYLIST:    playlist
+ * @ITDB_SPLFT_UNKNOWN:     unknown
+ * @ITDB_SPLFT_BINARY_AND:  binary AND
+ *
+ * Smart Playlist Field Types
+ *
+ * Since: 0.5.0
+ */
+typedef enum
+{
+    ITDB_SPLFT_STRING = 1,
+    ITDB_SPLFT_INT,
+    ITDB_SPLFT_BOOLEAN,
+    ITDB_SPLFT_DATE,
+    ITDB_SPLFT_PLAYLIST,
+    ITDB_SPLFT_UNKNOWN,
+    ITDB_SPLFT_BINARY_AND
+} ItdbSPLFieldType;
+
+/**
+ * ItdbSPLActionType:
+ * @ITDB_SPLAT_STRING:      string
+ * @ITDB_SPLAT_INT:         from integer
+ * @ITDB_SPLAT_DATE:        from date ...
+ * @ITDB_SPLAT_RANGE_INT:   an integer range ...
+ * @ITDB_SPLAT_RANGE_DATE:  a date range ...
+ * @ITDB_SPLAT_INTHELAST:   in the last ...
+ * @ITDB_SPLAT_PLAYLIST:    in playlist
+ * @ITDB_SPLAT_NONE:        none
+ * @ITDB_SPLAT_INVALID:     invalid
+ * @ITDB_SPLAT_UNKNOWN:     unknown
+ * @ITDB_SPLAT_BINARY_AND:  is / is not (binary AND)
+ *
+ * Smart Playlist Action Types
+ *
+ * Since: 0.5.0
+ */
+typedef enum
+{
+    ITDB_SPLAT_STRING = 1,
+    ITDB_SPLAT_INT,
+    ITDB_SPLAT_DATE,
+    ITDB_SPLAT_RANGE_INT,
+    ITDB_SPLAT_RANGE_DATE,
+    ITDB_SPLAT_INTHELAST,
+    ITDB_SPLAT_PLAYLIST,
+    ITDB_SPLAT_NONE,
+    ITDB_SPLAT_INVALID,
+    ITDB_SPLAT_UNKNOWN,
+    ITDB_SPLAT_BINARY_AND
+} ItdbSPLActionType;
+
+
+/**
+ * ItdbSPLActionLast:
+ * @ITDB_SPLACTION_LAST_DAYS_VALUE:   Seconds in 24 hours
+ * @ITDB_SPLACTION_LAST_WEEKS_VALUE:  Seconds in 7 days
+ * @ITDB_SPLACTION_LAST_MONTHS_VALUE: Seconds in 1 month (approximately)
+ *
+ * These are to pass to AddRule() when you need a unit for the two "in the last"
+ * action types.  In theory, you can use any time range.  iTunes might not
+ * like it, but the iPod shouldn't care.
+ *
+ * Since: 0.5.0
+ */
+typedef enum {
+    ITDB_SPLACTION_LAST_DAYS_VALUE = 86400,    /* nr of secs in 24 hours */
+    ITDB_SPLACTION_LAST_WEEKS_VALUE = 604800,  /* nr of secs in 7 days   */
+    ITDB_SPLACTION_LAST_MONTHS_VALUE = 2628000,/* nr of secs in 30.4167
+						  days ~= 1 month */
+} ItdbSPLActionLast;
+
+#if 0
+// Hey, why limit ourselves to what iTunes can do? If the iPod can deal with it, excellent!
+#define ITDB_SPLACTION_LAST_HOURS_VALUE		3600		// number of seconds in 1 hour
+#define ITDB_SPLACTION_LAST_MINUTES_VALUE	60			// number of seconds in 1 minute
+#define ITDB_SPLACTION_LAST_YEARS_VALUE		31536000 	// number of seconds in 365 days
+
+/* fun ones.. Near as I can tell, all of these work. It's open like that. :)*/
+#define ITDB_SPLACTION_LAST_LUNARCYCLE_VALUE	2551443		// a "lunar cycle" is the time it takes the moon to circle the earth
+#define ITDB_SPLACTION_LAST_SIDEREAL_DAY		86164		// a "sidereal day" is time in one revolution of earth on its axis
+#define ITDB_SPLACTION_LAST_SWATCH_BEAT		86			// a "swatch beat" is 1/1000th of a day.. search for "internet time" on google
+#define ITDB_SPLACTION_LAST_MOMENT			90			// a "moment" is 1/40th of an hour, or 1.5 minutes
+#define ITDB_SPLACTION_LAST_OSTENT			600			// an "ostent" is 1/10th of an hour, or 6 minutes
+#define ITDB_SPLACTION_LAST_FORTNIGHT		1209600 	// a "fortnight" is 14 days
+#define ITDB_SPLACTION_LAST_VINAL			1728000 	// a "vinal" is 20 days
+#define ITDB_SPLACTION_LAST_QUARTER			7889231		// a "quarter" is a quarter year
+#define ITDB_SPLACTION_LAST_SOLAR_YEAR       31556926 	// a "solar year" is the time it takes the earth to go around the sun
+#define ITDB_SPLACTION_LAST_SIDEREAL_YEAR 	31558150	// a "sidereal year" is the time it takes the earth to reach the same point in space again, compared to the stars
+#endif
+
+/**
+ * ItdbSPLField:
+ * @ITDB_SPLFIELD_SONG_NAME:        Song name (string)
+ * @ITDB_SPLFIELD_ALBUM:            Album (string)
+ * @ITDB_SPLFIELD_ARTIST:           Artist (string)
+ * @ITDB_SPLFIELD_BITRATE:          Bitrate (integer, e.g. from/to = 128)
+ * @ITDB_SPLFIELD_SAMPLE_RATE:      Sample rate (integer, e.g. from/to = 44100)
+ * @ITDB_SPLFIELD_YEAR:             Year (integer, e.g. from/to = 2004)
+ * @ITDB_SPLFIELD_GENRE:            Genre (string)
+ * @ITDB_SPLFIELD_KIND:             File type (string, e.g. MP3-File)
+ * @ITDB_SPLFIELD_DATE_MODIFIED:    Date modified (integer, e.g.
+ *                                  from/to = bcf93280 == is before 6/19/2004)
+ * @ITDB_SPLFIELD_TRACKNUMBER:      Track number (integer, e.g. from/to = 2)
+ * @ITDB_SPLFIELD_SIZE:             Size (integer, e.g.
+ *                                  from/to = 0x00600000 for 6MB)
+ * @ITDB_SPLFIELD_TIME:             Time (integer, e.g.
+ *                                  from/to = 83999 for 1:23/83 seconds)
+ * @ITDB_SPLFIELD_COMMENT:          Comment (string)
+ * @ITDB_SPLFIELD_DATE_ADDED:       Date added (integer, e.g.
+ *                                  from/to = bcfa83ff == is after 6/19/2004)
+ * @ITDB_SPLFIELD_COMPOSER:         Composer (string)
+ * @ITDB_SPLFIELD_PLAYCOUNT:        Playcount (integer, e.g. from/to = 1)
+ * @ITDB_SPLFIELD_LAST_PLAYED:      Date last played (integer, e.g.
+ *                                  from = bcfa83ff (6/19/2004)
+ *                                  to = 0xbcfbd57f (6/20/2004))
+ * @ITDB_SPLFIELD_DISC_NUMBER:      Disc number (integer, e.g. from/to = 1)
+ * @ITDB_SPLFIELD_RATING:           Rating (integer, e.g.
+ *                                  from/to = 60 (3 stars))
+ * @ITDB_SPLFIELD_COMPILATION:      Compilation (integer, e.g.
+ *                                  is set -> ITDB_SPLACTION_IS_INT/from=1,
+ *                                  not set -> ITDB_SPLACTION_IS_NOT_INT/from=1)
+ * @ITDB_SPLFIELD_BPM:              Beats per minute (integer, e.g.
+ *                                  from/to = 60)
+ * @ITDB_SPLFIELD_GROUPING:         Grouping (string)
+ * @ITDB_SPLFIELD_PLAYLIST:         FIXME Unknown...not parsed correctly...
+ *                                  from/to = 0xb6fbad5f for "Purchased Music".
+ *                                  Extra data after "to"...
+ * @ITDB_SPLFIELD_VIDEO_KIND:       Logical integer (works on mediatype)
+ * @ITDB_SPLFIELD_TVSHOW:           TV Show (string)
+ * @ITDB_SPLFIELD_SEASON_NR:        Season number (integer)
+ * @ITDB_SPLFIELD_SKIPCOUNT:        Skipcount (integer)
+ * @ITDB_SPLFIELD_LAST_SKIPPED:     Last skipped (integer)
+ * @ITDB_SPLFIELD_ALBUMARTIST:      Album artist (string)
+ *
+ * Smart Playlist Fields, used for Smart Playlist Rules (#Itdb_SPLRule).
+ *
+ * Since: 0.5.0
+ */
+typedef enum {
+    ITDB_SPLFIELD_SONG_NAME = 0x02,
+    ITDB_SPLFIELD_ALBUM = 0x03,
+    ITDB_SPLFIELD_ARTIST = 0x04,
+    ITDB_SPLFIELD_BITRATE = 0x05,
+    ITDB_SPLFIELD_SAMPLE_RATE = 0x06,
+    ITDB_SPLFIELD_YEAR = 0x07,
+    ITDB_SPLFIELD_GENRE = 0x08,
+    ITDB_SPLFIELD_KIND = 0x09,
+    ITDB_SPLFIELD_DATE_MODIFIED = 0x0a,
+    ITDB_SPLFIELD_TRACKNUMBER = 0x0b,
+    ITDB_SPLFIELD_SIZE = 0x0c,
+    ITDB_SPLFIELD_TIME = 0x0d,
+    ITDB_SPLFIELD_COMMENT = 0x0e,
+    ITDB_SPLFIELD_DATE_ADDED = 0x10,
+    ITDB_SPLFIELD_COMPOSER = 0x12,
+    ITDB_SPLFIELD_PLAYCOUNT = 0x16,
+    ITDB_SPLFIELD_LAST_PLAYED = 0x17,
+    ITDB_SPLFIELD_DISC_NUMBER = 0x18,
+    ITDB_SPLFIELD_RATING = 0x19,
+    ITDB_SPLFIELD_COMPILATION = 0x1f,
+    ITDB_SPLFIELD_BPM = 0x23,
+    ITDB_SPLFIELD_GROUPING = 0x27,
+    ITDB_SPLFIELD_PLAYLIST = 0x28,
+    ITDB_SPLFIELD_VIDEO_KIND = 0x3c,
+    ITDB_SPLFIELD_TVSHOW = 0x3e,
+    ITDB_SPLFIELD_SEASON_NR = 0x3f,
+    ITDB_SPLFIELD_SKIPCOUNT = 0x44,
+    ITDB_SPLFIELD_LAST_SKIPPED = 0x45,
+    ITDB_SPLFIELD_ALBUMARTIST = 0x47
+} ItdbSPLField;
+
+/**
+ * Itdb_SPLPref:
+ * @liveupdate:         Live Updating
+ * @checkrules:         Match this number of rules.  If set to 0, ignore rules.
+ * @checklimits:        Limit to this number of @limittype.  If 0, no limits.
+ * @limittype:          an #ItdbLimitType
+ * @limitsort:          an #ItdbLimitSort
+ * @limitvalue:         The value typed next to "Limit type"
+ * @matchcheckedonly:   Match only checked songs
+ * @reserved_int1:      Reserved for future use
+ * @reserved_int2:      Reserved for future use
+ * @reserved1:          Reserved for future use
+ * @reserved2:          Reserved for future use
+ *
+ * Smart Playlist preferences are for various flags that are not strictly smart
+ * playlist "rules."
+ *
+ * Since: 0.5.0
+ */
+struct _Itdb_SPLPref
+{
+    guint8  liveupdate;
+    guint8  checkrules;
+    guint8  checklimits;
+    guint32 limittype;
+    guint32 limitsort;
+    guint32 limitvalue;
+    guint8  matchcheckedonly;
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+};
+
+/**
+ * Itdb_SPLRule:
+ * @field:          an #ItdbSPLFieldType
+ * @action:         an #ItdbSPLActionType
+ * @string:         data in UTF8
+ * @fromvalue:      from value
+ * @fromdate:       from date
+ * @fromunits:      from units
+ * @tovalue:        to value
+ * @todate:         to date
+ * @tounits:        to units
+ * @unk052:         Unknown
+ * @unk056:         Unknown
+ * @unk060:         Unknown
+ * @unk064:         Unknown
+ * @unk068:         Unknown
+ * @reserved_int1:  Reserved for future use
+ * @reserved_int2:  Reserved for future use
+ * @reserved1:      Reserved for future use
+ * @reserved2:      Reserved for future use
+ *
+ * Smart Playlist Rule
+ *
+ * The from and to fields require some explanation.  If @field is a date type,
+ * then @value would be set to 0x2dae2dae2dae2dae, @date would be a number,
+ * (e.g. 2 or -2), and @units would be a time unit in seconds (e.g. one week
+ * would be 604800).  If @field is an integer comparison, like rating = 60 (i.e.
+ * 3 stars), then @value would be the value we care about (e.g. 60), @date would
+ * be 0, and @units would be 1.  Binary AND types are similar, @value is the
+ * important part, with @date = 0 and @units = 1.  Clear as mud, right?
+ *
+ * For more details see <ulink
+ * url="http://ipodlinux.org/ITunesDB.html&num;Smart_Playlist_Rule_Values">ipodlinux.org</ulink>.
+ *
+ * Since: 0.5.0
+ */
+struct _Itdb_SPLRule
+{
+    guint32 field;
+    guint32 action;
+    gchar *string;
+    guint64 fromvalue;
+    gint64 fromdate;
+    guint64 fromunits;
+    guint64 tovalue;
+    gint64 todate;
+    guint64 tounits;
+    guint32 unk052;
+    guint32 unk056;
+    guint32 unk060;
+    guint32 unk064;
+    guint32 unk068;
+    /* reserved for future use */
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+};
+
+/**
+ * Itdb_SPLRules:
+ * @unk004:         Unknown
+ * @match_operator: Whether all rules must match (#ITDB_SPLMATCH_AND) or any
+ *                  rules may match (#ITDB_SPLMATCH_OR)
+ * @rules:          list of #Itdb_SPLRule's
+ * @reserved_int1:  Reserved for future use
+ * @reserved_int2:  Reserved for future use
+ * @reserved1:      Reserved for future use
+ * @reserved2:      Reserved for future use
+ *
+ * Smart Playlist Rules
+ *
+ * Since: 0.5.0
+ */
+struct _Itdb_SPLRules
+{
+    guint32 unk004;
+    guint32 match_operator;
+    GList *rules;
+    /* reserved for future use */
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+};
+
+
+/* ------------------------------------------------------------ *\
+ *
+ * Chapters
+ *
+\* ------------------------------------------------------------ */
+
+/**
+ * Itdb_Chapter:
+ * @startpos:      The start position of the chapter in ms. The first chapter
+ *                 begins at 1.
+ * @chaptertitle:  The chapter title in UTF8
+ * @reserved_int1: Reserved for future use
+ * @reserved_int2: Reserved for future use
+ * @reserved1:     Reserved for future use
+ * @reserved2:     Reserved for future use
+ *
+ * Structure representing an iTunesDB Chapter
+ *
+ * Since: 0.7.0
+ */
+struct _Itdb_Chapter
+{
+    guint32 startpos;
+    gchar *chaptertitle;
+    /* reserved for future use */
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+};
+
+/**
+ * Itdb_Chapterdata:
+ * @chapters:      A list of chapters (#Itdb_Chapter)
+ * @unk024:        Unknown
+ * @unk028:        Unknown
+ * @unk032:        Unknown
+ * @reserved_int1: Reserved for future use
+ * @reserved_int2: Reserved for future use
+ * @reserved1:     Reserved for future use
+ * @reserved2:     Reserved for future use
+ *
+ * Structure representing iTunesDB Chapter data
+ *
+ * Since: 0.7.0
+ */
+struct _Itdb_Chapterdata
+{
+    GList *chapters;
+    guint32 unk024;
+    guint32 unk028;
+    guint32 unk032;
+    /* reserved for future use */
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+};
+
+
+/* ------------------------------------------------------------ *\
+ *
+ * iTunesDB, Playlists, Tracks, PhotoDB, Artwork, Thumbnails
+ *
+\* ------------------------------------------------------------ */
+
+/**
+ * ITDB_RATING_STEP:
+ *
+ * The multiplier for each star in #track->rating
+ */
+#define ITDB_RATING_STEP 20
+
+/**
+ * Itdb_Artwork:
+ * @thumbnail:          An #Itdb_Thumb
+ * @id:                 Artwork id used by photoalbums.  This starts at 0x40 and
+ *                      is set automatically when the ArtworkDB or PhotoDB is
+ *                      written
+ * @dbid:               The dbid of associated track.  Used internally by
+ *                      libgpod.
+ * @unk028:             Unknown
+ * @rating:             Rating from iPhoto * 20 (PhotoDB only)
+ * @unk036:             Unknown
+ * @creation_date:      Date the image file was created (PhotoDB only)
+ * @digitized_date:     Date the image was taken (EXIF information, PhotoDB
+ *                      only)
+ * @artwork_size:       Size in bytes of the original source image (PhotoDB
+ *                      only -- don't touch in case of ArtworkDB!)
+ * @reserved_int1:      Reserved for future use
+ * @reserved_int2:      Reserved for future use
+ * @reserved1:          Reserved for future use
+ * @reserved2:          Reserved for future use
+ * @usertype:           For use by application
+ * @userdata:           For use by application
+ * @userdata_duplicate: A function to duplicate #userdata
+ * @userdata_destroy:   A function to free #userdata
+ *
+ * Structure representing artwork in an #Itdb_iTunesDB or #Itdb_PhotoDB
+ *
+ * Since: 0.3.0
+ */
+struct _Itdb_Artwork {
+    Itdb_Thumb *thumbnail;
+    guint32 id;
+    guint64 dbid;
+    gint32  unk028;
+    guint32 rating;
+    gint32  unk036;
+    time_t  creation_date;
+    time_t  digitized_date;
+    guint32 artwork_size;
+    /* reserved for future use */
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+    /* below is for use by application */
+    guint64 usertype;
+    gpointer userdata;
+    /* functions called to duplicate/free userdata */
+    ItdbUserDataDuplicateFunc userdata_duplicate;
+    ItdbUserDataDestroyFunc userdata_destroy;
+};
+
+/**
+ * Itdb_PhotoDB:
+ * @photos:             A list of photos in the database (#Itdb_Artwork)
+ * @photoalbums:        A list of albums in the database (#Itdb_PhotoAlbum)
+ * @device:             iPod device info (#Itdb_Device)
+ * @reserved_int1:      Reserved for future use
+ * @reserved_int2:      Reserved for future use
+ * @reserved1:          Reserved for future use
+ * @reserved2:          Reserved for future use
+ * @usertype:           For use by application
+ * @userdata:           For use by application
+ * @userdata_duplicate: A function to duplicate #userdata
+ * @userdata_destroy:   A function to free #userdata
+ *
+ * Structure representing an iTunes Photo database
+ *
+ * Since: 0.4.0
+ */
+struct _Itdb_PhotoDB
+{
+    GList *photos;
+    GList *photoalbums;
+    Itdb_Device *device;
+    /* reserved for future use */
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+    /* below is for use by application */
+    guint64 usertype;
+    gpointer userdata;
+    /* functions called to duplicate/free userdata */
+    ItdbUserDataDuplicateFunc userdata_duplicate;
+    ItdbUserDataDestroyFunc userdata_destroy;
+};
+
+/**
+ * Itdb_iTunesDB:
+ * @tracks:             A list of tracks in the database (#Itdb_Track)
+ * @playlists:          A list of playlists in the database (#Itdb_Playlist)
+ * @filename:           The filename of the iTunesDB
+ * @device:             iPod device info (#Itdb_Device)
+ * @version:            The version number of the iTunesDB
+ * @id:                 A 64 bit id value for the iTunesDB
+ * @reserved_int1:      Reserved for future use
+ * @reserved_int2:      Reserved for future use
+ * @reserved1:          Reserved for future use
+ * @reserved2:          Reserved for future use
+ * @usertype:           For use by application
+ * @userdata:           For use by application
+ * @userdata_duplicate: A function to duplicate #userdata
+ * @userdata_destroy:   A function to free #userdata
+ *
+ * Structure representing an iTunes database
+ */
+struct _Itdb_iTunesDB
+{
+    GList *tracks;
+    GList *playlists;
+    gchar *filename;
+    Itdb_Device *device;
+    guint32 version;
+    guint64 id;
+    /* reserved for future use */
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+    /* below is for use by application */
+    guint64 usertype;
+    gpointer userdata;
+    /* functions called to duplicate/free userdata */
+    ItdbUserDataDuplicateFunc userdata_duplicate;
+    ItdbUserDataDestroyFunc userdata_destroy;
+};
+
+/**
+ * Itdb_PhotoAlbum:
+ * @photodb:              A pointer to the #Itdb_PhotoDB (for convenience)
+ * @name:                 The name of photoalbum in UTF8
+ * @members:              A list of photos in album (#Itdb_Artwork)
+ * @album_type:           The album type.  0x01 for master (Photo Library),
+ *                        0x02 for a normal album.  (4 and 5 have also been
+ *                        seen.)
+ * @playmusic:            Play music during slideshow
+ * @repeat:               Repeat the slideshow
+ * @random:               Show slides in random order
+ * @show_titles:          Show slide captions
+ * @transition_direction: Transition direction.  0=none, 1=left-to-right,
+ *                        2=right-to-left, 3=top-to-bottom, 4=bottom-to-top
+ * @slide_duration:       Slide duration in seconds
+ * @transition_duration:  Transition duration, in milliseconds
+ * @song_id:              The @dbid2 of a track to play during slideshow
+ * @unk024:               Unknown, seems to be always 0
+ * @unk028:               Unknown, seems to be always 0
+ * @unk044:               Unknown, seems to always be 0
+ * @unk048:               Unknown, seems to always be 0
+ * @album_id:             The id of the album.  This is set automatically when
+ *                        the PhotoDB is written.
+ * @prev_album_id:        The id of the previous playlist.  This is set
+ *                        automatically when the PhotoDB is written.
+ * @reserved_int1:        Reserved for future use
+ * @reserved_int2:        Reserved for future use
+ * @reserved1:            Reserved for future use
+ * @reserved2:            Reserved for future use
+ * @usertype:             For use by application
+ * @userdata:             For use by application
+ * @userdata_duplicate:   A function to duplicate #userdata
+ * @userdata_destroy:     A function to free #userdata
+ *
+ * Structure representing an iTunes Photo Album
+ *
+ * Since: 0.4.0
+ */
+struct _Itdb_PhotoAlbum
+{
+    Itdb_PhotoDB *photodb;
+    gchar *name;
+    GList *members;
+    guint8 album_type;
+    guint8 playmusic;
+    guint8 repeat;
+    guint8 random;
+    guint8 show_titles;
+    guint8 transition_direction;
+    gint32 slide_duration;
+    gint32 transition_duration;
+    gint64 song_id;
+    gint32 unk024;
+    gint16 unk028;
+    gint32 unk044;
+    gint32 unk048;
+    /* set automatically at time of writing the PhotoDB */
+    gint32  album_id;
+    gint32  prev_album_id;
+    /* reserved for future use */
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+    /* below is for use by application */
+    guint64 usertype;
+    gpointer userdata;
+    /* functions called to duplicate/free userdata */
+    ItdbUserDataDuplicateFunc userdata_duplicate;
+    ItdbUserDataDestroyFunc userdata_destroy;
+};
+
+/**
+ * Itdb_Playlist:
+ * @itdb:               A pointer to the #Itdb_iTunesDB (for convenience)
+ * @name:               The name of the playlist in UTF8
+ * @type:               The playlist type (normal or master)
+ * @flag1:              Unknown, usually set to 0
+ * @flag2:              Unknown, always set to 0
+ * @flag3:              Unknown, always set to 0
+ * @num:                The number of tracks in the playlist
+ * @members:            A list of tracks in the playlist (#Itdb_Track)
+ * @is_spl:             True if the playlist is a smart playlist, otherwise
+ *                      false
+ * @timestamp:          When the playlist was created
+ * @id:                 The playlist ID
+ * @sortorder:          The playlist sort order (#ItdbPlaylistSortOrder)
+ * @podcastflag:        This is set to 0 on normal playlists and to 1 for the
+ *                      Podcast playlist. If set to 1, the playlist will not be
+ *                      shown under 'Playlists' on the iPod, but as 'Podcasts'
+ *                      under the Music menu. The actual title of the Playlist
+ *                      does not matter. If more than one playlist is set to 1,
+ *                      they don't show up at all.
+ * @splpref:            Smart playlist preferences (#Itdb_SPLPref)
+ * @splrules:           Smart playlist rules (#Itdb_SPLRules)
+ * @reserved100:        Reserved for MHOD100 implementation
+ * @reserved101:        Reserved for MHOD100 implementation
+ * @reserved_int1:      Reserved for future use
+ * @reserved_int2:      Reserved for future use
+ * @reserved1:          Reserved for future use
+ * @reserved2:          Reserved for future use
+ * @usertype:           For use by application
+ * @userdata:           For use by application
+ * @userdata_duplicate: A function to duplicate #userdata
+ * @userdata_destroy:   A function to free #userdata
+ *
+ * Structure representing an iTunes Playlist
+ */
+struct _Itdb_Playlist
+{
+    Itdb_iTunesDB *itdb;
+    gchar *name;
+    guint8 type;
+    guint8 flag1;
+    guint8 flag2;
+    guint8 flag3;
+    gint  num;
+    GList *members;
+    gboolean is_spl;
+    time_t timestamp;
+    guint64 id;
+    guint32 sortorder;
+    guint32 podcastflag;
+    Itdb_SPLPref splpref;
+    Itdb_SPLRules splrules;
+    gpointer reserved100;
+    gpointer reserved101;
+    /* reserved for future use */
+    gint32 reserved_int1;
+    gint32 reserved_int2;
+    gpointer reserved1;
+    gpointer reserved2;
+    /* below is for use by application */
+    guint64 usertype;
+    gpointer userdata;
+    /* functions called to duplicate/free userdata */
+    ItdbUserDataDuplicateFunc userdata_duplicate;
+    ItdbUserDataDestroyFunc userdata_destroy;
+};
+
+
+/**
+ * ItdbPlaylistSortOrder:
+ * @ITDB_PSO_MANUAL:        Sort by playlist order (manual sort)
+ * @ITDB_PSO_TITLE:         Sort by track title
+ * @ITDB_PSO_ALBUM:         Sort by album
+ * @ITDB_PSO_ARTIST:        Sort by artist
+ * @ITDB_PSO_BIRATE:        Sort by bitrate
+ * @ITDB_PSO_GENRE:         Sort by genre
+ * @ITDB_PSO_FILETYPE:      Sort by filetype
+ * @ITDB_PSO_TIME_MODIFIED: Sort by date modified
+ * @ITDB_PSO_TRACK_NR:      Sort by track number
+ * @ITDB_PSO_SIZE:          Sort by track size
+ * @ITDB_PSO_TIME:          Sort by track time
+ * @ITDB_PSO_YEAR:          Sort by year
+ * @ITDB_PSO_SAMPLERATE:    Sort by samplerate
+ * @ITDB_PSO_COMMENT:       Sort by comments
+ * @ITDB_PSO_TIME_ADDED:    Sort by date added
+ * @ITDB_PSO_EQUALIZER:     Sort by equilizer
+ * @ITDB_PSO_COMPOSER:      Sort by composer
+ * @ITDB_PSO_PLAYCOUNT:     Sort by playcount
+ * @ITDB_PSO_TIME_PLAYED:   Sort by date last played
+ * @ITDB_PSO_CD_NR:         Sort by disc number
+ * @ITDB_PSO_RATING:        Sort by rating
+ * @ITDB_PSO_RELEASE_DATE:  Sort by release date
+ * @ITDB_PSO_BPM:           Sort by beats per minute
+ * @ITDB_PSO_GROUPING:      Sort by grouping
+ * @ITDB_PSO_CATEGORY:      Sort by category
+ * @ITDB_PSO_DESCRIPTION:   Sort by description
+ *
+ * Playlist Sort Order
+ *
+ * Since: 0.1.3
+ */
+typedef enum
+{
+    ITDB_PSO_MANUAL = 1,
+/*    ITDB_PSO_UNKNOWN = 2, */
+    ITDB_PSO_TITLE = 3,
+    ITDB_PSO_ALBUM = 4,
+    ITDB_PSO_ARTIST = 5,
+    ITDB_PSO_BIRATE = 6,
+    ITDB_PSO_GENRE = 7,
+    ITDB_PSO_FILETYPE = 8,
+    ITDB_PSO_TIME_MODIFIED = 9,
+    ITDB_PSO_TRACK_NR = 10,
+    ITDB_PSO_SIZE = 11,
+    ITDB_PSO_TIME = 12,  /* ? */
+    ITDB_PSO_YEAR = 13,
+    ITDB_PSO_SAMPLERATE = 14,
+    ITDB_PSO_COMMENT = 15,
+    ITDB_PSO_TIME_ADDED = 16,
+    ITDB_PSO_EQUALIZER = 17, /* ? */
+    ITDB_PSO_COMPOSER = 18,
+/*    ITDB_PSO_UNKNOWN = 19, */
+    ITDB_PSO_PLAYCOUNT = 20,
+    ITDB_PSO_TIME_PLAYED = 21,
+    ITDB_PSO_CD_NR = 22,
+    ITDB_PSO_RATING = 23,
+    ITDB_PSO_RELEASE_DATE = 24, /* used by podcasts */
+    ITDB_PSO_BPM = 25,
+    ITDB_PSO_GROUPING = 26,
+    ITDB_PSO_CATEGORY = 27,
+    ITDB_PSO_DESCRIPTION = 28
+} ItdbPlaylistSortOrder;
+
+
+/**
+ * Itdb_Mediatype:
+ * @ITDB_MEDIATYPE_AUDIO:      Audio files
+ * @ITDB_MEDIATYPE_MOVIE:      Movies
+ * @ITDB_MEDIATYPE_PODCAST:    Podcasts
+ * @ITDB_MEDIATYPE_AUDIOBOOK:  Audio books
+ * @ITDB_MEDIATYPE_MUSICVIDEO: Music videos
+ * @ITDB_MEDIATYPE_TVSHOW:     TV Shows
+ *
+ * Mediatype definitions
+ *
+ * The mediatype is used to determine what menu a track appears under.  For
+ * example, setting the mediatype to #ITDB_MEDIATYPE_PODCAST makes the track
+ * appear on the Podcast menu.
+ *
+ * Since: 0.5.0
+ */
+typedef enum
+{
+    ITDB_MEDIATYPE_AUDIO      = 0x0001,
+    ITDB_MEDIATYPE_MOVIE      = 0x0002,
+    ITDB_MEDIATYPE_PODCAST    = 0x0004,
+    ITDB_MEDIATYPE_AUDIOBOOK  = 0x0008,
+    ITDB_MEDIATYPE_MUSICVIDEO = 0x0020,
+    ITDB_MEDIATYPE_TVSHOW     = 0x0040,
+} Itdb_Mediatype;
+
+/**
+ * Itdb_Track:
+ * @itdb:                       A pointer to the #Itdb_iTunesDB (for convenience)
+ * @title:                      The title of the track in UTF8
+ * @ipod_path:                  The file path on the iPod.  Directories are
+ *                              separated with ":" instead of "/".  The path is
+ *                              relative to the iPod mountpoint.
+ * @album:                      The album name in UTF8
+ * @artist:                     The artist name in UTF8
+ * @genre:                      The genre in UTF8
+ * @filetype:                   A UTF8 string describing the file type.  E.g.
+ *                              "MP3-File".
+ * @comment:                    A comment in UTF8
+ * @category:                   The category ("Technology", "Music", etc.)
+ *                              where the podcast was located.  (Added in
+ *                              dbversion 0x0d)
+ * @composer:                   The composer name in UTF8
+ * @grouping:                   ??? (UTF8)
+ * @description:                Description text (such as podcast show notes).
+ *                              (Added in dbversion 0x0d)
+ * @podcasturl:                 Podcast Enclosure URL in UTF-8 or ASCII.
+ *                              (Added in dbversion 0x0d)
+ * @podcastrss:                 Podcast RSS URL in UTF-8 or ASCII.
+ *                              (Added in dbversion 0x0d)
+ * @chapterdata:                This is an m4a-style entry that is used to
+ *                              display subsongs within a mhit.  (Added in
+ *                              dbversion 0x0d)
+ * @subtitle:                   Subtitle (usually the same as Description).
+ *                              (Added in dbversion 0x0d)
+ * @tvshow:                     Name of the TV show (only used for TV Shows).
+ *                              (Added in dbversion 0x0d?) (Since libgpod-0.4.2)
+ * @tvepisode:                  The episode number (only used for TV Shows).
+ *                              (Added in dbversion 0x0d?) (Since libgpod-0.4.2)
+ * @tvnetwork:                  The TV network (only used for TV Shows).
+ *                              (Added in dbversion 0x0d?) (Since libgpod-0.4.2)
+ * @albumartist:                The album artist (Added in dbversion 0x13?)
+ *                              (Since libgpod-0.4.2)
+ * @keywords:                   List of keywords pertaining to the track.
+ *                              (Added in dbversion 0x13?) (Since libgpod-0.4.2)
+ * @sort_artist:                The artist name used for sorting.  Artists with
+ *                              names like "The Artist" would have "Artist,
+ *                              The" here.  If you do not set this field,
+ *                              libgpod will pre-sort the lists displayed by
+ *                              the iPod according to "Artist, The", without
+ *                              setting this field.
+ *                              (Added in dbversion 0x13?) (Since libgpod-0.5.0)
+ * @sort_title:                 The track title used for sorting.  See
+ *                              @sort_artist. (Since libgpod-0.5.0)
+ * @sort_album:                 The album name used for sorting.  See
+ *                              @sort_artist. (Since libgpod-0.5.0)
+ * @sort_albumartist:           The album artist used for sorting.  See
+ *                              @sort_artist. (Since libgpod-0.5.0)
+ * @sort_composer:              The composer used for sorting.  See
+ *                              @sort_artist. (Since libgpod-0.5.0)
+ * @sort_tvshow:                The name of the TV show used for sorting.  See
+ *                              @sort_artist. (Since libgpod-0.5.0)
+ * @id:                         Unique ID of track
+ * @size:                       The size of the file in bytes
+ * @tracklen:                   The length of the track in ms
+ * @cd_nr:                      The CD number the track comes from.
+ * @cds:                        The total number of CDs.
+ * @track_nr:                   The track number.
+ * @tracks:                     The total number of tracks.
+ * @bitrate:                    The bitrate at which the file is encoded.
+ * @samplerate:                 The samplerate of the track (e.g. CD = 44100)
+ * @samplerate_low:             In the iTunesDB the samplerate is
+ *                              multiplied by 0x10000 -- these are the
+ *                              lower 16 bit, which are usually 0
+ * @year:                       The year the track was released
+ * @volume:                     Volume adjustment field.  This is a value from
+ *                              -255 to 255 that will be applied to the track
+ *                              on playback.
+ * @soundcheck:                 The SoundCheck value to apply to the song, when
+ *                              SoundCheck is switched on in the iPod settings.
+ *                              The value for this field can be determined by
+ *                              the equation: X = 1000 * 10 ^ (-.1 * Y) where Y
+ *                              is the adjustment value in dB and X is the
+ *                              value that goes into the SoundCheck field. The
+ *                              value 0 is special, the equation is not used
+ *                              and it is treated as "no Soundcheck" (basically
+ *                              the same as the value 1000). This equation
+ *                              works perfectly well with ReplayGain derived
+ *                              data instead of the iTunes SoundCheck derived
+ *                              information.
+ * @time_added:                 The time the track was added.
+ * @time_modified:              The time the track was last modified
+ * @time_played:                The time the track was last played
+ * @bookmark_time:              The time, in milliseconds, that the track will
+ *                              start playing at. This is used for AudioBook
+ *                              filetypes (.aa and .m4b).  Note that there is
+ *                              also a bookmark value in the play counts file
+ *                              that will be set by the iPod and can be used
+ *                              instead of this value.
+ * @rating:                     The track rating (stars * #ITDB_RATING_STEP)
+ * @playcount:                  The number of times the track has been played
+ * @playcount2:                 This also stores the play count of the
+ *                              track.  It is unclear if this ever differs
+ *                              from the above value. During sync, this is set
+ *                              to the same value as @playcount.
+ * @recent_playcount:           The number of times the track was played since
+ *                              the last sync.
+ * @transferred:                Whether the file been transferred to iPod.
+ * @BPM:                        BPM (beats per minute) of the track
+ * @app_rating:                 The last rating set by an application (e.g.
+ *                              iTunes).  If the rating on the iPod and the
+ *                              @rating field above differ, the original
+ *                              rating is copied here and the new rating is
+ *                              stored in @rating.
+ * @type1:                      CBR MP3s and AAC are 0x00, VBR MP3s are 0x01
+ * @type2:                      MP3s are 0x01, AAC are 0x00
+ * @compilation:                Flag to mark the track as a compilation.  True
+ *                              if set to 0x1, false if set to 0x0.
+ * @starttime:                  The time, in milliseconds, at which the song
+ *                              will start playing.
+ * @stoptime:                   The time, in milliseconds, at which the song
+ *                              will stop playing.
+ * @checked:                    Flag for whether the track is checked.  True if
+ *                              set to 0x0, false if set to 0x1
+ * @dbid:                       Unique database ID that identifies this song
+ *                              across the databases on the iPod. For example,
+ *                              this id joins an iTunesDB mhit with an
+ *                              ArtworkDB mhii.
+ * @drm_userid:                 Apple Store/Audible User ID (for DRM'ed files
+ *                              only, set to 0 otherwise).
+ * @visible:                    If this value is 1, the song is visible on the
+ *                              iPod. All other values cause the file to be
+ *                              hidden.
+ * @filetype_marker:            This appears to always be 0 on hard drive based
+ *                              iPods, but for the iTunesDB that is written to
+ *                              an iPod Shuffle, iTunes 4.7.1 writes out the
+ *                              file's type as an ANSI string(!). For example,
+ *                              a MP3 file has a filetype of 0x4d503320 ->
+ *                              0x4d = 'M', 0x50 = 'P', 0x33 = '3', 0x20 =
+ *                              &lt;space&gt;.  This is set to the filename
+ *                              extension by libgpod when copying the track to
+ *                              the iPod.
+ * @artwork_count:              The number of album artwork items associated
+ *                              with this song.  libgpod updates this value
+ *                              when syncing.
+ * @artwork_size:               The total size of artwork (in bytes) attached
+ *                              to this song, when it is converted to JPEG
+ *                              format. Observed in dbversion 0x0b and with
+ *                              an iPod Photo. libgpod updates this value when
+ *                              syncing.
+ * @samplerate2:                The sample rate of the song expressed as an
+ *                              IEEE 32 bit floating point number.  It is
+ *                              uncertain why this is here.  libgpod will set
+ *                              this when adding a track.
+ * @unk126:                     Unknown, but always seems to be 0xffff for
+ *                              MP3/AAC songs, 0x0 for uncompressed songs
+ *                              (like WAVE format), 0x1 for Audible.  libgpod
+ *                              will try to set this when adding a new track.
+ * @unk132:                     Unknown
+ * @time_released:              The date/time the track was added to the iTunes
+ *                              music store?  For podcasts this is the release
+ *                              date that is displayed next to the title in the
+ *                              Podcast playlist.
+ * @unk144:                     Unknown, but MP3 songs appear to be always
+ *                              0x000c, AAC songs are always 0x0033, Audible
+ *                              files are 0x0029, WAV files are 0x0.  libgpod
+ *                              will attempt to set this value when adding a
+ *                              track.
+ * @explicit_flag:              Flag to mark a track as "explicit" in iTunes.
+ *                              True if to 0x1, false if set to 0x0.
+ * @unk148:                     Unknown - used for Apple Store DRM songs
+ *                              (always 0x01010100?), zero otherwise
+ * @unk152:                     Unknown
+ * @skipcount:                  The number of times the track has been skipped.
+ *                              (Added in dbversion 0x0c)
+ * @recent_skipcount:           The number of times the track was skipped since
+ *                              the last sync.
+ * @last_skipped:               The time the track was last skipped.  (Added in
+ *                              dbversion 0x0c)
+ * @has_artwork:                Whether the track has artwork.
+ *                              True if set to 0x01, false if set to 0x02.
+ * @skip_when_shuffling:        Flag to skip the track when shuffling.  True if
+ *                              set to 0x01, false if set to 0x00. Audiobooks
+ *                              (.aa and .m4b) always seem to be skipped when
+ *                              shuffling, regardless of this flag.
+ * @remember_playback_position: Flag to remember playback position.
+ *                              True when set to 0x01, false when set to 0x00.
+ *                              Audiobooks (.aa and .m4b) always seem to
+ *                              remember the playback position, regardless of
+ *                              this flag.
+ * @flag4:                      Used for podcasts, 0x00 otherwise.  If set to
+ *                              0x01 the "Now Playing" page will show
+ *                              Title/Album, when set to 0x00 it will also show
+ *                              the Artist.  When set to 0x02 a sub-page
+ *                              (middle button) with further information about
+ *                              the track will be shown.
+ * @dbid2:                      The purpose of the field is unclear.  If not
+ *                              set, libgpod will set this to the same value as
+ *                              @dbid when adding a track.  (With iTunes, since
+ *                              dbversion 0x12, this field value differs from
+ *                              @dbid.)
+ * @lyrics_flag:                Whether the track has lyrics (e.g. it has a
+ *                              USLT ID3 tag in an MP3 or a @lyr atom in an
+ *                              MP4).  True if set to 0x01, false if set to
+ *                              0x00.
+ * @movie_flag:                 Whether the track is a movie.  True if set to
+ *                              0x01, false if set to 0x00.
+ * @mark_unplayed:              A value of 0x02 marks a podcast as unplayed on
+ *                              the iPod, with a bullet.  Once played it is set
+ *                              to 0x01. Non-podcasts have this set to 0x01.
+ *                              (Added in dbversion 0x0c)
+ * @unk179:                     Unknown, always 0x00 so far.  (Added in
+ *                              dbversion 0x0c)
+ * @unk180:                     Unknown.  (Added in dbversion 0x0c)
+ * @pregap:                     The number of samples of silence before the
+ *                              track starts (for gapless playback).
+ * @samplecount:                The number of samples in the track (for gapless
+ *                              playback).
+ * @unk196:                     Unknown.  (Added in dbversion 0x0c)
+ * @postgap:                    The number of samples of silence at the end of
+ *                              the track (for gapless playback).
+ * @unk204:                     Unknown.  Appears to be 0x1 for files encoded
+ *                              using the MP3 encoder, 0x0 otherwise.  (Added
+ *                              in dbversion 0x0c, first values observed in
+ *                              0x0d.)
+ * @mediatype:                  The type of file.  It must be set to 0x00000001
+ *                              for audio files, and set to 0x00000002 for
+ *                              video files.  If set to 0x00, the files show up
+ *                              in both, the audio menus ("Songs", "Artists",
+ *                              etc.) and the video menus ("Movies", "Music
+ *                              Videos", etc.).  It appears to be set to 0x20
+ *                              for music videos, and if set to 0x60 the file
+ *                              shows up in "TV Shows" rather than "Movies".
+ *                              <para>
+ *                              The following list summarizes all observed types:
+ *                              </para>
+ *                              <itemizedlist>
+ *                              <listitem>0x00 00 00 00 - Audio/Video</listitem>
+ *                              <listitem>0x00 00 00 01 - Audio</listitem>
+ *                              <listitem>0x00 00 00 02 - Video</listitem>
+ *                              <listitem>0x00 00 00 04 - Podcast</listitem>
+ *                              <listitem>0x00 00 00 06 - Video Podcast</listitem>
+ *                              <listitem>0x00 00 00 08 - Audiobook</listitem>
+ *                              <listitem>0x00 00 00 20 - Music Video</listitem>
+ *                              <listitem>0x00 00 00 40 - TV Show (shows up ONLY
+ *                              in TV Shows)</listitem>
+ *                              <listitem>0x00 00 00 60 - TV Show (shows up in
+ *                              the Music lists as well)</listitem>
+ *                              </itemizedlist>
+ * @season_nr:                  The season number of the track (only used for
+ *                              TV Shows).
+ * @episode_nr:                 The episode number of the track (only used for
+ *                              TV Shows).  Although this is not displayed on
+ *                              the iPod, the episodes are sorted by episode
+ *                              number.
+ * @unk220:                     Unknown.  This has something to do with
+ *                              protected files.  It is set to 0x0 for
+ *                              non-protected files.
+ * @unk224:                     Unknown.  (Added in dbversion 0x0c)
+ * @unk228:                     Unknown.  (Added in dbversion 0x0c)
+ * @unk232:                     Unknown.  (Added in dbversion 0x0c)
+ * @unk236:                     Unknown.  (Added in dbversion 0x0c)
+ * @unk240:                     Unknown.  (Added in dbversion 0x0c)
+ * @unk244:                     Unknown.  (Added in dbversion 0x13)
+ * @gapless_data:               The size in bytes from first Synch Frame
+ *                              (which is usually the XING frame that
+ *                              includes the LAME tag) until the 8th before
+ *                              the last frame. The gapless playback does not
+ *                              work for MP3 files if this is set to zero. For
+ *                              AAC tracks, this may be zero.  (Added in
+ *                              dbversion 0x13)
+ * @unk252:                     Unknown.  (Added in dbversion 0x0c)
+ * @gapless_track_flag:         If set to 1, this track has gapless playback
+ *                              data.  (Added in dbversion 0x13)
+ * @gapless_album_flag:         If set to 1, this track does not use
+ *                              crossfading in iTunes.  (Added in dbversion
+ *                              0x13)
+ * @album_id:                   The Album ID from the album list (currently
+ *                              unused by libgpod)
+ * @artwork:                    An #Itdb_Artwork for cover art
+ * @mhii_link:                  This is set to the id of the corresponding
+ *                              ArtworkDB mhii, used for sparse artwork
+ *                              support.  (Since libgpod-0.7.0)
+ * @reserved_int1:              Reserved for future use
+ * @reserved_int2:              Reserved for future use
+ * @reserved_int3:              Reserved for future use
+ * @reserved_int4:              Reserved for future use
+ * @reserved_int5:              Reserved for future use
+ * @reserved_int6:              Reserved for future use
+ * @reserved1:                  Reserved for future use
+ * @reserved2:                  Reserved for future use
+ * @reserved3:                  Reserved for future use
+ * @reserved4:                  Reserved for future use
+ * @reserved5:                  Reserved for future use
+ * @reserved6:                  Reserved for future use
+ * @usertype:                   For use by application
+ * @userdata:                   For use by application
+ * @userdata_duplicate:         A function to duplicate #userdata
+ * @userdata_destroy:           A function to free #userdata
+ *
+ * Structure representing a track in an iTunesDB
+ *
+ * <note><para>When adding string fields don't forget to add them in
+ * itdb_track_duplicate() as well.</para></note>
+ *
+ * Many of the parameter descriptions are copied verbatim from
+ * http://ipodlinux.org/ITunesDB, which is the best source for information about
+ * the iTunesDB and related files.
+ */
+struct _Itdb_Track
+{
+  Itdb_iTunesDB *itdb;
+  gchar   *title;
+  gchar   *ipod_path;
+  gchar   *album;
+  gchar   *artist;
+  gchar   *genre;
+  gchar   *filetype;
+  gchar   *comment;
+  gchar   *category;
+  gchar   *composer;
+  gchar   *grouping;
+  gchar   *description;
+  gchar   *podcasturl;
+  gchar   *podcastrss;
+  Itdb_Chapterdata *chapterdata;
+  gchar   *subtitle;
+/* the following 5 are new in libgpod 0.4.2... */
+  gchar   *tvshow;
+  gchar   *tvepisode;
+  gchar   *tvnetwork;
+  gchar   *albumartist;
+  gchar   *keywords;
+/* the following 6 are new in libgpod 0.5.0... */
+  /* You can set these strings to override the standard
+     sortorder. When set they take precedence over the default
+     'artist', 'album'... fields.
+
+     For example, in the case of an artist name like "The Artist",
+     iTunes will set sort_artist to "Artist, The" followed by five
+     0x01 characters. Why five 0x01 characters are added is not
+     completely understood.
+
+     If you do not set the sort_artist field, libgpod will pre-sort
+     the lists displayed by the iPod according to "Artist, The",
+     without setting the field.
+  */
+  gchar   *sort_artist;
+  gchar   *sort_title;
+  gchar   *sort_album;
+  gchar   *sort_albumartist;
+  gchar   *sort_composer;
+  gchar   *sort_tvshow;
+/* end of new fields in libgpod 0.5.0 */
+  guint32 id;
+  gint32  size;
+  gint32  tracklen;
+  gint32  cd_nr;
+  gint32  cds;
+  gint32  track_nr;
+  gint32  tracks;
+  gint32  bitrate;
+  guint16 samplerate;
+  guint16 samplerate_low;
+  gint32  year;
+  gint32  volume;
+  guint32 soundcheck;
+  time_t  time_added;
+  time_t  time_modified;
+  time_t  time_played;
+  guint32 bookmark_time;
+  guint32 rating;
+  guint32 playcount;
+  guint32 playcount2;
+  guint32 recent_playcount;
+  gboolean transferred;
+  gint16  BPM;
+  guint8  app_rating;
+  guint8  type1;
+  guint8  type2;
+  guint8  compilation;
+  guint32 starttime;
+  guint32 stoptime;
+  guint8  checked;
+  guint64 dbid;
+  guint32 drm_userid;
+  guint32 visible;
+  guint32 filetype_marker;
+  guint16 artwork_count;
+  guint32 artwork_size;
+  float samplerate2;
+  guint16 unk126;
+  guint32 unk132;
+  time_t  time_released;
+  guint16 unk144;
+  guint16 explicit_flag;
+  guint32 unk148;
+  guint32 unk152;
+  guint32 skipcount;
+  guint32 recent_skipcount;
+  guint32 last_skipped;
+  guint8 has_artwork;
+  guint8 skip_when_shuffling;
+  guint8 remember_playback_position;
+  guint8 flag4;
+  guint64 dbid2;
+  guint8 lyrics_flag;
+  guint8 movie_flag;
+  guint8 mark_unplayed;
+  guint8 unk179;
+  guint32 unk180;
+  guint32 pregap;
+  guint64 samplecount;
+  guint32 unk196;
+  guint32 postgap;
+  guint32 unk204;
+  guint32 mediatype;
+  guint32 season_nr;
+  guint32 episode_nr;
+  guint32 unk220;
+  guint32 unk224;
+  guint32 unk228, unk232, unk236, unk240, unk244;
+  guint32 gapless_data;
+  guint32 unk252;
+  guint16 gapless_track_flag;
+  guint16 gapless_album_flag;
+  guint16 album_id;
+
+  /* This is for Cover Art support */
+  struct _Itdb_Artwork *artwork;
+
+  /* This is for sparse artwork support, new in libgpod-0.7.0 */
+  guint32 mhii_link;
+
+  /* reserved for future use */
+  gint32 reserved_int1;
+  gint32 reserved_int2;
+  gint32 reserved_int3;
+  gint32 reserved_int4;
+  gint32 reserved_int5;
+  gint32 reserved_int6;
+  gpointer reserved1;
+  gpointer reserved2;
+  gpointer reserved3;
+  gpointer reserved4;
+  gpointer reserved5;
+  gpointer reserved6;
+
+  /* +++***+++***+++***+++***+++***+++***+++***+++***+++***+++***
+     When adding string fields don't forget to add them in
+     itdb_track_duplicate as well
+     +++***+++***+++***+++***+++***+++***+++***+++***+++***+++*** */
+
+  /* below is for use by application */
+  guint64 usertype;
+  gpointer userdata;
+  /* functions called to duplicate/free userdata */
+  ItdbUserDataDuplicateFunc userdata_duplicate;
+  ItdbUserDataDestroyFunc userdata_destroy;
+};
+/* (gtkpod note: don't forget to add fields read from the file to
+ * copy_new_info() in file.c!) */
+
+
+/* ------------------------------------------------------------ *\
+ *
+ * Error codes
+ *
+\* ------------------------------------------------------------ */
+
+/**
+ * ItdbFileError:
+ * @ITDB_FILE_ERROR_SEEK:         file corrupt: illegal seek occured
+ * @ITDB_FILE_ERROR_CORRUPT:      file corrupt
+ * @ITDB_FILE_ERROR_NOTFOUND:     file not found
+ * @ITDB_FILE_ERROR_RENAME:       file could not be renamed
+ * @ITDB_FILE_ERROR_ITDB_CORRUPT: iTunesDB in memory corrupt
+ *
+ * Error codes for iTunesDB file
+ */
+typedef enum
+{
+    ITDB_FILE_ERROR_SEEK,
+    ITDB_FILE_ERROR_CORRUPT,
+    ITDB_FILE_ERROR_NOTFOUND,
+    ITDB_FILE_ERROR_RENAME,
+    ITDB_FILE_ERROR_ITDB_CORRUPT
+} ItdbFileError;
+
+
+/* Error domain */
+#define ITDB_FILE_ERROR itdb_file_error_quark ()
+GQuark     itdb_file_error_quark      (void);
+
+
+/* ------------------------------------------------------------ *\
+ *
+ * Public functions
+ *
+\* ------------------------------------------------------------ */
+
+/* functions for reading/writing database, general itdb functions */
+Itdb_iTunesDB *itdb_parse (const gchar *mp, GError **error);
+Itdb_iTunesDB *itdb_parse_file (const gchar *filename, GError **error);
+gboolean itdb_write (Itdb_iTunesDB *itdb, GError **error);
+gboolean itdb_write_file (Itdb_iTunesDB *itdb, const gchar *filename,
+			  GError **error);
+gboolean itdb_shuffle_write (Itdb_iTunesDB *itdb, GError **error);
+gboolean itdb_shuffle_write_file (Itdb_iTunesDB *itdb,
+				  const gchar *filename, GError **error);
+Itdb_iTunesDB *itdb_new (void);
+void itdb_free (Itdb_iTunesDB *itdb);
+Itdb_iTunesDB *itdb_duplicate (Itdb_iTunesDB *itdb); /* not implemented */
+guint32 itdb_tracks_number (Itdb_iTunesDB *itdb);
+guint32 itdb_tracks_number_nontransferred (Itdb_iTunesDB *itdb);
+guint32 itdb_playlists_number (Itdb_iTunesDB *itdb);
+
+/* general file functions */
+gint itdb_musicdirs_number (Itdb_iTunesDB *itdb);
+gchar *itdb_resolve_path (const gchar *root,
+			  const gchar * const * components);
+gboolean itdb_rename_files (const gchar *mp, GError **error);
+gchar *itdb_cp_get_dest_filename (Itdb_Track *track,
+                                  const gchar *mountpoint,
+				  const gchar *filename,
+				  GError **error);
+gboolean itdb_cp (const gchar *from_file, const gchar *to_file,
+		  GError **error);
+Itdb_Track *itdb_cp_finalize (Itdb_Track *track,
+			      const gchar *mountpoint,
+			      const gchar *dest_filename,
+			      GError **error);
+gboolean itdb_cp_track_to_ipod (Itdb_Track *track,
+				const gchar *filename, GError **error);
+void itdb_filename_fs2ipod (gchar *filename);
+void itdb_filename_ipod2fs (gchar *ipod_file);
+gchar *itdb_filename_on_ipod (Itdb_Track *track);
+void itdb_set_mountpoint (Itdb_iTunesDB *itdb, const gchar *mp);
+const gchar *itdb_get_mountpoint (Itdb_iTunesDB *itdb);
+gchar *itdb_get_control_dir (const gchar *mountpoint);
+gchar *itdb_get_itunes_dir (const gchar *mountpoint);
+gchar *itdb_get_music_dir (const gchar *mountpoint);
+gchar *itdb_get_artwork_dir (const gchar *mountpoint);
+gchar *itdb_get_photos_dir (const gchar *mountpoint);
+gchar *itdb_get_photos_thumb_dir (const gchar *mountpoint);
+gchar *itdb_get_device_dir (const gchar *mountpoint);
+gchar *itdb_get_itunesdb_path (const gchar *mountpoint);
+gchar *itdb_get_itunessd_path (const gchar *mountpoint);
+gchar *itdb_get_artworkdb_path (const gchar *mountpoint);
+gchar *itdb_get_photodb_path (const gchar *mountpoint);
+gchar *itdb_get_path (const gchar *dir, const gchar *file);
+
+/* itdb_device functions */
+Itdb_Device *itdb_device_new (void);
+void itdb_device_free (Itdb_Device *device);
+void itdb_device_set_mountpoint (Itdb_Device *device, const gchar *mp);
+gboolean itdb_device_read_sysinfo (Itdb_Device *device);
+gboolean itdb_device_write_sysinfo (Itdb_Device *device, GError **error);
+gchar *itdb_device_get_sysinfo (const Itdb_Device *device, const gchar *field);
+void itdb_device_set_sysinfo (Itdb_Device *device,
+			      const gchar *field, const gchar *value);
+const Itdb_IpodInfo *itdb_device_get_ipod_info (const Itdb_Device *device);
+const Itdb_IpodInfo *itdb_info_get_ipod_info_table (void);
+gboolean itdb_device_supports_artwork (const Itdb_Device *device);
+gboolean itdb_device_supports_chapter_image (const Itdb_Device *device);
+gboolean itdb_device_supports_video (const Itdb_Device *device);
+gboolean itdb_device_supports_photo (const Itdb_Device *device);
+gboolean itdb_device_supports_podcast (const Itdb_Device *device);
+const gchar *itdb_info_get_ipod_model_name_string (Itdb_IpodModel model);
+const gchar *itdb_info_get_ipod_generation_string (Itdb_IpodGeneration generation);
+
+/* track functions */
+Itdb_Track *itdb_track_new (void);
+void itdb_track_free (Itdb_Track *track);
+void itdb_track_add (Itdb_iTunesDB *itdb, Itdb_Track *track, gint32 pos);
+void itdb_track_remove (Itdb_Track *track);
+void itdb_track_unlink (Itdb_Track *track);
+Itdb_Track *itdb_track_duplicate (Itdb_Track *tr);
+Itdb_Track *itdb_track_by_id (Itdb_iTunesDB *itdb, guint32 id);
+GTree *itdb_track_id_tree_create (Itdb_iTunesDB *itdb);
+void itdb_track_id_tree_destroy (GTree *idtree);
+Itdb_Track *itdb_track_id_tree_by_id (GTree *idtree, guint32 id);
+
+/* playlist functions */
+Itdb_Playlist *itdb_playlist_new (const gchar *title, gboolean spl);
+void itdb_playlist_free (Itdb_Playlist *pl);
+void itdb_playlist_add (Itdb_iTunesDB *itdb, Itdb_Playlist *pl, gint32 pos);
+void itdb_playlist_move (Itdb_Playlist *pl, guint32 pos);
+void itdb_playlist_remove (Itdb_Playlist *pl);
+void itdb_playlist_unlink (Itdb_Playlist *pl);
+Itdb_Playlist *itdb_playlist_duplicate (Itdb_Playlist *pl);
+gboolean itdb_playlist_exists (Itdb_iTunesDB *itdb, Itdb_Playlist *pl);
+void itdb_playlist_add_track (Itdb_Playlist *pl,
+			      Itdb_Track *track, gint32 pos);
+Itdb_Playlist *itdb_playlist_by_id (Itdb_iTunesDB *itdb, guint64 id);
+Itdb_Playlist *itdb_playlist_by_nr (Itdb_iTunesDB *itdb, guint32 num);
+Itdb_Playlist *itdb_playlist_by_name (Itdb_iTunesDB *itdb, gchar *name);
+gboolean itdb_playlist_contains_track (Itdb_Playlist *pl, Itdb_Track *track);
+guint32 itdb_playlist_contain_track_number (Itdb_Track *tr);
+void itdb_playlist_remove_track (Itdb_Playlist *pl, Itdb_Track *track);
+guint32 itdb_playlist_tracks_number (Itdb_Playlist *pl);
+void itdb_playlist_randomize (Itdb_Playlist *pl);
+
+/* playlist functions for master playlist */
+Itdb_Playlist *itdb_playlist_mpl (Itdb_iTunesDB *itdb);
+gboolean itdb_playlist_is_mpl (Itdb_Playlist *pl);
+void itdb_playlist_set_mpl (Itdb_Playlist *pl);
+
+/* playlist functions for podcasts playlist */
+Itdb_Playlist *itdb_playlist_podcasts (Itdb_iTunesDB *itdb);
+gboolean itdb_playlist_is_podcasts (Itdb_Playlist *pl);
+void itdb_playlist_set_podcasts (Itdb_Playlist *pl);
+
+/* smart playlist functions */
+ItdbSPLFieldType itdb_splr_get_field_type (const Itdb_SPLRule *splr);
+ItdbSPLActionType itdb_splr_get_action_type (const Itdb_SPLRule *splr);
+void itdb_splr_validate (Itdb_SPLRule *splr);
+void itdb_splr_remove (Itdb_Playlist *pl, Itdb_SPLRule *splr);
+Itdb_SPLRule *itdb_splr_new (void);
+void itdb_splr_add (Itdb_Playlist *pl, Itdb_SPLRule *splr, gint pos);
+Itdb_SPLRule *itdb_splr_add_new (Itdb_Playlist *pl, gint pos);
+void itdb_spl_copy_rules (Itdb_Playlist *dest, Itdb_Playlist *src);
+gboolean itdb_splr_eval (Itdb_SPLRule *splr, Itdb_Track *track);
+void itdb_spl_update (Itdb_Playlist *spl);
+void itdb_spl_update_all (Itdb_iTunesDB *itdb);
+void itdb_spl_update_live (Itdb_iTunesDB *itdb);
+
+/* thumbnails functions for coverart */
+/* itdb_track_... */
+gboolean itdb_track_set_thumbnails (Itdb_Track *track,
+				    const gchar *filename);
+gboolean itdb_track_set_thumbnails_from_data (Itdb_Track *track,
+					      const guchar *image_data,
+					      gsize image_data_len);
+gboolean itdb_track_set_thumbnails_from_pixbuf (Itdb_Track *track,
+                                                gpointer pixbuf);
+gboolean itdb_track_has_thumbnails (Itdb_Track *track);
+void itdb_track_remove_thumbnails (Itdb_Track *track);
+gpointer itdb_track_get_thumbnail (Itdb_Track *track, gint width, gint height);
+
+/* photoalbum functions -- see itdb_photoalbum.c for instructions on
+ * how to use. */
+Itdb_PhotoDB *itdb_photodb_parse (const gchar *mp, GError **error);
+Itdb_Artwork *itdb_photodb_add_photo (Itdb_PhotoDB *db, const gchar *filename,
+				      gint position, gint rotation,
+				      GError **error);
+Itdb_Artwork *itdb_photodb_add_photo_from_data (Itdb_PhotoDB *db,
+						const guchar *image_data,
+						gsize image_data_len,
+						gint position,
+						gint rotation,
+						GError **error);
+Itdb_Artwork *itdb_photodb_add_photo_from_pixbuf (Itdb_PhotoDB *db,
+						  gpointer pixbuf,
+						  gint position,
+						  gint rotation,
+						  GError **error);
+void itdb_photodb_photoalbum_add_photo (Itdb_PhotoDB *db,
+					Itdb_PhotoAlbum *album,
+					Itdb_Artwork *photo,
+					gint position);
+Itdb_PhotoAlbum *itdb_photodb_photoalbum_create (Itdb_PhotoDB *db,
+						 const gchar *albumname,
+						 gint pos);
+Itdb_PhotoDB *itdb_photodb_create (const gchar *mountpoint);
+void itdb_photodb_free (Itdb_PhotoDB *photodb);
+gboolean itdb_photodb_write (Itdb_PhotoDB *photodb, GError **error);
+void itdb_photodb_remove_photo (Itdb_PhotoDB *db,
+				Itdb_PhotoAlbum *album,
+				Itdb_Artwork *photo);
+void itdb_photodb_photoalbum_remove (Itdb_PhotoDB *db,
+				     Itdb_PhotoAlbum *album,
+				     gboolean remove_pics);
+Itdb_PhotoAlbum *itdb_photodb_photoalbum_by_name(Itdb_PhotoDB *db,
+						 const gchar *albumname );
+
+/* itdb_artwork_... -- you probably won't need many of these (with
+ * the exception of itdb_artwork_get_pixbuf() probably). Use the
+ * itdb_photodb_...() functions when adding photos, and the
+ * itdb_track_...() functions when adding coverart to audio. */
+Itdb_Artwork *itdb_artwork_new (void);
+Itdb_Artwork *itdb_artwork_duplicate (Itdb_Artwork *artwork);
+void itdb_artwork_free (Itdb_Artwork *artwork);
+gboolean itdb_artwork_set_thumbnail (Itdb_Artwork *artwork,
+				     const gchar *filename,
+				     gint rotation, GError **error);
+gboolean itdb_artwork_set_thumbnail_from_data (Itdb_Artwork *artwork,
+					       const guchar *image_data,
+					       gsize image_data_len,
+					       gint rotation, GError **error);
+gboolean itdb_artwork_set_thumbnail_from_pixbuf (Itdb_Artwork *artwork,
+                                                 gpointer pixbuf,
+                                                 gint rotation,
+                                                 GError **error);
+void itdb_artwork_remove_thumbnails (Itdb_Artwork *artwork);
+/* the following function returns a pointer to a GdkPixbuf if
+   gdk-pixbuf is installed -- a NULL pointer otherwise. */
+gpointer itdb_artwork_get_pixbuf (Itdb_Device *device, Itdb_Artwork *artwork,
+                                  gint width, gint height);
+
+/* itdb_thumb_... */
+Itdb_Thumb *itdb_thumb_duplicate (Itdb_Thumb *thumb);
+gpointer itdb_thumb_to_pixbuf_at_size (Itdb_Device *device, Itdb_Thumb *thumb,
+                                       gint width, gint height);
+GList *itdb_thumb_to_pixbufs (Itdb_Device *device, Itdb_Thumb *thumb);
+void itdb_thumb_free (Itdb_Thumb *thumb);
+
+/* itdb_chapterdata_... */
+Itdb_Chapterdata *itdb_chapterdata_new (void);
+void itdb_chapterdata_free (Itdb_Chapterdata *chapterdata);
+Itdb_Chapterdata *itdb_chapterdata_duplicate (Itdb_Chapterdata *chapterdata);
+void itdb_chapterdata_remove_chapter (Itdb_Chapterdata *chapterdata, Itdb_Chapter *chapter);
+void itdb_chapterdata_remove_chapters (Itdb_Chapterdata *chapterdata);
+Itdb_Chapter *itdb_chapter_new (void);
+void itdb_chapter_free (Itdb_Chapter *chapter);
+Itdb_Chapter *itdb_chapter_duplicate (Itdb_Chapter *chapter);
+gboolean itdb_chapterdata_add_chapter (Itdb_Chapterdata *chapterdata,
+				       gint32 startpos,
+				       gchar *chaptertitle);
+
+#ifndef LIBGPOD_DISABLE_DEPRECATED
+/* time functions */
+time_t itdb_time_get_mac_time (void);
+time_t itdb_time_mac_to_host (time_t time);
+time_t itdb_time_host_to_mac (time_t time);
+#endif
+
+/* Initialize a blank ipod */
+gboolean itdb_init_ipod (const gchar *mountpoint,
+			 const gchar *model_number,
+			 const gchar *ipod_name,
+			 GError **error);
+
+G_END_DECLS
+
+#endif

Added: libgpod/trunk/libgpod/branches/upstream/current/src/itdb_artwork.c
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/itdb_artwork.c	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/itdb_artwork.c	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,923 @@
+/*
+|  Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
+|  Part of the gtkpod project.
+|
+|  URL: http://www.gtkpod.org/
+|  URL: http://gtkpod.sourceforge.net/
+|
+|  The code contained in this file is free software; you can redistribute
+|  it and/or modify it under the terms of the GNU Lesser General Public
+|  License as published by the Free Software Foundation; either version
+|  2.1 of the License, or (at your option) any later version.
+|
+|  This file 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
+|  Lesser General Public License for more details.
+|
+|  You should have received a copy of the GNU Lesser General Public
+|  License along with this code; if not, write to the Free Software
+|  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+|
+|  iTunes and iPod are trademarks of Apple
+|
+|  This product is not supported/written/published by Apple!
+|
+|  $Id: itdb_artwork.c 2159 2008-12-08 01:16:58Z tmzullinger $
+*/
+
+#include <config.h>
+
+#include "itdb_device.h"
+#include "itdb_private.h"
+#include "itdb_thumb.h"
+#include "db-image-parser.h"
+#include "itdb_endianness.h"
+#include <errno.h>
+#include <stdio.h>
+#include <string.h>
+#if HAVE_GDKPIXBUF
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#endif
+#include <glib/gi18n-lib.h>
+#include <glib/gstdio.h>
+#include <stdlib.h>
+
+/**
+ * itdb_artwork_new:
+ *
+ * Creates a new #Itdb_Artwork
+ *
+ * Returns: a new #Itdb_Artwork to be freed with itdb_artwork_free() when
+ * no longer needed
+ *
+ * Since: 0.3.0
+ */
+Itdb_Artwork *itdb_artwork_new (void)
+{
+    Itdb_Artwork *artwork = g_new0 (Itdb_Artwork, 1);
+    return artwork;
+}
+
+/**
+ * itdb_artwork_free:
+ * @artwork: an #Itdb_Artwork
+ *
+ * Frees memory used by @artwork
+ *
+ * Since: 0.3.0
+ */
+void itdb_artwork_free (Itdb_Artwork *artwork)
+{
+    g_return_if_fail (artwork);
+    itdb_artwork_remove_thumbnails (artwork);
+    if (artwork->userdata && artwork->userdata_destroy)
+	(*artwork->userdata_destroy) (artwork->userdata);
+    g_free (artwork);
+}
+
+/**
+ * itdb_artwork_duplicate:
+ * @artwork: an #Itdb_Artwork
+ *
+ * Duplicates @artwork
+ *
+ * Returns: a new copy of @artwork
+ *
+ * Since: 0.3.0
+ */
+Itdb_Artwork *itdb_artwork_duplicate (Itdb_Artwork *artwork)
+{
+    Itdb_Artwork *dup;
+    g_return_val_if_fail (artwork, NULL);
+
+    dup = g_new0 (Itdb_Artwork, 1);
+
+    memcpy (dup, artwork, sizeof (Itdb_Artwork));
+
+    if (artwork->thumbnail != NULL) {
+        dup->thumbnail = itdb_thumb_duplicate (artwork->thumbnail);
+    }
+
+    return dup;
+}
+
+/**
+ * itdb_artwork_remove_thumbnails:
+ * @artwork: an #Itdb_Artwork
+ *
+ * Removes all thumbnails from @artwork
+ *
+ * Since: 0.3.0
+ */
+void
+itdb_artwork_remove_thumbnails (Itdb_Artwork *artwork)
+{
+    g_return_if_fail (artwork);
+
+    if (artwork->thumbnail != NULL) {
+        itdb_thumb_free (artwork->thumbnail);
+    }
+    artwork->thumbnail = NULL;
+    artwork->artwork_size = 0;
+    artwork->id = 0;
+}
+
+/**
+ * itdb_artwork_set_thumbnail
+ * @artwork:    an #Itdb_Artwork
+ * @filename:   image file to use to create the thumbnail
+ * @rotation:   angle by which the image should be rotated
+ *              counterclockwise. Valid values are 0, 90, 180 and 270.
+ * @error:      return location for a #GError or NULL
+ *
+ * Appends a thumbnail of type @type to existing thumbnails in @artwork. No
+ * data is read from @filename yet, the file will be when @artwork is saved to
+ * disk. @filename must still exist when that happens.
+ *
+ * For the rotation angle you can also use the gdk constants
+ * %GDK_PIXBUF_ROTATE_NONE, %GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE,
+ * %GDK_PIXBUF_ROTATE_UPSIDEDOWN, AND %GDK_PIXBUF_ROTATE_CLOCKWISE.
+ *
+ * Returns: TRUE if the thumbnail could be successfully added, FALSE
+ * otherwise. @error is set appropriately.
+ *
+ * Since: 0.7.0
+ */
+gboolean
+itdb_artwork_set_thumbnail (Itdb_Artwork *artwork,
+			    const gchar *filename,
+			    gint rotation,
+			    GError **error)
+{
+#ifdef HAVE_GDKPIXBUF
+/* This operation doesn't make sense when we can't save thumbnail files */
+    struct stat statbuf;
+    Itdb_Thumb *thumb;
+
+    g_return_val_if_fail (artwork, FALSE);
+    g_return_val_if_fail (filename, FALSE);
+
+    if (g_stat  (filename, &statbuf) != 0) {
+	g_set_error (error, 0, -1,
+		     _("Could not access file '%s'."),
+		     filename);
+	return FALSE;
+    }
+
+    artwork->artwork_size  = statbuf.st_size;
+    artwork->creation_date = statbuf.st_mtime;
+
+    thumb = itdb_thumb_new_from_file (filename);
+    itdb_thumb_set_rotation (thumb, rotation);
+    if (artwork->thumbnail != NULL) {
+        itdb_thumb_free (artwork->thumbnail);
+    }
+    artwork->thumbnail = thumb;
+
+    return TRUE;
+#else
+    g_set_error (error, 0, -1,
+		 _("Artwork support not compiled into libgpod."));
+    return FALSE;
+#endif
+}
+
+/**
+ * itdb_artwork_set_thumbnail_from_pixbuf
+ * @artwork:    an #Itdb_Artwork
+ * @pixbuf:     #GdkPixbuf to use to create the thumbnail
+ * @rotation:   angle by which the image should be rotated
+ *              counterclockwise. Valid values are 0, 90, 180 and 270.
+ * @error:      return location for a #GError or NULL
+ *
+ * Set a thumbnail in @artwork. No data is generated from @pixbuf yet, it will
+ * be done when @artwork is saved to disk. @pixbuf is ref'ed by this function,
+ * but is not copied, so it should not be modified before the database is saved.
+ *
+ * For the rotation angle you can also use the gdk constants
+ * %GDK_PIXBUF_ROTATE_NONE, %GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE,
+ * %GDK_PIXBUF_ROTATE_UPSIDEDOWN, AND %GDK_PIXBUF_ROTATE_CLOCKWISE.
+ *
+ * Returns: TRUE if the thumbnail could be successfully added, FALSE
+ * otherwise. @error is set appropriately.
+ *
+ * Since: 0.7.0
+ */
+gboolean
+itdb_artwork_set_thumbnail_from_pixbuf (Itdb_Artwork *artwork,
+                                        gpointer pixbuf,
+                                        gint rotation,
+                                        GError **error)
+{
+#ifdef HAVE_GDKPIXBUF
+/* This operation doesn't make sense when we can't save thumbnail files */
+    Itdb_Thumb *thumb;
+    GTimeVal time;
+    gint rowstride;
+    gint height;
+
+    g_return_val_if_fail (artwork, FALSE);
+    g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), FALSE);
+
+    g_get_current_time (&time);
+    g_object_get (G_OBJECT (pixbuf),
+                  "height", &height,
+                  "rowstride", &rowstride,
+                  NULL);
+    artwork->artwork_size  = rowstride * height;
+    artwork->creation_date = time.tv_sec;
+
+    thumb = itdb_thumb_new_from_pixbuf (pixbuf);
+    itdb_thumb_set_rotation (thumb, rotation);
+    if (artwork->thumbnail != NULL) {
+        itdb_thumb_free (artwork->thumbnail);
+    }
+    artwork->thumbnail = thumb;
+
+    return TRUE;
+#else
+    g_set_error (error, 0, -1,
+		 _("Artwork support not compiled into libgpod."));
+    return FALSE;
+#endif
+}
+
+/**
+ * itdb_artwork_set_thumbnail_from_data
+ * @artwork:        an #Itdb_Artwork
+ * @image_data:     data used to create the thumbnail (the raw contents of
+ *                  an image file)
+ * @image_data_len: length of above data block
+ * @rotation:       angle by which the image should be rotated
+ *                  counterclockwise. Valid values are 0, 90, 180 and 270.
+ * @error:          return location for a #GError or NULL
+ *
+ * Set a thumbnail in @artwork. No data is processed yet. This will be done when
+ * @artwork is saved to disk.
+ *
+ * For the rotation angle you can also use the gdk constants
+ * %GDK_PIXBUF_ROTATE_NONE, %GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE,
+ * %GDK_PIXBUF_ROTATE_UPSIDEDOWN, AND %GDK_PIXBUF_ROTATE_CLOCKWISE.
+ *
+ * Returns: TRUE if the thumbnail could be successfully added, FALSE
+ * otherwise. @error is set appropriately.
+ *
+ * Since: 0.7.0
+ */
+gboolean
+itdb_artwork_set_thumbnail_from_data (Itdb_Artwork *artwork,
+				      const guchar *image_data,
+				      gsize image_data_len,
+				      gint rotation,
+				      GError **error)
+{
+#ifdef HAVE_GDKPIXBUF
+/* This operation doesn't make sense when we can't save thumbnail files */
+    Itdb_Thumb *thumb;
+    GTimeVal time;
+
+    g_return_val_if_fail (artwork, FALSE);
+    g_return_val_if_fail (image_data, FALSE);
+
+    g_get_current_time (&time);
+
+    artwork->artwork_size  = image_data_len;
+    artwork->creation_date = time.tv_sec;
+
+    thumb = itdb_thumb_new_from_data (image_data, image_data_len);
+    itdb_thumb_set_rotation (thumb, rotation);
+    if (artwork->thumbnail != NULL) {
+        itdb_thumb_free (artwork->thumbnail);
+    }
+    artwork->thumbnail = thumb;
+
+    return TRUE;
+#else
+    g_set_error (error, 0, -1,
+		 _("Artwork support not compiled into libgpod."));
+    return FALSE;
+#endif
+}
+
+#if HAVE_GDKPIXBUF
+static guchar *
+unpack_RGB_565 (guint16 *pixels, guint bytes_len, guint byte_order)
+{
+	guchar *result;
+	guint i;
+
+	g_return_val_if_fail (bytes_len < 2*(G_MAXUINT/3), NULL);
+
+	result = g_malloc ((bytes_len/2) * 3);
+
+	for (i = 0; i < bytes_len/2; i++) {
+		guint16 cur_pixel;
+		/* FIXME: endianness */
+		cur_pixel = get_gint16 (pixels[i], byte_order);
+		/* Unpack pixels */
+		result[3*i] = (cur_pixel & RED_MASK_565) >> RED_SHIFT_565;
+		result[3*i+1] = (cur_pixel & GREEN_MASK_565) >> GREEN_SHIFT_565;
+		result[3*i+2] = (cur_pixel & BLUE_MASK_565) >> BLUE_SHIFT_565;
+
+		/* Normalize color values so that they use a [0..255] range */
+		result[3*i] <<= (8 - RED_BITS_565);
+		result[3*i+1] <<= (8 - GREEN_BITS_565);
+		result[3*i+2] <<= (8 - BLUE_BITS_565);
+	}
+
+	return result;
+}
+
+static guchar *
+unpack_RGB_555 (guint16 *pixels, guint bytes_len, guint byte_order)
+{
+	guchar *result;
+	guint i;
+
+	g_return_val_if_fail (bytes_len < 2*(G_MAXUINT/3), NULL);
+
+	result = g_malloc ((bytes_len/2) * 3);
+
+	for (i = 0; i < bytes_len/2; i++) {
+		guint16 cur_pixel;
+		/* FIXME: endianness */
+		cur_pixel = get_gint16 (pixels[i], byte_order);
+		/* Unpack pixels */
+		result[3*i] = (cur_pixel & RED_MASK_555) >> RED_SHIFT_555;
+		result[3*i+1] = (cur_pixel & GREEN_MASK_555) >> GREEN_SHIFT_555;
+		result[3*i+2] = (cur_pixel & BLUE_MASK_555) >> BLUE_SHIFT_555;
+
+		/* Normalize color values so that they use a [0..255] range */
+		result[3*i] <<= (8 - RED_BITS_555);
+		result[3*i+1] <<= (8 - GREEN_BITS_555);
+		result[3*i+2] <<= (8 - BLUE_BITS_555);
+	}
+
+	return result;
+}
+
+static guchar *
+unpack_RGB_888 (guint16 *pixels, guint bytes_len, guint byte_order)
+{
+	guchar *result;
+	guint i;
+	guint32 *pixels32;
+
+	result = g_malloc ((bytes_len/4) * 3);
+
+	pixels32 = (guint32 *)pixels;
+
+	for (i = 0; i < bytes_len/4; i++) {
+		guint32 cur_pixel;
+		/* FIXME: endianness */
+		cur_pixel = get_gint32 (pixels32[i], byte_order);
+		/* Unpack pixels */
+		result[3*i] = (cur_pixel & RED_MASK_888) >> RED_SHIFT_888;
+		result[3*i+1] = (cur_pixel & GREEN_MASK_888) >> GREEN_SHIFT_888;
+		result[3*i+2] = (cur_pixel & BLUE_MASK_888) >> BLUE_SHIFT_888;
+
+		/* Normalize color values so that they use a [0..255] range */
+		/* (not necessary for 888 encoding) */
+/* 		result[3*i] <<= (8 - RED_BITS_888); */
+/* 		result[3*i+1] <<= (8 - GREEN_BITS_888); */
+/* 		result[3*i+2] <<= (8 - BLUE_BITS_888); */
+	}
+
+	return result;
+}
+
+
+static guint16 *rearrange_pixels (guint16 *pixels_s, guint16 *pixels_d,
+				  gint width, gint height, gint row_stride)
+{
+    g_return_val_if_fail (width == height, pixels_d);
+
+    if (pixels_d == NULL)
+    {
+	pixels_d = g_malloc0 (sizeof (guint16)*width*height);
+    }
+
+    if (width == 1)
+    {
+	*pixels_d = *pixels_s;
+    }
+    else
+    {
+	rearrange_pixels (pixels_s + 0,
+			  pixels_d + 0 + 0,
+			  width/2, height/2,
+			  row_stride);
+	rearrange_pixels (pixels_s + (width/2)*(height/2),
+			  pixels_d + (height/2)*row_stride + 0,
+			  width/2, height/2,
+			  row_stride);
+	rearrange_pixels (pixels_s + 2*(width/2)*(height/2),
+			  pixels_d + width/2,
+			  width/2, height/2,
+			  row_stride);
+	rearrange_pixels (pixels_s + 3*(width/2)*(height/2),
+			  pixels_d + (height/2)*row_stride + width/2,
+			  width/2, height/2,
+			  row_stride);
+    }
+
+    return pixels_d;
+}
+
+
+static guchar *
+unpack_rec_RGB_555 (guint16 *pixels, guint bytes_len, guint byte_order,
+		    gint width, gint height)
+{
+	guchar *result;
+	guint16 *use_pixels;
+	gboolean free_use_pixels = FALSE;
+	guint16 *pixels_arranged;
+
+	guint i;
+
+	g_return_val_if_fail (bytes_len < 2*(G_MAXUINT/3), NULL);
+	g_return_val_if_fail (2*width*height < G_MAXUINT, NULL);
+	g_return_val_if_fail (width==height, NULL);
+
+	if (2*width*height > bytes_len)
+	{
+	    use_pixels = g_malloc0 (2*width*height);
+	    g_memmove (use_pixels, pixels, bytes_len);
+	    free_use_pixels = TRUE;
+	}
+	else
+	{
+	    use_pixels = pixels;
+	}
+
+	pixels_arranged = rearrange_pixels (use_pixels, NULL,
+					    width, height, width);
+
+	if (pixels_arranged == NULL)
+	{
+	    return NULL;
+	}
+
+	result = g_malloc ((bytes_len/2) * 3);
+
+	for (i = 0; i < bytes_len/2; i++) {
+		guint16 cur_pixel;
+		/* FIXME: endianness */
+		cur_pixel = get_gint16 (pixels_arranged[i], byte_order);
+		/* Unpack pixels */
+		result[3*i] = (cur_pixel & RED_MASK_555) >> RED_SHIFT_555;
+		result[3*i+1] = (cur_pixel & GREEN_MASK_555) >> GREEN_SHIFT_555;
+		result[3*i+2] = (cur_pixel & BLUE_MASK_555) >> BLUE_SHIFT_555;
+
+		/* Normalize color values so that they use a [0..255] range */
+		result[3*i] <<= (8 - RED_BITS_555);
+		result[3*i+1] <<= (8 - GREEN_BITS_555);
+		result[3*i+2] <<= (8 - BLUE_BITS_555);
+	}
+
+	g_free (pixels_arranged);
+	if (free_use_pixels)
+	{
+	    g_free (use_pixels);
+	}
+
+	return result;
+}
+
+
+#if DEBUG_ARTWORK
+static guchar *
+unpack_experimental (guint16 *pixels, guint bytes_len, guint byte_order,
+		     gint width, gint height)
+{
+	guchar *result;
+	guint i;
+	guint32 *rpixels;
+
+	g_return_val_if_fail (bytes_len < (G_MAXUINT/3), NULL);
+
+	result = g_malloc ((bytes_len/4) * 3);
+
+	rpixels = (guint32 *)pixels;
+
+	for (i = 0; i < bytes_len/4; i++) {
+		guint32 cur_pixel;
+		/* FIXME: endianness */
+		cur_pixel = get_gint32 (rpixels[i], byte_order);
+printf ("%8x\n", cur_pixel);
+		/* Unpack pixels */
+		result[3*i] = (cur_pixel & RED_MASK_888) >> RED_SHIFT_888;
+		result[3*i+1] = (cur_pixel & GREEN_MASK_888) >> GREEN_SHIFT_888;
+		result[3*i+2] = (cur_pixel & BLUE_MASK_888) >> BLUE_SHIFT_888;
+
+		/* Normalize color values so that they use a [0..255] range */
+		/* (not really necessary for 888 encoding) */
+/* 		result[3*i] <<= (8 - RED_BITS_888); */
+/* 		result[3*i+1] <<= (8 - GREEN_BITS_888); */
+/* 		result[3*i+2] <<= (8 - BLUE_BITS_888); */
+	}
+
+	return result;
+}
+#endif
+
+
+/* limit8bit() and unpack_UYVY() adapted from imgconvert.c from the
+ * GPixPod project (www.gpixpod.org) */
+static gint limit8bit (float x)
+{
+    if(x >= 255)
+    {
+	return 255;
+    }
+    if(x <= 0)
+    {
+	return 0;
+    }
+    return x;
+}
+
+/* swapping U and V planes this unpacks YV12 */
+static guchar *
+unpack_I420 (guchar *yuvdata, gint bytes_len, guint byte_order,
+		gint width, gint height)
+{
+	gint imgsize = width*3*height;
+	gint yuvdim = width*height;
+	guchar* rgbdata;
+	gint row, col;
+	gint z = 0;
+	gint h = 0;
+	gint y, u, v;
+	gint ustart = yuvdim;
+	gint vstart = yuvdim + yuvdim / 4;
+
+	g_return_val_if_fail (bytes_len < 2*(G_MAXUINT/3), NULL);
+	g_return_val_if_fail (width * height * 2 == bytes_len, NULL);
+
+	rgbdata = g_malloc(imgsize);
+
+	/* FIXME could be faster */
+	while(h < yuvdim){
+		y = yuvdata[h];
+
+		row = h / width;
+		col = h % width;
+
+		u = yuvdata[ustart + (row/2)*(width/2) + col/2];
+		v = yuvdata[vstart + (row/2)*(width/2) + col/2];
+
+		rgbdata[z] = limit8bit((y-16)*1.164 + (v-128)*1.596);
+		rgbdata[z+1] = limit8bit((y-16)*1.164 - (v-128)*0.813 - (u-128)*0.391);
+		rgbdata[z+2] = limit8bit((y-16)*1.164 + (u-128)*2.018);
+
+		z+=3;
+		h++;
+	}
+	return rgbdata;
+}
+
+static guchar *
+unpack_UYVY (guchar *yuvdata, gint bytes_len, guint byte_order,
+	     gint width, gint height)
+{
+    gint imgsize = width*3*height;
+    guchar* rgbdata;
+    gint halfimgsize = imgsize/2;
+    gint halfyuv = halfimgsize/3*2;
+    gint x = 0;
+    gint z = 0;
+    gint z2 = 0;
+    gint u0, y0, v0, y1, u1, y2, v1, y3;
+    gint h = 0;
+
+    g_return_val_if_fail (bytes_len < 2*(G_MAXUINT/3), NULL);
+/*     printf ("w=%d h=%d s=%d\n", width, height, bytes_len); */
+    g_return_val_if_fail (width * height * 2 == bytes_len, NULL);
+
+    rgbdata =  g_malloc(imgsize);
+
+    while(h < height)
+    {
+	gint w = 0;
+	if((h % 2) == 0)
+	{
+	    while(w < width)
+	    {
+		u0 = yuvdata[z];
+		y0 = yuvdata[z+1];
+		v0 = yuvdata[z+2];
+		y1 = yuvdata[z+3];
+		rgbdata[x] = limit8bit((y0-16)*1.164 + (v0-128)*1.596);/*R0*/
+		rgbdata[x+1] = limit8bit((y0-16)*1.164 - (v0-128)*0.813 - (u0-128)*0.391);/*G0*/
+		rgbdata[x+2] = limit8bit((y0-16)*1.164 + (u0-128)*2.018);/*B0*/
+		rgbdata[x+3] = limit8bit((y0-16)*1.164 + (v0-128)*1.596);/*R1*/
+		rgbdata[x+4] = limit8bit((y1-16)*1.164 - (v0-128)*0.813 - (u0-128)*0.391);/*G1*/
+		rgbdata[x+5] = limit8bit((y1-16)*1.164 + (u0-128)*2.018);/*B1*/
+		w += 2;
+		z += 4;
+		x += 6;
+	    }
+	}
+	else
+	{
+	    while(w < width)
+	    {
+		u1 = yuvdata[halfyuv+z2];
+		y2 = yuvdata[halfyuv+z2+1];
+		v1 = yuvdata[halfyuv+z2+2];
+		y3 = yuvdata[halfyuv+z2+3];
+		rgbdata[x] = limit8bit((y2-16)*1.164 + (v1-128)*1.596);
+		rgbdata[x+1] = limit8bit((y2-16)*1.164 - (v1-128)*0.813 - (u1-128)*0.391);
+		rgbdata[x+2] = limit8bit((y2-16)*1.164 + (u1-128)*2.018);
+		rgbdata[x+3] = limit8bit((y2-16)*1.164 + (v1-128)*1.596);
+		rgbdata[x+4] = limit8bit((y3-16)*1.164 - (v1-128)*0.813 - (u1-128)*0.391);
+		rgbdata[x+5] = limit8bit((y3-16)*1.164 + (u1-128)*2.018);
+		w += 2;
+		z2 += 4;
+		x += 6;
+	    }
+	}
+	h++;
+    }
+    return rgbdata;
+}
+
+static guchar *
+get_pixel_data (Itdb_Device *device, Itdb_Thumb_Ipod_Item *thumb)
+{
+	gchar *filename = NULL;
+	guchar *result = NULL;
+	FILE *f = NULL;
+	gint res;
+
+	g_return_val_if_fail (thumb, NULL);
+	g_return_val_if_fail (thumb->filename, NULL);
+
+	/* thumb->size is read as a guint32 from the iPod, so no overflow
+	 * can occur here
+	 */
+	result = g_malloc (thumb->size);
+
+	filename = itdb_thumb_ipod_get_filename (device, thumb);
+
+	if (!filename)
+	{
+	    g_print (_("Could not find on iPod: '%s'\n"),
+		     thumb->filename);
+	    goto error;
+	}
+
+	f = fopen (filename, "r");
+	if (f == NULL) {
+		g_print ("Failed to open %s: %s\n",
+			 filename, strerror (errno));
+		goto error;
+	}
+
+	res = fseek (f, thumb->offset, SEEK_SET);
+	if (res != 0) {
+		g_print ("Seek to %d failed on %s: %s\n",
+			 thumb->offset, thumb->filename, strerror (errno));
+		goto error;
+	}
+
+	res = fread (result, thumb->size, 1, f);
+	if (res != 1) {
+		g_print ("Failed to read %u bytes from %s: %s\n",
+			 thumb->size, thumb->filename, strerror (errno));
+		goto error;
+	}
+
+	goto cleanup;
+
+  error:
+	g_free (result);
+	result = NULL;
+  cleanup:
+	if (f != NULL) {
+		fclose (f);
+	}
+	g_free (filename);
+
+	return result;
+}
+
+static guchar *
+itdb_thumb_get_rgb_data (Itdb_Device *device, Itdb_Thumb_Ipod_Item *item)
+{
+#if 0
+    #include <unistd.h>
+    #include <fcntl.h>
+    static gint i=0;
+    int fd;
+    gchar *name;
+#endif
+	void *pixels_raw;
+	guchar *pixels=NULL;
+
+	g_return_val_if_fail (device, NULL);
+	g_return_val_if_fail (item, NULL);
+	g_return_val_if_fail (item->size != 0, NULL);
+
+        if (item->format == NULL) {
+            return NULL;
+        }
+
+	pixels_raw = get_pixel_data (device, item);
+
+#if 0
+    name = g_strdup_printf ("thumb_%03d.raw", i++);
+    fd = creat (name, S_IRWXU|S_IRWXG|S_IRWXO);
+    write (fd, pixels_raw, thumb->size);
+    close (fd);
+    g_free (name);
+#endif
+	if (pixels_raw == NULL) {
+		return NULL;
+	}
+
+	switch (item->format->format)
+	{
+	case THUMB_FORMAT_RGB565_LE_90:
+	case THUMB_FORMAT_RGB565_BE_90:
+	    /* FIXME: actually the previous two might require
+	       different treatment (used on iPod Photo for the full
+	       screen photo thumbnail) */
+	case THUMB_FORMAT_RGB565_LE:
+	case THUMB_FORMAT_RGB565_BE:
+	    pixels = unpack_RGB_565 (pixels_raw, item->size,
+				     itdb_thumb_get_byteorder (item->format->format));
+	    break;
+	case THUMB_FORMAT_RGB555_LE_90:
+	case THUMB_FORMAT_RGB555_BE_90:
+	    /* FIXME: actually the previous two might require
+	       different treatment (used on iPod Photo for the full
+	       screen photo thumbnail) */
+	case THUMB_FORMAT_RGB555_LE:
+	case THUMB_FORMAT_RGB555_BE:
+	    pixels = unpack_RGB_555 (pixels_raw, item->size,
+				     itdb_thumb_get_byteorder (item->format->format));
+	    break;
+	case THUMB_FORMAT_RGB888_LE_90:
+	case THUMB_FORMAT_RGB888_BE_90:
+	    /* FIXME: actually the previous two might require
+	       different treatment */
+	case THUMB_FORMAT_RGB888_LE:
+	case THUMB_FORMAT_RGB888_BE:
+	    pixels = unpack_RGB_888 (pixels_raw, item->size,
+				     itdb_thumb_get_byteorder (item->format->format));
+	    break;
+	case THUMB_FORMAT_REC_RGB555_LE_90:
+	case THUMB_FORMAT_REC_RGB555_BE_90:
+	    /* FIXME: actually the previous two might require
+	       different treatment (used on iPod Photo for the full
+	       screen photo thumbnail) */
+	case THUMB_FORMAT_REC_RGB555_LE:
+	case THUMB_FORMAT_REC_RGB555_BE:
+	    pixels = unpack_rec_RGB_555 (pixels_raw, item->size,
+					 itdb_thumb_get_byteorder (item->format->format),
+					 item->format->width, item->format->height);
+	    break;
+	case THUMB_FORMAT_EXPERIMENTAL_LE:
+	case THUMB_FORMAT_EXPERIMENTAL_BE:
+#if DEBUG_ARTWORK
+	    pixels = unpack_experimental (pixels_raw, item->size,
+					  itdb_thumb_get_byteorder (item->format->format),
+					  item->format->width, item->format->height);
+	    break;
+#endif
+	case THUMB_FORMAT_UYVY_LE:
+	case THUMB_FORMAT_UYVY_BE:
+	    pixels = unpack_UYVY (pixels_raw, item->size,
+				  itdb_thumb_get_byteorder (item->format->format),
+				  item->format->width, item->format->height);
+	    break;
+	case THUMB_FORMAT_I420_LE:
+	case THUMB_FORMAT_I420_BE:
+	    pixels = unpack_I420 (pixels_raw, item->size,
+				  itdb_thumb_get_byteorder (item->format->format),
+				  item->format->width, item->format->height);
+	    break;
+	}
+	g_free (pixels_raw);
+
+	return pixels;
+
+}
+
+gpointer itdb_thumb_ipod_item_to_pixbuf (Itdb_Device *device,
+                                         Itdb_Thumb_Ipod_Item *item)
+{
+	/* pixbuf is already on the iPod -> read from there */
+	GdkPixbuf *pixbuf_full;
+	GdkPixbuf *pixbuf_sub;
+        GdkPixbuf *pixbuf;
+	gint pad_x = item->horizontal_padding;
+	gint pad_y = item->vertical_padding;
+	gint width = item->width;
+	gint height = item->height;
+        const Itdb_ArtworkFormat *img_info = item->format;
+        guchar *pixels;
+
+/*	printf ("hp%d vp%d w%d h%d\n",
+	       pad_x, pad_y, width, height);*/
+        if (item->format == NULL) {
+	    g_warning (_("Unable to retrieve thumbnail (appears to be on iPod, but no image info available): filename: '%s'\n"),
+		       item->filename);
+            return NULL;
+        }
+	pixels = itdb_thumb_get_rgb_data (device, item);
+	if (pixels == NULL)
+	{
+	    return NULL;
+	}
+
+	pixbuf_full =
+	    gdk_pixbuf_new_from_data (pixels,
+				      GDK_COLORSPACE_RGB,
+				      FALSE, 8,
+				      img_info->width, img_info->height,
+				      img_info->width*3,
+				      (GdkPixbufDestroyNotify)g_free,
+				      NULL);
+
+	/* !! do not g_free(pixels) here: it will be freed when doing a
+	 * gdk_pixbuf_unref() on the GdkPixbuf !! */
+
+	/* Remove padding from the pixmap and/or cut the pixmap to the
+	   right size. */
+
+	/* Negative offsets indicate that part of the image was cut
+	   off at the left/top. thumb->width/height include that part
+	   of the image. Positive offsets indicate that part of the
+	   thumbnail are padded in black. thumb->width/height also
+	   include that part of the image -> reduce width and height
+	   by the absolute value of the padding */
+	width = width - abs (pad_x);
+	height = height - abs (pad_y);
+	/* And throw out "negative" padding */
+	if (pad_x < 0)		pad_x = 0;
+	if (pad_y < 0)		pad_y = 0;
+	/* Width/height might still be larger than
+	   img_info->width/height, indicating that part of the image
+	   was cut off at the right/bottom (similar to negative
+	   padding above). Adjust width/height accordingly. */
+	if (pad_x + width > img_info->width)
+	    width = img_info->width - pad_x;
+	if (pad_y + height > img_info->height)
+	    height = img_info->height - pad_y;
+
+#if DEBUG_ARTWORK
+ 	printf ("px=%2d py=%2d x=%3d y=%3d\n", pad_x, pad_y, width, height);
+#endif
+
+	pixbuf_sub = gdk_pixbuf_new_subpixbuf (pixbuf_full,
+					       pad_x, pad_y,
+					       width, height);
+	pixbuf = gdk_pixbuf_copy (pixbuf_sub);
+	gdk_pixbuf_unref (pixbuf_full);
+	gdk_pixbuf_unref (pixbuf_sub);
+
+        return pixbuf;
+}
+#else
+gpointer itdb_thumb_ipod_item_to_pixbuf (Itdb_Device *device,
+                                         Itdb_Thumb_Ipod_Item *item)
+{
+    return NULL;
+}
+#endif
+
+/**
+ * itdb_artwork_get_pixbuf:
+ * @artwork:    an #Itdb_Artwork
+ * @device:     an #Itdb_Device
+ * @width:      width of the pixbuf to retrieve, -1 for the biggest
+ *              possible size and 0 for the smallest possible size (with no
+ *              scaling)
+ * @height:     height of the pixbuf to retrieve, -1 for the biggest possible
+ *              size and 0 for the smallest possible size (with no scaling)
+ *
+ * Returns a #GdkPixbuf representing the thumbnail stored in @artwork
+ * scaling it if appropriate. If either height or width is -1, then the
+ * biggest unscaled thumbnail available will be returned
+ *
+ * Returns: a #GdkPixbuf that must be unreffed when no longer used, NULL
+ * if no artwork could be found or if libgpod is compiled without GdkPixbuf
+ * support
+ *
+ * Since: 0.7.0
+ */
+gpointer itdb_artwork_get_pixbuf (Itdb_Device *device, Itdb_Artwork *artwork,
+                                  gint width, gint height)
+{
+    g_return_val_if_fail (artwork != NULL, NULL);
+    if (artwork->thumbnail == NULL) {
+        return NULL;
+    }
+    return itdb_thumb_to_pixbuf_at_size (device, artwork->thumbnail,
+                                         width, height);
+}

Added: libgpod/trunk/libgpod/branches/upstream/current/src/itdb_chapterdata.c
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/itdb_chapterdata.c	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/itdb_chapterdata.c	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,250 @@
+/* Time-stamp: <2007-03-21 17:30:57 jcs>
+|
+|  Copyright (C) 2002-2007 Jorg Schuler <jcsjcs at users sourceforge net>
+|  Part of the gtkpod project.
+|
+|  URL: http://www.gtkpod.org/
+|  URL: http://gtkpod.sourceforge.net/
+|
+|  The code contained in this file is free software; you can redistribute
+|  it and/or modify it under the terms of the GNU Lesser General Public
+|  License as published by the Free Software Foundation; either version
+|  2.1 of the License, or (at your option) any later version.
+|
+|  This file 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
+|  Lesser General Public License for more details.
+|
+|  You should have received a copy of the GNU Lesser General Public
+|  License along with this code; if not, write to the Free Software
+|  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+|
+|  iTunes and iPod are trademarks of Apple
+|
+|  This product is not supported/written/published by Apple!
+|
+|  $Id: itdb_chapterdata.c 1612 2007-06-29 16:02:00Z jcsjcs $
+*/
+
+#include <config.h>
+
+#include "itdb_device.h"
+#include "itdb_private.h"
+#include "itdb_endianness.h"
+#include <stdio.h>
+#include <string.h>
+#include <glib/gi18n-lib.h>
+
+/**
+ * itdb_chapterdata_new:
+ *
+ * Creates a new #Itdb_Chapterdata
+ *
+ * Returns: a new #Itdb_Chapterdata to be freed with
+ *               itdb_chapterdata_free() when no longer needed
+ *
+ * Since: 0.7.0
+ */
+Itdb_Chapterdata *itdb_chapterdata_new (void)
+{
+    Itdb_Chapterdata *chapterdata = g_new0 (Itdb_Chapterdata, 1);
+    return chapterdata;
+}
+
+/**
+ * itdb_chapterdata_free:
+ * @chapterdata: an #Itdb_Chapterdata
+ *
+ * Frees memory used by @chapterdata
+ *
+ * Since: 0.7.0
+ */
+void itdb_chapterdata_free (Itdb_Chapterdata *chapterdata)
+{
+    g_return_if_fail (chapterdata);
+    itdb_chapterdata_remove_chapters (chapterdata);
+    g_free (chapterdata);
+}
+
+static GList *dup_chapters (GList *chapters)
+{
+    GList *it;
+    GList *result;
+
+    g_return_val_if_fail (chapters, NULL);
+    result = NULL;
+    for (it = chapters; it != NULL; it = it->next)
+    {
+	Itdb_Chapter *new_chapter;
+	Itdb_Chapter *chapter;
+
+	chapter = (Itdb_Chapter *)(it->data);
+	g_return_val_if_fail (chapter, NULL);
+
+	new_chapter = itdb_chapter_duplicate (chapter);
+
+	result = g_list_prepend (result, new_chapter);
+    }
+
+    return g_list_reverse (result);
+}
+
+/**
+ * itdb_chapterdata_duplicate:
+ * @chapterdata: an #Itdb_Chapterdata
+ *
+ * Duplicates @chapterdata
+ *
+ * Returns: a new copy of @chapterdata
+ *
+ * Since: 0.7.0
+ */
+Itdb_Chapterdata *itdb_chapterdata_duplicate (Itdb_Chapterdata *chapterdata)
+{
+    Itdb_Chapterdata *dup;
+    int numchapters;
+    g_return_val_if_fail (chapterdata, NULL);
+
+    dup = g_new0 (Itdb_Chapterdata, 1);
+
+    memcpy (dup, chapterdata, sizeof (Itdb_Chapterdata));
+
+    numchapters = g_list_length (chapterdata->chapters);
+    if (chapterdata->chapters)
+	dup->chapters = dup_chapters (chapterdata->chapters);
+    else
+	dup->chapters = NULL;
+
+    return dup;
+}
+
+/**
+ * itdb_chapterdata_remove_chapter:
+ * @chapterdata: an #Itdb_Chapterdata
+ * @chapter:     an #Itdb_Chapter
+ *
+ * Removes @chapter from @chapterdata. The memory used by @chapter is freed.
+ *
+ * Since: 0.7.0
+ */
+void
+itdb_chapterdata_remove_chapter (Itdb_Chapterdata *chapterdata, Itdb_Chapter *chapter)
+{
+    g_return_if_fail (chapterdata);
+    g_return_if_fail (chapter);
+
+    chapterdata->chapters = g_list_remove (chapterdata->chapters, chapter);
+    itdb_chapter_free (chapter);
+}
+
+/**
+ * itdb_chapterdata_remove_chapters:
+ * @chapterdata: an #Itdb_Chapterdata
+ *
+ * Removes all chapters from @chapterdata
+ *
+ * Since: 0.7.0
+ */
+void
+itdb_chapterdata_remove_chapters (Itdb_Chapterdata *chapterdata)
+{
+    g_return_if_fail (chapterdata);
+
+    while (chapterdata->chapters)
+    {
+	Itdb_Chapter *chapter = chapterdata->chapters->data;
+	g_return_if_fail (chapter);
+	itdb_chapterdata_remove_chapter (chapterdata, chapter);
+    }
+}
+
+/**
+ * itdb_chapter_new:
+ *
+ * Creates a new #Itdb_Chapter
+ *
+ * Returns: newly allocated #Itdb_Chapter to be freed with itdb_chapter_free()
+ * after use
+ *
+ * Since: 0.7.0
+ */
+Itdb_Chapter *itdb_chapter_new (void)
+{
+    Itdb_Chapter *chapter = g_new0 (Itdb_Chapter, 1);
+    return chapter;
+}
+
+/**
+ * itdb_chapter_free:
+ * @chapter: an #Itdb_Chapter
+ *
+ * Frees the memory used by @chapter
+ *
+ * Since: 0.7.0
+ */
+void itdb_chapter_free (Itdb_Chapter *chapter)
+{
+    g_return_if_fail (chapter);
+
+    g_free (chapter->chaptertitle);
+    g_free (chapter);
+}
+
+/**
+ * itdb_chapter_duplicate:
+ * @chapter: an #Itdb_Chapter
+ *
+ * Duplicates the data contained in @chapter
+ *
+ * Returns: a newly allocated copy of @chapter to be freed with
+ * itdb_chapter_free() after use
+ *
+ * Since: 0.7.0
+ */
+Itdb_Chapter *itdb_chapter_duplicate (Itdb_Chapter *chapter)
+{
+    Itdb_Chapter *new_chapter;
+
+    g_return_val_if_fail (chapter, NULL);
+
+    new_chapter = itdb_chapter_new ();
+    memcpy (new_chapter, chapter, sizeof (Itdb_Chapter));
+    new_chapter->chaptertitle = g_strdup (chapter->chaptertitle);
+
+    return new_chapter;
+}
+
+/**
+ * itdb_chapterdata_add_chapter
+ * @chapterdata:  an #Itdb_Chapterdata
+ * @startpos:     chapter start time in milliseconds
+ * @chaptertitle: chapter title
+ *
+ * Appends a chapter to existing chapters in @chapterdata.
+ *
+ * Returns: TRUE if the chapter could be successfully added, FALSE
+ * otherwise.
+ *
+ * Since: 0.7.0
+ */
+gboolean
+itdb_chapterdata_add_chapter (Itdb_Chapterdata *chapterdata,
+			      gint32 startpos,
+			      gchar *chaptertitle)
+{
+    Itdb_Chapter *chapter;
+
+    g_return_val_if_fail (chapterdata, FALSE);
+    g_return_val_if_fail (chaptertitle, FALSE);
+
+    chapter = itdb_chapter_new ();
+    if (startpos == 0)
+	chapter->startpos = 1; /* first chapter should have startpos of 1 */
+    else
+	chapter->startpos = startpos;
+    chapter->chaptertitle = g_strdup (chaptertitle);
+    chapterdata->chapters = g_list_append (chapterdata->chapters, chapter);
+
+    return TRUE;
+}

Added: libgpod/trunk/libgpod/branches/upstream/current/src/itdb_device.c
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/itdb_device.c	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/itdb_device.c	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,2070 @@
+/*
+|  Copyright (C) 2002-2007 Jorg Schuler <jcsjcs at users sourceforge net>
+|  Part of the gtkpod project.
+| 
+|  URL: http://www.gtkpod.org/
+|  URL: http://gtkpod.sourceforge.net/
+|
+|  Part of this code is based on ipod-device.c from the libipoddevice
+|  project (http://64.14.94.162/index.php/Libipoddevice).
+|
+|  The code contained in this file is free software; you can redistribute
+|  it and/or modify it under the terms of the GNU Lesser General Public
+|  License as published by the Free Software Foundation; either version
+|  2.1 of the License, or (at your option) any later version.
+|
+|  This file 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
+|  Lesser General Public License for more details.
+|
+|  You should have received a copy of the GNU Lesser General Public
+|  License along with this code; if not, write to the Free Software
+|  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+|  USA
+|
+|  iTunes and iPod are trademarks of Apple
+|
+|  This product is not supported/written/published by Apple!
+|
+|  $Id: itdb_device.c 2300 2009-04-03 22:26:55Z tmzullinger $
+*/
+#include <config.h>
+
+#include "db-itunes-parser.h"
+#include "itdb_device.h"
+#include "itdb_private.h"
+#include "itdb_sha1.h"
+#include <ctype.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <time.h>
+#ifdef __CYGWIN__
+    extern __IMPORT long _timezone;
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <glib/gi18n-lib.h>
+#include <glib/gstdio.h>
+
+static const Itdb_IpodInfo ipod_info_table [] = {
+    /* Handle idiots who hose their iPod file system, or lucky people
+       with iPods we don't yet know about*/
+    {"Invalid", 0,  ITDB_IPOD_MODEL_INVALID,     ITDB_IPOD_GENERATION_UNKNOWN, 0},
+    {"Unknown", 0,  ITDB_IPOD_MODEL_UNKNOWN,     ITDB_IPOD_GENERATION_UNKNOWN, 0},
+
+    /* First Generation */
+    /* Mechanical buttons arranged around rotating "scroll wheel".
+       8513, 8541 and 8709 are Mac types, 8697 is PC */
+    {"8513",  5, ITDB_IPOD_MODEL_REGULAR,     ITDB_IPOD_GENERATION_FIRST,  20},
+    {"8541",  5, ITDB_IPOD_MODEL_REGULAR,     ITDB_IPOD_GENERATION_FIRST,  20},
+    {"8697",  5, ITDB_IPOD_MODEL_REGULAR,     ITDB_IPOD_GENERATION_FIRST,  20},
+    {"8709", 10, ITDB_IPOD_MODEL_REGULAR,     ITDB_IPOD_GENERATION_FIRST,  20},
+
+    /* Second Generation */
+    /* Same buttons as First Generation but around touch-sensitive
+       "touch wheel". 8737 and 8738 are Mac types, 8740 and 8741 * are
+       PC */
+    {"8737", 10, ITDB_IPOD_MODEL_REGULAR,     ITDB_IPOD_GENERATION_SECOND, 20},
+    {"8740", 10, ITDB_IPOD_MODEL_REGULAR,     ITDB_IPOD_GENERATION_SECOND, 20},
+    {"8738", 20, ITDB_IPOD_MODEL_REGULAR,     ITDB_IPOD_GENERATION_SECOND, 50},
+    {"8741", 20, ITDB_IPOD_MODEL_REGULAR,     ITDB_IPOD_GENERATION_SECOND, 50},
+
+    /* Third Generation */
+    /* Touch sensitive buttons and arranged in a line above "touch
+       wheel". Docking connector was introduced here, same models for
+       Mac and PC from now on. */
+    {"8976", 10, ITDB_IPOD_MODEL_REGULAR,     ITDB_IPOD_GENERATION_THIRD,  20},
+    {"8946", 15, ITDB_IPOD_MODEL_REGULAR,     ITDB_IPOD_GENERATION_THIRD,  50},
+    {"9460", 15, ITDB_IPOD_MODEL_REGULAR,     ITDB_IPOD_GENERATION_THIRD,  50},
+    {"9244", 20, ITDB_IPOD_MODEL_REGULAR,     ITDB_IPOD_GENERATION_THIRD,  50},
+    {"8948", 30, ITDB_IPOD_MODEL_REGULAR,     ITDB_IPOD_GENERATION_THIRD,  50},
+    {"9245", 40, ITDB_IPOD_MODEL_REGULAR,     ITDB_IPOD_GENERATION_THIRD,  50},
+
+    /* Fourth Generation */
+    /* Buttons are now integrated into the "touch wheel". */
+    {"9282", 20, ITDB_IPOD_MODEL_REGULAR,     ITDB_IPOD_GENERATION_FOURTH, 50},
+    {"9787", 25, ITDB_IPOD_MODEL_REGULAR_U2,  ITDB_IPOD_GENERATION_FOURTH, 50},
+    {"9268", 40, ITDB_IPOD_MODEL_REGULAR,     ITDB_IPOD_GENERATION_FOURTH, 50},
+
+    /* First Generation Mini */
+    {"9160",  4, ITDB_IPOD_MODEL_MINI,        ITDB_IPOD_GENERATION_MINI_1,  6},
+    {"9436",  4, ITDB_IPOD_MODEL_MINI_BLUE,   ITDB_IPOD_GENERATION_MINI_1,  6},
+    {"9435",  4, ITDB_IPOD_MODEL_MINI_PINK,   ITDB_IPOD_GENERATION_MINI_1,  6},
+    {"9434",  4, ITDB_IPOD_MODEL_MINI_GREEN,  ITDB_IPOD_GENERATION_MINI_1,  6},
+    {"9437",  4, ITDB_IPOD_MODEL_MINI_GOLD,   ITDB_IPOD_GENERATION_MINI_1,  6},	
+
+    /* Second Generation Mini */
+    {"9800",  4, ITDB_IPOD_MODEL_MINI,        ITDB_IPOD_GENERATION_MINI_2,  6},
+    {"9802",  4, ITDB_IPOD_MODEL_MINI_BLUE,   ITDB_IPOD_GENERATION_MINI_2,  6},
+    {"9804",  4, ITDB_IPOD_MODEL_MINI_PINK,   ITDB_IPOD_GENERATION_MINI_2,  6},
+    {"9806",  4, ITDB_IPOD_MODEL_MINI_GREEN,  ITDB_IPOD_GENERATION_MINI_2,  6},
+    {"9801",  6, ITDB_IPOD_MODEL_MINI,        ITDB_IPOD_GENERATION_MINI_2, 20},
+    {"9803",  6, ITDB_IPOD_MODEL_MINI_BLUE,   ITDB_IPOD_GENERATION_MINI_2, 20},
+    {"9805",  6, ITDB_IPOD_MODEL_MINI_PINK,   ITDB_IPOD_GENERATION_MINI_2, 20},
+    {"9807",  6, ITDB_IPOD_MODEL_MINI_GREEN,  ITDB_IPOD_GENERATION_MINI_2, 20},	
+
+    /* Photo / Fourth Generation */
+    /* Buttons are integrated into the "touch wheel". */
+    {"A079", 20, ITDB_IPOD_MODEL_COLOR,       ITDB_IPOD_GENERATION_PHOTO,  50},
+    {"A127", 20, ITDB_IPOD_MODEL_COLOR_U2,    ITDB_IPOD_GENERATION_PHOTO,  50},
+    {"9829", 30, ITDB_IPOD_MODEL_COLOR,       ITDB_IPOD_GENERATION_PHOTO,  50},
+    {"9585", 40, ITDB_IPOD_MODEL_COLOR,       ITDB_IPOD_GENERATION_PHOTO,  50},
+    {"9830", 60, ITDB_IPOD_MODEL_COLOR,       ITDB_IPOD_GENERATION_PHOTO,  50},
+    {"9586", 60, ITDB_IPOD_MODEL_COLOR,       ITDB_IPOD_GENERATION_PHOTO,  50},
+    {"9830", 60, ITDB_IPOD_MODEL_COLOR,       ITDB_IPOD_GENERATION_PHOTO,  50},
+
+    /* Shuffle / Fourth Generation */
+    {"9724", 0.5,ITDB_IPOD_MODEL_SHUFFLE,     ITDB_IPOD_GENERATION_SHUFFLE_1, 3},
+    {"9725", 1,  ITDB_IPOD_MODEL_SHUFFLE,     ITDB_IPOD_GENERATION_SHUFFLE_1, 3},
+    /* Shuffle / Sixth Generation */
+    /* Square, connected to computer via cable */
+    {"A546", 1,  ITDB_IPOD_MODEL_SHUFFLE_SILVER, ITDB_IPOD_GENERATION_SHUFFLE_2, 3},
+    {"A947", 1,  ITDB_IPOD_MODEL_SHUFFLE_PINK,   ITDB_IPOD_GENERATION_SHUFFLE_2, 3},
+    {"A949", 1,  ITDB_IPOD_MODEL_SHUFFLE_BLUE,   ITDB_IPOD_GENERATION_SHUFFLE_2, 3},
+    {"A951", 1,  ITDB_IPOD_MODEL_SHUFFLE_GREEN,  ITDB_IPOD_GENERATION_SHUFFLE_2, 3},
+    {"A953", 1,  ITDB_IPOD_MODEL_SHUFFLE_ORANGE, ITDB_IPOD_GENERATION_SHUFFLE_2, 3},
+    /* Shuffle / Seventh Generation */
+    /* Square, connected to computer via cable -- look identicaly to
+     * Sixth Generation*/
+    {"B225", 1,  ITDB_IPOD_MODEL_SHUFFLE_SILVER, ITDB_IPOD_GENERATION_SHUFFLE_3, 3},
+    {"B233", 1,  ITDB_IPOD_MODEL_SHUFFLE_PURPLE, ITDB_IPOD_GENERATION_SHUFFLE_3, 3},
+    {"B231", 1,  ITDB_IPOD_MODEL_SHUFFLE_RED,    ITDB_IPOD_GENERATION_SHUFFLE_3, 3},
+    {"B227", 1,  ITDB_IPOD_MODEL_SHUFFLE_BLUE,   ITDB_IPOD_GENERATION_SHUFFLE_3, 3},
+    {"B228", 1,  ITDB_IPOD_MODEL_SHUFFLE_BLUE,   ITDB_IPOD_GENERATION_SHUFFLE_3, 3},
+    {"B229", 1,  ITDB_IPOD_MODEL_SHUFFLE_GREEN,  ITDB_IPOD_GENERATION_SHUFFLE_3, 3},
+    {"B518", 2,  ITDB_IPOD_MODEL_SHUFFLE_SILVER, ITDB_IPOD_GENERATION_SHUFFLE_3, 3},
+    {"B520", 2,  ITDB_IPOD_MODEL_SHUFFLE_BLUE,   ITDB_IPOD_GENERATION_SHUFFLE_3, 3},
+    {"B522", 2,  ITDB_IPOD_MODEL_SHUFFLE_GREEN,  ITDB_IPOD_GENERATION_SHUFFLE_3, 3},
+    {"B524", 2,  ITDB_IPOD_MODEL_SHUFFLE_RED,    ITDB_IPOD_GENERATION_SHUFFLE_3, 3},
+    {"B526", 2,  ITDB_IPOD_MODEL_SHUFFLE_PURPLE, ITDB_IPOD_GENERATION_SHUFFLE_3, 3},
+
+    /* Nano / Fifth Generation (first nano generation) */
+    /* Buttons are integrated into the "touch wheel". */
+    {"A350",  1, ITDB_IPOD_MODEL_NANO_WHITE,  ITDB_IPOD_GENERATION_NANO_1,   3},
+    {"A352",  1, ITDB_IPOD_MODEL_NANO_BLACK,  ITDB_IPOD_GENERATION_NANO_1,   3},
+    {"A004",  2, ITDB_IPOD_MODEL_NANO_WHITE,  ITDB_IPOD_GENERATION_NANO_1,   3},
+    {"A099",  2, ITDB_IPOD_MODEL_NANO_BLACK,  ITDB_IPOD_GENERATION_NANO_1,   3},
+    {"A005",  4, ITDB_IPOD_MODEL_NANO_WHITE,  ITDB_IPOD_GENERATION_NANO_1,   6},
+    {"A107",  4, ITDB_IPOD_MODEL_NANO_BLACK,  ITDB_IPOD_GENERATION_NANO_1,   6},
+
+    /* Video / Fifth Generation */
+    /* Buttons are integrated into the "touch wheel". */
+    {"A002", 30, ITDB_IPOD_MODEL_VIDEO_WHITE, ITDB_IPOD_GENERATION_VIDEO_1,  50},
+    {"A146", 30, ITDB_IPOD_MODEL_VIDEO_BLACK, ITDB_IPOD_GENERATION_VIDEO_1,  50},
+    {"A003", 60, ITDB_IPOD_MODEL_VIDEO_WHITE, ITDB_IPOD_GENERATION_VIDEO_1,  50},
+    {"A147", 60, ITDB_IPOD_MODEL_VIDEO_BLACK, ITDB_IPOD_GENERATION_VIDEO_1,  50},
+
+    /* Video / Sixth Generation */
+    /* Pretty much identical to fifth generation with better display,
+     * extended battery operation time and gap-free playback */
+    {"A444", 30, ITDB_IPOD_MODEL_VIDEO_WHITE, ITDB_IPOD_GENERATION_VIDEO_2,  50},
+    {"A446", 30, ITDB_IPOD_MODEL_VIDEO_BLACK, ITDB_IPOD_GENERATION_VIDEO_2,  50},
+    {"A664", 30, ITDB_IPOD_MODEL_VIDEO_U2,    ITDB_IPOD_GENERATION_VIDEO_2,  50},
+    {"A448", 80, ITDB_IPOD_MODEL_VIDEO_WHITE, ITDB_IPOD_GENERATION_VIDEO_2,  50},
+    {"A450", 80, ITDB_IPOD_MODEL_VIDEO_BLACK, ITDB_IPOD_GENERATION_VIDEO_2,  50},
+
+    /* Nano / Sixth Generation (second nano generation) */
+    /* Pretty much identical to fifth generation with better display,
+     * extended battery operation time and gap-free playback */
+    {"A477",  2, ITDB_IPOD_MODEL_NANO_SILVER, ITDB_IPOD_GENERATION_NANO_2,   3},
+    {"A426",  4, ITDB_IPOD_MODEL_NANO_SILVER, ITDB_IPOD_GENERATION_NANO_2,   6},
+    {"A428",  4, ITDB_IPOD_MODEL_NANO_BLUE,   ITDB_IPOD_GENERATION_NANO_2,   6},
+    {"A487",  4, ITDB_IPOD_MODEL_NANO_GREEN,  ITDB_IPOD_GENERATION_NANO_2,   6},
+    {"A489",  4, ITDB_IPOD_MODEL_NANO_PINK,   ITDB_IPOD_GENERATION_NANO_2,   6},
+    {"A725",  4, ITDB_IPOD_MODEL_NANO_RED,    ITDB_IPOD_GENERATION_NANO_2,   6},
+    {"A726",  8, ITDB_IPOD_MODEL_NANO_RED,    ITDB_IPOD_GENERATION_NANO_2,   6},
+    {"A497",  8, ITDB_IPOD_MODEL_NANO_BLACK,  ITDB_IPOD_GENERATION_NANO_2,  14},
+
+    /* HP iPods, need contributions for this table */
+    /* Buttons are integrated into the "touch wheel". */
+    {"E436", 40, ITDB_IPOD_MODEL_REGULAR,     ITDB_IPOD_GENERATION_FOURTH, 50},
+    {"S492", 30, ITDB_IPOD_MODEL_COLOR,       ITDB_IPOD_GENERATION_PHOTO,  50},
+
+    /* iPod Classic G1 */
+    /* First generation with "cover flow" */
+    {"B029",  80, ITDB_IPOD_MODEL_CLASSIC_SILVER, ITDB_IPOD_GENERATION_CLASSIC_1, 50},
+    {"B147",  80, ITDB_IPOD_MODEL_CLASSIC_BLACK,  ITDB_IPOD_GENERATION_CLASSIC_1, 50},
+    {"B145", 160, ITDB_IPOD_MODEL_CLASSIC_SILVER, ITDB_IPOD_GENERATION_CLASSIC_1, 50},
+    {"B150", 160, ITDB_IPOD_MODEL_CLASSIC_BLACK,  ITDB_IPOD_GENERATION_CLASSIC_1, 50},
+
+    /* iPod Classic G2 */
+    {"B562", 120, ITDB_IPOD_MODEL_CLASSIC_SILVER, ITDB_IPOD_GENERATION_CLASSIC_2, 50},
+    {"B565", 120, ITDB_IPOD_MODEL_CLASSIC_BLACK,  ITDB_IPOD_GENERATION_CLASSIC_2, 50},
+
+    /* iPod nano video G1 (Third Nano Generation) */
+    /* First generation of video support for nano */
+    {"A978",   4, ITDB_IPOD_MODEL_NANO_SILVER,    ITDB_IPOD_GENERATION_NANO_3,  6},
+    {"A980",   8, ITDB_IPOD_MODEL_NANO_SILVER,    ITDB_IPOD_GENERATION_NANO_3, 14},
+    {"B261",   8, ITDB_IPOD_MODEL_NANO_BLACK,     ITDB_IPOD_GENERATION_NANO_3, 14},
+    {"B249",   8, ITDB_IPOD_MODEL_NANO_BLUE,      ITDB_IPOD_GENERATION_NANO_3, 14},
+    {"B253",   8, ITDB_IPOD_MODEL_NANO_GREEN,     ITDB_IPOD_GENERATION_NANO_3, 14},
+    {"B257",   8, ITDB_IPOD_MODEL_NANO_RED,       ITDB_IPOD_GENERATION_NANO_3, 14},
+
+    /* iPod nano video G2 (Fourth Nano Generation) */
+    {"B480",   4, ITDB_IPOD_MODEL_NANO_SILVER,    ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B651",   4, ITDB_IPOD_MODEL_NANO_BLUE,      ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B654",   4, ITDB_IPOD_MODEL_NANO_PINK,      ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B657",   4, ITDB_IPOD_MODEL_NANO_PURPLE,    ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B660",   4, ITDB_IPOD_MODEL_NANO_ORANGE,    ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B663",   4, ITDB_IPOD_MODEL_NANO_GREEN,     ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B666",   4, ITDB_IPOD_MODEL_NANO_YELLOW,    ITDB_IPOD_GENERATION_NANO_4, 14},
+
+    {"B598",   8, ITDB_IPOD_MODEL_NANO_SILVER,    ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B732",   8, ITDB_IPOD_MODEL_NANO_BLUE,      ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B735",   8, ITDB_IPOD_MODEL_NANO_PINK,      ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B739",   8, ITDB_IPOD_MODEL_NANO_PURPLE,    ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B742",   8, ITDB_IPOD_MODEL_NANO_ORANGE,    ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B745",   8, ITDB_IPOD_MODEL_NANO_GREEN,     ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B748",   8, ITDB_IPOD_MODEL_NANO_YELLOW,    ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B751",   8, ITDB_IPOD_MODEL_NANO_RED,       ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B754",   8, ITDB_IPOD_MODEL_NANO_BLACK,     ITDB_IPOD_GENERATION_NANO_4, 14},
+
+    {"B903",  16, ITDB_IPOD_MODEL_NANO_SILVER,    ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B905",  16, ITDB_IPOD_MODEL_NANO_BLUE,      ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B907",  16, ITDB_IPOD_MODEL_NANO_PINK,      ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B909",  16, ITDB_IPOD_MODEL_NANO_PURPLE,    ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B911",  16, ITDB_IPOD_MODEL_NANO_ORANGE,    ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B913",  16, ITDB_IPOD_MODEL_NANO_GREEN,     ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B915",  16, ITDB_IPOD_MODEL_NANO_YELLOW,    ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B917",  16, ITDB_IPOD_MODEL_NANO_RED,       ITDB_IPOD_GENERATION_NANO_4, 14},
+    {"B918",  16, ITDB_IPOD_MODEL_NANO_BLACK,     ITDB_IPOD_GENERATION_NANO_4, 14},
+
+    /* iPod touch G1 */
+    /* With touch screen */
+    {"A623",   8, ITDB_IPOD_MODEL_TOUCH_BLACK,    ITDB_IPOD_GENERATION_TOUCH_1, 14},
+    {"A627",  16, ITDB_IPOD_MODEL_TOUCH_BLACK,    ITDB_IPOD_GENERATION_TOUCH_1, 28},
+
+    /* iPhone G1 */
+    /* We used to not have a model number for the iPhone so we had that
+     * dummy "iPhone1" model number, we now keep it here for backward
+     * compatibility reasons
+     */
+    {"A501",  4, ITDB_IPOD_MODEL_IPHONE_1,       ITDB_IPOD_GENERATION_IPHONE_1, 14},
+    {"A712",  8, ITDB_IPOD_MODEL_IPHONE_1,       ITDB_IPOD_GENERATION_IPHONE_1, 14},
+    {"iPhone1", -1, ITDB_IPOD_MODEL_IPHONE_1, ITDB_IPOD_GENERATION_IPHONE_1, 14},
+
+    /* No known model number -- create a Device/SysInfo file with
+     * one entry, e.g.:
+       ModelNumStr: Mmobile1
+    */
+    {"mobile1", -1, ITDB_IPOD_MODEL_MOBILE_1, ITDB_IPOD_GENERATION_MOBILE,  6},
+
+    {NULL, 0, 0, 0, 0}
+};
+
+
+/* One entry for each of Itdb_IpodModel (itdb.h) */
+static const gchar *ipod_model_name_table [] = {
+	N_("Invalid"),
+	N_("Unknown"),
+	N_("Color"),
+	N_("Color U2"),
+	N_("Grayscale"),
+	N_("Grayscale U2"),
+	N_("Mini (Silver)"),
+	N_("Mini (Blue)"),
+	N_("Mini (Pink)"),
+	N_("Mini (Green)"),
+	N_("Mini (Gold)"),
+	N_("Shuffle"),
+	N_("Nano (White)"),
+	N_("Nano (Black)"),
+	N_("Video (White)"),
+	N_("Video (Black)"),
+	N_("Mobile (1)"),
+	N_("Video U2"),
+	N_("Nano (Silver)"),
+	N_("Nano (Blue)"),
+	N_("Nano (Green)"),
+	N_("Nano (Pink)"),
+	N_("Nano (Red)"),
+	N_("Nano (Yellow)"),
+	N_("Nano (Purple)"),
+	N_("Nano (Orange)"),
+	N_("iPhone (1)"),
+	N_("Shuffle (Silver)"),
+	N_("Shuffle (Pink)"),
+	N_("Shuffle (Blue)"),
+	N_("Shuffle (Green)"),
+	N_("Shuffle (Orange)"),
+	N_("Shuffle (Purple)"),
+	N_("Shuffle (Red)"),
+	N_("Classic (Silver)"),
+	N_("Classic (Black)"),
+	N_("Touch (Black)"),
+	NULL
+};
+
+/* One entry for each of Itdb_IpodGeneration (itdb.h) */
+static const gchar *ipod_generation_name_table [] = {
+	N_("Unknown"),
+	N_("Regular (1st Gen.)"),
+	N_("Regular (2nd Gen.)"),
+	N_("Regular (3rd Gen.)"),
+	N_("Regular (4th Gen.)"),
+	N_("Photo"),
+	N_("Mobile Phones"),
+	N_("Mini (1st Gen.)"),
+	N_("Mini (2nd Gen.)"),
+	N_("Shuffle (1st Gen.)"),
+	N_("Shuffle (2nd Gen.)"),
+	N_("Shuffle (3rd Gen.)"),
+	N_("Nano (1st Gen.)"),
+	N_("Nano (2nd Gen.)"),
+	N_("Nano Video (3rd Gen.)"),
+	N_("Nano Video (4th Gen.)"),
+	N_("Video (1st Gen.)"),
+	N_("Video (2nd Gen.)"),
+	N_("Classic"),
+	N_("Classic"),
+	N_("Touch"),
+        N_("iPhone"),
+	N_("Unused"),
+	N_("Unused"),
+	NULL
+};
+
+
+static const Itdb_ArtworkFormat ipod_photo_cover_art_info[] = {
+    {1017,  56,  56, THUMB_FORMAT_RGB565_LE},
+    {1016, 140, 140, THUMB_FORMAT_RGB565_LE},
+    { -1,   -1,  -1, -1}
+};
+
+static const Itdb_ArtworkFormat ipod_photo_photo_info[] = {
+    {1009,  42,  30, THUMB_FORMAT_RGB565_LE},
+    {1015, 130,  88, THUMB_FORMAT_RGB565_LE},
+    {1013, 220, 176, THUMB_FORMAT_RGB565_BE_90},
+    {1019, 720, 480, THUMB_FORMAT_UYVY_BE},
+    {  -1,  -1,  -1, -1}
+};
+
+static const Itdb_ArtworkFormat ipod_nano_cover_art_info[] = {
+    {1031,  42,  42, THUMB_FORMAT_RGB565_LE},
+    {1027, 100, 100, THUMB_FORMAT_RGB565_LE},
+    {  -1,  -1,  -1, -1}
+};
+
+static const Itdb_ArtworkFormat ipod_nano_photo_info[] = {
+    {1032,  42,  37, THUMB_FORMAT_RGB565_LE},
+    {1023, 176, 132, THUMB_FORMAT_RGB565_BE},
+    {  -1,  -1,  -1, -1}
+};
+
+static const Itdb_ArtworkFormat ipod_nano4g_cover_art_info[] = {
+    {1055, 128, 128, THUMB_FORMAT_RGB565_LE},
+    {1068, 128, 128, THUMB_FORMAT_RGB565_LE},
+    {1071, 240, 240, THUMB_FORMAT_RGB565_LE},
+    {1074,  50,  50, THUMB_FORMAT_RGB565_LE},
+    {1078,  80,  80, THUMB_FORMAT_RGB565_LE},
+    {1084, 240, 240, THUMB_FORMAT_RGB565_LE},
+    {  -1,  -1,  -1, -1}
+};
+
+static const Itdb_ArtworkFormat ipod_nano4g_photo_info[] = {
+    {1024, 320, 240, THUMB_FORMAT_RGB565_LE},
+    {1066,  64,  64, THUMB_FORMAT_RGB565_LE},
+    {1079,  80,  80, THUMB_FORMAT_RGB565_LE},
+    /*
+     * To be implemented, THUMB_FORMAT_JPEG 
+    {1081, 640, 480, THUMB_FORMAT_JPEG},
+    */
+    {1083, 240, 320, THUMB_FORMAT_RGB565_LE},
+    {  -1,  -1,  -1, -1}
+};
+
+static const Itdb_ArtworkFormat ipod_nano4g_chapter_image_info[] = {
+    {1071, 240, 240, THUMB_FORMAT_RGB565_LE},
+};
+
+static const Itdb_ArtworkFormat ipod_video_cover_art_info[] = {
+    {1028, 100, 100, THUMB_FORMAT_RGB565_LE},
+    {1029, 200, 200, THUMB_FORMAT_RGB565_LE},
+    {  -1,  -1,  -1, -1}
+};
+
+static const Itdb_ArtworkFormat ipod_video_photo_info[] = {
+    {1036,  50,  41, THUMB_FORMAT_RGB565_LE},
+    {1015, 130,  88, THUMB_FORMAT_RGB565_LE},
+    {1024, 320, 240, THUMB_FORMAT_RGB565_LE},
+    {1019, 720, 480, THUMB_FORMAT_UYVY_BE},
+    {  -1,  -1,  -1, -1}
+};
+
+static const Itdb_ArtworkFormat ipod_mobile_1_cover_art_info[] = {
+    {2002,  50,  50, THUMB_FORMAT_RGB565_BE},
+    {2003, 150, 150, THUMB_FORMAT_RGB565_BE},
+    {  -1,  -1,  -1, -1}
+};
+
+static const Itdb_ArtworkFormat ipod_touch_1_cover_art_info[] = {
+    {3001, 256, 256, THUMB_FORMAT_REC_RGB555_LE},
+    {3002, 128, 128, THUMB_FORMAT_REC_RGB555_LE},
+    {3003,  64,  64, THUMB_FORMAT_REC_RGB555_LE},
+    {3005, 320, 320, THUMB_FORMAT_RGB555_LE},
+    {3006,  56,  56, THUMB_FORMAT_RGB555_LE,  8192}, /*pad data to  8192 bytes */
+    {3007,  88,  88, THUMB_FORMAT_RGB555_LE, 16364}, /*pad data to 16384 bytes */
+    {  -1,  -1,  -1, -1}
+};
+
+static const Itdb_ArtworkFormat ipod_touch_1_photo_info[] = {
+    /* In the album list, if a photo is being used to represent a whole album,
+       PHOTO_SMALL is used.  We specify TRUE for the crop option so we fill
+       the square completely. */
+    {3004,  56,  55, THUMB_FORMAT_RGB555_LE, 8192, TRUE},
+    /* In thumbnail view, PHOTO_LARGE is used.  It's actually 79x79, with a 4px
+       white border on the right and bottom.  We specify TRUE for the crop option
+       so we fill the square completely. */
+    {3011,  80,  79, THUMB_FORMAT_RGB555_LE, 0, TRUE},
+    {3009, 160, 120, THUMB_FORMAT_RGB555_LE},
+    /* When viewing an individual photo, PHOTO_TV_SCREEN is used.  Note that it
+       is acceptable to write a thumbnail less than the specified width or
+       height, the iPhone / iTouch will scale it to fit the screen.  This is
+       important for images that are taller than they wide. */
+    {3008, 640, 480, THUMB_FORMAT_RGB555_LE},
+    {  -1,  -1,  -1, -1}
+};
+
+/* also used for 3G Nano */
+static const Itdb_ArtworkFormat ipod_classic_1_cover_art_info[] = {
+    /* officially 55x55 -- verify! */
+    {1061,  56,  56, THUMB_FORMAT_RGB565_LE},
+    {1055, 128, 128, THUMB_FORMAT_RGB565_LE},
+    {1068, 128, 128, THUMB_FORMAT_RGB565_LE},
+    {1060, 320, 320, THUMB_FORMAT_RGB565_LE},
+    {  -1,  -1,  -1, -1}
+};
+
+/* also used for 3G Nano */
+static const Itdb_ArtworkFormat ipod_classic_1_photo_info[] = {
+    {1067, 720, 480, THUMB_FORMAT_I420_LE},
+    {1024, 320, 240, THUMB_FORMAT_RGB565_LE},
+    {1066,  64,  64, THUMB_FORMAT_RGB565_LE},
+    {  -1,  -1,  -1, -1}
+};
+
+/* also used for 3G Nano */
+static const Itdb_ArtworkFormat ipod_classic_1_chapter_image_info[] = {
+    /*  These are the same as for the iPod video... -- labeled by the iPod as
+        "chapter images" */
+    {1055, 128, 128, THUMB_FORMAT_RGB565_LE},
+    {1029, 200, 200, THUMB_FORMAT_RGB565_LE},
+    {  -1,  -1,  -1, -1}
+};
+
+enum ArtworkType {
+    ARTWORK_TYPE_COVER_ART,
+    ARTWORK_TYPE_PHOTO,
+    ARTWORK_TYPE_CHAPTER_IMAGE
+};
+
+struct _ArtworkCapabilities {
+    Itdb_IpodGeneration generation;
+    const Itdb_ArtworkFormat *cover_art_formats;
+    const Itdb_ArtworkFormat *photo_formats;
+    const Itdb_ArtworkFormat *chapter_image_formats;
+};
+typedef struct _ArtworkCapabilities ArtworkCapabilities;
+
+static const ArtworkCapabilities ipod_artwork_capabilities[] = {
+    { ITDB_IPOD_GENERATION_PHOTO, ipod_photo_cover_art_info, ipod_photo_photo_info, NULL },
+    { ITDB_IPOD_GENERATION_VIDEO_1, ipod_video_cover_art_info, ipod_video_photo_info, NULL },
+    { ITDB_IPOD_GENERATION_VIDEO_2, ipod_video_cover_art_info, ipod_video_photo_info, NULL },
+    { ITDB_IPOD_GENERATION_NANO_1, ipod_nano_cover_art_info, ipod_nano_photo_info, NULL },
+    { ITDB_IPOD_GENERATION_NANO_2, ipod_nano_cover_art_info, ipod_nano_photo_info, NULL },
+    { ITDB_IPOD_GENERATION_NANO_3, ipod_classic_1_cover_art_info, ipod_classic_1_photo_info, ipod_classic_1_chapter_image_info },
+    { ITDB_IPOD_GENERATION_NANO_4, ipod_nano4g_cover_art_info, ipod_nano4g_photo_info, ipod_nano4g_chapter_image_info },
+    { ITDB_IPOD_GENERATION_CLASSIC_1, ipod_classic_1_cover_art_info, ipod_classic_1_photo_info, ipod_classic_1_chapter_image_info },
+    { ITDB_IPOD_GENERATION_CLASSIC_2, ipod_classic_1_cover_art_info, ipod_classic_1_photo_info, ipod_classic_1_chapter_image_info },
+    { ITDB_IPOD_GENERATION_TOUCH_1, ipod_touch_1_cover_art_info, ipod_touch_1_photo_info, NULL },
+    { ITDB_IPOD_GENERATION_IPHONE_1, ipod_touch_1_cover_art_info, ipod_touch_1_photo_info, NULL },
+    { ITDB_IPOD_GENERATION_MOBILE, ipod_mobile_1_cover_art_info, NULL, NULL },
+    { ITDB_IPOD_GENERATION_UNKNOWN, NULL, NULL, NULL }
+};
+
+struct _ItdbSerialToModel {
+    const char *serial;
+    const char *model_number;
+};
+typedef struct _ItdbSerialToModel ItdbSerialToModel;
+
+/* This table was extracted from ipod-model-table from podsleuth svn trunk
+ * on 2008-06-14 (which seems to match podsleuth 0.6.2)
+*/
+static const ItdbSerialToModel serial_to_model_mapping[] = {
+    { "LG6", "8541" },
+    { "NAM", "8541" },
+    { "MJ2", "8541" },
+    { "ML1", "8709" },
+    { "MME", "8709" },
+    { "MMB", "8737" },
+    { "MMC", "8738" },
+    { "NGE", "8740" },
+    { "NGH", "8740" },
+    { "MMF", "8741" },
+    { "NLW", "8946" },
+    { "NRH", "8976" },
+    { "QQF", "9460" },
+    { "PQ5", "9244" },
+    { "PNT", "9244" },
+    { "NLY", "8948" },
+    { "NM7", "8948" },
+    { "PNU", "9245" },
+    { "PS9", "9282" },
+    { "Q8U", "9282" },
+    { "V9V", "9787" },
+    { "S2X", "9787" },
+    { "PQ7", "9268" },
+    { "TDU", "A079" },
+    { "TDS", "A079" },
+    { "TM2", "A127" },
+    { "SAZ", "9830" },
+    { "SB1", "9830" },
+    { "SAY", "9829" },
+    { "R5Q", "9585" },
+    { "R5R", "9586" },
+    { "R5T", "9586" },
+    { "PFW", "9160" },
+    { "PRC", "9160" },
+    { "QKL", "9436" },
+    { "QKQ", "9436" },
+    { "QKK", "9435" },
+    { "QKP", "9435" },
+    { "QKJ", "9434" },
+    { "QKN", "9434" },
+    { "QKM", "9437" },
+    { "QKR", "9437" },
+    { "S41", "9800" },
+    { "S4C", "9800" },
+    { "S43", "9802" },
+    { "S45", "9804" },
+    { "S47", "9806" },
+    { "S4J", "9806" },
+    { "S42", "9801" },
+    { "S44", "9803" },
+    { "S48", "9807" },
+    { "RS9", "9724" },
+    { "QGV", "9724" },
+    { "TSX", "9724" },
+    { "PFV", "9724" },
+    { "R80", "9724" },
+    { "RSA", "9725" },
+    { "TSY", "9725" },
+    { "C60", "9725" },
+    { "VTE", "A546" },
+    { "VTF", "A546" },
+    { "XQ5", "A947" },
+    { "XQS", "A947" },
+    { "XQV", "A949" },
+    { "XQX", "A949" },
+    { "YX7", "A949" },
+    { "XQY", "A951" },
+    { "YX8", "A951" },
+    { "XR1", "A953" },
+    { "YXA", "B233" },
+    { "YX6", "B225" },
+    { "YX7", "B228" },
+    { "YX9", "B225" },
+    { "UNA", "A350" },
+    { "UNB", "A350" },
+    { "UPR", "A352" },
+    { "UPS", "A352" },
+    { "SZB", "A004" },
+    { "SZV", "A004" },
+    { "SZW", "A004" },
+    { "SZC", "A005" },
+    { "SZT", "A005" },
+    { "TJT", "A099" },
+    { "TJU", "A099" },
+    { "TK2", "A107" },
+    { "TK3", "A107" },
+    { "VQ5", "A477" },
+    { "VQ6", "A477" },
+    { "V8T", "A426" },
+    { "V8U", "A426" },
+    { "V8W", "A428" },
+    { "V8X", "A428" },
+    { "VQH", "A487" },
+    { "VQJ", "A487" },
+    { "VQK", "A489" },
+    { "VKL", "A489" },
+    { "WL2", "A725" },
+    { "WL3", "A725" },
+    { "X9A", "A726" },
+    { "X9B", "A726" },
+    { "VQT", "A497" },
+    { "VQU", "A497" },
+    { "Y0P", "A978" },
+    { "Y0R", "A980" },
+    { "YXR", "B249" },
+    { "YXV", "B257" },
+    { "YXT", "B253" },
+    { "YXX", "B261" },
+    { "SZ9", "A002" },
+    { "WEC", "A002" },
+    { "WED", "A002" },
+    { "WEG", "A002" },
+    { "WEH", "A002" },
+    { "WEL", "A002" },
+    { "TXK", "A146" },
+    { "TXM", "A146" },
+    { "WEE", "A146" },
+    { "WEF", "A146" },
+    { "WEJ", "A146" },
+    { "WEK", "A146" },
+    { "SZA", "A003" },
+    { "SZU", "A003" },
+    { "TXL", "A147" },
+    { "TXN", "A147" },
+    { "V9K", "A444" },
+    { "V9L", "A444" },
+    { "WU9", "A444" },
+    { "VQM", "A446" },
+    { "V9M", "A446" },
+    { "V9N", "A446" },
+    { "WEE", "A446" },
+    { "V9P", "A448" },
+    { "V9Q", "A448" },
+    { "V9R", "A450" },
+    { "V9S", "A450" },
+    { "V95", "A450" },
+    { "V96", "A450" },
+    { "WUC", "A450" },
+    { "W9G", "A664" }, /* 30GB iPod Video U2 5.5g */
+    { "Y5N", "B029" }, /* Silver Classic 80GB */
+    { "YMV", "B147" }, /* Black Classic 80GB */
+    { "YMU", "B145" }, /* Silver Classic 160GB */
+    { "YMX", "B150" }, /* Black Classic 160GB */
+    { "VR0", "A501" },
+    { "WH8", "A712" },
+    { "2C5", "B562" }, /* Silver Classic 120GB */
+    { "2C7", "B565" }, /* Black Classic 120GB */
+    { "37P", "B663" }, /* 4GB Green Nano 4g */
+    { "37Q", "B666" }, /* 4GB Yellow Nano 4g */
+    { "37H", "B654" }, /* 4GB Pink Nano 4g */
+    { "1P1", "B480" }, /* 4GB Silver Nano 4g */
+    { "37K", "B657" }, /* 4GB Purple Nano 4g */
+    { "37L", "B660" }, /* 4GB Orange Nano 4g */
+    { "2ME", "B598" }, /* 8GB Silver Nano 4g */
+    { "3QS", "B732" }, /* 8GB Blue Nano 4g */
+    { "3QT", "B735" }, /* 8GB Pink Nano 4g */
+    { "3QU", "B739" }, /* 8GB Purple Nano 4g */
+    { "3QW", "B742" }, /* 8GB Orange Nano 4g */
+    { "3QX", "B745" }, /* 8GB Green Nano 4g */
+    { "3QY", "B748" }, /* 8GB Yellow Nano 4g */
+    { "3RO", "B754" }, /* 8GB Black Nano 4g */
+    { "3QZ", "B751" }, /* 8GB Red Nano 4g */
+    { "5B7", "B903" }, /* 16GB Silver Nano 4g */
+    { "5B8", "B905" }, /* 16GB Blue Nano 4g */
+    { "5B9", "B907" }, /* 16GB Pink Nano 4g */
+    { "5BA", "B909" }, /* 16GB Purple Nano 4g */
+    { "5BB", "B911" }, /* 16GB Orange Nano 4g */
+    { "5BC", "B913" }, /* 16GB Green Nano 4g */
+    { "5BD", "B915" }, /* 16GB Yellow Nano 4g */
+    { "5BE", "B917" }, /* 16GB Red Nano 4g */
+    { "5BF", "B918" }, /* 16GB Black Nano 4g */
+    { NULL ,  NULL  }
+};
+
+static const Itdb_IpodInfo *get_ipod_info_from_model_number (const char *model_number);
+static const Itdb_IpodInfo *get_ipod_info_from_serial (const char *serial);
+static void itdb_device_set_timezone_info (Itdb_Device *device);
+
+/* Reset or create the SysInfo hash table */
+static void itdb_device_reset_sysinfo (Itdb_Device *device)
+{
+    if (device->sysinfo)
+	g_hash_table_destroy (device->sysinfo);
+    device->sysinfo = g_hash_table_new_full (g_str_hash, g_str_equal,
+					     g_free, g_free);
+    device->sysinfo_changed = FALSE;
+}
+
+
+/**
+ * itdb_device_new:
+ * 
+ * Creates a new #Itdb_Device structure
+ *
+ * Returns: a newly allocated #Itdb_Device which must be freed with
+ * itdb_device_free() when no longer needed
+ *
+ * Since: 0.4.0
+ */
+Itdb_Device *itdb_device_new (void)
+{
+    Itdb_Device *dev;
+
+    dev = g_new0 (Itdb_Device, 1);
+    itdb_device_reset_sysinfo (dev);
+    return dev;
+}
+
+/**
+ * itdb_device_free:
+ * @device: an #Itdb_Device
+ *
+ * Frees memory used by @device
+ *
+ * Since: 0.4.0
+ */
+void itdb_device_free (Itdb_Device *device)
+{
+    if (device)
+    {
+	g_free (device->mountpoint);
+	if (device->sysinfo)
+	    g_hash_table_destroy (device->sysinfo);
+        if (device->sysinfo_extended)
+            itdb_sysinfo_properties_free (device->sysinfo_extended);
+	g_free (device);
+    }
+}
+
+
+/**
+ * itdb_device_set_mountpoint:
+ * @device: an #Itdb_Device
+ * @mp:     the new mount point
+ *
+ * Sets the mountpoint of @device to @mp and update the cached device 
+ * information (in particular, re-read the SysInfo file)
+ *
+ * <warning><para>Calling this function invalidates all the artwork in the
+ * #Itdb_iTunesDB database using this #Itdb_Device. Trying to access this
+ * artwork will result in memory corruption. It's recommended to use
+ * itdb_set_mountpoint() instead which will clean the invalidated artwork
+ * for you.</para></warning>.
+ *
+ * Since: 0.4.0
+ */
+void itdb_device_set_mountpoint (Itdb_Device *device, const gchar *mp)
+{
+    g_return_if_fail (device);
+
+    g_free (device->mountpoint);
+    device->mountpoint = g_strdup (mp);
+    if (mp) {
+	itdb_device_read_sysinfo (device);
+        itdb_device_set_timezone_info (device);
+    }
+}
+
+
+G_GNUC_INTERNAL time_t device_time_mac_to_time_t (Itdb_Device *device, guint64 mactime)
+{
+    g_return_val_if_fail (device, 0);
+    if (mactime != 0)  return (time_t)(mactime - 2082844800 - device->timezone_shift);
+    else               return (time_t)mactime;
+}
+
+G_GNUC_INTERNAL guint64 device_time_time_t_to_mac (Itdb_Device *device, time_t timet)
+{
+    g_return_val_if_fail (device, 0);
+    if (timet != 0)
+	return ((guint64)timet) + 2082844800 + device->timezone_shift;
+    else return 0;
+}
+
+static void itdb_device_read_sysinfo_extended (Itdb_Device *device)
+{
+    const gchar *p_sysinfo_ex[] = {"SysInfoExtended", NULL};
+    gchar *dev_path, *sysinfo_ex_path;
+
+    if (device->sysinfo_extended != NULL) {
+        itdb_sysinfo_properties_free (device->sysinfo_extended);
+        device->sysinfo_extended = NULL;
+    }
+
+    dev_path = itdb_get_device_dir (device->mountpoint);
+    if (!dev_path) return;
+
+    sysinfo_ex_path = itdb_resolve_path (dev_path, p_sysinfo_ex);
+    g_free (dev_path);
+    if (!sysinfo_ex_path) return;
+    device->sysinfo_extended = itdb_sysinfo_extended_parse (sysinfo_ex_path, NULL);
+    g_free (sysinfo_ex_path);
+
+    if ((device->sysinfo != NULL) && (device->sysinfo_extended != NULL)) {
+        const char *fwid;
+        fwid = itdb_sysinfo_properties_get_firewire_id (device->sysinfo_extended);
+        if (fwid != NULL) {
+            g_hash_table_insert (device->sysinfo, g_strdup ("FirewireGuid"),
+                                 g_strdup (fwid));
+        }
+    }
+}
+
+/** 
+ * itdb_device_read_sysinfo:
+ * @device: an #Itdb_Device
+ *
+ * Reads the SysInfo file and stores information in device->sysinfo for
+ * later use.
+ *
+ * <warning><para>Calling this function invalidates all the artwork in the
+ * #Itdb_iTunesDB database using this #Itdb_Device. Trying to access this
+ * artwork will result in memory corruption. Directly calling this function
+ * shouldn't ever be needed and it will be deprecated
+ * soon.</para></warning>.
+ *
+ * Returns: TRUE if file could be read, FALSE otherwise 
+ *
+ * Since: 0.4.0
+ */
+gboolean itdb_device_read_sysinfo (Itdb_Device *device)
+{
+    const gchar *p_sysinfo[] = {"SysInfo", NULL};
+    gchar *dev_path, *sysinfo_path;
+    FILE *fd;
+    gboolean result = FALSE;
+    gchar buf[1024];
+
+    g_return_val_if_fail (device, FALSE);
+    g_return_val_if_fail (device->mountpoint, FALSE);
+
+    itdb_device_reset_sysinfo (device);
+
+    g_return_val_if_fail (device->sysinfo, FALSE);
+
+    dev_path = itdb_get_device_dir (device->mountpoint);
+
+    if (!dev_path) return FALSE;
+
+    sysinfo_path = itdb_resolve_path (dev_path, p_sysinfo);
+
+    if (sysinfo_path)
+    {
+	fd = fopen (sysinfo_path, "r");
+	if (fd)
+	{
+	    result = TRUE;
+	    while(fgets(buf, sizeof(buf), fd))
+	    {
+		gchar *ptr;
+		gint len = strlen (buf);
+		/* suppress newline at end of line */
+		if ((len>0) && (buf[len-1]==0x0a))
+		{
+		    buf[len-1] = 0;
+		    --len;
+		}
+		ptr = strchr (buf, ':');
+		if (ptr && (ptr!=buf))
+		{
+		    *ptr = 0;
+		    ++ptr;
+		    itdb_device_set_sysinfo (device,
+					     buf, g_strstrip(ptr));
+		}
+	    }
+	    fclose (fd);
+	}
+	g_free (sysinfo_path);
+    }
+    g_free (dev_path);
+
+    itdb_device_read_sysinfo_extended (device);
+
+    /* indicate that sysinfo is identical to what is on the iPod */
+    device->sysinfo_changed = FALSE;
+    return result;
+}
+
+/* used by itdb_device_write_sysinfo() */
+static void write_sysinfo_entry (const gchar *key,
+				 const gchar *value,
+				 FILE *file)
+{
+    fprintf (file, "%s: %s\n", key, value);
+}
+
+
+
+/** 
+ * itdb_device_write_sysinfo:
+ * @device: an #Itdb_Device
+ * @error:  return location for a #GError or NULL
+ *
+ * Fills the SysInfo file with information in device->sysinfo. Note:
+ * no directories are created if not already existent.
+ *
+ * Returns: TRUE if file could be read, FALSE otherwise 
+ *
+ * Since: 0.4.0
+ */
+gboolean itdb_device_write_sysinfo (Itdb_Device *device, GError **error)
+{
+    gchar *devicedir;
+    gboolean success = FALSE;
+
+    g_return_val_if_fail (device, FALSE);
+    g_return_val_if_fail (device->mountpoint, FALSE);
+
+    devicedir = itdb_get_device_dir (device->mountpoint);
+    if (devicedir)
+    {
+	gchar *sysfile = g_build_filename (devicedir, "SysInfo", NULL);
+	FILE *sysinfo = fopen (sysfile, "w");
+	if (sysinfo)
+	{
+	    if (device->sysinfo)
+	    {
+		g_hash_table_foreach (device->sysinfo,
+				      (GHFunc)write_sysinfo_entry,
+				      sysinfo);
+	    }
+	    fclose (sysinfo);
+	    success = TRUE;
+	}
+	else
+	{
+	    g_set_error (error, 0, -1,
+			 _("Could not open '%s' for writing."),
+			 sysfile);
+	}
+	g_free (sysfile);
+	g_free (devicedir);
+    }
+    else
+    {
+	g_set_error (error, 0, -1,
+		     _("Device directory does not exist."));
+    }
+
+    if (success)
+	device->sysinfo_changed = FALSE;
+
+    return success;
+}
+
+
+/**
+ * itdb_device_get_sysinfo:
+ * @device: an #Itdb_Device
+ * @field:  field to retrive information from
+ *
+ * Retrieve specified field from the SysInfo file.
+ *
+ * Returns: the information associated with @field, or NULL if @field
+ * couldn't be found. g_free() after use
+ *
+ * Since: 0.4.0
+ */
+gchar *itdb_device_get_sysinfo (const Itdb_Device *device, const gchar *field)
+{
+    g_return_val_if_fail (device, NULL);
+    g_return_val_if_fail (device->sysinfo, NULL);
+    g_return_val_if_fail (field, NULL);
+
+    return g_strdup (g_hash_table_lookup (device->sysinfo, field));
+}
+
+/**
+ * itdb_device_set_sysinfo:
+ * @device: an #Itdb_Device
+ * @field:  field to set
+ * @value:  value to set (or NULL to remove the field).
+ *
+ * Set specified field. It can later be written to the iPod using
+ * itdb_device_write_sysinfo()
+ *
+ * Since: 0.4.0
+ */
+void itdb_device_set_sysinfo (Itdb_Device *device,
+			      const gchar *field, const gchar *value)
+{
+    g_return_if_fail (device);
+    g_return_if_fail (device->sysinfo);
+    g_return_if_fail (field);
+
+    if (field)
+    {
+	g_hash_table_insert (device->sysinfo,
+			     g_strdup (field), g_strdup (value));
+    }
+    else
+    {
+	g_hash_table_remove (device->sysinfo, field);
+    }
+    device->sysinfo_changed = TRUE;
+}
+
+
+/**
+ * itdb_device_get_ipod_info:
+ * @device: an #Itdb_Device
+ *
+ * Retrieve the #Itdb_IpodInfo entry for this iPod
+ *
+ * Returns: the #Itdb_IpodInfo entry for this iPod
+ *
+ * Since: 0.4.0
+ */
+const Itdb_IpodInfo *
+itdb_device_get_ipod_info (const Itdb_Device *device)
+{
+    gchar *model_num;
+    const Itdb_IpodInfo *info;
+
+    if (device->sysinfo_extended != NULL) {
+        const char *serial;
+
+        serial = itdb_sysinfo_properties_get_serial_number (device->sysinfo_extended);
+        info = get_ipod_info_from_serial (serial);
+        if (info != NULL) {
+            return info;
+        }
+    }
+
+    model_num = itdb_device_get_sysinfo (device, "ModelNumStr");
+
+    if (!model_num)
+	return &ipod_info_table[0];
+
+    info = get_ipod_info_from_model_number (model_num);
+    g_free(model_num);
+    if (info != NULL) {
+        return info;
+    } else {
+        return &ipod_info_table[1];
+    }
+}
+
+
+/* Return supported artwork formats supported by this iPod */
+static const ArtworkCapabilities *
+itdb_device_get_artwork_capabilities (const Itdb_Device *device)
+{
+    const Itdb_IpodInfo *info;
+    const ArtworkCapabilities *caps;
+
+    g_return_val_if_fail (device, NULL);
+
+    info = itdb_device_get_ipod_info (device);
+
+    g_return_val_if_fail (info, NULL);
+    caps = ipod_artwork_capabilities;
+    while (caps->generation != ITDB_IPOD_GENERATION_UNKNOWN) {
+        if (caps->generation == info->ipod_generation) {
+            break;
+        }
+        caps++;
+    }
+
+    if (caps->generation == ITDB_IPOD_GENERATION_UNKNOWN) {
+	return NULL;
+    }
+ 
+    return caps;
+}
+
+static GList *
+itdb_device_get_artwork_formats_fallback (const Itdb_Device *device, 
+					  enum ArtworkType type)
+{
+    const ArtworkCapabilities *caps;
+    const Itdb_ArtworkFormat *formats = NULL;
+    const Itdb_ArtworkFormat *it;
+    GList *artwork_formats = NULL;
+
+    caps = itdb_device_get_artwork_capabilities (device);
+    if (caps == NULL) {
+	return NULL;
+    }
+    switch (type) {
+	case ARTWORK_TYPE_COVER_ART:
+	    formats = caps->cover_art_formats;
+	    break;
+	case ARTWORK_TYPE_PHOTO:
+	    formats = caps->photo_formats;
+	    break;
+	case ARTWORK_TYPE_CHAPTER_IMAGE:
+	    formats = caps->chapter_image_formats;
+	    break;
+    }
+    if (formats == NULL) {
+        return NULL;
+    }
+
+    for (it = formats; it->format_id != -1; it++) {
+        artwork_formats = g_list_prepend (artwork_formats, (gpointer)it);
+    }
+
+    return artwork_formats;
+}
+
+GList *itdb_device_get_photo_formats (const Itdb_Device *device)
+{
+    g_return_val_if_fail (device != NULL, NULL);
+
+    if (device->sysinfo_extended == NULL) {
+        return itdb_device_get_artwork_formats_fallback (device,
+							 ARTWORK_TYPE_PHOTO);
+    } else {
+        return g_list_copy ((GList *)itdb_sysinfo_properties_get_photo_formats (device->sysinfo_extended));
+    }
+    g_return_val_if_reached (NULL);
+}
+
+GList *itdb_device_get_cover_art_formats (const Itdb_Device *device)
+{
+    g_return_val_if_fail (device != NULL, NULL);
+
+    if (device->sysinfo_extended == NULL) {
+        return itdb_device_get_artwork_formats_fallback (device,
+							 ARTWORK_TYPE_COVER_ART);
+    } else {
+        return g_list_copy ((GList *)itdb_sysinfo_properties_get_cover_art_formats (device->sysinfo_extended));
+    }
+    g_return_val_if_reached (NULL);
+}
+
+GList *itdb_device_get_chapter_image_formats (const Itdb_Device *device)
+{
+    g_return_val_if_fail (device != NULL, NULL);
+
+    if (device->sysinfo_extended == NULL) {
+        return itdb_device_get_artwork_formats_fallback (device,
+							 ARTWORK_TYPE_CHAPTER_IMAGE);
+    } else {
+        return g_list_copy ((GList *)itdb_sysinfo_properties_get_chapter_image_formats (device->sysinfo_extended));
+    }
+    g_return_val_if_reached (NULL);
+}
+
+G_GNUC_INTERNAL gboolean 
+itdb_device_supports_sparse_artwork (const Itdb_Device *device)
+{
+    gboolean supports_sparse_artwork = FALSE;
+
+    g_return_val_if_fail (device != NULL, FALSE);
+
+    if (device->sysinfo_extended != NULL) {
+        supports_sparse_artwork = itdb_sysinfo_properties_supports_sparse_artwork (device->sysinfo_extended);
+    }
+
+    if (supports_sparse_artwork == FALSE) {
+        const Itdb_IpodInfo *info;
+        info = itdb_device_get_ipod_info (device);
+        switch (info->ipod_generation) {
+            case ITDB_IPOD_GENERATION_UNKNOWN:
+            case ITDB_IPOD_GENERATION_FIRST:
+            case ITDB_IPOD_GENERATION_SECOND:
+            case ITDB_IPOD_GENERATION_THIRD:
+            case ITDB_IPOD_GENERATION_FOURTH:
+            case ITDB_IPOD_GENERATION_PHOTO:
+            case ITDB_IPOD_GENERATION_MOBILE:
+            case ITDB_IPOD_GENERATION_MINI_1:
+            case ITDB_IPOD_GENERATION_MINI_2:
+            case ITDB_IPOD_GENERATION_SHUFFLE_1:
+            case ITDB_IPOD_GENERATION_SHUFFLE_2:
+            case ITDB_IPOD_GENERATION_SHUFFLE_3:
+            case ITDB_IPOD_GENERATION_NANO_1:
+            case ITDB_IPOD_GENERATION_NANO_2:
+            case ITDB_IPOD_GENERATION_VIDEO_1:
+            case ITDB_IPOD_GENERATION_VIDEO_2:
+                supports_sparse_artwork = FALSE;
+                break;
+            case ITDB_IPOD_GENERATION_NANO_3:
+            case ITDB_IPOD_GENERATION_NANO_4:
+            case ITDB_IPOD_GENERATION_CLASSIC_1:
+            case ITDB_IPOD_GENERATION_CLASSIC_2:
+            case ITDB_IPOD_GENERATION_TOUCH_1:
+            case ITDB_IPOD_GENERATION_IPHONE_1:
+                supports_sparse_artwork = TRUE;
+                break;
+        }
+    }
+    return supports_sparse_artwork;
+}
+
+/* Determine the number of F.. directories in iPod_Control/Music.*/
+G_GNUC_INTERNAL gint
+itdb_musicdirs_number_by_mountpoint (const gchar *mountpoint)
+{
+    gint dir_num;
+    gchar *music_dir = itdb_get_music_dir (mountpoint);
+
+    if (!music_dir) return 0;
+
+    /* count number of dirs */
+    for (dir_num=0; ;++dir_num)
+    {
+	gchar *dir_filename;
+	gchar dir_num_str[6];
+
+	g_snprintf (dir_num_str, 6, "F%02d", dir_num);
+  
+	dir_filename = itdb_get_path (music_dir, dir_num_str);
+
+	g_free (dir_filename);
+	if (!dir_filename)  break;
+    }
+
+    g_free (music_dir);
+
+    return dir_num;
+}
+
+
+/* Determine the number of F.. directories in iPod_Control/Music.
+
+   If device->musicdirs is already set, simply return the previously
+   determined number. Otherwise count the directories first and set
+   itdb->musicdirs. */
+G_GNUC_INTERNAL gint
+itdb_device_musicdirs_number (Itdb_Device *device)
+{
+    g_return_val_if_fail (device, 0);
+
+    if (device->musicdirs <= 0)
+    {
+	device->musicdirs = itdb_musicdirs_number_by_mountpoint (device->mountpoint);
+    }
+    return device->musicdirs;
+}
+
+/*
+ * endianess_check_path:
+ * @path:   the file to look at.
+ * @hdr:    the header string (4 bytes) in case of LITTLE_ENDIAN
+ *
+ * Check if endianess can be determined by looking at header of @path.
+ *
+ * Returns: G_LITTLE_ENDIAN, G_BIG_ENDIAN or 0 if endianess could not be
+ * determined.
+ */
+static guint endianess_check_path (const gchar *path, const gchar *hdr)
+{
+    guint byte_order = 0;
+
+    if (path)
+    {
+	int fd = open (path, O_RDONLY);
+	if (fd != -1)
+	{
+	    gchar buf[4];
+	    if (read (fd, buf, 4) == 4)
+	    {
+		if (strncmp (buf, hdr, 4) == 0)
+		{
+		    byte_order = G_LITTLE_ENDIAN;
+		}
+		else
+		{
+		    if ((buf[0] == hdr[3]) &&
+			(buf[1] == hdr[2]) &&
+			(buf[2] == hdr[1]) &&
+			(buf[3] == hdr[0]))
+		    {
+			byte_order = G_BIG_ENDIAN;
+		    }
+		}
+	    }
+	    close (fd);
+	}
+    }
+    return byte_order;
+}
+
+/* Attempt to guess the endianess used by this iPod.
+ *
+ * It will overwrite the previous setting.
+ *
+ */
+G_GNUC_INTERNAL void
+itdb_device_autodetect_endianess (Itdb_Device *device)
+{
+    guint byte_order = 0;
+
+    g_return_if_fail (device);
+
+    if (device->mountpoint)
+    {
+	gchar *path;
+	if (byte_order == 0)
+	{
+	    /* First try reading the iTunesDB */
+	    path = itdb_get_itunesdb_path (device->mountpoint);
+	    byte_order = endianess_check_path (path, "mhbd");
+	    g_free (path);
+	}
+	if (byte_order == 0)
+	{
+	    /* Try reading the ArtworkDB */
+	    path = itdb_get_artworkdb_path (device->mountpoint);
+	    byte_order = endianess_check_path (path, "mhfd");
+	    g_free (path);
+	}
+	if (byte_order == 0)
+	{
+	    /* Try reading the Photos Database */
+	    path = itdb_get_photodb_path (device->mountpoint);
+	    byte_order = endianess_check_path (path, "mhfd");
+	    g_free (path);
+	}
+	if (byte_order == 0)
+	{
+	    gchar *control_dir = itdb_get_control_dir (device->mountpoint);
+	    if (control_dir)
+	    {
+		gchar *cd_l = g_ascii_strdown (control_dir, -1);
+		/* check if cd_l ends on "itunes/itunes_control" */
+		if (strstr (cd_l, "itunes/itunes_control") ==
+		    (cd_l + strlen (cd_l) - strlen ("itunes/itunes_control")))
+		{
+		    byte_order = G_BIG_ENDIAN;
+		}
+		g_free (cd_l);
+		g_free (control_dir);
+	    }
+	}
+    }
+
+    /* default: non-reversed */
+    if (byte_order == 0)
+	byte_order = G_LITTLE_ENDIAN;
+
+    device->byte_order = byte_order;
+}
+
+/*------------------------------------------------------------------*\
+ *                                                                  *
+ * Functions for applications to obtain general infos about various *
+ * iPods.                                                           *
+ *                                                                  *
+\*------------------------------------------------------------------*/
+
+/**
+ * itdb_info_get_ipod_info_table:
+ *
+ * Return a pointer to the start of valid iPod model descriptions,
+ * which is an array of #Itdb_IpodInfo entries. This can be useful if you
+ * want to build a list of all iPod models known to the current libgpod.
+ *
+ * Returns: a pointer to the array of #Itdb_IpodInfo entries.
+ *
+ * Since: 0.4.0
+ */
+const Itdb_IpodInfo *itdb_info_get_ipod_info_table (void)
+{
+    return &ipod_info_table[2];
+}
+
+
+/**
+ * itdb_info_get_ipod_model_name_string:
+ * @model: an #Itdb_IpodModel
+ *
+ * Return the iPod's generic model name, like "Color", "Nano"...
+ *
+ * Returns: a pointer to the model name. This is a static string
+ * and must not be g_free()d.
+ *
+ * Since: 0.4.0
+ */
+const gchar *itdb_info_get_ipod_model_name_string (Itdb_IpodModel model)
+{
+    gint i=0;
+
+    /* Instead of returning ipod_model_name_table[model] directly,
+       verify if @model is valid */
+    while (ipod_model_name_table[i])
+    {
+	if (i==model)  return gettext (ipod_model_name_table[i]);
+	++i;
+    }
+    return NULL;
+}
+
+
+/**
+ * itdb_info_get_ipod_generation_string:
+ * @generation: an #Itdb_IpodGeneration
+ *
+ * Return the iPod's generic generation name, like "First Generation",
+ * "Mobile Phone"...
+ *
+ * Returns: a pointer to the generation name. This is a static
+ * string and must not be g_free()d.
+ *
+ * Since: 0.4.0
+ */
+const gchar *itdb_info_get_ipod_generation_string (Itdb_IpodGeneration generation)
+{
+    gint i=0;
+
+    /* Instead of returning ipod_generation_name_table[generation]
+       directly, verify if @generation is valid */
+    while (ipod_generation_name_table[i])
+    {
+	if (i==generation)
+	    return gettext (ipod_generation_name_table[i]);
+	++i;
+    }
+    return NULL;
+}
+
+
+/**
+ * itdb_device_supports_artwork:
+ * @device: an #Itdb_Device
+ *
+ * Indicates whether @device can display artwork or not. When dealing
+ * with a non-art capable iPod, no artwork data will be written to the
+ * iPod so you can spare calls to the artwork handling methods.
+ *
+ * Returns: true if @device can display artwork.
+ *
+ * Since: 0.5.0
+ */
+gboolean itdb_device_supports_artwork (const Itdb_Device *device)
+{
+    GList *formats;
+    if (device == NULL) {
+        return FALSE;
+    }
+    formats = itdb_device_get_cover_art_formats (device);
+    g_list_free (formats);
+    return (formats != NULL);
+}
+
+
+/**
+ * itdb_device_supports_video:
+ * @device: an #Itdb_Device
+ *
+ * Indicates whether @device can play videos or not.
+ *
+ * Returns: true if @device can play videos.
+ *
+ * Since: 0.7.0
+ */
+gboolean itdb_device_supports_video (const Itdb_Device *device)
+{
+    const Itdb_IpodInfo *info;
+    if (device == NULL) {
+        return FALSE;
+    }
+
+    info = itdb_device_get_ipod_info (device);
+    switch (info->ipod_generation) {
+        case ITDB_IPOD_GENERATION_UNKNOWN:
+        case ITDB_IPOD_GENERATION_FIRST:
+        case ITDB_IPOD_GENERATION_SECOND:
+        case ITDB_IPOD_GENERATION_THIRD:
+        case ITDB_IPOD_GENERATION_FOURTH:
+        case ITDB_IPOD_GENERATION_PHOTO:
+        case ITDB_IPOD_GENERATION_MOBILE:
+        case ITDB_IPOD_GENERATION_MINI_1:
+        case ITDB_IPOD_GENERATION_MINI_2:
+        case ITDB_IPOD_GENERATION_SHUFFLE_1:
+        case ITDB_IPOD_GENERATION_SHUFFLE_2:
+        case ITDB_IPOD_GENERATION_SHUFFLE_3:
+        case ITDB_IPOD_GENERATION_NANO_1:
+        case ITDB_IPOD_GENERATION_NANO_2:
+            return FALSE;
+        case ITDB_IPOD_GENERATION_NANO_3:
+        case ITDB_IPOD_GENERATION_NANO_4:
+        case ITDB_IPOD_GENERATION_VIDEO_1:
+        case ITDB_IPOD_GENERATION_VIDEO_2:
+        case ITDB_IPOD_GENERATION_CLASSIC_1:
+	case ITDB_IPOD_GENERATION_CLASSIC_2:
+        case ITDB_IPOD_GENERATION_TOUCH_1:
+        case ITDB_IPOD_GENERATION_IPHONE_1:
+            return TRUE;
+    }
+    g_return_val_if_reached (FALSE);
+}
+
+
+/**
+ * itdb_device_supports_photo:
+ * @device: an #Itdb_Device
+ *
+ * Indicates whether @device can display photos or not.
+ *
+ * Returns: true if @device can display photos.
+ *
+ * Since: 0.5.0
+ */
+gboolean itdb_device_supports_photo (const Itdb_Device *device)
+{
+    GList *formats;
+    if (device == NULL) {
+        return FALSE;
+    }
+    formats = itdb_device_get_photo_formats (device);
+    g_list_free (formats);
+    return (formats != NULL);
+}
+
+/**
+ * itdb_device_supports_chapter_image:
+ * @device: an #Itdb_Device
+ *
+ * Indicates whether @device can display chapter images or not.
+ *
+ * Return value: true if @device can display chapter images.
+ *
+ * Since: 0.7.2
+ */
+gboolean itdb_device_supports_chapter_image (const Itdb_Device *device)
+{
+    GList *formats;
+    if (device == NULL) {
+        return FALSE;
+    }
+    formats = itdb_device_get_chapter_image_formats (device);
+    g_list_free (formats);
+    return (formats != NULL);
+}
+
+static char *
+get_preferences_path (const Itdb_Device *device)
+{
+
+    const gchar *p_preferences[] = {"Preferences", NULL};
+    char *dev_path;
+    char *prefs_filename;
+
+    if (device->mountpoint == NULL) {
+        return NULL;
+    }
+
+    dev_path = itdb_get_device_dir (device->mountpoint);
+
+    if (dev_path == NULL) {
+        return NULL;
+    }
+
+    prefs_filename = itdb_resolve_path (dev_path, p_preferences);
+    g_free (dev_path);
+
+    return prefs_filename;
+}
+
+static gboolean itdb_device_read_raw_timezone (const char *prefs_path,
+                                               glong offset,
+                                               gint16 *timezone)
+{
+    FILE *f;
+    int result;
+
+    if (timezone == NULL) {
+        return FALSE;
+    }
+
+    f = fopen (prefs_path, "r");
+    if (f == NULL) {
+        return FALSE;
+    }
+
+    result = fseek (f, offset, SEEK_SET);
+    if (result != 0) {
+        fclose (f);
+        return FALSE;
+    }
+
+    result = fread (timezone, sizeof (*timezone), 1, f);
+    if (result != 1) {
+        fclose (f);
+        return FALSE;
+    }
+
+    fclose (f);
+
+    *timezone = GINT16_FROM_LE (*timezone);
+
+    return TRUE;
+}
+
+static gboolean raw_timezone_to_utc_shift_4g (gint16 raw_timezone,
+                                              gint *utc_shift)
+{
+    const int GMT_OFFSET = 0x19;
+
+    if (utc_shift == NULL) {
+        return FALSE;
+    }
+
+    if ((raw_timezone < 0) || (raw_timezone > (2*12) << 1)) {
+        /* invalid timezone */
+        return FALSE;
+    }
+
+    raw_timezone -= GMT_OFFSET;
+
+    *utc_shift = (raw_timezone >> 1) * 3600;
+    if (raw_timezone & 1) {
+        /* Adjust for DST */
+        *utc_shift += 3600;
+    }
+
+    return TRUE;
+}
+
+static gboolean raw_timezone_to_utc_shift_5g (gint16 raw_timezone,
+                                              gint *utc_shift)
+{
+    const int TZ_SHIFT = 8;
+
+    if (utc_shift == NULL) {
+        return FALSE;
+    }
+    /* The iPod stores the timezone information as a number of minutes
+     * from Tokyo timezone which increases when going eastward (ie
+     * going from Tokyo to LA and then to Europe).
+     * The calculation below shifts the origin so that 0 corresponds
+     * to UTC-12 and the max is 24*60 and corresponds to UTC+12
+     * Finally, we substract 12*60 to that value to get a signed number
+     * giving the timezone relative to UTC.
+     */
+    *utc_shift = raw_timezone*60 - TZ_SHIFT*3600;
+
+    return TRUE;
+}
+
+static gint get_local_timezone (void)
+{
+#ifdef HAVE_STRUCT_TM_TM_GMTOFF
+    /*
+     * http://www.gnu.org/software/libc/manual/html_node/Time-Zone-Functions.html
+     *
+     * Variable: long int timezone
+     *
+     * This contains the difference between UTC and the latest local
+     * standard time, in seconds west of UTC. For example, in the
+     * U.S. Eastern time zone, the value is 5*60*60. Unlike the
+     * tm_gmtoff member of the broken-down time structure, this value is
+     * not adjusted for daylight saving, and its sign is reversed. In
+     * GNU programs it is better to use tm_gmtoff, since it contains the
+     * correct offset even when it is not the latest one.
+     */
+    time_t t = time(NULL);
+    glong seconds_east_utc;
+#   ifdef HAVE_LOCALTIME_R
+    {
+        struct tm tmb;
+        localtime_r(&t, &tmb);
+        seconds_east_utc = tmb.tm_gmtoff;
+    }
+#   else /* !HAVE_LOCALTIME_R */
+    {
+        struct tm* tp;
+        tp = localtime(&t);
+        seconds_east_utc = tp->tm_gmtoff;
+    }
+#   endif /* !HAVE_LOCALTIME_R */
+    return seconds_east_utc * -1; /* mimic the old behaviour when global variable 'timezone' from the 'time.h' header was returned */
+#elif __CYGWIN__   /* !HAVE_STRUCT_TM_TM_GMTOFF */
+    return (gint) _timezone; /* global variable defined by time.h, see man tzset */
+#else /* !HAVE_STRUCT_TM_TM_GMTOFF && !__CYGWIN__ */
+    return timezone; /* global variable defined by time.h, see man tzset */
+#endif
+}
+
+/* This function reads the timezone information from the iPod and sets it in
+ * the Itdb_Device structure. If an error occurs, the function returns silently
+ * and the timezone shift is set to 0
+ */
+static void itdb_device_set_timezone_info (Itdb_Device *device)
+{
+    gint16 raw_timezone;
+    gint timezone = 0;
+    gboolean result;
+    struct stat stat_buf;
+    int status;
+    char *prefs_path;
+
+    device->timezone_shift = get_local_timezone ();
+
+    prefs_path = get_preferences_path (device);
+
+    if (!prefs_path) {
+	return;
+    }
+
+    status = g_stat (prefs_path, &stat_buf);
+    if (status != 0) {
+	g_free (prefs_path);
+	return;
+    }
+    switch (stat_buf.st_size) {
+	case 2892:
+  	    result = itdb_device_read_raw_timezone (prefs_path, 0xb10, 
+			    			    &raw_timezone);
+	    g_free (prefs_path);
+	    if (!result) {
+                return;
+	    }
+	    result = raw_timezone_to_utc_shift_4g (raw_timezone, &timezone);
+	    break;
+	case 2924:
+            result = itdb_device_read_raw_timezone (prefs_path, 0xb22, 
+			                            &raw_timezone);
+	    g_free (prefs_path);
+	    if (!result) {
+                return;
+	    }
+	    result = raw_timezone_to_utc_shift_5g (raw_timezone, &timezone);
+	    break;
+	case 2952:
+	    /* ipod classic, not implemented yet */
+	default:
+	    /* We don't know how to get the timezone of this ipod model,
+	     * assume the computer timezone and the ipod timezone match
+	     */
+	    return; 
+    }
+
+    if ((timezone < -12*3600) || (timezone > 12 * 3600)) {
+        return;
+    }
+
+    device->timezone_shift = timezone;
+}
+
+/**
+ * itdb_device_get_firewire_id
+ * @device: an #Itdb_Device
+ *
+ * Returns the Firewire ID for @device, this is useful to calculate the 
+ * iTunesDB checksum which is expected by newer iPod models
+ * (iPod classic/fat nanos) and is needed on iPod plugged through USB contrary
+ * to what the name implies.
+ *
+ * Returns: the guint64 firewire id, or 0 if we don't know it
+ *
+ * Since: 0.6.0
+ */
+guint64 itdb_device_get_firewire_id (const Itdb_Device *device)
+{
+    const gchar *fwid = NULL;
+
+    if (device->sysinfo_extended != NULL) {
+	fwid = itdb_sysinfo_properties_get_firewire_id (device->sysinfo_extended);
+    }
+    if (fwid == NULL) {
+	    fwid = (const gchar *)g_hash_table_lookup (device->sysinfo,
+			                               "FirewireGuid");
+    }
+
+    if (fwid == NULL) {
+	return 0;
+    }
+
+    return g_ascii_strtoull (fwid, NULL, 16);
+}
+
+static ItdbChecksumType itdb_device_get_checksum_type (const Itdb_Device *device)
+{
+    const Itdb_IpodInfo *info;
+
+    if (device == NULL) {
+        return ITDB_CHECKSUM_NONE;
+    }
+
+    info = itdb_device_get_ipod_info (device);
+    if (info == NULL) {
+        return ITDB_CHECKSUM_NONE;
+    }
+
+    switch (info->ipod_generation) {
+    case ITDB_IPOD_GENERATION_CLASSIC_1: 
+    case ITDB_IPOD_GENERATION_CLASSIC_2:
+    case ITDB_IPOD_GENERATION_NANO_3:
+    case ITDB_IPOD_GENERATION_NANO_4:
+    case ITDB_IPOD_GENERATION_TOUCH_1:
+    case ITDB_IPOD_GENERATION_IPHONE_1:
+      return ITDB_CHECKSUM_HASH58;
+
+    case ITDB_IPOD_GENERATION_UNKNOWN:
+    case ITDB_IPOD_GENERATION_FIRST:
+    case ITDB_IPOD_GENERATION_SECOND:
+    case ITDB_IPOD_GENERATION_THIRD:
+    case ITDB_IPOD_GENERATION_FOURTH:
+    case ITDB_IPOD_GENERATION_PHOTO:
+    case ITDB_IPOD_GENERATION_MOBILE:
+    case ITDB_IPOD_GENERATION_MINI_1:
+    case ITDB_IPOD_GENERATION_MINI_2:
+    case ITDB_IPOD_GENERATION_SHUFFLE_1:
+    case ITDB_IPOD_GENERATION_SHUFFLE_2:
+    case ITDB_IPOD_GENERATION_SHUFFLE_3:
+    case ITDB_IPOD_GENERATION_NANO_1:
+    case ITDB_IPOD_GENERATION_NANO_2:
+    case ITDB_IPOD_GENERATION_VIDEO_1:
+    case ITDB_IPOD_GENERATION_VIDEO_2:
+            return ITDB_CHECKSUM_NONE;
+    }
+
+    return ITDB_CHECKSUM_NONE;
+}
+
+static gboolean itdb_device_write_hash58 (Itdb_Device *device, 
+					  unsigned char *itdb_data, 
+					  gsize itdb_len,
+					  GError **error)
+{
+    guint64 fwid;
+    guchar backup18[8];
+    guchar backup32[20];
+    unsigned char *checksum;
+    gsize len;
+    MhbdHeader *header;
+   
+    g_assert (itdb_device_get_checksum_type (device) == ITDB_CHECKSUM_HASH58);
+
+    fwid = itdb_device_get_firewire_id (device);
+    if (fwid == 0) {
+	g_set_error (error, 0, -1, "Couldn't find the iPod firewire ID");
+	return FALSE;
+    }
+
+    if (itdb_len < 0x6c) {
+	g_set_error (error, 0, -1, "iTunesDB file too small to write checksum");
+	return FALSE;
+    }
+
+    header = (MhbdHeader *)itdb_data;
+    g_assert (strncmp (header->header_id, "mhbd", strlen ("mhbd")) == 0);
+    memcpy (backup18, &header->db_id, sizeof (backup18));
+    memcpy (backup32, &header->unknown6, sizeof (backup32));
+
+    /* Those fields must be zero'ed out for the sha1 calculation */
+    memset(&header->db_id, 0, sizeof (header->db_id));
+    memset(&header->unknown6, 0, sizeof (header->unknown6));
+    memset(&header->hash58, 0, sizeof (header->hash58));
+
+    header->hashing_scheme = GUINT16_FROM_LE (ITDB_CHECKSUM_HASH58);
+
+    checksum = itdb_compute_hash (fwid, itdb_data, itdb_len, &len);
+    if (checksum == NULL) {
+	g_set_error (error, 0, -1, "Failed to compute checksum");
+	return FALSE;
+    }
+    g_assert (len <= sizeof (header->hash58));
+    memcpy (&header->hash58, checksum, len);
+    g_free (checksum);
+
+    memcpy (&header->db_id, backup18, sizeof (backup18));
+    memcpy (&header->unknown6, backup32, sizeof (backup32));
+
+    return TRUE;
+}
+
+G_GNUC_INTERNAL gboolean itdb_device_write_checksum (Itdb_Device *device, 
+						     unsigned char *itdb_data, 
+						     gsize itdb_len,
+						     GError **error)
+{
+    switch (itdb_device_get_checksum_type (device)) {
+	case ITDB_CHECKSUM_NONE:
+	    return TRUE;
+	case ITDB_CHECKSUM_HASH58:
+	    return itdb_device_write_hash58 (device, itdb_data, itdb_len, error);
+	case ITDB_CHECKSUM_HASH72:
+	    g_set_error (error, 0, -1, "Unsupported checksum type");
+	    return FALSE;
+    }	
+    g_assert_not_reached ();
+}
+
+#ifdef WIN32
+#include <windows.h>
+#else
+#include <sys/statvfs.h>
+#endif
+
+/**
+ * itdb_device_get_storage_info:
+ *
+ * @device:   an #Itdb_Device
+ * @capacity: returned capacity in bytes
+ * @free:     returned free space in bytes
+ *
+ * Return the storage info for this iPod
+ *
+ * Returns: TRUE if storage info could be obtained, FALSE otherwise
+ */
+gboolean itdb_device_get_storage_info (Itdb_Device *device, guint64 *capacity, guint64 *free)
+{
+#ifdef WIN32
+    ULARGE_INTEGER u_free, u_capacity;
+#else
+    struct statvfs info;
+    guint64 block_size;
+#endif
+
+    g_return_val_if_fail (device, FALSE);
+    g_return_val_if_fail (capacity, FALSE);
+    g_return_val_if_fail (free, FALSE);
+
+#ifdef WIN32
+    if (GetDiskFreeSpaceEx(device->mountpoint, &u_free, &u_capacity, NULL) == 0) {
+    	return FALSE;
+    }
+    *free = u_free.QuadPart;
+    *capacity = u_capacity.QuadPart;
+    return TRUE;
+#else
+    if (statvfs(device->mountpoint, &info))
+	return FALSE;
+
+    if (info.f_frsize > 0)
+	block_size = info.f_frsize;
+    else
+	block_size = info.f_bsize;
+
+    *capacity = info.f_blocks * block_size;
+    *free = info.f_bfree * block_size;
+
+    return TRUE;
+#endif
+}
+
+struct IpodModelTable {
+    GHashTable *serial_hash;
+    GHashTable *model_number_hash;
+};
+
+static struct IpodModelTable *init_ipod_model_table (void)
+{
+    const Itdb_IpodInfo *it;
+    struct IpodModelTable *model_table;
+    const ItdbSerialToModel *serial_it;
+
+    model_table = g_new0 (struct IpodModelTable, 1);
+    model_table->serial_hash = g_hash_table_new (g_str_hash, g_str_equal);
+    model_table->model_number_hash = g_hash_table_new (g_str_hash, g_str_equal);
+
+    for (it = itdb_info_get_ipod_info_table (); 
+         it->model_number != NULL; 
+         it++) {
+        g_hash_table_insert (model_table->model_number_hash, 
+                             (gpointer)it->model_number, (gpointer)it);
+    }
+
+    for (serial_it = serial_to_model_mapping; 
+         serial_it->serial != NULL; 
+         serial_it++) {
+        gpointer model_info;
+        model_info = g_hash_table_lookup (model_table->model_number_hash,
+                                          serial_it->model_number);
+        if (model_info != NULL) {
+            g_hash_table_insert (model_table->serial_hash, 
+                                 (gpointer)serial_it->serial, model_info);
+        } else {
+            g_warning ("Inconsistent ipod model tables, model info is missing for %s (serial %s)", 
+                       serial_it->model_number, serial_it->serial);
+        }
+    }
+
+    return model_table;
+}
+
+static struct IpodModelTable *get_model_table (void)
+{
+    static GOnce my_once = G_ONCE_INIT;
+
+    g_once (&my_once, (GThreadFunc)init_ipod_model_table, NULL);
+
+    return my_once.retval;
+}
+
+static const Itdb_IpodInfo *
+get_ipod_info_from_model_number (const char *model_number)
+{
+    struct IpodModelTable *model_table;
+
+    g_return_val_if_fail (model_number != NULL, NULL);
+
+    model_table = get_model_table ();
+    if(isalpha(model_number[0])) {
+	model_number++;
+    }
+    return g_hash_table_lookup (model_table->model_number_hash, model_number);
+}
+
+static const Itdb_IpodInfo *
+get_ipod_info_from_serial (const char *serial)
+{
+    struct IpodModelTable *model_table;
+    glong len;
+
+    g_return_val_if_fail (serial != NULL, NULL);
+
+    len = strlen (serial);
+    if (len < 3) {
+        return NULL;
+    }
+    model_table = get_model_table ();
+    /* The 3 last letters of the ipod serial number can be used to identify 
+     * the model
+     */
+    return g_hash_table_lookup (model_table->serial_hash, serial+len-3);
+}
+
+GQuark itdb_device_error_quark (void)
+{
+    static GQuark quark = 0;
+    if (!quark) {
+        quark = g_quark_from_static_string ("itdb-device-error-quark");
+    }
+    return quark;
+}
+
+/**
+ * itdb_device_supports_podcast:
+ * @device: an #Itdb_Device
+ *
+ * Indicates whether @device can play podcasts or not.
+ *
+ * Returns: true if @device can play podcasts.
+ *
+ * Since: 0.7.2
+ */
+gboolean
+itdb_device_supports_podcast (const Itdb_Device *device)
+{
+    if (device->sysinfo_extended != NULL) {
+    	return itdb_sysinfo_properties_supports_podcast (device->sysinfo_extended);
+    } else {
+	const Itdb_IpodInfo *info;
+
+	info = itdb_device_get_ipod_info (device);
+	switch (info->ipod_generation) {
+	    case ITDB_IPOD_GENERATION_UNKNOWN:
+	    case ITDB_IPOD_GENERATION_FIRST:
+	    case ITDB_IPOD_GENERATION_SECOND:
+	    case ITDB_IPOD_GENERATION_THIRD:
+	    case ITDB_IPOD_GENERATION_MOBILE:
+		return FALSE;
+	    case ITDB_IPOD_GENERATION_FOURTH:
+	    case ITDB_IPOD_GENERATION_PHOTO:
+	    case ITDB_IPOD_GENERATION_MINI_1:
+	    case ITDB_IPOD_GENERATION_MINI_2:
+	    case ITDB_IPOD_GENERATION_NANO_1:
+	    case ITDB_IPOD_GENERATION_NANO_2:
+	    case ITDB_IPOD_GENERATION_NANO_3:
+	    case ITDB_IPOD_GENERATION_NANO_4:
+	    case ITDB_IPOD_GENERATION_SHUFFLE_1:
+	    case ITDB_IPOD_GENERATION_SHUFFLE_2:
+	    case ITDB_IPOD_GENERATION_SHUFFLE_3:
+	    case ITDB_IPOD_GENERATION_VIDEO_1:
+	    case ITDB_IPOD_GENERATION_VIDEO_2:
+	    case ITDB_IPOD_GENERATION_CLASSIC_1:
+	    case ITDB_IPOD_GENERATION_CLASSIC_2:
+	    case ITDB_IPOD_GENERATION_TOUCH_1:
+	    case ITDB_IPOD_GENERATION_IPHONE_1:
+		return TRUE;
+	}
+	g_return_val_if_reached (FALSE);
+    }
+}

Added: libgpod/trunk/libgpod/branches/upstream/current/src/itdb_device.h
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/itdb_device.h	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/itdb_device.h	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,177 @@
+/*
+|  Copyright (C) 2002-2007 Jorg Schuler <jcsjcs at users sourceforge net>
+|  Part of the gtkpod project.
+|
+|  URL: http://www.gtkpod.org/
+|  URL: http://gtkpod.sourceforge.net/
+|
+|  Most of the code in this file has been ported from the perl
+|  script "mktunes.pl" (part of the gnupod-tools collection) written
+|  by Adrian Ulrich <pab at blinkenlights.ch>.
+|
+|  gnupod-tools: http://www.blinkenlights.ch/cgi-bin/fm.pl?get=ipod
+|
+|  The code contained in this file is free software; you can redistribute
+|  it and/or modify it under the terms of the GNU Lesser General Public
+|  License as published by the Free Software Foundation; either version
+|  2.1 of the License, or (at your option) any later version.
+|
+|  This file 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
+|  Lesser General Public License for more details.
+|
+|  You should have received a copy of the GNU Lesser General Public
+|  License along with this code; if not, write to the Free Software
+|  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+|
+|  iTunes and iPod are trademarks of Apple
+|
+|  This product is not supported/written/published by Apple!
+|
+|  $Id: itdb_device.h 2272 2009-03-14 18:02:16Z teuf $
+*/
+
+#ifndef __ITDB_DEVICE_H__
+#define __ITDB_DEVICE_H__
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include "itdb.h"
+#include "itdb_sysinfo_extended_parser.h"
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+typedef enum _ItdbThumbFormat ItdbThumbFormat;
+
+enum _ItdbThumbFormat
+{
+    THUMB_FORMAT_UYVY_LE,
+    THUMB_FORMAT_UYVY_BE,
+    THUMB_FORMAT_I420_LE,
+    THUMB_FORMAT_I420_BE,
+    THUMB_FORMAT_RGB565_LE,
+    THUMB_FORMAT_RGB565_LE_90,
+    THUMB_FORMAT_RGB565_BE,
+    THUMB_FORMAT_RGB565_BE_90,
+    THUMB_FORMAT_RGB555_LE,
+    THUMB_FORMAT_RGB555_LE_90,
+    THUMB_FORMAT_RGB555_BE,
+    THUMB_FORMAT_RGB555_BE_90,
+    THUMB_FORMAT_REC_RGB555_LE,
+    THUMB_FORMAT_REC_RGB555_LE_90,
+    THUMB_FORMAT_REC_RGB555_BE,
+    THUMB_FORMAT_REC_RGB555_BE_90,
+    THUMB_FORMAT_RGB888_LE,
+    THUMB_FORMAT_RGB888_LE_90,
+    THUMB_FORMAT_RGB888_BE,
+    THUMB_FORMAT_RGB888_BE_90,
+    THUMB_FORMAT_EXPERIMENTAL_LE,
+    THUMB_FORMAT_EXPERIMENTAL_BE,
+};
+
+typedef enum _ItdbChecksumType ItdbChecksumType;
+enum _ItdbChecksumType {
+    ITDB_CHECKSUM_NONE		= 0,
+    ITDB_CHECKSUM_HASH58	= 1,
+    ITDB_CHECKSUM_HASH72	= 2
+};
+
+/**
+ * Itdb_Device:
+ * @mountpoint:         The mountpoint of the iPod
+ * @musicdirs:          The number of /iPod_Control/Music/F.. dirs
+ * @byte_order:         G_LITTLE_ENDIAN "regular" endianness G_BIG_ENDIAN
+ *                      "reversed" endianness (e.g. mobile phone iTunesDBs)
+ * @sysinfo:            A hash with key/value pairs of all entries in
+ *                      Device/SysInfo
+ * @sysinfo_extended:   The parsed content of SysInfoExtended, which can be NULL
+ * @sysinfo_changed:    True if the sysinfo hash been changed by the user, false
+ *                      otherwise.  (see itdb_set_sysinfo())
+ * @timezone_shift:     The difference in seconds between the current timezone
+ *                      and UTC
+ *
+ * Structure representing an iPod device
+ *
+ * Since: 0.4.0
+ */
+struct _Itdb_Device
+{
+    gchar *mountpoint;
+    gint   musicdirs;
+    guint  byte_order;
+    GHashTable *sysinfo;
+    SysInfoIpodProperties *sysinfo_extended;
+    gboolean sysinfo_changed;
+    gint timezone_shift;
+};
+
+/**
+ * Itdb_ArtworkFormat:
+ * @format_id:          Unique ID for the format (generally a 4 digit int)
+ * @width:              Width of the thumbnail
+ * @height:             Height of the thumbnail
+ * @format:             Pixel format of the thumbnail (RGB, YUV, ...)
+ * @padding:            Number of bytes of padding to add after the thumbnail
+ *                      (not found in SysInfoExtended -- added for
+ *                      compatibility with hardcoded artwork formats)
+ * @crop:               Indicates if the thumbnail is to be cropped
+ * @rotation:           Degrees to rotate the thumbnail
+ * @back_color:         Background color for the thumbnail
+ * @display_width:      Width at which the thumbnail will be displayed
+ *                      (not currently used)
+ * @interlaced:         If TRUE, the thumbnails are interlaced
+ *                      (not currently used)
+ * @align_row_bytes:    If TRUE, each pixel row must be aligned a 2-byte boundary
+ * @color_adjustment:   Color adjustment for the thumbnails
+ *                      (not currently used)
+ * @gamma:              Gamma value for the thumbails
+ *                      (not currently used)
+ * @associated_format:  Unknown (not currently used)
+ *
+ * Structure representing the characteristics of the thumbnails to
+ * write to a given .ithmb file. The format of the structure is based
+ * on the way artwork formats are written to SysInfoExtended.
+ */
+struct _Itdb_ArtworkFormat {
+        gint format_id;
+        gint width;
+        gint height;
+        ItdbThumbFormat format;
+        gint32 padding;
+        gboolean crop;
+        gint rotation;
+        guchar back_color[4];
+
+        gint display_width;
+        gboolean interlaced;
+        gboolean align_row_bytes;
+        gint color_adjustment;
+        gdouble gamma;
+        gint associated_format;
+};
+
+/* Error domain */
+#define ITDB_DEVICE_ERROR itdb_device_error_quark ()
+GQuark     itdb_device_error_quark      (void);
+
+G_GNUC_INTERNAL GList *itdb_device_get_photo_formats (const Itdb_Device *device);
+G_GNUC_INTERNAL GList *itdb_device_get_cover_art_formats (const Itdb_Device *device);
+G_GNUC_INTERNAL GList *itdb_device_get_chapter_image_formats (const Itdb_Device *device);
+G_GNUC_INTERNAL gint itdb_device_musicdirs_number (Itdb_Device *device);
+G_GNUC_INTERNAL void itdb_device_autodetect_endianess (Itdb_Device *device);
+G_GNUC_INTERNAL guint64 itdb_device_get_firewire_id (const Itdb_Device *device);
+G_GNUC_INTERNAL gboolean itdb_device_supports_sparse_artwork (const Itdb_Device *device);
+G_GNUC_INTERNAL gboolean itdb_device_get_storage_info (Itdb_Device *device, guint64 *capacity, guint64 *free);
+G_GNUC_INTERNAL gboolean itdb_device_write_checksum (Itdb_Device *device,
+						     unsigned char *itdb_data,
+						     gsize itdb_len,
+						     GError **error);
+
+G_END_DECLS
+
+#endif

Added: libgpod/trunk/libgpod/branches/upstream/current/src/itdb_endianness.h
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/itdb_endianness.h	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/itdb_endianness.h	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,92 @@
+/*
+ *  Copyright (C) 2005 Christophe Fergeau
+ *
+ * 
+ *  The code contained in this file is free software; you can redistribute
+ *  it and/or modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either version
+ *  2.1 of the License, or (at your option) any later version.
+ *  
+ *  This file 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
+ *  Lesser General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this code; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ *  02111-1307 USA
+ * 
+ *  iTunes and iPod are trademarks of Apple
+ * 
+ *  This product is not supported/written/published by Apple!
+ *
+ *  $Id: itdb_endianness.h 1299 2006-06-04 16:24:45Z jcsjcs $
+ */
+
+#ifndef __ITDB_ENDIANNESS_H__
+#define __ITDB_ENDIANNESS_H__
+
+#include <glib.h>
+#include "itdb.h"
+#include "itdb_device.h"
+#include "itdb_private.h"
+
+#define DB_TO_CPU_GET(lower_case_type, upper_case_type) \
+    static inline lower_case_type \
+    get_##lower_case_type (lower_case_type val, guint byte_order) \
+    { \
+        if (byte_order == G_BIG_ENDIAN) { \
+            return upper_case_type##_FROM_BE (val); \
+        } else if (byte_order == G_LITTLE_ENDIAN) { \
+            return upper_case_type##_FROM_LE (val); \
+	} else { \
+  	    g_assert_not_reached ();  \
+	} \
+        return 0;  /* never reached */ \
+    }
+/*
+#define DB_TO_CPU_GET_DB(lower_case_type, upper_case_type) \
+    DB_TO_CPU_GET(lower_case_type, upper_case_type) \
+    static inline lower_case_type \
+    get_##lower_case_type##_db (Itdb_iTunesDB *db, lower_case_type val) \
+    { \
+        g_assert (db->device != NULL); \
+        return get_##lower_case_type (val, db->device->byte_order); \
+}
+*/
+
+#define DB_TO_CPU_GET_DB(lower_case_type, upper_case_type) \
+    DB_TO_CPU_GET(lower_case_type, upper_case_type) \
+    static inline lower_case_type \
+    get_##lower_case_type##_db (Itdb_DB *db, lower_case_type val) \
+    { \
+	g_assert (db_get_device(db) != NULL); \
+	return get_##lower_case_type (val, db_get_device(db)->byte_order); \
+    }
+
+DB_TO_CPU_GET_DB(guint32, GUINT32)
+DB_TO_CPU_GET_DB(gint32, GINT32)
+DB_TO_CPU_GET_DB(gint16, GINT16)
+DB_TO_CPU_GET_DB(gint64, GINT64)
+
+/* OK, for 'normal' people an effective summary of what this file is
+ * doing:
+ *
+ * The following inline functions are defined:
+ *
+ * guint32 get_guint32 (guint32 val, guint byte_order);
+ * guint32 get_gint32 (gint32 val, guint byte_order);
+ * guint32 get_gint16 (gint16 val, guint byte_order);
+ * guint32 get_gint64 (gint64 val, guint byte_order);
+ * guint32 get_guint32_db (guint32 val, guint byte_order);
+ * guint32 get_gint32_db (gint32 val, guint byte_order);
+ * guint32 get_gint16_db (gint16 val, guint byte_order);
+ * guint32 get_gint64_db (gint64 val, guint byte_order);
+ *
+
+ * They are used to retrieve integer data from or store integer data
+ * to the iPod's databases which may use a different byte order
+ * (@byte_order) than the host system on which this library runs on.
+ */
+#endif

Added: libgpod/trunk/libgpod/branches/upstream/current/src/itdb_itunesdb.c
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/itdb_itunesdb.c	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/itdb_itunesdb.c	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,7198 @@
+/*
+|  Copyright (C) 2002-2007 Jorg Schuler <jcsjcs at users sourceforge net>
+|  Part of the gtkpod project.
+| 
+|  URL: http://www.gtkpod.org/
+|  URL: http://gtkpod.sourceforge.net/
+|
+|  Much of the code in this file has originally been ported from the
+|  perl script "mktunes.pl" (part of the gnupod-tools collection)
+|  written by Adrian Ulrich <pab at blinkenlights.ch>:
+|
+|  gnupod-tools: http://www.blinkenlights.ch/cgi-bin/fm.pl?get=ipod
+|
+|  The code contained in this file is free software; you can redistribute
+|  it and/or modify it under the terms of the GNU Lesser General Public
+|  License as published by the Free Software Foundation; either version
+|  2.1 of the License, or (at your option) any later version.
+|
+|  This file 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
+|  Lesser General Public License for more details.
+|
+|  You should have received a copy of the GNU Lesser General Public
+|  License along with this code; if not, write to the Free Software
+|  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+|  USA
+|
+|  iTunes and iPod are trademarks of Apple
+|
+|  This product is not supported/written/published by Apple!
+|
+|  $Id: itdb_itunesdb.c 2306 2009-04-05 15:41:56Z teuf $
+*/
+
+/* Some notes on how to use the functions in this file:
+
+
+   *** Reading the iTunesDB ***
+
+   Itdb_iTunesDB *itunesdb_parse (gchar *path); /+ path to mountpoint +/
+   will read an Itdb_iTunesDB and pass the data over to your program.
+
+   The information given in the "Play Counts" file is also read if
+   available and the playcounts, star rating and the time last played
+   is updated.
+
+   Itdb_iTunesDB is a structure containing a GList for the tracks and a
+   GList for the playlists.
+
+   For each track these fields are set as follows:
+
+   "transferred" will be set to TRUE because all tracks read from a
+   Itdb_iTunesDB are obviously (or hopefully) already transferred to the
+   iPod.
+
+   "recent_playcount" is for information only (it will allow to
+   generate playlists with tracks played since the last time) and will
+   not be stored to the iPod.
+
+   The master playlist is guaranteed to be the first playlist, and
+   this must not be changed by your code.
+
+
+   *** Writing the Itdb_iTunesDB ***
+
+   gboolean itunesdb_write (gchar *path, Itdb_iTunesDB *itb)
+   /+ @path to mountpoint, itb to @write +/
+   will write an updated version of the Itdb_iTunesDB.
+
+   The "Play Counts" file is renamed to "Play Counts.bak" if it exists
+   to avoid reading it multiple times.
+
+   Please note that non-transferred tracks are not automatically
+   transferred to the iPod. A function
+
+   gboolean itunesdb_copy_track_to_ipod (gchar *path, Itdb_Track *track, gchar *pcfile)
+
+   is provided to help you do that, however.
+
+   The following functions most likely will be useful:
+
+   Itdb_Track *itunesdb_new_track (void);
+   Use itunesdb_new_track() to get an "initialized" track structure
+   (the "unknowns" are initialized with reasonable values).
+
+   gboolean itunesdb_cp (gchar *from_file, gchar *to_file);
+   void itunesdb_convert_filename_fs2ipod(gchar *ipod_file);
+   void itunesdb_convert_filename_ipod2fs(gchar *ipod_file);
+
+   void itunesdb_rename_files (const gchar *dirname);
+
+   (Renames/removes some files on the iPod (Playcounts, OTG
+   semaphore). Needs to be called if you write the Itdb_iTunesDB not
+   directly to the iPod but to some other location and then manually
+   copy the file from there to the iPod. That's much faster in the
+   case of using an iPod mounted in sync'ed mode.)
+
+   Jorg Schuler, 29.12.2004 */
+
+
+/* call itdb_parse () to read the Itdb_iTunesDB  */
+/* call itdb_write () to write the Itdb_iTunesDB */
+
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include "db-artwork-parser.h"
+#include "itdb_device.h"
+#include "itdb_private.h"
+#include "itdb_sha1.h"
+
+#include <errno.h>
+#include <fcntl.h>
+#include <glib-object.h>
+#include <glib/gi18n-lib.h>
+#include <glib/gstdio.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#include <time.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#define ITUNESDB_DEBUG 0
+#define ITUNESDB_MHIT_DEBUG 0
+
+#define ITUNESDB_COPYBLK (1024*1024*4)      /* blocksize for cp () */
+
+
+/* NOTE for developers:
+
+   Sometimes new MHOD string fields are added by Apple in the
+   iTunesDB. In that case you need to modify the code in the following
+   places:
+
+   itdb_itunesdb.c:
+   - enum MHOD_ID
+   - get_mhod(): inside the switch() statement. Currently no compiler
+     warning is given.
+   - get_mhod_string(): inside the switch() statement. A compiler warning
+     will help you find it.
+   - get_playlist(): inside the switch() statement. A compiler warning
+     will help you find it.
+   - get_mhit(): inside the switch() statement. A compiler warning
+     will help you find it.
+   - mk_mhod(): inside the switch() statement. A compiler warning
+     will help you find it.
+   - write_mhsd_tracks(): inside the for() loop.
+
+   itdb_track.c:
+   - itdb_track_free()
+   - itdb_track_duplicate()
+
+   itdb_playlists.c:
+   Analogous to itdb_track.c in case the string is part of the playlist
+   description.
+*/
+
+/* Note: some of the comments for the MHOD_IDs are copied verbatim
+ * from http://ipodlinux.org/ITunesDB */
+enum MHOD_ID {
+  MHOD_ID_TITLE = 1,
+  MHOD_ID_PATH = 2,   /* file path on iPod (special format) */
+  MHOD_ID_ALBUM = 3,
+  MHOD_ID_ARTIST = 4,
+  MHOD_ID_GENRE = 5,
+  MHOD_ID_FILETYPE = 6,
+/* MHOD_ID_EQSETTING = 7, */
+  MHOD_ID_COMMENT = 8,
+  /* Category - This is the category ("Technology", "Music", etc.) where
+     the podcast was located. Introduced in db version 0x0d. */
+  MHOD_ID_CATEGORY = 9,
+  MHOD_ID_COMPOSER = 12,
+  MHOD_ID_GROUPING = 13,
+  /* Description text (such as podcast show notes). Accessible by
+     wselecting the center button on the iPod, where this string is
+     displayed along with the song title, date, and
+     timestamp. Introduced in db version 0x0d. */
+  MHOD_ID_DESCRIPTION = 14,
+  /* Podcast Enclosure URL. Note: this is either a UTF-8 or ASCII
+     encoded string (NOT UTF-16). Also, there is no mhod::length value
+     for this type. Introduced in db version 0x0d.  */
+  MHOD_ID_PODCASTURL = 15,
+  /* Podcast RSS URL. Note: this is either a UTF-8 or ASCII encoded
+     string (NOT UTF-16). Also, there is no mhod::length value for this
+     type. Introduced in db version 0x0d. */
+  MHOD_ID_PODCASTRSS = 16,
+  /* Chapter data. This is a m4a-style entry that is used to display
+     subsongs within a mhit. Introduced in db version 0x0d. */
+  MHOD_ID_CHAPTERDATA = 17,
+  /* Subtitle (usually the same as Description). Introduced in db
+     version 0x0d. */
+  MHOD_ID_SUBTITLE = 18,
+  /* Show (for TV Shows only). Introduced in db version 0x0d? */
+  MHOD_ID_TVSHOW = 19, 
+  /* Episode # (for TV Shows only). Introduced in db version 0x0d? */
+  MHOD_ID_TVEPISODE = 20,
+  /* TV Network (for TV Shows only). Introduced in db version 0x0d? */
+  MHOD_ID_TVNETWORK = 21,
+  /* Album Artist. Introduced in db version 0x13? */
+  MHOD_ID_ALBUMARTIST = 22,
+  /* Sort key for artist. */
+  MHOD_ID_SORT_ARTIST = 23,
+  /* Appears to be a list of keywords pertaining to a track. Introduced
+     in db version 0x13? */
+  MHOD_ID_KEYWORDS = 24,
+  /* more sort keys, taking precedence over the standard entries if
+     present */
+  MHOD_ID_SORT_TITLE = 27,
+  MHOD_ID_SORT_ALBUM = 28,
+  MHOD_ID_SORT_ALBUMARTIST = 29,
+  MHOD_ID_SORT_COMPOSER = 30,
+  MHOD_ID_SORT_TVSHOW = 31,
+  MHOD_ID_SPLPREF = 50,  /* settings for smart playlist */
+  MHOD_ID_SPLRULES = 51, /* rules for smart playlist     */
+  MHOD_ID_LIBPLAYLISTINDEX = 52,  /* Library Playlist Index */
+  MHOD_ID_LIBPLAYLISTJUMPTABLE=53,
+  MHOD_ID_PLAYLIST = 100,
+  MHOD_ID_ALBUM_ALBUM = 200, /* MHODs for the MHIAs */
+  MHOD_ID_ALBUM_ARTIST = 201,
+  MHOD_ID_ALBUM_SORT_ARTIST = 202
+};
+
+
+/* Used as first iPod ID when renumbering (re-assigning) the iPod
+   (track) IDs before writing out the iTunesDB. */
+static const gint FIRST_IPOD_ID=52;
+
+
+enum MHOD52_SORTTYPE {
+    MHOD52_SORTTYPE_TITLE    = 0x03,
+    MHOD52_SORTTYPE_ALBUM    = 0x04,
+    MHOD52_SORTTYPE_ARTIST   = 0x05,
+    MHOD52_SORTTYPE_GENRE    = 0x07,
+    MHOD52_SORTTYPE_COMPOSER = 0x12/*,
+    MHOD52_SORTTYPE_TVSHOW   = 0x1d,
+    MHOD52_SORTTYPE_TVSEASON = 0x1e,
+    MHOD52_SORTTYPE_TVEPISODE= 0x1f*/
+};
+
+struct mhod52track
+{
+    gchar *album;
+    gchar *title;
+    gchar *artist;
+    gchar *genre;
+    gchar *composer;
+    gint track_nr;
+    gint cd_nr;
+    gint index;
+    gint numtracks;
+    gunichar2 letter_album;
+    gunichar2 letter_title;
+    gunichar2 letter_artist;
+    gunichar2 letter_genre;
+    gunichar2 letter_composer;
+};
+
+struct mhod53_entry
+{
+    gunichar2 letter;
+    gint32 start;
+    gint32 count;
+};
+
+struct _MHODData
+{
+    gboolean valid;
+    gint32 type;
+    union
+    {
+	gint32 track_pos;
+	gchar *string;
+	Itdb_Chapterdata *chapterdata;
+	Itdb_SPLPref *splpref;
+	Itdb_SPLRules *splrules;
+	GList *mhod52coltracks;
+    } data;
+    enum MHOD52_SORTTYPE mhod52sorttype;
+    GList *mhod53_list;
+};
+
+typedef struct _MHODData MHODData;
+
+struct _PosEntry {
+    guint32 trackid;
+    gint32 track_pos;
+};
+
+typedef struct _PosEntry PosEntry;
+
+/* Declarations */
+static gboolean itdb_create_directories (Itdb_Device *device, GError **error);
+
+/* ID for error domain */
+GQuark itdb_file_error_quark (void)
+{
+    static GQuark q = 0;
+    if (q == 0)
+	q = g_quark_from_static_string ("itdb-file-error-quark");
+    return q;
+}
+
+
+static guint16 raw_get16lint (FContents *cts, glong seek);
+static guint32 raw_get24lint (FContents *cts, glong seek);
+static guint32 raw_get32lint (FContents *cts, glong seek);
+static guint64 raw_get64lint (FContents *cts, glong seek);
+static float raw_get32lfloat (FContents *cts, glong seek);
+static guint16 raw_get16bint (FContents *cts, glong seek);
+static guint32 raw_get24bint (FContents *cts, glong seek);
+static guint32 raw_get32bint (FContents *cts, glong seek);
+static guint64 raw_get64bint (FContents *cts, glong seek);
+static float raw_get32bfloat (FContents *cts, glong seek);
+
+static const ByteReader LITTLE_ENDIAN_READER =
+{
+    raw_get16lint, raw_get24lint, raw_get32lint, raw_get64lint, raw_get32lfloat
+};
+static const ByteReader BIG_ENDIAN_READER =
+{
+    raw_get16bint, raw_get24bint, raw_get32bint, raw_get64bint, raw_get32bfloat
+};
+
+static void fcontents_set_reversed(FContents *cts, gboolean reversed)
+{
+    cts->reversed = reversed;
+    if (!reversed)
+    {
+	memcpy(&cts->le_reader, &LITTLE_ENDIAN_READER, sizeof (ByteReader));
+	memcpy(&cts->be_reader, &BIG_ENDIAN_READER, sizeof (ByteReader));
+    }
+    else
+    {
+	memcpy(&cts->le_reader, &BIG_ENDIAN_READER, sizeof (ByteReader));
+	memcpy(&cts->be_reader, &LITTLE_ENDIAN_READER, sizeof (ByteReader));
+    }
+}
+
+/* Read the contents of @filename and return a FContents
+   struct. Returns NULL in case of error and @error is set
+   accordingly */
+static FContents *fcontents_read (const gchar *fname, GError **error)
+{
+    FContents *cts;
+
+    g_return_val_if_fail (fname, NULL);
+
+    cts = g_new0 (FContents, 1);
+    fcontents_set_reversed (cts, FALSE);
+
+    if (g_file_get_contents (fname, &cts->contents, &cts->length, error))
+    {
+	cts->filename = g_strdup (fname);
+    }
+    else
+    {
+	g_free (cts);
+	cts = NULL;
+    }
+    return cts;
+}
+
+
+/* Frees the memory taken by a FContents structure. NULL pointer will
+ * be ignored */
+static void fcontents_free (FContents *cts)
+{
+    if (cts)
+    {
+	g_free (cts->filename);
+	g_free (cts->contents);
+	/* must not g_error_free (cts->error) because the error was
+	   propagated -> might free the error twice */
+	g_free (cts);
+    }
+}
+
+
+/* There seems to be a problem with some distributions (kernel
+   versions or whatever -- even identical version numbers don't don't
+   show identical behaviour...): even though vfat is supposed to be
+   case insensitive, a difference is made between upper and lower case
+   under some special circumstances. As in "/iPod_Control/Music/F00"
+   and "/iPod_Control/Music/f00 "... If the former filename does not
+   exist, we try to find an existing case insensitive match for each
+   component of the filename.  If we can find such a match, we return
+   it.  Otherwise, we return NULL.*/
+     
+/**
+ * itdb_resolve_path:
+ * @root: in local encoding
+ * @components: in utf8
+ *
+ * Resolve the path to a track on the iPod
+ *
+ * We start by assuming that the iPod mount point exists.  Then, for
+ * each component c of @track->ipod_path, we try to find an entry d in
+ * good_path that is case-insensitively equal to c.  If we find d, we
+ * append d to good_path and make the result the new good_path.
+ * Otherwise, we quit and return NULL.
+ *
+ * Returns: path to track on the iPod or NULL.
+ */
+gchar * itdb_resolve_path (const gchar *root,
+			   const gchar * const * components)
+{
+  gchar *good_path = g_strdup(root);
+  guint32 i;
+
+  if (!root) return NULL;
+
+  for(i = 0 ; components[i] ; i++) {
+    GDir *cur_dir;
+    gchar *component_as_filename;
+    gchar *test_path;
+    gchar *component_stdcase;
+    const gchar *dir_file=NULL;
+
+    /* skip empty components */
+    if (strlen (components[i]) == 0) continue;
+    component_as_filename = 
+      g_filename_from_utf8(components[i],-1,NULL,NULL,NULL);
+    test_path = g_build_filename(good_path,component_as_filename,NULL);
+    g_free(component_as_filename);
+    if(g_file_test(test_path,G_FILE_TEST_EXISTS)) {
+      /* This component does not require fixup */
+      g_free(good_path);
+      good_path = test_path;
+      continue;
+    }
+    g_free(test_path);
+    component_stdcase = g_utf8_casefold(components[i],-1);
+    /* Case insensitively compare the current component with each entry
+     * in the current directory. */
+
+    cur_dir = g_dir_open(good_path,0,NULL);
+    if (cur_dir) while ((dir_file = g_dir_read_name(cur_dir)))
+    {
+	gchar *file_utf8;
+	gchar *file_stdcase;
+	gboolean found;
+	gchar *new_good_path;
+      
+	file_utf8 = g_filename_to_utf8(dir_file,-1,NULL,NULL,NULL);
+	if (file_utf8 == NULL) {
+	    continue;
+	}
+	file_stdcase = g_utf8_casefold(file_utf8,-1);
+	found = !g_utf8_collate(file_stdcase,component_stdcase);
+	g_free(file_stdcase);
+	if(!found)
+	{
+	    /* This is not the matching entry */
+	    g_free(file_utf8);
+	    continue;
+	}
+      
+	new_good_path = dir_file ? g_build_filename(good_path,dir_file,NULL) : NULL;
+	g_free(good_path);
+	good_path= new_good_path;
+	/* This is the matching entry, so we can stop searching */
+	break;
+    }
+    
+    if(!dir_file) {
+      /* We never found a matching entry */
+      g_free(good_path);
+      good_path = NULL;
+    }
+
+    g_free(component_stdcase);
+    if (cur_dir) g_dir_close(cur_dir);
+    if(!good_path || !g_file_test(good_path,G_FILE_TEST_EXISTS))
+      break; /* We couldn't fix this component, so don't try later ones */
+  }
+    
+  if(good_path && g_file_test(good_path,G_FILE_TEST_EXISTS))
+    return good_path;
+          
+  return NULL;
+}
+
+
+/* Check if the @seek with length @len is legal or out of
+ * range. Returns TRUE if legal and FALSE when it is out of range, in
+ * which case cts->error is set as well. */
+static gboolean check_seek (FContents *cts, glong seek, glong len)
+{
+    g_return_val_if_fail (cts, FALSE);
+    g_return_val_if_fail (cts->contents, FALSE);
+
+    if ((seek+len <= cts->length) && (seek >=0))
+    {
+	return TRUE;
+    }
+    else
+    {
+	g_return_val_if_fail (cts->filename, FALSE);
+	g_set_error (&cts->error,
+		     ITDB_FILE_ERROR,
+		     ITDB_FILE_ERROR_SEEK,
+		     _("Illegal seek to offset %ld (length %ld) in file '%s'."),
+		     seek, len, cts->filename);
+	return FALSE;
+    }
+}
+
+
+/* Copies @len bytes from position @seek in @cts->contents to
+   @data. Returns FALSE on error and sets cts->error accordingly. */
+static gboolean seek_get_n_bytes (FContents *cts, gchar *data,
+			      glong seek, glong len)
+{
+  if (check_seek (cts, seek, len))
+  {
+      memcpy (data, &cts->contents[seek], len);
+      return TRUE;
+  }
+  return FALSE;
+}
+
+/* Compare @n bytes of @cts->contents starting at @seek and
+ * @data. Returns TRUE if equal, FALSE if not. Also returns FALSE on
+ * error, so you must check cts->error */
+static gboolean cmp_n_bytes_seek (FContents *cts, const gchar *data,
+				  glong seek, glong len)
+{
+    if (check_seek (cts, seek, len))
+    {
+	gint i;
+	for (i=0; i<len; ++i)
+	{
+	    if (cts->contents[seek+i] != data[i]) return FALSE;
+	}
+	return TRUE;
+    }
+    return FALSE;
+}
+
+
+/* Compare 4 bytes of @header with 4 bytes at @seek taking into
+ * consideration the status of cts->reversed */
+static gboolean check_header_seek (FContents *cts, const gchar *data,
+				   glong seek)
+{
+    gchar rdata[4];
+    gint i, offset, sign;
+
+    g_return_val_if_fail (cts, FALSE);
+    g_return_val_if_fail (data, FALSE);
+    /* reverse data for compare if necessary */
+    if (cts->reversed)
+    {
+	offset = 3;
+	sign = -1;
+    }
+    else
+    {
+	offset = 0;
+	sign = 1;
+    }
+    for (i=0; i<4; ++i)
+    {
+	    rdata[i] = data[offset + sign*i];
+    }
+
+    return cmp_n_bytes_seek (cts, rdata, seek, 4);
+}
+
+
+/* ------------------------------------------------------------
+   Not Endian Dependent
+   ------------------------------------------------------------ */
+
+/* Returns the 1-byte number stored at position @seek. On error the
+ * GError in @cts is set. */
+static inline guint8 get8int (FContents *cts, glong seek)
+{
+    guint8 n=0;
+
+    if (check_seek (cts, seek, 1))
+    {
+	n = cts->contents[seek];
+    }
+    return n;
+}
+
+
+/* ------------------------------------------------------------
+   Little Endian
+   ------------------------------------------------------------ */
+
+/* Get the 2-byte-number stored at position "seek" in little endian
+   encoding. On error the GError in @cts is set. */
+static guint16 raw_get16lint (FContents *cts, glong seek)
+{
+    guint16 n=0;
+
+    if (check_seek (cts, seek, 2))
+    {
+	memcpy (&n, &cts->contents[seek], 2);
+	n = GUINT16_FROM_LE (n);
+    }
+    return n;
+}
+
+/* Get the 3-byte-number stored at position "seek" in little endian
+   encoding. On error the GError in @cts is set. */
+static guint32 raw_get24lint (FContents *cts, glong seek)
+{
+    guint32 n=0;
+
+    if (check_seek (cts, seek, 3))
+    {
+	n = ((guint32)get8int (cts, seek+0)) +
+	    (((guint32)get8int (cts, seek+1)) >> 8) +
+	    (((guint32)get8int (cts, seek+2)) >> 16);
+    }
+    return n;
+}
+
+/* Get the 4-byte-number stored at position "seek" in little endian
+   encoding. On error the GError in @cts is set. */
+static guint32 raw_get32lint (FContents *cts, glong seek)
+{
+    guint32 n=0;
+
+    if (check_seek (cts, seek, 4))
+    {
+	memcpy (&n, &cts->contents[seek], 4);
+	n = GUINT32_FROM_LE (n);
+    }
+    return n;
+}
+
+/* Get 4 byte floating number */
+static float raw_get32lfloat (FContents *cts, glong seek)
+{
+    union
+    {
+	guint32 i;
+	float   f;
+    } flt;
+
+    g_return_val_if_fail (sizeof (float) == 4, 0);
+
+    flt.i = raw_get32lint (cts, seek);
+
+    return flt.f;
+}
+
+
+/* Get the 8-byte-number stored at position "seek" in little endian
+   encoding. On error the GError in @cts is set. */
+static guint64 raw_get64lint (FContents *cts, glong seek)
+{
+    guint64 n=0;
+
+    if (check_seek (cts, seek, 8))
+    {
+	memcpy (&n, &cts->contents[seek], 8);
+	n = GUINT64_FROM_LE (n);
+    }
+    return n;
+}
+
+
+/* ------------------------------------------------------------
+   Big Endian
+   ------------------------------------------------------------ */
+
+/* Get the 2-byte-number stored at position "seek" in little endian
+   encoding. On error the GError in @cts is set. */
+static guint16 raw_get16bint (FContents *cts, glong seek)
+{
+    guint16 n=0;
+
+    if (check_seek (cts, seek, 2))
+    {
+	memcpy (&n, &cts->contents[seek], 2);
+	n = GUINT16_FROM_BE (n);
+    }
+    return n;
+}
+
+/* Get the 3-byte-number stored at position "seek" in big endian
+   encoding. On error the GError in @cts is set. */
+static guint32 raw_get24bint (FContents *cts, glong seek)
+{
+    guint32 n=0;
+
+    if (check_seek (cts, seek, 3))
+    {
+	n = ((guint32)get8int (cts, seek+2)) +
+	    (((guint32)get8int (cts, seek+1)) >> 8) +
+	    (((guint32)get8int (cts, seek+0)) >> 16);
+    }
+    return n;
+}
+
+/* Get the 4-byte-number stored at position "seek" in big endian
+   encoding. On error the GError in @cts is set. */
+static guint32 raw_get32bint (FContents *cts, glong seek)
+{
+    guint32 n=0;
+
+    if (check_seek (cts, seek, 4))
+    {
+	memcpy (&n, &cts->contents[seek], 4);
+	n = GUINT32_FROM_BE (n);
+    }
+    return n;
+}
+
+/* Get 4 byte floating number */
+static float raw_get32bfloat (FContents *cts, glong seek)
+{
+    union
+    {
+	guint32 i;
+	float   f;
+    } flt;
+
+    g_return_val_if_fail (sizeof (float) == 4, 0);
+
+    flt.i = raw_get32bint (cts, seek);
+
+    return flt.f;
+}
+
+/* Get the 8-byte-number stored at position "seek" in big endian
+   encoding. On error the GError in @cts is set. */
+static guint64 raw_get64bint (FContents *cts, glong seek)
+{
+    guint64 n=0;
+
+    if (check_seek (cts, seek, 8))
+    {
+	memcpy (&n, &cts->contents[seek], 8);
+	n = GUINT64_FROM_BE (n);
+    }
+    return n;
+}
+
+
+/* ------------------------------------------------------------
+   Little Endian
+   ------------------------------------------------------------ */
+
+static inline guint16 get16lint (FContents *cts, glong seek)
+{
+    return cts->le_reader.get16int (cts, seek);
+}
+
+static inline guint32 get24lint (FContents *cts, glong seek)
+{
+    return cts->le_reader.get24int (cts, seek);
+}
+#if 0
+static inline guint32 get24bint (FContents *cts, glong seek)
+{
+    return cts->be_reader.get24int (cts, seek);
+}
+#endif
+static inline guint32 get32lint (FContents *cts, glong seek)
+{
+    return cts->le_reader.get32int (cts, seek);
+}
+
+static inline float get32lfloat (FContents *cts, glong seek)
+{
+    return cts->le_reader.get32float (cts, seek);
+}
+
+static inline guint64 get64lint (FContents *cts, glong seek)
+{
+    return cts->le_reader.get64int (cts, seek);
+}
+
+
+
+/* ------------------------------------------------------------
+   Big Endian
+   ------------------------------------------------------------ */
+
+static inline guint16 get16bint (FContents *cts, glong seek)
+{
+    return cts->be_reader.get16int (cts, seek);
+}
+
+static inline guint32 get32bint (FContents *cts, glong seek)
+{
+    return cts->be_reader.get32int (cts, seek);
+}
+
+#if 0
+static inline float get32bfloat (FContents *cts, glong seek)
+{
+    return cts->be_reader.get32float (cts, seek);
+}
+#endif
+
+static inline guint64 get64bint (FContents *cts, glong seek)
+{
+    return cts->be_reader.get64int (cts, seek);
+}
+
+
+
+
+/* Fix little endian UTF16 String to correct byteorder if necessary
+ * (all strings in the Itdb_iTunesDB are little endian except for the ones
+ * in smart playlists). */
+static gunichar2 *fixup_little_utf16 (gunichar2 *utf16_string)
+{
+#   if (G_BYTE_ORDER == G_BIG_ENDIAN)
+    gint32 i;
+    if (utf16_string)
+    {
+	for(i=0; utf16_string[i]; i++)
+	{
+	    utf16_string[i] = GUINT16_SWAP_LE_BE (utf16_string[i]);
+	}
+    }
+#   endif
+    return utf16_string;
+}
+
+/* Fix big endian UTF16 String to correct byteorder if necessary (only
+ * strings in smart playlists and chapter data are big endian) */
+static gunichar2 *fixup_big_utf16 (gunichar2 *utf16_string)
+{
+#   if (G_BYTE_ORDER == G_LITTLE_ENDIAN)
+    gint32 i;
+    if (utf16_string)
+    {
+	for(i=0; utf16_string[i]; i++)
+	{
+	    utf16_string[i] = GUINT16_SWAP_LE_BE (utf16_string[i]);
+	}
+    }
+#   endif
+    return utf16_string;
+}
+
+
+#define CHECK_ERROR(imp, val) if (cts->error) { g_propagate_error (&imp->error, cts->error); return (val); }
+
+
+/* get next playcount, that is the first entry of GList
+ * playcounts. This entry is removed from the list. You must free the
+ * return value after use */
+static struct playcount *playcount_take_next (FImport *fimp)
+{
+    struct playcount *playcount;
+    g_return_val_if_fail (fimp, NULL);
+
+    playcount = g_list_nth_data (fimp->playcounts, 0);
+
+    if (playcount)
+	fimp->playcounts = g_list_remove (fimp->playcounts, playcount);
+    return playcount;
+}
+
+/* delete all entries of GList *playcounts */
+static void playcounts_free (FImport *fimp)
+{
+    struct playcount *playcount;
+
+    g_return_if_fail (fimp);
+
+    while ((playcount=playcount_take_next (fimp))) g_free (playcount);
+}
+
+
+/* called by init_playcounts */
+static gboolean playcounts_read (FImport *fimp, FContents *cts)
+{
+    GList* playcounts = NULL;
+    guint32 header_length, entry_length, entry_num, i=0;
+
+    g_return_val_if_fail (fimp, FALSE);
+    g_return_val_if_fail (cts, FALSE);
+
+    if (!check_header_seek (cts, "mhdp", 0))
+    {
+	if (cts->error)
+	{
+	    g_propagate_error (&fimp->error, cts->error);
+	    return FALSE;
+	}
+	fcontents_set_reversed (cts, TRUE);
+	if (!check_header_seek (cts, "mhdp", 0))
+	{
+	    if (cts->error)
+	    {
+		g_propagate_error (&fimp->error, cts->error);
+		return FALSE;
+	    }
+	    else
+	    {   /* set error */
+		g_return_val_if_fail (cts->filename, FALSE);
+		g_set_error (&fimp->error,
+			     ITDB_FILE_ERROR,
+			     ITDB_FILE_ERROR_CORRUPT,
+			     _("Not a Play Counts file: '%s' (missing mhdp header)."),
+			     cts->filename);
+		return FALSE;
+	    }
+	}
+    }
+    header_length = get32lint (cts, 4);
+    CHECK_ERROR (fimp, FALSE);
+    /* all the headers I know are 0x60 long -- if this one is longer
+       we can simply ignore the additional information */
+    if (header_length < 0x60)
+    {
+	g_set_error (&fimp->error,
+		     ITDB_FILE_ERROR,
+		     ITDB_FILE_ERROR_CORRUPT,
+		     _("Play Counts file ('%s'): header length smaller than expected (%d<96)."),
+		     cts->filename, header_length);
+	return FALSE;
+    }
+    entry_length = get32lint (cts, 8);
+    CHECK_ERROR (fimp, FALSE);
+    /* all the entries I know are 0x0c (firmware 1.3) or 0x10
+     * (firmware 2.0), 0x14 (iTunesDB version 0x0d) or 0x1c (iTunesDB
+     * version 0x13) in length */
+    if (entry_length < 0x0c)
+    {
+	g_set_error (&fimp->error,
+		     ITDB_FILE_ERROR,
+		     ITDB_FILE_ERROR_CORRUPT,
+		     _("Play Counts file ('%s'): entry length smaller than expected (%d<12)."),
+		     cts->filename, entry_length);
+	return FALSE;
+    }
+    /* number of entries */
+    entry_num = get32lint (cts, 12);
+    CHECK_ERROR (fimp, FALSE);
+    for (i=0; i<entry_num; ++i)
+    {
+	guint32 mac_time;
+	struct playcount *playcount = g_new0 (struct playcount, 1);
+	glong seek = header_length + i*entry_length;
+
+	check_seek (cts, seek, entry_length);
+	CHECK_ERROR (fimp, FALSE);	
+
+	playcounts = g_list_prepend (playcounts, playcount);
+	playcount->playcount = get32lint (cts, seek);	
+	mac_time = get32lint (cts, seek+4);
+	playcount->time_played = device_time_mac_to_time_t (fimp->itdb->device, mac_time);
+	playcount->bookmark_time = get32lint (cts, seek+8);
+	
+	/* rating only exists if the entry length is at least 0x10 */
+	if (entry_length >= 0x10)
+	{
+	    playcount->rating = get32lint (cts, seek+12);
+	}
+	else
+	{
+	    playcount->rating = NO_PLAYCOUNT;
+	}
+	/* unk16 only exists if the entry length is at least 0x14 */
+	if (entry_length >= 0x14)
+	{
+	    playcount->pc_unk16 = get32lint (cts, seek+16);
+	}
+	/* skip_count and last_skipped only exists if the entry length
+	   is at least 0x1c */
+	if (entry_length >= 0x1c)
+	{
+	    playcount->skipcount = get32lint (cts, seek+20);
+	    mac_time = get32lint (cts, seek+24);
+	    playcount->last_skipped = device_time_mac_to_time_t (fimp->itdb->device,
+							       mac_time);
+
+	}
+    }
+    fimp->playcounts = g_list_reverse(playcounts);
+    return TRUE;
+}
+
+
+/* called by init_playcounts */
+static gboolean itunesstats_read (FImport *fimp, FContents *cts)
+{
+    GList* playcounts;
+    guint32 entry_num, i=0;
+    glong seek;
+
+    g_return_val_if_fail (fimp, FALSE);
+    g_return_val_if_fail (cts, FALSE);
+
+    /* number of entries */
+    entry_num = get32lint (cts, 0);
+    CHECK_ERROR (fimp, FALSE);
+
+    seek = 6;
+    for (i=0; i<entry_num; ++i)
+    {
+	struct playcount *playcount = g_new0 (struct playcount, 1);
+	guint32 entry_length = get24lint (cts, seek+0);
+	CHECK_ERROR (fimp, FALSE);
+	if (entry_length < 18)
+	{
+	    g_set_error (&fimp->error,
+			 ITDB_FILE_ERROR,
+			 ITDB_FILE_ERROR_CORRUPT,
+			 _("iTunesStats file ('%s'): entry length smaller than expected (%d<18)."),
+			 cts->filename, entry_length);
+	    return FALSE;
+	}
+
+	playcounts = g_list_prepend (playcounts, playcount);
+	/* NOTE:
+	 *
+	 * The iPod (firmware 1.3, 2.0, ...?) doesn't seem to use the
+	 * timezone information correctly -- no matter what you set
+	 * iPod's timezone to, it will always record as if it were set
+	 * to UTC -- we need to subtract the difference between
+	 * current timezone and UTC to get a correct
+	 * display. -- this should be done by the application were
+	 * necessary */
+	playcount->bookmark_time = get24lint (cts, seek+3);
+	CHECK_ERROR (fimp, FALSE);
+	playcount->st_unk06 = get24lint (cts, seek+6);
+	CHECK_ERROR (fimp, FALSE);
+	playcount->st_unk09 = get24lint (cts, seek+9);
+	CHECK_ERROR (fimp, FALSE);
+	playcount->playcount = get24lint (cts, seek+12);
+	CHECK_ERROR (fimp, FALSE);
+	playcount->skipped = get24lint (cts, seek+15);
+	CHECK_ERROR (fimp, FALSE);
+	
+	playcount->rating = NO_PLAYCOUNT;
+
+	seek += entry_length;
+    }
+    fimp->playcounts = g_list_reverse(playcounts);
+    return TRUE;
+}
+
+
+
+/* Read the Play Count file (formed by adding "Play Counts" to the
+ * directory component of fimp->itdb->itdb_filename) and set up the
+ * GList *playcounts. If no Play Count file is present, attempt to
+ * read the iTunesStats file instead, which is used on the Shuffle for
+ * the same purpose.
+ *
+ * Returns TRUE on success (also when no Play Count
+ * file is found as this is not an error) and FALSE otherwise, in
+ * which case fimp->error is set accordingly. */
+static gboolean playcounts_init (FImport *fimp)
+{
+  const gchar *plc[] = {"Play Counts", NULL};
+  const gchar *ist[] = {"iTunesStats", NULL};
+  gchar *plcname, *dirname, *istname;
+  gboolean result=TRUE;
+  struct stat filestat;
+  FContents *cts;
+
+  g_return_val_if_fail (fimp, FALSE);
+  g_return_val_if_fail (!fimp->error, FALSE);
+  g_return_val_if_fail (!fimp->playcounts, FALSE);
+  g_return_val_if_fail (fimp->itdb, FALSE);
+  g_return_val_if_fail (fimp->itdb->filename, FALSE);
+
+  dirname = g_path_get_dirname (fimp->itdb->filename);
+
+  plcname = itdb_resolve_path (dirname, plc);
+  istname = itdb_resolve_path (dirname, ist);
+
+  g_free (dirname);
+
+  /* skip if no playcounts file is present */
+  if (plcname)
+  {
+      /* skip if playcounts file has zero-length (often happens after
+       * dosfsck) */
+      stat (plcname, &filestat);
+      if (filestat.st_size >= 0x60)
+      {
+	  cts = fcontents_read (plcname, &fimp->error);
+	  if (cts)
+	  {
+	      result = playcounts_read (fimp, cts);
+	      fcontents_free (cts);
+	  }
+	  else
+	  {
+	      result = FALSE;
+	  }
+      }
+  }
+  else if (istname)
+  {
+      /* skip if iTunesStats file has zero-length (often happens after
+       * dosfsck) */
+      stat (istname, &filestat);
+      if (filestat.st_size >= 0x06)
+      {
+	  cts = fcontents_read (istname, &fimp->error);
+	  if (cts)
+	  {
+	      result = itunesstats_read (fimp, cts);
+	      fcontents_free (cts);
+	  }
+	  else
+	  {
+	      result = FALSE;
+	  }
+      }
+  }
+
+  g_free (plcname);
+  g_free (istname);
+
+  return result;
+}
+
+
+/* Free the memory taken by @fimp. fimp->itdb must be freed separately
+ * before calling this function */
+static void itdb_free_fimp (FImport *fimp)
+{
+    if (fimp)
+    {
+	if (fimp->fcontents)  fcontents_free (fimp->fcontents);
+	g_list_free (fimp->pos_glist);
+	g_list_free (fimp->tracks);
+	playcounts_free (fimp);
+	g_free (fimp);
+    }
+}
+
+/** 
+ * itdb_free:
+ * @itdb: an #Itdb_iTunesDB
+ *
+ * Free the memory taken by @itdb. 
+ */
+void itdb_free (Itdb_iTunesDB *itdb)
+{
+    if (itdb)
+    {
+	g_list_foreach (itdb->playlists,
+			(GFunc)(itdb_playlist_free), NULL);
+	g_list_free (itdb->playlists);
+	g_list_foreach (itdb->tracks,
+			(GFunc)(itdb_track_free), NULL);
+	g_list_free (itdb->tracks);
+	g_free (itdb->filename);
+	itdb_device_free (itdb->device);
+	if (itdb->userdata && itdb->userdata_destroy)
+	    (*itdb->userdata_destroy) (itdb->userdata);
+	g_free (itdb);
+    }
+}
+
+/**
+ * itdb_duplicate:
+ * @itdb: an #Itdb_iTunesDB
+ *
+ * Duplicate @itdb 
+ * FIXME: not implemented yet 
+ *
+ * Returns: always return NULL since it's unimplemented
+ */
+Itdb_iTunesDB *itdb_duplicate (Itdb_iTunesDB *itdb)
+{
+    g_return_val_if_fail (itdb, NULL);
+    /* FIXME: not yet implemented */
+    g_return_val_if_reached (NULL);
+}
+
+/**
+ * itdb_playlists_number:
+ * @itdb: an #Itdb_iTunesDB
+ *
+ * Counts the number of playlists stored in @itdb
+ *
+ * Returns: the number of playlists in @itdb (including the master 
+ * playlist)
+ */
+guint32 itdb_playlists_number (Itdb_iTunesDB *itdb)
+{
+    g_return_val_if_fail (itdb, 0);
+
+    return g_list_length (itdb->playlists);
+}
+
+/**
+ * itdb_tracks_number:
+ * @itdb: an #Itdb_iTunesDB
+ *
+ * Counts the number of tracks stored in @itdb
+ *
+ * Returns: the number of tracks in @itdb
+ */
+guint32 itdb_tracks_number (Itdb_iTunesDB *itdb)
+{
+    g_return_val_if_fail (itdb, 0);
+
+    return g_list_length (itdb->tracks);
+}
+
+/**
+ * itdb_tracks_number_nontransferred:
+ * @itdb: an #Itdb_iTunesDB
+ *
+ * Counts the number of non-transferred tracks in @itdb
+ *
+ * Returns: the number of tracks in @itdb that haven't been transferred
+ * to the iPod yet (ie the number of #Itdb_Track in which the transferred field
+ * is false)
+ */
+guint32 itdb_tracks_number_nontransferred (Itdb_iTunesDB *itdb)
+{
+    guint n = 0;
+    GList *gl;
+    g_return_val_if_fail (itdb, 0);
+
+    for (gl=itdb->tracks; gl; gl=gl->next)
+    {
+	Itdb_Track *track = gl->data;
+	g_return_val_if_fail (track, 0);
+	if (!track->transferred)   ++n;
+    }
+    return n;
+}
+
+/**
+ * itdb_new:
+ *
+ * Creates a new Itdb_iTunesDB with the unknowns filled in to reasonable
+ * values.
+ *
+ * Returns: a newly created Itdb_iTunesDB to be freed with itdb_free()
+ * when it's no longer needed
+ */
+Itdb_iTunesDB *itdb_new (void)
+{
+    static GOnce g_type_init_once = G_ONCE_INIT;
+    Itdb_iTunesDB *itdb;
+
+    g_once (&g_type_init_once, (GThreadFunc)g_type_init, NULL);
+    itdb = g_new0 (Itdb_iTunesDB, 1);
+    itdb->device = itdb_device_new ();
+    itdb->version = 0x13;
+    itdb->id = ((guint64)g_random_int () << 32) |
+	((guint64)g_random_int ());
+    return itdb;
+}
+
+/* Returns the type of the mhod and the length *ml. *ml is set to -1
+ * on error (e.g. because there's no mhod at @seek). */
+/* A return value of -1 and no error set means that no mhod was found
+   at @seek */
+static gint32 get_mhod_type (FContents *cts, glong seek, guint32 *ml)
+{
+    gint32 type = -1;
+
+#if ITUNESDB_DEBUG
+    fprintf(stderr, "get_mhod_type seek: %x\n", (int)seek);
+#endif
+
+    if (ml) *ml = -1;
+
+    if (check_header_seek (cts, "mhod", seek))
+    {
+	guint32 len = get32lint (cts, seek+8);    /* total length */
+	if (cts->error) return -1;
+	if (ml) *ml = len;
+	type = get32lint (cts, seek+12);          /* mhod_id      */
+	if (cts->error) return -1;
+    }
+    return type;
+}
+
+/* Returns the contents of the mhod at position @mhod_seek. This can
+   be a simple string or something more complicated as in the case for
+   Itdb_SPLPREF OR Itdb_SPLRULES.
+
+   *mhod_len is set to the total length of the mhod (-1 in case an
+   *error occured).
+
+   MHODData.valid is set to FALSE in case of any error. cts->error
+   will be set accordingly.
+
+   MHODData.type is set to the type of the mhod. The data (or a
+   pointer to the data) will be stored in
+   .playlist_id/.string/.chapterdata/.splp/.splrs
+*/
+
+static MHODData get_mhod (FImport *fimp, glong mhod_seek, guint32 *ml)
+{
+  gunichar2 *entry_utf16 = NULL;
+  MHODData result;
+  gint32 xl;
+  guint32 mhod_len;
+  gint32 header_length;
+  guint32 string_type;
+  gulong seek;
+  FContents *cts;
+  
+  cts = fimp->fcontents;
+    
+  result.valid = FALSE;
+  result.type = -1;
+  g_return_val_if_fail (ml, result);
+  *ml = -1;
+
+  g_return_val_if_fail (cts, result);
+  g_return_val_if_fail (!cts->error, result);
+
+#if ITUNESDB_DEBUG
+  fprintf(stderr, "get_mhod seek: %ld\n", mhod_seek);
+#endif
+
+  result.type = get_mhod_type (cts, mhod_seek, &mhod_len);
+
+  if (mhod_len == -1)
+  {
+      if (!cts->error)
+      {   /* set error */
+	  g_set_error (&cts->error,
+		       ITDB_FILE_ERROR,
+		       ITDB_FILE_ERROR_CORRUPT,
+		       _("iTunesDB corrupt: no MHOD at offset %ld in file '%s'."),
+		       mhod_seek, cts->filename);
+      }
+      return result;
+  }
+
+  if (!check_seek (cts, mhod_seek, mhod_len))
+      return result;
+
+
+  header_length = get32lint (cts, mhod_seek+4); /* header length  */
+
+  seek = mhod_seek + header_length;
+
+#if ITUNESDB_DEBUG
+  fprintf(stderr, "ml: %x type: %x\n", *ml, result.type);
+#endif
+
+  switch ((enum MHOD_ID)result.type)
+  {
+  case MHOD_ID_LIBPLAYLISTINDEX:
+      /* this is not yet supported */
+  case MHOD_ID_PLAYLIST:
+      /* return the position indicator */
+      result.data.track_pos = get32lint (cts, mhod_seek+24);
+      break;
+  case MHOD_ID_TITLE:
+  case MHOD_ID_PATH:
+  case MHOD_ID_ALBUM:
+  case MHOD_ID_ARTIST:
+  case MHOD_ID_GENRE:
+  case MHOD_ID_FILETYPE:
+  case MHOD_ID_COMMENT:
+  case MHOD_ID_CATEGORY:
+  case MHOD_ID_COMPOSER:
+  case MHOD_ID_GROUPING:
+  case MHOD_ID_DESCRIPTION:
+  case MHOD_ID_SUBTITLE:
+  case MHOD_ID_TVSHOW:
+  case MHOD_ID_TVEPISODE:
+  case MHOD_ID_TVNETWORK:
+  case MHOD_ID_ALBUMARTIST:
+  case MHOD_ID_KEYWORDS:
+  case MHOD_ID_SORT_ARTIST:
+  case MHOD_ID_SORT_TITLE:
+  case MHOD_ID_SORT_ALBUM:
+  case MHOD_ID_SORT_ALBUMARTIST:
+  case MHOD_ID_SORT_COMPOSER:
+  case MHOD_ID_SORT_TVSHOW:
+      /* type of string: 0x02: UTF8, 0x01 or 0x00: UTF16 LE */
+      string_type = get32lint (cts, seek);
+      xl = get32lint (cts, seek+4);   /* length of string */
+      g_return_val_if_fail (xl < G_MAXUINT - 2, result);
+      if (string_type != 0x02)
+      {
+	  entry_utf16 = g_new0 (gunichar2, (xl+2)/2);
+	  if (seek_get_n_bytes (cts, (gchar *)entry_utf16, seek+16, xl))
+	  {
+	      fixup_little_utf16 (entry_utf16);
+	      result.data.string = g_utf16_to_utf8 (entry_utf16, -1,
+						    NULL, NULL, NULL);
+	      g_free (entry_utf16);
+	  }
+	  else
+	  {   /* error */
+	      g_free (entry_utf16);
+	      return result;  /* *ml==-1, result.valid==FALSE */
+	  }
+      }
+      else
+      {
+	  result.data.string = g_new0 (gchar, xl+1);
+	  if (!seek_get_n_bytes (cts, result.data.string, seek+16, xl))
+	  {   /* error */
+	      g_free (entry_utf16);
+	      return result;  /* *ml==-1, result.valid==FALSE */
+	  }
+      }
+      break;
+  case MHOD_ID_PODCASTURL:
+  case MHOD_ID_PODCASTRSS:
+      /* length of string */
+      xl = mhod_len - header_length;
+      g_return_val_if_fail (xl < G_MAXUINT - 1, result);
+      result.data.string = g_new0 (gchar, xl+1);
+      if (!seek_get_n_bytes (cts, result.data.string, seek, xl))
+      {
+	  g_free (result.data.string);
+	  return result;  /* *ml==-1, result.valid==FALSE */
+      }
+      break;
+  case MHOD_ID_CHAPTERDATA:
+      result.data.chapterdata = itdb_chapterdata_new();
+      result.data.chapterdata->unk024 = get32lint (cts, seek);
+      result.data.chapterdata->unk028 = get32lint (cts, seek+4);
+      result.data.chapterdata->unk032 = get32lint (cts, seek+8);
+      seek += 12; /* get past unks */
+      if (check_header_seek (cts, "sean", seek+4))
+      {
+	  gint i;
+	  guint32 numchapters;
+	  numchapters = get32bint (cts, seek+12) - 1; /* minus 1 for hedr atom */
+	  seek += 20; /* move to atom data */
+	  for (i=0; i<numchapters; ++i)
+	  {
+	      if (check_header_seek (cts, "chap", seek+4))
+	      {
+		  guint32 length;
+		  guint32 startpos;
+		  gunichar2 *string_utf16;
+		  startpos = get32bint (cts, seek+8);
+		  seek += 20;
+		  if (check_header_seek (cts, "name", seek+4))
+		  {
+		      length = get16bint (cts, seek+20);
+		      string_utf16 = g_new0 (gunichar2, (length+1));
+		      if (!seek_get_n_bytes (cts, (gchar *)string_utf16,
+				  seek+22, length*2))
+		      {
+			  g_free (string_utf16);
+			  itdb_chapterdata_free (result.data.chapterdata);
+			  return result;  /* *ml==-1, result.valid==FALSE */
+		      }
+		      fixup_big_utf16 (string_utf16);
+		      itdb_chapterdata_add_chapter(result.data.chapterdata,startpos,g_utf16_to_utf8 (
+				  string_utf16, -1, NULL, NULL, NULL));
+		      g_free (string_utf16);
+		      seek += length * 2 + 22;
+		  }
+	      }
+	  }
+	  if (check_header_seek (cts, "hedr", seek+4))
+	  {
+	      guint32 hedrlength = get32bint(cts, seek);
+	      seek += hedrlength;
+	  }
+
+      }
+      break;
+  case MHOD_ID_SPLPREF:  /* Settings for smart playlist */
+      if (!check_seek (cts, seek, 14))
+	  return result;  /* *ml==-1, result.valid==FALSE */
+      result.data.splpref = g_new0 (Itdb_SPLPref, 1);
+      result.data.splpref->liveupdate = get8int (cts, seek);
+      result.data.splpref->checkrules = get8int (cts, seek+1);
+      result.data.splpref->checklimits = get8int (cts, seek+2);
+      result.data.splpref->limittype = get8int (cts, seek+3);
+      result.data.splpref->limitsort = get8int (cts, seek+4);
+      result.data.splpref->limitvalue = get32lint (cts, seek+8);
+      result.data.splpref->matchcheckedonly = get8int (cts, seek+12);
+      /* if the opposite flag is on (seek+13), set limitsort's high
+	 bit -- see note in itunesdb.h for more info */
+      if (get8int (cts, seek+13))
+	  result.data.splpref->limitsort |= 0x80000000;
+      break;
+  case MHOD_ID_SPLRULES:  /* Rules for smart playlist */
+      if (check_header_seek (cts, "SLst", seek))
+      {
+	  /* !!! for some reason the SLst part is the only part of the
+	     iTunesDB with big-endian encoding, including UTF16
+	     strings */
+	  gint i;
+	  guint32 numrules;
+	  if (!check_seek (cts, seek, 136))
+	      return result;  /* *ml==-1, result.valid==FALSE */
+	  result.data.splrules = g_new0 (Itdb_SPLRules, 1);
+	  result.data.splrules->unk004 = get32bint (cts, seek+4);
+	  numrules = get32bint (cts, seek+8);
+	  result.data.splrules->match_operator = get32bint (cts, seek+12);
+	  seek += 136;  /* I can't find this value stored in the
+			   iTunesDB :-( */
+	  for (i=0; i<numrules; ++i)
+	  {
+	      guint32 length;
+	      ItdbSPLFieldType ft;
+	      gunichar2 *string_utf16;
+	      Itdb_SPLRule *splr = g_new0 (Itdb_SPLRule, 1);
+	      result.data.splrules->rules = g_list_append (
+		  result.data.splrules->rules, splr);
+	      if (!check_seek (cts, seek, 56))
+		  goto splrules_error;
+	      splr->field = get32bint (cts, seek);
+	      splr->action = get32bint (cts, seek+4);
+
+	      if (!itdb_spl_action_known (splr->action))
+	      {
+		  g_warning (_("Unknown smart rule action at %ld: %x. Trying to continue.\n"), seek, splr->action);
+	      }
+
+	      seek += 52;
+	      length = get32bint (cts, seek);
+	      g_return_val_if_fail (length < G_MAXUINT-2, result);
+
+	      ft = itdb_splr_get_field_type (splr);
+	      switch (ft)
+	      {
+	      case ITDB_SPLFT_STRING:
+		  string_utf16 = g_new0 (gunichar2, (length+2)/2);
+		  if (!seek_get_n_bytes (cts, (gchar *)string_utf16,
+					 seek+4, length))
+		  {
+		      g_free (string_utf16);
+		      goto splrules_error;
+		  }
+		  fixup_big_utf16 (string_utf16);
+		  splr->string = g_utf16_to_utf8 (
+		      string_utf16, -1, NULL, NULL, NULL);
+		  g_free (string_utf16);
+		  break;
+	      case ITDB_SPLFT_INT:
+	      case ITDB_SPLFT_DATE:
+	      case ITDB_SPLFT_BOOLEAN:
+	      case ITDB_SPLFT_PLAYLIST:
+	      case ITDB_SPLFT_UNKNOWN:
+	      case ITDB_SPLFT_BINARY_AND:
+		  if (length != 0x44)
+		  {
+		      g_warning (_("Length of smart playlist rule field (%d) not as expected. Trying to continue anyhow.\n"), length);
+		  }
+		  if (!check_seek (cts, seek, 72))
+		      goto splrules_error;
+		  splr->fromvalue = get64bint (cts, seek+4);
+		  splr->fromdate = get64bint (cts, seek+12);
+		  splr->fromunits = get64bint (cts, seek+20);
+		  splr->tovalue = get64bint (cts, seek+28);
+		  splr->todate = get64bint (cts, seek+36);
+		  splr->tounits = get64bint (cts, seek+44);
+		  /* ITDB_SPLFIELD_PLAYLIST seems to use these unknowns*/
+		  splr->unk052 = get32bint (cts, seek+52);
+		  splr->unk056 = get32bint (cts, seek+56);
+		  splr->unk060 = get32bint (cts, seek+60);
+		  splr->unk064 = get32bint (cts, seek+64);
+		  splr->unk068 = get32bint (cts, seek+68);
+
+		  if (ft == ITDB_SPLFT_DATE) {
+		      ItdbSPLActionType at;
+		      at = itdb_splr_get_action_type (splr);
+		      if ((at == ITDB_SPLAT_RANGE_DATE) ||
+			  (at == ITDB_SPLAT_DATE))
+		      {
+			  Itdb_iTunesDB *itdb = fimp->itdb;
+			  splr->fromvalue = device_time_mac_to_time_t (itdb->device,
+								     splr->fromvalue);
+			  splr->tovalue = device_time_mac_to_time_t (itdb->device,
+								   splr->tovalue);
+		      }
+		  }
+
+		  break;
+	      }
+	      seek += length+4;
+	  }
+      }
+      else
+      {
+	  if (!cts->error)
+	  {   /* set error */
+	      g_set_error (&cts->error,
+			   ITDB_FILE_ERROR,
+			   ITDB_FILE_ERROR_CORRUPT,
+			   _("iTunesDB corrupt: no SLst at offset %ld in file '%s'."),
+			   seek, cts->filename);
+	  }
+	  return result;  /* *ml==-1, result.valid==FALSE */
+      }
+      break;
+    splrules_error:
+      g_list_foreach (result.data.splrules->rules,
+		      (GFunc)(itdb_splr_free), NULL);
+      g_list_free (result.data.splrules->rules);
+      g_free (result.data.splrules);
+      return result;  /* *ml==-1, result.valid==FALSE */
+  default:
+      g_warning (_("Encountered unknown MHOD type (%d) while parsing the iTunesDB. Ignoring.\n\n"), result.type);
+      *ml = mhod_len;
+      return result;
+  }
+
+  *ml = mhod_len;
+  result.valid = TRUE;
+  return result;
+}
+
+/* Returns the value of a string type mhod. return the length of the
+   mhod *ml, the mhod type *mty, and a string with the entry (in
+   UTF8). After use you must free the string with g_free(). Returns
+   NULL if no string is avaible. *ml is set to -1 in case of error and
+   cts->error is set appropriately. */
+static gchar *get_mhod_string (FImport *fimp, glong seek, guint32 *ml, gint32 *mty)
+{
+    MHODData mhoddata;
+    FContents *cts;
+
+    cts = fimp->fcontents;
+
+    *mty = get_mhod_type (cts, seek, ml);
+    if (cts->error) return NULL;
+
+    if (*ml != -1) switch ((enum MHOD_ID)*mty)
+    {
+    case MHOD_ID_TITLE:
+    case MHOD_ID_PATH:
+    case MHOD_ID_ALBUM:
+    case MHOD_ID_ARTIST:
+    case MHOD_ID_GENRE:
+    case MHOD_ID_FILETYPE:
+    case MHOD_ID_COMMENT:
+    case MHOD_ID_CATEGORY:
+    case MHOD_ID_COMPOSER:
+    case MHOD_ID_GROUPING:
+    case MHOD_ID_DESCRIPTION:
+    case MHOD_ID_PODCASTURL:
+    case MHOD_ID_PODCASTRSS:
+    case MHOD_ID_SUBTITLE:
+    case MHOD_ID_TVSHOW:
+    case MHOD_ID_TVEPISODE:
+    case MHOD_ID_TVNETWORK:
+    case MHOD_ID_ALBUMARTIST:
+    case MHOD_ID_KEYWORDS:
+    case MHOD_ID_SORT_ARTIST:
+    case MHOD_ID_SORT_TITLE:
+    case MHOD_ID_SORT_ALBUM:
+    case MHOD_ID_SORT_ALBUMARTIST:
+    case MHOD_ID_SORT_COMPOSER:
+    case MHOD_ID_SORT_TVSHOW:
+    case MHOD_ID_ALBUM_ALBUM:
+    case MHOD_ID_ALBUM_ARTIST:
+    case MHOD_ID_ALBUM_SORT_ARTIST:
+	mhoddata = get_mhod (fimp, seek, ml);
+	if ((*ml != -1) && mhoddata.valid)
+	    return mhoddata.data.string;
+	else
+	    return NULL;
+    case MHOD_ID_SPLPREF:
+    case MHOD_ID_SPLRULES:
+    case MHOD_ID_LIBPLAYLISTINDEX:
+    case MHOD_ID_PLAYLIST:
+    case MHOD_ID_CHAPTERDATA:
+    case MHOD_ID_LIBPLAYLISTJUMPTABLE:
+	/* these do not have a string entry */
+	return NULL;
+    }
+#if ITUNESDB_MHIT_DEBUG
+    fprintf (stderr, "Ignoring unknown MHOD of type %d at offset %ld\n", *mty, seek);
+#endif
+    return NULL;
+}
+
+
+/* convenience function: set error for zero length hunk */
+static void set_error_zero_length_hunk (GError **error, glong seek,
+					const gchar *filename)
+{
+    g_set_error (error,
+		 ITDB_FILE_ERROR,
+		 ITDB_FILE_ERROR_CORRUPT,
+		 _("iTunesDB corrupt: hunk length 0 for hunk at %ld in file '%s'."),
+		 seek, filename);
+}
+
+/* convenience function: set error for missing hunk */
+static void set_error_a_not_found_in_b (GError **error,
+					const gchar *a,
+					const gchar *b,
+					glong b_seek)
+{
+    g_set_error (error,
+		 ITDB_FILE_ERROR,
+		 ITDB_FILE_ERROR_CORRUPT,
+		 _("iTunesDB corrupt: no section '%s' found in section '%s' starting at %ld."),
+		 a, b, b_seek);
+}
+
+/* convenience function: set error if header is smaller than expected */
+static void set_error_a_header_smaller_than_b (GError **error,
+					       const gchar *a,
+					       guint32 b, guint32 len,
+					       glong a_seek,
+					       const gchar *filename)
+{
+      g_set_error (error,
+		   ITDB_FILE_ERROR,
+		   ITDB_FILE_ERROR_CORRUPT,
+		   _("header length of '%s' smaller than expected (%d < %d) at offset %ld in file '%s'."),
+		   a, b, len, a_seek, filename);
+}
+
+
+/* finds next occurence of section @a in section b (@b_seek) starting
+   at @start_seek
+*/
+/* Return value:
+   -1 and cts->error not set: section @a could not be found
+   -1 and cts->error set: some error occured
+   >=0: start of next occurence of section @a
+*/
+static glong find_next_a_in_b (FContents *cts,
+			       const gchar *a,
+			       glong b_seek, glong start_seek)
+{
+    glong b_len;
+    glong offset, len;
+
+    g_return_val_if_fail (a, -1);
+    g_return_val_if_fail (cts, -1);
+    g_return_val_if_fail (strlen (a) == 4, -1);
+    g_return_val_if_fail (b_seek>=0, -1);
+    g_return_val_if_fail (start_seek >= b_seek, -1);
+
+/*     printf ("%s: b_seek: %lx, start_seek: %lx\n", a, b_seek, start_seek); */
+
+    b_len = get32lint (cts, b_seek+8);
+    if (cts->error) return -1;
+
+    offset = start_seek - b_seek;
+    len = 0;
+    do
+    {   /* skip headers inside the b hunk (b_len) until we find header
+	   @a */
+	len = get32lint (cts, b_seek+offset+4);
+	if (cts->error) return -1;
+	if (len == 0)
+	{   /* This needs to be checked, otherwise we might hang */
+	    set_error_zero_length_hunk (&cts->error, b_seek+offset,
+					cts->filename);
+	    return -1;
+	}
+	offset += len;
+/* 	printf ("offset: %lx, b_len: %lx, bseek+offset: %lx\n",  */
+/* 		offset, b_len, b_seek+offset); */
+    } while ((offset < b_len-4) && 
+	     !check_header_seek (cts, a, b_seek+offset));
+    if (cts->error) return -1;
+
+    if (offset >= b_len)	return -1;
+
+/*     printf ("%s found at %lx\n", a, b_seek+offset); */
+
+    return b_seek+offset;
+}
+
+
+
+
+/* return the position of mhsd with type @type */
+/* Return value:
+     -1 if mhsd cannot be found. cts->error will not be set
+
+     0 and cts->error is set if some other error occurs.
+     Since the mhsd can never be at position 0 (a mhbd must be there),
+     a return value of 0 always indicates an error.
+*/
+static glong find_mhsd (FContents *cts, guint32 type)
+{
+    guint32 i, len, mhsd_num;
+    glong seek;
+
+    if (!check_header_seek (cts, "mhbd", 0))
+    {
+	fcontents_set_reversed (cts, TRUE);
+	if (cts->error) return 0;
+	if (!check_header_seek (cts, "mhbd", 0))
+	{
+	    if (!cts->error)
+	    {   /* set error */
+		g_set_error (&cts->error,
+			     ITDB_FILE_ERROR,
+			     ITDB_FILE_ERROR_CORRUPT,
+			     _("Not a iTunesDB: '%s' (missing mhdb header)."),
+			     cts->filename);
+	    }
+	    return 0;
+	}
+    }
+    len = get32lint (cts, 4);
+    if (cts->error) return 0;
+    /* all the headers I know are 0x68 long -- if this one is longer
+       we can could simply ignore the additional information */
+    /* Since 'we' (parse_fimp()) only need data from the first 32
+       bytes, don't complain unless it's smaller than that */
+    if (len < 32)
+    {
+	g_set_error (&cts->error,
+		     ITDB_FILE_ERROR,
+		     ITDB_FILE_ERROR_CORRUPT,
+		     _("iTunesDB ('%s'): header length of mhsd hunk smaller than expected (%d<32). Aborting."),
+		     cts->filename, len);
+	return FALSE;
+    }
+
+    mhsd_num = get32lint (cts, 20);
+    if (cts->error) return 0;
+
+    seek = 0;
+    for (i=0; i<mhsd_num; ++i)
+    {
+	guint32 mhsd_type;
+
+	seek += len;
+	if (!check_header_seek (cts, "mhsd", seek))
+	{
+	    if (!cts->error)
+	    {   /* set error */
+		g_set_error (&cts->error,
+			     ITDB_FILE_ERROR,
+			     ITDB_FILE_ERROR_CORRUPT,
+			     _("iTunesDB '%s' corrupt: mhsd expected at %ld."),
+			     cts->filename, seek);
+	    }
+	    return 0;
+	}
+	len = get32lint (cts, seek+8);
+	if (cts->error) return 0;
+	
+	mhsd_type = get32lint (cts, seek+12);
+	if (cts->error) return 0;
+
+	if (mhsd_type == type) return seek;
+    }
+    return -1;
+}
+
+
+/* sort in reverse order */
+static gint pos_comp (gconstpointer a, gconstpointer b)
+{
+    const PosEntry *pa = (const PosEntry*)a;
+    const PosEntry *pb = (const PosEntry*)b;
+
+    return pb->track_pos - pa->track_pos;
+}
+
+
+/* Read and process the mhip at @seek. Return a pointer to the next
+   possible mhip. */
+/* Return value: -1 if no mhip is present at @seek */
+static glong get_mhip (FImport *fimp, glong mhip_seek)
+{
+    gboolean first_entry = TRUE;
+    FContents *cts;
+    guint32 mhip_hlen, mhip_len, mhod_num, mhod_seek;
+    gint32 i;
+    gint32 mhod_type;
+    guint32 trackid;
+
+
+    g_return_val_if_fail (fimp, -1);
+
+    cts = fimp->fcontents;
+
+    if (!check_header_seek (cts, "mhip", mhip_seek))
+    {
+	CHECK_ERROR (fimp, -1);
+	return -1;
+    }
+
+    mhip_hlen = get32lint (cts, mhip_seek+4);
+    CHECK_ERROR (fimp, -1);
+
+    if (mhip_hlen < 36)
+    {
+	set_error_a_header_smaller_than_b (&fimp->error,
+					   "mhip",
+					   mhip_hlen, 36,
+					   mhip_seek, cts->filename);
+	return -1;
+    }
+
+    /* Check if entire mhip header can be read -- that way we won't
+       have to check for read errors every time we access a single
+       byte */
+
+    check_seek (cts, mhip_seek, mhip_hlen);
+    CHECK_ERROR (fimp, -1);
+
+    mhip_len = get32lint (cts, mhip_seek+8);
+    mhod_num = get32lint (cts, mhip_seek+12);
+    trackid = get32lint(cts, mhip_seek+24);
+
+    mhod_seek = mhip_seek + mhip_hlen;
+ 
+    /* the mhod that follows gives us the position in the
+       playlist (type 100). Just for flexibility, we scan all
+       following mhods and pick the type 100 */
+    for (i=0; i<mhod_num; ++i)
+    {
+	guint32 mhod_len;
+
+	mhod_type = get_mhod_type (cts, mhod_seek, &mhod_len);
+	CHECK_ERROR (fimp, -1);
+	if (mhod_type == MHOD_ID_PLAYLIST)
+	{
+	    MHODData mhod;
+	    mhod = get_mhod (fimp, mhod_seek, &mhod_len);
+	    CHECK_ERROR (fimp, -1);
+	    if (mhod.valid && first_entry)
+	    {
+		PosEntry *entry = g_new(PosEntry, 1);
+		entry->trackid = trackid;
+		entry->track_pos = mhod.data.track_pos;
+		fimp->pos_glist = g_list_prepend (fimp->pos_glist, entry);
+		/* don't call this section more than once (it never
+		   should happen except in the case of corrupted
+		   iTunesDBs...) */
+		first_entry = FALSE;
+	    }
+	}
+	else
+	{
+	    if (mhod_len == -1)
+	    {
+		g_warning (_("Number of MHODs in mhip at %ld inconsistent in file '%s'."),
+			   mhip_seek, cts->filename);
+		break;
+	    }
+	}
+	mhod_seek += mhod_len;
+    }
+
+    /* Up to iTunesd V4.7 or so the mhip_len was set incorrectly
+       (mhip_len == mhip_hlen). In that case we need to find the seek
+       to the next mhip by going through all mhods.
+    */
+    if ((mhip_len == mhip_hlen) && (mhod_num > 0))
+	return mhod_seek;
+    else
+	return mhip_seek+mhip_len;
+}
+
+
+
+
+/* Get a playlist. Returns the position where the next playlist should
+   be. On error -1 is returned and fimp->error is set
+   appropriately. */
+/* get_mhyp */
+static glong get_playlist (FImport *fimp, glong mhyp_seek)
+{
+  guint32 i, mhipnum, mhod_num;
+  glong nextseek, mhod_seek, mhip_seek;
+  guint32 header_len;
+  Itdb_Playlist *plitem = NULL;
+  FContents *cts;
+  GList *gl;
+
+#if ITUNESDB_DEBUG
+  fprintf(stderr, "mhyp seek: %x\n", (int)mhyp_seek);
+#endif
+  g_return_val_if_fail (fimp, -1);
+  g_return_val_if_fail (fimp->idtree, -1);
+  g_return_val_if_fail (fimp->pos_glist == NULL, -1);
+
+  cts = fimp->fcontents;
+
+  if (!check_header_seek (cts, "mhyp", mhyp_seek))
+  {
+      if (cts->error)
+	  g_propagate_error (&fimp->error, cts->error);
+      return -1;
+  }
+  header_len = get32lint (cts, mhyp_seek+4); /* length of header */
+  CHECK_ERROR (fimp, -1);
+
+  if (header_len < 48)
+  {
+      set_error_a_header_smaller_than_b (&fimp->error,
+					 "mhyp",
+					 header_len, 48,
+					 mhyp_seek, cts->filename);
+      return -1;
+  }
+
+  /* Check if entire mhyp can be read -- that way we won't have to
+   * check for read errors every time we access a single byte */
+
+  check_seek (cts, mhyp_seek, header_len);
+  CHECK_ERROR (fimp, -1);
+
+  nextseek = mhyp_seek + get32lint (cts, mhyp_seek+8);/* possible begin of next PL */  mhod_num = get32lint (cts, mhyp_seek+12); /* number of MHODs we expect */
+  mhipnum = get32lint (cts, mhyp_seek+16); /* number of tracks
+					       (mhips) in playlist */
+
+  plitem = itdb_playlist_new (NULL, FALSE);
+
+  /* Some Playlists have added 256 to their type -- I don't know what
+     it's for, so we just ignore it for now -> & 0xff */
+  plitem->type = get8int (cts, mhyp_seek+20);
+  plitem->flag1 = get8int (cts, mhyp_seek+21);
+  plitem->flag2 = get8int (cts, mhyp_seek+22);
+  plitem->flag3 = get8int (cts, mhyp_seek+23);
+  plitem->timestamp = get32lint (cts, mhyp_seek+24);
+  plitem->timestamp = device_time_mac_to_time_t (fimp->itdb->device, plitem->timestamp);
+  plitem->id = get64lint (cts, mhyp_seek+28);
+/*  plitem->mhodcount = get32lint (cts, mhyp_seek+36);   */
+/*  plitem->libmhodcount = get16lint (cts, mhyp_seek+40);*/
+  plitem->podcastflag = get16lint (cts, mhyp_seek+42);
+  plitem->sortorder = get32lint (cts, mhyp_seek+44);
+
+  mhod_seek = mhyp_seek + header_len;
+
+  for (i=0; i < mhod_num; ++i)
+  {
+      gint32 type;
+      MHODData mhod;
+
+      type = get_mhod_type (cts, mhod_seek, &header_len);
+      CHECK_ERROR (fimp, -1);
+      if (header_len != -1)
+      {
+	  switch ((enum MHOD_ID)type)
+	  {
+	  case MHOD_ID_PLAYLIST:
+	      /* here we could do something about the playlist settings */
+	      break;
+	  case MHOD_ID_TITLE:
+	      mhod = get_mhod (fimp, mhod_seek, &header_len);
+	      CHECK_ERROR (fimp, -1);
+	      if (mhod.valid && mhod.data.string)
+	      {
+		  /* sometimes there seem to be two mhod TITLE headers */
+		  g_free (plitem->name);
+		  plitem->name = mhod.data.string;
+		  mhod.valid = FALSE;
+	      }
+	      break;
+	  case MHOD_ID_SPLPREF:
+	      mhod = get_mhod (fimp, mhod_seek, &header_len);
+	      CHECK_ERROR (fimp, -1);
+	      if (mhod.valid && mhod.data.splpref)
+	      {
+		  plitem->is_spl = TRUE;
+		  memcpy (&plitem->splpref, mhod.data.splpref,
+			  sizeof (Itdb_SPLPref));
+		  g_free (mhod.data.splpref);
+		  mhod.valid = FALSE;
+	      }
+	      break;
+	  case MHOD_ID_SPLRULES:
+	      mhod = get_mhod (fimp, mhod_seek, &header_len);
+	      CHECK_ERROR (fimp, -1);
+	      if (mhod.valid && mhod.data.splrules)
+	      {
+		  plitem->is_spl = TRUE;
+		  memcpy (&plitem->splrules, mhod.data.splrules,
+			  sizeof (Itdb_SPLRules));
+		  g_free (mhod.data.splrules);
+		  mhod.valid = FALSE;
+	      }
+	      break;
+	  case MHOD_ID_PATH:
+	  case MHOD_ID_ALBUM:
+	  case MHOD_ID_ARTIST:
+	  case MHOD_ID_GENRE:
+	  case MHOD_ID_FILETYPE:
+	  case MHOD_ID_COMMENT:
+	  case MHOD_ID_CATEGORY:
+	  case MHOD_ID_COMPOSER:
+	  case MHOD_ID_GROUPING:
+	  case MHOD_ID_DESCRIPTION:
+	  case MHOD_ID_PODCASTURL:
+	  case MHOD_ID_PODCASTRSS:
+	  case MHOD_ID_SUBTITLE:
+	  case MHOD_ID_TVSHOW:
+	  case MHOD_ID_TVEPISODE:
+	  case MHOD_ID_TVNETWORK:
+	  case MHOD_ID_ALBUMARTIST:
+	  case MHOD_ID_KEYWORDS:
+	  case MHOD_ID_CHAPTERDATA:
+	  case MHOD_ID_SORT_ARTIST:
+	  case MHOD_ID_SORT_TITLE:
+	  case MHOD_ID_SORT_ALBUM:
+	  case MHOD_ID_SORT_ALBUMARTIST:
+	  case MHOD_ID_SORT_COMPOSER:
+	  case MHOD_ID_SORT_TVSHOW:
+	  case MHOD_ID_ALBUM_ALBUM:
+	  case MHOD_ID_ALBUM_ARTIST:
+	  case MHOD_ID_ALBUM_SORT_ARTIST:
+	  case MHOD_ID_LIBPLAYLISTJUMPTABLE:
+	      /* these are not expected here */
+	      break;
+	  case MHOD_ID_LIBPLAYLISTINDEX:
+	      /* this I don't know how to handle */
+	      break;
+	  }
+	  mhod_seek += header_len;
+      }
+      else
+      {
+	  g_warning (_("Number of MHODs in mhyp at %ld inconsistent in file '%s'."),
+		     mhyp_seek, cts->filename);
+	  break;
+      }
+  }
+
+  if (!plitem->name)
+  {   /* we did not read a valid mhod TITLE header -> */
+      /* we simply make up our own name */
+      if (itdb_playlist_is_mpl (plitem))
+	  plitem->name = g_strdup (_("Master-PL"));
+      else
+      {
+	  if (itdb_playlist_is_podcasts (plitem))
+	      plitem->name = g_strdup (_("Podcasts"));
+	  else
+	      plitem->name = g_strdup (_("Playlist"));
+      }
+  }
+
+#if ITUNESDB_DEBUG
+  fprintf(stderr, "pln: %s(%d Itdb_Tracks) \n", plitem->name, (int)tracknum);
+#endif
+
+  /* add new playlist */
+  itdb_playlist_add (fimp->itdb, plitem, -1);
+
+  mhip_seek = mhod_seek;
+
+  i=0; /* tracks read */
+  for (i=0; i < mhipnum; ++i)
+  {
+      mhip_seek = get_mhip (fimp, mhip_seek);
+      if (mhip_seek == -1)
+      {
+	  g_set_error (&fimp->error,
+		       ITDB_FILE_ERROR,
+		       ITDB_FILE_ERROR_CORRUPT,
+		       _("iTunesDB corrupt: number of mhip sections inconsistent in mhyp starting at %ld in file '%s'."),
+		       mhyp_seek, cts->filename);
+	  return -1;
+      }
+  }	  
+
+  /* sort in reverse order */
+  fimp->pos_glist = g_list_sort (fimp->pos_glist, pos_comp);
+  for (gl = fimp->pos_glist; gl; gl = g_list_next (gl))
+  {
+      PosEntry* entry = (PosEntry*)gl->data;
+      Itdb_Track *tr = itdb_track_id_tree_by_id (fimp->idtree, entry->trackid);
+      if (tr)
+      {
+	  /* preprend because we sorted in reverse order */
+	  itdb_playlist_add_track (plitem, tr, 0);
+      }
+      else
+      {
+	  if (plitem->podcastflag == ITDB_PL_FLAG_NORM)
+	  {
+	      g_warning (_("Itdb_Track ID '%d' not found.\n"), entry->trackid);
+	  }
+      }
+      g_free(entry);
+  }
+
+  g_list_free (fimp->pos_glist);
+  fimp->pos_glist = NULL;
+  return nextseek;
+}
+
+
+/* returns a pointer to the next header or -1 on error. fimp->error is
+   set appropriately. If no "mhit" header is found at the location
+   specified, -1 is returned but no error is set. */
+static glong get_mhit (FImport *fimp, glong mhit_seek)
+{
+  Itdb_Track *track;
+  gchar *entry_utf8;
+  gint32 type;
+  guint32 header_len;
+  guint32 zip;
+  struct playcount *playcount;
+  guint32 i, mhod_nums;
+  FContents *cts;
+  glong seek = mhit_seek;
+
+#if ITUNESDB_DEBUG
+  fprintf(stderr, "get_mhit seek: %x\n", (int)seek);
+#endif
+
+  g_return_val_if_fail (fimp, -1);
+
+  cts = fimp->fcontents;
+
+  if (!check_header_seek (cts, "mhit", seek))
+  {
+      if (cts->error)
+	  g_propagate_error (&fimp->error, cts->error);
+      return -1;
+  }
+
+  header_len = get32lint (cts, seek+4);
+  CHECK_ERROR (fimp, -1);
+
+  /* size of the mhit header: For dbversion <= 0x0b (iTunes 4.7 and
+     earlier), the length is 0x9c. As of dbversion 0x0c and 0x0d
+     (iTunes 4.7.1 - iTunes 4.9), the size is 0xf4. */
+  if (header_len < 0x9c)
+  {
+      set_error_a_header_smaller_than_b (&fimp->error,
+					 "mhit",
+					 header_len, 0x9c,
+					 seek, cts->filename);
+      return -1;
+  }
+
+  /* Check if entire mhit can be read -- that way we won't have to
+   * check for read errors every time we access a single byte */
+
+  check_seek (cts, seek, header_len);
+
+  mhod_nums = get32lint (cts, seek+12);
+  CHECK_ERROR (fimp, -1);
+
+
+  track = itdb_track_new ();
+
+  if (header_len >= 0x9c)
+  {
+      guint32 val32;
+      track->id = get32lint(cts, seek+16);         /* iPod ID          */
+      track->visible = get32lint (cts, seek+20);
+      track->filetype_marker = get32lint (cts, seek+24);
+      track->type1 = get8int (cts, seek+28);
+      track->type2 = get8int (cts, seek+29);
+      track->compilation = get8int (cts, seek+30);
+      track->rating = get8int (cts, seek+31);
+      track->time_modified = get32lint(cts, seek+32); /* time added       */
+      track->time_modified = device_time_mac_to_time_t (fimp->itdb->device, 
+						      track->time_modified);
+      track->size = get32lint(cts, seek+36);       /* file size        */
+      track->tracklen = get32lint(cts, seek+40);   /* time             */
+      track->track_nr = get32lint(cts, seek+44);   /* track number     */
+      track->tracks = get32lint(cts, seek+48);     /* nr of tracks     */
+      track->year = get32lint(cts, seek+52);       /* year             */
+      track->bitrate = get32lint(cts, seek+56);    /* bitrate          */
+      val32 = get32lint (cts, seek+60);
+      track->samplerate = val32 >> 16;             /* sample rate      */
+      track->samplerate_low = val32 & 0xffff;      /* remaining bits   */
+      track->volume = get32lint(cts, seek+64);     /* volume adjust    */
+      track->starttime = get32lint (cts, seek+68);
+      track->stoptime = get32lint (cts, seek+72);
+      track->soundcheck = get32lint (cts, seek+76);/* soundcheck       */
+      track->playcount = get32lint (cts, seek+80); /* playcount        */
+      track->playcount2 = get32lint (cts, seek+84);
+      track->time_played = get32lint(cts, seek+88);/* last time played */
+      track->time_played = device_time_mac_to_time_t (fimp->itdb->device, 
+						    track->time_played);
+      track->cd_nr = get32lint(cts, seek+92);      /* CD nr            */
+      track->cds = get32lint(cts, seek+96);        /* CD nr of..       */
+      /* Apple Store/Audible User ID (for DRM'ed files only, set to 0
+	 otherwise). */
+      track->drm_userid = get32lint (cts, seek+100);
+      track->time_added = get32lint(cts, seek+104);/* last mod. time */
+      track->time_added = device_time_mac_to_time_t (fimp->itdb->device, 
+						   track->time_added);
+      track->bookmark_time = get32lint (cts, seek+108);/*time bookmarked*/
+      track->dbid = get64lint (cts, seek+112);
+      track->checked = get8int (cts, seek+120); /*Checked/Unchecked: 0/1*/
+      /* The rating set by the application, as opposed to the rating
+	 set on the iPod itself */
+      track->app_rating = get8int (cts, seek+121);
+      track->BPM = get16lint (cts, seek+122);
+      track->artwork_count = get16lint (cts, seek+124);
+      track->unk126 = get16lint (cts, seek+126);
+      track->artwork_size = get32lint (cts, seek+128);
+      track->unk132 = get32lint (cts, seek+132);
+      track->samplerate2 = get32lfloat (cts, seek+136);
+      track->time_released = get32lint (cts, seek+140);
+      track->time_released = device_time_mac_to_time_t (fimp->itdb->device,
+						      track->time_released);
+      track->unk144 = get16lint (cts, seek+144);
+      track->explicit_flag = get16lint (cts, seek+146);
+      track->unk148 = get32lint (cts, seek+148);
+      track->unk152 = get32lint (cts, seek+152);
+  }
+  if (header_len >= 0xf4)
+  {
+      track->skipcount = get32lint (cts, seek+156);
+      track->last_skipped = get32lint (cts, seek+160);
+      track->last_skipped = device_time_mac_to_time_t (fimp->itdb->device, 
+						     track->last_skipped);
+      track->has_artwork = get8int (cts, seek+164);
+      track->skip_when_shuffling = get8int (cts, seek+165);
+      track->remember_playback_position = get8int (cts, seek+166);
+      track->flag4 = get8int (cts, seek+167);
+      track->dbid2 = get64lint (cts, seek+168);
+      track->lyrics_flag = get8int (cts, seek+176);
+      track->movie_flag = get8int (cts, seek+177);
+      track->mark_unplayed = get8int (cts, seek+178);
+      track->unk179 = get8int (cts, seek+179);
+      track->unk180 = get32lint (cts, seek+180);
+      track->pregap = get32lint (cts, seek+184);
+      track->samplecount = get64lint (cts, seek+188);
+      track->unk196 = get32lint (cts, seek+196);
+      track->postgap = get32lint (cts, seek+200);
+      track->unk204 = get32lint (cts, seek+204);
+      track->mediatype = get32lint (cts, seek+208);
+      track->season_nr = get32lint (cts, seek+212);
+      track->episode_nr = get32lint (cts, seek+216);
+      track->unk220 = get32lint (cts, seek+220);
+      track->unk224 = get32lint (cts, seek+224);
+      track->unk228 = get32lint (cts, seek+228);
+      track->unk232 = get32lint (cts, seek+232);
+      track->unk236 = get32lint (cts, seek+236);
+      track->unk240 = get32lint (cts, seek+240);
+  }
+  if (header_len >= 0x148)
+  {
+      track->unk244 = get32lint (cts, seek+244);
+      track->gapless_data = get32lint (cts, seek+248);
+      track->unk252 = get32lint (cts, seek+252);
+      track->gapless_track_flag = get16lint (cts, seek+256);
+      track->gapless_album_flag = get16lint (cts, seek+258);
+  }
+  /* 200805 */
+  if (header_len >= 0x184)
+  {
+      track->mhii_link = get32lint (cts, seek+352);
+  }
+
+  track->transferred = TRUE;                   /* track is on iPod! */
+
+  seek += get32lint (cts, seek+4);             /* 1st mhod starts here! */
+  CHECK_ERROR (fimp, -1);
+
+  for (i=0; i<mhod_nums; ++i)
+  {
+      entry_utf8 = get_mhod_string (fimp, seek, &zip, &type);
+      CHECK_ERROR (fimp, -1);
+      if (entry_utf8 != NULL)
+      {
+	  switch ((enum MHOD_ID)type)
+	  {
+	  case MHOD_ID_TITLE:
+	      track->title = entry_utf8;
+	      break;
+	  case MHOD_ID_PATH:
+	      track->ipod_path = entry_utf8;
+	      break;
+	  case MHOD_ID_ALBUM:
+	      track->album = entry_utf8;
+	      break;
+	  case MHOD_ID_ARTIST:
+	      track->artist = entry_utf8;
+	      break;
+	  case MHOD_ID_GENRE:
+	      track->genre = entry_utf8;
+	      break;
+	  case MHOD_ID_FILETYPE:
+	      track->filetype = entry_utf8;
+	      break;
+	  case MHOD_ID_COMMENT:
+	      track->comment = entry_utf8;
+	      break;
+	  case MHOD_ID_CATEGORY:
+	      track->category = entry_utf8;
+	      break;
+	  case MHOD_ID_COMPOSER:
+	      track->composer = entry_utf8;
+	      break;
+	  case MHOD_ID_GROUPING:
+	      track->grouping = entry_utf8;
+	      break;
+	  case MHOD_ID_DESCRIPTION:
+	      track->description = entry_utf8;
+	      break;
+	  case MHOD_ID_PODCASTURL:
+	      track->podcasturl = entry_utf8;
+	      break;
+	  case MHOD_ID_PODCASTRSS:
+	      track->podcastrss = entry_utf8;
+	      break;
+	  case MHOD_ID_SUBTITLE:
+	      track->subtitle = entry_utf8;
+	      break;
+	  case MHOD_ID_TVSHOW:
+	      track->tvshow = entry_utf8;
+	      break;
+	  case MHOD_ID_TVEPISODE:
+	      track->tvepisode = entry_utf8;
+	      break;
+	  case MHOD_ID_TVNETWORK:
+	      track->tvnetwork = entry_utf8;
+	      break;
+	  case MHOD_ID_ALBUMARTIST:
+	      track->albumartist = entry_utf8;
+	      break;
+	  case MHOD_ID_KEYWORDS:
+	      track->keywords = entry_utf8;
+	      break;
+	  case MHOD_ID_SORT_ARTIST:
+	      track->sort_artist = entry_utf8;
+	      break;
+	  case MHOD_ID_SORT_TITLE:
+	      track->sort_title = entry_utf8;
+	      break;
+	  case MHOD_ID_SORT_ALBUM:
+	      track->sort_album = entry_utf8;
+	      break;
+	  case MHOD_ID_SORT_ALBUMARTIST:
+	      track->sort_albumartist = entry_utf8;
+	      break;
+	  case MHOD_ID_SORT_COMPOSER:
+	      track->sort_composer = entry_utf8;
+	      break;
+	  case MHOD_ID_SORT_TVSHOW:
+	      track->sort_tvshow = entry_utf8;
+	      break;
+	  case MHOD_ID_SPLPREF:
+	  case MHOD_ID_SPLRULES:
+	  case MHOD_ID_LIBPLAYLISTINDEX:
+	  case MHOD_ID_LIBPLAYLISTJUMPTABLE:
+	  case MHOD_ID_PLAYLIST:
+	  case MHOD_ID_CHAPTERDATA:
+	  case MHOD_ID_ALBUM_ALBUM:
+	  case MHOD_ID_ALBUM_ARTIST:
+	  case MHOD_ID_ALBUM_SORT_ARTIST:
+	      g_free (entry_utf8);
+	      break;
+	  }
+      }
+      else
+      {
+	  MHODData mhod;
+	  switch (type)
+	  {
+	  case MHOD_ID_CHAPTERDATA:
+	      mhod = get_mhod (fimp, seek, &zip);
+	      if (mhod.valid && mhod.data.chapterdata)
+	      {
+		  track->chapterdata = mhod.data.chapterdata;
+		  mhod.valid = FALSE;
+	      }
+	      break;
+	  default:
+/*
+	  printf ("found mhod type %d at %lx inside mhit starting at %lx\n",
+	  type, seek, mhit_seek);*/
+	      break;
+	  }
+      }
+      seek += zip;
+  }
+
+  playcount = playcount_take_next (fimp);
+  if (playcount)
+  {
+      if (playcount->rating != NO_PLAYCOUNT)
+      {
+	  if (track->rating != playcount->rating)
+	  {
+	      /* backup original rating to app_rating */
+	      track->app_rating = track->rating;
+	      track->rating = playcount->rating;
+	  }
+      }
+      if (playcount->time_played)
+	  track->time_played = playcount->time_played;
+
+      if (playcount->bookmark_time)
+	  track->bookmark_time = playcount->bookmark_time;
+
+      track->playcount += playcount->playcount;
+      if (playcount->playcount != 0)
+      {   /* unmark the 'unplayed' flag */
+	  track->mark_unplayed = 0x01;
+      }
+      track->recent_playcount = playcount->playcount;
+
+      track->skipcount += playcount->skipcount;
+      track->recent_skipcount = playcount->skipcount;
+
+      g_free (playcount);
+  }
+  fimp->tracks = g_list_prepend(fimp->tracks, track);
+  return seek;
+}
+
+
+/* Called by read_OTG_playlists(): OTG playlist stored in @cts by
+ * adding a new playlist (named @plname) with the tracks specified in
+ * @cts. If @plname is NULL, a standard name will be substituted */
+/* Returns FALSE on error, TRUE on success. On error @fimp->error will
+ * be set apropriately. */
+static gboolean process_OTG_file (FImport *fimp, FContents *cts,
+				  const gchar *plname)
+{
+    guint32 header_length, entry_length, entry_num;
+
+    g_return_val_if_fail (fimp && cts, FALSE);
+    g_return_val_if_fail (fimp->itdb, FALSE);
+
+    if (!plname) plname = _("OTG Playlist");
+
+    if (!check_header_seek (cts, "mhpo", 0))
+    {
+	if (cts->error)
+	{
+	    g_propagate_error (&fimp->error, cts->error);
+	    return FALSE;
+	}
+	fcontents_set_reversed (cts, TRUE);
+	if (!check_header_seek (cts, "mhpo", 0))
+	{
+	    /* cts->error can't be set as already checked above */
+	    /* set error */
+	    g_return_val_if_fail (cts->filename, FALSE);
+	    g_set_error (&fimp->error,
+			 ITDB_FILE_ERROR,
+			 ITDB_FILE_ERROR_CORRUPT,
+			 _("Not a OTG playlist file: '%s' (missing mhpo header)."),
+			 cts->filename);
+	    return FALSE;
+	}
+    }
+    header_length = get32lint (cts, 4);
+    CHECK_ERROR (fimp, FALSE);
+    /* all the headers I know are 0x14 long -- if this one is
+       longer we can simply ignore the additional information */
+    if (header_length < 0x14)
+    {
+	g_set_error (&fimp->error,
+		     ITDB_FILE_ERROR,
+		     ITDB_FILE_ERROR_CORRUPT,
+		     _("OTG playlist file ('%s'): header length smaller than expected (%d<20)."),
+		     cts->filename, header_length);
+	return FALSE;
+    }
+    entry_length = get32lint (cts, 8);
+    CHECK_ERROR (fimp, FALSE);
+    /* all the entries I know are 0x04 long */
+    if (entry_length < 0x04)
+    {
+	g_set_error (&fimp->error,
+		     ITDB_FILE_ERROR,
+		     ITDB_FILE_ERROR_CORRUPT,
+		     _("OTG playlist file ('%s'): entry length smaller than expected (%d<4)."),
+		     cts->filename, entry_length);
+	return FALSE;
+    }
+    /* number of entries */
+    entry_num = get32lint (cts, 12);
+    CHECK_ERROR (fimp, FALSE);
+
+    if (entry_num > 0)
+    {
+	gint i;
+	Itdb_Playlist *pl;
+
+	pl = itdb_playlist_new (plname, FALSE);
+	/* Add new playlist */
+	itdb_playlist_add (fimp->itdb, pl, -1);
+
+	/* Add items */
+	for (i=0; i<entry_num; ++i)
+	{
+	    Itdb_Track *track;
+	    guint32 num = get32lint (cts,
+				     header_length + entry_length *i);
+	    CHECK_ERROR (fimp, FALSE);
+
+	    track = g_list_nth_data (fimp->itdb->tracks, num);
+	    if (track)
+	    {
+		itdb_playlist_add_track (pl, track, -1);
+	    }
+	    else
+	    {
+		g_set_error (&fimp->error,
+			     ITDB_FILE_ERROR,
+			     ITDB_FILE_ERROR_CORRUPT,
+			     _("OTG playlist file '%s': reference to non-existent track (%d)."),
+			     cts->filename, num);
+		return FALSE;
+	    }
+	}
+    }
+    return TRUE;
+}
+
+
+
+
+/* Add the On-The-Go Playlist(s) to the database */
+/* The OTG-Files are located in the directory given by
+   fimp->itdb->itdb_filename.
+   On error FALSE is returned and fimp->error is set accordingly. */
+static gboolean read_OTG_playlists (FImport *fimp)
+{
+    gchar *db[] = {"OTGPlaylistInfo", NULL};
+    gchar *dirname, *otgname;
+
+    g_return_val_if_fail (fimp, FALSE);
+    g_return_val_if_fail (fimp->itdb, FALSE);
+    g_return_val_if_fail (fimp->itdb->filename, FALSE);
+
+    dirname = g_path_get_dirname (fimp->itdb->filename);
+
+    otgname = itdb_resolve_path (dirname, (const gchar **)db);
+
+
+    /* only parse if "OTGPlaylistInfo" exists */
+    if (otgname)
+    {
+	gchar *filename;
+	gint i=1;
+	do
+	{
+	    db[0] = g_strdup_printf ("OTGPlaylistInfo_%d", i);
+	    filename = itdb_resolve_path (dirname, (const gchar **)db);
+	    g_free (db[0]);
+	    if (filename)
+	    {
+		FContents *cts = fcontents_read (filename, &fimp->error);
+		if (cts)
+		{
+		    gchar *plname = g_strdup_printf (_("OTG Playlist %d"), i);
+		    process_OTG_file (fimp, cts, plname);
+		    g_free (plname);
+		    fcontents_free (cts);
+		}
+		g_free (filename);
+	    }
+	    if (fimp->error) break;
+	    ++i;
+	} while (filename);
+	g_free (otgname);
+    }
+    g_free (dirname);
+    return TRUE;
+}
+
+
+/* Read the tracklist (mhlt). mhsd_seek must point to type 1 mhsd
+   (this is treated as a programming error) */
+/* Return value:
+   TRUE: import successful
+   FALSE: error occured, fimp->error is set */
+static gboolean parse_tracks (FImport *fimp, glong mhsd_seek)
+{
+    FContents *cts;
+    GList* gl;
+    glong mhlt_seek, seek;
+    guint32 nr_tracks, i;
+
+    g_return_val_if_fail (fimp, FALSE);
+    g_return_val_if_fail (fimp->itdb, FALSE);
+    g_return_val_if_fail (fimp->fcontents, FALSE);
+    g_return_val_if_fail (fimp->fcontents->filename, FALSE);
+    g_return_val_if_fail (mhsd_seek >= 0, FALSE);
+
+    cts = fimp->fcontents;
+
+    g_return_val_if_fail (check_header_seek (cts, "mhsd", mhsd_seek),
+			  FALSE);
+
+   /* The mhlt header should be the next after the mhsd header. In
+      order to allow slight changes in the format, we skip headers
+      until we find an mhlt inside the given mhsd */
+
+    mhlt_seek = find_next_a_in_b (cts, "mhlt", mhsd_seek, mhsd_seek);
+    CHECK_ERROR (fimp, FALSE);
+
+    if (mhlt_seek == -1)
+    {
+	set_error_a_not_found_in_b (&fimp->error,
+				    "mhlt", "mhsd", mhsd_seek);
+	return FALSE;
+    }
+
+    /* Now we are at the mhlt */
+    nr_tracks = get32lint (cts, mhlt_seek+8);
+    CHECK_ERROR (fimp, FALSE);
+
+    seek = find_next_a_in_b (cts, "mhit", mhsd_seek, mhlt_seek);
+    CHECK_ERROR (fimp, FALSE);
+    /* seek should now point to the first mhit */
+    for (i=0; i<nr_tracks; ++i)
+    {
+	/* seek could be -1 if first mhit could not be found */
+	if (seek != -1)
+	    seek = get_mhit (fimp, seek);
+	if (fimp->error) return FALSE;
+	if (seek == -1)
+	{   /* this should not be -- issue warning */
+	    g_warning (_("iTunesDB corrupt: number of tracks (mhit hunks) inconsistent. Trying to continue.\n"));
+	    break;
+	}
+    }
+    for (gl=fimp->tracks; gl; gl=g_list_next(gl)) {
+	Itdb_Track *track = (Itdb_Track *)gl->data;
+	itdb_track_add (fimp->itdb, track, 0);
+    }
+    return TRUE;
+}
+
+
+
+/* Read the playlists (mhlp). mhsd_seek must point to type 2 or type 3
+   mhsd (this is treated as a programming error) */
+/* Return value:
+   TRUE: import successful
+   FALSE: error occured, fimp->error is set */
+static gboolean parse_playlists (FImport *fimp, glong mhsd_seek)
+{
+    FContents *cts;
+    glong seek, mhlp_seek;
+    guint32 nr_playlists, i;
+
+    g_return_val_if_fail (fimp, FALSE);
+    g_return_val_if_fail (fimp->itdb, FALSE);
+    g_return_val_if_fail (fimp->fcontents, FALSE);
+    g_return_val_if_fail (fimp->fcontents->filename, FALSE);
+    g_return_val_if_fail (mhsd_seek >= 0, FALSE);
+
+    cts = fimp->fcontents;
+
+    g_return_val_if_fail (check_header_seek (cts, "mhsd", mhsd_seek),
+			  FALSE);
+
+    /* The mhlp header should be the next after the mhsd header. In
+       order to allow slight changes in the format, we skip headers
+       until we find an mhlp inside the given mhsd */
+
+    mhlp_seek = find_next_a_in_b (cts, "mhlp", mhsd_seek, mhsd_seek);
+    CHECK_ERROR (fimp, FALSE);
+
+    if (mhlp_seek == -1)
+    {
+	set_error_a_not_found_in_b (&fimp->error,
+				    "mhlp", "mhsd", mhsd_seek);
+	return FALSE;
+    }
+    /* Now we are at the mhlp */
+
+    nr_playlists = get32lint (cts, mhlp_seek+8);
+    CHECK_ERROR (fimp, FALSE);
+
+    /* Create track-id tree for quicker track lookup */
+    fimp->idtree = itdb_track_id_tree_create (fimp->itdb);
+
+    seek = find_next_a_in_b (cts, "mhyp", mhsd_seek, mhlp_seek);
+    CHECK_ERROR (fimp, FALSE);
+    /* seek should now point to the first mhit */
+    for (i=0; i<nr_playlists; ++i)
+    {
+	/* seek could be -1 if first mhyp could not be found */
+	if (seek != -1)
+	    seek = get_playlist (fimp, seek);
+	if (fimp->error) return FALSE;
+	if (seek == -1)
+	{   /* this should not be -- issue warning */
+	    g_warning (_("iTunesDB possibly corrupt: number of playlists (mhyp hunks) inconsistent. Trying to continue.\n"));
+	    break;
+	}
+    }
+
+    itdb_track_id_tree_destroy (fimp->idtree);
+    fimp->idtree = NULL;
+
+    return TRUE;
+}
+
+static gboolean parse_fimp (FImport *fimp)
+{
+    glong seek=0;
+    FContents *cts;
+    glong mhsd_1, mhsd_2, mhsd_3;
+
+    g_return_val_if_fail (fimp, FALSE);
+    g_return_val_if_fail (fimp->itdb, FALSE);
+    g_return_val_if_fail (fimp->fcontents, FALSE);
+    g_return_val_if_fail (fimp->fcontents->filename, FALSE);
+
+    cts = fimp->fcontents;
+
+    /* get the positions of the various mhsd */
+    /* type 1: track list */
+    mhsd_1 = find_mhsd (cts, 1);
+    CHECK_ERROR (fimp, FALSE);
+    /* type 2: standard playlist section -- Podcasts playlist will be
+       just an ordinary playlist */
+    mhsd_2 = find_mhsd (cts, 2);
+    CHECK_ERROR (fimp, FALSE);
+    /* type 3: playlist section with special version of Podcasts
+       playlist (optional) */
+    mhsd_3 = find_mhsd (cts, 3);
+    CHECK_ERROR (fimp, FALSE);
+
+    fimp->itdb->version = get32lint (cts, seek+16);
+    CHECK_ERROR (fimp, FALSE);
+    fimp->itdb->id = get64lint (cts, seek+24);
+    CHECK_ERROR (fimp, FALSE);
+
+    if (mhsd_1 == -1)
+    {   /* Very bad: no type 1 mhsd which should hold the tracklist */
+	g_set_error (&fimp->error,
+		     ITDB_FILE_ERROR,
+		     ITDB_FILE_ERROR_CORRUPT,
+		     _("iTunesDB '%s' corrupt: Could not find tracklist (no mhsd type 1 section found)"),
+		     cts->filename);
+	return FALSE;
+    }
+
+    /* copy the 'reversed endian flag' */
+    if (cts->reversed) {
+      fimp->itdb->device->byte_order = G_BIG_ENDIAN;
+    } else {
+      fimp->itdb->device->byte_order = G_LITTLE_ENDIAN;
+    }
+#if 0
+    fimp->itdb->device->endianess_set = TRUE;
+    fimp->itdb->device->endianess_reversed = cts->reversed;
+#endif
+
+    parse_tracks (fimp, mhsd_1);
+    if (fimp->error) return FALSE;
+
+    if (mhsd_3 != -1)
+	parse_playlists (fimp, mhsd_3);
+    else if (mhsd_2 != -1)
+	parse_playlists (fimp, mhsd_2);
+    else
+    {  /* Very bad: no type 2 or type 3 mhsd which should hold the
+	  playlists */
+	g_set_error (&fimp->error,
+		     ITDB_FILE_ERROR,
+		     ITDB_FILE_ERROR_CORRUPT,
+		     _("iTunesDB '%s' corrupt: Could not find playlists (no mhsd type 2 or type 3 sections found)"),
+		     cts->filename);
+	return FALSE;
+    }
+
+    return TRUE;
+}
+
+
+
+/* Set @error with standard error message */
+static void error_no_itunes_dir (const gchar *mp, GError **error)
+{
+    gchar *str;
+
+    g_return_if_fail (mp);
+    g_return_if_fail (error);
+
+    str = g_build_filename (mp, "iPod_Control", "iTunes", NULL);
+    g_set_error (error,
+		 ITDB_FILE_ERROR,
+		 ITDB_FILE_ERROR_NOTFOUND,
+		 _("iTunes directory not found: '%s' (or similar)."),
+		 str);
+    g_free (str);
+}
+
+/* Set @error with standard error message */
+static void error_no_music_dir (const gchar *mp, GError **error)
+{
+    gchar *str;
+
+    g_return_if_fail (mp);
+    g_return_if_fail (error);
+
+    str = g_build_filename (mp, "iPod_Control", "Music", NULL);
+    g_set_error (error,
+		 ITDB_FILE_ERROR,
+		 ITDB_FILE_ERROR_NOTFOUND,
+		 _("Music directory not found: '%s' (or similar)."),
+		 str);
+    g_free (str);
+}
+
+#if 0
+/* Set @error with standard error message */
+static void error_no_control_dir (const gchar *mp, GError **error)
+{
+    gchar *str;
+
+    g_return_if_fail (mp);
+    g_return_if_fail (error);
+
+    str = g_build_filename (mp, "iPod_Control", NULL);
+    g_set_error (error,
+		 ITDB_FILE_ERROR,
+		 ITDB_FILE_ERROR_NOTFOUND,
+		 _("Control directory not found: '%s' (or similar)."),
+		 str);
+    g_free (str);
+}
+#endif
+
+
+static gboolean
+itdb_parse_internal (Itdb_iTunesDB *itdb, GError **error)
+{
+    FImport *fimp;
+    gboolean success = FALSE;
+
+    g_return_val_if_fail (itdb->filename != NULL, FALSE);
+    
+    fimp = g_new0 (FImport, 1);
+    fimp->itdb = itdb;
+
+    fimp->fcontents = fcontents_read (itdb->filename, error);
+
+    if (fimp->fcontents)
+    {
+	if (playcounts_init (fimp))
+	{
+	    if (parse_fimp (fimp))
+	    {
+		if (read_OTG_playlists (fimp))
+		{
+		    success = TRUE;
+		}
+	    }
+	}
+    }
+
+    if (fimp->error)
+	g_propagate_error (error, fimp->error);
+
+    itdb_free_fimp (fimp);
+
+    return success;
+}
+
+/**
+ * itdb_parse:
+ * @mp:     mount point of the iPod (eg "/mnt/ipod") in local encoding
+ * @error:  return location for a #GError or NULL
+ *
+ * Parse the Itdb_iTunesDB of the iPod located at @mp
+ *
+ * Returns: a newly allocated #Itdb_iTunesDB struct holding the tracks and
+ * the playlists present on the iPod at @mp, NULL if @mp isn't an iPod mount
+ * point. If non-NULL, the #Itdb_iTunesDB is to be freed with itdb_free() when
+ * it's no longer needed
+ */
+Itdb_iTunesDB *itdb_parse (const gchar *mp, GError **error)
+{
+    gchar *filename;
+    gchar *itunes_dir;
+    Itdb_iTunesDB *itdb = NULL;
+    const gchar *db[] = {"iTunesDB", NULL};
+
+
+    itunes_dir = itdb_get_itunes_dir (mp);
+
+    if (!itunes_dir)
+    {
+	error_no_itunes_dir (mp, error);
+	return NULL;
+    }
+
+    filename = itdb_resolve_path (itunes_dir, db);
+
+    if (filename)
+    {
+	itdb = itdb_new ();
+	
+	if (itdb)
+	{
+	    gboolean success;
+
+	    itdb_set_mountpoint (itdb, mp);
+	    itdb->filename = filename;
+	    success = itdb_parse_internal (itdb, error);
+	    if (success)
+	    {
+		/* We don't test the return value of ipod_parse_artwork_db
+		 * since the database content will be consistent even if
+		 * we fail to get the various thumbnails, we ignore the
+		 * error since older ipods don't have thumbnails.
+
+		 * FIXME: this probably should go into itdb_parse_file,
+		 * but I don't understand its purpose, and
+		 * ipod_parse_artwork_db needs the mountpoint field from
+		 * the itdb, which may not be available in the other
+		 * function
+
+		 * JCS: itdb_parse_file is used to read local repositories
+		 * (usually repositories stored in
+		 * ~/.gtkpod). ipod_parse_artwork_db (and the
+		 * corresponding artbook write function) should probably
+		 * be expanded to look for (write) the required files into
+		 * the same directory as itdb->filename in case
+		 * itdb->mountpoint does not exist. Because several local
+		 * repositories may exist in the same directory, the names
+		 * should be modified by the repository name.
+		 */
+		ipod_parse_artwork_db (itdb);
+	    }
+	    else
+	    {
+		itdb_free (itdb);
+		itdb = NULL;
+	    }
+	}
+    }
+    else
+    {
+	gchar *str = g_build_filename (mp, db[0], db[1], db[2], db[3], NULL);
+	g_set_error (error,
+		     ITDB_FILE_ERROR,
+		     ITDB_FILE_ERROR_NOTFOUND,
+		     _("File not found: '%s'."),
+		     str);
+	g_free (str);
+    }
+    g_free (itunes_dir);
+    return itdb;
+}
+
+/**
+ * itdb_parse_file:
+ * @filename:   path to a file in iTunesDB format
+ * @error:      return location for a #GError or NULL
+ *
+ *  Same as itunesdb_parse(), but filename is specified directly.
+ *
+ * Returns: a newly allocated #Itdb_iTunesDB struct holding the tracks and
+ * the playlists present in @filename, NULL if @filename isn't a parsable 
+ * iTunesDB file. If non-NULL, the #Itdb_iTunesDB is to be freed with 
+ * itdb_free() when it's no longer needed
+ */
+Itdb_iTunesDB *itdb_parse_file (const gchar *filename, GError **error)
+{
+    Itdb_iTunesDB *itdb;
+    gboolean success;
+
+    g_return_val_if_fail (filename, NULL);
+
+    itdb = itdb_new ();
+    itdb->filename = g_strdup (filename);
+
+    success = itdb_parse_internal (itdb, error);
+    if (!success)
+    {
+	itdb_free (itdb);
+	itdb = NULL;
+    }
+
+    return itdb;
+}
+
+
+/* up to here we had the functions for reading the iTunesDB               */
+/* ---------------------------------------------------------------------- */
+/* from here on we have the functions for writing the iTunesDB            */
+
+/* will expand @cts when necessary in order to accomodate @len bytes
+   starting at @seek */
+static void wcontents_maybe_expand (WContents *cts, gulong len,
+				    gulong seek)
+{
+    g_return_if_fail (cts);
+
+    while (cts->pos+len > cts->total)
+    {
+	cts->total += WCONTENTS_STEPSIZE;
+	cts->contents = g_realloc (cts->contents, cts->total);
+    }
+}
+
+
+/* Write @data, @n bytes long to position @seek. Will always be
+ * successful because glib terminates when out of memory */
+static void put_data_seek (WContents *cts, gchar *data,
+			   gulong len, gulong seek)
+{
+    g_return_if_fail (cts);
+
+    if (len != 0)
+    {
+	g_return_if_fail (data);
+	wcontents_maybe_expand (cts, len, seek);
+
+	memcpy (&cts->contents[seek], data, len);
+	/* adjust end position if necessary */
+	if (seek+len > cts->pos)
+	    cts->pos = seek+len;
+    }
+}
+
+
+
+/* Write @data, @n bytes long to end of @cts. Will always be
+ * successful because glib terminates when out of memory */
+static void put_data (WContents *cts, gchar *data, gulong len)
+{
+    g_return_if_fail (cts);
+
+    put_data_seek (cts, data, len, cts->pos);
+}
+
+
+/* Write @string without trailing Null to end of @cts. Will always be
+ * successful because glib terminates when out of memory */
+static void put_string (WContents *cts, gchar *string)
+{
+    g_return_if_fail (cts);
+    g_return_if_fail (string);
+
+    put_data (cts, string, strlen(string));
+}
+
+/* Write 4-byte long @header identifcation taking into account
+ * possible reversed endianess */
+static void put_header (WContents *cts, gchar *header)
+{
+    gchar rdata[4];
+    gint i, offset, sign;
+
+
+    g_return_if_fail (cts);
+    g_return_if_fail (header);
+    g_return_if_fail (strlen (header) == 4);
+
+    /* reverse data for write if necessary */
+    if (cts->reversed)
+    {
+	offset = 3;
+	sign = -1;
+    }
+    else
+    {
+	offset = 0;
+	sign = 1;
+    }
+    for (i=0; i<4; ++i)
+    {
+	    rdata[i] = header[offset + sign*i];
+    }
+
+    put_data (cts, rdata, 4);
+}
+
+
+
+/* ------------------------------------------------------------
+   Little Endian
+   ------------------------------------------------------------ */
+
+/* Write 2-byte integer @n to @cts in little endian order. */
+static void raw_put16lint (WContents *cts, guint16 n)
+{
+    n = GUINT16_TO_LE (n);
+    put_data (cts, (gchar *)&n, 2);
+}
+
+
+/* Write 3-byte integer @n to @cts in big endian order. */
+static void raw_put24lint (WContents *cts, guint32 n)
+{
+    gchar buf[3] ;
+    buf[2] = (n >> 16) & 0xff ;
+    buf[1] = (n >> 8)  & 0xff ;
+    buf[0] = (n >> 0)  & 0xff ;
+    put_data (cts, buf, 3);
+}
+
+
+/* Write 4-byte integer @n to @cts in little endian order. */
+static void raw_put32lint (WContents *cts, guint32 n)
+{
+    n = GUINT32_TO_LE (n);
+    put_data (cts, (gchar *)&n, 4);
+}
+
+/* Write 4 byte floating number */
+static void raw_put32lfloat (WContents *cts, float f)
+{
+    union
+    {
+	guint32 i;
+	float   f;
+    } flt;
+
+    if (sizeof (float) != 4)
+    {
+	raw_put32lint (cts, 0);
+	g_return_if_reached ();
+    }
+
+    flt.f = f;
+    raw_put32lint (cts, flt.i);
+}
+
+
+/* Write 4-byte integer @n to @cts at position @seek in little
+   endian order. */
+static void raw_put32lint_seek (WContents *cts, guint32 n, gulong seek)
+{
+    n = GUINT32_TO_LE (n);
+    put_data_seek (cts, (gchar *)&n, 4, seek);
+}
+
+
+/* Write 8-byte integer @n to @cts in big little order. */
+static void raw_put64lint (WContents *cts, guint64 n)
+{
+    n = GUINT64_TO_LE (n);
+    put_data (cts, (gchar *)&n, 8);
+}
+
+
+/* ------------------------------------------------------------
+   Big Endian
+   ------------------------------------------------------------ */
+
+/* Write 2-byte integer @n to @cts in big endian order. */
+static void raw_put16bint (WContents *cts, guint16 n)
+{
+    n = GUINT16_TO_BE (n);
+    put_data (cts, (gchar *)&n, 2);
+}
+
+
+/* Write 3-byte integer @n to @cts in big endian order. */
+static void raw_put24bint (WContents *cts, guint32 n)
+{
+    gchar buf[3] ;
+    buf[0] = (n >> 16) & 0xff ;
+    buf[1] = (n >> 8)  & 0xff ;
+    buf[2] = (n >> 0)  & 0xff ;
+    put_data (cts, buf, 3);
+}
+
+/* Write 4-byte integer @n to @cts in big endian order. */
+static void raw_put32bint (WContents *cts, guint32 n)
+{
+    n = GUINT32_TO_BE (n);
+    put_data (cts, (gchar *)&n, 4);
+}
+
+
+/* Write 4-byte integer @n to @cts at position @seek in big
+   endian order. */
+static void raw_put32bint_seek (WContents *cts, guint32 n, gulong seek)
+{
+    n = GUINT32_TO_BE (n);
+    put_data_seek (cts, (gchar *)&n, 4, seek);
+}
+
+
+/* Write 4 byte floating number */
+static void raw_put32bfloat (WContents *cts, float f)
+{
+    union
+    {
+	guint32 i;
+	float   f;
+    } flt;
+
+    if (sizeof (float) != 4)
+    {
+	raw_put32bint (cts, 0);
+	g_return_if_reached ();
+    }
+
+    flt.f = f;
+    raw_put32bint (cts, flt.i);
+}
+
+
+/* Write 8-byte integer @n to cts in big endian order. */
+static void raw_put64bint (WContents *cts, guint64 n)
+{
+    n = GUINT64_TO_BE (n);
+    put_data (cts, (gchar *)&n, 8);
+}
+
+
+/* ------------------------------------------------------------
+   Not Endian Dependent
+   ------------------------------------------------------------ */
+
+/* Write 1-byte integer @n to @cts */
+static void put8int (WContents *cts, guint8 n)
+{
+    put_data (cts, (gchar *)&n, 1);
+}
+
+
+/* Append @n times 2-byte-long zeros */
+static void put16_n0 (WContents *cts, gulong n)
+{
+    g_return_if_fail (cts);
+
+    if (n>0)
+    {
+	wcontents_maybe_expand (cts, 2*n, cts->pos);
+	memset (&cts->contents[cts->pos], 0, 2*n);
+	cts->pos += 2*n;
+    }
+}
+
+/* Append @n times 4-byte-long zeros */
+static void put32_n0 (WContents *cts, gulong n)
+{
+    g_return_if_fail (cts);
+
+    if (n>0)
+    {
+	wcontents_maybe_expand (cts, 4*n, cts->pos);
+	memset (&cts->contents[cts->pos], 0, 4*n);
+	cts->pos += 4*n;
+    }
+}
+
+
+/* ------------------------------------------------------------
+   Reversed Endian Sensitive (little endian)
+   ------------------------------------------------------------ */
+
+static void put16lint (WContents *cts, guint16 n)
+{
+    if (!cts->reversed)
+	raw_put16lint (cts, n);
+    else
+	raw_put16bint (cts, n);
+}
+#if 0
+static void put24lint (WContents *cts, guint32 n)
+{
+    if (!cts->reversed)
+	raw_put24lint (cts, n);
+    else
+	raw_put24bint (cts, n);
+}
+#endif
+static void put32lint (WContents *cts, guint32 n)
+{
+    if (!cts->reversed)
+	raw_put32lint (cts, n);
+    else
+	raw_put32bint (cts, n);
+}
+
+static void put32lfloat (WContents *cts, float f)
+{
+    if (!cts->reversed)
+	raw_put32lfloat (cts, f);
+    else
+	raw_put32bfloat (cts, f);
+}
+
+static void put32lint_seek (WContents *cts, guint32 n, gulong seek)
+{
+    if (!cts->reversed)
+	raw_put32lint_seek (cts, n, seek);
+    else
+	raw_put32bint_seek (cts, n, seek);
+}
+
+
+static void put64lint (WContents *cts, guint64 n)
+{
+    if (!cts->reversed)
+	raw_put64lint (cts, n);
+    else
+	raw_put64bint (cts, n);
+}
+
+/* ------------------------------------------------------------
+   Reversed Endian Sensitive (big endian)
+   ------------------------------------------------------------ */
+static void put16bint (WContents *cts, guint16 n)
+{
+    if (cts->reversed)
+	raw_put16lint (cts, n);
+    else
+	raw_put16bint (cts, n);
+}
+
+static void put24bint (WContents *cts, guint32 n)
+{
+    if (cts->reversed)
+	raw_put24lint (cts, n);
+    else
+	raw_put24bint (cts, n);
+}
+
+static void put32bint (WContents *cts, guint32 n)
+{
+    if (cts->reversed)
+	raw_put32lint (cts, n);
+    else
+	raw_put32bint (cts, n);
+}
+#if 0
+static void put32bfloat (WContents *cts, float f)
+{
+    if (cts->reversed)
+	raw_put32lfloat (cts, f);
+    else
+	raw_put32bfloat (cts, f);
+}
+#endif
+
+static void put32bint_seek (WContents *cts, guint32 n, gulong seek)
+{
+    if (cts->reversed)
+	raw_put32lint_seek (cts, n, seek);
+    else
+	raw_put32bint_seek (cts, n, seek);
+}
+
+static void put64bint (WContents *cts, guint64 n)
+{
+    if (cts->reversed)
+	raw_put64lint (cts, n);
+    else
+	raw_put64bint (cts, n);
+}
+
+
+
+/* Write out the mhbd header. Size will be written later */
+static void mk_mhbd (FExport *fexp, guint32 children)
+{
+  WContents *cts;
+
+  g_return_if_fail (fexp);
+  g_return_if_fail (fexp->itdb);
+  g_return_if_fail (fexp->wcontents);
+
+  cts = fexp->wcontents;
+
+  put_header (cts, "mhbd");
+  put32lint (cts, 188); /* header size */
+  put32lint (cts, -1);  /* size of whole mhdb -- fill in later */
+  put32lint (cts, 1);   /* ? */
+  /* Version number: 0x01: iTunes 2
+                     0x02: iTunes 3
+		     0x09: iTunes 4.2
+		     0x0a: iTunes 4.5
+		     0x0b: iTunes 4.7
+		     0x0c: iTunes 4.71/4.8 (required for shuffle)
+                     0x0d: iTunes 4.9
+                     0x0e: iTunes 5
+		     0x0f: iTunes 6
+		     0x10: iTunes 6.0.1(?)
+		     0x11: iTunes 6.0.2
+                     0x12 = iTunes 6.0.5.
+		     0x13 = iTunes 7 
+                     0x14 = iTunes 7.1
+                     0x15 = iTunes 7.2
+                     0x19 = iTunes 7.4
+    Be aware that newer ipods won't work if the library version number is too 
+    old
+  */
+  fexp->itdb->version = 0x19;
+  put32lint (cts, fexp->itdb->version);
+  put32lint (cts, children);
+  put64lint (cts, fexp->itdb->id);
+  /* 0x20 */
+  put16lint (cts, 2);   /* always seems to be 2 */
+  put16_n0  (cts, 7);  /* unknown */
+  /* 0x30 */
+  put16lint (cts, 0);   /* set hashing scheme to 0 for now, will be set
+			 * to the appropriate value in
+			 * itdb_device_write_checksum */
+  put16_n0  (cts, 10);  /* unknown */
+  /* 0x46 */
+  put16lint (cts, 0);   /* langauge */
+  put64lint (cts, 0);   /* library persistent ID */
+  /* 0x50 */
+  put32lint (cts, 0);   /* unknown: seen: 0x05 for nano 3G */
+  put32lint (cts, 0);   /* unknown: seen: 0x4d for nano 3G */
+  put32_n0 (cts, 5);    /* 20 bytes hash */
+  put32lint (cts, 0);   /* timezone offset in seconds */
+  put16lint (cts, 2);   /* without it, iTunes thinks iPhone databases
+			   are corrupted */
+  put16lint (cts, 0);
+  put32_n0 (cts, 18);   /* dummy space */
+}
+
+/* Fill in the length of a standard header */
+static void fix_header (WContents *cts, gulong header_seek)
+{
+  put32lint_seek (cts, cts->pos-header_seek, header_seek+8);
+}
+
+
+/* Write out the mhsd header. Size will be written later */
+static void mk_mhsd (FExport *fexp, guint32 type)
+{
+  WContents *cts;
+
+  g_return_if_fail (fexp);
+  g_return_if_fail (fexp->itdb);
+  g_return_if_fail (fexp->wcontents);
+
+  cts = fexp->wcontents;
+
+  put_header (cts, "mhsd");
+  put32lint (cts, 96);   /* Headersize */
+  put32lint (cts, -1);   /* size of whole mhsd -- fill in later */
+  put32lint (cts, type); /* type: 1 = track, 2 = playlist */
+  put32_n0 (cts, 20);      /* dummy space */
+}
+
+
+/* Write out the mhlt header. */
+static void mk_mhlt (FExport *fexp, guint32 num)
+{
+  WContents *cts;
+
+  g_return_if_fail (fexp);
+  g_return_if_fail (fexp->itdb);
+  g_return_if_fail (fexp->wcontents);
+
+  cts = fexp->wcontents;
+
+  put_header (cts, "mhlt");
+  put32lint (cts, 92);       /* Headersize */
+  put32lint (cts, num);      /* tracks in this itunesdb */
+  put32_n0 (cts, 20);        /* dummy space */
+}
+
+
+/* Write out the mhit header. Size will be written later */
+static void mk_mhit (WContents *cts, Itdb_Track *track)
+{
+  guint32 mac_time;
+  g_return_if_fail (cts);
+  g_return_if_fail (track);
+
+  put_header (cts, "mhit");
+  put32lint (cts, 0x184);/* header size */
+  put32lint (cts, -1);   /* size of whole mhit -- fill in later */
+  put32lint (cts, -1);   /* nr of mhods in this mhit -- later   */
+  put32lint (cts, track->id); /* track index number */
+
+  put32lint (cts, track->visible);
+  put32lint (cts, track->filetype_marker);
+  put8int (cts, track->type1);
+  put8int (cts, track->type2);
+  put8int   (cts, track->compilation);
+  put8int   (cts, track->rating);
+  mac_time = device_time_time_t_to_mac (track->itdb->device, track->time_modified);
+  put32lint (cts, mac_time); /* timestamp               */
+  put32lint (cts, track->size);    /* filesize                   */
+  put32lint (cts, track->tracklen);/* length of track in ms      */
+  put32lint (cts, track->track_nr);/* track number               */
+  put32lint (cts, track->tracks);  /* number of tracks           */
+  put32lint (cts, track->year);    /* the year                   */
+  put32lint (cts, track->bitrate); /* bitrate                    */
+  put32lint (cts, (((guint32)track->samplerate)<<16) |
+	     ((guint32)track->samplerate_low));
+  put32lint (cts, track->volume);  /* volume adjust              */
+  put32lint (cts, track->starttime);
+  put32lint (cts, track->stoptime);
+  put32lint (cts, track->soundcheck);
+  put32lint (cts, track->playcount);/* playcount                 */
+  track->playcount2 = track->playcount;
+  put32lint (cts, track->playcount2);
+  mac_time = device_time_time_t_to_mac (track->itdb->device, track->time_played);
+  put32lint (cts, mac_time); /* last time played       */
+  put32lint (cts, track->cd_nr);   /* CD number                  */
+  put32lint (cts, track->cds);     /* number of CDs              */
+  put32lint (cts, track->drm_userid);
+  mac_time = device_time_time_t_to_mac (track->itdb->device, track->time_added);
+  put32lint (cts, mac_time); /* timestamp            */
+  put32lint (cts, track->bookmark_time);
+  put64lint (cts, track->dbid);
+  if (track->checked)   put8int (cts, 1);
+  else                  put8int (cts, 0);
+  put8int (cts, track->app_rating);
+  put16lint (cts, track->BPM);
+  put16lint (cts, track->artwork_count);
+  put16lint (cts, track->unk126);
+  put32lint (cts, track->artwork_size);
+  put32lint (cts, track->unk132);
+  put32lfloat (cts, track->samplerate2);
+  mac_time = device_time_time_t_to_mac (track->itdb->device, track->time_released);
+  put32lint (cts, mac_time);
+  put16lint (cts, track->unk144);
+  put16lint (cts, track->explicit_flag);
+  put32lint (cts, track->unk148);
+  put32lint (cts, track->unk152);
+  /* since iTunesDB version 0x0c */
+  put32lint (cts, track->skipcount);
+  mac_time = device_time_time_t_to_mac (track->itdb->device, track->last_skipped);
+  put32lint (cts, mac_time);
+  put8int (cts, track->has_artwork);
+  put8int (cts, track->skip_when_shuffling);
+  put8int (cts, track->remember_playback_position);
+  put8int (cts, track->flag4);
+  put64lint (cts, track->dbid2);
+  put8int (cts, track->lyrics_flag);
+  put8int (cts, track->movie_flag);
+  put8int (cts, track->mark_unplayed);
+  put8int (cts, track->unk179);
+  put32lint (cts, track->unk180);
+  put32lint (cts, track->pregap);
+  put64lint (cts, track->samplecount);
+  put32lint (cts, track->unk196);
+  put32lint (cts, track->postgap);
+  put32lint (cts, track->unk204);
+  put32lint (cts, track->mediatype);
+  put32lint (cts, track->season_nr);
+  put32lint (cts, track->episode_nr);
+  put32lint (cts, track->unk220);
+  put32lint (cts, track->unk224);
+  put32lint (cts, track->unk228);
+  put32lint (cts, track->unk232);
+  put32lint (cts, track->unk236);
+  put32lint (cts, track->unk240);
+  put32lint (cts, track->unk244);
+  put32lint (cts, track->gapless_data);
+  put32lint (cts, track->unk252);
+  put16lint (cts, track->gapless_track_flag);
+  put16lint (cts, track->gapless_album_flag);
+  put32_n0 (cts, 22);
+  put16lint (cts, 0);
+  put16lint (cts, track->album_id);
+  put32lint (cts, track->mhii_link); /* Needed on fat nanos/ipod classic to get art
+				      * in the right sidepane (mhii_link) */
+  put32_n0 (cts, 8); /* padding */
+}
+
+
+/* Fill in the missing items of the mhit header:
+   total size and number of mhods */
+static void fix_mhit (WContents *cts, gulong mhit_seek, guint32 mhod_num)
+{
+  g_return_if_fail (cts);
+
+  /* size of whole mhit */
+  put32lint_seek (cts, cts->pos-mhit_seek, mhit_seek+8);
+  /* nr of mhods */
+  put32lint_seek (cts, mhod_num, mhit_seek+12);
+}
+
+/* Returns:
+   - track->sort_artist if track->sort_artist is not NULL
+
+   - 'Artist, The' if track->sort_artist is NULL and track->artist of
+     of type 'The Artist'.
+
+   - NULL if track->sort_artist is NULL and track->artist is not of
+     type 'The Artist'.
+
+   You must g_free() the returned string */
+static gchar *get_sort_artist (Itdb_Track *track)
+{
+    g_return_val_if_fail (track, NULL);
+
+    if (track->sort_artist && *track->sort_artist)
+    {
+	return g_strdup (track->sort_artist);
+    }
+
+    if (!(track->artist && *track->artist))
+    {
+	return NULL;
+    }
+
+    /* check if artist is of type 'The Artist' */
+    if (g_ascii_strncasecmp ("The ", track->artist, 4) == 0)
+    {   /* return 'Artist, The', followed by five 0x01 chars
+	   (analogous to iTunes) */
+	return g_strdup_printf ("%s, The%c%c%c%c%c",
+				track->artist+4,
+				0x01, 0x01, 0x01, 0x01, 0x01);
+    }
+
+    return NULL;
+}
+
+
+
+
+static gint mhod52_sort_title (const struct mhod52track *a, const struct mhod52track *b)
+{
+    return strcmp (a->title, b->title);
+}
+
+
+static gint mhod52_sort_album (const struct mhod52track *a, const struct mhod52track *b)
+{
+    gint result;
+
+    result = strcmp (a->album, b->album);
+    if (result == 0)
+	result = a->cd_nr - b->cd_nr;
+    if (result == 0)
+	result = a->track_nr - b->track_nr;
+    if (result == 0)
+	result = strcmp (a->title, b->title);
+    return result;
+}
+
+static gint mhod52_sort_artist (struct mhod52track *a, struct mhod52track *b)
+{
+    gint result;
+
+    result = strcmp (a->artist, b->artist);
+    if (result == 0)
+	result = strcmp (a->album, b->album);
+    if (result == 0)
+	result = a->cd_nr - b->cd_nr;
+    if (result == 0)
+	result = a->track_nr - b->track_nr;
+    if (result == 0)
+	result = strcmp (a->title, b->title);
+    return result;
+}
+
+static gint mhod52_sort_genre (struct mhod52track *a, struct mhod52track *b)
+{
+    gint result;
+
+    result = strcmp (a->genre, b->genre);
+    if (result == 0)
+	result = strcmp (a->artist, b->artist);
+    if (result == 0)
+	result = strcmp (a->album, b->album);
+    if (result == 0)
+	result = a->cd_nr - b->cd_nr;
+    if (result == 0)
+	result = a->track_nr - b->track_nr;
+    if (result == 0)
+	result = strcmp (a->title, b->title);
+    return result;
+}
+
+static gint mhod52_sort_composer (struct mhod52track *a, struct mhod52track *b)
+{
+    gint result;
+
+    result = strcmp (a->composer, b->composer);
+    if (result == 0)
+	result = strcmp (a->title, b->title);
+    return result;
+}
+
+
+/* Return the first alpha-numeric character in the string
+   Return upper-case for alpha, return 0 for all numbers */
+
+static gunichar2 jump_table_letter (gchar *p)
+{
+    gunichar chr = 0;
+    gboolean found_alnum_chars = FALSE;
+
+    g_return_val_if_fail (p != NULL, '0');
+    g_return_val_if_fail (g_utf8_validate (p, -1, NULL), '0');
+
+    while (*p != '\0') {
+        chr = g_utf8_get_char (p);
+        if (g_unichar_isalnum (chr)) 
+        {
+	    found_alnum_chars = TRUE;
+            break;        
+        }
+        p = g_utf8_find_next_char (p, NULL);
+    }
+
+    if (!found_alnum_chars) {
+        /* Return number 0 if no alphanumerics in string */
+        return '0';
+    }
+
+    if (g_unichar_isalpha(chr))
+    {
+        gunichar2 utf16chr;
+        gunichar upperchr;
+        gunichar2 *str;
+        GError *err = NULL;
+
+	upperchr = g_unichar_toupper (chr);
+        str = g_ucs4_to_utf16 (&upperchr, 1, NULL, NULL, &err);
+	if (err != NULL) {
+	    fprintf (stderr, "Error in UCS4 to UTF16 conversion: %s, original unichar: %x, toupper unichar: %x\n", err->message, chr, upperchr);
+	    g_error_free (err);
+	    return '0';
+	}
+	else
+        {
+	    utf16chr = str[0];
+	    g_free (str);
+	    return utf16chr;
+	}
+    }	    
+
+    return '0';		/* Return number 0 for any digit */
+}
+
+
+/* Create a new list containing all tracks but with collate keys
+   instead of the actual strings (title, artist, album, genre,
+   composer) */
+static GList *mhod52_make_collate_keys (GList *tracks)
+{
+    gint numtracks = g_list_length (tracks);
+    GList *gl, *coltracks = NULL;
+    gint index=0;
+
+    for (gl=tracks; gl; gl=gl->next)
+    {
+	gchar *str;
+	struct mhod52track *ct;
+	Itdb_Track *tr = gl->data;
+	g_return_val_if_fail (tr, NULL);
+
+	ct = g_new0 (struct mhod52track, 1);
+	coltracks = g_list_prepend (coltracks, ct);
+
+	/* album */
+	if (tr->sort_album && *tr->sort_album)
+	{
+	    ct->album = g_utf8_collate_key (tr->sort_album, -1);
+	    ct->letter_album = jump_table_letter (tr->sort_album);
+	}
+	else if (tr->album)
+	{
+	    ct->album = g_utf8_collate_key (tr->album, -1);
+	    ct->letter_album = jump_table_letter (tr->album);
+	}
+	else
+	{
+	    ct->album = g_strdup ("");
+	    ct->letter_album = '0';
+	}
+
+	/* title */
+	if (tr->sort_title && *tr->sort_title)
+	{
+	    ct->title = g_utf8_collate_key (tr->sort_title, -1);
+	    ct->letter_title = jump_table_letter (tr->sort_title);
+	}
+	else if (tr->title)
+	{
+	    ct->title = g_utf8_collate_key (tr->title, -1);
+	    ct->letter_title = jump_table_letter (tr->title);
+	}
+	else
+	{
+	    ct->title = g_strdup ("");
+	    ct->letter_title = '0';
+	}
+
+	/* artist */
+	str = get_sort_artist (tr);
+	if (str)
+	{
+	    ct->artist = g_utf8_collate_key (str, -1);
+	    ct->letter_artist = jump_table_letter (str);
+	    g_free (str);
+	}
+	else if (tr->artist)
+	{
+	    ct->artist = g_utf8_collate_key (tr->artist, -1);
+	    ct->letter_artist = jump_table_letter (tr->artist);
+	}
+	else
+	{
+	    ct->artist = g_strdup ("");
+	    ct->letter_artist = '0';
+	}
+
+	/* genre */
+	if (tr->genre)
+	{
+	    ct->genre = g_utf8_collate_key (tr->genre, -1);
+	    ct->letter_genre = jump_table_letter (tr->genre);
+	}
+	else
+	{
+	    ct->genre = g_strdup ("");
+	    ct->letter_genre = '0';
+	}
+
+	/* composer */
+	if (tr->sort_composer && *tr->sort_composer)
+	{
+	    ct->composer = g_utf8_collate_key (tr->sort_composer, -1);
+	    ct->letter_composer = jump_table_letter (tr->sort_composer);
+	}
+	else if (tr->composer)
+	{
+	    ct->composer = g_utf8_collate_key (tr->composer, -1);
+	    ct->letter_composer = jump_table_letter (tr->composer);
+	}
+	else
+	{
+	    ct->composer = g_strdup ("");
+	    ct->letter_composer = '0';
+	}
+
+	ct->track_nr = tr->track_nr;
+	ct->cd_nr = tr->cd_nr;
+	ct->numtracks = numtracks;
+	ct->index = index++;
+    }
+    return coltracks;
+}
+
+
+/* Free all memory used up by the collate keys */
+static void mhod52_free_collate_keys (GList *coltracks)
+{
+    GList *gl;
+
+    for (gl=coltracks; gl; gl=gl->next)
+    {
+	struct mhod52track *ct = gl->data;
+	g_return_if_fail (ct);
+	g_free (ct->album);
+	g_free (ct->title);
+	g_free (ct->artist);
+	g_free (ct->genre);
+	g_free (ct->composer);
+	g_free (ct);
+    }
+    g_list_free (coltracks);
+}
+
+/* Write out one mhod header.
+     type: see enum of MHMOD_IDs;
+     data: utf8 string for text items
+           position indicator for MHOD_ID_PLAYLIST
+           Itdb_SPLPref for MHOD_ID_SPLPREF
+	   Itdb_SPLRules for MHOD_ID_SPLRULES */
+static void mk_mhod (FExport *fexp, MHODData *mhod)
+{
+  WContents *cts = fexp->wcontents;
+
+  g_return_if_fail (cts);
+  g_return_if_fail (mhod->valid);
+
+  switch ((enum MHOD_ID)mhod->type)
+  {
+  case MHOD_ID_TITLE:
+  case MHOD_ID_PATH:
+  case MHOD_ID_ALBUM:
+  case MHOD_ID_ARTIST:
+  case MHOD_ID_GENRE:
+  case MHOD_ID_FILETYPE:
+  case MHOD_ID_COMMENT:
+  case MHOD_ID_CATEGORY:
+  case MHOD_ID_COMPOSER:
+  case MHOD_ID_GROUPING:
+  case MHOD_ID_DESCRIPTION:
+  case MHOD_ID_SUBTITLE:
+  case MHOD_ID_TVSHOW:
+  case MHOD_ID_TVEPISODE:
+  case MHOD_ID_TVNETWORK:
+  case MHOD_ID_ALBUMARTIST:
+  case MHOD_ID_KEYWORDS:
+  case MHOD_ID_SORT_ARTIST:
+  case MHOD_ID_SORT_TITLE:
+  case MHOD_ID_SORT_ALBUM:
+  case MHOD_ID_SORT_ALBUMARTIST:
+  case MHOD_ID_SORT_COMPOSER:
+  case MHOD_ID_SORT_TVSHOW:
+  case MHOD_ID_ALBUM_ALBUM:
+  case MHOD_ID_ALBUM_ARTIST:
+  case MHOD_ID_ALBUM_SORT_ARTIST:
+      g_return_if_fail (mhod->data.string);
+      /* normal iTunesDBs seem to take utf16 strings), endian-inversed
+	 iTunesDBs seem to take utf8 strings */
+      if (!cts->reversed)
+      {
+	  /* convert to utf16  */
+	  glong len;
+	  gunichar2 *entry_utf16 = g_utf8_to_utf16 (mhod->data.string, -1,
+						    NULL, &len, NULL);
+	  fixup_little_utf16 (entry_utf16);
+	  put_header (cts, "mhod");   /* header                     */
+	  put32lint (cts, 24);        /* size of header             */
+	  put32lint (cts, sizeof (gunichar2)*len+40);  /* size of header + body      */
+	  put32lint (cts, mhod->type);/* type of the mhod           */
+	  put32_n0 (cts, 2);          /* unknown                    */
+	  /* end of header, start of data */
+	  put32lint (cts, 1);         /* string type UTF16          */
+	  put32lint (cts, sizeof (gunichar2)*len);     /* size of string             */
+	  put32_n0 (cts, 2);          /* unknown                    */
+	  put_data (cts, (gchar *)entry_utf16, sizeof (gunichar2)*len);/* the string */
+	  g_free (entry_utf16);
+      }
+      else
+      {
+	  guint32 len = strlen (mhod->data.string);
+	  put_header (cts, "mhod");   /* header                     */
+	  put32lint (cts, 24);        /* size of header             */
+	  put32lint (cts, len+40);    /* size of header + body      */
+	  put32lint (cts, mhod->type);/* type of the mhod           */
+	  put32_n0 (cts, 2);          /* unknown                    */
+	  /* end of header, start of data */
+	  put32lint (cts, 2);         /* string type UTF 8          */
+	  put32lint (cts, len);       /* size of string             */
+	  put8int (cts, 1);           /* unknown                    */
+	  put8int (cts, 0);           /* unknown                    */
+	  put8int (cts, 0);           /* unknown                    */
+	  put8int (cts, 0);           /* unknown                    */
+	  put32lint (cts, 0);         /* unknown                    */
+	  put_string (cts, mhod->data.string);/* the string         */
+      }
+      break;
+  case MHOD_ID_PODCASTURL:
+  case MHOD_ID_PODCASTRSS:
+      g_return_if_fail (mhod->data.string);
+      {
+	  guint32 len = strlen (mhod->data.string);
+	  put_header (cts, "mhod");   /* header                     */
+	  put32lint (cts, 24);        /* size of header             */
+	  put32lint (cts, 24+len);    /* size of header + data      */
+	  put32lint (cts, mhod->type);/* type of the mhod           */
+	  put32_n0 (cts, 2);          /* unknown                    */
+	  put_string (cts, mhod->data.string);/* the string         */
+      }
+      break;
+  case MHOD_ID_PLAYLIST:
+      put_header (cts, "mhod");   /* header                     */
+      put32lint (cts, 24);        /* size of header             */
+      put32lint (cts, 44);        /* size of header + body      */
+      put32lint (cts, mhod->type); /* type of the entry          */
+      put32_n0 (cts, 2);          /* unknown                    */
+      /* end of header, start of data */
+      put32lint (cts, mhod->data.track_pos);/* position of track in playlist */
+      put32_n0 (cts, 4);             /* unknown                    */
+      break;
+  case MHOD_ID_CHAPTERDATA:
+      g_return_if_fail (mhod->data.chapterdata);
+      {
+	  gulong header_seek = cts->pos; /* needed to fix length */
+	  GList *gl;
+	  gint numchapters = g_list_length (mhod->data.chapterdata->chapters);
+	  put_header (cts, "mhod");       /* header      */
+	  put32lint (cts, 24);            /* header size */
+	  put32lint (cts, -1);            /* total length, fix later  */
+	  put32lint (cts, mhod->type);    /* entry type  */
+	  put32_n0 (cts, 2);              /* unknown     */
+	  put32lint (cts, mhod->data.chapterdata->unk024); /* unknown */
+	  put32lint (cts, mhod->data.chapterdata->unk028); /* unknown */
+	  put32lint (cts, mhod->data.chapterdata->unk032); /* unknown */
+	  put32bint (cts, -1);            /* total length of sean atom, fix later  */
+	  put_header (cts, "sean");
+	  put32bint (cts, 1);             /* unknown     */
+	  put32bint (cts, numchapters+1); /* children    */
+	  put32bint (cts, 0);             /* unknown     */
+	  for (gl=mhod->data.chapterdata->chapters; gl; gl=gl->next)
+	  {
+	      gunichar2 *title_utf16;
+	      Itdb_Chapter *chapter = gl->data;
+/*	      gint len = strlen(chapter->chaptertitle); */
+		  glong len;
+	      title_utf16 = NULL;
+	      title_utf16 = g_utf8_to_utf16 (chapter->chaptertitle,
+		      -1,NULL,&len,NULL);
+	      fixup_big_utf16 (title_utf16);
+	      put32bint (cts, 42+2*len); /* total length  */
+	      put_header (cts, "chap");
+	      put32bint (cts, chapter->startpos); /* should we check if startpos=0 here? */
+	      put32bint (cts, 1);        /* children */
+	      put32bint (cts, 0);        /* unknown  */
+	      put32bint (cts, 22+2*len); /* length   */
+	      put_header (cts, "name");
+	      put32bint (cts, 1);        /* unknown  */
+	      put32_n0 (cts, 2);         /* unknown  */
+	      put16bint (cts, len);
+	      put_data (cts, (gchar *)title_utf16, 2*len);
+	      g_free (title_utf16);
+
+	  }
+	  put32bint (cts, 28); /* size     */
+	  put_header (cts, "hedr");
+	  put32bint (cts, 1);  /* unknown  */
+	  put32bint (cts, 0);  /* children */
+	  put32_n0 (cts, 2);   /* unknown  */
+	  put32bint (cts, 1);  /* unknown  */
+	  
+	  
+	  put32bint_seek (cts, cts->pos-(header_seek+36), header_seek+36); /* fix length of sean atom */
+	  fix_header (cts, header_seek);
+      }
+      break;
+  case MHOD_ID_SPLPREF:
+      g_return_if_fail (mhod->data.splpref);
+      put_header (cts, "mhod");  /* header                 */
+      put32lint (cts, 24);       /* size of header         */
+      put32lint (cts, 96);       /* size of header + body  */
+      put32lint (cts, mhod->type);/* type of the entry      */
+      put32_n0 (cts, 2);         /* unknown                */
+      /* end of header, start of data */
+      put8int (cts, mhod->data.splpref->liveupdate);
+      put8int (cts, mhod->data.splpref->checkrules? 1:0);
+      put8int (cts, mhod->data.splpref->checklimits);
+      put8int (cts, mhod->data.splpref->limittype);
+      put8int (cts, mhod->data.splpref->limitsort & 0xff);
+      put8int (cts, 0);          /* unknown                */
+      put8int (cts, 0);          /* unknown                */
+      put8int (cts, 0);          /* unknown                */
+      put32lint (cts, mhod->data.splpref->limitvalue);
+      put8int (cts, mhod->data.splpref->matchcheckedonly);
+      /* for the following see note at definitions of limitsort
+	 types in itunesdb.h */
+      put8int (cts, (mhod->data.splpref->limitsort & 0x80000000) ? 1:0);
+      put8int (cts, 0);          /* unknown                */
+      put8int (cts, 0);          /* unknown                */
+      put32_n0 (cts, 14);        /* unknown                */
+      break;
+  case MHOD_ID_SPLRULES:
+      g_return_if_fail (mhod->data.splrules);
+      {
+	  gulong header_seek = cts->pos; /* needed to fix length */
+	  GList *gl;
+	  gint numrules = g_list_length (mhod->data.splrules->rules);
+
+	  put_header (cts, "mhod");  /* header                   */
+	  put32lint (cts, 24);       /* size of header           */
+	  put32lint (cts, -1);       /* total length, fix later  */
+	  put32lint (cts, mhod->type);/* type of the entry        */
+	  put32_n0 (cts, 2);         /* unknown                  */
+	  /* end of header, start of data */
+	  /* For some reason this is the only part of the iTunesDB
+	     that uses big endian */
+	  put_header (cts, "SLst");  /* header                   */
+	  put32bint (cts, mhod->data.splrules->unk004); /* unknown*/
+	  put32bint (cts, numrules);
+	  put32bint (cts, mhod->data.splrules->match_operator);
+	  put32_n0 (cts, 30);            /* unknown              */
+	  /* end of header, now follow the rules */
+	  for (gl=mhod->data.splrules->rules; gl; gl=gl->next)
+	  {
+	      Itdb_SPLRule *splr = gl->data;
+	      ItdbSPLFieldType ft;
+	      glong len;
+	      gunichar2 *entry_utf16;
+	      g_return_if_fail (splr);
+	      ft = itdb_splr_get_field_type (splr);
+/*	      printf ("%p: field: %d ft: %d\n", splr, splr->field, ft);*/
+	      itdb_splr_validate (splr);
+	      put32bint (cts, splr->field);
+	      put32bint (cts, splr->action);
+	      put32_n0 (cts, 11);          /* unknown              */	      
+	      switch (ft)
+	      {
+	      case ITDB_SPLFT_STRING:
+		  /* write string-type rule */
+		  len = 0;
+		  entry_utf16 = NULL;
+		  /* splr->string may be NULL */
+		  if (splr->string)
+		      entry_utf16 = g_utf8_to_utf16 (splr->string,
+						     -1,NULL,&len,NULL);
+		  fixup_big_utf16 (entry_utf16);
+		  put32bint (cts, sizeof (gunichar2)*len); /* length of string     */
+		  put_data (cts, (gchar *)entry_utf16, sizeof (gunichar2)*len);
+		  g_free (entry_utf16);
+		  break;
+	      case ITDB_SPLFT_DATE:
+	      case ITDB_SPLFT_INT:
+	      case ITDB_SPLFT_BOOLEAN:
+	      case ITDB_SPLFT_PLAYLIST:
+	      case ITDB_SPLFT_UNKNOWN:
+	      case ITDB_SPLFT_BINARY_AND: {
+		  guint64 fromvalue;	       
+		  guint64 tovalue;
+		  
+		  fromvalue = splr->fromvalue;
+		  tovalue = splr->tovalue;
+
+		  if (ft == ITDB_SPLFT_DATE) {
+		      ItdbSPLActionType at;
+		      at = itdb_splr_get_action_type (splr);
+		      if ((at == ITDB_SPLAT_RANGE_DATE) ||
+			  (at == ITDB_SPLAT_DATE))
+		      {
+			  Itdb_iTunesDB *itdb = fexp->itdb;
+			  fromvalue = device_time_time_t_to_mac (itdb->device, fromvalue);
+			  tovalue = device_time_time_t_to_mac (itdb->device, tovalue);
+		      }
+		  }
+
+		  /* write non-string-type rule */
+		  put32bint (cts, 0x44); /* length of data        */
+		  /* data */
+		  put64bint (cts, fromvalue);
+		  put64bint (cts, splr->fromdate);
+		  put64bint (cts, splr->fromunits);
+		  put64bint (cts, tovalue);
+		  put64bint (cts, splr->todate);
+		  put64bint (cts, splr->tounits);
+		  put32bint (cts, splr->unk052);
+		  put32bint (cts, splr->unk056);
+		  put32bint (cts, splr->unk060);
+		  put32bint (cts, splr->unk064);
+		  put32bint (cts, splr->unk068);
+		  break;
+	      }
+	      }
+	  }
+	  /* insert length of mhod junk */
+	  fix_header (cts, header_seek);
+      }
+      break;
+  case MHOD_ID_LIBPLAYLISTINDEX:
+      g_return_if_fail (mhod->data.mhod52coltracks);
+      g_return_if_fail (mhod->data.mhod52coltracks->data);
+      {
+	  struct mhod52track *ct = mhod->data.mhod52coltracks->data;
+	  gint numtracks = ct->numtracks;
+	  GList *gl;
+	  gpointer compfunc = NULL;
+ 	  gunichar2 sortkey = 0;
+          gunichar2 lastsortkey = 0;
+	  guint32 mhod53index = 0;
+ 	  struct mhod53_entry *m53 = NULL;
+
+	  /* sort list */
+	  switch (mhod->mhod52sorttype)
+	  {
+	  case MHOD52_SORTTYPE_TITLE:
+	      compfunc = mhod52_sort_title;
+	      break;
+	  case MHOD52_SORTTYPE_ALBUM:
+	      compfunc = mhod52_sort_album;
+	      break;
+	  case MHOD52_SORTTYPE_ARTIST:
+	      compfunc = mhod52_sort_artist;
+	      break;
+	  case MHOD52_SORTTYPE_GENRE:
+	      compfunc = mhod52_sort_genre;
+	      break;
+	  case MHOD52_SORTTYPE_COMPOSER:
+	      compfunc = mhod52_sort_composer;
+	      break;
+	  }
+	  g_return_if_fail (compfunc);
+
+	  /* sort the tracks */
+	  mhod->data.mhod52coltracks = g_list_sort (mhod->data.mhod52coltracks,
+						    compfunc);
+	  /* Write the MHOD */
+	  put_header (cts, "mhod");         /* header                     */
+	  put32lint (cts, 24);              /* size of header             */
+	  put32lint (cts, 4*numtracks+72);  /* size of header + body      */
+	  put32lint (cts, mhod->type);      /* type of the mhod           */
+	  put32_n0 (cts, 2);                /* unknown                    */
+	  /* end of header, start of data */
+	  put32lint (cts, mhod->mhod52sorttype);   /* sort type     */
+	  put32lint (cts, numtracks);       /* number of entries          */
+	  put32_n0 (cts, 10);               /* unknown                    */
+	  for (gl=mhod->data.mhod52coltracks; gl; gl=gl->next)
+	  {
+	      ct = gl->data;
+	      g_return_if_fail (ct);
+	      put32lint (cts, ct->index);
+
+	      /* This is for the type 53s */
+	      switch (mhod->mhod52sorttype)
+	      {
+		case MHOD52_SORTTYPE_TITLE:
+		sortkey = ct->letter_title;
+		break;
+	      case MHOD52_SORTTYPE_ALBUM:
+		sortkey = ct->letter_album;
+		break;
+	      case MHOD52_SORTTYPE_ARTIST:
+		sortkey = ct->letter_artist;
+		break;
+	      case MHOD52_SORTTYPE_GENRE:
+		sortkey = ct->letter_genre;
+		break;
+	      case MHOD52_SORTTYPE_COMPOSER:
+		sortkey = ct->letter_composer;
+		break;
+	      }
+
+	    if (sortkey != lastsortkey) {
+	      m53 = g_new0 (struct mhod53_entry, 1);
+	      m53->letter = sortkey;
+	      m53->start = mhod53index;
+	      m53->count = 0;
+	      mhod->mhod53_list = g_list_append (mhod->mhod53_list, m53);
+	      lastsortkey = sortkey; 
+	    }
+	    mhod53index++;
+	    m53->count++;
+	  }
+      }
+      break;
+  case MHOD_ID_LIBPLAYLISTJUMPTABLE:
+      {
+          GList *gl;
+          guint32 numentries;
+          struct mhod53_entry *m53;
+
+          numentries = g_list_length (mhod->mhod53_list);
+          put_header (cts, "mhod");				/* header */
+          put32lint (cts, 24);				/* size of header */
+          put32lint (cts, 12*numentries+40);		/* size of header + body */
+          put32lint (cts, mhod->type);			/* type of the mhod */
+          put32_n0 (cts, 2);				/* unknown */
+          put32lint (cts, mhod->mhod52sorttype);    	/* sort type */
+          put32lint (cts, numentries);			/* number of entries */
+          put32_n0 (cts, 2);				/* unknown */
+
+          for (gl=mhod->mhod53_list; gl; gl=gl->next)
+          {
+              m53 = gl->data;
+              put16lint (cts, m53->letter);
+              put16lint (cts, 0);
+              put32lint (cts, m53->start);
+              put32lint (cts, m53->count);
+          }
+      }
+      break;
+  }
+}
+
+static void mk_mhia (gpointer key, gpointer value, gpointer user_data)
+{
+  FExport *fexp;
+  WContents *cts;
+  Itdb_Track *track;
+  MHODData mhod;
+  guint mhod_num;
+  gulong mhia_seek;
+
+  track = (Itdb_Track *)key;
+  g_return_if_fail (track != NULL);
+
+  fexp = (FExport *)user_data;
+  g_return_if_fail (fexp);
+  g_return_if_fail (fexp->wcontents);
+  cts = fexp->wcontents;
+  mhia_seek = cts->pos;
+
+  put_header (cts, "mhia");        		/* header                   */
+  put32lint (cts, 92);             		/* size of header           */
+  put32lint (cts, -1);             		/* total size -> later */
+  put32lint (cts, 2);		   		/* number of children mhods */
+  put16lint (cts, 0);		  		/* unknown */
+  put16lint (cts, GPOINTER_TO_UINT (value));   	/* album id */
+  put32lint (cts, 0);		   		/* unknown */
+  put32lint (cts, 0);		   		/* unknown */
+  put32lint (cts, 2);		   		/* unknown */
+  put32_n0 (cts, 15); 				/* padding */
+
+  mhod.valid = TRUE;
+  mhod_num = 0;
+  if (track->album && *track->album) {
+      mhod.type = MHOD_ID_ALBUM_ALBUM;
+      mhod.data.string = track->album;
+      mk_mhod (fexp, &mhod);
+      ++mhod_num;
+  }
+
+  if (track->albumartist && *track->albumartist) {
+      mhod.type = MHOD_ID_ALBUM_ARTIST;
+      mhod.data.string = track->albumartist;
+      mk_mhod (fexp, &mhod);
+      ++mhod_num;
+  } else if (track->artist && *track->artist) {
+      mhod.type = MHOD_ID_ALBUM_ARTIST;
+      mhod.data.string = track->artist;
+      mk_mhod (fexp, &mhod);
+      ++mhod_num;
+  }
+
+  if (track->sort_albumartist && *track->sort_albumartist) {
+      mhod.type = MHOD_ID_ALBUM_SORT_ARTIST;
+      mhod.data.string = track->sort_albumartist;
+      mk_mhod (fexp, &mhod);
+      ++mhod_num;
+  } else if (track->sort_artist && *track->sort_artist) {
+      mhod.type = MHOD_ID_ALBUM_SORT_ARTIST;
+      mhod.data.string = track->sort_artist;
+      mk_mhod (fexp, &mhod);
+      ++mhod_num;
+  }
+  fix_mhit (cts, mhia_seek, mhod_num);
+}
+
+static void mk_mhla (FExport *fexp)
+{
+  WContents *cts;
+
+  g_return_if_fail (fexp);
+  g_return_if_fail (fexp->wcontents);
+  g_return_if_fail (fexp->albums);
+
+  cts = fexp->wcontents;
+
+  put_header (cts, "mhla");        /* header                   */
+  put32lint (cts, 92);             /* size of header           */
+  /* albums on iPod (including main!) */
+  put32lint (cts, g_hash_table_size (fexp->albums));
+  put32_n0 (cts, 20);               /* dummy space              */
+  g_hash_table_foreach (fexp->albums, mk_mhia, fexp);
+  g_hash_table_destroy (fexp->albums);
+  fexp->albums = NULL;
+}
+
+/* Write out the mhlp header. Size will be written later */
+static void mk_mhlp (FExport *fexp)
+{
+  WContents *cts;
+
+  g_return_if_fail (fexp);
+  g_return_if_fail (fexp->wcontents);
+
+  cts = fexp->wcontents;
+
+  put_header (cts, "mhlp");        /* header                   */
+  put32lint (cts, 92);             /* size of header           */
+  /* playlists on iPod (including main!) */
+  put32lint (cts, g_list_length (fexp->itdb->playlists));
+  put32_n0 (cts, 20);               /* dummy space              */
+}
+
+
+/* Write out the long MHOD_ID_PLAYLIST mhod header.
+   This seems to be an itunespref thing.. dunno know this
+   but if we set everything to 0, itunes doesn't show any data
+   even if you drag an mp3 to your ipod: nothing is shown, but itunes
+   will copy the file!
+   .. so we create a hardcoded-pref.. this will change in future
+   Seems to be a Preferences mhod, every PL has such a thing
+   FIXME !!! */
+static void mk_long_mhod_id_playlist (FExport *fexp, Itdb_Playlist *pl)
+{
+  WContents *cts;
+
+  g_return_if_fail (fexp);
+  g_return_if_fail (fexp->wcontents);
+  g_return_if_fail (pl);
+
+  cts = fexp->wcontents;
+
+  put_header (cts, "mhod");          /* header                   */
+  put32lint (cts, 0x18);             /* size of header  ?        */
+  put32lint (cts, 0x0288);           /* size of header + body    */
+  put32lint (cts, MHOD_ID_PLAYLIST); /* type of the entry        */
+  put32_n0 (cts, 6);
+  put32lint (cts, 0x010084);         /* ? */
+  put32lint (cts, 0x05);             /* ? */
+  put32lint (cts, 0x09);             /* ? */
+  put32lint (cts, 0x03);             /* ? */
+  put32lint (cts, 0x120001);         /* ? */
+  put32_n0 (cts, 3);
+  put32lint (cts, 0xc80002);         /* ? */
+  put32_n0 (cts, 3);
+  put32lint (cts, 0x3c000d);         /* ? */
+  put32_n0 (cts, 3);
+  put32lint (cts, 0x7d0004);         /* ? */
+  put32_n0 (cts, 3);
+  put32lint (cts, 0x7d0003);         /* ? */
+  put32_n0 (cts, 3);
+  put32lint (cts, 0x640008);         /* ? */
+  put32_n0 (cts, 3);
+  put32lint (cts, 0x640017);         /* ? */
+  put32lint (cts, 0x01);             /* bool? (visible? / colums?) */
+  put32_n0 (cts, 2);
+  put32lint (cts, 0x500014);         /* ? */
+  put32lint (cts, 0x01);             /* bool? (visible?) */
+  put32_n0 (cts, 2);
+  put32lint (cts, 0x7d0015);         /* ? */
+  put32lint (cts, 0x01);             /* bool? (visible?) */
+  put32_n0 (cts, 114);
+}
+
+
+
+/* Header for new PL item */
+/* @pos: position in playlist */
+static void mk_mhip (FExport *fexp,
+		     guint32 childcount,
+		     guint32 podcastgroupflag,
+		     guint32 podcastgroupid,
+		     guint32 trackid,
+		     guint32 timestamp,
+		     guint32 podcastgroupref)
+{
+  WContents *cts;
+
+  g_return_if_fail (fexp);
+  g_return_if_fail (fexp->wcontents);
+
+  cts = fexp->wcontents;
+
+  put_header (cts, "mhip");
+  put32lint (cts, 76);                              /*  4 */
+  put32lint (cts, -1);  /* fill in later */         /*  8 */
+  put32lint (cts, childcount);                      /* 12 */
+  put32lint (cts, podcastgroupflag);                /* 16 */
+  put32lint (cts, podcastgroupid);                  /* 20 */
+  put32lint (cts, trackid);                         /* 24 */
+  timestamp = device_time_time_t_to_mac (fexp->itdb->device, timestamp);
+  put32lint (cts, timestamp);                       /* 28 */
+  put32lint (cts, podcastgroupref);                 /* 32 */
+  put32_n0 (cts, 10);                               /* 36 */
+}
+
+
+/* Write first mhsd hunk. Return FALSE in case of error and set
+ * fexp->error */
+static gboolean write_mhsd_tracks (FExport *fexp)
+{
+    GList *gl;
+    gulong mhsd_seek;
+    WContents *cts;
+
+    g_return_val_if_fail (fexp, FALSE);
+    g_return_val_if_fail (fexp->itdb, FALSE);
+    g_return_val_if_fail (fexp->wcontents, FALSE);
+
+    cts = fexp->wcontents;
+    
+    mhsd_seek = cts->pos;      /* get position of mhsd header  */
+    mk_mhsd (fexp, 1);         /* write header: type 1: tracks */
+    /* write header with nr. of tracks */
+    mk_mhlt (fexp, g_list_length (fexp->itdb->tracks));
+    for (gl=fexp->itdb->tracks; gl; gl=gl->next)  /* Write each track */
+    {
+	Itdb_Track *track = gl->data;
+	guint32 mhod_num = 0;
+	gulong mhit_seek = cts->pos;
+	MHODData mhod;
+
+	g_return_val_if_fail (track, FALSE);
+
+	mhod.valid = TRUE;
+
+	mk_mhit (cts, track);
+	if (track->title && *track->title)
+	{
+	    mhod.type = MHOD_ID_TITLE;
+	    mhod.data.string = track->title;
+	    mk_mhod (fexp, &mhod);
+	    ++mhod_num;
+	}
+	if (track->ipod_path && *track->ipod_path)
+	{
+	    mhod.type = MHOD_ID_PATH;
+	    mhod.data.string = track->ipod_path;
+	    mk_mhod (fexp, &mhod);
+	    ++mhod_num;
+	}
+	if (track->album && *track->album)
+	{
+	    mhod.type = MHOD_ID_ALBUM;
+	    mhod.data.string = track->album;
+	    mk_mhod (fexp, &mhod);
+	    ++mhod_num;
+	}
+	if (track->artist && *track->artist)
+	{
+	    mhod.type = MHOD_ID_ARTIST;
+	    mhod.data.string = track->artist;
+	    mk_mhod (fexp, &mhod);
+	    ++mhod_num;
+	}
+	if (track->genre && *track->genre)
+	{
+	    mhod.type = MHOD_ID_GENRE;
+	    mhod.data.string = track->genre;
+	    mk_mhod (fexp, &mhod);
+	    ++mhod_num;
+	}
+	if (track->filetype && *track->filetype)
+	{
+	    mhod.type = MHOD_ID_FILETYPE;
+	    mhod.data.string = track->filetype;
+	    mk_mhod (fexp, &mhod);
+	    ++mhod_num;
+	}
+	if (track->comment && *track->comment)
+	{
+	    mhod.type = MHOD_ID_COMMENT;
+	    mhod.data.string = track->comment;
+	    mk_mhod (fexp, &mhod);
+	    ++mhod_num;
+	}
+	if (track->category && *track->category)
+	{
+	    mhod.type = MHOD_ID_CATEGORY;
+	    mhod.data.string = track->category;
+	    mk_mhod (fexp, &mhod);
+	    ++mhod_num;
+	}
+	if (track->composer && *track->composer)
+	{
+	    mhod.type = MHOD_ID_COMPOSER;
+	    mhod.data.string = track->composer;
+	    mk_mhod (fexp, &mhod);
+	    ++mhod_num;
+	}
+	if (track->grouping && *track->grouping)
+	{
+	    mhod.type = MHOD_ID_GROUPING;
+	    mhod.data.string = track->grouping;
+	    mk_mhod (fexp, &mhod);
+	    ++mhod_num;
+	}
+	if (track->description && *track->description)
+	{
+	    mhod.type = MHOD_ID_DESCRIPTION;
+	    mhod.data.string = track->description;
+	    mk_mhod (fexp, &mhod);
+	    ++mhod_num;
+	}
+	if (track->subtitle && *track->subtitle)
+	{
+	    mhod.type = MHOD_ID_SUBTITLE;
+	    mhod.data.string = track->subtitle;
+	    mk_mhod (fexp, &mhod);
+	    ++mhod_num;
+	}
+	if (track->tvshow && *track->tvshow)
+	{
+	    mhod.type = MHOD_ID_TVSHOW;
+	    mhod.data.string = track->tvshow;
+	    mk_mhod (fexp, &mhod);
+	    ++mhod_num;
+	}
+	if (track->tvepisode && *track->tvepisode)
+	{
+	    mhod.type = MHOD_ID_TVEPISODE;
+	    mhod.data.string = track->tvepisode;
+	    mk_mhod (fexp, &mhod);
+	    ++mhod_num;
+	}
+	if (track->tvnetwork && *track->tvnetwork)
+	{
+	    mhod.type = MHOD_ID_TVNETWORK;
+	    mhod.data.string = track->tvnetwork;
+	    mk_mhod (fexp, &mhod);
+	    ++mhod_num;
+	}
+	if (track->albumartist && *track->albumartist)
+	{
+	    mhod.type = MHOD_ID_ALBUMARTIST;
+	    mhod.data.string = track->albumartist;
+	    mk_mhod (fexp, &mhod);
+	    ++mhod_num;
+	}
+	if (track->keywords && *track->keywords)
+	{
+	    mhod.type = MHOD_ID_KEYWORDS;
+	    mhod.data.string = track->keywords;
+	    mk_mhod (fexp, &mhod);
+	    ++mhod_num;
+	}
+	if (track->podcasturl && *track->podcasturl)
+	{
+	    mhod.type = MHOD_ID_PODCASTURL;
+	    mhod.data.string = track->podcasturl;
+	    mk_mhod (fexp, &mhod);
+	    ++mhod_num;
+	}
+	if (track->podcastrss && *track->podcastrss)
+	{
+	    mhod.type = MHOD_ID_PODCASTRSS;
+	    mhod.data.string = track->podcastrss;
+	    mk_mhod (fexp, &mhod);
+	    ++mhod_num;
+	}
+	if (track->sort_artist && *track->sort_artist)
+	{
+	    mhod.type = MHOD_ID_SORT_ARTIST;
+	    mhod.data.string = track->sort_artist;
+	    mk_mhod (fexp, &mhod);
+	    ++mhod_num;
+	}
+	if (track->sort_title && *track->sort_title)
+	{
+	    mhod.type = MHOD_ID_SORT_TITLE;
+	    mhod.data.string = track->sort_title;
+	    mk_mhod (fexp, &mhod);
+	    ++mhod_num;
+	}
+	if (track->sort_album && *track->sort_album)
+	{
+	    mhod.type = MHOD_ID_SORT_ALBUM;
+	    mhod.data.string = track->sort_album;
+	    mk_mhod (fexp, &mhod);
+	    ++mhod_num;
+	}
+	if (track->sort_albumartist && *track->sort_albumartist)
+	{
+	    mhod.type = MHOD_ID_SORT_ALBUMARTIST;
+	    mhod.data.string = track->sort_albumartist;
+	    mk_mhod (fexp, &mhod);
+	    ++mhod_num;
+	}
+	if (track->sort_composer && *track->sort_composer)
+	{
+	    mhod.type = MHOD_ID_SORT_COMPOSER;
+	    mhod.data.string = track->sort_composer;
+	    mk_mhod (fexp, &mhod);
+	    ++mhod_num;
+	}
+	if (track->sort_tvshow && *track->sort_tvshow)
+	{
+	    mhod.type = MHOD_ID_SORT_TVSHOW;
+	    mhod.data.string = track->sort_tvshow;
+	    mk_mhod (fexp, &mhod);
+	    ++mhod_num;
+	}
+	if (track->chapterdata && track->chapterdata->chapters)
+	{
+	    mhod.type = MHOD_ID_CHAPTERDATA;
+	    mhod.data.chapterdata = track->chapterdata;
+	    mk_mhod (fexp, &mhod);
+	    ++mhod_num;
+	}
+        /* Fill in the missing items of the mhit header */
+	fix_mhit (cts, mhit_seek, mhod_num);
+    }
+    fix_header (cts, mhsd_seek);
+    return TRUE;
+}
+
+
+/* write out the mhip/mhod pairs for playlist @pl. @mhyp_seek points
+   to the start of the corresponding mhyp, but is not used yet. */
+static gboolean write_playlist_mhips (FExport *fexp,
+				      Itdb_Playlist *pl,
+				      glong mhyp_seek)
+{
+    GList *gl;
+    WContents *cts;
+    guint32 i=0;
+    guint32 mhip_num;
+
+    g_return_val_if_fail (fexp, FALSE);
+    g_return_val_if_fail (fexp->itdb, FALSE);
+    g_return_val_if_fail (fexp->wcontents, FALSE);
+    g_return_val_if_fail (pl, FALSE);
+
+    cts = fexp->wcontents;
+
+    for (gl=pl->members; gl; gl=gl->next)
+    {
+	Itdb_Track *track = gl->data;
+	glong mhip_seek = cts->pos;
+	MHODData mhod;
+
+	g_return_val_if_fail (track, FALSE);
+
+	mk_mhip (fexp, 1, 0, 0, track->id, 0, 0);
+	mhod.valid = TRUE;
+	mhod.type = MHOD_ID_PLAYLIST;
+	mhod.data.track_pos = i;
+	mk_mhod (fexp, &mhod);
+	/* note: with iTunes 4.9 the mhod is counted as a child to
+	   mhip, so we have put the total length of the mhip and mhod
+	   into the mhip header */
+	fix_header (cts, mhip_seek);
+	++i;
+    }
+
+    /* set number of mhips */
+    mhip_num = g_list_length (pl->members);
+    put32lint_seek (cts, mhip_num, mhyp_seek+16);
+
+    return TRUE;
+}
+
+
+static void free_memberlist (gpointer data);
+static void write_one_podcast_group (gpointer key, gpointer value, gpointer userdata);
+static void free_memberlist (gpointer data)
+{
+    GList **memberlist = data;
+    if (memberlist)
+    {
+	g_list_free (*memberlist);
+	g_free (memberlist);
+    }
+}
+static void write_one_podcast_group (gpointer key, gpointer value,
+   			             gpointer userdata)
+{
+    gchar *album = key;
+    GList **memberlist = value;
+    FExport *fexp = userdata;
+    GList *gl;
+    WContents *cts;
+    glong mhip_seek;
+    guint32 groupid;
+    Itdb_iTunesDB *itdb;
+    MHODData mhod;
+
+    g_return_if_fail (album);
+    g_return_if_fail (memberlist);
+    g_return_if_fail (fexp);
+    g_return_if_fail (fexp->itdb);
+    g_return_if_fail (fexp->wcontents);
+
+    cts = fexp->wcontents;
+    itdb = fexp->itdb;
+    mhip_seek = cts->pos;
+
+    groupid = fexp->next_id++;
+    mk_mhip (fexp, 1, 256, groupid, 0, 0, 0);
+
+    mhod.valid = TRUE;
+    mhod.type = MHOD_ID_TITLE;
+    mhod.data.string = album;
+    mk_mhod (fexp, &mhod);
+    fix_header (cts, mhip_seek);
+
+    /* write members */
+    for (gl=*memberlist; gl; gl=gl->next)
+    {
+	Itdb_Track *track = gl->data;
+	guint32 mhip_id;
+
+	g_return_if_fail (track);
+
+	mhip_seek = cts->pos;
+	mhip_id = fexp->next_id++;
+	mk_mhip (fexp, 1, 0, mhip_id, track->id, 0, groupid);
+	mhod.type = MHOD_ID_PLAYLIST;
+	mhod.data.track_pos = mhip_id;
+	mk_mhod (fexp, &mhod);
+	fix_header (cts, mhip_seek);
+    }
+}
+
+
+
+/* write out the mhip/mhod pairs for the podcast playlist
+   @pl. @mhyp_seek points to the start of the corresponding mhyp, but
+   is not used yet. */
+static gboolean write_podcast_mhips (FExport *fexp,
+				     Itdb_Playlist *pl,
+				     glong mhyp_seek)
+{
+    GList *gl;
+    WContents *cts;
+    guint32 mhip_num;
+    GHashTable *album_hash;
+
+    g_return_val_if_fail (fexp, FALSE);
+    g_return_val_if_fail (fexp->itdb, FALSE);
+    g_return_val_if_fail (fexp->wcontents, FALSE);
+    g_return_val_if_fail (pl, FALSE);
+
+    cts = fexp->wcontents;
+
+    /* Create a list wit all available album names because we have to
+       group the podcasts according to albums */
+
+    album_hash = g_hash_table_new_full (g_str_hash, g_str_equal,
+					NULL, free_memberlist);
+    for (gl=pl->members; gl; gl=gl->next)
+    {
+	GList **memberlist;
+	gchar *album;
+	Itdb_Track *track = gl->data;
+	g_return_val_if_fail (track, FALSE);
+
+	if (track->album)
+	    album = track->album;
+	else
+	    album = "";
+
+	memberlist = g_hash_table_lookup (album_hash, album);
+
+	if (!memberlist)
+	{
+	    memberlist = g_new0 (GList *, 1);
+	    g_hash_table_insert (album_hash, album, memberlist);
+	}
+	*memberlist = g_list_append (*memberlist, track);
+    }
+
+    g_hash_table_foreach (album_hash, write_one_podcast_group, fexp);
+
+    /* set number of mhips */
+    mhip_num = g_list_length (pl->members)+g_hash_table_size (album_hash);
+    put32lint_seek (cts, mhip_num, mhyp_seek+16);
+
+    g_hash_table_destroy (album_hash);
+
+    return TRUE;
+}
+
+/* Write one type 52 and the corresponding type 53 mhod */
+static void mk_mhod52 (enum MHOD52_SORTTYPE mhod52sorttype, FExport *fexp, 
+                       MHODData *mhod)
+{
+    mhod->mhod52sorttype = mhod52sorttype;
+    mhod->type = MHOD_ID_LIBPLAYLISTINDEX;
+    mk_mhod (fexp, mhod);
+}
+
+static void mk_mhod53 (enum MHOD52_SORTTYPE mhod52sorttype, FExport *fexp, 
+                       MHODData *mhod)
+{
+    mhod->type = MHOD_ID_LIBPLAYLISTJUMPTABLE;
+    mk_mhod (fexp, mhod);
+    g_list_foreach (mhod->mhod53_list, (GFunc)g_free, NULL);
+    g_list_free (mhod->mhod53_list);
+    mhod->mhod53_list = NULL;
+}
+
+
+/* corresponds to mk_mhyp */
+/* mhsd_type: 2: write normal playlists
+              3: write podcast playlist in special format */
+/* Return FALSE in case of error and set fexp->error */
+static gboolean write_playlist (FExport *fexp,
+				Itdb_Playlist *pl, guint32 mhsd_type)
+{
+    gulong mhyp_seek;
+    WContents *cts;
+    gboolean result = TRUE;
+    MHODData mhod;
+    gint mhodnum;
+    guint32 mac_time;
+
+    g_return_val_if_fail (fexp, FALSE);
+    g_return_val_if_fail (fexp->itdb, FALSE);
+    g_return_val_if_fail (fexp->wcontents, FALSE);
+    g_return_val_if_fail (pl, FALSE);
+
+    cts = fexp->wcontents;
+    mhyp_seek = cts->pos;
+
+#if ITUNESDB_DEBUG
+  fprintf(stderr, "Playlist: %s (%d tracks)\n", pl->name, g_list_length (pl->members));
+#endif
+
+    put_header (cts, "mhyp");      /* header                    */
+    put32lint (cts, 108);          /* length		        */
+    put32lint (cts, -1);           /* size -> later             */
+    mhodnum = 2;
+    if (pl->is_spl)
+    {   /* 2 more SPL MHODs */
+	mhodnum += 2;
+    }
+    else
+    {
+	if ((pl->type == ITDB_PL_TYPE_MPL) && pl->members)
+	{   /* 5 more MHOD 52 lists and 5 more MHOD 53 lists*/
+	    mhodnum += 10;
+	}
+    }
+    put32lint (cts, mhodnum);      /* nr of mhods               */
+    /* number of tracks in plist */
+    put32lint (cts, -1);           /* number of mhips -> later  */
+    put8int (cts, pl->type);       /* 1 = main, 0 = visible     */
+    put8int (cts, pl->flag1);      /* unknown                   */
+    put8int (cts, pl->flag2);      /* unknown                   */
+    put8int (cts, pl->flag3);      /* unknown                   */
+    mac_time = device_time_time_t_to_mac (fexp->itdb->device, pl->timestamp);
+    put32lint (cts, mac_time);     /* some timestamp            */
+    put64lint (cts, pl->id);       /* 64 bit ID                 */
+    put32lint (cts, 0);            /* unknown, always 0?        */
+    put16lint (cts, 1);            /* string mhod count (1)     */
+    put16lint (cts, pl->podcastflag);
+    put32lint (cts, pl->sortorder);
+    put32_n0 (cts, 15);            /* ?                         */
+
+    mhod.valid = TRUE;
+    mhod.type = MHOD_ID_TITLE;
+    mhod.data.string = pl->name;
+    mk_mhod (fexp, &mhod);
+    mk_long_mhod_id_playlist (fexp, pl);
+
+    if ((pl->type == ITDB_PL_TYPE_MPL) && pl->members)
+    {   /* write out the MHOD 52 and MHOD 53 lists */
+	/* We have to sort all tracks five times. To speed this up,
+	   translate the utf8 keys into collate_keys and use the
+	   faster strcmp() for comparison */
+	mhod.valid = TRUE;
+	mhod.data.mhod52coltracks = mhod52_make_collate_keys (pl->members);
+	mhod.mhod53_list = NULL;	
+
+	mk_mhod52 (MHOD52_SORTTYPE_TITLE, fexp, &mhod);	
+	mk_mhod53 (MHOD52_SORTTYPE_TITLE, fexp, &mhod);	
+	mk_mhod52 (MHOD52_SORTTYPE_ARTIST, fexp, &mhod);
+	mk_mhod53 (MHOD52_SORTTYPE_ARTIST, fexp, &mhod);
+	mk_mhod52 (MHOD52_SORTTYPE_ALBUM, fexp, &mhod);
+	mk_mhod53 (MHOD52_SORTTYPE_ALBUM, fexp, &mhod);
+	mk_mhod52 (MHOD52_SORTTYPE_GENRE, fexp, &mhod);
+	mk_mhod53 (MHOD52_SORTTYPE_GENRE, fexp, &mhod);
+	mk_mhod52 (MHOD52_SORTTYPE_COMPOSER, fexp, &mhod);
+	mk_mhod53 (MHOD52_SORTTYPE_COMPOSER, fexp, &mhod);
+
+	mhod52_free_collate_keys (mhod.data.mhod52coltracks);
+    }
+    else  if (pl->is_spl)
+    {  /* write the smart rules */
+	mhod.type = MHOD_ID_SPLPREF;
+	mhod.data.splpref = &pl->splpref;
+	mk_mhod (fexp, &mhod);
+
+	mhod.type = MHOD_ID_SPLRULES;
+	mhod.data.splrules = &pl->splrules;
+	mk_mhod (fexp, &mhod);
+    }
+
+    if (itdb_playlist_is_podcasts(pl) && (mhsd_type == 3))
+    {
+	/* write special podcast playlist */
+	result = write_podcast_mhips (fexp, pl, mhyp_seek);
+    }
+    else
+    {   /* write standard playlist hard-coded tracks */
+	result = write_playlist_mhips (fexp, pl, mhyp_seek);
+    }
+    fix_header (cts, mhyp_seek);
+    return result;
+}
+
+
+/* Expects the master playlist to be the first in the list */
+/* Return FALSE in case of error and set fexp->error */
+static gboolean write_mhsd_playlists (FExport *fexp, guint32 mhsd_type)
+{
+    GList *gl;
+    glong mhsd_seek;
+    WContents *cts;
+
+    g_return_val_if_fail (fexp, FALSE);
+    g_return_val_if_fail (fexp->itdb, FALSE);
+    g_return_val_if_fail (fexp->wcontents, FALSE);
+    g_return_val_if_fail ((mhsd_type == 2) || (mhsd_type == 3), FALSE);
+
+    cts = fexp->wcontents;
+    mhsd_seek = cts->pos;      /* get position of mhsd header */
+    mk_mhsd (fexp, mhsd_type); /* write header */
+    /* write header with nr. of playlists */
+    mk_mhlp (fexp);
+    for (gl=fexp->itdb->playlists; gl; gl=gl->next)
+    {
+	Itdb_Playlist *pl = gl->data;
+	g_return_val_if_fail (pl, FALSE);
+
+	write_playlist (fexp, pl, mhsd_type);
+	if (fexp->error)  return FALSE;
+    }
+    fix_header (cts, mhsd_seek);
+    return TRUE;
+}
+
+static gboolean write_mhsd_albums (FExport *fexp)
+{
+    gulong mhsd_seek;
+    WContents *cts;
+
+    g_return_val_if_fail (fexp, FALSE);
+    g_return_val_if_fail (fexp->itdb, FALSE);
+    g_return_val_if_fail (fexp->wcontents, FALSE);
+
+    cts = fexp->wcontents;
+    mhsd_seek = cts->pos;      	/* get position of mhsd header */
+    mk_mhsd (fexp, 4); 		/* write header */
+    mk_mhla (fexp);
+    fix_header (cts, mhsd_seek);
+    return TRUE;
+}
+
+/* create a WContents structure */
+static WContents *wcontents_new (const gchar *filename)
+{
+    WContents *cts;
+
+    g_return_val_if_fail (filename, NULL);
+
+    cts = g_new0 (WContents, 1);
+    cts->filename = g_strdup (filename);
+
+    return cts;
+}
+
+
+/* write the contents of WContents. Return FALSE on error and set
+ * cts->error accordingly. */
+static gboolean wcontents_write (WContents *cts)
+{
+    g_return_val_if_fail (cts, FALSE);
+    g_return_val_if_fail (cts->filename, FALSE);
+
+    cts->error = NULL;
+    return itdb_file_set_contents (cts->filename, cts->contents, 
+                                   cts->pos, &cts->error);
+}
+
+
+/* Free memory associated with WContents @cts */
+static void wcontents_free (WContents *cts)
+{
+    if (cts)
+    {
+	g_free (cts->filename);
+	g_free (cts->contents);
+	/* must not g_error_free (cts->error) because the error was
+	   propagated -> might free the error twice */
+	g_free (cts);
+    }
+}
+
+
+static guint itdb_track_hash (gconstpointer v)
+{
+  Itdb_Track *track = (Itdb_Track *)v;
+  if (track->album != NULL) {
+    return g_str_hash (track->album);
+  } else if (track->artist != NULL) {
+    return g_str_hash (track->artist);;
+  }
+  g_assert_not_reached ();
+}
+
+static gboolean itdb_track_equal (gconstpointer v1, gconstpointer v2)
+{
+  Itdb_Track *track1 = (Itdb_Track *)v1;
+  Itdb_Track *track2 = (Itdb_Track *)v2;
+
+  g_assert (track1->album != NULL);
+  g_assert (track2->album != NULL);
+
+  if ((track1->albumartist != NULL) && (track2->albumartist != NULL)) {
+      return (g_str_equal (track1->album, track2->album)
+	      && g_str_equal (track1->albumartist, track2->albumartist));
+  } else if ((track1->artist != NULL) && (track2->artist != NULL)) {
+      return (g_str_equal (track1->album, track2->album)
+	      && g_str_equal (track1->artist, track2->artist));
+  } else {
+      return (g_str_equal (track1->album, track2->album));
+  }
+}
+
+/* - reassign the iPod IDs
+   - make sure the itdb->tracks are in the same order as the mpl
+   - assign album IDs to write the MHLA
+*/
+static void prepare_itdb_for_write (FExport *fexp)
+{
+    GList *gl;
+    Itdb_iTunesDB *itdb;
+    Itdb_Playlist *mpl;
+    guint album_id = 1;
+
+    g_return_if_fail (fexp);
+    itdb = fexp->itdb;
+    g_return_if_fail (itdb);
+
+    /* Arrange itdb->tracks in the same order as mpl->members
+       (otherwise On-The-Go Playlists will not show the correct
+       content. Unfortunately we cannot just copy mpl->members to
+       itdb->tracks because podcasts do not show up in the MPL. */
+
+    mpl = itdb_playlist_mpl (itdb);
+    g_return_if_fail (mpl);
+
+    for (gl=g_list_last(mpl->members); gl; gl=gl->prev)
+    {
+	GList *link;
+	Itdb_Track *track = gl->data;
+	g_return_if_fail (track);
+	link = g_list_find (itdb->tracks, track);
+	g_return_if_fail (link);
+
+	/* move this track to the beginning of itdb_tracks */
+	itdb->tracks = g_list_delete_link (itdb->tracks, link);
+	itdb->tracks = g_list_prepend (itdb->tracks, track);
+    }
+
+    fexp->next_id = FIRST_IPOD_ID;
+
+    g_assert (fexp->albums == NULL);
+    fexp->albums = g_hash_table_new (itdb_track_hash, itdb_track_equal);
+
+    /* assign unique IDs and create sort keys */
+    for (gl=itdb->tracks; gl; gl=gl->next)
+    {
+	Itdb_Track *track = gl->data;
+	guint id;
+
+	g_return_if_fail (track);
+	track->id = fexp->next_id++;
+
+	if (track->album == NULL) {	
+	    /* unknow album name and artist, this entry isn't interesting to
+	     * build the list of all albums on the ipod
+	     */
+	    continue;
+	}
+	/* album ids are used when writing the mhla header */
+	id = GPOINTER_TO_UINT (g_hash_table_lookup (fexp->albums, track));
+	if (id != 0) {
+	    track->album_id = id;
+	} else {	
+	    g_hash_table_insert (fexp->albums, track,
+				 GUINT_TO_POINTER (album_id));
+	    track->album_id = album_id;
+	    album_id++;
+	}
+    }
+}
+
+/**
+ * itdb_write_file:
+ * @itdb:       the #Itdb_iTunesDB to save
+ * @filename:   filename to save @itdb to
+ * @error:      return location for a #GError or NULL
+ *
+ * Write the content of @itdb to @filename. If @filename is NULL, it attempts
+ * to write to @itdb->filename.
+ *
+ * Returns: TRUE if all went well, FALSE otherwise
+ */
+gboolean itdb_write_file (Itdb_iTunesDB *itdb, const gchar *filename,
+			  GError **error)
+{
+    FExport *fexp;
+    gulong mhbd_seek = 0;
+    WContents *cts;
+    gboolean result = TRUE;;
+
+    g_return_val_if_fail (itdb, FALSE);
+    g_return_val_if_fail (itdb->device, FALSE);
+    g_return_val_if_fail (filename || itdb->filename, FALSE);
+
+    if (!filename) filename = itdb->filename;
+
+    /* set endianess flag */
+    if (!itdb->device->byte_order)
+	itdb_device_autodetect_endianess (itdb->device);
+
+    fexp = g_new0 (FExport, 1);
+    fexp->itdb = itdb;
+    fexp->wcontents = wcontents_new (filename);
+    cts = fexp->wcontents;
+
+    cts->reversed = (itdb->device->byte_order == G_BIG_ENDIAN);
+
+    prepare_itdb_for_write (fexp);
+
+#if HAVE_GDKPIXBUF
+    /* only write ArtworkDB if we deal with an iPod
+       FIXME: figure out a way to store the artwork data when storing
+       to local directories. At the moment it's the application's task
+       to handle this. */
+    /* The ArtworkDB must be written after the call to
+     * prepare_itdb_for_write since it needs Itdb_Track::id to be set
+     * to its final value to write properly on nano video/ipod classics
+     */
+    if (itdb_device_supports_artwork (itdb->device)) {
+		ipod_write_artwork_db (itdb);
+    }
+#endif
+
+    mk_mhbd (fexp, 4);   /* four mhsds */
+    /* write tracklist */
+    if (write_mhsd_tracks (fexp))
+    {   /* write special podcast version mhsd */
+	if (write_mhsd_playlists (fexp, 3))
+	{   /* write standard playlist mhsd */
+	    if (write_mhsd_playlists (fexp, 2))
+	    {
+		if (write_mhsd_albums (fexp)) {
+		    fix_header (cts, mhbd_seek);
+
+		    /* Set checksum (ipods require it starting from
+		     * iPod Classic and fat Nanos)
+		     */
+		    itdb_device_write_checksum (itdb->device,
+						(unsigned char *)fexp->wcontents->contents,
+						fexp->wcontents->pos,
+						&fexp->error);
+		}
+	    }
+	}
+    }
+    if (!fexp->error)
+    {
+	if (!wcontents_write (cts))
+	    g_propagate_error (&fexp->error, cts->error);
+    }
+    if (fexp->error)
+    {
+	g_propagate_error (error, fexp->error);
+	result = FALSE;
+    }
+    wcontents_free (cts);
+    if (fexp->albums != NULL) {
+	g_hash_table_destroy (fexp->albums);
+    }
+    g_free (fexp);
+    if (result == TRUE)
+    {
+	gchar *fn = g_strdup (filename);
+	g_free (itdb->filename);
+	itdb->filename = fn;
+    }
+
+    /* make sure all buffers are flushed as some people tend to
+       disconnect as soon as gtkpod returns */
+    sync ();
+
+    return result;
+}
+
+/**
+ * itdb_write:
+ * @itdb:   the #Itdb_iTunesDB to write to disk
+ * @error:  return location for a #GError or NULL
+ *
+ * Write out an iTunesDB. It reassigns unique IDs to all tracks. 
+ * An existing "Play Counts" file is renamed to "Play Counts.bak" if
+ * the export was successful.
+ * An existing "OTGPlaylistInfo" file is removed if the export was
+ * successful.
+ *
+ * Returns: TRUE on success, FALSE on error, in which case @error is
+ * set accordingly.
+ */
+gboolean itdb_write (Itdb_iTunesDB *itdb, GError **error)
+{
+    gchar *itunes_filename, *itunes_path;
+    gboolean result = FALSE;
+
+    g_return_val_if_fail (itdb, FALSE);
+    g_return_val_if_fail (itdb_get_mountpoint (itdb), FALSE);
+
+    /* First, let's try to write the .ithmb files containing the artwork data
+     * since this operation modifies the 'artwork_count' and 'artwork_size' 
+     * field in the Itdb_Track contained in the database.
+     * Errors happening during that operation are considered non fatal since
+     * they shouldn't corrupt the main database.
+     */
+
+
+    itunes_path = itdb_get_itunes_dir (itdb_get_mountpoint (itdb));
+
+    if(!itunes_path)
+    {
+	error_no_itunes_dir (itdb_get_mountpoint (itdb), error);
+	return FALSE;
+    }
+
+    itunes_filename = g_build_filename (itunes_path, "iTunesDB", NULL);
+
+    result = itdb_write_file (itdb, itunes_filename, error);
+
+    g_free (itunes_filename);
+    g_free (itunes_path);
+
+    if (result != FALSE)
+    {
+	/* Write SysInfo file if it has changed */
+	if (itdb->device->sysinfo_changed)
+	{
+	    itdb_device_write_sysinfo (itdb->device, error);
+	}
+	result = itdb_rename_files (itdb_get_mountpoint (itdb), error);
+    }
+
+    /* make sure all buffers are flushed as some people tend to
+       disconnect as soon as gtkpod returns */
+    sync ();
+
+    return result;
+}
+
+
+/* from here on we have the functions for writing the iTunesDB          */
+/* -------------------------------------------------------------------- */
+/* up to here we had the functions for writing the iTunesSD             */
+
+/*
+|  Copyright (C) 2005 Jorg Schuler <jcsjcs at users.sourceforge.net>
+|  Part of the gtkpod project.
+|
+|  Based on itunessd.c written by Steve Wahl for gtkpod-0.88:
+|
+|  Copyright 2005 Steve Wahl <steve at pro-ns dot net>
+|
+|  This file contains routines to create the iTunesSD file, as
+|  used by the ipod shuffle.
+|
+|  Like itunesdb.c, it is derived from the perl script "mktunes.pl"
+|  (part of the gnupod-tools collection) written by Adrian
+|  Ulrich <pab at blinkenlights.ch>.
+|
+|  Small(?) portions derived from itunesdb.c, so Jorg Schuler probably
+|  has some copyright ownership in this file as well.
+|
+|  The code contained in this file is free software; you can redistribute
+|  it and/or modify it under the terms of the GNU Lesser General Public
+|  License as published by the Free Software Foundation; either version
+|  2.1 of the License, or (at your option) any later version.
+|
+|  This file 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
+|  Lesser General Public License for more details.
+|
+|  You should have received a copy of the GNU Lesser General Public
+|  License along with this code; if not, write to the Free Software
+|  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+|
+|  iTunes and iPod are trademarks of Apple
+|
+|  This product is not supported/written/published by Apple!
+|
+*/
+
+/* notes:
+
+  All software currently seems to write iTunesDB as well as iTunesSD
+  on the iPod shuffle.  I assume that reading from the iTunesSD file
+  is not necessary.  The iTunesStats file is different, but I leave
+  that for another day.
+
+  The iTunesSD file format is as follows (taken from WikiPodLinux, feb
+  '05):
+
+    Offset Field         Bytes   Value
+     (hex)               (dec)
+
+  iTunesSD header (occurs once, at beginning of file):
+
+    00      num_songs     3       number of song entries in the file
+
+    03      unknown       3       always(?) 0x010600
+    06      header size   3       size of the header (0x12, 18 bytes)
+    09      unknown       3       possibly zero padding
+
+  iTunesSD song entry format (occurs once for each song)
+
+   000      size of entry 3       always(?) 0x00022e (558 bytes)
+   003      unk1          3       unknown, always(?) 0x5aa501
+   006      starttime     3       Start Time, in 256 ms increments
+                                  e.g. 60s = 0xea (234 dec)
+   009      unk2          3       unknown (always 0?)
+   00C      unk3          3       unknown, some relationship to starttime
+   00F      stoptime      3       Stop Time, also in 256 ms increments.
+                                  Zero means play to end of file.
+   012      unk4          3       Unknown.
+   015      unk5          3       Unknown, but associated with stoptime?
+   018      volume        3       Volume - ranges from 0x00 (-100%) to 0x64
+                                  (0%) to 0xc8 (100%)
+   01B      file_type     3       0x01 = MP3, 0x02 = AAC, 0x04=WAV
+   01E      unk6          3       unknown (always 0x200?)
+   021      filename      522     filename of the song, padded at the end
+                                  with 0's.  Note: forward slashes are used
+                                  here, not colons like in the iTunesDB --
+                                  for example,
+                                  "/iPod_Control/Music/F00/Song.mp3"
+   22B      shuffleflag   1       If this value is 0x00, the song will be
+                                  skipped while the player is in shuffle
+                                  mode.  Any other value will allow it to be
+                                  played in both normal and shuffle modes.
+                                  iTunes 4.7.1 sets this to 0 for audio books.
+   22C      bookmarkflag  1       If this flag is 0x00, the song will not be
+                                  bookmarkable (i.e. its playback position
+                                  won't be saved when switching to a different
+                                  song). Any other value wil make it
+                                  Bookmarkable.  Unlike hard drive based iPods,
+                                  all songs can be marked as bookmarkable,
+                                  not just .m4b and .aa
+   22D      unknownflag   1       unknown, always? 0x00.
+
+All integers in the iTunesSD file are in BIG endian form...
+
+*/
+
+/**
+ * itdb_shuffle_write:
+ * @itdb:   the #Itdb_iTunesDB to write to disk
+ * @error:  return location for a #GError or NULL
+ *
+ * Write out an iTunesSD for the Shuffle.
+ *
+ * First reassigns unique IDs to all tracks.  An existing "Play
+ * Counts" file is renamed to "Play Counts.bak" if the export was
+ * successful.  An existing "OTGPlaylistInfo" file is removed if the
+ * export was successful.  @itdb->mountpoint must point to the mount
+ * point of the iPod, e.g. "/mnt/ipod" and be in local encoding.
+ *
+ * Returns: TRUE on success, FALSE on error, in which case @error is
+ * set accordingly.
+ */
+gboolean itdb_shuffle_write (Itdb_iTunesDB *itdb, GError **error)
+{
+    gchar *itunes_filename, *itunes_path;
+    gboolean result = FALSE;
+
+    g_return_val_if_fail (itdb, FALSE);
+    g_return_val_if_fail (itdb_get_mountpoint (itdb), FALSE);
+
+    itunes_path = itdb_get_itunes_dir (itdb_get_mountpoint (itdb));
+
+    if(!itunes_path)
+    {
+	gchar *str = g_build_filename (itdb_get_mountpoint (itdb),
+				       "iPod_Control", "iTunes", NULL);
+	g_set_error (error,
+		     ITDB_FILE_ERROR,
+		     ITDB_FILE_ERROR_NOTFOUND,
+		     _("Path not found: '%s' (or similar)."),
+		     str);
+	g_free (str);
+	return FALSE;
+    }
+
+    itunes_filename = g_build_filename (itunes_path, "iTunesSD", NULL);
+
+    result = itdb_shuffle_write_file (itdb, itunes_filename, error);
+
+    g_free(itunes_filename);
+    g_free(itunes_path);
+
+    if (result == TRUE)
+	result = itdb_rename_files (itdb_get_mountpoint (itdb), error);
+
+    /* make sure all buffers are flushed as some people tend to
+       disconnect as soon as gtkpod returns */
+    sync ();
+
+    return result;
+}
+
+/* helper function */
+static gboolean haystack (gchar *filetype, gchar **desclist)
+{
+    gchar **dlp;
+    if (!filetype || !desclist) return FALSE;
+    for (dlp=desclist; *dlp; ++dlp)
+    {
+        if (strstr (filetype, *dlp)) return TRUE;
+    }
+    return FALSE;
+}
+
+/**
+ * itdb_shuffle_write_file:
+ * @itdb:       the #Itdb_iTunesDB to write to disk
+ * @filename:   file to write to, cannot be NULL
+ * @error:      return location for a #GError or NULL
+ *
+ * Do the actual writing to the iTunesSD
+ *
+ * Returns: TRUE on success, FALSE on error, in which case @error is
+ * set accordingly.
+ */
+gboolean itdb_shuffle_write_file (Itdb_iTunesDB *itdb,
+				  const gchar *filename, GError **error)
+{
+    FExport *fexp;
+    GList *gl;
+    WContents *cts;
+    gboolean result = TRUE;;
+
+    g_return_val_if_fail (itdb, FALSE);
+    g_return_val_if_fail (filename, FALSE);
+
+    fexp = g_new0 (FExport, 1);
+    fexp->itdb = itdb;
+    fexp->wcontents = wcontents_new (filename);
+    cts = fexp->wcontents;
+
+    prepare_itdb_for_write (fexp);
+
+    put24bint (cts, itdb_tracks_number (itdb));
+    put24bint (cts, 0x010600);
+    put24bint (cts, 0x12);	/* size of header */
+    put24bint (cts, 0x0);	/* padding? */
+    put24bint (cts, 0x0);
+    put24bint (cts, 0x0);
+
+    for (gl=itdb->tracks; gl; gl=gl->next)
+    {
+	Itdb_Track *tr = gl->data;
+	gchar *path;
+	gunichar2 *path_utf16;
+	glong pathlen;
+	gchar *mp3_desc[] = {"MPEG", "MP3", "mpeg", "mp3", NULL};
+	gchar *mp4_desc[] = {"AAC", "MP4", "aac", "mp4", NULL};
+	gchar *wav_desc[] = {"WAV", "wav", NULL};
+
+	g_return_val_if_fail (tr, FALSE);
+
+	put24bint (cts, 0x00022e);
+	put24bint (cts, 0x5aa501);
+	/* starttime is in 256 ms incr. for shuffle */
+	put24bint (cts, tr->starttime / 256);
+	put24bint (cts, 0);
+	put24bint (cts, 0);
+	put24bint (cts, tr->stoptime / 256);
+	put24bint (cts, 0);
+	put24bint (cts, 0);
+	/* track->volume ranges from -255 to +255 */
+	/* we want 0 - 200 */
+	put24bint (cts, ((tr->volume + 255) * 201) / 511);
+
+	/* The next one should be 0x01 for MP3,
+	** 0x02 for AAC, and 0x04 for WAV, but I can't find
+	** a suitable indicator within the track structure? */
+	/* JCS: let's do heuristic on tr->filetype which would contain
+	   "MPEG audio file", "AAC audio file", "Protected AAC audio
+	   file", "AAC audio book file", "WAV audio file" (or similar
+	   if not written by gtkpod) */
+
+	if (haystack (tr->filetype, mp3_desc))
+	    put24bint (cts, 0x01);
+	else if (haystack (tr->filetype, mp4_desc))
+	    put24bint (cts, 0x02);
+	else if (haystack (tr->filetype, wav_desc))
+	    put24bint (cts, 0x04);
+	else
+	    put24bint (cts, 0x01);  /* default to mp3 */
+
+	put24bint (cts, 0x200);
+		
+	path = g_strdup (tr->ipod_path);
+	/* shuffle uses forward slash separator, not colon */
+        g_strdelimit (path, ":", '/');
+	path_utf16 = g_utf8_to_utf16 (path, -1, NULL, &pathlen, NULL);
+	if (pathlen > 261) pathlen = 261;
+	fixup_little_utf16 (path_utf16);
+	put_data (cts, (gchar *)path_utf16, sizeof (gunichar2)*pathlen);
+	/* pad to 522 bytes */
+	put16_n0 (cts, 261-pathlen);
+	g_free(path);
+	g_free(path_utf16);
+
+	/* XXX FIXME: should depend on something, not hardcoded */
+	put8int (cts, 0x1); /* song used in shuffle mode */
+	put8int (cts, 0);   /* song will not be bookmarkable */
+	put8int (cts, 0);
+    }
+    if (!fexp->error)
+    {
+	if (!wcontents_write (cts))
+	    g_propagate_error (&fexp->error, cts->error);
+    }
+    if (fexp->error)
+    {
+	g_propagate_error (error, fexp->error);
+	result = FALSE;
+    }
+    wcontents_free (cts);
+    g_free (fexp);
+
+    /* make sure all buffers are flushed as some people tend to
+       disconnect as soon as gtkpod returns */
+    sync ();
+
+    return result;
+}
+
+/*------------------------------------------------------------------*\
+ *                                                                  *
+ *                  Other file/filename stuff                       *
+ *                                                                  *
+\*------------------------------------------------------------------*/
+
+/**
+ * itdb_rename_files:
+ * @mp:     mount point of the iPod
+ * @error:  return location for a #GError or NULL
+ *
+ * Renames/removes some files on the iPod (Playcounts, OTG
+ * semaphore). May have to be called if you write the iTunesDB not
+ * directly to the iPod but to some other location and then manually
+ * copy the file from there to the iPod.
+ *
+ * Returns: FALSE on error and sets @error accordingly
+ */
+gboolean itdb_rename_files (const gchar *mp, GError **error)
+{
+    const gchar *db_plc_o[] = {"Play Counts", NULL};
+    const gchar *db_otg[] = {"OTGPlaylistInfo", NULL};
+    const gchar *db_shu[] = {"iTunesShuffle", NULL};
+    const gchar *db_ist[] = {"iTunesStats", NULL};
+    gchar *itunesdir;
+    gchar *plcname_o;
+    gchar *plcname_n;
+    gchar *otgname;
+    gchar *shuname;
+    gchar *istname;
+    gboolean result = TRUE;
+
+    g_return_val_if_fail (mp, FALSE);
+
+    itunesdir = itdb_get_itunes_dir (mp);
+
+    if(!itunesdir)
+    {
+	error_no_itunes_dir (mp, error);
+	return FALSE;
+    }
+
+    plcname_o = itdb_resolve_path (itunesdir, db_plc_o);
+    plcname_n = g_build_filename (itunesdir,
+					 "Play Counts.bak", NULL);
+    otgname = itdb_resolve_path (itunesdir, db_otg);
+    shuname = itdb_resolve_path (itunesdir, db_shu);
+    istname = itdb_resolve_path (itunesdir, db_ist);
+
+    /* rename "Play Counts" to "Play Counts.bak" */
+    if (plcname_o)
+    {
+	if (rename (plcname_o, plcname_n) == -1)
+	{   /* an error occured */
+	    g_set_error (error,
+			 G_FILE_ERROR,
+			 g_file_error_from_errno (errno),
+			 _("Error renaming '%s' to '%s' (%s)."),
+			 plcname_o, plcname_n, g_strerror (errno));
+	    result = FALSE;
+	}
+    }
+
+    /* remove "OTGPlaylistInfo" (the iPod will remove the remaining
+     * files */
+    if (otgname)
+    {
+	if (unlink (otgname) == -1)
+	{
+	    if (error && !*error)
+	    {   /* don't overwrite previous error */
+	    g_set_error (error,
+			 G_FILE_ERROR,
+			 g_file_error_from_errno (errno),
+			 _("Error removing '%s' (%s)."),
+			 otgname, g_strerror (errno));
+	    }
+	    result = FALSE;
+	}
+    }
+
+    /* remove some Shuffle files */
+    if (shuname)
+    {
+	if (unlink (shuname) == -1)
+	{
+	    if (error && !*error)
+	    {   /* don't overwrite previous error */
+	    g_set_error (error,
+			 G_FILE_ERROR,
+			 g_file_error_from_errno (errno),
+			 _("Error removing '%s' (%s)."),
+			 shuname, g_strerror (errno));
+	    }
+	    result = FALSE;
+	}
+    }
+
+    /* remove some Shuffle files */
+    if (istname)
+    {
+	if (unlink (istname) == -1)
+	{
+	    if (error && !*error)
+	    {   /* don't overwrite previous error */
+	    g_set_error (error,
+			 G_FILE_ERROR,
+			 g_file_error_from_errno (errno),
+			 _("Error removing '%s' (%s)."),
+			 istname, g_strerror (errno));
+	    }
+	    result = FALSE;
+	}
+    }
+
+    g_free (plcname_o);
+    g_free (plcname_n);
+    g_free (otgname);
+    g_free (shuname);
+    g_free (istname);
+    g_free (itunesdir);
+
+    return result;
+}
+
+
+/**
+ * itdb_filename_fs2ipod:
+ * @filename: a 'PC-style' filename (eg /iPod_Control/Music/f00/test.mp3)
+ *
+ * Convert string from casual PC file name to iPod iTunesDB format
+ * using ':' instead of G_DIR_SEPARATOR_S (i.e. slashes on Unix-like
+ * systems). @ipod_file is modified in place.
+ */
+void itdb_filename_fs2ipod (gchar *ipod_file)
+{
+    g_strdelimit (ipod_file, G_DIR_SEPARATOR_S, ':');
+}
+
+/**
+ * itdb_filename_ipod2fs:
+ * @ipod_file: a 'PC-style' filename (eg /iPod_Control/Music/f00/test.mp3)
+ *
+ * Convert string from from iPod iTunesDB format to casual PC file
+ * name using G_DIR_SEPARATOR (ie slashes on Unix-like systems)
+ * instead of ':'.  @ipod_file is modified in place.
+ */
+void itdb_filename_ipod2fs (gchar *ipod_file)
+{
+    g_strdelimit (ipod_file, ":", G_DIR_SEPARATOR);
+}
+
+/**
+ * itdb_set_mountpoint:
+ * @itdb:   an #Itdb_iTunesDB
+ * @mp:     new mount point
+ *
+ * Sets the mountpoint of @itdb. Always use this function to set the
+ * mountpoint of an #Itdb_iTunesDB as it will reset the number of
+ * available /iPod_Control/Music/F.. dirs. It doesn't attempt to parse
+ * an iPod database that may be present on the iPod at @mp.
+ *
+ * <note><para>Calling this function removes the artwork in the
+ * #Itdb_iTunesDB database using this #Itdb_Device which was read from the
+ * iPod.</para></note>.
+ *
+ * Since: 0.1.3
+ */
+void itdb_set_mountpoint (Itdb_iTunesDB *itdb, const gchar *mp)
+{
+    g_return_if_fail (itdb);
+    g_return_if_fail (itdb->device);
+
+    itdb_device_set_mountpoint (itdb->device, mp);
+    itdb->device->musicdirs = 0;
+}
+
+/**
+ * itdb_get_mountpoint:
+ * @itdb: an #Itdb_iTunesDB
+ *
+ * Retrieve a reference to the mountpoint of @itdb
+ *
+ * Returns: the @itdb mountpoint, this string shouldn't be freed
+ * nor modified
+ *
+ * Since: 0.4.0
+ */
+const gchar *itdb_get_mountpoint (Itdb_iTunesDB *itdb)
+{
+    g_return_val_if_fail (itdb, NULL);
+    g_return_val_if_fail (itdb->device, NULL);
+    return itdb->device->mountpoint;
+}
+
+/* Retrieve a reference to the mountpoint */
+const gchar *itdb_photodb_get_mountpoint (Itdb_PhotoDB *photodb)
+{
+    g_return_val_if_fail (photodb, NULL);
+    g_return_val_if_fail (photodb->device, NULL);
+    return photodb->device->mountpoint;
+}
+
+/**
+ * itdb_musicdirs_number:
+ * @itdb: an #Itdb_iTunesDB
+ *
+ * Determine the number of F.. directories in iPod_Control/Music.
+ *
+ * If @itdb->musicdirs is already set, simply return the previously
+ * determined number. Otherwise count the directories first and set
+ * @itdb->musicdirs.
+ *
+ * Returns: max number of directories in iPod_Control/Music
+ *
+ * Since: 0.1.3
+ */
+gint itdb_musicdirs_number (Itdb_iTunesDB *itdb)
+{
+    g_return_val_if_fail (itdb, 0);
+    g_return_val_if_fail (itdb->device, 0);
+
+    return itdb_device_musicdirs_number (itdb->device);
+}
+
+/**
+ * itdb_cp_get_dest_filename:
+ * @track:      track to transfer or NULL
+ * @mountpoint: mountpoint of your iPod or NULL
+ * @filename:   the source file
+ * @error:      return location for a #GError or NULL
+ *
+ * Creates a valid filename on the iPod where @filename can be copied.
+ *
+ * You must provide either @track or @mountpoint. Providing @track is
+ * not thread-safe (accesses track->itdb->device and may even write to
+ * track->itdb->device). Providing @mountpoint is thread-safe but
+ * slightly slower because the number of music directories is counted
+ * each time the function is called.
+ *
+ * You can use itdb_cp() to copy the track to the iPod or implement
+ * your own copy function. After the file was copied you have to call
+ * itdb_cp_finalize() to obtain relevant update information for
+ * #Itdb_Track.
+ *
+ * Returns: a valid filename on the iPod where @filename can be
+ * copied or NULL in case of an error. In that case @error is set
+ * accordingly. You must free the filename when it is no longer
+ * needed.
+ *
+ * Since: 0.5.0
+ */
+gchar *itdb_cp_get_dest_filename (Itdb_Track *track,
+                                  const gchar *mountpoint,
+				  const gchar *filename,
+				  GError **error)
+{
+    gchar *ipod_fullfile = NULL;
+
+    /* either supply mountpoint or track */
+    g_return_val_if_fail (mountpoint || track, NULL);
+    /* if mountpoint is not set, track->itdb is required */
+    g_return_val_if_fail (mountpoint || track->itdb, NULL);
+    g_return_val_if_fail (filename, NULL);
+
+    if (!mountpoint)
+    {
+	mountpoint = itdb_get_mountpoint (track->itdb);
+    }
+
+    if (!mountpoint)
+    {
+	g_set_error (error,
+		     ITDB_FILE_ERROR,
+		     ITDB_FILE_ERROR_NOTFOUND,
+		     _("Mountpoint not set."));
+	return NULL;
+    }
+
+    /* If track->ipod_path exists, we use that one instead. */
+    if (track)
+    {
+	ipod_fullfile = itdb_filename_on_ipod (track);
+    }
+
+    if (!ipod_fullfile)
+    {
+	gint dir_num, musicdirs_number;
+	gchar *dest_components[] = {NULL, NULL, NULL};
+	gchar *parent_dir_filename, *music_dir;
+	gchar *original_suffix;
+	gchar dir_num_str[6];
+	gint32 oops = 0;
+	gint32 rand = g_random_int_range (0, 899999); /* 0 to 900000 */
+
+	music_dir = itdb_get_music_dir (mountpoint);
+	if (!music_dir)
+	{
+	    error_no_music_dir (mountpoint, error);
+	    return NULL;
+	}
+
+	if (track)
+	{
+	    musicdirs_number = itdb_musicdirs_number (track->itdb);
+	}
+	else
+	{
+	    musicdirs_number = itdb_musicdirs_number_by_mountpoint (mountpoint);
+	}
+	if (musicdirs_number <= 0)
+	{
+	    g_set_error (error,
+			 ITDB_FILE_ERROR,
+			 ITDB_FILE_ERROR_NOTFOUND,
+			 _("No 'F..' directories found in '%s'."),
+			 music_dir);
+	    g_free (music_dir);
+	    return NULL;
+	}
+
+	dir_num = g_random_int_range (0, musicdirs_number);
+
+	g_snprintf (dir_num_str, 6, "F%02d", dir_num);
+	dest_components[0] = dir_num_str;
+
+	parent_dir_filename =
+	    itdb_resolve_path (music_dir, (const gchar **)dest_components);
+	if(parent_dir_filename == NULL)
+	{
+	    /* Can't find the F%02d directory */
+	    gchar *str = g_build_filename (music_dir,
+					   dest_components[0], NULL);
+	    g_set_error (error,
+			 ITDB_FILE_ERROR,
+			 ITDB_FILE_ERROR_NOTFOUND,
+			 _("Path not found: '%s'."),
+			 str);
+	    g_free (str);
+	    g_free (music_dir);
+	    return NULL;
+	}
+
+	/* we need the original suffix of pcfile to construct a correct ipod
+	   filename */
+	original_suffix = strrchr (filename, '.');
+	/* If there is no ".mp3", ".m4a" etc, set original_suffix to empty
+	   string. Note: the iPod will most certainly ignore this file... */
+	if (!original_suffix) original_suffix = "";
+
+	/* use lower-case version of extension as some iPods seem to
+	   choke on upper-case extension. */
+	original_suffix = g_ascii_strdown (original_suffix, -1);
+
+	do
+	{   /* we need to loop until we find an unused filename */
+	    dest_components[1] = 
+		g_strdup_printf("libgpod%06d%s",
+				rand + oops, original_suffix);
+	    ipod_fullfile = itdb_resolve_path (
+		parent_dir_filename,
+		(const gchar **)&dest_components[1]);
+	    if(ipod_fullfile)
+	    {   /* already exists -- try next */
+		g_free(ipod_fullfile);
+		ipod_fullfile = NULL;
+	    }
+	    else
+	    {   /* found unused file -- build filename */
+		ipod_fullfile = g_build_filename (parent_dir_filename,
+						  dest_components[1], NULL);
+	    }
+	    g_free (dest_components[1]);
+	    ++oops;
+	} while (!ipod_fullfile);
+	g_free(parent_dir_filename);
+	g_free (music_dir);
+	g_free (original_suffix);
+    }
+
+    return ipod_fullfile;
+}
+
+/**
+ * itdb_cp_finalize:
+ * @track:          track to update or NULL
+ * @mountpoint:     mountpoint of your iPod or NULL
+ * @dest_filename:  the name of the file on the iPod copied to
+ * @error:          return location for a #GError or NULL
+ *
+ * Updates information in @track necessary for the iPod.
+ *
+ * You must supply either @track or @mountpoint. If @track == NULL, a
+ * new track structure is created that must be freed with
+ * itdb_track_free() when it is no longer needed.
+ *
+ * The following @track fields are updated:
+ *
+ * <itemizedlist>
+ *   <listitem>
+ *       ipod_path
+ *   </listitem>
+ *   <listitem>
+ *       filetype_marker
+ *   </listitem>
+ *   <listitem>
+ *       transferred
+ *   </listitem>
+ *   <listitem>
+ *       size
+ *   </listitem>
+ * </itemizedlist>
+ *
+ * Returns: on success a pointer to the #Itdb_Track item passed
+ * or a new #Itdb_Track item if @track was NULL. In the latter case
+ * you must free the memory using itdb_track_free() when the item is
+ * no longer used. If an error occurs NULL is returned and @error is
+ * set accordingly. Errors occur when @dest_filename cannot be
+ * accessed or the mountpoint is not set.
+ *
+ * Since: 0.5.0
+ */
+Itdb_Track *itdb_cp_finalize (Itdb_Track *track,
+			      const gchar *mountpoint,
+			      const gchar *dest_filename,
+			      GError **error)
+{
+    const gchar *suffix;
+    Itdb_Track *use_track;
+    gint i, mplen;
+    struct stat statbuf;
+
+    /* either supply mountpoint or track */
+    g_return_val_if_fail (mountpoint || track, NULL);
+    /* if mountpoint is not set, track->itdb is required */
+    g_return_val_if_fail (mountpoint || track->itdb, NULL);
+    g_return_val_if_fail (dest_filename, NULL);
+
+    if (!mountpoint)
+    {
+	mountpoint = itdb_get_mountpoint (track->itdb);
+    }
+
+    if (!mountpoint)
+    {
+	g_set_error (error,
+		     ITDB_FILE_ERROR,
+		     ITDB_FILE_ERROR_NOTFOUND,
+		     _("Mountpoint not set."));
+	return NULL;
+    }
+
+    if (stat (dest_filename, &statbuf) == -1)
+    {
+	g_set_error (error,
+		     G_FILE_ERROR,
+		     g_file_error_from_errno (errno),
+		     _("'%s' could not be accessed (%s)."),
+		     dest_filename, g_strerror (errno));
+	return NULL;
+    }
+
+    if (strlen (mountpoint) >= strlen (dest_filename))
+    {
+	g_set_error (error,
+		     ITDB_FILE_ERROR,
+		     ITDB_FILE_ERROR_CORRUPT,
+		     _("Destination file '%s' does not appear to be on the iPod mounted at '%s'."),
+		     dest_filename, mountpoint);
+	return NULL;
+    }
+
+    if (!track)
+    {
+	use_track = itdb_track_new ();
+    }
+    else
+    {
+	use_track = track;
+    }
+
+    use_track->transferred = TRUE;
+    use_track->size = statbuf.st_size;
+
+    /* we need the original suffix of pcfile to construct a correct ipod
+       filename */
+    suffix = strrchr (dest_filename, '.');
+    /* If there is no ".mp3", ".m4a" etc, set original_suffix to empty
+       string. Note: the iPod will most certainly ignore this file... */
+    if (!suffix) suffix = ".";
+
+    /* set filetype from the suffix, e.g. '.mp3' -> 'MP3 ' */
+    use_track->filetype_marker = 0;
+    for (i=1; i<=4; ++i)   /* start with i=1 to skip the '.' */
+    {
+	use_track->filetype_marker = use_track->filetype_marker << 8;
+	if (strlen (suffix) > i)
+	    use_track->filetype_marker |= g_ascii_toupper (suffix[i]);
+	else
+	    use_track->filetype_marker |= ' ';
+    }
+
+    /* now extract filepath for use_track->ipod_path from ipod_fullfile */
+    /* ipod_path must begin with a '/' */
+    g_free (use_track->ipod_path);
+    mplen = strlen (mountpoint); /* length of mountpoint in bytes */
+    if (dest_filename[mplen] == G_DIR_SEPARATOR)
+    {
+	use_track->ipod_path = g_strdup (&dest_filename[mplen]);
+    }
+    else
+    {
+	use_track->ipod_path = g_strdup_printf ("%c%s", G_DIR_SEPARATOR,
+						&dest_filename[mplen]);
+    }
+    /* convert to iPod type */
+    itdb_filename_fs2ipod (use_track->ipod_path);
+
+    return use_track;
+}
+
+/**
+ * itdb_cp_track_to_ipod:
+ * @track:      the #Itdb_Track to copy (containing @filename metadata)
+ * @filename:   the source file
+ * @error:      return location for a #GError or NULL
+ * 
+ * Copy one track to the iPod. The PC filename is @filename
+ * and is taken literally.
+ *
+ * The mountpoint of the iPod (in local encoding) must have been set
+ * with itdb_set_mountpoint() (done automatically when reading an
+ * iTunesDB).
+ *
+ * If @track->transferred is set to TRUE, nothing is done. Upon
+ * successful transfer @track->transferred is set to TRUE.
+ *
+ * For storage, the directories "F00 ... Fnn" will be used randomly.
+ *
+ * The filename is constructed as "libgpod at random_number" and copied
+ * to @track->ipod_path. If this file already exists, @random_number
+ * is adjusted until an unused filename is found.
+ *
+ * If @track->ipod_path is already set, this one will be used
+ * instead. If a file with this name already exists, it will be
+ * overwritten.
+ *
+ * @track->filetype_marker is set according to the filename extension
+ *
+ * Returns: TRUE on success, FALSE on error, in which case @error is
+ * set accordingly.
+ */
+gboolean itdb_cp_track_to_ipod (Itdb_Track *track,
+				const gchar *filename, GError **error)
+{
+    gchar *dest_filename;
+    gboolean result = FALSE;
+
+    g_return_val_if_fail (track, FALSE);
+    g_return_val_if_fail (track->itdb, FALSE);
+    g_return_val_if_fail (itdb_get_mountpoint (track->itdb), FALSE);
+    g_return_val_if_fail (filename, FALSE);
+
+    if(track->transferred)  return TRUE; /* nothing to do */ 
+
+    dest_filename = itdb_cp_get_dest_filename (track, NULL, filename, error);
+
+    if (dest_filename)
+    {
+	if (itdb_cp (filename, dest_filename, error))
+	{
+	    if (itdb_cp_finalize (track, NULL, dest_filename, error))
+	    {
+		result = TRUE;
+	    }
+	}
+	g_free (dest_filename);
+    }
+
+    return result;
+}
+
+/**
+ * itdb_filename_on_ipod:
+ * @track: an #Itdb_Track
+ *
+ * Get the full iPod filename as stored in @track.
+ *
+ * <note>
+ * NULL is returned when the file does not exist.
+ * </note>
+ *
+ * <note>
+ * This code works around a problem on some systems (see
+ * itdb_resolve_path()) and might return a filename with different
+ * case than the original filename. Don't copy it back to @track if
+ * you can avoid it.
+ * </note>
+ *
+ * Returns: full filename to @track on the iPod or NULL if no
+ * filename is set in @track. Must be freed with g_free() after use.
+ */
+gchar *itdb_filename_on_ipod (Itdb_Track *track)
+{
+    gchar *result = NULL;
+    gchar *buf;
+    const gchar *mp;
+
+    g_return_val_if_fail (track, NULL);
+
+    if (!track->ipod_path || !*track->ipod_path)
+    {   /* No filename set */
+	return NULL;
+    }
+
+    g_return_val_if_fail (track->itdb, NULL);
+
+    if (!itdb_get_mountpoint (track->itdb)) return NULL;
+
+    mp = itdb_get_mountpoint (track->itdb);
+
+    buf = g_strdup (track->ipod_path);
+    itdb_filename_ipod2fs (buf);
+    result = g_build_filename (mp, buf, NULL);
+    g_free (buf);
+
+    if (!g_file_test (result, G_FILE_TEST_EXISTS))
+    {
+	gchar **components = g_strsplit (track->ipod_path,":",10);
+	g_free (result);
+	result = itdb_resolve_path (mp, (const gchar **)components);
+	g_strfreev (components);
+    }
+
+    return result;
+}
+
+/* Use open instead of fopen.  fwrite is really slow on the Mac. */
+/**
+ * itdb_cp:
+ * @from_file:  source file
+ * @to_file:    destination file
+ * @error:      return location for a #GError or NULL
+ *
+ * Copy file @from_file to @to_file.
+ *
+ * Returns: TRUE on success, FALSE on error, in which case @error is
+ * set accordingly.
+ */
+gboolean itdb_cp (const gchar *from_file, const gchar *to_file,
+		  GError **error)
+{
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+    gchar *data;
+    glong bread, bwrite;
+    int file_in = -1;
+    int file_out = -1;
+
+#if ITUNESDB_DEBUG
+    fprintf(stderr, "Entered itunesdb_cp: '%s', '%s'\n", from_file, to_file);
+#endif
+
+    g_return_val_if_fail (from_file, FALSE);
+    g_return_val_if_fail (to_file, FALSE);
+
+    data = g_malloc (ITUNESDB_COPYBLK);
+
+    file_in = g_open (from_file, O_RDONLY | O_BINARY, 0);
+    if (file_in < 0)
+    {
+	g_set_error (error,
+		     G_FILE_ERROR,
+		     g_file_error_from_errno (errno),
+		     _("Error opening '%s' for reading (%s)."),
+		     from_file, g_strerror (errno));
+	goto err_out;
+    }
+
+    file_out =  g_open (to_file, O_CREAT|O_WRONLY|O_TRUNC|O_BINARY,
+                        S_IRWXU|S_IRWXG|S_IRWXO);
+    if (file_out < 0)
+    {
+	g_set_error (error,
+		     G_FILE_ERROR,
+		     g_file_error_from_errno (errno),
+		     _("Error opening '%s' for writing (%s)."),
+		     to_file, g_strerror (errno));
+	goto err_out;
+    }
+
+    do {
+	bread = read (file_in, data, ITUNESDB_COPYBLK);
+#if ITUNESDB_DEBUG
+	fprintf(stderr, "itunesdb_cp: read %ld bytes\n", bread);
+#endif
+	if (bread < 0)
+	{
+	    /* error -- not end of file! */
+	    g_set_error (error,
+			 G_FILE_ERROR,
+			 g_file_error_from_errno (errno),
+			 _("Error while reading from '%s' (%s)."),
+			 from_file, g_strerror (errno));
+	    goto err_out;
+	}
+	else
+	{
+	    bwrite = write (file_out, data, bread);
+#if ITUNESDB_DEBUG
+	    fprintf(stderr, "itunesdb_cp: wrote %ld bytes\n", bwrite);
+#endif
+	    if (bwrite != bread)
+	    {
+		g_set_error (error,
+			     G_FILE_ERROR,
+			     g_file_error_from_errno (errno),
+			     _("Error while writing to '%s' (%s)."),
+			     to_file, g_strerror (errno));
+		goto err_out;
+	    }
+	}
+    } while (bread != 0);
+
+    if (close (file_in) != 0)
+    {
+	file_in = -1;
+	g_set_error (error,
+		     G_FILE_ERROR,
+		     g_file_error_from_errno (errno),
+		     _("Error when closing '%s' (%s)."),
+		     from_file, g_strerror (errno));
+	goto err_out;
+    }
+    if (close (file_out) != 0)
+    {
+	file_out = -1;
+	g_set_error (error,
+		     G_FILE_ERROR,
+		     g_file_error_from_errno (errno),
+		     _("Error when closing '%s' (%s)."),
+		     to_file, g_strerror (errno));
+	goto err_out;
+    }
+    g_free (data);
+    return TRUE;
+
+  err_out:
+    if (file_in >= 0)  close (file_in);
+    if (file_out >= 0) close (file_out);
+    g_unlink (to_file);
+    g_free (data);
+    return FALSE;
+}
+
+
+G_GNUC_INTERNAL gboolean
+itdb_file_set_contents (const char *filename, 
+                        const char *data, gssize len, 
+                        GError **error)
+{
+    gchar *backup;
+    gboolean success;
+
+    /* sshfs (which is used to access iPhones/iTouches) can't successfully
+     * rename a file if the destination file already exist.
+     * We first move away the existing file to workaround that limitation
+     *                            */
+    if (g_file_test (filename, G_FILE_TEST_EXISTS)) {
+        gint result;
+        backup = g_strdup_printf ("%sXXXXXX", filename);
+        result = g_rename (filename, backup);
+        if (result != 0) {
+            g_free (backup);
+            return FALSE;
+        }
+    } else {
+        backup = NULL;
+    }
+
+    success = g_file_set_contents (filename, data, len, error);
+    if (!success) {
+        if (backup != NULL) {
+            g_rename (backup, filename);
+            g_free (backup);
+        }
+        return FALSE;
+    }
+
+    /* File saving was
+     * ok, clean up our
+     * mess */
+    if (backup != NULL) {
+        g_unlink (backup);
+        g_free (backup);
+    }
+
+    return TRUE;
+}
+
+/**
+ * itdb_get_control_dir:
+ * @mountpoint: the iPod mountpoint
+ *
+ * Get the i*_Control directory. Observed values are 'iPod_Control'
+ * for standard iPods and 'iTunes/iTunes_Control' for mobile
+ * applications.
+ *
+ * Returns: path to the control dir or NULL if non-existent. Must
+ * g_free() after use.
+ *
+ * Since: 0.4.0
+ */
+gchar *itdb_get_control_dir (const gchar *mountpoint)
+{
+    gchar *p_ipod[] = {"iPod_Control", NULL};
+    gchar *p_mobile[] = {"iTunes", "iTunes_Control", NULL};
+    gchar *p_iphone[] = {"iTunes_Control", NULL};
+    /* Use an array with all possibilities, so further extension will
+       be easy */
+    gchar **paths[] = {p_ipod, p_mobile, p_iphone, NULL};
+    gchar ***ptr;
+    gchar *result = NULL;
+
+    g_return_val_if_fail (mountpoint, NULL);
+
+    for (ptr=paths; *ptr && !result; ++ptr)
+    {
+	result = itdb_resolve_path (mountpoint, (const gchar **)*ptr);
+    }
+    return result;
+}
+
+/**
+ * itdb_get_dir:
+ * @mountpoint: the iPod mountpoint
+ * @dir:        a directory
+ *
+ * Retrieve the directory @dir by first calling itdb_get_control_dir()
+ * and then adding @dir
+ *
+ * Returns: path to @dir or NULL if non-existent. Must g_free()
+ * after use.
+ */
+static gchar *itdb_get_dir (const gchar *mountpoint, const gchar *dir)
+{
+    gchar *control_dir;
+    gchar *result = NULL;
+
+    g_return_val_if_fail (mountpoint, NULL);
+    g_return_val_if_fail (dir, NULL);
+
+    control_dir = itdb_get_control_dir (mountpoint);
+    if (control_dir)
+    {
+	const gchar *p_dir[] = {NULL, NULL};
+	p_dir[0] = dir;
+	result = itdb_resolve_path (control_dir, p_dir);
+	g_free (control_dir);
+    }
+    return result;
+}
+
+/**
+ * itdb_get_path:
+ * @dir:    a directory
+ * @file:   a file
+ *
+ * Retrieve a path to the @file in @dir
+ *
+ * Returns: path to the @file or NULL if non-existent. Must g_free()
+ * after use.
+ *
+ * Since: 0.4.0
+ */
+gchar *itdb_get_path (const gchar *dir, const gchar *file)
+{
+    const gchar *p_file[] = {NULL, NULL};
+
+    g_return_val_if_fail (dir, NULL);
+
+    p_file[0] = file;
+
+    return itdb_resolve_path (dir, p_file);
+}
+
+/**
+ * itdb_get_itunes_dir:
+ * @mountpoint: the iPod mountpoint
+ *
+ * Retrieve the iTunes directory (containing the iTunesDB) by first
+ * calling itdb_get_control_dir() and then adding 'iTunes'
+ *
+ * Returns: path to the iTunes directory or NULL if non-existent.
+ * Must g_free() after use.
+ *
+ * Since: 0.4.0
+ */
+gchar *itdb_get_itunes_dir (const gchar *mountpoint)
+{
+    g_return_val_if_fail (mountpoint, NULL);
+
+    return itdb_get_dir (mountpoint, "iTunes");
+}
+
+/**
+ * itdb_get_music_dir:
+ * @mountpoint: the iPod mountpoint
+ *
+ * Retrieve the Music directory (containing the Fnn dirs) by first
+ * calling itdb_get_control_dir() and then adding 'Music'
+ *
+ * Returns: path to the Music directory or NULL if
+ * non-existent. Must g_free() after use.
+ */
+gchar *itdb_get_music_dir (const gchar *mountpoint)
+{
+    g_return_val_if_fail (mountpoint, NULL);
+
+    return itdb_get_dir (mountpoint, "Music");
+}
+
+/**
+ * itdb_get_device_dir:
+ * @mountpoint: the iPod mountpoint
+ *
+ * Retrieve the Device directory (containing the SysInfo file) by
+ * first calling itdb_get_control_dir() and then adding 'Device'
+ *
+ * Returns: path to the Device directory or NULL if
+ * non-existent. Must g_free() after use.
+ *
+ * Since: 0.4.0
+ */
+gchar *itdb_get_device_dir (const gchar *mountpoint)
+{
+    g_return_val_if_fail (mountpoint, NULL);
+
+    return itdb_get_dir (mountpoint, "Device");
+}
+
+/**
+ * itdb_get_artwork_dir:
+ * @mountpoint: the iPod mountpoint
+ *
+ * Retrieve the Artwork directory (containing the ArtworDB) by
+ * first calling itdb_get_control_dir() and then adding 'Artwork'
+ *
+ * Returns: path to the Artwork directory or NULL if
+ * non-existent. Must g_free() after use.
+ *
+ * Since: 0.4.0
+ */
+gchar *itdb_get_artwork_dir (const gchar *mountpoint)
+{
+    g_return_val_if_fail (mountpoint, NULL);
+
+    return itdb_get_dir (mountpoint, "Artwork");
+}
+
+/**
+ * itdb_get_itunesdb_path:
+ * @mountpoint: the iPod mountpoint
+ *
+ * Retrieve a path to the iTunesDB
+ *
+ * Returns: path to the iTunesDB or NULL if non-existent. Must g_free()
+ * after use.
+ *
+ * Since: 0.4.0
+ */
+gchar *itdb_get_itunesdb_path (const gchar *mountpoint)
+{
+    gchar *itunes_dir, *path=NULL;
+
+    g_return_val_if_fail (mountpoint, NULL);
+
+    itunes_dir = itdb_get_itunes_dir (mountpoint);
+
+    if (itunes_dir)
+    {
+	path = itdb_get_path (itunes_dir, "iTunesDB");
+	g_free (itunes_dir);
+    }
+
+    return path;
+}
+
+/**
+ * itdb_get_itunessd_path:
+ * @mountpoint: the iPod mountpoint
+ *
+ * Retrieve a path to the iTunesSD
+ *
+ * Returns: path to the iTunesSD or NULL if non-existent. Must g_free()
+ * after use.
+ *
+ * Since: 0.4.0
+ */
+gchar *itdb_get_itunessd_path (const gchar *mountpoint)
+{
+    gchar *itunes_dir, *path=NULL;
+
+    g_return_val_if_fail (mountpoint, NULL);
+
+    itunes_dir = itdb_get_itunes_dir (mountpoint);
+
+    if (itunes_dir)
+    {
+	path = itdb_get_path (itunes_dir, "iTunesSD");
+	g_free (itunes_dir);
+    }
+
+    return path;
+}
+
+/**
+ * itdb_get_artworkdb_path:
+ * @mountpoint: the iPod mountpoint
+ *
+ * Retrieve a path to the ArtworkDB
+ *
+ * Returns: path to the ArtworkDB or NULL if non-existent. Must g_free()
+ * after use.
+ *
+ * Since: 0.4.0
+ */
+gchar *itdb_get_artworkdb_path (const gchar *mountpoint)
+{
+    gchar *itunes_dir, *path=NULL;
+
+    g_return_val_if_fail (mountpoint, NULL);
+
+    itunes_dir = itdb_get_artwork_dir (mountpoint);
+
+    if (itunes_dir)
+    {
+	path = itdb_get_path (itunes_dir, "ArtworkDB");
+	g_free (itunes_dir);
+    }
+
+    return path;
+}
+
+
+/*------------------------------------------------------------------*\
+ *                                                                  *
+ *                       Timestamp stuff                            *
+ *                                                                  *
+\*------------------------------------------------------------------*/
+
+/**
+ * itdb_time_get_mac_time:
+ *
+ * Gets the current time in a format appropriate for storing in the libgpod
+ * data structures
+ *
+ * Returns: current time
+ *
+ * Deprecated: kept for compatibility with older code, directly use
+ * g_get_current_time() or time(NULL) instead
+ */
+time_t itdb_time_get_mac_time (void)
+{
+    GTimeVal time;
+
+    g_get_current_time (&time);
+
+    return time.tv_sec;
+}
+
+/**
+ * itdb_time_mac_to_host:
+ * @time: time expressed in libgpod format
+ *
+ * Converts a timestamp from libgpod format to host system timestamp.
+ *
+ * Returns: timestamp for the host system
+ *
+ * Deprecated: It's been kept for compatibility with older code, but this
+ * function is now a no-op
+ */
+time_t itdb_time_mac_to_host (time_t time)
+{
+    return time;
+}
+
+/**
+ * itdb_time_host_to_mac:
+ * @time: time expressed in host unit
+ *
+ * Convert host system timestamp to libgpod format timestamp
+ *
+ * Returns: a libgpod timestamp
+ *
+ * Deprecated: It's been kept for compatibility with older code, but this
+ * function is now a no-op
+ */
+time_t itdb_time_host_to_mac (time_t time)
+{
+    return time;
+}
+
+/**
+ * itdb_init_ipod:
+ * @mountpoint:   the iPod mountpoint
+ * @model_number: the iPod model number, can be NULL
+ * @ipod_name:    the name to give to the iPod. Will be displayed in
+ *                gtkpod or itunes
+ * @error:        return location for a #GError or NULL
+ *
+ * Initialise an iPod device from scratch. The function attempts to
+ * create a blank database, complete with master playlist and device
+ * information as well as the directory structure required for the
+ * type of iPod.
+ * @model_number is used to tell libgpod about the exact iPod
+ * model, which is needed for proper artwork writing. @model_number can be
+ * found from the table returned by itdb_device_get_ipod_info_table (for
+ * example). On recent distros with iPods released
+ * in the last few years (starting with the iPod Color), it should be fine
+ * to pass in a NULL @model_number while still getting artwork writing.
+ * 
+ * Returns: TRUE when successful, FALSE if a failure has occurred.
+ *
+ * Since: 0.4.0
+ */
+gboolean itdb_init_ipod (const gchar *mountpoint,
+			 const gchar *model_number,
+			 const gchar *ipod_name,
+			 GError **error)
+{
+	gboolean writeok;
+	Itdb_iTunesDB *itdb = NULL;
+	Itdb_Playlist *mpl = NULL;
+	Itdb_IpodInfo const *info = NULL;
+	gchar *path;
+
+	g_return_val_if_fail (mountpoint, FALSE);
+
+	/* Create new blank itdb database for writing to iPod */
+	itdb = itdb_new();
+
+	/* Assign iPod device reference to new database */
+	itdb_set_mountpoint(itdb, mountpoint);
+
+	/* Insert model_number into sysinfo file if present
+	 * The model number can be extracted in a couple of ways:
+	 *		- use the read_sysinfo_file function
+	 *		- use libipoddevice and hal to get the model
+	 *		  (as far as I know, libipoddevice will also
+	 *		  read the sysinfo file, complemented by some
+	 *		  guessing).
+	 */
+	if (model_number)
+	{
+	    itdb_device_set_sysinfo (itdb->device,
+				     "ModelNumStr", model_number);
+	}
+
+	/* Create the remaining directories resident on blank ipod */
+	writeok = itdb_create_directories(itdb->device, error);
+	if(! writeok)
+	{
+		return FALSE;
+	}
+
+	/* Create a new playlist with the desired name of the ipod
+	 * and set it as the mpl */
+	if (ipod_name == NULL)
+	{
+	    mpl = itdb_playlist_new(_("iPod"), FALSE);
+	}
+	else
+	{
+	    mpl = itdb_playlist_new(ipod_name, FALSE);
+	}
+	itdb_playlist_set_mpl(mpl);
+	itdb_playlist_add(itdb, mpl, -1);
+	
+	/* Write both the iTunesDB and iTunesSD files to the new ipod,
+	 * unless they already exist */
+	path = itdb_get_itunesdb_path (mountpoint);
+	if (!path)
+	{
+	    writeok = itdb_write(itdb, error);
+	    if(! writeok)
+	    {
+	        itdb_free (itdb);
+		return FALSE;
+	    }
+	}
+	g_free (path);
+
+	/* Retrieve the model from the device information */
+	info = itdb_device_get_ipod_info(itdb->device);
+
+	/* If model is a shuffle or the model is undetermined,
+	 * ie. @model_number is NULL, then create the itunesSD database
+	 */
+	if(!model_number || info->ipod_model == ITDB_IPOD_MODEL_SHUFFLE)
+	{
+	    path = itdb_get_itunessd_path (mountpoint);
+	    if (!path)
+	    {
+		writeok = itdb_shuffle_write(itdb, error);
+		if(! writeok)
+		{
+		    itdb_free (itdb);
+		    return FALSE;
+		}
+	    }
+	    g_free (path);
+	}
+	itdb_free (itdb);
+	return TRUE;
+}
+
+
+
+/*------------------------------------------------------------------*\
+ *                                                                  *
+ *             Some functions to access Itdb_DB safely              *
+ *                                                                  *
+\*------------------------------------------------------------------*/
+G_GNUC_INTERNAL
+Itdb_iTunesDB *db_get_itunesdb (Itdb_DB *db)
+{
+    g_return_val_if_fail (db, NULL);
+    g_return_val_if_fail (db->db_type == DB_TYPE_ITUNES, NULL);
+
+    return db->db.itdb;
+}
+
+G_GNUC_INTERNAL
+Itdb_PhotoDB *db_get_photodb (Itdb_DB *db)
+{
+    g_return_val_if_fail (db, NULL);
+    g_return_val_if_fail (db->db_type == DB_TYPE_PHOTO, NULL);
+
+    return db->db.photodb;
+}
+
+G_GNUC_INTERNAL
+Itdb_Device *db_get_device(Itdb_DB *db)
+{
+    g_return_val_if_fail (db, NULL);
+
+    switch (db->db_type) {
+    case DB_TYPE_ITUNES:
+	g_return_val_if_fail (db_get_itunesdb(db), NULL);
+	return db_get_itunesdb(db)->device;
+    case DB_TYPE_PHOTO:
+	g_return_val_if_fail (db_get_photodb(db), NULL);
+	return db_get_photodb(db)->device;
+    }
+    g_return_val_if_reached (NULL);
+}
+
+G_GNUC_INTERNAL
+gchar *db_get_mountpoint(Itdb_DB *db)
+{
+    Itdb_Device *device;
+    g_return_val_if_fail (db, NULL);
+
+    device = db_get_device (db);
+    g_return_val_if_fail (device, NULL);
+
+    return device->mountpoint;
+}
+
+
+
+/*------------------------------------------------------------------*\
+ *                                                                  *
+ *             Create iPod directory hierarchy                      *
+ *                                                                  *
+\*------------------------------------------------------------------*/
+static gboolean itdb_create_directories (Itdb_Device *device, GError **error)
+{
+    const gchar *mp;
+    gboolean result;
+    gchar *pbuf;
+    gint i, dirnum;
+    Itdb_IpodInfo const *info = NULL;
+    gboolean calconnotes, devicefile;
+    gchar *podpath;
+
+    g_return_val_if_fail (device, FALSE);
+
+    mp = device->mountpoint;
+    g_return_val_if_fail (mp, FALSE);
+
+    /* Retrieve the model from the device information */
+    info = itdb_device_get_ipod_info(device);
+
+    /* Set up special treatment for shuffle and mobile */
+    switch(info->ipod_model)
+    {
+    case ITDB_IPOD_MODEL_SHUFFLE:
+	podpath = g_strdup ("iPod_Control");
+	calconnotes = FALSE;
+	devicefile = TRUE;
+	break;
+    case ITDB_IPOD_MODEL_MOBILE_1:
+	podpath = g_build_filename ("iTunes", "iTunes_Control", NULL);
+	calconnotes = FALSE;
+	devicefile = TRUE;
+	break;
+    case ITDB_IPOD_MODEL_IPHONE_1:
+	podpath = g_strdup ("iTunes_Control");
+	calconnotes = FALSE;
+	devicefile = TRUE;
+	break;
+    case ITDB_IPOD_MODEL_TOUCH_BLACK:
+	podpath = g_strdup ("iTunes_Control");
+	calconnotes = FALSE;
+	devicefile = TRUE;
+	break;
+    case ITDB_IPOD_MODEL_UNKNOWN:
+	podpath = g_strdup ("iPod_Control");
+	calconnotes = TRUE;
+	devicefile = TRUE;
+	break;
+    default:
+	podpath = g_strdup ("iPod_Control");
+	calconnotes = TRUE;
+	devicefile = TRUE;
+	break;
+    }
+
+    /* Construct the Control directory */
+    pbuf = g_build_filename (mp, podpath, NULL);
+    if (!g_file_test (pbuf, G_FILE_TEST_EXISTS))
+    {
+	if (g_mkdir_with_parents(pbuf, 0777) != 0)
+	{
+	    goto error_dir;
+	}
+    }
+    g_free (pbuf);
+
+    /* Construct the Music directory inside the Control directory */
+    pbuf = g_build_filename (mp, podpath, "Music", NULL);
+    if (!g_file_test (pbuf, G_FILE_TEST_EXISTS))
+    {
+	if((g_mkdir(pbuf, 0777) != 0))
+	{
+	    goto error_dir;
+	}
+    }
+    g_free (pbuf);
+
+    /* Construct the iTunes directory inside the Control directory */
+    pbuf = g_build_filename (mp, podpath, "iTunes", NULL);
+    if (!g_file_test (pbuf, G_FILE_TEST_EXISTS))
+    {
+	if((g_mkdir(pbuf, 0777) != 0))
+	{
+	    goto error_dir;
+	}
+    }
+    g_free (pbuf);
+
+    /* Build Artwork directory only for devices requiring artwork
+     * (assume that 'unknown models' are new and will support
+     * artwork) */
+    if (itdb_device_supports_artwork(device) ||
+	(info->ipod_model == ITDB_IPOD_MODEL_UNKNOWN))
+    {
+	pbuf = g_build_filename (mp, podpath, "Artwork", NULL);
+	if (!g_file_test (pbuf, G_FILE_TEST_EXISTS))
+	{
+	    if((g_mkdir(pbuf, 0777) != 0)) {
+		goto error_dir;
+	    }
+	}
+	g_free (pbuf);
+    }
+
+    /* Build Photo directory only for devices requiring it */
+    if (itdb_device_supports_photo(device) ||
+	(info->ipod_model == ITDB_IPOD_MODEL_UNKNOWN))
+    {
+	pbuf = g_build_filename (mp, "Photos", "Thumbs", NULL);
+	if (!g_file_test (pbuf, G_FILE_TEST_EXISTS))
+	{
+	    if (g_mkdir_with_parents(pbuf, 0777) != 0)
+	    {
+		goto error_dir;
+	    }
+	}
+	g_free (pbuf);
+    }
+
+    /* Build the directories that hold the music files */
+    dirnum = info->musicdirs;
+    if (dirnum == 0)
+    {
+	guint64 capacity, free_space;
+	if (itdb_device_get_storage_info(device, &capacity, &free_space)) {
+	    gdouble size = ((gdouble)capacity) / 1073741824;
+	    if (size < 20)  dirnum = 20;
+	    else            dirnum = 50;
+	} else {
+	    dirnum = 20;
+	}
+    }
+
+    for(i = 0; i < dirnum; i++)
+    {
+	gchar *num = g_strdup_printf ("F%02d", i);
+	pbuf = g_build_filename (mp, podpath, "Music", num, NULL);
+	g_free (num);
+	if (!g_file_test (pbuf, G_FILE_TEST_EXISTS))
+	{
+	    if((g_mkdir(pbuf, 0777) != 0))
+	    {
+		goto error_dir;
+	    }
+	}
+	g_free (pbuf);
+    }
+
+    /* Build Calendar directory for models requiring it */
+    if (calconnotes)
+    {
+	pbuf = g_build_filename (mp, "Calendars", NULL);
+	if (!g_file_test (pbuf, G_FILE_TEST_EXISTS))
+	{
+	    if((g_mkdir(pbuf, 0777) != 0))
+	    {
+		goto error_dir;
+	    }
+	}
+	g_free (pbuf);
+
+	/* Build Contacts directory for models requiring it */
+	pbuf = g_build_filename (mp, "Contacts", NULL);
+	if (!g_file_test (pbuf, G_FILE_TEST_EXISTS))
+	{
+	    if((g_mkdir(pbuf, 0777) != 0))
+	    {
+		goto error_dir;
+	    }
+	}
+	g_free (pbuf);
+
+	pbuf = g_build_filename (mp, "Notes", NULL);
+	if (!g_file_test (pbuf, G_FILE_TEST_EXISTS))
+	{
+	    if((g_mkdir(pbuf, 0777) != 0))
+	    {
+		goto error_dir;
+	    }
+	}
+	g_free (pbuf);
+    }
+
+    /* Construct a Device directory file for special models */
+    if (devicefile)
+    {
+	gchar *model_number;
+
+	pbuf = g_build_filename (mp, podpath, "Device", NULL);
+	if (!g_file_test (pbuf, G_FILE_TEST_EXISTS))
+	{
+	    if((g_mkdir(pbuf, 0777) != 0))
+	    {
+		goto error_dir;
+	    }
+	}
+	g_free (pbuf);
+
+	model_number = itdb_device_get_sysinfo (device, "ModelNumStr");
+	/* Construct a SysInfo file */
+	if (model_number && (strlen (model_number) != 0))
+	{
+	    pbuf = NULL;
+	    if (!itdb_device_write_sysinfo (device, error))
+	    {
+		g_free (model_number);
+		goto error_dir;
+	    }
+	}
+	g_free (model_number);
+    }
+    pbuf = NULL;
+
+  error_dir:
+    if (pbuf)
+    {
+	g_set_error (error, 0, -1,
+		     _("Problem creating iPod directory or file: '%s'."),
+		     pbuf);
+	result = FALSE;
+    } else
+    {
+	result = TRUE;
+    }
+    g_free (pbuf);
+    g_free (podpath);
+    return result;
+}

Added: libgpod/trunk/libgpod/branches/upstream/current/src/itdb_photoalbum.c
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/itdb_photoalbum.c	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/itdb_photoalbum.c	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,833 @@
+/*
+|
+|  Copyright (C) 2002-2006 Jorg Schuler <jcsjcs at users sourceforge net>
+|  Part of the gtkpod project.
+|
+|  URL: http://www.gtkpod.org/
+|  URL: http://gtkpod.sourceforge.net/
+|
+|  The code contained in this file is free software; you can redistribute
+|  it and/or modify it under the terms of the GNU Lesser General Public
+|  License as published by the Free Software Foundation; either version
+|  2.1 of the License, or (at your option) any later version.
+|
+|  This file 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
+|  Lesser General Public License for more details.
+|
+|  You should have received a copy of the GNU Lesser General Public
+|  License along with this code; if not, write to the Free Software
+|  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+|
+|  iTunes and iPod are trademarks of Apple
+|
+|  This product is not supported/written/published by Apple!
+|
+|  $Id: itdb_photoalbum.c 2159 2008-12-08 01:16:58Z tmzullinger $
+*/
+#include <config.h>
+
+#include "itdb_private.h"
+#include "itdb_device.h"
+#include "db-artwork-parser.h"
+#include "db-image-parser.h"
+#include <errno.h>
+#include <stdio.h>
+#include <string.h>
+#include <glib/gi18n-lib.h>
+#include <glib/gstdio.h>
+#ifdef HAVE_GDKPIXBUF
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#endif
+
+/* Short summary:
+
+   itdb_photodb_parse():
+       Read an existing PhotoDB.
+
+   itdb_photodb_create():
+       Create a new Itdb_PhotoDB structure. The Photo Library Album is
+       (first album) is created automatically.
+
+   itdb_photodb_add_photo(), itdb_photodb_add_photo_from_data():
+       Add a photo to the PhotoDB (from file or from a chunk of
+       memory). It is automatically added to the Photo Library Album
+       (first album), which is created if it does not exist already.
+
+   itdb_photodb_photoalbum_create():
+       Create and add a new photoalbum.
+
+   itdb_photodb_photoalbum_add_photo():
+       Add a photo (Itdb_Artwork) to an existing photoalbum.
+
+   itdb_photodb_photoalbum_remove():
+       Remove an existing photoalbum. Pictures can be kept in the
+       Photo Library or automatically removed as well.
+
+   itdb_photodb_remove_photo():
+       Remove a photo either from a photoalbum or completely from the database.
+
+   itdb_photodb_write():
+       Write out your PhotoDB.
+
+   itdb_photodb_free():
+       Free all memory taken by the PhotoDB.
+
+   itdb_photodb_photoalbum_by_name():
+       Find the first photoalbum with a given name or the Photo
+       Library Album if called with no name.
+
+
+   If you cannot add photos because your iPod is not recognized, you
+   may have to set the iPod model by calling
+
+   itdb_device_set_sysinfo (db->device, "ModelNumStr", model);
+
+   For example, "MA450" would stand for an 80 GB 6th generation iPod
+   Video. See itdb_device.c for a list of supported models.
+
+   This information will be written to the iPod when the PhotoDB is
+   saved (itdb_device_write_sysinfo() is called).
+*/
+
+
+static Itdb_PhotoDB *itdb_photodb_new (void);
+static void itdb_photodb_photoalbum_free (Itdb_PhotoAlbum *pa);
+
+/* Set @error with standard error message */
+static void error_no_photos_dir (const gchar *mp, GError **error)
+{
+    gchar *str;
+
+    g_return_if_fail (mp);
+
+    if (error)
+    {
+	str = g_build_filename (mp, "iPod_Control", "Photos", NULL);
+	g_set_error (error,
+		     ITDB_FILE_ERROR,
+		     ITDB_FILE_ERROR_NOTFOUND,
+		     _("Photos directory not found: '%s' (or similar)."),
+		     str);
+	g_free (str);
+    }
+}
+
+/**
+ * itdb_get_photos_dir:
+ * @mountpoint: mountpoint of iPod
+ *
+ * Retrieve the Photo directory by
+ * first calling itdb_get_control_dir() and then adding 'Photos'
+ *
+ * Returns: path to the Artwork directory or NULL if
+ * non-existent. Must g_free() after use.
+ *
+ * Since: 0.4.0
+ */
+gchar *itdb_get_photos_dir (const gchar *mountpoint)
+{
+    gchar *p_ipod[] = {"Photos", NULL};
+    /* Use an array with all possibilities, so further extension will
+       be easy */
+    gchar **paths[] = {p_ipod, NULL};
+    gchar ***ptr;
+    gchar *result = NULL;
+
+    g_return_val_if_fail (mountpoint, NULL);
+
+    for (ptr=paths; *ptr && !result; ++ptr)
+    {
+        g_free (result);
+	result = itdb_resolve_path (mountpoint, (const gchar **)*ptr);
+    }
+    return result;
+}
+
+/**
+ * itdb_get_photodb_path:
+ * @mountpoint: the iPod mountpoint
+ *
+ * Retrieve a path to the Photo DB
+ *
+ * Returns: path to the PhotoDB or NULL if non-existent. Must
+ * g_free() after use.
+ *
+ * Since: 0.4.0
+ */
+gchar *itdb_get_photodb_path (const gchar *mountpoint)
+{
+    gchar *photo_dir, *path=NULL;
+
+    g_return_val_if_fail (mountpoint, NULL);
+
+    photo_dir = itdb_get_photos_dir (mountpoint);
+
+    if (photo_dir)
+    {
+	path = itdb_get_path (photo_dir, "Photo Database");
+	g_free (photo_dir);
+    }
+
+    return path;
+}
+
+/**
+ * itdb_get_photos_thumb_dir:
+ * @mountpoint: the iPod mountpoint
+ *
+ * Retrieve the Photo Thumbnail directory by
+ * first calling itdb_get_control_dir() and then adding 'Photos/Thumbs'
+ *
+ * Returns: path to the Artwork directory or NULL if
+ * non-existent. Must g_free() after use.
+ *
+ * Since: 0.4.0
+ */
+gchar *itdb_get_photos_thumb_dir (const gchar *mountpoint)
+{
+    gchar *control_dir;
+    gchar *result = NULL;
+    gchar *dir = "Thumbs";
+
+    g_return_val_if_fail (mountpoint, NULL);
+    g_return_val_if_fail (dir, NULL);
+
+    control_dir = itdb_get_photos_dir (mountpoint);
+    if (control_dir)
+    {
+	const gchar *p_dir[] = {NULL, NULL};
+	p_dir[0] = dir;
+	result = itdb_resolve_path (control_dir, p_dir);
+	g_free (control_dir);
+    }
+    return result;
+}
+
+/**
+ * itdb_photodb_parse:
+ * @mp:     mountpoint of the iPod
+ * @error:  will contain the error description when an error occured.
+ *
+ * Parses the photo database of an iPod mounted at @mp.
+ *
+ * Returns: the imported PhotoDB or NULL in case of an error.
+ *
+ * Since: 0.4.0
+ */
+Itdb_PhotoDB *itdb_photodb_parse (const gchar *mp, GError **error)
+{
+    gchar *photos_dir;
+    Itdb_PhotoDB *photodb = NULL;
+
+    photos_dir = itdb_get_photos_dir (mp);
+
+    if (!photos_dir)
+    {
+	error_no_photos_dir (mp, error);
+	return NULL;
+    }
+    g_free (photos_dir);
+
+    photodb = itdb_photodb_new ();
+    itdb_device_set_mountpoint (photodb->device, mp);
+    ipod_parse_photo_db (photodb);
+
+    /* if photodb is empty, create a valid photodb including the main
+       Photo Library album */
+    if (!photodb->photos && !photodb->photoalbums)
+    {
+	itdb_photodb_free (photodb);
+	photodb = itdb_photodb_create (mp);
+    }
+
+    return photodb;
+}
+
+/**
+ * itdb_photodb_create:
+ * @mountpoint: mountpoint or NULL.
+ *
+ * Creates a new Itdb_PhotoDB. If mountpoint is NULL, you will have to
+ * set it manually later by calling itdb_device_set_mountpoint().
+ *
+ * Returns: a newly created Itdb_PhotoDB to be freed with
+ * itdb_photodb_free() when it's no longer needed. The Photo Library
+ * Album is created automatically.
+ *
+ * Since: 0.4.2
+ */
+Itdb_PhotoDB *itdb_photodb_create (const gchar *mountpoint)
+{
+    Itdb_PhotoDB *photodb = itdb_photodb_new ();
+    Itdb_PhotoAlbum *album;
+
+    album = itdb_photodb_photoalbum_create (photodb, _("Photo Library"), -1);
+    album->album_type = 1; /* Photo Library */
+
+    if (mountpoint)
+    {
+	itdb_device_set_mountpoint (photodb->device, mountpoint);
+    }
+
+    return photodb;
+}
+
+
+static Itdb_PhotoDB *itdb_photodb_new (void)
+{
+    Itdb_PhotoDB *photodb;
+
+    photodb = g_new0 (Itdb_PhotoDB, 1);
+    photodb->device = itdb_device_new ();
+
+    return photodb;
+}
+
+/**
+ * itdb_photodb_free:
+ * @photodb: an #Itdb_PhotoDB
+ *
+ * Free the memory taken by @photodb.
+ *
+ * Since: 0.4.0
+ */
+void itdb_photodb_free (Itdb_PhotoDB *photodb)
+{
+	if (photodb)
+	{
+		g_list_foreach (photodb->photoalbums,
+				(GFunc)(itdb_photodb_photoalbum_free), NULL);
+		g_list_free (photodb->photoalbums);
+		g_list_foreach (photodb->photos,
+				(GFunc)(itdb_artwork_free), NULL);
+		g_list_free (photodb->photos);
+		itdb_device_free (photodb->device);
+
+		if (photodb->userdata && photodb->userdata_destroy)
+		    (*photodb->userdata_destroy) (photodb->userdata);
+
+		g_free (photodb);
+	}
+}
+
+
+
+
+G_GNUC_INTERNAL gint itdb_get_max_photo_id ( Itdb_PhotoDB *db )
+{
+	gint max_seen_id = 0;
+	GList *it;
+
+	for (it = db->photos; it != NULL; it = it->next) {
+		Itdb_Artwork *artwork;
+
+		artwork = (Itdb_Artwork *)it->data;
+		if( artwork->id > max_seen_id )
+			max_seen_id = artwork->id;
+	}
+        for (it = db->photoalbums; it != NULL; it = it->next) {
+		Itdb_PhotoAlbum *album;
+		album = (Itdb_PhotoAlbum *)it->data;
+		if ( album->album_id > max_seen_id )
+			max_seen_id = album->album_id;
+		
+	}
+	return max_seen_id;
+}
+
+static void itdb_photodb_photoalbum_free (Itdb_PhotoAlbum *album)
+{
+    if (album)
+    {
+	album->photodb = NULL;
+	g_free (album->name);
+	g_list_free (album->members);
+
+	if (album->userdata && album->userdata_destroy)
+	    (*album->userdata_destroy) (album->userdata);
+
+	g_free (album);
+    }
+}
+
+
+/* called by itdb_photodb_add_photo() and
+   itdb_photodb_add_photo_from_data() */
+static Itdb_Artwork *itdb_photodb_add_photo_internal (Itdb_PhotoDB *db,
+						      const gchar *filename,
+						      const guchar *image_data,
+						      gsize image_data_len,
+						      gpointer pixbuf,
+						      gint position,
+						      gint rotation,
+						      GError **error)
+{
+#ifdef HAVE_GDKPIXBUF
+    gboolean result=FALSE;
+    Itdb_Artwork *artwork;
+    Itdb_PhotoAlbum *album;
+
+    g_return_val_if_fail (db, NULL);
+    g_return_val_if_fail (db->device, NULL);
+    g_return_val_if_fail (filename || image_data, NULL);
+    g_return_val_if_fail (!(image_data && (image_data_len == 0)), NULL);
+    g_return_val_if_fail (!(pixbuf && (!GDK_IS_PIXBUF (pixbuf))), NULL);
+
+    if (!itdb_device_supports_photo (db->device))
+    {
+	const Itdb_IpodInfo *ipodinfo = itdb_device_get_ipod_info (db->device);
+	const gchar *model, *generation;
+
+	if (!ipodinfo)
+	{
+	    g_set_error (error, 0, -1,
+			 _("You need to specify the iPod model used before photos can be added."));
+	    return NULL;
+	    /* For information: The model is set by calling the rather
+	       unintuitive function itdb_device_set_sysinfo as
+	       follows:
+
+	       itdb_device_set_sysinfo (db->device, "ModelNumStr", model);
+
+	       For example, "MA450" would stand for an 80 GB 6th
+	       generation iPod Video. See itdb_device.c for a list of
+	       supported models.
+
+	       This information will be written to the iPod when the
+	       PhotoDB is saved (itdb_device_write_sysinfo() is called).
+	    */
+	}
+
+	model = itdb_info_get_ipod_model_name_string (ipodinfo->ipod_model);
+	generation = itdb_info_get_ipod_generation_string (ipodinfo->ipod_generation);
+	g_return_val_if_fail (model && generation, NULL);
+	g_set_error (error, 0, -1,
+		     _("Your iPod does not seem to support photos. Maybe you need to specify the correct iPod model number? It is currently set to 'x%s' (%s/%s)."),
+		     ipodinfo->model_number, generation, model);
+	return NULL;
+    }
+
+    /* check if filename is valid */
+    if (filename)
+    {
+	struct stat statbuf;
+	if (g_stat  (filename, &statbuf) != 0)
+	{
+	    g_set_error (error, 0, -1,
+			 _("Could not access file '%s'. Photo not added."),
+			 filename);
+	    return NULL;
+	}
+    }
+
+    artwork = itdb_artwork_new ();
+
+    if (filename)
+    {
+        result = itdb_artwork_set_thumbnail (artwork, filename,
+                                             rotation, error);
+    }
+    if (image_data)
+    {
+        result = itdb_artwork_set_thumbnail_from_data (artwork, image_data,
+                                                       image_data_len,
+                                                       rotation, error);
+    }
+    if (pixbuf) 
+    {
+        result = itdb_artwork_set_thumbnail_from_pixbuf (artwork, pixbuf,
+                                                         rotation, error);
+    }
+
+    if (result != TRUE)
+    {
+	itdb_artwork_free (artwork);
+	g_set_error (error, 0, -1,
+		     _("Unexpected error in itdb_photodb_add_photo_internal() while adding photo, please report."));
+	return NULL;
+    }
+
+    /* Add artwork to the list of photos */
+    /* (it would be sufficient to append to the end) */
+    db->photos = g_list_insert (db->photos, artwork, position);
+
+    /* Add artwork to the first album */
+    album = itdb_photodb_photoalbum_by_name (db, NULL);
+    if (!album)
+    {
+	album = itdb_photodb_photoalbum_create (db, _("Photo Library"), -1);
+	album->album_type = 1; /* Photo Library */
+    }
+    itdb_photodb_photoalbum_add_photo (db, album, artwork, position);
+
+    return artwork;
+#else
+    g_set_error (error, 0, -1,
+		 _("Library compiled without gdk-pixbuf support. Picture support is disabled."));
+    return NULL;
+#endif
+}
+
+/**
+ * itdb_photodb_add_photo:
+ * @db:         the #Itdb_PhotoDB to add the photo to
+ * @filename:   path of the photo to add.
+ * @position:   position where to insert the new photo (-1 to append
+ *              at the end)
+ * @rotation:   angle by which the image should be rotated
+ *              counterclockwise. Valid values are 0, 90, 180 and 270.
+ * @error:      return location for a #GError or NULL
+ *
+ * Add a photo to the PhotoDB. The photo is automatically added to the
+ * first Photoalbum, which by default contains a list of all photos in
+ * the database. If no Photoalbums exist one is created automatically.
+ *
+ * For the rotation angle you can also use the gdk constants
+ * %GDK_PIXBUF_ROTATE_NONE, %GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE,
+ * %GDK_PIXBUF_ROTATE_UPSIDEDOWN, AND %GDK_PIXBUF_ROTATE_CLOCKWISE.
+ *
+ * Returns: a pointer to the added photo.
+ *
+ * Since: 0.4.0
+ */
+Itdb_Artwork *itdb_photodb_add_photo (Itdb_PhotoDB *db,
+				      const gchar *filename,
+				      gint position,
+				      gint rotation,
+				      GError **error)
+{
+    g_return_val_if_fail (db, FALSE);
+    g_return_val_if_fail (filename, FALSE);
+
+    return itdb_photodb_add_photo_internal (db, filename, NULL, 0, NULL,
+					    position, rotation, error);
+}
+
+/**
+ * itdb_photodb_add_photo_from_data:
+ * @db:             the #Itdb_PhotoDB to add the photo to
+ * @image_data:     chunk of memory containing the image data (for
+ *                  example a jpg file)
+ * @image_data_len: length of above chunk of memory
+ * @position:       position where to insert the new photo (-1 to
+ *                  append at the end)
+ * @rotation:       angle by which the image should be rotated
+ *                  counterclockwise. Valid values are 0, 90, 180 and 270.
+ * @error:          return location for a #GError or NULL
+ *
+ * Add a photo to the PhotoDB. The photo is automatically added to the
+ * first Photoalbum, which by default contains a list of all photos in
+ * the database. If no Photoalbums exist one is created automatically.
+ *
+ * For the rotation angle you can also use the gdk constants
+ * %GDK_PIXBUF_ROTATE_NONE, %GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE,
+ * %GDK_PIXBUF_ROTATE_UPSIDEDOWN, AND %GDK_PIXBUF_ROTATE_CLOCKWISE.
+ *
+ * Returns: a pointer to the added photo.
+ *
+ * Since: 0.4.0
+ */
+Itdb_Artwork *itdb_photodb_add_photo_from_data (Itdb_PhotoDB *db,
+						const guchar *image_data,
+						gsize image_data_len,
+						gint position,
+						gint rotation,
+						GError **error)
+{
+    g_return_val_if_fail (db, FALSE);
+    g_return_val_if_fail (image_data, FALSE);
+
+    return itdb_photodb_add_photo_internal (db, NULL, 
+					    image_data, image_data_len,
+					    NULL, position, rotation, error);
+}
+
+/**
+ * itdb_photodb_add_photo_from_pixbuf:
+ * @db:         the #Itdb_PhotoDB to add the photo to
+ * @pixbuf:     a #GdkPixbuf to use as the image data
+ * @position:   position where to insert the new photo (-1 to append
+ *              at the end)
+ * @rotation:   angle by which the image should be rotated
+ *              counterclockwise. Valid values are 0, 90, 180 and 270.
+ * @error:      return location for a #GError or NULL
+ *
+ * Add a photo to the PhotoDB. The photo is automatically added to the
+ * first Photoalbum, which by default contains a list of all photos in
+ * the database. If no Photoalbums exist one is created automatically.
+ *
+ * For the rotation angle you can also use the gdk constants
+ * %GDK_PIXBUF_ROTATE_NONE, %GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE,
+ * %GDK_PIXBUF_ROTATE_UPSIDEDOWN, AND %GDK_PIXBUF_ROTATE_CLOCKWISE.
+ *
+ * Returns: a pointer to the added photo.
+ *
+ * Since: 0.5.0
+ */
+Itdb_Artwork *itdb_photodb_add_photo_from_pixbuf (Itdb_PhotoDB *db,
+						  gpointer pixbuf,
+						  gint position,
+						  gint rotation,
+						  GError **error)
+{
+    g_return_val_if_fail (db, FALSE);
+    g_return_val_if_fail (pixbuf, FALSE);
+
+    return itdb_photodb_add_photo_internal (db, NULL, NULL, 0, pixbuf,
+					    position, rotation, error);
+}
+
+/**
+ * itdb_photodb_remove_photo:
+ * @db:     the #Itdb_PhotoDB to remove the photo from
+ * @album:  the album to remove the photo from. If album is NULL, then
+ *          it will first be removed from all photoalbums and then
+ *          from the photo database as well.
+ * @photo:  #Itdb_Artwork (photo) to remove.
+ *
+ * Removes a photo. If @album is not the first photoalbum, the photo
+ * will be removed from that album only. If @album is NULL or the
+ * first photoalbum (Photo Library), the photo will be removed from
+ * all albums and the #Itdb_PhotoDB.
+ *
+ * <note>
+ * @photo will be freed and can no longer be used if removed from the
+ * first photoalbum.
+ * </note>
+ *
+ * Since: 0.4.0
+ */
+void itdb_photodb_remove_photo (Itdb_PhotoDB *db,
+				Itdb_PhotoAlbum *album,
+				Itdb_Artwork *photo)
+{
+    GList *it;
+
+    g_return_if_fail (db);
+
+    /* If album==NULL, or album is the master album, remove from all
+     * albums */
+    if ((album == NULL) || (album == g_list_nth_data (db->photoalbums, 0)))
+    {
+        /* Remove the photo from any albums containing it */
+        for (it = db->photoalbums; it != NULL; it = it->next)
+	{
+            Itdb_PhotoAlbum *_album = it->data;
+            _album->members = g_list_remove_all (_album->members, photo);
+        }
+        /* Remove the photo from the image list */
+	db->photos = g_list_remove (db->photos, photo);
+	/* Free the photo */
+	itdb_artwork_free (photo);
+    }
+    /* If album is specified, only remove it from that album */
+    else
+    {
+        album->members = g_list_remove (album->members, photo);
+    }
+}
+
+/**
+ * itdb_photodb_photoalbum_by_name:
+ * @db:         the #Itdb_PhotoDB to retrieve the album from
+ * @albumname:  the name of the photoalbum to get or NULL for the
+ *              master photoalbum.
+ *
+ * Find the first photoalbum with a given name or the Photo Library
+ * Album if called with no name.
+ *
+ * Returns: a pointer to the first photoalbum named @albumname,
+ * else NULL
+ *
+ * Since: 0.4.2
+ */
+Itdb_PhotoAlbum *itdb_photodb_photoalbum_by_name (Itdb_PhotoDB *db, const gchar *albumname)
+{
+	GList *it;
+
+	if( albumname == NULL )
+	    return g_list_nth_data (db->photoalbums, 0);
+
+	for (it = db->photoalbums; it != NULL; it = it->next) {
+		Itdb_PhotoAlbum *album;
+
+		album = (Itdb_PhotoAlbum *)it->data;
+		if( strcmp(album->name, albumname) == 0 )
+			return album;
+	}
+	return NULL;
+}
+
+/**
+ * itdb_photodb_photoalbum_remove:
+ * @db:             the #Itdb_PhotoDB to apply changes to
+ * @album:          the album to be removed from the database
+ * @remove_pics:    TRUE to remove pics in that album permanently
+ *                  from the database.
+ *
+ * Remove @album from the Photo Database. If @remove_pics is TRUE,
+ * remove all photos contained in @album from the Photo Database.
+ *
+ * <note>
+ * Memory used by the removed album will be freed and the album cannot
+ * be accessed any more.
+ * </note>
+ *
+ * Since: 0.4.2
+ */
+void itdb_photodb_photoalbum_remove (Itdb_PhotoDB *db,
+				     Itdb_PhotoAlbum *album,
+				     gboolean remove_pics)
+{
+        g_return_if_fail (db);
+        g_return_if_fail (album);
+
+        /* if remove_pics, iterate over the photos within that album
+	 * and remove them from the database */
+        if (remove_pics)
+	{
+	    /* we can't iterate over album->members because
+	       itdb_photodb_remove_photo() modifies album->members in
+	       a not easily predicable way (e.g. @photo may exist in the
+	       album several times). Therefore we remove photos until
+	       album->members is empty. */
+	    while (album->members)
+	    {
+		Itdb_Artwork *photo = album->members->data;
+		itdb_photodb_remove_photo (db, NULL, photo);
+	    }
+        }
+        db->photoalbums = g_list_remove (db->photoalbums, album);
+	itdb_photodb_photoalbum_free (album);
+}
+
+/**
+ * itdb_photodb_photoalbum_add_photo:
+ * @db:         the #Itdb_PhotoDB to act on
+ * @album:      the #Itdb_PhotoAlbum to add the photo to
+ * @photo:      a pointer to the photo (#Itdb_Artwork) to add to the
+ *              album
+ * @position:   position where to insert the new photo (-1 to append
+ *              at the end)
+ *
+ * Adds a photo already in the library to the specified album
+ * @album. Photos are automatically added to the first album (Photo
+ * Library) when calling itdb_photodb_add_photo() or
+ * itdb_photodb_add_photo_from_data(), so you don't have to use this
+ * function to add them there.
+ *
+ * Since: 0.4.2
+ */
+void itdb_photodb_photoalbum_add_photo (Itdb_PhotoDB *db,
+					Itdb_PhotoAlbum *album,
+					Itdb_Artwork *photo,
+					gint position)
+{
+    g_return_if_fail (db);
+    g_return_if_fail (album);
+    g_return_if_fail (photo);
+
+    album->members = g_list_insert (album->members, photo, position);
+}
+
+/**
+ * itdb_photodb_photoalbum_create:
+ * @db:         The database to create a new album in
+ * @albumname:  the name of the new album
+ * @pos:        position where to insert the newly created album (-1
+ *              to append at the end).
+ *
+ * Create and add a new photoalbum.
+ *
+ * Returns: the album which was created and added.
+ *
+ * Since: 0.4.2
+ */
+Itdb_PhotoAlbum *itdb_photodb_photoalbum_create (Itdb_PhotoDB *db,
+						 const gchar *albumname,
+						 gint pos)
+{
+	Itdb_PhotoAlbum *album;
+
+	g_return_val_if_fail (db, NULL);
+	g_return_val_if_fail (albumname, NULL);
+
+	album = g_new0 (Itdb_PhotoAlbum, 1);
+	album->album_type = 2; /* normal album, set to 1 for Photo Library */
+	album->photodb = db;
+	album->name = g_strdup(albumname);
+	db->photoalbums = g_list_insert (db->photoalbums, album, pos);
+
+	return album;
+}
+
+/**
+ * itdb_photodb_write:
+ * @photodb:    the #Itdb_PhotoDB to write to disk
+ * @error:      return location for a #GError or NULL
+ *
+ * Write out a PhotoDB.
+ *
+ * FIXME: error is not set yet.
+ *
+ * Returns: TRUE on success, FALSE on error, in which case @error is
+ * set accordingly.
+ *
+ * Since: 0.4.0
+ */
+gboolean itdb_photodb_write (Itdb_PhotoDB *photodb, GError **error)
+{
+    gint result;
+    GList *gl;
+    gint32 id, prev_id;
+
+    g_return_val_if_fail (photodb, FALSE);
+    g_return_val_if_fail (photodb->device, FALSE);
+
+    if (photodb->device->byte_order == 0)
+	itdb_device_autodetect_endianess (photodb->device);
+
+    /* set up photo_ids */
+    id = 0x40;
+    for (gl=photodb->photos; gl; gl=gl->next)
+    {
+	Itdb_Artwork *photo = gl->data;
+	g_return_val_if_fail (photo, FALSE);
+	photo->id = id;
+	++id;
+    }
+    /* set up album_ids -- this is how my iPod Nano does it... */
+    prev_id = 0x64;
+    id = prev_id + g_list_length (photodb->photos);
+    for (gl=photodb->photoalbums; gl; gl=gl->next)
+    {
+	Itdb_PhotoAlbum *album = gl->data;
+	g_return_val_if_fail (album, FALSE);
+	album->album_id = id;
+	album->prev_album_id = prev_id;
+	++id;
+	++prev_id;
+	if (gl != photodb->photoalbums)
+	{   /* except for the first album */
+	    prev_id += g_list_length (album->members);
+	}
+    }
+
+    result = ipod_write_photo_db (photodb);
+
+    /* Write SysInfo file if it has changed */
+    if (!error || !(*error))
+    {
+	if (photodb->device->sysinfo_changed)
+	{
+	    itdb_device_write_sysinfo (photodb->device, error);
+	}
+    }
+
+    if (result == -1)
+	return FALSE;
+    else
+	return TRUE;
+}

Added: libgpod/trunk/libgpod/branches/upstream/current/src/itdb_playlist.c
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/itdb_playlist.c	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/itdb_playlist.c	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,1680 @@
+/*
+|  Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
+|  Part of the gtkpod project.
+|
+|  URL: http://www.gtkpod.org/
+|  URL: http://gtkpod.sourceforge.net/
+|
+|  The code contained in this file is free software; you can redistribute
+|  it and/or modify it under the terms of the GNU Lesser General Public
+|  License as published by the Free Software Foundation; either version
+|  2.1 of the License, or (at your option) any later version.
+|
+|  This file 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
+|  Lesser General Public License for more details.
+|
+|  You should have received a copy of the GNU Lesser General Public
+|  License along with this code; if not, write to the Free Software
+|  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+|
+|  iTunes and iPod are trademarks of Apple
+|
+|  This product is not supported/written/published by Apple!
+|
+|  $Id: itdb_playlist.c 2159 2008-12-08 01:16:58Z tmzullinger $
+*/
+
+#include "itdb_private.h"
+#include <glib/gi18n-lib.h>
+#include <string.h>
+
+/* spl_action_known(), itb_splr_get_field_type(),
+ * itb_splr_get_action_type() are adapted from source provided by
+ * Samuel "Otto" Wood (sam dot wood at gmail dot com). These part can
+ * also be used under a FreeBSD license. You may also contact Samuel
+ * for a complete copy of his original C++-classes.
+ * */
+
+/**
+ * itdb_spl_action_known:
+ * @action: an #ItdbSPLAction
+ *
+ * Checks if @action is a known (to libgpod) smart playlist action.
+ *
+ * Returns: TRUE if @action is known. Otherwise a warning is
+ * displayed and FALSE is returned.
+ */
+gboolean itdb_spl_action_known (ItdbSPLAction action)
+{
+    gboolean result = FALSE;
+
+    switch (action)
+    {
+    case ITDB_SPLACTION_IS_INT:
+    case ITDB_SPLACTION_IS_GREATER_THAN:
+    case ITDB_SPLACTION_IS_NOT_GREATER_THAN:
+    case ITDB_SPLACTION_IS_LESS_THAN:
+    case ITDB_SPLACTION_IS_NOT_LESS_THAN:
+    case ITDB_SPLACTION_IS_IN_THE_RANGE:
+    case ITDB_SPLACTION_IS_NOT_IN_THE_RANGE:
+    case ITDB_SPLACTION_IS_IN_THE_LAST:
+    case ITDB_SPLACTION_IS_STRING:
+    case ITDB_SPLACTION_CONTAINS:
+    case ITDB_SPLACTION_STARTS_WITH:
+    case ITDB_SPLACTION_DOES_NOT_START_WITH:
+    case ITDB_SPLACTION_ENDS_WITH:
+    case ITDB_SPLACTION_DOES_NOT_END_WITH:
+    case ITDB_SPLACTION_IS_NOT_INT:
+    case ITDB_SPLACTION_IS_NOT_IN_THE_LAST:
+    case ITDB_SPLACTION_IS_NOT:
+    case ITDB_SPLACTION_DOES_NOT_CONTAIN:
+    case ITDB_SPLACTION_BINARY_AND:
+	result = TRUE;
+    }
+    if (result == FALSE)
+    {	/* New action! */
+	g_warning (_("Unknown action (%d) in smart playlist will be ignored.\n"), action);
+    }
+    return result;
+}
+
+/**
+ * itdb_splr_get_field_type:
+ * @splr: an #Itdb_SPLRule
+ *
+ * Gets the type of the field of the @splr rule
+ *
+ * Returns: an #Itdb_SPLFieldType corresponding to @splr field
+ * type (string, int, date, ...)
+ */
+ItdbSPLFieldType itdb_splr_get_field_type (const Itdb_SPLRule *splr)
+{
+    g_return_val_if_fail (splr != NULL, ITDB_SPLFT_UNKNOWN);
+
+    switch((ItdbSPLField)splr->field)
+    {
+    case ITDB_SPLFIELD_SONG_NAME:
+    case ITDB_SPLFIELD_ALBUM:
+    case ITDB_SPLFIELD_ALBUMARTIST:
+    case ITDB_SPLFIELD_ARTIST:
+    case ITDB_SPLFIELD_GENRE:
+    case ITDB_SPLFIELD_KIND:
+    case ITDB_SPLFIELD_COMMENT:
+    case ITDB_SPLFIELD_COMPOSER:
+    case ITDB_SPLFIELD_GROUPING:
+    case ITDB_SPLFIELD_TVSHOW:
+	return ITDB_SPLFT_STRING;
+    case ITDB_SPLFIELD_BITRATE:
+    case ITDB_SPLFIELD_SAMPLE_RATE:
+    case ITDB_SPLFIELD_YEAR:
+    case ITDB_SPLFIELD_TRACKNUMBER:
+    case ITDB_SPLFIELD_SIZE:
+    case ITDB_SPLFIELD_PLAYCOUNT:
+    case ITDB_SPLFIELD_DISC_NUMBER:
+    case ITDB_SPLFIELD_BPM:
+    case ITDB_SPLFIELD_RATING:
+    case ITDB_SPLFIELD_TIME: /* time is the length of the track in
+			   milliseconds */
+    case ITDB_SPLFIELD_SEASON_NR:
+    case ITDB_SPLFIELD_SKIPCOUNT:
+	return ITDB_SPLFT_INT;
+    case ITDB_SPLFIELD_COMPILATION:
+	return ITDB_SPLFT_BOOLEAN;
+    case ITDB_SPLFIELD_DATE_MODIFIED:
+    case ITDB_SPLFIELD_DATE_ADDED:
+    case ITDB_SPLFIELD_LAST_PLAYED:
+    case ITDB_SPLFIELD_LAST_SKIPPED:
+	return ITDB_SPLFT_DATE;
+    case ITDB_SPLFIELD_PLAYLIST:
+	return ITDB_SPLFT_PLAYLIST;
+    case ITDB_SPLFIELD_VIDEO_KIND:
+	return ITDB_SPLFT_BINARY_AND;
+    }
+    return(ITDB_SPLFT_UNKNOWN);
+}
+
+/**
+ * itdb_splr_get_action_type:
+ * @splr: an #Itdb_SPLRule
+ *
+ * Gets the type of the action associated with @splr.
+ *
+ * Returns: type (range, date, string...) of the action field
+ */
+ItdbSPLActionType itdb_splr_get_action_type (const Itdb_SPLRule *splr)
+{
+    ItdbSPLFieldType fieldType;
+
+    g_return_val_if_fail (splr != NULL, ITDB_SPLAT_INVALID);
+
+    fieldType = itdb_splr_get_field_type (splr);
+
+    switch(fieldType)
+    {
+    case ITDB_SPLFT_STRING:
+	switch ((ItdbSPLAction)splr->action)
+	{
+	case ITDB_SPLACTION_IS_STRING:
+	case ITDB_SPLACTION_IS_NOT:
+	case ITDB_SPLACTION_CONTAINS:
+	case ITDB_SPLACTION_DOES_NOT_CONTAIN:
+	case ITDB_SPLACTION_STARTS_WITH:
+	case ITDB_SPLACTION_DOES_NOT_START_WITH:
+	case ITDB_SPLACTION_ENDS_WITH:
+	case ITDB_SPLACTION_DOES_NOT_END_WITH:
+	    return ITDB_SPLAT_STRING;
+	case ITDB_SPLACTION_IS_NOT_IN_THE_RANGE:
+	case ITDB_SPLACTION_IS_INT:
+	case ITDB_SPLACTION_IS_NOT_INT:
+	case ITDB_SPLACTION_IS_GREATER_THAN:
+	case ITDB_SPLACTION_IS_NOT_GREATER_THAN:
+	case ITDB_SPLACTION_IS_LESS_THAN:
+	case ITDB_SPLACTION_IS_NOT_LESS_THAN:
+	case ITDB_SPLACTION_IS_IN_THE_RANGE:
+	case ITDB_SPLACTION_IS_IN_THE_LAST:
+	case ITDB_SPLACTION_IS_NOT_IN_THE_LAST:
+	case ITDB_SPLACTION_BINARY_AND:
+	    return ITDB_SPLAT_INVALID;
+	}
+	/* Unknown action type */
+	g_warning ("Unknown action type %d\n\n", splr->action);
+	return ITDB_SPLAT_UNKNOWN;
+
+    case ITDB_SPLFT_INT:
+	switch ((ItdbSPLAction)splr->action)
+	{
+	case ITDB_SPLACTION_IS_INT:
+	case ITDB_SPLACTION_IS_NOT_INT:
+	case ITDB_SPLACTION_IS_GREATER_THAN:
+	case ITDB_SPLACTION_IS_NOT_GREATER_THAN:
+	case ITDB_SPLACTION_IS_LESS_THAN:
+	case ITDB_SPLACTION_IS_NOT_LESS_THAN:
+	    return ITDB_SPLAT_INT;
+	case ITDB_SPLACTION_IS_NOT_IN_THE_RANGE:
+	case ITDB_SPLACTION_IS_IN_THE_RANGE:
+	    return ITDB_SPLAT_RANGE_INT;
+	case ITDB_SPLACTION_BINARY_AND:
+	case ITDB_SPLACTION_IS_STRING:
+	case ITDB_SPLACTION_CONTAINS:
+	case ITDB_SPLACTION_STARTS_WITH:
+	case ITDB_SPLACTION_DOES_NOT_START_WITH:
+	case ITDB_SPLACTION_ENDS_WITH:
+	case ITDB_SPLACTION_DOES_NOT_END_WITH:
+	case ITDB_SPLACTION_IS_IN_THE_LAST:
+	case ITDB_SPLACTION_IS_NOT_IN_THE_LAST:
+	case ITDB_SPLACTION_IS_NOT:
+	case ITDB_SPLACTION_DOES_NOT_CONTAIN:
+	    return ITDB_SPLAT_INVALID;
+	}
+	/* Unknown action type */
+	g_warning ("Unknown action type %d\n\n", splr->action);
+	return ITDB_SPLAT_UNKNOWN;
+
+    case ITDB_SPLFT_BOOLEAN:
+	return ITDB_SPLAT_NONE;
+
+    case ITDB_SPLFT_DATE:
+	switch ((ItdbSPLAction)splr->action)
+	{
+	case ITDB_SPLACTION_IS_INT:
+	case ITDB_SPLACTION_IS_NOT_INT:
+	case ITDB_SPLACTION_IS_GREATER_THAN:
+	case ITDB_SPLACTION_IS_NOT_GREATER_THAN:
+	case ITDB_SPLACTION_IS_LESS_THAN:
+	case ITDB_SPLACTION_IS_NOT_LESS_THAN:
+	    return ITDB_SPLAT_DATE;
+	case ITDB_SPLACTION_IS_IN_THE_LAST:
+	case ITDB_SPLACTION_IS_NOT_IN_THE_LAST:
+	    return ITDB_SPLAT_INTHELAST;
+	case ITDB_SPLACTION_IS_IN_THE_RANGE:
+	case ITDB_SPLACTION_IS_NOT_IN_THE_RANGE:
+	    return ITDB_SPLAT_RANGE_DATE;
+	case ITDB_SPLACTION_IS_STRING:
+	case ITDB_SPLACTION_CONTAINS:
+	case ITDB_SPLACTION_STARTS_WITH:
+	case ITDB_SPLACTION_DOES_NOT_START_WITH:
+	case ITDB_SPLACTION_ENDS_WITH:
+	case ITDB_SPLACTION_DOES_NOT_END_WITH:
+	case ITDB_SPLACTION_IS_NOT:
+	case ITDB_SPLACTION_DOES_NOT_CONTAIN:
+	case ITDB_SPLACTION_BINARY_AND:
+	    return ITDB_SPLAT_INVALID;
+	}
+    case ITDB_SPLFT_BINARY_AND:
+	switch ((ItdbSPLAction)splr->action)
+	{
+	case ITDB_SPLACTION_BINARY_AND:
+	    return ITDB_SPLAT_BINARY_AND;
+	case ITDB_SPLACTION_IS_INT:
+	case ITDB_SPLACTION_IS_NOT_INT:
+	case ITDB_SPLACTION_IS_GREATER_THAN:
+	case ITDB_SPLACTION_IS_NOT_GREATER_THAN:
+	case ITDB_SPLACTION_IS_LESS_THAN:
+	case ITDB_SPLACTION_IS_NOT_LESS_THAN:
+	case ITDB_SPLACTION_IS_IN_THE_LAST:
+	case ITDB_SPLACTION_IS_NOT_IN_THE_LAST:
+	case ITDB_SPLACTION_IS_IN_THE_RANGE:
+	case ITDB_SPLACTION_IS_NOT_IN_THE_RANGE:
+	case ITDB_SPLACTION_IS_STRING:
+	case ITDB_SPLACTION_CONTAINS:
+	case ITDB_SPLACTION_STARTS_WITH:
+	case ITDB_SPLACTION_DOES_NOT_START_WITH:
+	case ITDB_SPLACTION_ENDS_WITH:
+	case ITDB_SPLACTION_DOES_NOT_END_WITH:
+	case ITDB_SPLACTION_IS_NOT:
+	case ITDB_SPLACTION_DOES_NOT_CONTAIN:
+	    return ITDB_SPLAT_INVALID;
+	}
+
+	/* Unknown action type */
+	g_warning ("Unknown action type %d\n\n", splr->action);
+	return ITDB_SPLAT_UNKNOWN;
+
+    case ITDB_SPLFT_PLAYLIST:
+	switch ((ItdbSPLAction)splr->action)
+	{
+	case ITDB_SPLACTION_IS_INT:
+	case ITDB_SPLACTION_IS_NOT_INT:
+	    return ITDB_SPLAT_PLAYLIST;
+	case ITDB_SPLACTION_IS_GREATER_THAN:
+	case ITDB_SPLACTION_IS_NOT_GREATER_THAN:
+	case ITDB_SPLACTION_IS_LESS_THAN:
+	case ITDB_SPLACTION_IS_NOT_LESS_THAN:
+	case ITDB_SPLACTION_IS_IN_THE_LAST:
+	case ITDB_SPLACTION_IS_NOT_IN_THE_LAST:
+	case ITDB_SPLACTION_IS_IN_THE_RANGE:
+	case ITDB_SPLACTION_IS_NOT_IN_THE_RANGE:
+	case ITDB_SPLACTION_IS_STRING:
+	case ITDB_SPLACTION_CONTAINS:
+	case ITDB_SPLACTION_STARTS_WITH:
+	case ITDB_SPLACTION_DOES_NOT_START_WITH:
+	case ITDB_SPLACTION_ENDS_WITH:
+	case ITDB_SPLACTION_DOES_NOT_END_WITH:
+	case ITDB_SPLACTION_IS_NOT:
+	case ITDB_SPLACTION_DOES_NOT_CONTAIN:
+	case ITDB_SPLACTION_BINARY_AND:
+	    return ITDB_SPLAT_INVALID;
+	}
+	/* Unknown action type */
+	g_warning ("Unknown action type %d\n\n", splr->action);
+	return ITDB_SPLAT_UNKNOWN;
+
+    case ITDB_SPLFT_UNKNOWN:
+	/* Unknown action type */
+	g_warning ("Unknown action type %d\n\n", splr->action);
+	return ITDB_SPLAT_UNKNOWN;
+    }
+    return ITDB_SPLAT_UNKNOWN;
+}
+
+/* -------------------------------------------------------------------
+ *
+ * smart playlist stuff, adapted from source provided by Samuel "Otto"
+ * Wood (sam dot wood at gmail dot com). This part can also be used
+ * under a FreeBSD license. You can also contact Samuel for a complete
+ * copy of his original C++-classes.
+ *
+ */
+
+/**
+ * itdb_splr_eval:
+ * @splr:   an #Itdb_SPLRule
+ * @track:  an #Itdb_Track
+ *
+ * Evaluates @splr's truth against @track. @track->itdb must be set.
+ *
+ * Returns: TRUE if @track matches @splr, FALSE otherwise.
+ */
+gboolean itdb_splr_eval (Itdb_SPLRule *splr, Itdb_Track *track)
+{
+    ItdbSPLFieldType ft;
+    ItdbSPLActionType at;
+    gchar *strcomp = NULL;
+    gint64 intcomp = 0;
+    gboolean boolcomp = FALSE;
+    gboolean handled = FALSE;
+    guint32 datecomp = 0;
+    Itdb_Playlist *playcomp = NULL;
+    time_t t;
+
+    g_return_val_if_fail (splr, FALSE);
+    g_return_val_if_fail (track, FALSE);
+    g_return_val_if_fail (track->itdb, FALSE);
+
+    ft = itdb_splr_get_field_type (splr);
+    at = itdb_splr_get_action_type (splr);
+
+    g_return_val_if_fail (at != ITDB_SPLAT_INVALID, FALSE);
+
+    /* find what we need to compare in the track */
+    switch (splr->field)
+    {
+    case ITDB_SPLFIELD_SONG_NAME:
+	strcomp = track->title;
+	handled = TRUE;
+	break;
+    case ITDB_SPLFIELD_ALBUM:
+	strcomp = track->album;
+	handled = TRUE;
+	break;
+    case ITDB_SPLFIELD_ARTIST:
+	strcomp = track->artist;
+	handled = TRUE;
+	break;
+    case ITDB_SPLFIELD_GENRE:
+	strcomp = track->genre;
+	handled = TRUE;
+	break;
+    case ITDB_SPLFIELD_KIND:
+	strcomp = track->filetype;
+	handled = TRUE;
+	break;
+    case ITDB_SPLFIELD_COMMENT:
+	strcomp = track->comment;
+	handled = TRUE;
+	break;
+    case ITDB_SPLFIELD_COMPOSER:
+	strcomp = track->composer;
+	handled = TRUE;
+	break;
+    case ITDB_SPLFIELD_GROUPING:
+	strcomp = track->grouping;
+	handled = TRUE;
+	break;
+    case ITDB_SPLFIELD_BITRATE:
+	intcomp = track->bitrate;
+	handled = TRUE;
+	break;
+    case ITDB_SPLFIELD_SAMPLE_RATE:
+	intcomp = track->samplerate;
+	handled = TRUE;
+	break;
+    case ITDB_SPLFIELD_YEAR:
+	intcomp = track->year;
+	handled = TRUE;
+	break;
+    case ITDB_SPLFIELD_TRACKNUMBER:
+	intcomp = track->track_nr;
+	handled = TRUE;
+	break;
+    case ITDB_SPLFIELD_SIZE:
+	intcomp = track->size;
+	handled = TRUE;
+	break;
+    case ITDB_SPLFIELD_PLAYCOUNT:
+	intcomp = track->playcount;
+	handled = TRUE;
+	break;
+    case ITDB_SPLFIELD_DISC_NUMBER:
+	intcomp = track->cd_nr;
+	handled = TRUE;
+	break;
+    case ITDB_SPLFIELD_BPM:
+	intcomp = track->BPM;
+	handled = TRUE;
+	break;
+    case ITDB_SPLFIELD_RATING:
+	intcomp = track->rating;
+	handled = TRUE;
+	break;
+    case ITDB_SPLFIELD_TIME:
+	intcomp = track->tracklen;
+	handled = TRUE;
+	break;
+    case ITDB_SPLFIELD_COMPILATION:
+	boolcomp = track->compilation;
+	handled = TRUE;
+	break;
+    case ITDB_SPLFIELD_DATE_MODIFIED:
+	datecomp = track->time_modified;
+	handled = TRUE;
+	break;
+    case ITDB_SPLFIELD_DATE_ADDED:
+	datecomp = track->time_added;
+	handled = TRUE;
+	break;
+    case ITDB_SPLFIELD_LAST_PLAYED:
+	datecomp = track->time_played;
+	handled = TRUE;
+	break;
+    case ITDB_SPLFIELD_PLAYLIST:
+	playcomp = itdb_playlist_by_id (track->itdb, splr->fromvalue);
+	handled = TRUE;
+	break;
+    case ITDB_SPLFIELD_ALBUMARTIST:
+	strcomp = track->albumartist;
+	handled = TRUE;
+	break;
+    case ITDB_SPLFIELD_TVSHOW:
+	strcomp = track->tvshow;
+	handled = TRUE;
+	break;
+    case ITDB_SPLFIELD_LAST_SKIPPED:
+	datecomp = track->last_skipped;
+	handled = TRUE;
+	break;
+    case ITDB_SPLFIELD_SEASON_NR:
+	intcomp = track->season_nr;
+	handled = TRUE;
+	break;
+    case ITDB_SPLFIELD_SKIPCOUNT:
+	intcomp = track->skipcount;
+	handled = TRUE;
+	break;
+    case ITDB_SPLFIELD_VIDEO_KIND:
+	intcomp = track->mediatype;
+	handled = TRUE;
+	break;
+    }
+    if (!handled)
+    {   /* unknown field type -- default to FALSE */
+	g_return_val_if_reached (FALSE);
+    }
+
+    /* actually do the comparison to our rule */
+    switch (ft)
+    {
+    case ITDB_SPLFT_STRING:
+	if(strcomp && splr->string)
+	{
+	    gint len1 = strlen (strcomp);
+	    gint len2 = strlen (splr->string);
+	    switch (splr->action)
+	    {
+	    case ITDB_SPLACTION_IS_STRING:
+		return (strcmp (strcomp, splr->string) == 0);
+	    case ITDB_SPLACTION_IS_NOT:
+		return (strcmp (strcomp, splr->string) != 0);
+	    case ITDB_SPLACTION_CONTAINS:
+		return (strstr (strcomp, splr->string) != NULL);
+	    case ITDB_SPLACTION_DOES_NOT_CONTAIN:
+		return (strstr (strcomp, splr->string) == NULL);
+	    case ITDB_SPLACTION_STARTS_WITH:
+		return (strncmp (strcomp, splr->string, len2) == 0);
+	    case ITDB_SPLACTION_ENDS_WITH:
+	    if (len2 > len1)  return FALSE;
+	    return (strncmp (strcomp+len1-len2,
+			     splr->string, len2) == 0);
+	    case ITDB_SPLACTION_DOES_NOT_START_WITH:
+		return (strncmp (strcomp, splr->string,
+				 strlen (splr->string)) != 0);
+	    case ITDB_SPLACTION_DOES_NOT_END_WITH:
+		if (len2 > len1)  return TRUE;
+		return (strncmp (strcomp+len1-len2,
+				 splr->string, len2) != 0);
+	    };
+	}
+	return FALSE;
+    case ITDB_SPLFT_INT:
+	switch(splr->action)
+	{
+	case ITDB_SPLACTION_IS_INT:
+	    return (intcomp == splr->fromvalue);
+	case ITDB_SPLACTION_IS_NOT_INT:
+	    return (intcomp != splr->fromvalue);
+	case ITDB_SPLACTION_IS_GREATER_THAN:
+	    return (intcomp > splr->fromvalue);
+	case ITDB_SPLACTION_IS_LESS_THAN:
+	    return (intcomp < splr->fromvalue);
+	case ITDB_SPLACTION_IS_IN_THE_RANGE:
+	    return ((intcomp <= splr->fromvalue &&
+		     intcomp >= splr->tovalue) ||
+		    (intcomp >= splr->fromvalue &&
+		     intcomp <= splr->tovalue));
+	case ITDB_SPLACTION_IS_NOT_IN_THE_RANGE:
+	    return ((intcomp < splr->fromvalue &&
+		     intcomp < splr->tovalue) ||
+		    (intcomp > splr->fromvalue &&
+		     intcomp > splr->tovalue));
+	}
+	return FALSE;
+    case ITDB_SPLFT_BINARY_AND:
+	switch(splr->action)
+	{
+	case ITDB_SPLACTION_BINARY_AND:
+	    return (intcomp & splr->fromvalue)? TRUE:FALSE;
+	}
+	return FALSE;
+    case ITDB_SPLFT_BOOLEAN:
+	switch (splr->action)
+	{
+	case ITDB_SPLACTION_IS_INT:	    /* aka "is set" */
+	    return (boolcomp != 0);
+	case ITDB_SPLACTION_IS_NOT_INT:  /* aka "is not set" */
+	    return (boolcomp == 0);
+	}
+	return FALSE;
+    case ITDB_SPLFT_DATE:
+	switch (splr->action)
+	{
+	case ITDB_SPLACTION_IS_INT:
+	    return (datecomp == splr->fromvalue);
+	case ITDB_SPLACTION_IS_NOT_INT:
+	    return (datecomp != splr->fromvalue);
+	case ITDB_SPLACTION_IS_GREATER_THAN:
+	    return (datecomp > splr->fromvalue);
+	case ITDB_SPLACTION_IS_LESS_THAN:
+	    return (datecomp < splr->fromvalue);
+	case ITDB_SPLACTION_IS_NOT_GREATER_THAN:
+	    return (datecomp <= splr->fromvalue);
+	case ITDB_SPLACTION_IS_NOT_LESS_THAN:
+	    return (datecomp >= splr->fromvalue);
+	case ITDB_SPLACTION_IS_IN_THE_LAST:
+	    time (&t);
+	    t += (splr->fromdate * splr->fromunits);
+	    return (datecomp > t);
+	case ITDB_SPLACTION_IS_NOT_IN_THE_LAST:
+	    time (&t);
+	    t += (splr->fromdate * splr->fromunits);
+	    return (datecomp <= t);
+	case ITDB_SPLACTION_IS_IN_THE_RANGE:
+	    return ((datecomp <= splr->fromvalue &&
+		     datecomp >= splr->tovalue) ||
+		    (datecomp >= splr->fromvalue &&
+		     datecomp <= splr->tovalue));
+	case ITDB_SPLACTION_IS_NOT_IN_THE_RANGE:
+	    return ((datecomp < splr->fromvalue &&
+		     datecomp < splr->tovalue) ||
+		    (datecomp > splr->fromvalue &&
+		     datecomp > splr->tovalue));
+	}
+	return FALSE;
+    case ITDB_SPLFT_PLAYLIST:
+	/* if we didn't find the playlist, just exit instead of
+	   dealing with it */
+	if (playcomp == NULL) return FALSE;
+
+	switch(splr->action)
+	{
+	case ITDB_SPLACTION_IS_INT:	  /* is this track in this playlist? */
+	    return (itdb_playlist_contains_track (playcomp, track));
+	case ITDB_SPLACTION_IS_NOT_INT:/* NOT in this playlist? */
+	    return (!itdb_playlist_contains_track (playcomp, track));
+	}
+	return FALSE;
+    case ITDB_SPLFT_UNKNOWN:
+	g_return_val_if_fail (ft != ITDB_SPLFT_UNKNOWN, FALSE);
+	return FALSE;
+    default: /* new type: warning to change this code */
+	g_return_val_if_fail (FALSE, FALSE);
+	return FALSE;
+    }
+    /* we should never make it out of the above switches alive */
+    g_return_val_if_fail (FALSE, FALSE);
+    return FALSE;
+}
+
+/* local functions to help with the sorting of the list of tracks so
+ * that we can do limits */
+static gint compTitle (Itdb_Track *a, Itdb_Track *b)
+{
+    return strcmp (a->title, b->title);
+}
+static gint compAlbum (Itdb_Track *a, Itdb_Track *b)
+{
+    return strcmp (a->album, b->album);
+}
+static gint compArtist (Itdb_Track *a, Itdb_Track *b)
+{
+    return strcmp (a->artist, b->artist);
+}
+static gint compGenre (Itdb_Track *a, Itdb_Track *b)
+{
+    return strcmp (a->genre, b->genre);
+}
+static gint compMostRecentlyAdded (Itdb_Track *a, Itdb_Track *b)
+{
+    return b->time_added - a->time_added;
+}
+static gint compLeastRecentlyAdded (Itdb_Track *a, Itdb_Track *b)
+{
+    return a->time_added - b->time_added;
+}
+static gint compMostOftenPlayed (Itdb_Track *a, Itdb_Track *b)
+{
+    return b->playcount - a->playcount;
+}
+static gint compLeastOftenPlayed (Itdb_Track *a, Itdb_Track *b)
+{
+    return a->playcount - b->playcount;
+}
+static gint compMostRecentlyPlayed (Itdb_Track *a, Itdb_Track *b)
+{
+    return b->time_played - a->time_played;
+}
+static gint compLeastRecentlyPlayed (Itdb_Track *a, Itdb_Track *b)
+{
+    return a->time_played - b->time_played;
+}
+static gint compHighestRating (Itdb_Track *a, Itdb_Track *b)
+{
+    return b->rating - a->rating;
+}
+static gint compLowestRating (Itdb_Track *a, Itdb_Track *b)
+{
+    return a->rating - b->rating;
+}
+
+/* Randomize the order of the members of the GList @list */
+/* Returns a pointer to the new start of the list */
+static GList *randomize_glist (GList *list)
+{
+    gint32 nr = g_list_length (list);
+
+    while (nr > 1)
+    {
+	/* get random element among the first nr members */
+	gint32 rand = g_random_int_range (0, nr);
+	GList *gl = g_list_nth (list, rand);
+	/* remove it and add it at the end */
+	list = g_list_remove_link (list, gl);
+	list = g_list_concat (list, gl);
+	--nr;
+    }
+    return list;
+}
+
+/**
+ * itdb_playlist_randomize:
+ * @pl: an #Itdb_Playlist to randomize
+ *
+ * Randomizes @pl
+ */
+void itdb_playlist_randomize (Itdb_Playlist *pl)
+{
+    g_return_if_fail (pl);
+
+    pl->members = randomize_glist (pl->members);
+}
+
+/**
+ * itdb_spl_update:
+ * @spl: an #Itdb_Playlist
+ *
+ * Updates the content of the smart playlist @spl (meant to be called
+ * if the tracks stored in the #Itdb_iTunesDB associated with @spl
+ * have changed somehow and you want @spl->members to be accurate
+ * with regards to those changes. Does nothing if @spl isn't a smart
+ * playlist.
+ */
+void itdb_spl_update (Itdb_Playlist *spl)
+{
+    GList *gl;
+    Itdb_iTunesDB *itdb;
+    GList *sel_tracks = NULL;
+
+    g_return_if_fail (spl);
+    g_return_if_fail (spl->itdb);
+
+    itdb = spl->itdb;
+
+    /* we only can populate smart playlists */
+    if (!spl->is_spl) return;
+
+    /* clear this playlist */
+    g_list_free (spl->members);
+    spl->members = NULL;
+    spl->num = 0;
+
+    for (gl=itdb->tracks; gl ; gl=gl->next)
+    {
+	Itdb_Track *t = gl->data;
+	g_return_if_fail (t);
+	/* skip non-checked songs if we have to do so (this takes care
+	   of *all* the match_checked functionality) */
+	if (spl->splpref.matchcheckedonly && (t->checked != 0))
+	    continue;
+	/* first, match the rules */
+	if (spl->splpref.checkrules)
+	{   /* if we are set to check the rules */
+	    /* start with true for "match all",
+	       start with false for "match any" */
+	    gboolean matchrules;
+	    GList *gl;
+
+	    if (spl->splrules.match_operator == ITDB_SPLMATCH_AND)
+		 matchrules = TRUE;
+	    else matchrules = FALSE;
+	    /* assume everything matches with no rules */
+	    if (spl->splrules.rules == NULL) matchrules = TRUE;
+	    /* match all rules */
+	    for (gl=spl->splrules.rules; gl; gl=gl->next)
+	    {
+		Itdb_SPLRule* splr = gl->data;
+		gboolean ruletruth = itdb_splr_eval (splr, t);
+		if (spl->splrules.match_operator == ITDB_SPLMATCH_AND)
+		{
+		    if (!ruletruth)
+		    {   /* one rule did not match -- we can stop */
+			matchrules = FALSE;
+			break;
+		    }
+		}
+		else if (spl->splrules.match_operator == ITDB_SPLMATCH_OR)
+		{
+		    if (ruletruth)
+		    {   /* one rule matched -- we can stop */
+			matchrules = TRUE;
+			break;
+		    }
+		}
+	    }
+	    if (matchrules)
+	    {   /* we have a track that matches the ruleset, append to
+		 * playlist for now*/
+		sel_tracks = g_list_append (sel_tracks, t);
+	    }
+	}
+	else
+	{   /* we aren't checking the rules, so just append to
+	       playlist */
+		sel_tracks = g_list_append (sel_tracks, t);
+	}
+    }
+    /* no reason to go on if nothing matches so far */
+    if (g_list_length (sel_tracks) == 0) return;
+
+    /* do the limits */
+    if (spl->splpref.checklimits)
+    {
+	/* use a double because we may need to deal with fractions
+	 * here */
+	gdouble runningtotal = 0;
+	guint32 trackcounter = 0;
+	guint32 tracknum = g_list_length (sel_tracks);
+
+/* 	printf("limitsort: %d\n", spl->splpref.limitsort); */
+
+	/* limit to (number) (type) selected by (sort) */
+	/* first, we sort the list */
+	switch(spl->splpref.limitsort)
+	{
+	case ITDB_LIMITSORT_RANDOM:
+	    sel_tracks = randomize_glist (sel_tracks);
+	    break;
+	case ITDB_LIMITSORT_SONG_NAME:
+	    sel_tracks = g_list_sort (sel_tracks, (GCompareFunc)compTitle);
+	    break;
+	case ITDB_LIMITSORT_ALBUM:
+	    sel_tracks = g_list_sort (sel_tracks, (GCompareFunc)compAlbum);
+		break;
+	case ITDB_LIMITSORT_ARTIST:
+	    sel_tracks = g_list_sort (sel_tracks, (GCompareFunc)compArtist);
+	    break;
+	case ITDB_LIMITSORT_GENRE:
+	    sel_tracks = g_list_sort (sel_tracks, (GCompareFunc)compGenre);
+	    break;
+	case ITDB_LIMITSORT_MOST_RECENTLY_ADDED:
+	    sel_tracks = g_list_sort (sel_tracks,
+			 (GCompareFunc)compMostRecentlyAdded);
+	    break;
+	case ITDB_LIMITSORT_LEAST_RECENTLY_ADDED:
+	    sel_tracks = g_list_sort (sel_tracks,
+			 (GCompareFunc)compLeastRecentlyAdded);
+	    break;
+	case ITDB_LIMITSORT_MOST_OFTEN_PLAYED:
+	    sel_tracks = g_list_sort (sel_tracks,
+			 (GCompareFunc)compMostOftenPlayed);
+	    break;
+	case ITDB_LIMITSORT_LEAST_OFTEN_PLAYED:
+	    sel_tracks = g_list_sort (sel_tracks,
+			 (GCompareFunc)compLeastOftenPlayed);
+	    break;
+	case ITDB_LIMITSORT_MOST_RECENTLY_PLAYED:
+	    sel_tracks = g_list_sort (sel_tracks,
+			 (GCompareFunc)compMostRecentlyPlayed);
+	    break;
+	case ITDB_LIMITSORT_LEAST_RECENTLY_PLAYED:
+	    sel_tracks = g_list_sort (sel_tracks,
+			 (GCompareFunc)compLeastRecentlyPlayed);
+	    break;
+	case ITDB_LIMITSORT_HIGHEST_RATING:
+	    sel_tracks = g_list_sort (sel_tracks,
+			 (GCompareFunc)compHighestRating);
+	    break;
+	case ITDB_LIMITSORT_LOWEST_RATING:
+	    sel_tracks = g_list_sort (sel_tracks,
+			 (GCompareFunc)compLowestRating);
+	    break;
+	default:
+	    g_warning ("Programming error: should not reach this point (default of switch (spl->splpref.limitsort)\n");
+	    break;
+	}
+	/* now that the list is sorted in the order we want, we
+	   take the top X tracks off the list and insert them into
+	   our playlist */
+
+	while ((runningtotal < spl->splpref.limitvalue) &&
+	       (trackcounter < tracknum))
+	{
+	    gdouble currentvalue=0;
+	    Itdb_Track *t = g_list_nth_data (sel_tracks, trackcounter);
+
+/* 	    printf ("track: %d runningtotal: %lf, limitvalue: %d\n", */
+/* 		    trackcounter, runningtotal, spl->splpref.limitvalue); */
+
+	    /* get the next song's value to add to running total */
+	    switch (spl->splpref.limittype)
+	    {
+	    case ITDB_LIMITTYPE_MINUTES:
+		currentvalue = (double)(t->tracklen)/(60*1000);
+		break;
+	    case ITDB_LIMITTYPE_HOURS:
+		currentvalue = (double)(t->tracklen)/(60*60*1000);
+		break;
+	    case ITDB_LIMITTYPE_MB:
+		currentvalue = (double)(t->size)/(1024*1024);
+		break;
+	    case ITDB_LIMITTYPE_GB:
+		currentvalue = (double)(t->size)/(1024*1024*1024);
+		break;
+	    case ITDB_LIMITTYPE_SONGS:
+		currentvalue = 1;
+		break;
+	    default:
+		g_warning ("Programming error: should not reach this point (default of switch (spl->splpref.limittype)\n");
+		break;
+	    }
+	    /* check to see that we won't actually exceed the
+	     * limitvalue */
+	    if (runningtotal + currentvalue <=
+		spl->splpref.limitvalue)
+	    {
+		runningtotal += currentvalue;
+		/* Add the playlist entry */
+		itdb_playlist_add_track (spl, t, -1);
+	    }
+	    /* increment the track counter so we can look at the next
+	       track */
+	    trackcounter++;
+/* 	    printf ("  track: %d runningtotal: %lf, limitvalue: %d\n", */
+/* 		    trackcounter, runningtotal, spl->splpref.limitvalue); */
+	}	/* end while */
+	/* no longer needed */
+	g_list_free (sel_tracks);
+	sel_tracks = NULL;
+    } /* end if limits enabled */
+    else
+    {   /* no limits, so stick everything that matched the rules into
+	   the playlist */
+	spl->members = sel_tracks;
+	spl->num = g_list_length (sel_tracks);
+	sel_tracks = NULL;
+    }
+}
+
+/**
+ * itdb_spl_update_all:
+ * @itdb: an #Itdb_iTunesDB
+ *
+ * Updates all smart playlists contained in @itdb
+ */
+void itdb_spl_update_all (Itdb_iTunesDB *itdb)
+{
+    g_return_if_fail (itdb);
+
+    g_list_foreach (itdb->playlists, (GFunc)itdb_spl_update, NULL);
+}
+
+
+static void spl_update2 (Itdb_Playlist *playlist, gpointer data)
+{
+    g_return_if_fail (playlist);
+    if (playlist->is_spl && playlist->splpref.liveupdate)
+        itdb_spl_update (playlist);
+}
+
+/**
+ * itdb_spl_update_live:
+ * @itdb: an #Itdb_iTunesDB
+ *
+ * Updates all smart playlists contained in @itdb which have the
+ * @liveupdate flag set.
+ *
+ * Since: 0.2.0
+ */
+void itdb_spl_update_live (Itdb_iTunesDB *itdb)
+{
+    g_return_if_fail (itdb);
+
+    g_list_foreach (itdb->playlists, (GFunc)spl_update2, NULL);
+}
+
+
+/* end of code based on Samuel Wood's work */
+/* ------------------------------------------------------------------- */
+
+/**
+ * itdb_splr_validate:
+ * @splr: an #Itdb_SPLRule
+ *
+ * Validates a smart playlist rule
+ */
+void itdb_splr_validate (Itdb_SPLRule *splr)
+{
+    ItdbSPLActionType at;
+
+    g_return_if_fail (splr != NULL);
+
+    at = itdb_splr_get_action_type (splr);
+
+    g_return_if_fail (at != ITDB_SPLAT_UNKNOWN);
+
+    switch (at)
+    {
+    case ITDB_SPLAT_INT:
+    case ITDB_SPLAT_PLAYLIST:
+    case ITDB_SPLAT_DATE:
+    case ITDB_SPLAT_BINARY_AND:
+	splr->fromdate = 0;
+	splr->fromunits = 1;
+	splr->tovalue = splr->fromvalue;
+	splr->todate = 0;
+	splr->tounits = 1;
+	break;
+    case ITDB_SPLAT_RANGE_INT:
+    case ITDB_SPLAT_RANGE_DATE:
+	splr->fromdate = 0;
+	splr->fromunits = 1;
+	splr->todate = 0;
+	splr->tounits = 1;
+	break;
+    case ITDB_SPLAT_INTHELAST:
+	splr->fromvalue = ITDB_SPL_DATE_IDENTIFIER;
+	splr->tovalue = ITDB_SPL_DATE_IDENTIFIER;
+	splr->tounits = 1;
+	break;
+    case ITDB_SPLAT_NONE:
+    case ITDB_SPLAT_STRING:
+	splr->fromvalue = 0;
+	splr->fromdate = 0;
+	splr->fromunits = 0;
+	splr->tovalue = 0;
+	splr->todate = 0;
+	splr->tounits = 0;
+	break;
+    case ITDB_SPLAT_INVALID:
+    case ITDB_SPLAT_UNKNOWN:
+	g_return_if_fail (FALSE);
+	break;
+    }
+
+}
+
+/**
+ * itdb_splr_free:
+ * @splr: an #Itdb_SPLRule
+ *
+ * Frees the memory used by @splr
+ */
+void itdb_splr_free (Itdb_SPLRule *splr)
+{
+    if (splr)
+    {
+	g_free (splr->string);
+	g_free (splr);
+    }
+}
+
+/**
+ * itdb_splr_remove:
+ * @pl: an #Itdb_Playlist
+ * @splr: an Itdb_SPLRule
+ *
+ * Removes the smart playlist rule @splr from playlist @pl. The memory
+ * used by @splr is freed.
+ */
+void itdb_splr_remove (Itdb_Playlist *pl, Itdb_SPLRule *splr)
+{
+    g_return_if_fail (pl);
+    g_return_if_fail (splr);
+
+    pl->splrules.rules = g_list_remove (pl->splrules.rules, splr);
+    itdb_splr_free (splr);
+}
+
+/**
+ * itdb_splr_add:
+ * @pl:     an #Itdb_Playlist
+ * @splr:   an #Itdb_SPLRule
+ * @pos:    position of the rule
+ *
+ * Adds the smart rule @splr to @pl at position @pos. If @pos is -1,
+ * @splr gets appended to the end. After this call, @splr memory is
+ * managed by @pl, so you no longer need to call itdb_splr_free()
+ */
+void itdb_splr_add (Itdb_Playlist *pl, Itdb_SPLRule *splr, gint pos)
+{
+    g_return_if_fail (pl);
+    g_return_if_fail (splr);
+
+    pl->splrules.rules = g_list_insert (pl->splrules.rules,
+					splr, pos);
+}
+
+/**
+ * itdb_splr_new:
+ *
+ * Creates a new default smart rule
+ *
+ * Returns: a new #Itdb_SPLRule that must be freed with itdb_splr_free() when
+ * no longer needed
+ */
+Itdb_SPLRule *itdb_splr_new (void)
+{
+    Itdb_SPLRule *splr = g_new0 (Itdb_SPLRule, 1);
+
+    splr->field = ITDB_SPLFIELD_ARTIST;
+    splr->action = ITDB_SPLACTION_CONTAINS;
+    splr->fromvalue = 0;
+    splr->fromdate = 0;
+    splr->fromunits = 0;
+    splr->tovalue = 0;
+    splr->todate = 0;
+    splr->tounits = 0;
+
+    return splr;
+}
+
+/**
+ * itdb_splr_add_new:
+ * @pl:     an #Itdb_Playlist
+ * @pos:    position to insert the rule at
+ *
+ * Creates a new smart rule and inserts it at position @pos in @pl. If
+ * @pos is -1, the new rule gets appended to the end.
+ *
+ * Returns: pointer to the newly created #Itdb_SPLRule. Its
+ * memory is handled by @pl though, so you don't need to explicitly
+ * call itdb_splr_free() on it
+ */
+Itdb_SPLRule *itdb_splr_add_new (Itdb_Playlist *pl, gint pos)
+{
+    Itdb_SPLRule *splr;
+
+    g_return_val_if_fail (pl, NULL);
+
+    splr = itdb_splr_new ();
+    itdb_splr_add (pl, splr, pos);
+    return splr;
+}
+
+/* Duplicate Itdb_SPLRule @splr */
+static Itdb_SPLRule *splr_duplicate (Itdb_SPLRule *splr)
+{
+    Itdb_SPLRule *dup = NULL;
+    if (splr)
+    {
+	dup = g_malloc (sizeof (Itdb_SPLRule));
+	memcpy (dup, splr, sizeof (Itdb_SPLRule));
+
+	/* Now copy the strings */
+	dup->string = g_strdup (splr->string);
+    }
+    return dup;
+}
+
+/**
+ * itdb_playlist_duplicate:
+ * @pl: an #Itdb_Playlist
+ *
+ * Duplicates an existing playlist. @pl_dup->id is set to zero, so
+ * that it will be set to a unique value when adding it to an
+ * #Itdb_iTunesDB. The returned playlist won't be associated with an
+ * #Itdb_iTunesDB.
+ *
+ * Returns: a newly allocated #Itdb_Playlist that you'll have to
+ * free with itdb_playlist_free() when you no longer need it.
+ */
+Itdb_Playlist *itdb_playlist_duplicate (Itdb_Playlist *pl)
+{
+    Itdb_Playlist *pl_dup;
+    GList *gl;
+
+    g_return_val_if_fail (pl, NULL);
+
+    pl_dup = g_new (Itdb_Playlist, 1);
+    memcpy (pl_dup, pl, sizeof (Itdb_Playlist));
+    /* clear list heads */
+    pl_dup->members = NULL;
+    pl_dup->splrules.rules = NULL;
+
+    /* clear itdb pointer */
+    pl_dup->itdb = NULL;
+
+    /* Now copy strings */
+    pl_dup->name = g_strdup (pl->name);
+
+    /* Copy members */
+    pl_dup->members = g_list_copy (pl->members);
+
+    /* Copy rules */
+    for (gl=pl->splrules.rules; gl; gl=gl->next)
+    {
+	Itdb_SPLRule *splr_dup = splr_duplicate (gl->data);
+	pl_dup->splrules.rules = g_list_append (
+	    pl_dup->splrules.rules, splr_dup);
+    }
+
+    /* Set id to 0, so it will be set to a unique value when adding
+     * this playlist to a itdb */
+    pl_dup->id = 0;
+
+    /* Copy userdata */
+    if (pl->userdata && pl->userdata_duplicate)
+	pl_dup->userdata = pl->userdata_duplicate (pl->userdata);
+
+    return pl_dup;
+}
+
+/**
+ * itdb_spl_copy_rules:
+ * @dest:   destination #Itdb_Playlist
+ * @src:    source #Itdb_Playlist
+ *
+ * Copy all relevant information for smart playlist from playlist @src
+ * to playlist @dest. If @dest is already a smart playlist, the
+ * existing data is overwritten/deleted.
+ */
+void itdb_spl_copy_rules (Itdb_Playlist *dest, Itdb_Playlist *src)
+{
+    GList *gl;
+
+    g_return_if_fail (dest);
+    g_return_if_fail (src);
+    g_return_if_fail (dest->is_spl);
+    g_return_if_fail (src->is_spl);
+
+    /* remove existing rules */
+    g_list_foreach (dest->splrules.rules, (GFunc)(itdb_splr_free), NULL);
+    g_list_free (dest->splrules.rules);
+
+    /* copy general spl settings */
+    memcpy (&dest->splpref, &src->splpref, sizeof (Itdb_SPLPref));
+    memcpy (&dest->splrules, &src->splrules, sizeof (Itdb_SPLRules));
+    dest->splrules.rules = NULL;
+
+    /* Copy rules */
+    for (gl=src->splrules.rules; gl; gl=gl->next)
+    {
+	Itdb_SPLRule *splr_dup = splr_duplicate (gl->data);
+	dest->splrules.rules = g_list_append (
+	    dest->splrules.rules, splr_dup);
+    }
+}
+
+/**
+ * itdb_playlist_new:
+ * @title:  playlist title
+ * @spl:    smart playlist flag
+ *
+ * Creates a new playlist. If @spl is TRUE, a smart playlist is
+ * generated. pl->id is set by itdb_playlist_add() when the playlist
+ * is added to an #Itdb_iTunesDB
+ *
+ * Returns: a new #Itdb_Playlist which must be freed with
+ * itdb_playlist_free() after use
+ */
+Itdb_Playlist *itdb_playlist_new (const gchar *title, gboolean spl)
+{
+    Itdb_Playlist *pl = g_new0 (Itdb_Playlist, 1);
+
+    pl->type = ITDB_PL_TYPE_NORM;
+    pl->name = g_strdup (title);
+    pl->sortorder = ITDB_PSO_MANUAL;
+
+    pl->timestamp = time (NULL);
+
+    pl->is_spl = spl;
+    if (spl)
+    {
+	pl->splpref.liveupdate = TRUE;
+	pl->splpref.checkrules = TRUE;
+	pl->splpref.checklimits = FALSE;
+	pl->splpref.limittype = ITDB_LIMITTYPE_HOURS;
+	pl->splpref.limitsort = ITDB_LIMITSORT_RANDOM;
+	pl->splpref.limitvalue = 2;
+	pl->splpref.matchcheckedonly = FALSE;
+	pl->splrules.match_operator = ITDB_SPLMATCH_AND;
+	/* add at least one rule */
+	itdb_splr_add_new (pl, 0);
+    }
+    return pl;
+}
+
+/**
+ * itdb_playlist_free:
+ * @pl: an #Itdb_Playlist
+ *
+ * Frees the memory used by playlist @pl.
+ */
+void itdb_playlist_free (Itdb_Playlist *pl)
+{
+    g_return_if_fail (pl);
+
+    g_free (pl->name);
+    g_list_free (pl->members);
+    g_list_foreach (pl->splrules.rules, (GFunc)(itdb_splr_free), NULL);
+    g_list_free (pl->splrules.rules);
+    if (pl->userdata && pl->userdata_destroy)
+	(*pl->userdata_destroy) (pl->userdata);
+    g_free (pl);
+}
+
+/**
+ * itdb_playlist_add:
+ * @itdb:   an #Itdb_iTunesDB
+ * @pl:     an #Itdb_Playlist
+ * @pos:    position to insert @pl at
+ *
+ * Adds playlist @pl to the database @itdb at position @pos (-1 for
+ * "append to end"). A unique id is created if @pl->id is equal to
+ * zero. After calling this function, @itdb manages the memory of @pl,
+ * which means you no longer need to explicitly call
+ * itdb_playlist_free()
+ */
+void itdb_playlist_add (Itdb_iTunesDB *itdb, Itdb_Playlist *pl, gint32 pos)
+{
+    g_return_if_fail (itdb);
+    g_return_if_fail (pl);
+    g_return_if_fail (!pl->userdata || pl->userdata_duplicate);
+
+    pl->itdb = itdb;
+
+    /* set unique ID when not yet set */
+    if (pl->id == 0)
+    {
+	GList *gl;
+	guint64 id;
+	do
+	{
+	    id = ((guint64)g_random_int () << 32) |
+		((guint64)g_random_int ());
+	    /* check if id is really unique (with 100 playlists the
+	     * chance to create a duplicate is 1 in
+	     * 184,467,440,737,095,516.16) */
+	    for (gl=itdb->playlists; id && gl; gl=gl->next)
+	    {
+		Itdb_Playlist *g_pl = gl->data;
+		g_return_if_fail (g_pl);
+		if (id == g_pl->id)  id = 0;
+	    }
+	} while (id == 0);
+	pl->id = id;
+    }
+    if (pl->sortorder == 0)  pl->sortorder = ITDB_PSO_MANUAL;
+    if (pl->timestamp == 0)  pl->timestamp = time (NULL);
+
+    /* pos == -1 appends at the end of the list */
+    itdb->playlists = g_list_insert (itdb->playlists, pl, pos);
+}
+
+/**
+ * itdb_playlist_move:
+ * @pl:     an #Itdb_Playlist
+ * @pos:    new position
+ *
+ * Moves playlist @pl to position @pos
+ */
+void itdb_playlist_move (Itdb_Playlist *pl, guint32 pos)
+{
+    Itdb_iTunesDB *itdb;
+
+    g_return_if_fail (pl);
+    itdb = pl->itdb;
+    g_return_if_fail (itdb);
+
+    itdb->playlists = g_list_remove (itdb->playlists, pl);
+    itdb->playlists = g_list_insert (itdb->playlists, pl, pos);
+}
+
+/**
+ * itdb_playlist_remove:
+ * @pl: an #Itdb_Playlist
+ *
+ * Removes @pl from the #Itdb_iTunesDB it's associated with
+ * and frees memory
+ */
+void itdb_playlist_remove (Itdb_Playlist *pl)
+{
+    Itdb_iTunesDB *itdb;
+
+    g_return_if_fail (pl);
+    itdb = pl->itdb;
+    g_return_if_fail (itdb);
+
+    itdb->playlists = g_list_remove (itdb->playlists, pl);
+    itdb_playlist_free (pl);
+}
+
+/**
+ * itdb_playlist_unlink:
+ * @pl: an #Itdb_Playlist
+ *
+ * Remove @pl from the #Itdb_iTunesDB it's associated with but do not
+ * free memory. @pl->itdb is set to NULL after this function returns
+ */
+void itdb_playlist_unlink (Itdb_Playlist *pl)
+{
+    Itdb_iTunesDB *itdb;
+
+    g_return_if_fail (pl);
+    itdb = pl->itdb;
+    g_return_if_fail (itdb);
+
+    itdb->playlists = g_list_remove (itdb->playlists, pl);
+    pl->itdb = NULL;
+}
+
+/**
+ * itdb_playlist_exists:
+ * @itdb:   an #Itdb_iTunesDB
+ * @pl:     an #Itdb_Playlist
+ *
+ * Checks if @pl is present in @itdb
+ *
+ * Returns: TRUE if @pl exists in @itdb, FALSE otherwise
+ */
+gboolean itdb_playlist_exists (Itdb_iTunesDB *itdb, Itdb_Playlist *pl)
+{
+    g_return_val_if_fail (itdb, FALSE);
+    g_return_val_if_fail (pl, FALSE);
+
+    if (g_list_find (itdb->playlists, pl))  return TRUE;
+    else                                    return FALSE;
+}
+
+/**
+ * itdb_playlist_add_track:
+ * @pl:     an #Itdb_Playlist
+ * @track:  an #Itdb_Track
+ * @pos:    position to insert @track at
+ *
+ * Adds @track to @pl at position @pos (-1 to append at the end)
+ */
+void itdb_playlist_add_track (Itdb_Playlist *pl,
+			      Itdb_Track *track, gint32 pos)
+{
+    g_return_if_fail (pl);
+    g_return_if_fail (pl->itdb);
+    g_return_if_fail (track);
+
+    track->itdb = pl->itdb;
+
+    pl->members = g_list_insert (pl->members, track, pos);
+}
+
+/**
+ * itdb_playlist_remove_track:
+ * @pl:     an #Itdb_Playlist
+ * @track:  an #Itdb_Track
+ *
+ * Removes @track from @pl. If @pl is NULL, removes @track from the
+ * master playlist. If @track can't be found in @pl, nothing happens.
+ * If after removing @track, @pl is empty, it's not removed from the
+ * database The memory used by @track isn't freed.
+ */
+void itdb_playlist_remove_track (Itdb_Playlist *pl, Itdb_Track *track)
+{
+    g_return_if_fail (track);
+
+    if (pl == NULL)
+	pl = itdb_playlist_mpl (track->itdb);
+
+    g_return_if_fail (pl);
+
+    pl->members = g_list_remove (pl->members, track);
+}
+
+/**
+ * itdb_playlist_by_id:
+ * @itdb:   an #Itdb_iTunesDB
+ * @id:     ID of the playlist to look for
+ *
+ * Looks up a playlist whose ID is @id
+ *
+ * Returns: the #Itdb_Playlist with ID @id or NULL if there is no
+ * such playlist.
+ */
+Itdb_Playlist *itdb_playlist_by_id (Itdb_iTunesDB *itdb, guint64 id)
+{
+    GList *gl;
+
+    g_return_val_if_fail (itdb, NULL);
+
+    for (gl=itdb->playlists; gl; gl=gl->next)
+    {
+	Itdb_Playlist *pl = gl->data;
+	if (pl->id == id)  return pl;
+    }
+    return NULL;
+}
+
+/**
+ * itdb_playlist_by_nr:
+ * @itdb:   an #Itdb_iTunesDB
+ * @num:    the position of the playlist, counting from 0
+ *
+ * Gets the playlist at the given position in @itdb
+ *
+ * Returns: the #Itdb_Playlist, or NULL if there is no playlist
+ * at @pos
+ */
+Itdb_Playlist *itdb_playlist_by_nr (Itdb_iTunesDB *itdb, guint32 num)
+{
+    Itdb_Playlist *pl;
+    g_return_val_if_fail (itdb, NULL);
+    pl = g_list_nth_data (itdb->playlists, num);
+    g_return_val_if_fail (pl, NULL);
+    return pl;
+}
+
+/**
+ * itdb_playlist_by_name:
+ * @itdb:   an #Itdb_iTunesDB
+ * @name:   name of the playlist to look for
+ *
+ * Searches a playlist whose name is @name in @itdb
+ *
+ * Returns: the first #Itdb_Playlist with name @name, NULL if
+ * there is no such playlist
+ */
+Itdb_Playlist *itdb_playlist_by_name (Itdb_iTunesDB *itdb, gchar *name)
+{
+    GList *gl;
+    g_return_val_if_fail (itdb, NULL);
+    g_return_val_if_fail (name, NULL);
+
+    for (gl=itdb->playlists; gl; gl=gl->next)
+    {
+	Itdb_Playlist *pl = gl->data;
+	g_return_val_if_fail (pl, NULL);
+	if (pl->name && (strcmp (pl->name, name) == 0))
+	    return pl;
+    }
+    return NULL;
+}
+
+/**
+ * itdb_playlist_is_mpl:
+ * @pl: an #Itdb_Playlist
+ *
+ * Checks if @pl is the master playlist
+ *
+ * Returns: TRUE if @pl is the master playlist, FALSE otherwise
+ *
+ * Since: 0.1.6
+ */
+gboolean itdb_playlist_is_mpl (Itdb_Playlist *pl)
+{
+    g_return_val_if_fail (pl, FALSE);
+
+    return ((pl->type & 0xff) == ITDB_PL_TYPE_MPL);
+}
+
+/**
+ * itdb_playlist_is_podcasts:
+ * @pl: an #Itdb_Playlist
+ *
+ * Checks if @pl is the podcasts playlist
+ *
+ * Returns: TRUE if @pl is the podcasts playlist, FALSE otherwise
+ *
+ * Since: 0.1.6
+ */
+gboolean itdb_playlist_is_podcasts (Itdb_Playlist *pl)
+{
+    g_return_val_if_fail (pl, FALSE);
+
+    return (pl->podcastflag == ITDB_PL_FLAG_PODCASTS);
+}
+
+/**
+ * itdb_playlist_set_mpl:
+ * @pl: an #Itdb_Playlist
+ *
+ * Sets @pl to be a master playlist
+ *
+ * Since: 0.2.0
+ */
+void itdb_playlist_set_mpl (Itdb_Playlist *pl)
+{
+    g_return_if_fail (pl);
+
+    pl->type = ITDB_PL_TYPE_MPL;
+}
+
+/**
+ * itdb_playlist_set_podcasts:
+ * @pl: an #Itdb_Playlist
+ *
+ * Set @pl to be a podcasts playlist
+ *
+ * Since: 0.2.0
+ */
+void itdb_playlist_set_podcasts (Itdb_Playlist *pl)
+{
+    g_return_if_fail (pl);
+
+    pl->podcastflag = ITDB_PL_FLAG_PODCASTS;
+}
+
+/**
+ * itdb_playlist_mpl:
+ * @itdb: an #Itdb_iTunesDB
+ *
+ * Gets the master playlist of @itdb
+ *
+ * Returns: the master playlist of @itdb
+ */
+Itdb_Playlist *itdb_playlist_mpl (Itdb_iTunesDB *itdb)
+{
+    Itdb_Playlist *pl;
+
+    g_return_val_if_fail (itdb, NULL);
+
+    pl = g_list_nth_data (itdb->playlists, 0);
+    g_return_val_if_fail (pl, NULL);
+
+    /* mpl is guaranteed to be at first position... */
+    g_return_val_if_fail (itdb_playlist_is_mpl (pl), NULL);
+
+    return pl;
+}
+
+/**
+ * itdb_playlist_podcasts:
+ * @itdb: an #Itdb_iTunesDB
+ *
+ * Gets the podcasts playlist of @itdb
+ *
+ * Returns: the podcasts playlist of @itdb, or NULL if there is
+ * not one
+ *
+ * Since: 0.1.6
+ */
+Itdb_Playlist *itdb_playlist_podcasts (Itdb_iTunesDB *itdb)
+{
+    GList *gl;
+
+    g_return_val_if_fail (itdb, NULL);
+
+    for (gl=itdb->playlists; gl; gl=gl->next)
+    {
+	Itdb_Playlist *pl = gl->data;
+	g_return_val_if_fail (pl, NULL);
+
+	if (itdb_playlist_is_podcasts (pl))    return pl;
+    }
+
+    return NULL;
+}
+
+/**
+ * itdb_playlist_contains_track:
+ * @pl:     an #Itdb_Playlist
+ * @track:  an #Itdb_Track
+ *
+ * Checks if @track is in @pl
+ *
+ * Returns: TRUE if @track is in @pl, FALSE otherwise
+ */
+gboolean itdb_playlist_contains_track (Itdb_Playlist *pl, Itdb_Track *tr)
+{
+    g_return_val_if_fail (tr, FALSE);
+
+    if (pl == NULL)
+	pl = itdb_playlist_mpl (tr->itdb);
+
+    g_return_val_if_fail (pl, FALSE);
+
+    if (g_list_find (pl->members, tr))  return TRUE;
+    else                                return FALSE;
+}
+
+/**
+ * itdb_playlist_contain_track_number:
+ * @tr: an #Itdb_Track
+ *
+ * Counts the number of playlist @track is a member of (not including
+ * the master playlist)
+ *
+ * Returns: the number of playlist containing @track
+ */
+guint32 itdb_playlist_contain_track_number (Itdb_Track *tr)
+{
+    Itdb_iTunesDB *itdb;
+    guint32 num = 0;
+    GList *gl;
+
+    g_return_val_if_fail (tr, 0);
+    itdb = tr->itdb;
+    g_return_val_if_fail (itdb, 0);
+
+    /* start with 2nd playlist (skip MPL) */
+    gl = g_list_nth (itdb->playlists, 1);
+    while (gl)
+    {
+	g_return_val_if_fail (gl->data, num);
+	if (itdb_playlist_contains_track (gl->data, tr)) ++num;
+	gl = gl->next;
+    }
+    return num;
+}
+
+/**
+ * itdb_playlist_tracks_number:
+ * @pl: an #Itdb_Playlist
+ *
+ * Counts the number of tracks in @pl
+ *
+ * Returns: the number of tracks in @pl
+ */
+guint32 itdb_playlist_tracks_number (Itdb_Playlist *pl)
+{
+    g_return_val_if_fail (pl, 0);
+
+    return g_list_length (pl->members);
+}

Added: libgpod/trunk/libgpod/branches/upstream/current/src/itdb_plist.c
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/itdb_plist.c	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/itdb_plist.c	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,472 @@
+/*
+|  Copyright (C) 2008 Christophe Fergeau <teuf at gnome.org>
+|  Part of the gtkpod project.
+|
+|  URL: http://www.gtkpod.org/
+|  URL: http://gtkpod.sourceforge.net/
+|
+|  The code contained in this file is free software; you can redistribute
+|  it and/or modify it under the terms of the GNU Lesser General Public
+|  License as published by the Free Software Foundation; either version
+|  2.1 of the License, or (at your option) any later version.
+|
+|  This file 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
+|  Lesser General Public License for more details.
+|
+|  You should have received a copy of the GNU Lesser General Public
+|  License along with this code; if not, write to the Free Software
+|  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+|
+|  iTunes and iPod are trademarks of Apple
+|
+|  This product is not supported/written/published by Apple!
+|
+|  $Id$
+*/
+
+/* This file implements a generic plist parser. A plist file is an
+ * Apple-specific XML format which is used to serialize (simple) data
+ * structures to disk, see http://en.wikipedia.org/wiki/Property_list
+ *
+ * This parser should handle most plist files, with those limitations :
+ *      - no support for <date> tags
+ *
+ * The plist file is parsed using libxml, and the parsed result is stored
+ * in GValue. The types are mapped in the following way:
+ *      - <string> => G_TYPE_STRING (char*)
+ *      - <real> => G_TYPE_DOUBLE (double)
+ *      - <integer> => G_TYPE_INT (gint)
+ *      - <true/>, <false/> => G_TYPE_BOOLEAN (gboolean)
+ *      - <data> => G_TYPE_GSTRING (GString *)
+ *      - <array> => G_TYPE_VALUE_ARRAY (GValueArray *)
+ *      - <dict> => G_TYPE_HASH_TABLE (GHashTable *)
+ */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef HAVE_LIBXML
+
+#include <stdio.h>
+#include <string.h>
+#include <libxml/parser.h>
+#include <libxml/tree.h>
+#include <glib.h>
+#include <glib-object.h>
+
+#include "itdb_plist.h"
+
+#ifdef DEBUG_SYSINFO_PARSING
+#define DEBUG g_print
+#else
+#define DEBUG(...)
+#endif
+
+/* Error domain */
+#define ITDB_DEVICE_ERROR itdb_device_error_quark ()
+extern GQuark itdb_device_error_quark (void);
+
+static GValue *parse_node (xmlNode *a_node, GError **error);
+
+static void
+value_free (GValue *val)
+{
+    g_value_unset (val);
+    g_free (val);
+}
+
+static GValue *
+parse_integer(xmlNode *a_node, GError **error)
+{
+    char *str_val;
+    char *end_ptr;
+    gint int_val;
+    GValue *value;
+
+    str_val = (char *)xmlNodeGetContent(a_node);
+    int_val = strtol (str_val, &end_ptr, 0);
+    if (*end_ptr != '\0') {
+        g_set_error (error, ITDB_DEVICE_ERROR, ITDB_DEVICE_ERROR_XML_PARSING,
+                     "invalid integer value: %s", str_val);
+        xmlFree (str_val);
+        return NULL;
+    }
+    xmlFree (str_val);
+
+    value = g_new0(GValue, 1);
+    g_value_init(value, G_TYPE_INT);
+    g_value_set_int (value, int_val);
+
+    return value;
+}
+
+static GValue *
+parse_string(xmlNode *a_node, G_GNUC_UNUSED GError **error)
+{
+    char *str_val;
+    GValue *value;
+
+    str_val = (char *)xmlNodeGetContent(a_node);
+
+    value = g_new0(GValue, 1);
+    g_value_init(value, G_TYPE_STRING);
+    g_value_set_string (value, str_val);
+
+    xmlFree (str_val);
+
+    return value;
+}
+
+static GValue *
+parse_real(xmlNode *a_node, GError **error)
+{
+    char *str_val;
+    char *end_ptr;
+    gfloat double_val;
+    GValue *value;
+
+    str_val = (char *)xmlNodeGetContent(a_node);
+    double_val = g_ascii_strtod (str_val, &end_ptr);
+    if (*end_ptr != '\0') {
+        g_set_error (error, ITDB_DEVICE_ERROR, ITDB_DEVICE_ERROR_XML_PARSING,
+                     "invalid real value: %s", str_val);
+        xmlFree (str_val);
+        return NULL;
+    }
+    xmlFree (str_val);
+
+    value = g_new0(GValue, 1);
+    g_value_init(value, G_TYPE_DOUBLE);
+    g_value_set_double (value, double_val);
+
+    return value;
+}
+
+static GValue *
+parse_boolean (xmlNode *a_node, GError **error)
+{
+    gboolean bool_val;
+    GValue *value;
+
+    if (strcmp ((char *)a_node->name, "true") == 0) {
+        bool_val = TRUE;
+    } else if (strcmp ((char *)a_node->name, "false") == 0) {
+        bool_val = FALSE;
+    } else {
+        g_set_error (error, ITDB_DEVICE_ERROR, ITDB_DEVICE_ERROR_XML_PARSING,
+                     "unexpected boolean value: %s", a_node->name);
+        return NULL;
+    }
+
+    value = g_new0 (GValue, 1);
+    g_value_init (value, G_TYPE_BOOLEAN);
+    g_value_set_boolean (value, bool_val);
+
+    return value;
+}
+
+static GValue *
+parse_data (xmlNode *a_node, G_GNUC_UNUSED GError **error)
+{
+    char *str_val;
+    guchar *raw_data;
+    gsize len;
+    GString *data_val;
+    GValue *value;
+
+    str_val = (char *)xmlNodeGetContent(a_node);
+#if GLIB_CHECK_VERSION(2,12,0)
+    /* base64 support only after GLib 2.12 */
+    raw_data = g_base64_decode (str_val, &len);
+#else
+#warning GLib > 2.12 required for g_base64_decode(). Working around this problem.
+    raw_data = g_strdup ("");
+    len = 0;
+#endif
+    xmlFree (str_val);
+    data_val = g_string_new_len ((char *)raw_data, len);
+    g_free (raw_data);
+
+    value = g_new0(GValue, 1);
+    g_value_init(value, G_TYPE_GSTRING);
+    g_value_take_boxed (value, data_val);
+
+    return value;
+}
+
+static xmlNode *
+parse_one_dict_entry (xmlNode *a_node, GHashTable *dict, GError **error)
+{
+    xmlNode *cur_node = a_node;
+    xmlChar *key_name;
+    GValue *value;
+
+    while ((cur_node != NULL) && (xmlStrcmp(cur_node->name, (xmlChar *)"key") != 0)) {
+        if (!xmlIsBlankNode (cur_node)) {
+            DEBUG ("skipping %s\n", cur_node->name);
+        }
+        cur_node = cur_node->next;
+    }
+    if (cur_node == NULL) {
+        g_set_error (error, ITDB_DEVICE_ERROR, ITDB_DEVICE_ERROR_XML_PARSING,
+                     "Dict entry contains no <key> node");
+        return NULL;
+    }
+    key_name = xmlNodeGetContent (cur_node);
+    cur_node = cur_node->next;
+    while ((cur_node != NULL) && xmlIsBlankNode (cur_node)) {
+        cur_node = cur_node->next;
+    }
+    if (cur_node == NULL) {
+        g_set_error (error, ITDB_DEVICE_ERROR, ITDB_DEVICE_ERROR_XML_PARSING,
+                     "<key> %s with no corresponding value node", key_name);
+        xmlFree (key_name);
+        return NULL;
+    }
+
+    value = parse_node (cur_node, error);
+    if (value != NULL) {
+        g_hash_table_insert (dict, g_strdup ((char *)key_name), value);
+    } else {
+        g_warning ("Couldn't parse value for %s: %s",
+                   key_name, (*error)->message);
+        g_clear_error (error);
+    }
+    xmlFree (key_name);
+
+    return cur_node->next;
+}
+
+static GValue *
+parse_dict (xmlNode *a_node, GError **error)
+{
+    xmlNode *cur_node = a_node->children;
+    GValue *value;
+    GHashTable *dict;
+
+    dict = g_hash_table_new_full (g_str_hash, g_str_equal,
+                                  g_free, (GDestroyNotify)value_free);
+
+    while (cur_node != NULL) {
+	if (xmlIsBlankNode (cur_node)) {
+	    cur_node = cur_node->next;
+	} else {
+	    cur_node = parse_one_dict_entry (cur_node, dict, error);
+	}
+    }
+    if ((error != NULL) && (*error != NULL)) {
+        g_hash_table_destroy (dict);
+        return NULL;
+    }
+    value = g_new0 (GValue, 1);
+    value = g_value_init (value, G_TYPE_HASH_TABLE);
+    g_value_take_boxed (value, dict);
+
+    return value;
+}
+	
+typedef GValue *(*ParseCallback) (xmlNode *, GError **);
+static ParseCallback get_parser_for_type (const xmlChar *type);
+
+static GValue *
+parse_array (xmlNode *a_node, GError **error)
+{
+    xmlNode *cur_node = a_node->children;
+    GValue *value;
+    GValueArray *array;
+
+    array = g_value_array_new (4);
+
+    while (cur_node != NULL) {
+	if (get_parser_for_type (cur_node->name) != NULL) {
+   	    GValue *cur_value;
+	    cur_value = parse_node (cur_node, error);
+	    if (cur_value != NULL) {
+	        array = g_value_array_append (array, cur_value);
+		g_value_unset (cur_value);
+		g_free (cur_value);
+	    }
+	}
+	/* When an array contains an element enclosed in "unknown" tags (ie
+	 * non-type ones), we silently skip them since early
+	 * SysInfoExtended files used to have <key> values enclosed within
+	 * <array> tags.
+	 */
+	cur_node = cur_node->next;
+    }
+
+    if ((error != NULL) && (*error != NULL)) {
+	g_value_array_free (array);
+        return NULL;
+    }
+    value = g_new0 (GValue, 1);
+    value = g_value_init (value, G_TYPE_VALUE_ARRAY);
+    g_value_take_boxed (value, array);
+
+    return value;
+}
+
+struct Parser {
+    const char * const type_name;
+    ParseCallback parser;
+};
+
+static const struct Parser parsers[] = { {"integer", parse_integer},
+					 {"real",    parse_real},
+					 {"string",  parse_string},
+					 {"true",    parse_boolean},
+					 {"false",   parse_boolean},
+					 {"data",    parse_data},
+					 {"dict",    parse_dict},
+					 {"array",   parse_array},
+					 {NULL,      NULL} };
+
+static ParseCallback get_parser_for_type (const xmlChar *type)
+{
+    guint i = 0;
+
+    while (parsers[i].type_name != NULL) {
+        if (xmlStrcmp (type, (xmlChar *)parsers[i].type_name) == 0) {
+            if (parsers[i].parser != NULL) {
+                return parsers[i].parser;
+            }
+        }
+        i++;
+    }
+    return NULL;
+}
+
+static GValue *parse_node (xmlNode *a_node, GError **error)
+{
+    ParseCallback parser;
+
+    g_return_val_if_fail (a_node != NULL, NULL);
+    parser = get_parser_for_type (a_node->name);
+    if (parser != NULL) {
+	return parser (a_node, error);
+    } else {
+	DEBUG ("no parser for <%s>\n", a_node->name);
+	return NULL;
+    }
+}
+
+static GValue *
+itdb_plist_parse (xmlNode * a_node, GError **error)
+{
+    xmlNode *cur_node;
+    if (a_node == NULL) {
+        g_set_error (error, ITDB_DEVICE_ERROR, ITDB_DEVICE_ERROR_XML_PARSING,
+                     "Empty XML document");
+        return NULL;
+    }
+    if (xmlStrcmp (a_node->name, (xmlChar *)"plist") != 0) {
+        g_set_error (error, ITDB_DEVICE_ERROR, ITDB_DEVICE_ERROR_XML_PARSING,
+                     "XML document does not seem to be a plist document");
+        return NULL;
+    }
+    cur_node = a_node->xmlChildrenNode;
+    while ((cur_node != NULL) && (xmlIsBlankNode (cur_node))) {
+        cur_node = cur_node->next;
+    }
+    if (cur_node != NULL) {
+        return parse_node (cur_node, error);
+    }
+    g_set_error (error, ITDB_DEVICE_ERROR, ITDB_DEVICE_ERROR_XML_PARSING,
+                 "Empty XML document");
+    return NULL;
+}
+
+/**
+ * itdb_plist_parse:
+ * @filename:   name of the XML plist file to parse
+ * @error:      return location for a #GError
+ *
+ * Parses the XML plist file stored in @filename. If an error occurs
+ * during the parsing, itdb_plist_parse will return NULL and @error
+ * will be set
+ *
+ * Returns: NULL on error (@error will be set), a newly allocated
+ * #GValue containing a #GHashTable otherwise.
+ */
+GValue *
+itdb_plist_parse_from_file (const char *filename, GError **error)
+{
+    xmlDoc *doc = NULL;
+    xmlNode *root_element = NULL;
+    GValue *parsed_doc;
+
+    doc = xmlReadFile(filename, NULL, 0);
+
+    if (doc == NULL) {
+        g_set_error (error, ITDB_DEVICE_ERROR, ITDB_DEVICE_ERROR_XML_PARSING,
+                     "Error during XML parsing of file %s", filename);
+        return NULL;
+    }
+
+    root_element = xmlDocGetRootElement(doc);
+
+    parsed_doc = itdb_plist_parse (root_element, error);
+
+    xmlFreeDoc(doc);
+    xmlCleanupParser();
+
+    return parsed_doc;
+}
+
+/**
+ * itdb_plist_parse_from_memory:
+ * @data:   memory location containing XML plist data to parse
+ * @len:    length in bytes of the string to parse
+ * @error:  return location for a #GError
+ *
+ * Parses the XML plist file stored in @data which length is @len
+ * bytes. If an error occurs during the parsing,
+ * itdb_plist_parse_from_memory() will return NULL and @error will be
+ * set.
+ *
+ * Returns: NULL on error (@error will be set), a newly allocated
+ * #GValue containing a #GHashTable otherwise.
+ */
+GValue *
+itdb_plist_parse_from_memory (const char *data, gsize len, GError **error)
+{
+    xmlDoc *doc = NULL;
+    xmlNode *root_element = NULL;
+    GValue *parsed_doc;
+
+    doc = xmlReadMemory(data, len, "noname.xml", NULL, 0);
+
+    if (doc == NULL) {
+        g_set_error (error, ITDB_DEVICE_ERROR, ITDB_DEVICE_ERROR_XML_PARSING,
+                     "Error during XML parsing of in-memory data");
+        return NULL;
+    }
+
+    root_element = xmlDocGetRootElement(doc);
+
+    parsed_doc = itdb_plist_parse (root_element, error);
+
+    xmlFreeDoc(doc);
+    xmlCleanupParser();
+
+    return parsed_doc;
+}
+#else
+#include <glib-object.h>
+#include "itdb_plist.h"
+
+GValue *itdb_plist_parse_from_file (G_GNUC_UNUSED const char *filename,
+                                    G_GNUC_UNUSED GError **error)
+{
+    return NULL;
+}
+
+GValue *itdb_plist_parse_from_memory (G_GNUC_UNUSED const char *data,
+                                      G_GNUC_UNUSED gsize len,
+                                      G_GNUC_UNUSED GError **error)
+{
+    return NULL;
+}
+#endif

Added: libgpod/trunk/libgpod/branches/upstream/current/src/itdb_plist.h
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/itdb_plist.h	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/itdb_plist.h	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,48 @@
+/*
+|  Copyright (C) 2008 Christophe Fergeau <teuf at gnome.org>
+|  Part of the gtkpod project.
+| 
+|  URL: http://www.gtkpod.org/
+|  URL: http://gtkpod.sourceforge.net/
+|
+|  The code contained in this file is free software; you can redistribute
+|  it and/or modify it under the terms of the GNU Lesser General Public
+|  License as published by the Free Software Foundation; either version
+|  2.1 of the License, or (at your option) any later version.
+|
+|  This file 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
+|  Lesser General Public License for more details.
+|
+|  You should have received a copy of the GNU Lesser General Public
+|  License along with this code; if not, write to the Free Software
+|  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+|
+|  iTunes and iPod are trademarks of Apple
+|
+|  This product is not supported/written/published by Apple!
+|
+|  $Id$
+*/
+
+#ifndef __ITDB_PLIST_H__
+#define __ITDB_PLIST_H__
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+typedef enum {
+	ITDB_DEVICE_ERROR_XML_PARSING
+} ItdbDeviceError;
+
+G_GNUC_INTERNAL GValue *itdb_plist_parse_from_file (const char *filename,
+						    GError **error);
+G_GNUC_INTERNAL GValue *itdb_plist_parse_from_memory (const char *data, 
+                                                      gsize len,
+						      GError **error); 
+
+G_END_DECLS
+
+#endif

Added: libgpod/trunk/libgpod/branches/upstream/current/src/itdb_private.h
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/itdb_private.h	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/itdb_private.h	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,174 @@
+/*
+|  Copyright (C) 2002-2007 Jorg Schuler <jcsjcs at users sourceforge net>
+|  Part of the gtkpod project.
+| 
+|  URL: http://www.gtkpod.org/
+|  URL: http://gtkpod.sourceforge.net/
+|
+|  The code contained in this file is free software; you can redistribute
+|  it and/or modify it under the terms of the GNU Lesser General Public
+|  License as published by the Free Software Foundation; either version
+|  2.1 of the License, or (at your option) any later version.
+|
+|  This file 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
+|  Lesser General Public License for more details.
+|
+|  You should have received a copy of the GNU Lesser General Public
+|  License along with this code; if not, write to the Free Software
+|  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+|
+|  iTunes and iPod are trademarks of Apple
+|
+|  This product is not supported/written/published by Apple!
+|
+|  $Id: itdb_private.h 2306 2009-04-05 15:41:56Z teuf $
+*/
+
+#ifndef __ITDB_PRIVATE_H__
+#define __ITDB_PRIVATE_H__
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+#include "itdb_device.h"
+#include "itdb.h"
+
+/* always use itdb_playlist_is_mpl() to check for MPL! */
+enum ItdbPlType { /* types for playlist->type */
+    ITDB_PL_TYPE_NORM = 0,       /* normal playlist, visible in iPod */
+    ITDB_PL_TYPE_MPL = 1         /* master playlist, contains all tracks,
+				    not visible in iPod */
+};
+
+/* always use itdb_playlists_is_podcasts() to check for podcasts PL */
+enum ItdbPlFlag { /* types for playlist->podcastflag */
+    ITDB_PL_FLAG_NORM = 0,       /* normal playlist, visible under
+				    'Playlists  */
+    ITDB_PL_FLAG_PODCASTS = 1    /* special podcast playlist visible
+				    under 'Music' */
+};
+
+
+struct FContents_;
+
+typedef struct
+{
+    guint16 (* get16int) (struct FContents_ *cts, glong seek);
+    guint32 (* get24int) (struct FContents_ *cts, glong seek);
+    guint32 (* get32int) (struct FContents_ *cts, glong seek);
+    guint64 (* get64int) (struct FContents_ *cts, glong seek);
+    float (* get32float) (struct FContents_ *cts, glong seek);
+} ByteReader;
+
+/* keeps the contents of one disk file (read) */
+typedef struct FContents_
+{
+    gchar *filename;
+    gchar *contents;
+    /* indicate that endian order is reversed as in the case of the
+       iTunesDBs for mobile phones */
+    gboolean reversed;
+    ByteReader le_reader;
+    ByteReader be_reader;
+    gsize length;
+    GError *error;
+} FContents;
+
+/* struct used to hold all necessary information when importing a
+   Itdb_iTunesDB */
+typedef struct
+{
+    Itdb_iTunesDB *itdb;
+    FContents *fcontents;
+    GList *pos_glist;    /* temporary list to store position indicators */
+    GList *tracks;       /* temporary list to store tracks */
+    GList *playcounts;   /* contents of Play Counts file */
+    GTree *idtree;       /* temporary tree with track id tree */
+    GError *error;       /* where to report errors to */
+} FImport;
+
+/* data of playcounts GList above */
+struct playcount {
+    guint32 playcount;
+    guint32 skipped;     /* skipped (only for Shuffle's iTunesStats */
+    time_t time_played;
+    guint32 bookmark_time;
+    gint32 rating;
+    gint32 pc_unk16;     /* unknown field in Play Counts file */
+    guint32 skipcount;
+    time_t last_skipped;
+    gint32 st_unk06;     /* unknown field in iTunesStats file */
+    gint32 st_unk09;     /* unknown field in iTunesStats file */
+};
+
+/* value to indicate that playcount was not set in struct playcount
+   above */
+#define NO_PLAYCOUNT (-1)
+
+
+/* keeps the contents of the output file (write) */
+typedef struct
+{
+    gchar *filename;
+    gchar *contents;     /* pointer to contents */
+    /* indicate that endian order is reversed as in the case of the
+       iTunesDBs for mobile phones */
+    gboolean reversed;
+    gulong pos;          /* current write position ("end of file") */
+    gulong total;        /* current total size of *contents array  */
+    GError *error;       /* place to report errors to */
+} WContents;
+
+/* size of memory by which the total size of above WContents gets
+ * increased (1.5 MB) */
+#define WCONTENTS_STEPSIZE 1572864
+
+/* struct used to hold all necessary information when exporting a
+ * Itdb_iTunesDB */
+typedef struct
+{
+    Itdb_iTunesDB *itdb;
+    WContents *wcontents;
+    guint32 next_id;     /* next free ID to use       */
+    GHashTable *albums;  /* used to build the MHLA    */
+    GError *error;       /* where to report errors to */
+} FExport;
+
+
+enum _DbType {
+    DB_TYPE_ITUNES,
+    DB_TYPE_PHOTO
+};
+
+typedef enum _DbType DbType;
+
+struct _Itdb_DB{
+	DbType db_type;
+	union {
+		Itdb_PhotoDB *photodb; 
+		Itdb_iTunesDB *itdb;
+	} db;
+};
+
+typedef struct _Itdb_DB Itdb_DB;
+
+G_GNUC_INTERNAL gboolean itdb_spl_action_known (ItdbSPLAction action);
+G_GNUC_INTERNAL void itdb_splr_free (Itdb_SPLRule *splr);
+G_GNUC_INTERNAL const gchar *itdb_photodb_get_mountpoint (Itdb_PhotoDB *photodb);
+G_GNUC_INTERNAL gchar *db_get_mountpoint (Itdb_DB *db);
+G_GNUC_INTERNAL Itdb_Device *db_get_device(Itdb_DB *db);
+G_GNUC_INTERNAL gint itdb_get_max_photo_id ( Itdb_PhotoDB *db );
+G_GNUC_INTERNAL Itdb_iTunesDB *db_get_itunesdb (Itdb_DB *db);
+G_GNUC_INTERNAL Itdb_PhotoDB *db_get_photodb (Itdb_DB *db);
+G_GNUC_INTERNAL gint itdb_thumb_get_byteorder (ItdbThumbFormat format);
+G_GNUC_INTERNAL time_t device_time_mac_to_time_t (Itdb_Device *device, 
+						guint64 mactime);
+G_GNUC_INTERNAL guint64 device_time_time_t_to_mac (Itdb_Device *device,
+						 time_t timet);
+G_GNUC_INTERNAL gint itdb_musicdirs_number_by_mountpoint (const gchar *mountpoint);
+G_GNUC_INTERNAL gboolean itdb_file_set_contents (const char *filename, 
+                                                 const char *data, gssize len, 
+                                                 GError **error);
+#endif

Added: libgpod/trunk/libgpod/branches/upstream/current/src/itdb_sha1.c
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/itdb_sha1.c	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/itdb_sha1.c	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,213 @@
+/*
+|  Copyright (C) 2007 Christophe Fergeau <teuf at gnome.org>
+|
+|  The code in this file is heavily based on the proof-of-concept code
+|  written by wtbw
+|
+| Redistribution and use in source and binary forms, with or without
+| modification, are permitted provided that the following conditions are met:
+|
+|   1. Redistributions of source code must retain the above copyright
+| notice, this list of conditions and the following disclaimer.
+|   2. Redistributions in binary form must reproduce the above copyright
+| notice, this list of conditions and the following disclaimer in the
+| documentation and/or other materials provided with the distribution.
+|   3. The name of the author may not be used to endorse or promote
+| products derived from this software without specific prior written
+| permission.
+|
+| THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+| IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+| OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+| IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+| INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+| BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+| OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+| ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+| OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+| OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+| OF SUCH DAMAGE.
+|
+|
+|  iTunes and iPod are trademarks of Apple
+|
+|  This product is not supported/written/published by Apple!
+*/
+
+#include <glib.h>
+#include "itdb_sha1.h"
+#include "sha1.h"
+
+static const unsigned char table1[256] = {
+	0x63, 0x7C, 0x77, 0x7B, 0xF2, 0x6B, 0x6F, 0xC5, 
+	0x30, 0x01, 0x67, 0x2B, 0xFE, 0xD7, 0xAB, 0x76,
+	0xCA, 0x82, 0xC9, 0x7D, 0xFA, 0x59, 0x47, 0xF0, 
+	0xAD, 0xD4, 0xA2, 0xAF, 0x9C, 0xA4, 0x72, 0xC0,
+	0xB7, 0xFD, 0x93, 0x26, 0x36, 0x3F, 0xF7, 0xCC, 
+	0x34, 0xA5, 0xE5, 0xF1, 0x71, 0xD8, 0x31, 0x15,
+	0x04, 0xC7, 0x23, 0xC3, 0x18, 0x96, 0x05, 0x9A, 
+	0x07, 0x12, 0x80, 0xE2, 0xEB, 0x27, 0xB2, 0x75,
+	0x09, 0x83, 0x2C, 0x1A, 0x1B, 0x6E, 0x5A, 0xA0, 
+	0x52, 0x3B, 0xD6, 0xB3, 0x29, 0xE3, 0x2F, 0x84,
+	0x53, 0xD1, 0x00, 0xED, 0x20, 0xFC, 0xB1, 0x5B, 
+	0x6A, 0xCB, 0xBE, 0x39, 0x4A, 0x4C, 0x58, 0xCF,
+	0xD0, 0xEF, 0xAA, 0xFB, 0x43, 0x4D, 0x33, 0x85, 
+	0x45, 0xF9, 0x02, 0x7F, 0x50, 0x3C, 0x9F, 0xA8,
+	0x51, 0xA3, 0x40, 0x8F, 0x92, 0x9D, 0x38, 0xF5, 
+	0xBC, 0xB6, 0xDA, 0x21, 0x10, 0xFF, 0xF3, 0xD2,
+	0xCD, 0x0C, 0x13, 0xEC, 0x5F, 0x97, 0x44, 0x17, 
+	0xC4, 0xA7, 0x7E, 0x3D, 0x64, 0x5D, 0x19, 0x73,
+	0x60, 0x81, 0x4F, 0xDC, 0x22, 0x2A, 0x90, 0x88, 
+	0x46, 0xEE, 0xB8, 0x14, 0xDE, 0x5E, 0x0B, 0xDB,
+	0xE0, 0x32, 0x3A, 0x0A, 0x49, 0x06, 0x24, 0x5C, 
+	0xC2, 0xD3, 0xAC, 0x62, 0x91, 0x95, 0xE4, 0x79,
+	0xE7, 0xC8, 0x37, 0x6D, 0x8D, 0xD5, 0x4E, 0xA9, 
+	0x6C, 0x56, 0xF4, 0xEA, 0x65, 0x7A, 0xAE, 0x08,
+	0xBA, 0x78, 0x25, 0x2E, 0x1C, 0xA6, 0xB4, 0xC6, 
+	0xE8, 0xDD, 0x74, 0x1F, 0x4B, 0xBD, 0x8B, 0x8A,
+	0x70, 0x3E, 0xB5, 0x66, 0x48, 0x03, 0xF6, 0x0E, 
+	0x61, 0x35, 0x57, 0xB9, 0x86, 0xC1, 0x1D, 0x9E,
+	0xE1, 0xF8, 0x98, 0x11, 0x69, 0xD9, 0x8E, 0x94, 
+	0x9B, 0x1E, 0x87, 0xE9, 0xCE, 0x55, 0x28, 0xDF,
+	0x8C, 0xA1, 0x89, 0x0D, 0xBF, 0xE6, 0x42, 0x68, 
+	0x41, 0x99, 0x2D, 0x0F, 0xB0, 0x54, 0xBB, 0x16
+};
+
+static const unsigned char table2[256] = {
+	0x52, 0x09, 0x6A, 0xD5, 0x30, 0x36, 0xA5, 0x38, 
+	0xBF, 0x40, 0xA3, 0x9E, 0x81, 0xF3, 0xD7, 0xFB,
+	0x7C, 0xE3, 0x39, 0x82, 0x9B, 0x2F, 0xFF, 0x87, 
+	0x34, 0x8E, 0x43, 0x44, 0xC4, 0xDE, 0xE9, 0xCB,
+	0x54, 0x7B, 0x94, 0x32, 0xA6, 0xC2, 0x23, 0x3D, 
+	0xEE, 0x4C, 0x95, 0x0B, 0x42, 0xFA, 0xC3, 0x4E,
+	0x08, 0x2E, 0xA1, 0x66, 0x28, 0xD9, 0x24, 0xB2, 
+	0x76, 0x5B, 0xA2, 0x49, 0x6D, 0x8B, 0xD1, 0x25,
+	0x72, 0xF8, 0xF6, 0x64, 0x86, 0x68, 0x98, 0x16, 
+	0xD4, 0xA4, 0x5C, 0xCC, 0x5D, 0x65, 0xB6, 0x92,
+	0x6C, 0x70, 0x48, 0x50, 0xFD, 0xED, 0xB9, 0xDA, 
+	0x5E, 0x15, 0x46, 0x57, 0xA7, 0x8D, 0x9D, 0x84,
+	0x90, 0xD8, 0xAB, 0x00, 0x8C, 0xBC, 0xD3, 0x0A, 
+	0xF7, 0xE4, 0x58, 0x05, 0xB8, 0xB3, 0x45, 0x06,
+	0xD0, 0x2C, 0x1E, 0x8F, 0xCA, 0x3F, 0x0F, 0x02, 
+	0xC1, 0xAF, 0xBD, 0x03, 0x01, 0x13, 0x8A, 0x6B,
+	0x3A, 0x91, 0x11, 0x41, 0x4F, 0x67, 0xDC, 0xEA, 
+	0x97, 0xF2, 0xCF, 0xCE, 0xF0, 0xB4, 0xE6, 0x73,
+	0x96, 0xAC, 0x74, 0x22, 0xE7, 0xAD, 0x35, 0x85, 
+	0xE2, 0xF9, 0x37, 0xE8, 0x1C, 0x75, 0xDF, 0x6E,
+	0x47, 0xF1, 0x1A, 0x71, 0x1D, 0x29, 0xC5, 0x89, 
+	0x6F, 0xB7, 0x62, 0x0E, 0xAA, 0x18, 0xBE, 0x1B,
+	0xFC, 0x56, 0x3E, 0x4B, 0xC6, 0xD2, 0x79, 0x20, 
+	0x9A, 0xDB, 0xC0, 0xFE, 0x78, 0xCD, 0x5A, 0xF4,
+	0x1F, 0xDD, 0xA8, 0x33, 0x88, 0x07, 0xC7, 0x31, 
+	0xB1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xEC, 0x5F,
+	0x60, 0x51, 0x7F, 0xA9, 0x19, 0xB5, 0x4A, 0x0D, 
+	0x2D, 0xE5, 0x7A, 0x9F, 0x93, 0xC9, 0x9C, 0xEF,
+	0xA0, 0xE0, 0x3B, 0x4D, 0xAE, 0x2A, 0xF5, 0xB0, 
+	0xC8, 0xEB, 0xBB, 0x3C, 0x83, 0x53, 0x99, 0x61,
+	0x17, 0x2B, 0x04, 0x7E, 0xBA, 0x77, 0xD6, 0x26, 
+	0xE1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0C, 0x7D
+};
+
+static const unsigned char fixed[18] = {
+    0x67, 0x23, 0xFE, 0x30, 0x45, 0x33, 0xF8, 0x90, 0x99,
+    0x21, 0x07, 0xC1, 0xD0, 0x12, 0xB2, 0xA1, 0x07, 0x81
+};
+
+
+static int gcd(int a, int b){
+    while (TRUE)
+    {
+        a = a % b;
+        if( a == 0 )
+            return b;
+        b = b % a;
+        if( b == 0 )
+            return a;
+    }
+}
+
+static int lcm(int a, int b)
+{
+    if(a==0 || b==0)
+        return 1;
+
+    return (a*b)/gcd(a,b);
+}
+
+static unsigned char *generate_key (guint64 fwid)
+{
+    unsigned char *key;
+    unsigned char y[16];
+    SHA_INFO context;
+    int i;
+    guint64 fwid_be = GUINT64_TO_BE (fwid);
+    const unsigned char *firewire_id = (const unsigned char *)&fwid_be;
+
+    /* take LCM of each two bytes in the FWID in turn */
+    for (i=0; i<4; i++){
+        int a = firewire_id[i*2];
+        int b = firewire_id[i*2+1];
+        int cur_lcm = lcm(a,b);
+
+        unsigned char hi = (cur_lcm & 0xFF00) >> 8;
+        unsigned char lo = cur_lcm & 0xFF;
+
+        y[i*4    ] = table1[hi];
+        y[i*4 + 1] = table2[hi];
+        y[i*4 + 2] = table1[lo];
+        y[i*4 + 3] = table2[lo];
+    }
+
+    /* hash */
+    sha_init(&context);
+    sha_update(&context, fixed, 18);
+    sha_update(&context, y, 16);
+
+    key = g_new0 (unsigned char, 64);
+    sha_final(key, &context);
+
+    return key;
+}
+
+unsigned char *itdb_compute_hash (guint64 firewire_id,
+                                  const unsigned char *itdb,
+                                  unsigned long size, 
+				  gsize *len)
+{
+    unsigned char *key;
+    unsigned char *hash;
+    SHA_INFO context;
+    int i;
+    const gsize CHECKSUM_LEN = 20;
+    
+    key = generate_key(firewire_id);
+
+    /* hmac sha1 */
+    for (i=0; i < 64; i++)
+    {
+        key[i] ^= 0x36;
+    }
+
+    /* 20 bytes for the checksum, and 1 trailing \0 */
+    hash = g_new0 (unsigned char, CHECKSUM_LEN + 1);
+    sha_init(&context);
+    sha_update(&context, key, 64);
+    sha_update(&context, itdb, size);
+    sha_final(hash, &context);
+
+    for (i=0; i < 64; i++)
+        key[i] ^= 0x36 ^ 0x5c;
+
+    sha_init(&context);
+    sha_update(&context, key, 64);
+    sha_update(&context, hash, CHECKSUM_LEN);
+    sha_final(hash, &context);
+
+    g_free (key);
+
+    if (len != NULL) {
+	*len = CHECKSUM_LEN;
+    }
+
+    return hash;
+}

Added: libgpod/trunk/libgpod/branches/upstream/current/src/itdb_sha1.h
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/itdb_sha1.h	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/itdb_sha1.h	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,37 @@
+/*
+|  Copyright (C) 2002-2007 Jorg Schuler <jcsjcs at users sourceforge net>
+|  Part of the gtkpod project.
+| 
+|  URL: http://www.gtkpod.org/
+|  URL: http://gtkpod.sourceforge.net/
+|
+|  The code contained in this file is free software; you can redistribute
+|  it and/or modify it under the terms of the GNU Lesser General Public
+|  License as published by the Free Software Foundation; either version
+|  2.1 of the License, or (at your option) any later version.
+|
+|  This file 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
+|  Lesser General Public License for more details.
+|
+|  You should have received a copy of the GNU Lesser General Public
+|  License along with this code; if not, write to the Free Software
+|  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+|
+|  iTunes and iPod are trademarks of Apple
+|
+|  This product is not supported/written/published by Apple!
+|
+|  $Id$
+*/
+
+#ifndef __ITDB_SHA1_H__
+#define __ITDB_SHA1_H__
+
+#include <glib.h>
+
+unsigned char *itdb_compute_hash (guint64 firewire_id,
+                                  const unsigned char *itdb,
+                                  unsigned long size, gsize *len);
+#endif

Added: libgpod/trunk/libgpod/branches/upstream/current/src/itdb_sysinfo_extended_parser.c
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/itdb_sysinfo_extended_parser.c	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/itdb_sysinfo_extended_parser.c	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,649 @@
+/*
+|  Copyright (C) 2008 Christophe Fergeau <teuf at gnome.org>
+|  Part of the gtkpod project.
+|
+|  URL: http://www.gtkpod.org/
+|  URL: http://gtkpod.sourceforge.net/
+|
+|  The code contained in this file is free software; you can redistribute
+|  it and/or modify it under the terms of the GNU Lesser General Public
+|  License as published by the Free Software Foundation; either version
+|  2.1 of the License, or (at your option) any later version.
+|
+|  This file 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
+|  Lesser General Public License for more details.
+|
+|  You should have received a copy of the GNU Lesser General Public
+|  License along with this code; if not, write to the Free Software
+|  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+|
+|  iTunes and iPod are trademarks of Apple
+|
+|  This product is not supported/written/published by Apple!
+|
+|  $Id$
+*/
+
+/*
+ * The code in this file is used to convert the output of the plist parser
+ * (a GValue *) and to convert it to data structures usable by libgpod.
+ * This is that code which interprets the generic parsed plist data as a
+ * SysInfoExtended file. The SysInfoExtended data is used to fill a
+ * SysInfoIpodProperties structure and several Itdb_ArtworkFormat structs.
+ *
+ * I tried to make the filling of the structures quite generic, if some
+ * field isn't parsed (which is quite possible since I gathered the various
+ * fields names using a few sample files), all is needed to add it is to
+ * add a field to the appropriate structure (SysInfoIpodProperties or
+ * Itdb_ArtworkFormat) and to add that field to the appropriate
+ * _fields_mapping structure. Those _fields_mapping structures are then
+ * used to convert from a GValue to the struct, but they are also used by
+ * the _dump and _free functions, so there's no need to modify them when
+ * you add a new field.
+ *
+ * If DEBUG_PARSING is defined when building that file, the fields that
+ * were found in the SysInfoExtended file but which were not used to build
+ * the data structures defined in that file will be dumped to stdout. It's
+ * normal to get a few unhandled fields, I left out on purpose a few <dict>
+ * because I was too lazy to parse them ;)
+ */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include <glib-object.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "itdb_device.h"
+#include "itdb_plist.h"
+#include "itdb_sysinfo_extended_parser.h"
+
+struct _SysInfoIpodProperties {
+        char *build_id;
+        char *connected_bus;
+        gint max_transfer_speed;
+        gint family_id;
+        char *product_type;
+        char *firewire_guid;
+        char *firewire_version;
+        GList *artwork_formats;
+        GList *photo_formats;
+        GList *chapter_image_formats;
+        gboolean podcasts_supported;
+        char *min_itunes_version;
+        gboolean playlist_folders_supported;
+        char *serial_number;
+        gint updater_family_id;
+        char *visible_build_id;
+        gint oem_id;
+        gint oem_u;
+        gint db_version;
+        char *min_build_id;
+        char *language;
+        gboolean voice_memos_supported;
+        gint update_method;
+        gint max_fw_blocks;
+        gint fw_part_size;
+        gboolean auto_reboot_after_firmware_update;
+        char *volume_format;
+        gboolean forced_disk_mode;
+        gboolean bang_folder;
+        gboolean corrupt_data_partition;
+        gboolean corrupt_firmware_partition;
+        gboolean can_flash_backlight;
+        gboolean can_hibernate;
+        gboolean came_with_cd;
+        gboolean supports_sparse_artwork;
+        gint max_thumb_file_size;
+        gint ram;
+        gint hotplug_state;
+        gint battery_poll_interval;
+        gboolean sort_fields_supported;
+        gboolean vcard_with_jpeg_supported;
+        gint max_file_size_in_gb;
+        gint max_tracks;
+        gint games_platform_id;
+        gint games_platform_version;
+        gint rental_clock_bias;
+};
+
+static gint get_int (GHashTable *dict, const char *key)
+{
+        GValue *val;
+
+        val = g_hash_table_lookup (dict, key);
+        if (val == NULL) {
+                return 0;
+        }
+        if (!G_VALUE_HOLDS_INT (val)) {
+                return 0;
+        }
+        return g_value_get_int (val);
+}
+
+static gdouble get_double (GHashTable *dict, const char *key)
+{
+        GValue *val;
+
+        val = g_hash_table_lookup (dict, key);
+        if (val == NULL) {
+                return 0;
+        }
+        if (!G_VALUE_HOLDS_DOUBLE (val)) {
+                return 0;
+        }
+        return g_value_get_double (val);
+}
+
+static gboolean get_boolean (GHashTable *dict, const char *key)
+{
+        GValue *val;
+
+        val = g_hash_table_lookup (dict, key);
+        if (val == NULL) {
+                return FALSE;
+        }
+        if (!G_VALUE_HOLDS_BOOLEAN (val)) {
+                return FALSE;
+        }
+        return g_value_get_boolean (val);
+}
+
+static char *get_string (GHashTable *dict, const char *key)
+{
+        GValue *val;
+
+        val = g_hash_table_lookup (dict, key);
+        if (val == NULL) {
+                return NULL;
+        }
+        if (!G_VALUE_HOLDS_STRING (val)) {
+                return NULL;
+        }
+        return g_value_dup_string (val);
+}
+
+struct _DictFieldMapping {
+    const char* name;
+    GType type;
+    guint offset;
+};
+
+typedef struct _DictFieldMapping DictFieldMapping;
+static const DictFieldMapping sysinfo_ipod_properties_fields_mapping[] = {
+    { "BuildID",                       G_TYPE_STRING,  G_STRUCT_OFFSET (SysInfoIpodProperties, build_id) },
+    { "ConnectedBus",                  G_TYPE_STRING,  G_STRUCT_OFFSET (SysInfoIpodProperties,  connected_bus) },
+    { "MaxTransferSpeed",              G_TYPE_INT,     G_STRUCT_OFFSET (SysInfoIpodProperties, max_transfer_speed) },
+    { "FamilyID",                      G_TYPE_INT,     G_STRUCT_OFFSET (SysInfoIpodProperties, family_id) },
+    { "ProductType",                   G_TYPE_STRING,  G_STRUCT_OFFSET (SysInfoIpodProperties, product_type) },
+    { "FireWireGUID",                  G_TYPE_STRING,  G_STRUCT_OFFSET (SysInfoIpodProperties, firewire_guid) },
+    { "FireWireVersion",               G_TYPE_STRING,  G_STRUCT_OFFSET (SysInfoIpodProperties, firewire_version) },
+    { "PodcastsSupported",             G_TYPE_BOOLEAN, G_STRUCT_OFFSET (SysInfoIpodProperties, podcasts_supported) },
+    { "MinITunesVersion",              G_TYPE_STRING,  G_STRUCT_OFFSET (SysInfoIpodProperties, min_itunes_version) },
+    { "PlaylistFoldersSupported",      G_TYPE_BOOLEAN, G_STRUCT_OFFSET (SysInfoIpodProperties, playlist_folders_supported) },
+    { "SerialNumber",                  G_TYPE_STRING,  G_STRUCT_OFFSET (SysInfoIpodProperties, serial_number) },
+    { "UpdaterFamilyID",               G_TYPE_INT,     G_STRUCT_OFFSET (SysInfoIpodProperties, updater_family_id) },
+    { "VisibleBuildID",                G_TYPE_STRING,  G_STRUCT_OFFSET (SysInfoIpodProperties, visible_build_id) },
+    { "OEMID",                         G_TYPE_INT,     G_STRUCT_OFFSET (SysInfoIpodProperties, oem_id) },
+    { "OEMU",                          G_TYPE_INT,     G_STRUCT_OFFSET (SysInfoIpodProperties, oem_u) },
+    { "DBVersion",                     G_TYPE_INT,     G_STRUCT_OFFSET (SysInfoIpodProperties, db_version) },
+    { "MinBuildID",                    G_TYPE_STRING,  G_STRUCT_OFFSET (SysInfoIpodProperties, min_build_id) },
+    { "Language",                      G_TYPE_STRING,  G_STRUCT_OFFSET (SysInfoIpodProperties, language) },
+    { "VoiceMemosSupported",           G_TYPE_BOOLEAN, G_STRUCT_OFFSET (SysInfoIpodProperties, voice_memos_supported) },
+    { "UpdateMethod",                  G_TYPE_INT,     G_STRUCT_OFFSET (SysInfoIpodProperties, update_method) },
+    { "MaxFWBlocks",                   G_TYPE_INT,     G_STRUCT_OFFSET (SysInfoIpodProperties, max_fw_blocks) },
+    { "FWPartSize",                    G_TYPE_INT,     G_STRUCT_OFFSET (SysInfoIpodProperties, fw_part_size) },
+    { "AutoRebootAfterFirmwareUpdate", G_TYPE_BOOLEAN, G_STRUCT_OFFSET (SysInfoIpodProperties, auto_reboot_after_firmware_update) },
+    { "VolumeFormat",                  G_TYPE_STRING,  G_STRUCT_OFFSET (SysInfoIpodProperties, volume_format) },
+    { "ForcedDiskMode",                G_TYPE_BOOLEAN, G_STRUCT_OFFSET (SysInfoIpodProperties, forced_disk_mode) },
+    { "BangFolder",                    G_TYPE_BOOLEAN, G_STRUCT_OFFSET (SysInfoIpodProperties, bang_folder) },
+    { "CorruptDataPartition",          G_TYPE_BOOLEAN, G_STRUCT_OFFSET (SysInfoIpodProperties, corrupt_data_partition) },
+    { "CorruptFirmwarePartition",      G_TYPE_BOOLEAN, G_STRUCT_OFFSET (SysInfoIpodProperties, corrupt_firmware_partition) },
+    { "CanFlashBacklight",             G_TYPE_BOOLEAN, G_STRUCT_OFFSET (SysInfoIpodProperties, can_flash_backlight) },
+    { "CanHibernate",                  G_TYPE_BOOLEAN, G_STRUCT_OFFSET (SysInfoIpodProperties, can_hibernate) },
+    { "CameWithCD",                    G_TYPE_BOOLEAN, G_STRUCT_OFFSET (SysInfoIpodProperties, came_with_cd) },
+    { "SupportsSparseArtwork",         G_TYPE_BOOLEAN, G_STRUCT_OFFSET (SysInfoIpodProperties, supports_sparse_artwork) },
+    { "MaxThumbFileSize",              G_TYPE_INT,     G_STRUCT_OFFSET (SysInfoIpodProperties, max_thumb_file_size) },
+    { "RAM",                           G_TYPE_INT,     G_STRUCT_OFFSET (SysInfoIpodProperties, ram) },
+    { "HotPlugState",                  G_TYPE_INT,     G_STRUCT_OFFSET (SysInfoIpodProperties, hotplug_state) },
+    { "BatteryPollInterval",           G_TYPE_INT,     G_STRUCT_OFFSET (SysInfoIpodProperties, battery_poll_interval) },
+    { "SortFieldsSupported",           G_TYPE_BOOLEAN, G_STRUCT_OFFSET (SysInfoIpodProperties, sort_fields_supported) },
+    { "vCardWithJPEGSupported",        G_TYPE_BOOLEAN, G_STRUCT_OFFSET (SysInfoIpodProperties, vcard_with_jpeg_supported) },
+    { "MaxFileSizeInGB",               G_TYPE_INT,     G_STRUCT_OFFSET (SysInfoIpodProperties, max_file_size_in_gb) },
+    { "MaxTracks",                     G_TYPE_INT,     G_STRUCT_OFFSET (SysInfoIpodProperties, max_tracks) },
+    { "GamesPlatformID",               G_TYPE_INT,     G_STRUCT_OFFSET (SysInfoIpodProperties, games_platform_id) },
+    { "GamesPlatformVersion",          G_TYPE_INT,     G_STRUCT_OFFSET (SysInfoIpodProperties, games_platform_version) },
+    { "RentalClockBias",               G_TYPE_INT,     G_STRUCT_OFFSET (SysInfoIpodProperties, rental_clock_bias) },
+    { NULL,                            G_TYPE_NONE,    0 }
+};
+
+static const DictFieldMapping sysinfo_image_format_fields_mapping[] = {
+    { "FormatId",         G_TYPE_INT,     G_STRUCT_OFFSET (Itdb_ArtworkFormat, format_id) },
+    { "DisplayWidth",     G_TYPE_INT,     G_STRUCT_OFFSET (Itdb_ArtworkFormat, display_width) },
+    { "RenderWidth",      G_TYPE_INT,     G_STRUCT_OFFSET (Itdb_ArtworkFormat, width) },
+    { "RenderHeight",     G_TYPE_INT,     G_STRUCT_OFFSET (Itdb_ArtworkFormat, height) },
+/*  PixelFormat needs to be converted to ItdbThumbFormat, this is special-cased
+ *  in g_value_to_image_format */
+/*  { "PixelFormat",      G_TYPE_STRING,  G_STRUCT_OFFSET (Itdb_ArtworkFormat, format) },*/
+    { "Interlaced",       G_TYPE_BOOLEAN, G_STRUCT_OFFSET (Itdb_ArtworkFormat, interlaced) },
+    { "Crop",             G_TYPE_BOOLEAN, G_STRUCT_OFFSET (Itdb_ArtworkFormat, crop) },
+    { "AlignRowBytes",    G_TYPE_BOOLEAN, G_STRUCT_OFFSET (Itdb_ArtworkFormat, align_row_bytes) },
+    { "Rotation",         G_TYPE_INT,     G_STRUCT_OFFSET (Itdb_ArtworkFormat, rotation) },
+/* BackColor needs to be converted to a gint, this is special-cased
+ * in g_value_to_image_format */
+/*    { "BackColor",        G_TYPE_INT,     G_STRUCT_OFFSET (Itdb_ArtworkFormat, back_color) }, */
+    { "ColorAdjustment",  G_TYPE_INT,     G_STRUCT_OFFSET (Itdb_ArtworkFormat, color_adjustment) },
+    { "GammaAdjustment",  G_TYPE_DOUBLE,  G_STRUCT_OFFSET (Itdb_ArtworkFormat, gamma) },
+    { "AssociatedFormat", G_TYPE_INT,     G_STRUCT_OFFSET (Itdb_ArtworkFormat, associated_format) },
+    { NULL,               G_TYPE_NONE,    0 }
+};
+
+#ifdef DEBUG_PARSING
+static void dump_key_name (gpointer key, gpointer val, gpointer data)
+{
+    g_print ("%s ", (char *)key);
+}
+#endif
+
+static void dict_to_struct (GHashTable *dict,
+                            const DictFieldMapping *mapping,
+                            void *struct_ptr)
+{
+    const DictFieldMapping *it = mapping;
+    g_return_if_fail (it != NULL);
+    while (it->name != NULL) {
+        switch (it->type) {
+            case G_TYPE_INT: {
+                gint *field;
+                field = G_STRUCT_MEMBER_P (struct_ptr, it->offset);
+                *field = get_int (dict, it->name);
+                break;
+            }
+
+            case G_TYPE_BOOLEAN: {
+                gboolean *field;
+                field = G_STRUCT_MEMBER_P (struct_ptr, it->offset);
+                *field = get_boolean (dict, it->name);
+                break;
+            }
+
+            case G_TYPE_STRING: {
+                gchar **field;
+                field = G_STRUCT_MEMBER_P (struct_ptr, it->offset);
+                *field = get_string (dict, it->name);
+                break;
+            }
+
+            case G_TYPE_DOUBLE: {
+                gdouble *field;
+                field = G_STRUCT_MEMBER_P (struct_ptr, it->offset);
+                *field = get_double (dict, it->name);
+                break;
+            }
+        }
+        g_hash_table_remove (dict, it->name);
+        ++it;
+    }
+#ifdef DEBUG_PARSING
+    if (g_hash_table_size (dict) != 0) {
+        g_print ("Unused keys:\n");
+        g_hash_table_foreach (dict, dump_key_name, NULL);
+        g_print ("\n");
+    }
+#endif
+}
+
+static void free_struct (const DictFieldMapping *mapping,
+                         void *struct_ptr)
+{
+    const DictFieldMapping *it = mapping;
+    while (it->name != NULL) {
+        if (it->type == G_TYPE_STRING) {
+                gchar **field;
+                field = G_STRUCT_MEMBER_P (struct_ptr, it->offset);
+                g_free (*field);
+        }
+        ++it;
+    }
+    g_free (struct_ptr);
+}
+
+static void free_image_format (Itdb_ArtworkFormat *format)
+{
+    free_struct (sysinfo_image_format_fields_mapping, format);
+}
+
+void itdb_sysinfo_properties_free (SysInfoIpodProperties *props)
+{
+    g_list_foreach (props->artwork_formats, (GFunc)free_image_format, NULL);
+    g_list_free (props->artwork_formats);
+    g_list_foreach (props->photo_formats, (GFunc)free_image_format, NULL);
+    g_list_free (props->photo_formats);
+    g_list_foreach (props->chapter_image_formats, (GFunc)free_image_format, NULL);
+    g_list_free (props->chapter_image_formats);
+    free_struct (sysinfo_ipod_properties_fields_mapping, props);
+}
+
+static void dump_struct (const DictFieldMapping *mapping,
+                         void *struct_ptr)
+{
+    const DictFieldMapping *it = mapping;
+    g_return_if_fail (it != NULL);
+    while (it->name != NULL) {
+        switch (it->type) {
+            case G_TYPE_INT: {
+                gint *field;
+                field = G_STRUCT_MEMBER_P (struct_ptr, it->offset);
+                g_print ("%s: %d\n", it->name, *field);
+                break;
+            }
+
+            case G_TYPE_BOOLEAN: {
+                gboolean *field;
+                field = G_STRUCT_MEMBER_P (struct_ptr, it->offset);
+                g_print ("%s: %s\n", it->name, (*field)?"true":"false");
+                break;
+            }
+
+            case G_TYPE_STRING: {
+                gchar **field;
+                field = G_STRUCT_MEMBER_P (struct_ptr, it->offset);
+                g_print ("%s: %s\n", it->name, *field);
+                break;
+            }
+
+            case G_TYPE_DOUBLE: {
+                gdouble *field;
+                field = G_STRUCT_MEMBER_P (struct_ptr, it->offset);
+                g_print ("%s: %f\n", it->name, *field);
+                break;
+            }
+        }
+        ++it;
+    }
+}
+
+static void dump_image_format (Itdb_ArtworkFormat *format)
+{
+    dump_struct (sysinfo_image_format_fields_mapping, format);
+}
+
+void itdb_sysinfo_properties_dump (SysInfoIpodProperties *props)
+{
+    dump_struct (sysinfo_ipod_properties_fields_mapping, props);
+    g_list_foreach (props->artwork_formats, (GFunc)dump_image_format, NULL);
+    g_list_foreach (props->photo_formats, (GFunc)dump_image_format, NULL);
+    g_list_foreach (props->chapter_image_formats, (GFunc)dump_image_format, NULL);
+}
+
+static gboolean
+set_pixel_format (Itdb_ArtworkFormat *img_spec, GHashTable *dict)
+{
+    char *pixel_format;
+
+    pixel_format = get_string (dict, "PixelFormat");
+    if (pixel_format == NULL) {
+        return FALSE;
+    }
+
+    if (strcmp (pixel_format, "32767579" /* 2vuy */) == 0) {
+        img_spec->format = THUMB_FORMAT_UYVY_BE;
+    } else if (strcmp (pixel_format, "42353635" /* B565 */) == 0) {
+        img_spec->format = THUMB_FORMAT_RGB565_BE;
+    } else if (strcmp (pixel_format, "4C353635" /* L565 */) == 0) {
+        img_spec->format = THUMB_FORMAT_RGB565_LE;
+    } else if (strcmp (pixel_format, "79343230" /* y420 */) == 0) {
+        img_spec->format = THUMB_FORMAT_I420_LE;
+    } else {
+        g_free (pixel_format);
+        return FALSE;
+    }
+    g_hash_table_remove (dict, "PixelFormat");
+    g_free (pixel_format);
+    return TRUE;
+}
+
+static void set_back_color (Itdb_ArtworkFormat *img_spec, GHashTable *dict)
+{
+    char *back_color_str;
+    guint back_color;
+    gint i;
+
+    memset (img_spec->back_color, 0, sizeof (img_spec->back_color));;
+    back_color_str = get_string (dict, "BackColor");
+    if (back_color_str == NULL) {
+        return;
+    }
+    back_color = strtoul (back_color_str, NULL, 16);
+    for (i = 3; i >= 0; i--) {
+        img_spec->back_color[(guchar)i] = back_color & 0xff;
+        back_color = back_color >> 8;
+    }
+    g_hash_table_remove (dict, "BackColor");
+    g_free (back_color_str);
+}
+
+static Itdb_ArtworkFormat *g_value_to_image_format (GValue *value)
+{
+    GHashTable *dict;
+    Itdb_ArtworkFormat *img_spec;
+
+    g_return_val_if_fail (G_VALUE_HOLDS (value, G_TYPE_HASH_TABLE), NULL);
+    dict = g_value_get_boxed (value);
+    g_return_val_if_fail (dict != NULL, NULL);
+
+    img_spec = g_new0 (Itdb_ArtworkFormat, 1);
+    if (img_spec == NULL) {
+        return NULL;
+    }
+
+    if (!set_pixel_format (img_spec, dict)) {
+        g_free (img_spec);
+        return NULL;
+    }
+    set_back_color (img_spec, dict);
+
+    dict_to_struct (dict, sysinfo_image_format_fields_mapping, img_spec);
+
+    return img_spec;
+}
+
+static GList *parse_one_formats_list (GHashTable *sysinfo_dict, 
+                                      const char *key)
+{
+    GValue *to_parse;
+    GList *formats = NULL;
+    GValueArray *array;
+    gint i;
+
+    to_parse = g_hash_table_lookup (sysinfo_dict, key);
+    if (to_parse == NULL) {
+        return NULL;
+    }
+    if (!G_VALUE_HOLDS (to_parse, G_TYPE_VALUE_ARRAY)) {
+        return NULL;
+    }
+    array = (GValueArray*)g_value_get_boxed (to_parse);
+    for (i = 0; i < array->n_values; i++) {
+        Itdb_ArtworkFormat *format;
+	format = g_value_to_image_format (g_value_array_get_nth (array, i));
+	if (format != NULL) {
+		formats = g_list_prepend (formats, format);
+	}
+    } 
+    g_hash_table_remove (sysinfo_dict, key);
+    return formats;
+}
+
+static SysInfoIpodProperties *g_value_to_ipod_properties (GValue *value)
+{
+    GHashTable *sysinfo_dict;
+    SysInfoIpodProperties *props;
+
+    g_return_val_if_fail (G_VALUE_HOLDS (value, G_TYPE_HASH_TABLE), NULL);
+    sysinfo_dict = g_value_get_boxed (value);
+
+    props = g_new0 (SysInfoIpodProperties, 1);
+    props->artwork_formats = parse_one_formats_list (sysinfo_dict,
+                                                     "AlbumArt");
+    props->photo_formats = parse_one_formats_list (sysinfo_dict,
+                                                   "ImageSpecifications");
+    props->chapter_image_formats = parse_one_formats_list (sysinfo_dict,
+                                                           "ChapterImageSpecs");
+    dict_to_struct (sysinfo_dict,
+                    sysinfo_ipod_properties_fields_mapping,
+                    props);
+
+    return props;
+}
+
+/**
+ * itdb_sysinfo_extended_parse:
+ * @filename:   name of the SysInfoExtended file to parse
+ * @error:      return location for a #GError
+ *
+ * itdb_sysinfo_extended_parse() parses a SysInfoExtended file into a
+ * #SysInfoIpodProperties structure. This structure contains a lot of
+ * information about the iPod properties (artwork format supported,
+ * podcast capabilities, ...) which can be queried using the
+ * appropriate accessors.
+ *
+ * Returns: a newly allocated #SysInfoIpodProperties which must be
+ * freed after use, or NULL if an error occurred during the parsing
+ */
+SysInfoIpodProperties *itdb_sysinfo_extended_parse (const char *filename,
+                                                    GError **error)
+{
+    GValue *parsed_doc;
+    SysInfoIpodProperties *props;
+
+    g_return_val_if_fail (filename != NULL, NULL);
+
+    parsed_doc = itdb_plist_parse_from_file (filename, error);
+    if (parsed_doc == NULL) {
+        return NULL;
+    }
+    props = g_value_to_ipod_properties (parsed_doc);
+    g_value_unset (parsed_doc);
+    g_free (parsed_doc);
+
+    return props;
+}
+
+/**
+ * itdb_sysinfo_properties_get_serial_number:
+ * @props: a #SysInfoIpodProperties structure
+ *
+ * Gets the iPod serial number from @props if it was found while parsing
+ * @props. The serial number uniquely identify an ipod and it can be used
+ * to determine when it was produced and its model/color, see
+ * http://svn.gnome.org/viewvc/podsleuth/trunk/src/PodSleuth/PodSleuth/SerialNumber.cs?view=markup
+ * for more details about what the various parts of the serial number
+ * correspond to. Please avoid parsing this serial number by yourself and
+ * ask for additionnal API in libgpod if you find yourself needing to parse
+ * that serial number :)
+ *
+ * Returns: the iPod serial number, NULL if the serial number wasn't set in
+ * @props. The returned string must not be modified nor freed.
+ */
+const char *
+itdb_sysinfo_properties_get_serial_number (const SysInfoIpodProperties *props)
+{
+    g_return_val_if_fail (props != NULL, NULL);
+    return props->serial_number;
+}
+
+/**
+ * itdb_sysinfo_properties_get_firewire_id:
+ * @props: a #SysInfoIpodProperties structure
+ *
+ * Gets the iPod firewire ID from @props if it was found while parsing
+ * @props. Contrary to what its name implies, the firewire ID is also set
+ * on USB iPods and is especially important on iPod Classic and Nano Video
+ * since this ID (which is unique on each iPod) is needed to generate the
+ * checksum that is required to write a valid iPod database on these
+ * models.
+ *
+ * Returns: the iPod firewire ID, NULL if the serial number wasn't set in
+ * @props. The returned string must not be modified nor freed.
+ */
+const char *
+itdb_sysinfo_properties_get_firewire_id (const SysInfoIpodProperties *props)
+{
+    g_return_val_if_fail (props != NULL, NULL);
+    return props->firewire_guid;
+}
+
+/**
+ * itdb_sysinfo_properties_get_cover_art_formats:
+ * @props: a #SysInfoIpodProperties structure
+ *
+ * Returns: a #GList of #Itdb_ArtworkFormat describing the cover art formats
+ * supported by the iPod described in @props. The returned list must not be
+ * modified nor freed.
+ */
+const GList *
+itdb_sysinfo_properties_get_cover_art_formats (const SysInfoIpodProperties *props)
+{
+    g_return_val_if_fail (props != NULL, NULL);
+    return props->artwork_formats;
+}
+
+/**
+ * itdb_sysinfo_properties_get_photo_formats:
+ * @props: a #SysInfoIpodProperties structure
+ *
+ * Returns: a #GList of #Itdb_ArtworkFormat describing the photo formats
+ * supported by the iPod described in @props. The returned list must not be
+ * modified nor freed.
+ */
+const GList *
+itdb_sysinfo_properties_get_photo_formats (const SysInfoIpodProperties *props)
+{
+    g_return_val_if_fail (props != NULL, NULL);
+    return props->photo_formats;
+}
+
+/**
+ * itdb_sysinfo_properties_get_chapter_image_formats:
+ * @props: a #SysInfoIpodProperties structure
+ *
+ * Returns: a #GList of #Itdb_ArtworkFormat describing the chapter image
+ * formats supported by the iPod described in @props. The returned list must
+ * not be modified nor freed.
+ */
+const GList *
+itdb_sysinfo_properties_get_chapter_image_formats (const SysInfoIpodProperties *props)
+{
+    g_return_val_if_fail (props != NULL, NULL);
+    return props->chapter_image_formats;
+}
+
+/**
+ * itdb_sysinfo_properties_supports_sparse_artwork:
+ * @props: a #SysInfoIpodProperties structure
+ *
+ * Sparse artwork is a way to share artwork between different iPod tracks
+ * which make things more efficient space-wise. This function can be used
+ * to check if the more space-efficient artwork storage can be used.
+ *
+ * Returns: TRUE if the iPod supports sparse artwork, FALSE if it does not
+ * or if @props doesn't contain any information about sparse artwork
+ */
+G_GNUC_INTERNAL gboolean
+itdb_sysinfo_properties_supports_sparse_artwork (const SysInfoIpodProperties *props)
+{
+    g_return_val_if_fail (props != NULL, FALSE);
+
+    return props->supports_sparse_artwork;
+}
+
+gboolean
+itdb_sysinfo_properties_supports_podcast (const SysInfoIpodProperties *props)
+{
+    g_return_val_if_fail (props != NULL, FALSE);
+
+    return props->podcasts_supported;
+}

Added: libgpod/trunk/libgpod/branches/upstream/current/src/itdb_sysinfo_extended_parser.h
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/itdb_sysinfo_extended_parser.h	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/itdb_sysinfo_extended_parser.h	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,66 @@
+/*
+|  Copyright (C) 2008 Christophe Fergeau <teuf at gnome.org>
+|  Part of the gtkpod project.
+| 
+|  URL: http://www.gtkpod.org/
+|  URL: http://gtkpod.sourceforge.net/
+|
+|  The code contained in this file is free software; you can redistribute
+|  it and/or modify it under the terms of the GNU Lesser General Public
+|  License as published by the Free Software Foundation; either version
+|  2.1 of the License, or (at your option) any later version.
+|
+|  This file 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
+|  Lesser General Public License for more details.
+|
+|  You should have received a copy of the GNU Lesser General Public
+|  License along with this code; if not, write to the Free Software
+|  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+|
+|  iTunes and iPod are trademarks of Apple
+|
+|  This product is not supported/written/published by Apple!
+|
+|  $Id$
+*/
+#ifndef __ITDB_SYSINFO_EXTENDED_PARSER_H__
+#define __ITDB_SYSINFO_EXTENDED_PARSER_H__
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+typedef struct _SysInfoIpodProperties SysInfoIpodProperties;
+
+G_GNUC_INTERNAL void
+itdb_sysinfo_properties_dump (SysInfoIpodProperties *props);
+
+G_GNUC_INTERNAL
+SysInfoIpodProperties *itdb_sysinfo_extended_parse (const char *filename,
+                                                    GError **error);
+
+G_GNUC_INTERNAL
+void itdb_sysinfo_properties_free (SysInfoIpodProperties *props);
+
+G_GNUC_INTERNAL const char *
+itdb_sysinfo_properties_get_serial_number (const SysInfoIpodProperties *props);
+
+G_GNUC_INTERNAL const char *
+itdb_sysinfo_properties_get_firewire_id (const SysInfoIpodProperties *props);
+
+G_GNUC_INTERNAL const GList *
+itdb_sysinfo_properties_get_cover_art_formats (const SysInfoIpodProperties *);
+G_GNUC_INTERNAL const GList *
+itdb_sysinfo_properties_get_photo_formats (const SysInfoIpodProperties *);
+G_GNUC_INTERNAL const GList *
+itdb_sysinfo_properties_get_chapter_image_formats (const SysInfoIpodProperties *);
+G_GNUC_INTERNAL gboolean
+itdb_sysinfo_properties_supports_sparse_artwork (const SysInfoIpodProperties *);
+G_GNUC_INTERNAL gboolean
+itdb_sysinfo_properties_supports_podcast (const SysInfoIpodProperties *);
+
+G_END_DECLS
+
+#endif

Added: libgpod/trunk/libgpod/branches/upstream/current/src/itdb_thumb.c
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/itdb_thumb.c	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/itdb_thumb.c	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,588 @@
+/*
+|  Copyright (C) 2007 Christophe Fergeau <teuf at gnome org>
+|  Part of the gtkpod project.
+|
+|  URL: http://www.gtkpod.org/
+|  URL: http://gtkpod.sourceforge.net/
+|
+|  The code contained in this file is free software; you can redistribute
+|  it and/or modify it under the terms of the GNU Lesser General Public
+|  License as published by the Free Software Foundation; either version
+|  2.1 of the License, or (at your option) any later version.
+|
+|  This file 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
+|  Lesser General Public License for more details.
+|
+|  You should have received a copy of the GNU Lesser General Public
+|  License along with this code; if not, write to the Free Software
+|  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+|
+|  iTunes and iPod are trademarks of Apple
+|
+|  This product is not supported/written/published by Apple!
+*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include <string.h>
+#include <glib/gi18n-lib.h>
+#include "itdb_private.h"
+#include "itdb_thumb.h"
+
+#ifdef HAVE_GDKPIXBUF
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#endif
+
+Itdb_Thumb *itdb_thumb_new_from_file (const gchar *filename)
+{
+    Itdb_Thumb_File *thumb_file;
+    Itdb_Thumb *thumb;
+
+    thumb_file = g_new0 (Itdb_Thumb_File, 1);
+    thumb = (Itdb_Thumb *)thumb_file;
+    thumb->data_type = ITDB_THUMB_TYPE_FILE;
+    thumb_file->filename = g_strdup (filename);
+
+    return thumb;
+}
+
+
+Itdb_Thumb *itdb_thumb_new_from_data (const guchar *data, gsize len)
+{
+    Itdb_Thumb_Memory *thumb_memory;
+    Itdb_Thumb *thumb;
+
+    thumb_memory = g_new0 (Itdb_Thumb_Memory, 1);
+    thumb = (Itdb_Thumb *)thumb_memory;
+    thumb->data_type = ITDB_THUMB_TYPE_MEMORY;
+    thumb_memory->image_data = g_memdup (data, len);
+    thumb_memory->image_data_len = len;
+
+    return thumb;
+}
+
+
+#ifdef HAVE_GDKPIXBUF
+Itdb_Thumb *itdb_thumb_new_from_pixbuf (gpointer pixbuf)
+{
+    Itdb_Thumb_Pixbuf *thumb_pixbuf;
+    Itdb_Thumb *thumb;
+
+    thumb_pixbuf = g_new0 (Itdb_Thumb_Pixbuf, 1);
+    thumb = (Itdb_Thumb *)thumb_pixbuf;
+    thumb->data_type = ITDB_THUMB_TYPE_PIXBUF;
+    thumb_pixbuf->pixbuf = g_object_ref (G_OBJECT (pixbuf));
+
+    return thumb;
+}
+#else
+Itdb_Thumb *itdb_thumb_new_from_pixbuf (gpointer pixbuf)
+{
+    return NULL;
+}
+#endif
+
+Itdb_Thumb_Ipod_Item *itdb_thumb_new_item_from_ipod (const Itdb_ArtworkFormat *format)
+{
+    Itdb_Thumb_Ipod_Item *thumb_ipod;
+
+    thumb_ipod = g_new0 (Itdb_Thumb_Ipod_Item, 1);
+    thumb_ipod->format = format;
+
+    return thumb_ipod;
+}
+
+G_GNUC_INTERNAL Itdb_Thumb *itdb_thumb_ipod_new (void)
+{
+    Itdb_Thumb *thumb;
+
+    thumb = (Itdb_Thumb *)g_new0 (Itdb_Thumb_Ipod, 1);
+    thumb->data_type = ITDB_THUMB_TYPE_IPOD;
+
+    return thumb;
+}
+
+static void itdb_thumb_ipod_item_free (Itdb_Thumb_Ipod_Item *item)
+{
+    g_free (item->filename);
+    g_free (item);
+}
+
+/**
+ * itdb_thumb_free:
+ * @thumb: an #Itdb_Thumb
+ *
+ * Frees the memory used by @thumb
+ *
+ * Since: 0.3.0
+ */
+void itdb_thumb_free (Itdb_Thumb *thumb)
+{
+    g_return_if_fail (thumb);
+    switch (thumb->data_type) {
+        case ITDB_THUMB_TYPE_FILE: {
+            Itdb_Thumb_File *thumb_file = (Itdb_Thumb_File *)thumb;
+            g_free (thumb_file->filename);
+            break;
+        }
+        case ITDB_THUMB_TYPE_MEMORY: {
+            Itdb_Thumb_Memory *thumb_memory = (Itdb_Thumb_Memory *)thumb;
+            g_free (thumb_memory->image_data);
+            break;
+        }
+#ifdef HAVE_GDKPIXBUF
+        case ITDB_THUMB_TYPE_PIXBUF: {
+            Itdb_Thumb_Pixbuf *thumb_pixbuf = (Itdb_Thumb_Pixbuf *)thumb;
+            if (thumb_pixbuf->pixbuf) {
+                g_object_unref (G_OBJECT (thumb_pixbuf->pixbuf));
+            }
+            break;
+        }
+#else
+	case ITDB_THUMB_TYPE_PIXBUF:
+            g_assert_not_reached();
+#endif
+        case ITDB_THUMB_TYPE_IPOD: {
+            Itdb_Thumb_Ipod *thumb_ipod = (Itdb_Thumb_Ipod *)thumb;
+            g_list_foreach (thumb_ipod->thumbs,
+                            (GFunc)itdb_thumb_ipod_item_free,
+                            NULL);
+            g_list_free (thumb_ipod->thumbs);
+            break;
+        }
+        case ITDB_THUMB_TYPE_INVALID:
+            g_assert_not_reached ();
+    }
+    g_free (thumb);
+}
+
+
+static Itdb_Thumb_Ipod_Item *
+itdb_thumb_ipod_item_duplicate (Itdb_Thumb_Ipod_Item *item)
+{
+    Itdb_Thumb_Ipod_Item *new_item;
+
+    g_return_val_if_fail (item != NULL, NULL);
+
+    new_item = itdb_thumb_new_item_from_ipod (item->format);
+
+    new_item->filename = g_strdup (item->filename);
+    new_item->offset = item->offset;
+    new_item->size   = item->size;
+    new_item->width  = item->width;
+    new_item->height = item->height;
+    new_item->horizontal_padding = item->horizontal_padding;
+    new_item->vertical_padding = item->vertical_padding;
+
+    return new_item;
+}
+
+/**
+ * itdb_thumb_duplicate:
+ * @thumb: an #Itdb_Thumb
+ *
+ * Duplicates the data contained in @thumb
+ *
+ * Returns: a newly allocated copy of @thumb to be freed with
+ * itdb_thumb_free() after use
+ *
+ * Since: 0.3.0
+ */
+Itdb_Thumb *itdb_thumb_duplicate (Itdb_Thumb *thumb)
+{
+    switch (thumb->data_type) {
+        case ITDB_THUMB_TYPE_FILE: {
+            Itdb_Thumb_File *thumb_file = (Itdb_Thumb_File *)thumb;
+            return itdb_thumb_new_from_file (thumb_file->filename);
+        }
+        case ITDB_THUMB_TYPE_MEMORY: {
+            Itdb_Thumb_Memory *thumb_memory = (Itdb_Thumb_Memory *)thumb;
+            return itdb_thumb_new_from_data (thumb_memory->image_data,
+                                             thumb_memory->image_data_len);
+        }
+#ifdef HAVE_GDKPIXBUF
+        case ITDB_THUMB_TYPE_PIXBUF: {
+            Itdb_Thumb_Pixbuf *thumb_pixbuf = (Itdb_Thumb_Pixbuf *)thumb;
+            return itdb_thumb_new_from_pixbuf (thumb_pixbuf->pixbuf);
+        }
+#else
+        case ITDB_THUMB_TYPE_PIXBUF:
+	    return NULL;
+#endif
+        case ITDB_THUMB_TYPE_IPOD: {
+            Itdb_Thumb_Ipod *thumb_ipod = (Itdb_Thumb_Ipod *)thumb;
+            Itdb_Thumb_Ipod *new_thumb;
+            GList *it;
+            new_thumb = (Itdb_Thumb_Ipod *)itdb_thumb_ipod_new ();
+            for (it = thumb_ipod->thumbs; it != NULL; it = it->next) {
+                Itdb_Thumb_Ipod_Item *item;
+                item = itdb_thumb_ipod_item_duplicate (it->data);
+                if (item != NULL) {
+                    itdb_thumb_ipod_add (new_thumb, item);
+                }
+            }
+	    new_thumb->thumbs = g_list_reverse (new_thumb->thumbs);
+            return (Itdb_Thumb *)new_thumb;
+        }
+        case ITDB_THUMB_TYPE_INVALID:
+            g_assert_not_reached ();
+    }
+
+       return NULL;
+}
+
+
+G_GNUC_INTERNAL gint
+itdb_thumb_get_byteorder (const ItdbThumbFormat format)
+{
+    switch (format)
+    {
+      case THUMB_FORMAT_UYVY_LE:
+      case THUMB_FORMAT_I420_LE:
+      case THUMB_FORMAT_RGB565_LE:
+      case THUMB_FORMAT_RGB565_LE_90:
+      case THUMB_FORMAT_RGB555_LE:
+      case THUMB_FORMAT_RGB555_LE_90:
+      case THUMB_FORMAT_RGB888_LE:
+      case THUMB_FORMAT_RGB888_LE_90:
+      case THUMB_FORMAT_REC_RGB555_LE:
+      case THUMB_FORMAT_REC_RGB555_LE_90:
+      case THUMB_FORMAT_EXPERIMENTAL_LE:
+        return G_LITTLE_ENDIAN;
+      case THUMB_FORMAT_UYVY_BE:
+      case THUMB_FORMAT_I420_BE:
+      case THUMB_FORMAT_RGB565_BE:
+      case THUMB_FORMAT_RGB565_BE_90:
+      case THUMB_FORMAT_RGB555_BE:
+      case THUMB_FORMAT_RGB555_BE_90:
+      case THUMB_FORMAT_RGB888_BE:
+      case THUMB_FORMAT_RGB888_BE_90:
+      case THUMB_FORMAT_REC_RGB555_BE:
+      case THUMB_FORMAT_REC_RGB555_BE_90:
+      case THUMB_FORMAT_EXPERIMENTAL_BE:
+        return G_BIG_ENDIAN;
+    }
+    g_return_val_if_reached (-1);
+}
+
+guint itdb_thumb_get_rotation (Itdb_Thumb *thumb)
+{
+    return thumb->rotation;
+}
+
+void itdb_thumb_set_rotation (Itdb_Thumb *thumb, guint rotation)
+{
+    thumb->rotation = rotation;
+}
+
+G_GNUC_INTERNAL void itdb_thumb_ipod_add (Itdb_Thumb_Ipod *thumbs,
+                                          Itdb_Thumb_Ipod_Item *thumb)
+{
+    thumbs->thumbs = g_list_prepend (thumbs->thumbs, thumb);
+}
+
+Itdb_Thumb_Ipod_Item *itdb_thumb_ipod_get_item_by_type (Itdb_Thumb *thumbs,
+                                                        const Itdb_ArtworkFormat *format)
+{
+    GList *gl;
+
+    g_return_val_if_fail (format != NULL, NULL);
+    g_return_val_if_fail (thumbs != NULL, NULL);
+    g_return_val_if_fail (thumbs->data_type == ITDB_THUMB_TYPE_IPOD, NULL);
+
+    for (gl=((Itdb_Thumb_Ipod *)thumbs)->thumbs; gl != NULL; gl=gl->next)
+    {
+	Itdb_Thumb_Ipod_Item *item = gl->data;
+	g_return_val_if_fail (item != NULL, NULL);
+	if (item->format == format)  return item;
+    }
+    return NULL;
+}
+
+/**
+ * itdb_thumb_ipod_get_filename:
+ * @device: an #Itdb_Device
+ * @thumb:  an #Itdb_Thumb_Ipod_Item
+ *
+ * Get filename of thumbnail. If it's a thumbnail on the iPod, return
+ * the full path to the ithmb file. Otherwise return the full path to
+ * the original file.
+ *
+ * Returns: newly allocated string containing the absolute path to the
+ * thumbnail file.
+ */
+gchar *itdb_thumb_ipod_get_filename (Itdb_Device *device, Itdb_Thumb_Ipod_Item *item)
+{
+    gchar *artwork_dir;
+    char *filename = NULL;
+
+    g_return_val_if_fail (device, NULL);
+    g_return_val_if_fail (item, NULL);
+
+
+    if (strlen (item->filename) < 2) {
+        g_print (_("Illegal filename: '%s'.\n"), item->filename);
+        return NULL;
+    }
+
+    if (!device->mountpoint) {
+        g_print (_("Mountpoint not set.\n"));
+        return NULL;
+    }
+    artwork_dir = itdb_get_artwork_dir (device->mountpoint);
+    if (artwork_dir) {
+        filename = itdb_get_path (artwork_dir, item->filename+1);
+        g_free (artwork_dir);
+    }
+    /* FIXME: Hack */
+    if( !filename ) {
+        artwork_dir = itdb_get_photos_thumb_dir (device->mountpoint);
+
+        if (artwork_dir) {
+            const gchar *name_on_disk = strchr (item->filename+1, ':');
+            if (name_on_disk) {
+                filename = itdb_get_path (artwork_dir, name_on_disk + 1);
+            }
+            g_free (artwork_dir);
+        }
+    }
+    return filename;
+}
+
+const GList *itdb_thumb_ipod_get_thumbs (Itdb_Thumb_Ipod *thumbs)
+{
+    return thumbs->thumbs;
+}
+
+#ifdef HAVE_GDKPIXBUF
+/**
+ * itdb_thumb_to_pixbuf_at_size:
+ * @device: an #Itdb_Device
+ * @thumb:  an #Itdb_Thumb
+ * @width:  width of the pixbuf to retrieve, -1 for the biggest
+ *          possible size and 0 for the smallest possible size (with no scaling)
+ * @height: height of the pixbuf to retrieve, -1 for the biggest possible size
+ *          and 0 for the smallest possible size (with no scaling)
+ *
+ * Converts @thumb to a #GdkPixbuf.
+ *
+ * <note>
+ * Since we want to have gdk-pixbuf dependency optional, a generic
+ * gpointer is returned which you have to cast to a #GdkPixbuf using
+ * GDK_PIXBUF() yourself.
+ * </note>
+ *
+ * Returns: a #GdkPixbuf that must be unreffed with gdk_pixbuf_unref()
+ * after use, or NULL if the creation of the gdk-pixbuf failed or if
+ * libgpod was compiled without gdk-pixbuf support.
+ *
+ * Since: 0.7.0
+ */
+gpointer itdb_thumb_to_pixbuf_at_size (Itdb_Device *device, Itdb_Thumb *thumb,
+                                       gint width, gint height)
+{
+    GdkPixbuf *pixbuf=NULL;
+
+    switch (thumb->data_type)
+    {
+    case ITDB_THUMB_TYPE_FILE:
+        {
+	    Itdb_Thumb_File *thumb_file = (Itdb_Thumb_File *)thumb;
+	    if ((width != -1) && (height !=-1) && (width != 0) && (height != 0))
+	    {   /* scale */
+		pixbuf = gdk_pixbuf_new_from_file_at_size (thumb_file->filename,
+							   width, height,
+							   NULL);
+	    }
+	    else
+	    {   /* don't scale */
+		pixbuf = gdk_pixbuf_new_from_file (thumb_file->filename, NULL);
+	    }
+	    break;
+	}
+    case ITDB_THUMB_TYPE_MEMORY:
+        {
+	    Itdb_Thumb_Memory *thumb_mem = (Itdb_Thumb_Memory *)thumb;
+	    GdkPixbufLoader *loader = gdk_pixbuf_loader_new ();
+	    g_return_val_if_fail (loader, FALSE);
+	    if ((width != -1) && (height !=-1) && (width != 0) && (height != 0))
+	    {
+		gdk_pixbuf_loader_set_size (loader, width, height);
+	    }
+	    gdk_pixbuf_loader_write (loader,
+				     thumb_mem->image_data,
+				     thumb_mem->image_data_len,
+				     NULL);
+	    gdk_pixbuf_loader_close (loader, NULL);
+	    pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
+	    if (pixbuf)
+		g_object_ref (pixbuf);
+	    g_object_unref (loader);
+	    break;
+	}
+    case ITDB_THUMB_TYPE_PIXBUF:
+        {
+	    Itdb_Thumb_Pixbuf *thumb_pixbuf = (Itdb_Thumb_Pixbuf*)thumb;
+	    if ((width != -1) && (height !=-1) && (width != 0) && (height != 0))
+	    {
+		pixbuf = gdk_pixbuf_scale_simple (thumb_pixbuf->pixbuf,
+						  width, height,
+						  GDK_INTERP_BILINEAR);
+	    }
+	    else
+	    {
+		pixbuf = g_object_ref (thumb_pixbuf->pixbuf);
+	    }
+	    break;
+	}
+    case ITDB_THUMB_TYPE_IPOD:
+        {
+	    Itdb_Thumb_Ipod *thumb_ipod = (Itdb_Thumb_Ipod *)thumb;
+	    const GList *it;
+	    Itdb_Thumb_Ipod_Item *chosen;
+	    gint w=width;
+	    gint h=height;
+
+	    if ((width == -1) || (height == -1))
+	    {   /* choose the largest available thumbnail */
+		w = G_MAXINT;
+	    h = G_MAXINT;
+	    }
+
+	    if (device == NULL) {
+		/* device is needed to get the ipod mountpoint */
+		return NULL;
+	    }
+	    chosen = NULL;
+	    for (it = itdb_thumb_ipod_get_thumbs (thumb_ipod);
+		 it != NULL;
+		 it = it->next) {
+		Itdb_Thumb_Ipod_Item *item = (Itdb_Thumb_Ipod_Item*)it->data;
+		if (chosen == NULL)
+		{   /* make sure we select *something* */
+		    chosen = item;
+		}
+		if ((chosen->width > w) && (chosen->height > h))
+		{   /* try to find a thumb in size between the chosen and
+		       the current one */
+		    if ((item->width >= w) && (item->height >= h))
+		    {
+			if ((item->width < chosen->width) || (item->height < chosen->height))
+			{
+			    chosen = item;
+			}
+		    }
+		}
+		if ((chosen->width < w) || (chosen->height < h))
+		{   /* try to find something bigger */
+		    if ((item->width > chosen->width) || (item->height > chosen->height))
+		    {
+			chosen = item;
+		    }
+		}
+	    }
+	    if (chosen != NULL)
+	    {
+		GdkPixbuf *pix = itdb_thumb_ipod_item_to_pixbuf (device, chosen);
+		if ((width != -1) && (height !=-1) && (width != 0) && (height != 0))
+		{   /* scale */
+		    gdouble scalex = (gdouble)width/chosen->width;
+		    gdouble scaley = (gdouble)height/chosen->height;
+		    gdouble scale = MIN (scalex, scaley);
+		    pixbuf = gdk_pixbuf_scale_simple (pix,
+						      chosen->width*scale,
+						      chosen->height*scale,
+						      GDK_INTERP_BILINEAR);
+		    g_object_unref (pix);
+		}
+		else
+		{   /* don't scale */
+		    pixbuf = pix;
+		}
+	    }
+	    break;
+	}
+    case ITDB_THUMB_TYPE_INVALID:
+	g_return_val_if_reached (NULL);
+    } /* switch (...) */
+
+    return pixbuf;
+}
+
+static GList *itdb_thumb_ipod_to_pixbufs (Itdb_Device *device,
+                                          Itdb_Thumb_Ipod *thumb)
+{
+        const GList *items;
+        GList *pixbufs = NULL;
+
+        g_return_val_if_fail (thumb != NULL, NULL);
+        g_return_val_if_fail (thumb->parent.data_type == ITDB_THUMB_TYPE_IPOD, NULL);
+
+        for (items = itdb_thumb_ipod_get_thumbs (thumb);
+             items != NULL;
+             items = items->next) {
+            GdkPixbuf *pixbuf;
+            pixbuf = itdb_thumb_ipod_item_to_pixbuf (device, items->data);
+            if (pixbuf != NULL) {
+                pixbufs = g_list_prepend (pixbufs, pixbuf);
+            }
+        }
+
+        return pixbufs;
+}
+
+/**
+ * itdb_thumb_to_pixbufs:
+ * @device: an #Itdb_Device
+ * @thumb:  an #Itdb_Thumb
+ *
+ * Converts @thumb to a #GList of #GdkPixbuf. The returned #GList will
+ * generally contain only 1 element, the full-size pixbuf associated with
+ * @thumb, but when the artwork has been read from the ipod and hasn't been
+ * modified from the library, then the returned #GList will contain several
+ * #GdkPixbuf corresponding to the various thumbnail sizes that were
+ * written to the iPod database.
+ *
+ * Returns: a #GList of #GdkPixbuf which are associated with @thumb, NULL
+ * if the pixbuf was invalid or if libgpod is compiled without gdk-pixbuf
+ * support. The #GdkPixbuf must be unreffed with gdk_pixbuf_unref() after use
+ * and the #GList must be freed with g_list_free().
+ *
+ * Since: 0.7.0
+ */
+GList *itdb_thumb_to_pixbufs (Itdb_Device *device, Itdb_Thumb *thumb)
+{
+    GList *pixbufs = NULL;
+    GdkPixbuf *pixbuf;
+
+    switch (thumb->data_type) {
+    case ITDB_THUMB_TYPE_IPOD:
+        pixbufs = itdb_thumb_ipod_to_pixbufs (device, (Itdb_Thumb_Ipod *)thumb);
+        break;
+    case ITDB_THUMB_TYPE_FILE:
+    case ITDB_THUMB_TYPE_MEMORY:
+    case ITDB_THUMB_TYPE_PIXBUF:
+        pixbuf = itdb_thumb_to_pixbuf_at_size (device, thumb, -1, -1);
+        pixbufs = g_list_append (pixbufs, pixbuf);
+        break;
+    case ITDB_THUMB_TYPE_INVALID:
+        g_assert_not_reached ();
+    }
+
+    return pixbufs;
+}
+#else
+gpointer itdb_thumb_to_pixbuf_at_size (Itdb_Device *device, Itdb_Thumb *thumb,
+                                       gint width, gint height)
+{
+    return NULL;
+}
+
+
+GList *itdb_thumb_to_pixbufs (Itdb_Device *device, Itdb_Thumb *thumb)
+{
+    return NULL;
+}
+#endif

Added: libgpod/trunk/libgpod/branches/upstream/current/src/itdb_thumb.h
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/itdb_thumb.h	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/itdb_thumb.h	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,131 @@
+/*
+|  Copyright (C) 2002-2007 Jorg Schuler <jcsjcs at users sourceforge net>
+|                2007 Christophe Fergeau <teuf at gnome org>
+|
+|  The code contained in this file is free software; you can redistribute
+|  it and/or modify it under the terms of the GNU Lesser General Public
+|  License as published by the Free Software Foundation; either version
+|  2.1 of the License, or (at your option) any later version.
+|
+|  This file 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
+|  Lesser General Public License for more details.
+|
+|  You should have received a copy of the GNU Lesser General Public
+|  License along with this code; if not, write to the Free Software
+|  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+|
+|  iTunes and iPod are trademarks of Apple
+|
+|  This product is not supported/written/published by Apple!
+*/
+#ifndef __ITDB_THUMB_H__
+#define __ITDB_THUMB_H__
+
+#include "itdb.h"
+#include "itdb_device.h"
+
+/* Types of thumbnails in Itdb_Image */
+typedef enum {
+    ITDB_THUMB_TYPE_INVALID,
+    ITDB_THUMB_TYPE_FILE,
+    ITDB_THUMB_TYPE_MEMORY,
+    ITDB_THUMB_TYPE_PIXBUF,
+    ITDB_THUMB_TYPE_IPOD
+} ItdbThumbDataType;
+
+/* The Itdb_Thumb structure can represent two slightly different
+   thumbnails:
+
+  a) a thumbnail before it's transferred to the iPod.
+
+     offset and size are 0
+
+     width and height, if unequal 0, will indicate the size on the
+     iPod. width and height are set the first time a pixbuf is
+     requested for this thumbnail.
+
+     type is set according to the type this thumbnail represents
+
+     filename point to a 'real' image file OR image_data and
+     image_data_len are set.
+
+  b) a thumbnail (big or small) stored on a database in the iPod.  In
+     these cases, id corresponds to the ID originally used in the
+     database, filename points to a .ithmb file on the iPod
+ */
+
+/**
+ * Itdb_Thumb:
+ * @data_type: The type of data (file, memory, pixbuf, ipod, etc.)
+ * @rotation:  Angle by which the image is rotated counterclockwise
+ *
+ * This is an opaque structure representing a thumbnail to be
+ * transferred to the ipod or read from the ipod.
+ *
+ * Since: 0.3.0
+ */
+struct _Itdb_Thumb {
+    ItdbThumbDataType data_type;
+    guint rotation;
+};
+
+struct _Itdb_Thumb_File {
+    struct _Itdb_Thumb parent;
+    gchar *filename;
+};
+typedef struct _Itdb_Thumb_File Itdb_Thumb_File;
+
+struct _Itdb_Thumb_Memory {
+    struct _Itdb_Thumb parent;
+    guchar  *image_data;      /* holds the thumbnail data of
+				 non-transfered thumbnails when
+				 filename == NULL */
+    gsize   image_data_len;   /* length of data */
+};
+typedef struct _Itdb_Thumb_Memory Itdb_Thumb_Memory;
+
+struct _Itdb_Thumb_Pixbuf {
+    struct _Itdb_Thumb parent;
+    gpointer pixbuf;
+};
+typedef struct _Itdb_Thumb_Pixbuf Itdb_Thumb_Pixbuf;
+
+struct _Itdb_Thumb_Ipod {
+    struct _Itdb_Thumb parent;
+    GList *thumbs;
+};
+typedef struct _Itdb_Thumb_Ipod Itdb_Thumb_Ipod;
+
+struct _Itdb_Thumb_Ipod_Item {
+    const Itdb_ArtworkFormat *format;
+    gchar   *filename;
+    guint32 offset;
+    guint32 size;
+    gint16  width;
+    gint16  height;
+    gint16  horizontal_padding;
+    gint16  vertical_padding;
+};
+typedef struct _Itdb_Thumb_Ipod_Item Itdb_Thumb_Ipod_Item;
+
+G_GNUC_INTERNAL Itdb_Thumb *itdb_thumb_new_from_file (const gchar *filename);
+G_GNUC_INTERNAL Itdb_Thumb *itdb_thumb_new_from_data (const guchar *data,
+                                                      gsize len);
+G_GNUC_INTERNAL Itdb_Thumb *itdb_thumb_new_from_pixbuf (gpointer pixbuf);
+G_GNUC_INTERNAL Itdb_Thumb_Ipod_Item *itdb_thumb_new_item_from_ipod (const Itdb_ArtworkFormat *format);
+G_GNUC_INTERNAL Itdb_Thumb *itdb_thumb_ipod_new (void);
+G_GNUC_INTERNAL void itdb_thumb_set_rotation (Itdb_Thumb *thumb,
+                                              guint rotation);
+G_GNUC_INTERNAL guint itdb_thumb_get_rotation (Itdb_Thumb *thumb);
+G_GNUC_INTERNAL void itdb_thumb_ipod_add (Itdb_Thumb_Ipod *thumbs,
+                                          Itdb_Thumb_Ipod_Item *thumb);
+G_GNUC_INTERNAL const GList *itdb_thumb_ipod_get_thumbs (Itdb_Thumb_Ipod *thumbs);
+G_GNUC_INTERNAL char *itdb_thumb_ipod_get_filename (Itdb_Device *device, Itdb_Thumb_Ipod_Item *thumb);
+G_GNUC_INTERNAL Itdb_Thumb_Ipod_Item *itdb_thumb_ipod_get_item_by_type (Itdb_Thumb *thumbs,
+                                                        const Itdb_ArtworkFormat *format);
+G_GNUC_INTERNAL gpointer
+itdb_thumb_ipod_item_to_pixbuf (Itdb_Device *device,
+                                Itdb_Thumb_Ipod_Item *item);
+#endif

Added: libgpod/trunk/libgpod/branches/upstream/current/src/itdb_track.c
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/itdb_track.c	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/itdb_track.c	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,677 @@
+/*
+|  Copyright (C) 2002-2007 Jorg Schuler <jcsjcs at users sourceforge net>
+|  Part of the gtkpod project.
+|
+|  URL: http://www.gtkpod.org/
+|  URL: http://gtkpod.sourceforge.net/
+|
+|  The code contained in this file is free software; you can redistribute
+|  it and/or modify it under the terms of the GNU Lesser General Public
+|  License as published by the Free Software Foundation; either version
+|  2.1 of the License, or (at your option) any later version.
+|
+|  This file 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
+|  Lesser General Public License for more details.
+|
+|  You should have received a copy of the GNU Lesser General Public
+|  License along with this code; if not, write to the Free Software
+|  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+|
+|  iTunes and iPod are trademarks of Apple
+|
+|  This product is not supported/written/published by Apple!
+|
+|  $Id: itdb_track.c 2159 2008-12-08 01:16:58Z tmzullinger $
+*/
+
+#include <config.h>
+
+#include "itdb_private.h"
+#include "itdb_device.h"
+#include "itdb_thumb.h"
+#include <string.h>
+
+/**
+ * itdb_track_new:
+ *
+ * Creates an empty #Itdb_Track
+ *
+ * Returns: the new #Itdb_Track, free it with itdb_track_free() when no
+ * longer needed
+ */
+Itdb_Track *itdb_track_new (void)
+{
+    Itdb_Track *track = g_new0 (Itdb_Track, 1);
+
+    track->artwork = itdb_artwork_new ();
+    track->chapterdata = itdb_chapterdata_new ();
+
+    track->visible = 1;
+    return track;
+}
+
+static gboolean haystack (gchar *filetype, gchar **desclist)
+{
+    gchar **dlp;
+    if (!filetype || !desclist) return FALSE;
+    for (dlp=desclist; *dlp; ++dlp)
+    {
+	    if (strstr (filetype, *dlp)) return TRUE;
+    }
+    return FALSE;
+}
+
+/* Attempt to set some of the unknowns to reasonable defaults */
+static void itdb_track_set_defaults (Itdb_Track *tr)
+{
+    gchar *mp3_desc[] = {"MPEG", "MP3", "mpeg", "mp3", NULL};
+    gchar *mp4_desc[] = {"AAC", "MP4", "aac", "mp4", NULL};
+    gchar *audible_subdesc[] = {"Audible", "audible", "Book", "book", NULL};
+    gchar *wav_desc[] = {"WAV", "wav", NULL};
+    gchar *m4v_desc[] = {"M4V", "MP4", "MP4V", "m4v", "mp4", "mp4v", NULL};
+
+    g_return_if_fail (tr);
+    g_return_if_fail (tr->itdb);
+
+    if (tr->mark_unplayed == 0)
+    {
+	/* don't have the iPod mark this track with a bullet as
+	   unplayed. Should be set to 0x02 for podcasts that have not
+	   yet been played. */
+	tr->mark_unplayed = 0x01;
+    }
+
+    /* The exact meaning of unk126 is unknown, but always seems to be
+       0xffff for MP3/AAC tracks, 0x0 for uncompressed tracks (like WAVE
+       format), 0x1 for Audible. */
+    if (tr->unk126 == 0)
+    {
+	if (haystack (tr->filetype, mp3_desc))
+	{
+	    tr->unk126 = 0xffff;
+	}
+	else if (haystack (tr->filetype, mp4_desc))
+	{
+	    if (haystack (tr->filetype, audible_subdesc))
+	    {
+		tr->unk126 = 0x01;
+	    }
+		else
+	    {
+		tr->unk126 = 0xffff;
+	    }
+	}
+	else if (haystack (tr->filetype, wav_desc))
+	{
+	    tr->unk126 = 0x00;
+	}
+	else
+	{
+	    tr->unk126 = 0x00;  /* default value */
+	}
+    }
+    /* The exact meaning of unk144 is unknown, but MP3 tracks appear to
+       be always 0x0000000c or 0x0100000c (if played one or more times
+       in iTunes), AAC tracks are always 0x01000033, Audible files are
+       0x01000029, WAV files are 0x0. */
+    if (tr->unk144 == 0)
+    {
+	if (haystack (tr->filetype, mp3_desc))
+	{
+	    tr->unk144 = 0x000c;
+	}
+	else if (haystack (tr->filetype, mp4_desc))
+	{
+	    if (haystack (tr->filetype, audible_subdesc))
+	    {
+		tr->unk144 = 0x0029;
+	    }
+		else
+	    {
+		tr->unk144 = 0x0033;
+	    }
+	}
+	else if (haystack (tr->filetype, wav_desc))
+	{
+	    tr->unk144 = 0x0000;
+	}
+	else
+	{
+	    tr->unk144 = 0x0000;  /* default value */
+	}
+    }
+    if (itdb_device_supports_video (tr->itdb->device))
+    {
+	/* The unk208 field seems to denote whether the file is a
+	   video or not.  It seems that it must be set to 0x00000002
+	   for video files. */
+	/* Only doing that for iPod videos since it remains to be
+	 * proven that setting unk208 to non-0 doesn't upset older
+	 * ipod models
+	 */
+	if (tr->mediatype == 0)
+	{
+	    if (haystack (tr->filetype, m4v_desc))
+	    {
+		/* set type to video (0x00000002) */
+		tr->mediatype = 0x00000002;
+	    }
+	    else
+	    {
+		/* set type to audio */
+		tr->mediatype = 0x00000001;
+	    }
+	}
+    }
+    /* The sample rate of the track expressed as an IEEE 32 bit
+       floating point number.  It's uncertain why this is here.  itdb
+       will set this when adding a track */
+    tr->samplerate2 = tr->samplerate;
+
+    /* set unique ID when not yet set */
+    if (tr->dbid == 0)
+    {
+	GList *gl;
+	guint64 id;
+	do
+	{
+	    id = ((guint64)g_random_int () << 32) |
+		((guint64)g_random_int ());
+	    /* check if id is really unique */
+	    for (gl=tr->itdb->tracks; id && gl; gl=gl->next)
+	    {
+		Itdb_Track *g_tr = gl->data;
+		g_return_if_fail (g_tr);
+		if (id == g_tr->dbid)  id = 0;
+	    }
+	} while (id == 0);
+	tr->dbid = id;
+	tr->dbid2= id;
+    }
+    if (tr->dbid2 == 0)  tr->dbid2 = tr->dbid;
+}
+
+/**
+ * itdb_track_add:
+ * @itdb:   an #Itdb_iTunesDB
+ * @track:  an #Itdb_Track
+ * @pos:    position of the track to add
+ *
+ * Adds @track to @itdb->tracks at position @pos (or at the end if pos
+ * is -1). The application is responsible to also add it to the master
+ * playlist. The @itdb gets ownership of the @track and will take care of
+ * freeing the memory it uses when it's no longer necessary.
+ */
+void itdb_track_add (Itdb_iTunesDB *itdb, Itdb_Track *track, gint32 pos)
+{
+    g_return_if_fail (itdb);
+    g_return_if_fail (track);
+    g_return_if_fail (!track->userdata || track->userdata_duplicate);
+
+    track->itdb = itdb;
+
+    itdb_track_set_defaults (track);
+
+    itdb->tracks = g_list_insert (itdb->tracks, track, pos);
+}
+
+/**
+ * itdb_track_free:
+ * @track: an #Itdb_Track
+ *
+ * Frees the memory used by @track
+ */
+void itdb_track_free (Itdb_Track *track)
+{
+    g_return_if_fail (track);
+
+    g_free (track->title);
+    g_free (track->ipod_path);
+    g_free (track->album);
+    g_free (track->artist);
+    g_free (track->genre);
+    g_free (track->filetype);
+    g_free (track->comment);
+    g_free (track->category);
+    g_free (track->composer);
+    g_free (track->grouping);
+    g_free (track->description);
+    g_free (track->podcasturl);
+    g_free (track->podcastrss);
+    g_free (track->subtitle);
+    g_free (track->tvshow);
+    g_free (track->tvepisode);
+    g_free (track->tvnetwork);
+    g_free (track->albumartist);
+    g_free (track->keywords);
+    g_free (track->sort_artist);
+    g_free (track->sort_title);
+    g_free (track->sort_album);
+    g_free (track->sort_albumartist);
+    g_free (track->sort_composer);
+    g_free (track->sort_tvshow);
+
+    itdb_chapterdata_free (track->chapterdata);
+
+    itdb_artwork_free (track->artwork);
+
+    if (track->userdata && track->userdata_destroy)
+	(*track->userdata_destroy) (track->userdata);
+
+    g_free (track);
+}
+
+/**
+ * itdb_track_remove:
+ * @track: an #Itdb_Track
+ *
+ * Removes @track from the #Itdb_iTunesDB it's associated with, and frees the
+ * memory it uses. It doesn't remove the track from the playlists it may have
+ * been added to, in particular it won't be removed from the master playlist.
+ */
+void itdb_track_remove (Itdb_Track *track)
+{
+    Itdb_iTunesDB *itdb;
+
+    g_return_if_fail (track);
+    itdb = track->itdb;
+    g_return_if_fail (itdb);
+
+    itdb->tracks = g_list_remove (itdb->tracks, track);
+    itdb_track_free (track);
+}
+
+/**
+ * itdb_track_unlink:
+ * @track: an #Itdb_Track
+ *
+ * Removes @track from the #Itdb_iTunesDB it's associated with, but do not free
+ * memory. It doesn't remove the track from the playlists it may have been
+ * added to, in particular it won't be removed from the master playlist.
+ * @track->itdb is set to NULL.
+ */
+void itdb_track_unlink (Itdb_Track *track)
+{
+    Itdb_iTunesDB *itdb;
+
+    g_return_if_fail (track);
+    itdb = track->itdb;
+    g_return_if_fail (itdb);
+
+    itdb->tracks = g_list_remove (itdb->tracks, track);
+    track->itdb = NULL;
+}
+
+/**
+ * itdb_track_duplicate:
+ * @tr: an #Itdb_Track
+ *
+ * Duplicates an existing track
+ *
+ * Returns: a newly allocated #Itdb_Track
+ */
+Itdb_Track *itdb_track_duplicate (Itdb_Track *tr)
+{
+    Itdb_Track *tr_dup;
+
+    g_return_val_if_fail (tr, NULL);
+
+    tr_dup = g_new (Itdb_Track, 1);
+    memcpy (tr_dup, tr, sizeof (Itdb_Track));
+
+    /* clear itdb pointer */
+    tr_dup->itdb = NULL;
+
+    /* copy strings */
+    tr_dup->title = g_strdup (tr->title);
+    tr_dup->album = g_strdup (tr->album);
+    tr_dup->artist = g_strdup (tr->artist);
+    tr_dup->genre = g_strdup (tr->genre);
+    tr_dup->filetype = g_strdup (tr->filetype);
+    tr_dup->comment = g_strdup (tr->comment);
+    tr_dup->category = g_strdup (tr->category);
+    tr_dup->composer = g_strdup (tr->composer);
+    tr_dup->grouping = g_strdup (tr->grouping);
+    tr_dup->description = g_strdup (tr->description);
+    tr_dup->podcasturl = g_strdup (tr->podcasturl);
+    tr_dup->podcastrss = g_strdup (tr->podcastrss);
+    tr_dup->subtitle = g_strdup (tr->subtitle);
+    tr_dup->tvshow = g_strdup (tr->tvshow);
+    tr_dup->tvepisode = g_strdup (tr->tvepisode);
+    tr_dup->tvnetwork = g_strdup (tr->tvnetwork);
+    tr_dup->albumartist = g_strdup (tr->albumartist);
+    tr_dup->keywords = g_strdup (tr->keywords);
+    tr_dup->ipod_path = g_strdup (tr->ipod_path);
+    tr_dup->sort_artist = g_strdup (tr->sort_artist);
+    tr_dup->sort_title = g_strdup (tr->sort_title);
+    tr_dup->sort_album = g_strdup (tr->sort_album);
+    tr_dup->sort_albumartist = g_strdup (tr->sort_albumartist);
+    tr_dup->sort_composer = g_strdup (tr->sort_composer);
+    tr_dup->sort_tvshow = g_strdup (tr->sort_tvshow);
+
+
+    /* Copy chapterdata */
+    tr_dup->chapterdata = itdb_chapterdata_duplicate (tr->chapterdata);
+
+    /* Copy thumbnail data */
+    if (tr->artwork != NULL) {
+        tr_dup->artwork = itdb_artwork_duplicate (tr->artwork);
+    }
+
+    /* Copy userdata */
+    if (tr->userdata && tr->userdata_duplicate)
+	tr_dup->userdata = tr->userdata_duplicate (tr->userdata);
+
+    return tr_dup;
+}
+
+
+/* called by itdb_track_set_thumbnails() and
+   itdb_track_set_thumbnails_from_data() */
+static gboolean itdb_track_set_thumbnails_internal (Itdb_Track *track,
+						    const gchar *filename,
+						    const guchar *image_data,
+						    gsize image_data_len,
+                                                    gpointer *pixbuf,
+						    gint rotation,
+						    GError **error)
+{
+    gboolean result = FALSE;
+
+    g_return_val_if_fail (track, FALSE);
+    g_return_val_if_fail (filename || image_data || pixbuf, FALSE);
+
+    itdb_artwork_remove_thumbnails (track->artwork);
+    /* clear artwork id */
+    track->artwork->id = 0;
+
+    if (filename)
+    {
+        result = itdb_artwork_set_thumbnail (track->artwork, filename,
+                                             rotation, error);
+    }
+    if (image_data)
+    {
+        result = itdb_artwork_set_thumbnail_from_data (track->artwork,
+                                                       image_data,
+                                                       image_data_len,
+                                                       rotation, error);
+    }
+    if (pixbuf)
+    {
+        result = itdb_artwork_set_thumbnail_from_pixbuf (track->artwork,
+                                                         pixbuf, rotation,
+                                                         error);
+    }
+
+    if (result == TRUE)
+    {
+	/* some black magic :-( */
+	/* track->artwork_size should actually be the total size of
+	   artwork packed into MP3 tags. We don't write mp3 tags... */
+	track->artwork_size = track->artwork->artwork_size;
+	/* track->artwork_count should actually be the number of
+	   images packed into MP3 tags. */
+	track->artwork_count = 1;
+	/* for some reason artwork->artwork_size is always
+	   track->artwork_size + track->artwork_count */
+	track->artwork->artwork_size += track->artwork_count;
+	/* indicate artwork is present */
+	track->has_artwork = 0x01;
+    }
+    else
+    {
+	itdb_track_remove_thumbnails (track);
+    }
+
+    return result;
+}
+
+/**
+ * itdb_track_set_thumbnails:
+ * @track:    an #Itdb_Track
+ * @filename: image file to use as a thumbnail
+ *
+ * Uses the image contained in @filename to generate iPod thumbnails. The image
+ * can be in any format supported by gdk-pixbuf. To save memory, the thumbnails
+ * will only be generated when necessary, i.e. when itdb_save() or a similar
+ * function is called.
+ *
+ * Returns: TRUE if the thumbnail could be added, FALSE otherwise.
+ *
+ * Since: 0.3.0
+ */
+gboolean itdb_track_set_thumbnails (Itdb_Track *track,
+				    const gchar *filename)
+{
+    g_return_val_if_fail (track, FALSE);
+    g_return_val_if_fail (filename, FALSE);
+
+    return itdb_track_set_thumbnails_internal (track, filename, NULL, 0, NULL,
+					       0, NULL);
+}
+
+/**
+ * itdb_track_set_thumbnails_from_data:
+ * @track:          an #Itdb_Track
+ * @image_data:     data used to create the thumbnail (the raw contents of
+ *                  an image file)
+ * @image_data_len: length of above data block
+ *
+ * Uses @image_data to generate iPod thumbnails. The image can be in
+ * any format supported by gdk-pixbuf. To save memory, the thumbnails
+ * will only be generated when necessary, i.e. when itdb_save() or a
+ * similar function is called.
+ *
+ * Returns: TRUE if the thumbnail could be added, FALSE otherwise.
+ *
+ * Since: 0.4.0
+ */
+gboolean itdb_track_set_thumbnails_from_data (Itdb_Track *track,
+					      const guchar *image_data,
+					      gsize image_data_len)
+{
+    g_return_val_if_fail (track, FALSE);
+    g_return_val_if_fail (image_data, FALSE);
+
+    return itdb_track_set_thumbnails_internal (track, NULL,
+					       image_data, image_data_len,
+                                               NULL, 0, NULL);
+}
+
+/**
+ * itdb_track_set_thumbnails_from_pixbuf:
+ * @track:  an #Itdb_Track
+ * @pixbuf: a #GdkPixbuf used to generate the thumbnail
+ *
+ * Uses @pixbuf to generate iPod thumbnails. To save memory, the thumbnails
+ * will only be generated when necessary, i.e. when itdb_save() or a
+ * similar function is called.
+ *
+ * Returns: TRUE if the thumbnail could be added, FALSE otherwise.
+ *
+ * Since: 0.5.0
+ */
+gboolean itdb_track_set_thumbnails_from_pixbuf (Itdb_Track *track,
+                                                gpointer pixbuf)
+{
+    g_return_val_if_fail (track, FALSE);
+    g_return_val_if_fail (pixbuf, FALSE);
+
+    return itdb_track_set_thumbnails_internal (track, NULL, NULL, 0,
+                                               pixbuf, 0, NULL);
+}
+
+/**
+ * itdb_track_remove_thumbnails:
+ * @track: an #Itdb_Track
+ *
+ * Removes the thumbnails associated with @track
+ *
+ * Since: 0.3.0
+ */
+void itdb_track_remove_thumbnails (Itdb_Track *track)
+{
+    g_return_if_fail (track);
+    itdb_artwork_remove_thumbnails (track->artwork);
+    track->artwork_size = 0;
+    track->artwork_count = 0;
+    track->mhii_link = 0;
+    /* indicate no artwork is present */
+    track->has_artwork = 0x02;
+}
+
+/**
+ * itdb_track_by_id:
+ * @itdb: an #Itdb_iTunesDB
+ * @id:   ID of the track to look for
+ *
+ * Looks up a track using its ID in @itdb.
+ *
+ * Looking up tracks by ID is not really a good idea because the IDs
+ * are created by itdb just before export. The functions are here
+ * because they are needed during import of the iTunesDB which is
+ * referencing tracks by IDs.
+ *
+ * This function is very slow (linear in the number of tracks
+ * contained in the database). If you need to lookup many IDs use
+ * itdb_track_id_tree_create(), itdb_track_id_tree_destroy(), and
+ * itdb_track_id_tree_by_id().
+ *
+ * Returns: #Itdb_Track with the ID @id or NULL if the ID cannot be
+ * found.
+ */
+Itdb_Track *itdb_track_by_id (Itdb_iTunesDB *itdb, guint32 id)
+{
+    GList *gl;
+
+    g_return_val_if_fail (itdb, NULL);
+
+    for (gl=itdb->tracks; gl; gl=gl->next)
+    {
+	Itdb_Track *track = gl->data;
+	if (track->id == id)  return track;
+    }
+    return NULL;
+}
+
+static gint track_id_compare (gconstpointer a, gconstpointer b)
+{
+    if (*(guint32*) a == *(guint32*) b)
+	return 0;
+    if (*(guint32*) a > *(guint32*) b)
+	return 1;
+    return -1;
+}
+
+/**
+ * itdb_track_id_tree_create:
+ * @itdb: an #Itdb_iTunesDB
+ *
+ * Creates a balanced-binary tree for quick ID lookup that is used in
+ * itdb_track_by_id_tree()
+ *
+ * Returns: a #GTree indexed by track IDs to be freed with
+ * itdb_track_id_tree_destroy() when no longer used
+ */
+GTree *itdb_track_id_tree_create (Itdb_iTunesDB *itdb)
+{
+    GTree *idtree;
+    GList *gl;
+
+    g_return_val_if_fail (itdb, NULL);
+
+    idtree = g_tree_new (track_id_compare);
+
+    for (gl=itdb->tracks; gl; gl=gl->next)
+    {
+	Itdb_Track *tr = gl->data;
+	g_return_val_if_fail (tr, NULL);
+	g_tree_insert (idtree, &tr->id, tr);
+    }
+    return idtree;
+}
+
+/**
+ * itdb_track_id_tree_destroy:
+ * @idtree: a #GTree
+ *
+ * Frees the memory used by @idtree
+ */
+void itdb_track_id_tree_destroy (GTree *idtree)
+{
+    g_return_if_fail (idtree);
+
+    g_tree_destroy (idtree);
+}
+
+/**
+ * itdb_track_id_tree_by_id:
+ * @idtree: a #GTree created using itdb_track_id_tree_create()
+ * @id:     the ID of the track to search for
+ *
+ * Lookup an #Itdb_Track by @id using @idtree for faster lookup
+ * (compared to itdb_track_by_id())
+ *
+ * Returns: the #Itdb_Track whose ID is @id, or NULL if such a track
+ * couldn't be found
+ */
+Itdb_Track *itdb_track_id_tree_by_id (GTree *idtree, guint32 id)
+{
+    g_return_val_if_fail (idtree, NULL);
+
+    return (Itdb_Track *)g_tree_lookup (idtree, &id);
+}
+
+/**
+ * itdb_track_has_thumbnails:
+ * @track: an #Itdb_Track
+ *
+ * Determine if a @track has thumbnails
+ *
+ * Returns: TRUE if @track has artwork available, FALSE otherwise
+ *
+ * Since: 0.7.0
+ */
+gboolean itdb_track_has_thumbnails (Itdb_Track *track)
+{
+    g_return_val_if_fail (track != NULL, FALSE);
+    return ((track->artwork) && (track->artwork->thumbnail));
+}
+
+/**
+ * itdb_track_get_thumbnail:
+ * @track:  an #Itdb_Track
+ * @width:  width of the pixbuf to retrieve, -1 for the biggest possible size
+ *          (with no scaling)
+ * @height: height of the pixbuf to retrieve, -1 for the biggest possible size
+ *          (with no scaling)
+ *
+ * Get a thumbnail representing the cover associated with the current track,
+ * scaling it if appropriate. If either height or width is -1, then the biggest
+ * unscaled thumbnail available will be returned.
+ *
+ * Returns: a #GdkPixbuf that must be unreffed when no longer used, NULL
+ * if no artwork could be found or if libgpod is compiled without GdkPixbuf
+ * support
+ *
+ * Since: 0.7.0
+ */
+gpointer itdb_track_get_thumbnail (Itdb_Track *track, gint width, gint height)
+{
+    g_return_val_if_fail (track != NULL, NULL);
+    if (!itdb_track_has_thumbnails (track)) {
+        return NULL;
+    }
+    if (track->itdb != NULL) {
+        return itdb_thumb_to_pixbuf_at_size (track->itdb->device,
+                                             track->artwork->thumbnail,
+                                             width, height);
+    } else {
+        return itdb_thumb_to_pixbuf_at_size (NULL, track->artwork->thumbnail,
+                                             width, height);
+    }
+}
+

Added: libgpod/trunk/libgpod/branches/upstream/current/src/ithumb-writer.c
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/ithumb-writer.c	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/ithumb-writer.c	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,1639 @@
+/*
+ *  Copyright (C) 2005 Christophe Fergeau
+ *
+ *  URL: http://www.gtkpod.org/libgpod.html
+ *  URL: http://gtkpod.sourceforge.net/
+ * 
+ *  The code contained in this file is free software; you can redistribute
+ *  it and/or modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either version
+ *  2.1 of the License, or (at your option) any later version.
+ *  
+ *  This file 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
+ *  Lesser General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this code; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ * 
+ *  iTunes and iPod are trademarks of Apple
+ * 
+ *  This product is not supported/written/published by Apple!
+ *
+ *  $Id: ithumb-writer.c 2159 2008-12-08 01:16:58Z tmzullinger $
+ */
+
+#include <config.h>
+#include "itdb.h"
+#include "db-image-parser.h"
+
+#ifdef HAVE_GDKPIXBUF
+
+#include "itdb_private.h"
+#include "itdb_endianness.h"
+#include "pixmaps.h"
+
+#include <errno.h>
+#include <locale.h>
+#include <string.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <math.h>
+#include <fcntl.h>
+
+#include <glib/gstdio.h>
+
+/* Maximum size for .ithmb files. Reduced from 500 MB to 256 MB after
+   reports of slow iPod interface behavior */
+#define ITHUMB_MAX_SIZE (256L*1000L*1000L)
+/* for testing: */
+/*#define ITHUMB_MAX_SIZE (1L*1000L*1000L)*/
+
+struct _iThumbWriter {
+	off_t cur_offset;
+	FILE *f;
+        gchar *mountpoint;
+        gchar *filename;
+        gint current_file_index;
+	const Itdb_ArtworkFormat *img_info;
+        DbType db_type;
+        guint byte_order;
+};
+typedef struct _iThumbWriter iThumbWriter;
+
+
+static guint16 get_RGB_565_pixel (const guchar *pixel, gint byte_order)
+{
+    gint r;
+    gint g;
+    gint b;
+
+    r = pixel[0];
+    g = pixel[1];
+    b = pixel[2];
+
+    r >>= (8 - RED_BITS_565);
+    g >>= (8 - GREEN_BITS_565);
+    b >>= (8 - BLUE_BITS_565);
+    r = (r << RED_SHIFT_565) & RED_MASK_565;
+    g = (g << GREEN_SHIFT_565) & GREEN_MASK_565;
+    b = (b << BLUE_SHIFT_565) & BLUE_MASK_565;
+
+    return get_gint16 (r | g | b, byte_order);
+}
+
+static guint16 *
+pack_RGB_565 (GdkPixbuf *pixbuf, const Itdb_ArtworkFormat *img_info,
+	      gint horizontal_padding, gint vertical_padding,
+	      guint32 *thumb_size)
+{
+	guchar *pixels;
+	guint16 *result;
+	gint row_stride;
+	gint channels;
+	gint width;
+	gint height;
+	gint h;
+	gint byte_order;
+        gint dest_width;
+
+	g_object_get (G_OBJECT (pixbuf), 
+		      "rowstride", &row_stride, "n-channels", &channels,
+		      "height", &height, "width", &width,
+		      "pixels", &pixels, NULL);
+	g_return_val_if_fail (((width + horizontal_padding) <= img_info->width), NULL);
+	g_return_val_if_fail (((height + vertical_padding) <= img_info->height), NULL);
+
+        if ((img_info->align_row_bytes) && ((img_info->width % 2) != 0)) {
+            /* each pixel is 2 bytes, to align rows on 4 bytes boundaries,
+             * width must be a multiple of 2 */
+            dest_width = img_info->width + 1;
+        } else {
+            dest_width = img_info->width;
+        }
+
+	/* Make sure thumb size calculation won't overflow */
+	g_return_val_if_fail (dest_width != 0, NULL);
+	g_return_val_if_fail (dest_width < G_MAXUINT/2, NULL);
+	g_return_val_if_fail (img_info->height < G_MAXUINT/(2*dest_width), NULL);
+	*thumb_size = dest_width * img_info->height * 2;
+	result = g_malloc0 (*thumb_size);
+
+	byte_order = itdb_thumb_get_byteorder (img_info->format);
+
+        for (h = 0; h < vertical_padding; h++) {
+            gint w;
+            gint line = h * dest_width;
+
+            for (w = 0 ; w < dest_width; w++) {
+                result[line + w] = get_RGB_565_pixel (img_info->back_color, 
+                                                      byte_order);
+            }
+            line += (height+vertical_padding)*dest_width;
+            for (w = 0 ; w < dest_width; w++) {
+                result[line + w] = get_RGB_565_pixel (img_info->back_color, 
+                                                      byte_order);
+            }
+        }
+
+	for (h = 0; h < height; h++) {
+            gint line = (h+vertical_padding)*dest_width;
+            gint w;
+            for (w = 0; w < dest_width; w++) {
+                guint16 packed_pixel;
+                if (w < horizontal_padding) {
+                    packed_pixel = get_RGB_565_pixel (img_info->back_color,
+                                                      byte_order);
+                } else if (w >= horizontal_padding+width) {
+                    packed_pixel = get_RGB_565_pixel (img_info->back_color,
+                                                      byte_order);
+                } else {
+                    guchar *cur_pixel;
+
+                    cur_pixel = &pixels[h*row_stride +
+					(w - horizontal_padding)*channels];
+                    packed_pixel = get_RGB_565_pixel (cur_pixel, byte_order);
+                }
+                result[line + w] = packed_pixel;
+            }
+	}
+	return result;
+}
+
+static guint16 get_RGB_555_pixel (const guchar *pixel, gint byte_order, 
+                                  gboolean has_alpha)
+{
+    gint r;
+    gint g;
+    gint b;
+    gint a;
+
+    r = pixel[0];
+    g = pixel[1];
+    b = pixel[2];
+    if (has_alpha) {
+        a = pixel[3];
+    } else {
+        /* I'm not sure if the highest bit really is the alpha channel. 
+         * For now I'm just setting this bit because that's what I have seen. */
+        a = 1;
+    }
+
+    r >>= (8 - RED_BITS_555);
+    g >>= (8 - GREEN_BITS_555);
+    b >>= (8 - BLUE_BITS_555);
+    r = (r << RED_SHIFT_555) & RED_MASK_555;
+    g = (g << GREEN_SHIFT_555) & GREEN_MASK_555;
+    b = (b << BLUE_SHIFT_555) & BLUE_MASK_555;
+    a = (a << ALPHA_SHIFT_555) & ALPHA_MASK_555;
+
+    return get_gint16 (a | r | g | b, byte_order);
+}
+
+static guint16 *
+pack_RGB_555 (GdkPixbuf *pixbuf, const Itdb_ArtworkFormat *img_info,
+	      gint horizontal_padding, gint vertical_padding,
+	      guint32 *thumb_size)
+{
+	guchar *pixels;
+	guint16 *result;
+	gint row_stride;
+	gint channels;
+	gint width;
+	gint height;
+	gint h;
+	gint byte_order;
+        gint dest_width;
+
+	g_object_get (G_OBJECT (pixbuf), 
+		      "rowstride", &row_stride, "n-channels", &channels,
+		      "height", &height, "width", &width,
+		      "pixels", &pixels, NULL);
+	g_return_val_if_fail (((width + horizontal_padding) <= img_info->width), NULL);
+	g_return_val_if_fail (((height + vertical_padding) <= img_info->height), NULL);
+
+        if ((img_info->align_row_bytes) && ((img_info->width % 2) != 0)) {
+            /* each pixel is 2 bytes, to align rows on 4 bytes boundaries,
+             * width must be a multiple of 2 */
+            dest_width = img_info->width + 1;
+        } else {
+            dest_width = img_info->width;
+        }
+
+	/* Make sure thumb size calculation won't overflow */
+	g_return_val_if_fail (dest_width != 0, NULL);
+	g_return_val_if_fail (dest_width < G_MAXUINT/2, NULL);
+	g_return_val_if_fail (img_info->height < G_MAXUINT/(2*dest_width), NULL);
+	*thumb_size = dest_width * img_info->height * 2;
+	result = g_malloc0 (*thumb_size);
+
+	byte_order = itdb_thumb_get_byteorder (img_info->format);
+
+        for (h = 0; h < vertical_padding; h++) {
+            gint w;
+            gint line = h * dest_width;
+
+            for (w = 0 ; w < dest_width; w++) {
+                result[line + w] = get_RGB_555_pixel (img_info->back_color, 
+                                                      byte_order, TRUE);
+            }
+            line += (height+vertical_padding)*dest_width;
+            for (w = 0 ; w < dest_width; w++) {
+                result[line + w] = get_RGB_555_pixel (img_info->back_color, 
+                                                      byte_order, TRUE);
+            }
+        }
+
+	for (h = 0; h < height; h++) {
+            gint line = (h+vertical_padding)*dest_width;
+            gint w;
+            for (w = 0; w < dest_width; w++) {
+                guint16 packed_pixel;
+                if (w < horizontal_padding) {
+                    packed_pixel = get_RGB_555_pixel (img_info->back_color,
+                                                      byte_order, TRUE);
+                } else if (w >= horizontal_padding+width) {
+                    packed_pixel = get_RGB_555_pixel (img_info->back_color,
+                                                      byte_order, TRUE);
+                } else {
+                    guchar *cur_pixel;
+
+                    cur_pixel = &pixels[h*row_stride +
+					(w-horizontal_padding)*channels];
+                    packed_pixel = get_RGB_555_pixel (cur_pixel, byte_order,
+                                                      FALSE);
+                }
+                result[line + w] = packed_pixel;
+            }
+	}
+	return result;
+}
+
+static guint16 get_RGB_888_pixel (const guchar *pixel, gint byte_order,
+                                  gboolean has_alpha)
+{
+    gint r;
+    gint g;
+    gint b;
+    gint a;
+
+    r = pixel[0];
+    g = pixel[1];
+    b = pixel[2];
+    if (has_alpha) {
+        a = pixel[3];
+    } else {
+        /* I'm not sure if the highest bit really is the alpha channel. 
+         * For now I'm just setting this bit because that's what I have seen. */
+        a = 0xff; 
+    }
+    r >>= (8 - RED_BITS_888);
+    g >>= (8 - GREEN_BITS_888);
+    b >>= (8 - BLUE_BITS_888);
+    r = (r << RED_SHIFT_888) & RED_MASK_888;
+    g = (g << GREEN_SHIFT_888) & GREEN_MASK_888;
+    b = (b << BLUE_SHIFT_888) & BLUE_MASK_888;
+    a = (a << ALPHA_SHIFT_888) & ALPHA_MASK_888;
+
+    return get_gint32 (a | r | g | b, byte_order);
+}
+
+static guint16 *
+pack_RGB_888 (GdkPixbuf *pixbuf, const Itdb_ArtworkFormat *img_info,
+	      gint horizontal_padding, gint vertical_padding,
+	      guint32 *thumb_size)
+{
+	guchar *pixels;
+	guint32 *result;
+	gint row_stride;
+	gint channels;
+	gint width;
+	gint height;
+	gint h;
+	gint byte_order;
+
+	g_object_get (G_OBJECT (pixbuf), 
+		      "rowstride", &row_stride, "n-channels", &channels,
+		      "height", &height, "width", &width,
+		      "pixels", &pixels, NULL);
+	g_return_val_if_fail (((width + horizontal_padding) <= img_info->width), NULL);
+	g_return_val_if_fail (((height + vertical_padding) <= img_info->height), NULL);
+	g_return_val_if_fail ((width <= img_info->width) && (height <= img_info->height), NULL);
+
+	/* Make sure thumb size calculation won't overflow */
+	g_return_val_if_fail (img_info->width != 0, NULL);
+	g_return_val_if_fail (img_info->width < G_MAXUINT/4, NULL);
+	g_return_val_if_fail (img_info->height < G_MAXUINT/(4*img_info->width), NULL);
+	*thumb_size = img_info->width * img_info->height * 4;
+	result = g_malloc0 (*thumb_size);
+
+	byte_order = itdb_thumb_get_byteorder (img_info->format);
+
+        for (h = 0; h < vertical_padding; h++) {
+            gint w;
+            gint line = h * img_info->width;
+
+            for (w = 0 ; w < img_info->width; w++) {
+                result[line + w] = get_RGB_888_pixel (img_info->back_color, 
+                                                      byte_order, TRUE);
+            }
+            line += (height+vertical_padding)*img_info->width;
+            for (w = 0 ; w < img_info->width; w++) {
+                result[line + w] = get_RGB_888_pixel (img_info->back_color, 
+                                                      byte_order, TRUE);
+            }
+        }
+
+	for (h = 0; h < height; h++) {
+            gint line = (h+vertical_padding)*img_info->width;
+            gint w;
+            for (w = 0; w < img_info->width; w++) {
+                guint16 packed_pixel;
+                if (w < horizontal_padding) {
+                    packed_pixel = get_RGB_888_pixel (img_info->back_color,
+                                                      byte_order, TRUE);
+                } else if (w >= horizontal_padding+width) {
+                    packed_pixel = get_RGB_888_pixel (img_info->back_color,
+                                                      byte_order, TRUE);
+                } else {
+                    guchar *cur_pixel;
+
+                    cur_pixel = &pixels[h*row_stride +
+					(w-horizontal_padding)*channels];
+                    packed_pixel = get_RGB_888_pixel (cur_pixel, byte_order,
+                                                      FALSE);
+                }
+                result[line + w] = packed_pixel;
+            }
+	}
+	return (guint16 *)result;
+}
+
+
+static guint16 *derange_pixels (guint16 *pixels_s, guint16 *pixels_d,
+				gint width, gint height, gint row_stride)
+{
+    g_return_val_if_fail (width == height, pixels_s);
+
+    if (pixels_s == NULL)
+    {
+	g_return_val_if_fail (width != 0, NULL);
+	g_return_val_if_fail (width < G_MAXUINT/sizeof (guint16), NULL);
+	g_return_val_if_fail (height < G_MAXUINT/(sizeof (guint16)*width), NULL);
+
+	pixels_s = g_malloc0 (sizeof (guint16)*width*height);
+
+    }
+
+    if (width == 1)
+    {
+	*pixels_s = *pixels_d;
+    }
+    else
+    {
+	derange_pixels (pixels_s + 0,
+			pixels_d + 0 + 0,
+			width/2, height/2,
+			row_stride);
+	derange_pixels (pixels_s + (width/2)*(height/2),
+			pixels_d + (height/2)*row_stride + 0,
+			width/2, height/2,
+			row_stride);
+	derange_pixels (pixels_s + 2*(width/2)*(height/2),
+			pixels_d + width/2,
+			width/2, height/2,
+			row_stride);
+	derange_pixels (pixels_s + 3*(width/2)*(height/2),
+			pixels_d + (height/2)*row_stride + width/2,
+			width/2, height/2,
+			row_stride);
+    }
+    
+    return pixels_s;
+}
+
+static guint16 *
+pack_rec_RGB_555 (GdkPixbuf *pixbuf, const Itdb_ArtworkFormat *img_info,
+		  gint horizontal_padding, gint vertical_padding,
+		  guint32 *thumb_size)
+{
+    guint16 *pixels;
+    guint16 *deranged_pixels = NULL;
+
+    pixels = pack_RGB_555 (pixbuf, img_info,
+			   horizontal_padding, vertical_padding,
+			   thumb_size);
+
+    if (pixels)
+    {
+        gint row_stride;
+        if ((img_info->align_row_bytes) && ((img_info->width % 2) != 0)) {
+            row_stride = img_info->width + 1;
+        } else {
+            row_stride = img_info->width;
+        }
+	deranged_pixels = derange_pixels (NULL, pixels,
+					  img_info->width, img_info->height,
+					  row_stride);
+	g_free (pixels);
+    }
+
+    return deranged_pixels;
+}
+
+static guchar *
+pack_I420 (GdkPixbuf *orig_pixbuf, const Itdb_ArtworkFormat *img_info,
+	   gint horizontal_padding, gint vertical_padding,
+	   guint32 *thumb_size)
+{
+    GdkPixbuf *pixbuf;
+    gint width, height;
+    gint orig_height, orig_width;
+    gint rowstride;
+    gint h, z;
+    guchar *pixels, *yuvdata;
+    guint yuvsize, halfyuv;
+    gint ustart, vstart;
+
+    g_return_val_if_fail (img_info, NULL);
+
+    width = img_info->width;
+    height = img_info->height;
+
+    g_object_get (G_OBJECT (orig_pixbuf), 
+		  "height", &orig_height, "width", &orig_width, NULL);
+
+    /* copy into new pixmap with padding applied */
+    pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB,
+			     gdk_pixbuf_get_has_alpha (orig_pixbuf),
+			     8,
+			     width, height);
+    gdk_pixbuf_copy_area (orig_pixbuf, 0, 0, orig_width, orig_height,
+			  pixbuf, horizontal_padding, vertical_padding);
+
+    g_object_get (G_OBJECT (pixbuf), 
+		  "rowstride", &rowstride,
+		  "pixels", &pixels, NULL);
+
+    /* Make sure yuvsize calculation won't overflow */
+    g_return_val_if_fail (height != 0, NULL);
+    g_return_val_if_fail (height < G_MAXUINT/2, NULL);
+    g_return_val_if_fail (width < G_MAXUINT/(2*height), NULL);
+
+    halfyuv = width*height;
+
+    yuvsize = 2*halfyuv;
+    *thumb_size = yuvsize;
+
+    yuvdata = g_malloc (yuvsize);
+
+    ustart = halfyuv;
+    vstart = ustart + halfyuv/4;
+
+    /* FIXME: consider rowstride -- currently we assume rowstride==width */
+    for (z=0,h=0; h < halfyuv; ++h)
+    {
+	gint r,g,b;
+	gint u, v, y;
+	gint row, col;
+
+	r = pixels[z];
+	g = pixels[z+1];
+	b = pixels[z+2];
+
+	y = (( 66*r + 129*g +  25*b + 128) >> 8) + 16;
+	u = ((-38*r -  74*g + 112*b + 128) >> 8) + 128;
+	v = ((112*r -  94*g -  18*b + 128) >> 8) + 128;
+
+	row = h / width;
+	col = h % width;
+
+	yuvdata[h] = y;
+	yuvdata[ustart + (row/2)*(width/2) + col/2] = u;
+	yuvdata[vstart + (row/2)*(width/2) + col/2] = v;
+
+	if (gdk_pixbuf_get_has_alpha(pixbuf))
+	    z+=4;
+	else
+	    z+=3;
+    }
+
+    return yuvdata;
+}
+
+/* pack_UYVY() is adapted from imgconvert.c from the GPixPod project
+ * (www.gpixpod.org) */
+static guchar *
+pack_UYVY (GdkPixbuf *orig_pixbuf, const Itdb_ArtworkFormat *img_info,
+	   gint horizontal_padding, gint vertical_padding,
+	   guint32 *thumb_size)
+{
+    GdkPixbuf *pixbuf;
+    guchar *pixels, *yuvdata;
+    gint width;
+    gint height;
+    gint orig_height, orig_width;
+    gint x = 0;
+    gint z = 0;
+    gint z2 = 0;
+    gint h = 0;
+    gint r0, g0, b0, r1, g1, b1, r2, g2, b2, r3, g3, b3;
+    gint rowstride;
+    guint yuvsize, halfyuv;
+    gint alphabit, rgbpx;
+    gint exc;
+
+    g_return_val_if_fail (img_info, NULL);
+
+    width = img_info->width;
+    height = img_info->height;
+    *thumb_size = 2*width*height;
+
+    g_object_get (G_OBJECT (orig_pixbuf), 
+		  "height", &orig_height, "width", &orig_width, NULL);
+
+    /* copy into new pixmap with padding applied */
+    pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB,
+			     gdk_pixbuf_get_has_alpha (orig_pixbuf),
+			     8,
+			     width, height);
+    gdk_pixbuf_copy_area (orig_pixbuf, 0, 0, orig_width, orig_height,
+			  pixbuf, horizontal_padding, vertical_padding);
+
+    g_object_get (G_OBJECT (pixbuf), 
+		  "rowstride", &rowstride,
+		  "pixels", &pixels, NULL);
+
+    /* Make sure yuvsize calculation won't overflow */
+    g_return_val_if_fail (height != 0, NULL);
+    g_return_val_if_fail (height < G_MAXUINT/2, NULL);
+    g_return_val_if_fail (width < G_MAXUINT/(2*height), NULL);
+
+    yuvsize = width*2*height;
+
+    yuvdata = g_malloc (yuvsize);
+    halfyuv = yuvsize/2;
+    if (gdk_pixbuf_get_has_alpha(pixbuf))
+    {
+	alphabit = 1;
+	rgbpx = 4;
+    }
+    else
+    {
+	alphabit = 0;
+	rgbpx = 3;
+    }
+    exc = rowstride - width*rgbpx;
+
+    while(h < height)
+    {
+	gint w = 0;
+	if((h % 2) == 0)
+	{
+	    while(w < width)
+	    {
+		r0 = pixels[x];
+		g0 = pixels[x+1];
+		b0 = pixels[x+2];
+		r1 = pixels[x+3+alphabit];
+		g1 = pixels[x+4+alphabit];
+		b1 = pixels[x+5+alphabit];
+		yuvdata[z] = ((r0*-38 + g0*-74 + b0*112 + 128) >> 8) + 128;/*U0*/
+		yuvdata[z+1] = ((r0*66 + g0*129 + b0*25 + 128) >> 8) + 16;/*Y0*/
+		yuvdata[z+2] = ((r0*112 + g0*-94 + b0*-18 + 128) >> 8) + 128;/*V0*/
+		yuvdata[z+3] = ((r1*66 + g1*129 + b1*25 + 128) >> 8) + 16;/*Y1*/
+		w += 2;
+		z += 4;
+		x += rgbpx*2;
+	    }
+	}
+	else
+	{
+	    while(w < width)
+	    {
+		r2 = pixels[x];
+		g2 = pixels[x+1];
+		b2 = pixels[x+2];
+		r3 = pixels[x+3+alphabit];
+		g3 = pixels[x+4+alphabit];
+		b3 = pixels[x+5+alphabit];
+		yuvdata[halfyuv+z2] = ((r2*-38 + g2*-74 + b2*112 + 128) >> 8) + 128;/*U1*/
+		yuvdata[halfyuv+z2+1] = ((r2*66 + g2*129 + b2*25 + 128) >> 8) + 16;/*Y2*/
+		yuvdata[halfyuv+z2+2] = ((r2*112 + g2*-94 + b2*-18 + 128) >> 8) + 128;/*V1*/
+		yuvdata[halfyuv+z2+3] = ((r3*66 + g3*129 + b3*25 + 128) >> 8) + 16;/*Y3*/
+		w += 2;
+		z2 += 4;
+		x += rgbpx*2;
+	    }
+	}
+	x += exc;
+	h++;
+    }
+    g_object_unref (pixbuf);
+    return yuvdata;
+}
+
+static char *get_ithmb_filename (iThumbWriter *writer)
+{
+    switch (writer->db_type) {
+        case DB_TYPE_ITUNES:
+            return g_strdup_printf (":F%d_%d.ithmb", 
+	        		    writer->img_info->format_id,
+                                    writer->current_file_index);
+        case DB_TYPE_PHOTO:
+            return g_strdup_printf (":Thumbs:F%d_%d.ithmb", 
+	            		    writer->img_info->format_id,
+                                    writer->current_file_index);
+    }
+    g_return_val_if_reached (NULL);
+}
+
+static char *
+ipod_image_get_ithmb_filename (const char *mount_point, gint format_id, gint index, DbType db_type ) 
+{
+	gchar *artwork_dir = NULL, *filename, *buf;
+
+	g_return_val_if_fail (mount_point, NULL);
+	switch( db_type ) {
+	case DB_TYPE_PHOTO:
+		artwork_dir = itdb_get_photos_thumb_dir (mount_point);
+		if (!artwork_dir)
+		{
+			/* attempt to create Thumbs dir */
+			gchar *photos_dir = itdb_get_photos_dir (mount_point);
+			gchar *dir;
+			if (!photos_dir)
+			{   /* give up */
+				return NULL;
+			}
+			dir = g_build_filename (photos_dir, "Thumbs", NULL);
+			mkdir (dir, 0777);
+			g_free (dir);
+			g_free (photos_dir);
+
+			/* try again */
+			artwork_dir = itdb_get_photos_thumb_dir (mount_point);
+			if (!artwork_dir)
+			{   /* give up */
+				return NULL;
+			}
+		}
+		break;
+	case DB_TYPE_ITUNES:
+	artwork_dir = itdb_get_artwork_dir (mount_point);
+	if (!artwork_dir)
+	{
+		/* attempt to create Artwork dir */
+		gchar *control_dir = itdb_get_control_dir (mount_point);
+		gchar *dir;
+		if (!control_dir)
+		{   /* give up */
+			return NULL;
+		}
+		dir = g_build_filename (control_dir, "Artwork", NULL);
+		mkdir (dir, 0777);
+		g_free (dir);
+		g_free (control_dir);
+
+		/* try again */
+		artwork_dir = itdb_get_artwork_dir (mount_point);
+		if (!artwork_dir)
+		{   /* give up */
+			return NULL;
+		}
+	}
+	}
+
+	buf = g_strdup_printf ("F%d_%d.ithmb", format_id, index);
+
+	filename = itdb_get_path (artwork_dir, buf);
+
+	/* itdb_get_path() only returns existing paths */
+	if (!filename)
+	{
+	    filename = g_build_filename (artwork_dir, buf, NULL);
+	}
+/*	printf ("%s %s\n", buf, filename);*/
+
+	g_free (buf);
+        g_free (artwork_dir);
+	return filename;
+}
+
+/* If appropriate, rotate thumb->pixbuf by the value specified in
+ * thumb->rotation or thumb->pixbuf's EXIF orientation value. */
+static GdkPixbuf *
+ithumb_writer_handle_rotation (GdkPixbuf *pixbuf, guint *rotation)
+{
+  /* If the caller did not specify a rotation, and there is an orientation header
+     present in the pixbuf (from EXIF), use that to choose a rotation.
+     NOTE: Do this before doing any transforms on the pixbuf, or you will lose
+     the EXIF metadata.
+     List of orientation values: http://sylvana.net/jpegcrop/exif_orientation.html */
+  if (*rotation == 0) {
+    /* In GdkPixbuf 2.12 or above, this returns the EXIF orientation value. */
+    const char* exif_orientation = gdk_pixbuf_get_option(pixbuf, "orientation");
+    if (exif_orientation != NULL) {
+      switch (exif_orientation[0]) {
+	case '3':
+	  *rotation = 180;
+          break;
+	case '6':
+	  *rotation = 270;
+          break;
+	case '8':
+	  *rotation = 90;
+          break;
+	/* '1' means no rotation.  The other four values are all various
+	   transpositions, which are rare in real photos so we don't
+	   implement them. */
+      }
+    }
+  }
+
+  /* Rotate if necessary */
+  if (*rotation != 0)
+  {
+      return gdk_pixbuf_rotate_simple (pixbuf, *rotation);
+  }
+  return g_object_ref (G_OBJECT (pixbuf));
+}
+
+/* On the iPhone, thumbnails are presented as squares in a grid.
+   In order to fit the grid, they have to be cropped as well as
+   scaled. */
+static GdkPixbuf *
+ithumb_writer_scale_and_crop (GdkPixbuf *input_pixbuf,
+                              gint width, gint height,
+                              gboolean crop)
+{
+    gint input_width, input_height;
+    double width_scale, height_scale;
+    gdouble scale;
+    gint offset_x, offset_y;
+    gint border_width = 0;
+
+    GdkPixbuf *output_pixbuf;
+
+    g_object_get (G_OBJECT (input_pixbuf), 
+		  "width", &input_width,
+		  "height", &input_height,
+		  NULL);
+
+    width_scale = (double) width / input_width;
+    height_scale = (double) height / input_height;
+
+    if (!crop)
+    {
+      guint scaled_height;
+      guint scaled_width;
+
+      if (width_scale < height_scale) {
+	scaled_width = width;
+	scaled_height = MIN (ceil (input_height*width_scale), height);
+      } else if (width_scale > height_scale) {
+	scaled_width =MIN (ceil (input_width*height), width);
+	scaled_height = height;
+      } else {
+	scaled_width = width;
+	scaled_height = height;
+      }
+	
+      return gdk_pixbuf_scale_simple (input_pixbuf,
+				      scaled_width, scaled_height,
+				      GDK_INTERP_BILINEAR);
+    } else {
+      double scaled_width, scaled_height;
+      /* If we are cropping, we use the max of the two possible scale factors,
+         so that the image is large enough to fill both dimensions. */
+      scale = MAX(width_scale, height_scale);
+
+      /* In order to crop the image, we shift it either left or up by
+	 a certain amount.  Note that the offset args to gdk_pixbuf_scale are
+	 expressed in terms of the *output* pixbuf, not the input, so we scal the
+	 offsets.  Here we figure out whether this is a vertical or horizontal
+	 offset. */
+      scaled_width = input_width * scale;
+      scaled_height = input_height * scale;
+      offset_x = round((width - scaled_width) / 2);
+      offset_y = round((height - scaled_height) / 2);
+
+      g_assert(round(scaled_width) == width ||
+	       round(scaled_height) == height);
+
+      output_pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, FALSE, 8,
+				     width + border_width,
+				     height + border_width);
+      gdk_pixbuf_fill(output_pixbuf, 0xffffffff);
+
+      gdk_pixbuf_scale (input_pixbuf,
+                        output_pixbuf,
+                        0, 0,			 /* dest x, dest y */
+                        width,                     /* dest width */
+                        height,                    /* dest height */
+                        offset_x, offset_y,        /* offset x, offset y */
+                        scale, scale,	         /* scale x, scale y */
+                        GDK_INTERP_BILINEAR);
+
+      return output_pixbuf;
+    }
+}
+
+static GdkPixbuf *
+ithumb_writer_handle_pixbuf_transform (iThumbWriter *writer, 
+                                       GdkPixbuf *pixbuf, guint rotation)
+{
+    GdkPixbuf *rotated_pixbuf;
+    GdkPixbuf *scaled_pixbuf;
+
+    rotated_pixbuf = ithumb_writer_handle_rotation (pixbuf, &rotation);
+
+    scaled_pixbuf = ithumb_writer_scale_and_crop (rotated_pixbuf,
+						  writer->img_info->width,
+						  writer->img_info->height,
+                                                  writer->img_info->crop);
+    g_object_unref (rotated_pixbuf);
+    rotated_pixbuf = NULL;
+
+    return scaled_pixbuf;
+}
+
+static void *pack_thumbnail (iThumbWriter *writer, Itdb_Thumb_Ipod_Item *thumb,
+                             GdkPixbuf *pixbuf)
+{
+    typedef void *(*PackerFunc)(GdkPixbuf *pixbuf,
+                                const Itdb_ArtworkFormat *img_info,
+                                gint horizontal_padding, gint vertical_padding,
+                                guint32 *thumb_size);
+    struct Packer {
+        ItdbThumbFormat format;
+        PackerFunc packer;
+    };
+    guint i;
+    const struct Packer packers[] = {
+        { THUMB_FORMAT_RGB565_LE_90,     (PackerFunc)pack_RGB_565 },
+        { THUMB_FORMAT_RGB565_BE_90,     (PackerFunc)pack_RGB_565 },
+        { THUMB_FORMAT_RGB565_LE,        (PackerFunc)pack_RGB_565 },
+        { THUMB_FORMAT_RGB565_BE,        (PackerFunc)pack_RGB_565 },
+        { THUMB_FORMAT_RGB555_LE_90,     (PackerFunc)pack_RGB_555 },
+        { THUMB_FORMAT_RGB555_BE_90,     (PackerFunc)pack_RGB_555 },
+        { THUMB_FORMAT_RGB555_LE,        (PackerFunc)pack_RGB_555 },
+        { THUMB_FORMAT_RGB555_BE,        (PackerFunc)pack_RGB_555 },
+        { THUMB_FORMAT_RGB888_LE_90,     (PackerFunc)pack_RGB_888 },
+        { THUMB_FORMAT_RGB888_BE_90,     (PackerFunc)pack_RGB_888 },
+        { THUMB_FORMAT_RGB888_LE,        (PackerFunc)pack_RGB_888 },
+        { THUMB_FORMAT_RGB888_BE,        (PackerFunc)pack_RGB_888 },
+        { THUMB_FORMAT_REC_RGB555_LE_90, (PackerFunc)pack_rec_RGB_555 },
+        { THUMB_FORMAT_REC_RGB555_BE_90, (PackerFunc)pack_rec_RGB_555 },
+        { THUMB_FORMAT_REC_RGB555_LE,    (PackerFunc)pack_rec_RGB_555 },
+        { THUMB_FORMAT_REC_RGB555_BE,    (PackerFunc)pack_rec_RGB_555 },
+        { THUMB_FORMAT_EXPERIMENTAL_LE,  NULL },
+        { THUMB_FORMAT_EXPERIMENTAL_BE,  NULL },
+        { THUMB_FORMAT_UYVY_BE,          (PackerFunc)pack_UYVY },
+        { THUMB_FORMAT_UYVY_LE,          (PackerFunc)pack_UYVY },
+        { THUMB_FORMAT_I420_BE,          (PackerFunc)pack_I420 },
+        { THUMB_FORMAT_I420_LE,          (PackerFunc)pack_I420 }
+    };
+
+    for (i = 0; i < G_N_ELEMENTS (packers); i++) {
+        if (packers[i].format == writer->img_info->format) {
+            break;
+        }
+    }
+
+    if ((i == G_N_ELEMENTS (packers)) || (packers[i].packer == NULL)) {
+        return NULL;
+    }
+    return packers[i].packer (pixbuf, writer->img_info,
+                              thumb->horizontal_padding,
+                              thumb->vertical_padding,
+                              &thumb->size);
+}
+
+static gboolean write_pixels (iThumbWriter *writer, Itdb_Thumb_Ipod_Item *thumb,
+                              void *pixels)
+{
+    if (pixels == NULL)
+    {
+	return FALSE;
+    }
+
+    if (fwrite (pixels, thumb->size, 1, writer->f) != 1) {
+	g_print ("Error writing to file: %s\n", strerror (errno));
+	return FALSE;
+    }
+    writer->cur_offset += thumb->size;
+
+    if (writer->img_info->padding != 0)
+    {
+	gint padding = writer->img_info->padding - thumb->size;
+	g_return_val_if_fail (padding >= 0, TRUE);
+	if (padding != 0)
+	{
+            /* FIXME: check if a simple fseek() will do the same */
+	    gchar *pad_bytes = g_malloc0 (padding);
+	    if (fwrite (pad_bytes, padding, 1, writer->f) != 1) {
+		g_free (pad_bytes);
+		g_print ("Error writing to file: %s\n", strerror (errno));
+		return FALSE;
+	    }
+	    g_free (pad_bytes);
+	    writer->cur_offset += padding;
+	}
+    }
+    return TRUE;
+}
+
+static void set_thumb_padding (iThumbWriter *writer, 
+                               Itdb_Thumb_Ipod_Item *thumb, 
+                               gint width, gint height)
+{
+    switch (writer->db_type)
+    {
+    case DB_TYPE_PHOTO:
+	thumb->horizontal_padding = (writer->img_info->width - width)/2;
+	thumb->vertical_padding = (writer->img_info->height - height)/2;
+	break;
+    case DB_TYPE_ITUNES:
+	thumb->horizontal_padding = 0;
+	thumb->vertical_padding = 0;
+	break;
+    default:
+	g_return_if_reached ();
+    }
+}
+
+static GdkPixbuf *pixbuf_from_image_data (guchar *image_data, gsize len)
+{
+    GdkPixbuf *pixbuf;
+    GdkPixbufLoader *loader = gdk_pixbuf_loader_new ();
+    g_return_val_if_fail (loader, FALSE);
+    gdk_pixbuf_loader_write (loader, image_data, len, NULL);
+    gdk_pixbuf_loader_close (loader, NULL);
+    pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
+    if (pixbuf)
+        g_object_ref (pixbuf);
+    g_object_unref (loader);
+
+    return pixbuf;
+}
+
+static Itdb_Thumb_Ipod_Item *
+ithumb_writer_write_thumbnail (iThumbWriter *writer, 
+			       Itdb_Thumb *thumb)
+{
+    GdkPixbuf *pixbuf = NULL;
+    void *pixels = NULL;
+    gint width, height; /* must be gint -- see comment below */
+    Itdb_Thumb_Ipod_Item *thumb_ipod;
+    GdkPixbuf *scaled_pixbuf;
+    gboolean result;
+
+    g_return_val_if_fail (writer, NULL);
+    g_return_val_if_fail (writer->img_info, NULL);
+    g_return_val_if_fail (thumb, NULL);
+
+    /* An thumb can start with one of:
+        1. a filename
+        2. raw image data read from a file
+        3. a GdkPixbuf struct
+       In case 1 and 2, we load the relevant data into a GdkPixbuf and proceed
+       with case 3.
+    */
+    if (thumb->data_type == ITDB_THUMB_TYPE_FILE)
+    {   
+        Itdb_Thumb_File *thumb_file = (Itdb_Thumb_File *)thumb;
+	pixbuf = gdk_pixbuf_new_from_file (thumb_file->filename, NULL);
+    } 
+    else if (thumb->data_type == ITDB_THUMB_TYPE_MEMORY)
+    {  
+        Itdb_Thumb_Memory *thumb_mem = (Itdb_Thumb_Memory *)thumb;
+        pixbuf = pixbuf_from_image_data (thumb_mem->image_data, 
+                                         thumb_mem->image_data_len);
+    }
+    else if (thumb->data_type == ITDB_THUMB_TYPE_PIXBUF)
+    {
+        Itdb_Thumb_Pixbuf *thumb_pixbuf = (Itdb_Thumb_Pixbuf *)thumb;
+        pixbuf = g_object_ref (G_OBJECT (thumb_pixbuf->pixbuf));
+    }
+
+    if (pixbuf == NULL)
+    {
+	/* This is quite bad... if we just return FALSE the ArtworkDB
+	   gets messed up. */
+	pixbuf = gdk_pixbuf_from_pixdata (&questionmark_pixdata, FALSE, NULL);
+
+	if (!pixbuf)
+	{
+	    /* Somethin went wrong. let's insert a red thumbnail */
+	    pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8,
+				     writer->img_info->width,
+				     writer->img_info->height);
+	    gdk_pixbuf_fill (pixbuf, 0xff000000);
+	}
+	/* avoid rotation */
+        itdb_thumb_set_rotation (thumb, 0);
+    }
+
+    g_assert(pixbuf);
+
+    scaled_pixbuf = ithumb_writer_handle_pixbuf_transform (writer, pixbuf, itdb_thumb_get_rotation (thumb));
+    g_object_unref (pixbuf);
+    pixbuf = NULL;
+
+    /* !! cannot write directly to &thumb->width/height because
+       g_object_get() returns a gint, but thumb->width/height are
+       gint16 !! */
+    g_object_get (G_OBJECT (scaled_pixbuf), 
+		  "width", &width,
+		  "height", &height,
+		  NULL);
+
+    thumb_ipod = itdb_thumb_new_item_from_ipod (writer->img_info);
+    g_assert (thumb_ipod != NULL);
+
+    set_thumb_padding (writer, thumb_ipod, width, height);
+
+    /* The thumbnail width/height is inclusive padding */
+    thumb_ipod->width = thumb_ipod->horizontal_padding + width;
+    thumb_ipod->height = thumb_ipod->vertical_padding + height;
+    thumb_ipod->offset = writer->cur_offset;
+
+    pixels = pack_thumbnail (writer, thumb_ipod, scaled_pixbuf);
+    g_object_unref (G_OBJECT (scaled_pixbuf));
+
+    thumb_ipod->filename = get_ithmb_filename (writer);
+    result = write_pixels (writer, thumb_ipod, pixels);
+    g_free (pixels);
+
+    if (result == FALSE) {
+        itdb_thumb_free ((Itdb_Thumb*)thumb_ipod);
+        return NULL;
+    }
+
+    return thumb_ipod;
+}
+
+static gboolean
+ithumb_writer_update (iThumbWriter *writer)
+{
+    while ((writer->f == NULL) || (writer->cur_offset >= ITHUMB_MAX_SIZE))
+    {
+	if (writer->f)
+	{
+	    fclose (writer->f);
+	    writer->f = NULL;
+	}
+	g_free (writer->filename);
+	writer->filename = NULL;
+
+	/* increment index for filename */
+	++writer->current_file_index;
+
+	writer->filename =
+	    ipod_image_get_ithmb_filename (writer->mountpoint, 
+					   writer->img_info->format_id,
+					   writer->current_file_index, 
+					   writer->db_type);
+	if (writer->filename == NULL)
+	{
+	    return FALSE;
+	}
+	writer->f = fopen (writer->filename, "ab");
+	if (writer->f == NULL)
+	{
+	    g_print ("Error opening %s: %s\n", writer->filename, strerror (errno));
+	    g_free (writer->filename);
+	    writer->filename = NULL;
+	    return FALSE;
+	}
+	writer->cur_offset = ftell (writer->f);
+    }
+
+    return TRUE;
+}
+
+
+
+static void
+write_thumbnail (iThumbWriter *writer, 
+                 Itdb_Artwork *artwork, 
+                 Itdb_Thumb_Ipod *thumb_ipod)
+{
+        g_assert (artwork->thumbnail->data_type != ITDB_THUMB_TYPE_IPOD);
+
+	if (artwork->thumbnail)
+	{
+	    /* check if new thumbnail file has to be started */
+	    if (ithumb_writer_update (writer)) {
+                Itdb_Thumb_Ipod_Item *item;
+                item = ithumb_writer_write_thumbnail (writer, 
+                                                      artwork->thumbnail);
+                if (item != NULL) {
+                    itdb_thumb_ipod_add (thumb_ipod, item);
+                }
+
+            }
+	}
+}
+
+
+static void
+ithumb_writer_free (iThumbWriter *writer)
+{
+	g_return_if_fail (writer != NULL);
+	if (writer->f)
+	{
+	    fclose (writer->f);
+	    if (writer->filename && (writer->cur_offset == 0))
+	    {   /* Remove empty file */
+		unlink (writer->filename);
+	    }
+	}
+	g_free (writer->filename);
+	g_free (writer->mountpoint);
+	g_free (writer);
+}
+
+
+static iThumbWriter *
+ithumb_writer_new (const char *mount_point,
+		   const Itdb_ArtworkFormat *info,
+		   DbType db_type,
+		   guint byte_order)
+{
+	iThumbWriter *writer;
+
+	writer = g_new0 (iThumbWriter, 1);
+
+	writer->img_info = info;
+
+	writer->byte_order = byte_order;
+	writer->db_type = db_type;
+	writer->mountpoint = g_strdup (mount_point);
+	writer->current_file_index = 0;
+
+	if (!ithumb_writer_update (writer))
+	{
+	    ithumb_writer_free (writer);
+	    return NULL;
+	}
+
+	return writer;
+}
+
+static gint offset_sort (gconstpointer a, gconstpointer b);
+static gint offset_sort (gconstpointer a, gconstpointer b)
+{
+    return (-(((Itdb_Thumb_Ipod_Item *)a)->offset - ((Itdb_Thumb_Ipod_Item *)b)->offset));
+}
+
+static gboolean ithumb_rearrange_thumbnail_file (gpointer _key,
+						 gpointer _thumbs,
+						 gpointer _user_data)
+{
+    const gchar *filename = _key;
+    GList *thumbs = _thumbs;
+    gboolean *result = _user_data;
+    gint fd = -1;
+    guint32 size = 0;
+    GList *gl;
+    struct stat statbuf;
+    guint32 offset;
+    void *buf = NULL;
+
+/*     printf ("%s: %d\n", filename, g_list_length (thumbs)); */
+
+    /* check if an error occured */
+    if (*result == FALSE)
+	goto out;
+
+    if (thumbs == NULL)
+    {   /* no thumbnails for this file --> remove altogether */
+	if (unlink (filename) == -1)
+	{
+	    *result = FALSE;
+	    goto out;
+	}
+    }
+
+    /* check if all thumbnails have the same size */
+    for (gl=thumbs; gl; gl=gl->next)
+    {
+	Itdb_Thumb_Ipod_Item *img = gl->data;
+
+	if (size == 0)
+	    size = img->size;
+	if (size != img->size)
+	{
+	    *result = FALSE;
+	    goto out;
+	}
+    }
+    if (size == 0)
+    {
+	*result = FALSE;
+	goto out;
+    }
+
+    /* OK, all thumbs are the same size @size, let's see how many
+     * thumbnails are in the actual file */
+    if (g_stat  (filename, &statbuf) != 0)
+    {
+	*result = FALSE;
+	goto out;
+    }
+
+    /* check if the file size is a multiple of @size */
+    if (((guint32)(statbuf.st_size / size))*size != statbuf.st_size)
+    {
+	*result = FALSE;
+	goto out;
+    }
+
+    fd = open (filename, O_RDWR, 0);
+    if (fd == -1)
+    {
+	*result = FALSE;
+	goto out;
+    }
+
+    /* size is either a value coming from a hardcoded const array from 
+     * libipoddevice, or a guint32 read from an iPod file, so no overflow
+     * can occur here
+     */
+    buf = g_malloc (size);
+
+    /* Sort the list of thumbs in reverse order of img->offset */
+    thumbs = g_list_sort (thumbs, offset_sort);
+
+    gl = g_list_last (thumbs);
+
+    /* check each thumbnail slot */
+    for (offset=0; gl && (offset<statbuf.st_size); offset+=size)
+    {
+	Itdb_Thumb_Ipod_Item *thumb = gl->data;
+	g_return_val_if_fail (thumb, FALSE);
+
+	/* Try to find a thumbnail that uses this slot */
+	while ((gl != NULL) && (thumb->offset < offset))
+	{
+	    gl = gl->prev;
+	    if (gl)
+		thumb = gl->data;
+	    g_return_val_if_fail (thumb, FALSE);
+	}
+
+	if (!gl)
+	    break;  /* offset now indicates new length of file */
+
+	if (thumb->offset > offset)
+	{
+	    /* did not find a thumbnail with matching offset -> copy
+	       data from last slot (== first element) */
+	    GList *first_gl = g_list_first (thumbs);
+	    Itdb_Thumb_Ipod_Item *first_thumb = first_gl->data;
+	    guint32 first_offset;
+
+	    g_return_val_if_fail (first_thumb, FALSE);
+	    first_offset = first_thumb->offset;
+
+	    /* actually copy the data */
+	    if (lseek (fd, first_offset, SEEK_SET) != first_offset)
+	    {
+		*result = FALSE;
+		goto out;
+	    }
+	    if (read (fd, buf, size) != size)
+	    {
+		*result = FALSE;
+		goto out;
+	    }
+	    if (lseek (fd, offset, SEEK_SET) != offset)
+	    {
+		*result = FALSE;
+		goto out;
+	    }
+	    if (write (fd, buf, size) != size)
+	    {
+		*result = FALSE;
+		goto out;
+	    }
+
+	    /* Adjust offset of all thumbnails whose offset is
+	       first_offset. Since the list is sorted, they are all at
+	       the beginning of the list. */
+	    while (first_thumb->offset == first_offset)
+	    {
+		first_thumb->offset = offset;
+		/* There's a possibility that gl is the first
+		   element. In that case don't attempt to move it (it
+		   wouldn't work as intended because we access
+		   gl->next after removing it from the list) */
+		if (gl != first_gl)
+		{
+		    thumbs = g_list_delete_link (thumbs, first_gl);
+		    /* Insert /behind/ gl */
+		    thumbs = g_list_insert_before (thumbs,
+						   gl->next, first_thumb);
+		    first_gl = g_list_first (thumbs);
+		    first_thumb = first_gl->data;
+		    g_return_val_if_fail (first_thumb, FALSE);
+		}
+	    }
+	}
+    }
+    /* offset corresponds to the new length of the file */
+    if (offset > 0)
+    {   /* Truncate */
+	if (ftruncate (fd, offset) == -1)
+	{
+	    *result = FALSE;
+	    goto out;
+	}
+    }
+    else
+    {   /* Remove file altogether */
+	close (fd);
+	fd = -1;
+	if (unlink (filename) == -1)
+	{
+	    *result = FALSE;
+	    goto out;
+	}
+    }
+
+  out:
+    if (fd != -1) close (fd);
+    g_free (buf);
+    g_list_free (thumbs);
+    return TRUE;
+}
+
+
+/* The actual image data of thumbnails is not read into memory. As a
+   consequence, writing the thumbnail file is not as straight-forward
+   as e.g. writing the iTunesDB where all data is held in memory.
+
+   To avoid the need to read large amounts from the iPod and back, or
+   have to large files exist on the iPod (reading from the original
+   thumbnail file and writing to the new thumbnail file), the
+   modifications are done in place.
+
+   It is assumed that all thumbnails have the same data size. If not,
+   FALSE is returned.
+
+   If a thumbnail has been removed, a slot in the file is opened. This
+   slot is filled by copying data from the end of the file and
+   adjusting the corresponding Itdb_Thumb offset pointer. When all
+   slots are filled, the file is truncated to the new length.
+*/
+static gboolean
+ithmb_rearrange_existing_thumbnails (Itdb_DB *db,
+				     const Itdb_ArtworkFormat *info)
+{
+    GList *gl;
+    GHashTable *filenamehash;
+    gboolean result = TRUE;
+    GList *thumbs;
+    gint i;
+    gchar *filename;
+    const gchar *mountpoint;
+
+    g_return_val_if_fail (db, FALSE);
+    g_return_val_if_fail (info, FALSE);
+    g_return_val_if_fail (db_get_device(db), FALSE);
+
+    mountpoint = db_get_mountpoint (db);
+
+    g_return_val_if_fail (mountpoint, FALSE);
+
+    filenamehash = g_hash_table_new_full (g_str_hash, g_str_equal, 
+					  g_free, NULL);
+
+    /* Create a hash with all filenames used for thumbnails.
+       This will usually be a number of "F%d_%d.ithmb" files. A
+       GList is kept with pointers to all images in a given file which
+       allows to adjust the offset pointers */
+	switch (db->db_type) {
+	case DB_TYPE_ITUNES:
+		for (gl=db_get_itunesdb(db)->tracks; gl; gl=gl->next)
+		{
+		        Itdb_Thumb *thumb;
+                        Itdb_Track *track = gl->data;
+
+			g_return_val_if_fail (track, FALSE);
+			g_return_val_if_fail (track->artwork, FALSE);
+			thumb = track->artwork->thumbnail;
+                        if (!itdb_track_has_thumbnails (track)) {
+			    /* skip: track has no thumbnails */
+                            continue;
+                        }
+			if (track->artwork->dbid == 0) {
+			    /* skip: sparse artwork, has already been
+			       written */
+			    continue;
+			}
+                        if (thumb->data_type == ITDB_THUMB_TYPE_IPOD) {
+                            Itdb_Thumb_Ipod_Item *item;
+                            item = itdb_thumb_ipod_get_item_by_type (thumb,
+                                                                     info);
+                            if (item) {
+				filename = itdb_thumb_ipod_get_filename (
+				        db_get_device(db),
+				        item);
+				if (filename)
+				{
+					thumbs = g_hash_table_lookup (filenamehash, filename);
+					thumbs = g_list_append (thumbs, item);
+					g_hash_table_insert (filenamehash, filename, thumbs);
+				}
+                            }
+                        }
+                }
+		break;
+    case DB_TYPE_PHOTO:
+	for (gl=db_get_photodb(db)->photos; gl; gl=gl->next)
+	{
+		Itdb_Artwork *artwork = gl->data;
+		Itdb_Thumb *thumb = artwork->thumbnail;
+                if (thumb == NULL) {
+                    continue;
+                }
+                if (thumb->data_type == ITDB_THUMB_TYPE_IPOD) {
+                    Itdb_Thumb_Ipod_Item *item;
+                    item = itdb_thumb_ipod_get_item_by_type (thumb, info);
+                    if (item) 
+                    {
+			filename = itdb_thumb_ipod_get_filename (
+			        db_get_device (db), item);
+			if (filename)
+			{
+				thumbs = g_hash_table_lookup (filenamehash, filename);
+				thumbs = g_list_append (thumbs, item);
+				g_hash_table_insert (filenamehash, filename, thumbs);
+			}
+                    } 
+                }
+	}
+	break;
+    default:
+	g_return_val_if_reached (FALSE);
+    }
+
+    /* Check for files present on the iPod but no longer referenced by
+       thumbs */
+
+    for (i=0; i<50; ++i)
+    {
+	filename = ipod_image_get_ithmb_filename (mountpoint,
+						  info->format_id,
+						  i,
+						  db->db_type);
+	if (g_file_test (filename, G_FILE_TEST_EXISTS))
+	{
+	    if (g_hash_table_lookup (filenamehash, filename) == NULL)
+	    {
+		g_hash_table_insert (filenamehash,
+				     g_strdup (filename), NULL);
+	    }
+	}
+	g_free (filename);
+    }
+
+    /* I'm using the _foreach_remove variant here because the
+       thumbnail GList may get changed while calling
+       ithumb_rearrange_thumbnail_file but cannot be written back into
+       the hash table. Using the _foreach_remove variant here will
+       ensure that it will not be possible to access the invalid
+       thumbnail GList. The only proper operation after the
+       _foreach_remove is a call to g_hash_table_destroy().
+       For the same reasons the thumb GList gets free'd in
+       ithumb_rearrange_thumbnail_file() */
+    g_hash_table_foreach_remove (filenamehash,
+				 ithumb_rearrange_thumbnail_file, &result);
+    g_hash_table_destroy (filenamehash);
+
+    return result;
+}
+
+#endif
+
+G_GNUC_INTERNAL int
+itdb_write_ithumb_files (Itdb_DB *db) 
+{
+#ifdef HAVE_GDKPIXBUF
+	GList *writers;
+	Itdb_Device *device;
+        GList *formats;
+        GList *it;
+	const gchar *mount_point;
+
+	g_return_val_if_fail (db, -1);
+	device = db_get_device(db);
+	g_return_val_if_fail (device, -1);
+
+	mount_point = db_get_mountpoint (db);
+	/* FIXME: support writing to directory rather than writing to
+	   iPod */
+	if (mount_point == NULL)
+	    return -1;
+	
+        formats = NULL;
+        switch (db->db_type) {
+        case DB_TYPE_ITUNES:
+            formats = itdb_device_get_cover_art_formats(db_get_device(db));
+            break;
+	case DB_TYPE_PHOTO:
+            formats = itdb_device_get_photo_formats(db_get_device(db));
+            break;
+        }
+	writers = NULL;
+	for (it = formats; it != NULL; it = it->next) {
+		iThumbWriter *writer;
+                const Itdb_ArtworkFormat *format;
+
+                format = (const Itdb_ArtworkFormat *)it->data;
+                ithmb_rearrange_existing_thumbnails (db, format);
+                writer = ithumb_writer_new (mount_point, format,
+                                            db->db_type, device->byte_order);
+                if (writer != NULL) {
+                        writers = g_list_prepend (writers, writer);
+		}
+	}
+	g_list_free (formats);
+	if (writers == NULL) {
+		return -1;
+	}
+	switch (db->db_type) {
+	case DB_TYPE_ITUNES:
+		for (it = db_get_itunesdb(db)->tracks; it != NULL; it = it->next) {
+			Itdb_Track *track;
+                        Itdb_Thumb_Ipod *thumb_ipod;
+                        ItdbThumbDataType type;
+
+			track = it->data;
+			g_return_val_if_fail (track, -1);
+                        if (!itdb_track_has_thumbnails (track)) {
+                            continue;
+                        }
+			if (track->artwork->dbid == 0) {
+			    /* Use sparse artwork -- already written
+			       elsewhere */
+			    continue;
+			}
+                        type = track->artwork->thumbnail->data_type;
+                        if (type != ITDB_THUMB_TYPE_IPOD) {
+                            GList *itw;
+                            thumb_ipod = (Itdb_Thumb_Ipod *)itdb_thumb_ipod_new ();
+                            for (itw = writers; itw != NULL; itw = itw->next) {
+                                write_thumbnail (itw->data,
+                                                 track->artwork,
+                                                 thumb_ipod);
+                            }
+                            itdb_thumb_free (track->artwork->thumbnail);
+                            track->artwork->thumbnail = (Itdb_Thumb *)thumb_ipod;
+                        }
+		}
+		break;
+	case DB_TYPE_PHOTO:
+		for (it = db_get_photodb(db)->photos; it != NULL; it = it->next) {
+			Itdb_Artwork *photo;
+                        Itdb_Thumb_Ipod *thumb_ipod;
+                        ItdbThumbDataType type;
+
+			photo = it->data;
+			g_return_val_if_fail (photo, -1);
+                        if (photo->thumbnail == NULL) {
+                            continue;
+                        }
+                        type = photo->thumbnail->data_type;
+                        if (type != ITDB_THUMB_TYPE_IPOD) {
+			    GList *itw;
+                            thumb_ipod = (Itdb_Thumb_Ipod *)itdb_thumb_ipod_new ();
+                            for (itw = writers; itw != NULL; itw = itw->next) {
+                                write_thumbnail (itw->data, photo, thumb_ipod);
+                            }
+                            itdb_thumb_free (photo->thumbnail);
+                            photo->thumbnail = (Itdb_Thumb *)thumb_ipod;
+                        }
+		}
+		break;
+	default:
+	        g_return_val_if_reached (-1);
+	}
+	
+	g_list_foreach (writers, (GFunc)ithumb_writer_free, NULL);
+	g_list_free (writers);
+
+	return 0;
+#else
+    return -1;
+#endif
+}

Added: libgpod/trunk/libgpod/branches/upstream/current/src/pixmaps.c
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/pixmaps.c	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/pixmaps.c	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,4098 @@
+/* Time-stamp: <2007-01-09 22:04:32 jcs>
+|
+|  Copyright (C) 2002-2006 Jorg Schuler <jcsjcs at users sourceforge net>
+|  Part of the gtkpod project.
+| 
+|  URL: http://www.gtkpod.org/
+|  URL: http://gtkpod.sourceforge.net/
+|
+|  Most of the code in this file has been ported from the perl
+|  script "mktunes.pl" (part of the gnupod-tools collection) written
+|  by Adrian Ulrich <pab at blinkenlights.ch>.
+|
+|  gnupod-tools: http://www.blinkenlights.ch/cgi-bin/fm.pl?get=ipod
+|
+|  The code contained in this file is free software; you can redistribute
+|  it and/or modify it under the terms of the GNU Lesser General Public
+|  License as published by the Free Software Foundation; either version
+|  2.1 of the License, or (at your option) any later version.
+|
+|  This file 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
+|  Lesser General Public License for more details.
+|
+|  You should have received a copy of the GNU Lesser General Public
+|  License along with this code; if not, write to the Free Software
+|  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+|
+|  iTunes and iPod are trademarks of Apple
+|
+|  This product is not supported/written/published by Apple!
+|
+|  $Id: pixmaps.c 1352 2007-01-09 13:31:14Z jcsjcs $
+*/
+
+#include "pixmaps.h"
+
+#ifdef HAVE_GDKPIXBUF
+
+
+/* Thanks to P.G. Richardson for the image */
+
+/* GdkPixbuf RGB C-Source image dump 1-byte-run-length-encoded */
+G_GNUC_INTERNAL const GdkPixdata questionmark_pixdata = {
+  0x47646b50, /* Pixbuf magic: 'GdkP' */
+  24 + 153345, /* header length + pixel_data length */
+  0x2010001, /* pixdata_type */
+  720, /* rowstride */
+  240, /* width */
+  241, /* height */
+  /* pixel_data: */
+  (guchar *)"\33JFGQMNRNOIEFFBCOKLYUV\\XYb^__[\\[WXXTUWSTZVW]YZ`\\]^Z[ZVWOKLTPQNJ"
+  "KLHIXTUFBCC\77 at B>\77a]^\202[WX\7YUVnjkZVWxtugcdXTUSOP\203TPQ\1UQR\220"
+  "SOP\3QMNRNOSOP\202TPQ\23SOPRNOQMNNIMVQUKFJYTXWRVQLPa\\`GBFVQUPKOOKLU"
+  "QRVRSPLMNJKRNO\204SON\204RNO\202SOP\206SNR\211SOP\3VRSWSTTPQ\202OKL\6"
+  "SOPVTWMLRBBJHHP\24\24\34\202\40!&5\20\17\25XW]JINLKPMKNVTW[Y\\LJMGCD"
+  "WSTUQRIEFJFG[WXeabd`ahderno_[\\YUVXTU]YZ`\\]\\XYXTUWSTJFGQMNRNOIEFFB"
+  "COKLYUV\\XYb^__[\\[WXXTUWSTZVW]YZ`\\]^Z[ZVWOKLTPQNJKLHIXTUFBCC\77 at B>"
+  "\77a]^\202[WX\7YUVnjkZVWxtugcdXTUSOP\203TPQ\1UQR\220SOP\3QMNRNOSOP\202"
+  "TPQ\33SOPRNOQMNMIJUQRJFGYUVVRSPLM`\\]FBCTPQQMNRNOVRSUQRHDE401!!#'+.$"
+  ",/\36&)\33#&.25GKNRSULMO\202QOP\202SOP\202TNN\202VMN\1LHI\202RNO\5LH"
+  "IKGHQMNVRSUQR\202XTU\1WST\202VRS\203UQR\24c_`b^_RNOOKLIEFNJK[WXD at AEA"
+  "BPLMhdeVRSZVWXTUd`aPLMuqrfbcWSTSOP\203TPQ\1UQR\220SOP\2TPQSOP\204RNO"
+  "\22SOPTPQ]X\\^Y]MHLSNROJNKFJ^Y]OJNUPTPKOPLMUQRVRSQMNOKLSOP\203SON\1R"
+  "NM\204RNO\202SOP\206SNR\210SOP!OKLPLMRNOUQRWSTXTUWSTTRUZY_99Aaai\33\33"
+  "#\23\24\31\15\16\23fekMLQQPUKJOA\77BGEHYWZWUXOKLSOPMIJHDEPLMc_`njkjf"
+  "ggcdjfg_[\\\202ZVW\6`\\]b^_^Z[[WXZVWLHI\202RNO\5LHIKGHQMNVRSUQR\202X"
+  "TU\1WST\202VRS\203UQR\24c_`b^_RNOOKLIEFNJK[WXD at AEABPLMhdeVRSZVWXTUd`"
+  "aPLMuqrfbcWSTSOP\203TPQ\1UQR\220SOP\2TPQSOP\204RNO\32SOPTPQ]YZ^Z[LHI"
+  "SOPOKLKGH^Z[OKLYUVPLMKGHQMNYUVTPQA=>-+.\32\36!\33#&\37$(%*.7;>KORTUW"
+  "PPR\202QOP\202SOP\202TNN\202VMN\14IEFGCDB>\77>:;B>\77JFGOKLMIJOKLQMN"
+  "VRSYUV\202[WX\27YUVXTUVRSa]^]YZ[WXKGHGCDUQRC\77@\3\0\0D at A\200|}|xy\214"
+  "\210\211\205\201\202\204\200\201rnoplmc_`VRSSOPTPQ\202SOP\1UQR\220SO"
+  "P\3UQRTPQRNO\202QMN\14RNOTPQUQRKFJSNRMHLXSWWSTOKLUQRKGHTPQ\202QMN\202"
+  "TPQ\202QMN\1UQR\202SON\202RNM\204RNO\202SOP\206SNR\211SOP\20QMNPLMRN"
+  "OUQRRNOIEF\77=@!\40%9:\77\13\14\21\22\23\30\26\25\33~}\203lkpWV[86;\202"
+  "ECF\3DBEPNORPQ\202LHI\11D at AEABNJK_[\\ieffbc_[\\ZVWXTU\202TPQ\21YUV[W"
+  "XWSTTPQUQRIEFGCDB>\77>:;B>\77JFGOKLMIJOKLQMNVRSYUV\202[WX\27YUVXTUVR"
+  "Sa]^]YZ[WXKGHGCDUQRC\77@\3\0\0D at A\200|}|xy\214\210\211\205\201\202\204"
+  "\200\201rnoplmc_`VRSSOPTPQ\202SOP\1UQR\220SOP\3UQRTPQRNO\202QMN\6RNO"
+  "TPQUQRLHISOPNJK\202XTU\4OKLUQRKGHSOP\202QMN\15RNOTPQSOPNJKGEHNOSKPTK"
+  "NSLOTPTWUVZTTVOOQ\202QOP\202SOP\202TNN\202VMN\2FBC>:;\202512\15\77;<"
+  "MIJVRSWSTXTUYUV[WX\\XY[WXYUVVRSTPQPLM\202NJK\4a]^XTUC\77 at B>\77\202/+"
+  ",\12uqr\226\222\223iefa]^TPQ\\XY^Z[jfg_[\\UQR\202TPQ\202SOP\1UQR\230"
+  "SOP\10]X\\^Y]PKOIDHMIJOKLVRS[WX\203RNO\5SOPRNOQMNSOPVRS\204SON\202SO"
+  "P\204TPQ\206TOS\203UQR\205TPQ\2VRSTPQ\203RNO\36NJKGCD\77=@;:\77OPU\16"
+  "\17\24\26\27\34>=CDCHJIN(',*(+GEHHFI201)'(-+,956GCDKGHMIJTPQc_`qmnuq"
+  "rnjkfbcYUVTPQSOP\202UQR\5PLMOKLRNOFBC>:;\202512\15\77;<MIJVRSWSTXTUY"
+  "UV[WX\\XY[WXYUVVRSTPQPLM\202NJK\4a]^XTUC\77 at B>\77\202/+,\12uqr\226\222"
+  "\223iefa]^TPQ\\XY^Z[jfg_[\\UQR\202TPQ\202SOP\1UQR\230SOP\30^Z[_[\\PL"
+  "MJFGNJKOKLVRS\\XYNJKSOPVRSSOPQMNRNOVRSWUXUTYQRWNOTNOSMNRLKPKKMMKN\202"
+  "QOP\202SOP\202TNN\202VMN\1IEF\202D at A\37MIJZVWeabjfglhijfgfbc`\\]YUVR"
+  "NOLHIIEFGCDNJK401)%&FBC\77;<\37\33\34\40\34\35\34\30\31""956hdeuqrIE"
+  "FUQR]YZrnoxtuc_`ZVW\203TPQ\3RNOSOPVRS\220SOP\3PLMRNOTPQ\202UQR\11TPQ"
+  "RNOPLM^Z[iefb^_QMNZVW]YZ\202MIJ\10PLMSOPTPQRNOPLMRNOUQRWST\202UOO\202"
+  "VPP\203VPR\203WQS\206WQU\203XRT\205WQS\2SMOVPR\202XRT\36VPRWQS[UW^Y]"
+  "usx\17\16\24;:\77zy~POTGFKRPU;9<HFIRPS=;<\35\33\34\37\33\34""3/.D@\77"
+  "QMLPLMUQRb^_uqr\206\202\203\212\206\207\177{|sopfbca]^\202^Z[\5ZVWUQ"
+  "RVRSZVWIEF\202D at A\37MIJZVWeabjfglhijfgfbc`\\]YUVRNOLHIIEFGCDNJK401)%"
+  "&FBC\77;<\37\33\34\40\34\35\34\30\31""956hdeuqrIEFUQR]YZrnoxtuc_`ZVW"
+  "\203TPQ\3RNOSOPVRS\220SOP\3PLMRNOTPQ\202UQR\11TPQRNOPLM_[\\jfgb^_RNO"
+  "ZVW]YZ\202NJK\202SOP\3QMNOKLSOP\202XTU\2UPTQOT\202NMR\5QPUSRWSQTVTW]"
+  "X\\\204SOP\204TNN\14NJKRNO]YZnjkwstuqrplmnjkgcdc_`]YZXTU\202UQR\12WS"
+  "TYUV`\\]ZVWXTU\\XY,()\7\3\4""512eab\202\202~\177\2wstVRS\202jfg\5gcd"
+  "QMN\\XYVRSSOP\202TPQ\202RNO\1VRS\220SOP\3QMNRNOTPQ\202UQR\23TPQRNOQM"
+  "NIEF\\XYUQR845NJKeabOKLMIJQMNVRSXTUSOPOKLSOPWSTYUV\202WQQ\202XRR\1XR"
+  "T\203YSU\202ZTV\206ZTX\2[UY[UW\203ZTV\203YSU4XRT[UW\\VXYSUUOQVPR^XZd"
+  "_c\34\32\37a`fpotQPU\77>CBAFWUXMKNXVYSQT\77=>><=fba\201}|yutied]YZhd"
+  "ezvw\215\211\212\224\220\221\213\207\210xtuiefjfgfbcd`ac_`^Z[XTUYUV^"
+  "Z[NJKRNO]YZnjkwstuqrplmnjkgcdc_`]YZXTU\202UQR\12WSTYUV`\\]ZVWXTU\\XY"
+  ",()\7\3\4""512eab\202\202~\177\2wstVRS\202jfg\5gcdQMN\\XYVRSSOP\202T"
+  "PQ\202RNO\1VRS\220SOP\3QMNRNOTPQ\202UQR\14TPQRNOQMNIEF\\XYUQR956NJKf"
+  "bcOKLMIJQMN\202VRS\15RNOOKLSOPVRSUQRQLPOMRRMSQOTRMQOJNNIMPKO\204SOP\204"
+  "TNN\6\\XYa]^mijyuvwstjfg\202b^_\33ZVWYUVXTUYUV\\XYc_`iefmijrno\206\202"
+  "\203\216\212\213~z{A=>*&'qmn\253\247\250\233\227\230sop[WX@<=PLMVRSc"
+  "_`QMNWSTSOPRNO\202TPQ\3QMNRNOVRS\220SOP\3VRSTPQRNO\202PLM\23RNOTPQVR"
+  "SVRQ_[Z\77;:\4\0\0&\"!c_^`\\]jfgSOPZVW\\XYTPQPLMUQRZVW\\XY\202YSU\202"
+  "ZTV\202[UW\202\\VX\206\\VZ\3\\U\\\\VZ^X\\\203]W[\202\\VZ\202[UY._Y]^"
+  "X\\[UYXRVVPTUOSWQUXSW][`a_d`^cPNS649TRW][^jhkRNOXTUYUVmij\225\221\220"
+  "\242\236\235\214\210\207wsrwst\202~\177\223\217\220\234\230\231\222\216"
+  "\217}yzjfgb^_`\\]_[\\a]^c_`^Z[WSTVRS[WX\\XYa]^mijyuvwstjfg\202b^_\33"
+  "ZVWYUVXTUYUV\\XYc_`iefmijrno\206\202\203\216\212\213~z{A=>*&'qmn\253"
+  "\247\250\233\227\230sop[WX@<=PLMVRSc_`QMNWSTSOPRNO\202TPQ\3QMNRNOVRS"
+  "\220SOP\3VRSTPQRNO\202PLM\2RNOTPQ\202VRS\26_[\\>:;\4\0\1&\"#c_``\\]j"
+  "fgNJKYUV^Z[UQRKGHMIJTPQYUVQLPSNRVPTUPTVPTWQUVPR\203TNP\202SOP\204SON"
+  "\202plm\6tpquqrjfgZVWVRS[WX\202WST\20VRSWSTZVW^Z[b^_eabVRS^Z[WSTPLM="
+  "9:D at Aplm{wxfbcKGH\202YUV\5^Z[VRSfbcVRSTPQ\202QMN\5UQRTPQQMNRNOVRS\220"
+  "SOP\3ZVWVRSPLM\202KGH\24PLMVRSZVWJFEhdc]YX'#\"JFE{wvVRSFBCTPQ]YZ_[\\"
+  "VRSQMNVRS\\XY]YZZTV\202[UW\202\\VX\1]WY\202]W[\204^X\\\204^W^\1_X_\202"
+  "_Y]\1^X\\\203]W[\15\\VZ^X\\ZTXXRV[UY`Z^c]aa[_^X\\]X^YW\\SQV^\\a\202F"
+  "DI\14_]`SQTUQRfbclhimijsonplkmihuqp}yz\206\202\203\202\220\214\215\14"
+  "|xyd`a[WX_[\\XTUZVW`\\]d`aa]^YUVWST[WX\202plm\6tpquqrjfgZVWVRS[WX\202"
+  "WST\20VRSWSTZVW^Z[b^_eabVRS^Z[WSTPLM=9:D at Aplm{wxfbcKGH\202YUV\5^Z[VR"
+  "SfbcVRSTPQ\202QMN\5UQRTPQQMNRNOVRS\220SOP\3ZVWVRSPLM\202KGH\33PLMVRS"
+  "ZVWIEFgcd\\XY'#$JFGzvwUQREABUQRYUVWSTPLMOKLTPQWSTTPQTNRVPTTNRPJNQKOT"
+  "NRUOQRLN\202TNP\202SOP\204SON\40rnooklhde]YZRNOMIJNJKQMNWSTTPQZVWYUV"
+  "NJKOKLYUVXTUPLMMIJGCD<89\77;<^Z[wstuqr]YZZVWEABZVWa]^iefPLMRNO\205PL"
+  "M\203QMN0XTURNOPLMRNOQMNMIJOKLUQRPLMRNOUQRWSTUQRRNOOKLNJKXTUeabd`ab^"
+  "_iefc_`PLMGCDWQQf``]WWNHH\206\200\202\204~\200kegUOQhbfkeib\\`VPTGAE"
+  "f`d[UYc]a`Z^_Y]`Z^b\\`a[__Y]_X_`Y`\204aZa\202aZb\2b[cb[b\202aZaNd]dc"
+  "\\c^W^_X_b[b^W^_X_`Y`aZa`Y`^W^]V]_X_b[bjck]X_LGMD\77ELGMYTZZUYSNRlgk"
+  "\200{\177rnoPLMOKJd`_njiqmllhi\207\203\204\212\206\207vrsjfg`\\][WX_"
+  "[\\UQRWSTUQRPLMSOP]YZ`\\][WXrnooklhde]YZRNOMIJNJKQMNWSTTPQZVWYUVNJKO"
+  "KLYUVXTUPLMMIJGCD<89\77;<^Z[wstuqr]YZZVWEABZVWa]^iefPLMRNO\205PLM\203"
+  "QMN\21WSTSOPQMNSOPQMNLHINJKUQRPLMSOPWSTXTUUQRRNOPLMOKLXTU\202eab\40b"
+  "^_hdea]^OKLGCDXTUfbc[WXJFG\202~\177\200|}hdeTPQc_``\\]]YZUQR=9:ZVWVR"
+  "S[WXVPRVMPYPS]TW[RUULOPJLRLNUOQTNPSON\203RNM\2SONTPO\203WST\16TPQRNO"
+  "SOPXTU]YZOKLLHIRNOWSTUQRVRSWSTQMNMIJ\202PLM\20TPQb^_lhihdea]^RNOb^_X"
+  "TU]YZKGHNJKLHIiefXTUVRSSOP\202PLM\4RNOUQRXTUPLM\202QMN\202RNO\2SOPTP"
+  "Q\202UQR\27SOPPLMMIJOKLTPQ\\XYb^_a]^^Z[PLMOKLa]^hdefbckghXRRRLLGAA>8"
+  "8oiktnpysuztv\202[UY\12MGK>8<F\77Fwpw]V]WPWd]db\\`aZab[b\202aZa\2e^f"
+  "jcj\202c\\d\203b[c$c\\dc[fc\\daZb`Y`d]eb[b]V^`Y`d]eaZab[cb[bb[c`Y`^W"
+  "__X_b[cf_gohp_X`LEMD\77ENIO]X^c^da\\`\201|\200tosXSWTPQrno\202~}qml_"
+  "[Znjk\202\204\200\201\12sopjfgb^_WSTVRSTPQVRSSOPOKLQMN\202XTU\1SOP\203"
+  "WST\16TPQRNOSOPXTU]YZOKLLHIRNOWSTUQRVRSWSTQMNMIJ\202PLM\20TPQb^_lhih"
+  "dea]^RNOb^_XTU]YZKGHNJKLHIiefXTUVRSSOP\202PLM\5RNOUQRXTUPLMQMN\203RN"
+  "O\1SOP\202TPQ\12UQRTPQQMNNJKOKLTPQ\\XYc_``\\]]YZ\202PLM\11b^_iefgcdm"
+  "ijSOPNJKFBC\77;<plm\202rno\24plmWSTVRSIEF.*+2./njkRNOC\77@\\SVYPSXOR"
+  "WNQTKNRILWQS`Z\\VPRUOQSON\203RNM\202SON%PLMQMNRNOQMNPLMQMNSOPVRS[WXU"
+  "QRRNOTPQXTUYUVSOPKGHa]^^Z[KGHMIJc_`_[\\OKLTPQeabd`aLHIUQRWSTa]^MIJRN"
+  "OWSTVRSUQRSOPRNO\202SOP\4TPQOKLVRSWST\202RNO\202YUV\37RNOVRSRNONJKKG"
+  "HMIJTPQ^Z[eabZVW;78\21\15\16\4\0\1\30\24\25,()D at Aa]^VPR5/1!\33\35\15"
+  "\7\11\"\34\40$\36\"B<@SMQlel]V]C<C2+2JCK\203|\204\202`Ya\3bXaaW_`V_\203"
+  "aW`\3f\\glbkh^i\202g]h\203f\\gWg\\jg]hh^ii_hmcnlbke[fe[dg]hcYbkalkaj"
+  "j`ki_hg]hg]fi_jj`kaWbUKTLBKOHP\\U]g`glelngntmtc]aTOSeab~z{xtufbcgcd}"
+  "yz\210\204\205{wxgcdc_`_[\\TPQPLMTPQUQRSOPPLMRNOUQRSOPNJKPLMQMNRNOQM"
+  "NPLMQMNSOPVRS[WXUQRRNOTPQXTUYUVSOPKGHa]^^Z[KGHMIJc_`_[\\OKLTPQeabd`a"
+  "LHIUQRWSTa]^MIJRNOWSTVRSUQRSOPRNO\202SOP\2TPQOKL\202WST\202RNO%YUVXT"
+  "UQMNUQRSOPOKLLHIMIJSOP^Z[fbcXTU:67\20\14\15\5\1\2\31\25\26-)*D at A`\\]"
+  "RNO/+,\30\24\25\4\0\1\32\26\27\34\30\31""845HDEc_`RNO:67\34\30\31:67"
+  "\201}~QMNPLMVMPSJM\202PJL\7MGILFHTNP]WYWQQVPPTPO\202RNM\1QML\202RNM\202"
+  "WST+VRSUQRRNOOKLMIJLHI^Z[[WXPLMMIJTPQUQRQMNRNOIEFVRSSOPb^_wstRNO#\37"
+  "\40'#$EAB_[\\\\XYc_`TPQWSTKGHYUVTPQVRSYUV[WXZVWVRSQMNNJKUQR_[\\\\XYO"
+  "KLNJK\202YUV\3NJKPLMQMN\202SOP\2RNOQMN\202RNO\35+'(/+,956RNO`\\]IEF0"
+  ",-1-.\4\0\0\17\11\13@:<YSUmgk`Z^c]aSLS(!(4-5MFNf_g\203|\204\231\222\232"
+  "ZR]`Yae[fcYbbXce[ff\\g\202e[f\4f\\gj_mi_ji^l\203h]k(h]mh]kncqpfqvkyu"
+  "kvncqndopeskalrgupfqodrpfqqftpfqlaoh^iVLWSITWMXbXag`hf_gc\\dc\\cg`gZ"
+  "SZYTZqlp|w{fbca]^|xy\214\210\211\211\205\206plmZVW[WX\\XY\202UQR\2VR"
+  "SUQR\202TPQ\4UQRVRSSOPOKL\202WST)VRSUQRRNOOKLMIJLHI^Z[[WXPLMMIJTPQUQ"
+  "RQMNRNOIEFVRSSOPb^_wstRNO#\37\40'#$EAB_[\\\\XYc_`TPQWSTKGHYUVTPQVRSY"
+  "UV[WXZVWVRSQMNNJKWST_[\\\\XY\202NJK\7ZVWYUVMIJPLMRNOTPQSOP\202QMN\33"
+  "RNOSOP+'(/+,956RNO_[\\GCD,()+'(\3\0\0\11\5\6""623LHIb^_UQRYUVHDE\32\26"
+  "\27\37\33\34>:;VRS~z{\225\221\222B>\77UQRSMO\202OIK\11TNPVPRSMOPJLQK"
+  "MWQQVPPTPORNM\203QML\1RNM\202RNO\36SOPTPQUQRTPQSOPQMNMIJUQRMIJJFGVRS"
+  "UQRPLMZVWFBCWSTVRSa]^njkGCD$\40!512HDE_[\\WSTZVWPLM[WXQMN[WX\204XTU\7"
+  "WSTUQRTPQSOPUQR\\XYVRS\202HDE-VRSYUVNJKOKLRNOVRSWSTUQRQMNMIJJFGD at AXT"
+  "Utpq\224\220\221\234\230\231}yzb^_eabYSWwqu\254\246\252\255\247\253\251"
+  "\242\251\207\200\207ohoD=E1*2LDOkcn{s~xp{tlw>6CUMXvkyoepk`nmbppesodr"
+  "k`nh]kk`pj_m\202j_o-i^nj_oj_pj_ombrncqrgwodri^nmbptiyshvncsh]kcXheZh"
+  "j_olaoh]mbWeQESSGUZO]f\\glbmlbkoentjsunv^W^UNUngn\202}\203rmqlgk\202"
+  "}\201\215\211\212\204\200\201lhi]YZ`\\]\\XYSOPWSTTPQ\202RNO\5UQRWSTV"
+  "RSTPQSOP\202RNO\36SOPTPQUQRTPQSOPQMNMIJUQRMIJJFGVRSUQRPLMZVWFBCWSTVR"
+  "Sa]^njkGCD$\40!512HDE_[\\WSTZVWPLM[WXQMN[WX\204XTU\13WSTUQRTPQSOPWST"
+  "\\XYUQRGCDHDEWSTYUV\202NJK+RNOWSTXTUUQRPLMLHIKGHFBCXTUsop\222\216\217"
+  "\233\227\230{wx]YZ^Z[SOPrno\247\243\244\253\247\250\246\242\243\202~"
+  "\177eab623\"\36\37:67]YZlhinjkd`a\36\32\33C\77 at ea`YUTRNMXTS_[Z\\XWTP"
+  "ONJIUQPTPOSONRNM\202RNO\202SMO\1RNO\202QMN\4RNOTPQUQRSOP\202QMN\22`\\"
+  "]WSTRNO`\\]XTUJFGVRS_[\\a]^TPQMIJPLMC\77 at HDEjfg\200|}}yzWST\202PLM\6"
+  "fbcSOPMIJXTUTPQMIJ\202GCD\14KGHQMNUQRNJKQMNMIJFBCJFGVRSZVWUQRSOP\203"
+  "TPQ\202SOP\6TPQUQRnjklhia]^[WX\202^Z[\31njk\215\211\212\202|\200\215"
+  "\207\213\220\212\216mgktmtwpw\210\201\211\200y\201\207\177\212\226\216"
+  "\231\212\202\215phsMEROGTB:Gf^k\200u\203vkymbplaoncqncslaq\204k`p\202"
+  "k`q\202lar\16mbsodulaqi^n`UeWL\\[P`f[kh]m^ScWL\\ODTPEUWL\\\202]Rb\"["
+  "P`[N_[O]]R`dYglbmtju}s~\205{\204jckg`hc\\dmfmytztouupt\212\205\211\212"
+  "\206\207\201}~plmkghiefVRSHDEPLMSOPNJKMIJRNOUQRSOPRNOTPQRNO\202QMN\4"
+  "RNOTPQUQRSOP\202QMN\22`\\]WSTRNO`\\]XTUJFGVRS_[\\a]^TPQMIJPLMC\77 at HD"
+  "Ejfg\200|}}yzWST\202PLM\6fbcSOPMIJXTUTPQMIJ\202GCD\3KGHQMNUQR\202PLM"
+  "\5JFGC\77 at IEFVRSYUV\202RNO\13TPQUQRTPQRNOQMNSOPUQRnjkkgh^Z[XTU\202\\"
+  "XY\24kgh\210\204\205{wx\206\202\203\212\206\207gcdlhimij}yztpqvrs\216"
+  "\212\213\177{|]YZ845956,()PLMtpoa]\\\202QML\6XTSYUTUQPRNMTPOSON\202R"
+  "NM\2RNOSOP\202UOQ\2XTUUQR\202RNO\31TPQUQRRNOPLM\\XYfbcRNOJFG`\\][WXL"
+  "HI[WXSOPWST\\XY[WXQMNFBCJFGXTUplm\216\212\213~z{fbcC\77@\202JFG\4]YZ"
+  "RNOOKLKGH\202HDE\4KGHOKLRNOOKL\202NJK\2RNOWST\202[WX\1ZVW\202TPQ\1SO"
+  "P\202QMN\27RNOUQRXTUOKL\\XY]YZZVW\\XYUQRRNO\\XYgaepipkdkPIPibje^fqit"
+  "{s~wo|\211\201\216\201y\206\205}\212\202met\7g_nyq\200}r\202vk{ncsla"
+  "qk`p\202j_p\1lar\203mbs\2maunbv\202ocw\7pevtizqfwnctcXiVK\\WL]\202^S"
+  "d\2ZO`WL]\202TIZ\26VK\\ZO`\\Qb]Rbk^om`qocqrftvkywmxrhskalKCNkdlyrzsl"
+  "tsntxsy\203~\204\224\217\223\207\203\204zvw\202mij\11gcdMIJEABZVWXTU"
+  "PLMNJKRNOTPQ\202RNO\3VRSXTUUQR\202RNO\31TPQUQRRNOPLM\\XYfbcRNOJFG`\\"
+  "][WXLHI[WXSOPWST\\XY[WXQMNFBCJFGXTUplm\216\212\213~z{fbcC\77@\202JFG"
+  "\4]YZRNOOKLKGH\202HDE\13KGHOKLRNOOKLKGHIEFLHISOPYUVXTUUQR\203SOP\40Q"
+  "MNPLMQMNUQRXTUOKLYUVVRSSOPVRSPLMLHITPQ\\XYeab^Z[@<=VRSSOPb^_plmd`a\177"
+  "{|oklvrsXTUSOP[WXc_`lki_^\\SRP\202POM\3NMKONLQPN\204QML\"SMOUOQVPRWQ"
+  "SSOPPLMOKLRNOXTU\\XY]YZ[WXSOPUQR512-)*RNO^Z[YUVokl_[\\WSTTPQIEF62351"
+  "2C\77 at IEFMIJkghc_`_[\\QMN^Z[\202OKL\3PLMTPQXTU\202\\XY\11YUVUQRRNOWS"
+  "TTPQWSTa]^eab`\\]\202[WX\2PLMQMN\202SOP\2RNOPLM\202OKL\1NJK\202\\XY\37"
+  "XTU`\\]b^_^Z[a\\`_X_hahd]dWPXxqy_X`XP[jbmskxqivcXf\200x\207xm}ogvnct"
+  "yn~zo\200xm}vk|uj{qfwmaunbvpdxmaunbv\202nbx\2ocyqe{\202rf|\15vj~wl}{"
+  "o\203uj{i]qf[li]qg\\mdXlh]nl`tlarh]n\202f[l\77h]nYL]eXithv\202v\204\212"
+  "\177\215\205z\210odrXM[E=Jmer{s~unv\203~\205\227\222\231\230\223\231"
+  "\222\215\223\177z~ojn`[_c^b_Z^JFGQLPvrs_[\\UQRQMNUQRVRSSOPTPQYUVSOPP"
+  "LMOKLRNOXTU\\XY]YZ[WXSOPUQR512-)*RNO^Z[YUVokl_[\\WSTTPQIEF623512C\77"
+  "@IEFMIJkghc_`_[\\QMN^Z[\202OKL\3PLMTPQXTU\202\\XY\4YUVUQRRNOVRS\202O"
+  "KL\7YUV_[\\\\XYWSTUQRNJKQMN\202SOP\32QMNOKLNJKOKLNJKXTUSOPMIJVRSXTUR"
+  "NOSOPKGHYUVXTUKGHhdeLHIEABXTUa]^_[\\EAByuveabKGH\202[WX\10cb``_]^][]"
+  "\\ZVUSONLNMKSRP\203PLK\33QMLTNPVPRWQSYSUXTURNOQMNWST\\XY]YZ^Z[a]^XTU"
+  "KGH/+,;78`\\]VRSJFGiefQMNPLMGCD2./\36\32\33*&'\202C\77@\35*&'!\35\36"
+  "\35\31\32\37\33\34/+,RNOeabZVW`\\]_[\\]YZZVWXTSVRQUQPTPOXTSZVUa]\\ie"
+  "dhdca]\\^ZYb^]VUSTSQTPOSONTPQ\202VRS\6WST[VZ\\W[^X\\_Y]`Z^\203a[_\31"
+  "aW_cYbf\\ei_jj`ki_jg\\jf[icXhmbrpct|q\202uhzbWhl_sqdvwj~\177r\204\177"
+  "r\206~q\205\201t\210~p\207xj\201wi\200tf\177\202vh\201\21se~tf\200xj"
+  "\204zl\206xj\203rd{qdxj^tcWkcWmj^rrf|wk\177vj\200k_sj^tym\201\202\206"
+  "z\2168\201x\213\204y\212uhy\201s\202\200s\204revh[li\\nlark`qxm~~s\204"
+  "~v\205zr\177\202|\210\225\217\231\222\215\224zu|wpwrkr^W^OHOMFMHBF[V"
+  "\\\207\202\206hcgIDHHCGUPTKILHFIVTU][\\VRQPLKOKJVRQ[WV\\XW]YZ_[\\XTU"
+  "KGH/+,;78`\\]VRSJFGiefQMNPLMGCD2./\36\32\33*&'\202C\77@\20*&'!\35\36"
+  "\35\31\32\37\33\34/+,RNOeabZVW_[\\^Z[]YZ[WXXTUVRSUQRTPQ\203VRS\1WST\202"
+  "XTU\202YUV\210TPQ\202VRS\202WST\35VRSUQRSOPRNOOKLQMNSOPUQRVRSTPQRNOQ"
+  "MNMIJTPQMIJhdec_`EABSOPVRSYUVfbceabb^_hdeeabZVWYUVRNO\202XTU\37SOPTP"
+  "Q[WX]YZXTUHDE]YZc_`VRSTPQVRS;78\24\20\21\37\33\34""845NJKgcduqr^Z[NJ"
+  "K`\\]512\25\21\22\31\25\26\16\12\13\40\34\35OKLVRSfbcb^_c_`\202jfg\26"
+  "iefvrsxtueab]YZ\\XYZVWYUVWSRVRQUQPTPOZVU\\XWb^]kgfnjijfec_^_[ZYXVWVT"
+  "\202VRQ\2WSTXTU\202YUV\13YTXZUY]W[^X\\`Z^a[_b\\`b[bdZce[dh^i\203kal\25"
+  "i^lh]kgZkobsk^pj]o]PdSFZj]qzm\201xk\177}p\204zm\201ug~vh\177ug~rd}se"
+  "~xj\204zl\206yk\205\202vg\204\11xi\206yj\207wh\205ug\200rd{mayk_unbx"
+  "sg}\202wk\201Bl`vmawwk\201\206z\220\216\202\230\213\177\223\207{\221"
+  "\206z\216\222\205\226\225\207\230\220\203\224\204w\211zm\177xk\177vj"
+  "~sg{rfz|q\202vm~metvp|\206\200\212}w\201fahunvxqykdl_X`ZSZLELHCI\\W]"
+  "`[_IDHVQUpkohfiZX[YWXXVWIEF^ZYd`_WSRUQPVRQ;78\24\20\21\37\33\34""845"
+  "NJKgcduqr^Z[NJK`\\]512\25\21\22\31\25\26\16\12\13\40\34\35OKLVRSfbcb"
+  "^_c_`\202jfg\4iefvrsxtueab\202\\XY\6[WXYUVWSTVRSUQRTPQ\204VRS\204WST"
+  "\210UQR\202SOP\203TPQ\1SOP\202RNO\3PLMRNOTPQ\202VRS\5UQRSOPRNOMIJYUV"
+  "\202MIJ\21""845&\"#LHIeab\\XYd`a]YZSOPWSTUQRNJKQMN\\XY_[\\\\XYUQRTPQ"
+  "\202XTU%TPQplm_[\\UQRZVWYUVD at A&\"#\23\17\20HDE]YZplmrnohdeZVWTPQWSTZ"
+  "VW&\"#845\77;<njk\244\240\241\214\210\211\235\231\232\234\230\231\235"
+  "\231\232\237\233\234\223\217\220}yztpqiefSOPYUVXTUWSTVRS\204UQP\13ZV"
+  "U\\XWa]\\iedrnmtpokgf`\\[^ZY\\XWYUV\202XTU\1ZVW\202[VZ\6YSWZTX\\U\\^"
+  "W^`Y`b[b\202c\\c\4g]fi_jk`nmbp\202ncq\202m`q\202pcu\202gZn\17iZqm^u{"
+  "l\203~o\206n_vqbyk\\sdTneUofVpgWrk[vue\202xh\205yi\206\203yh\210\27w"
+  "f\206tc\203l^xl^wn`zug\200|n\207}o\210xj\203se~rd}{m\206\207y\222\215"
+  "\177\230\213}\226\205w\216\200r\213}o\206\203t\207\201r\205\177p\203"
+  "\177p\205\200s\207\203\202t\2138\201u\211\216\203\224\210\177\220\202"
+  "z\211\223\213\230\236\226\241\216\210\222}x\177vow|u}tmujckkdlb[cUPV"
+  "VQWTOU;6<IDHjeihcgZUYTRUQOPqmn_[\\UQRZVWYUVC\77@%!\"\22\16\17HDE]YZp"
+  "lmrnohdeZVWTPQWSTZVW&\"#845\77;<njk\244\240\241\214\210\211\235\231\232"
+  "\234\230\231\235\231\232\237\233\234\223\217\220}yztpqiefSOP\202XTU\202"
+  "WST\1VRS\202UQR\1TPQ\202VRS\204UQR\202TPQ\207UQR\1TPQ\202PLM\3QMNRNO"
+  "SOP\202RNO\4QMNSOPTPQUQR\202WST\2VRSTPQ\202SOP\22VRSHDEIEFJFGKGH_[\\"
+  "a]^LHIRNOGCD;78>:;@<=\77;<FBCQMNVRSXTU\202VRS\31WSTTPQOKL/+,845SOPb^"
+  "_IEF'#$1-.VRS\214\210\211\201}~qmnZVWOKL[WX^Z[LHID at A($%956[WX\213\207"
+  "\210\231\225\226\202rno\10d`a_[\\^Z[VRSKGHPLMUQRJFG\204TPQ\202TPO\202"
+  "UQP\33XTS[WV^ZYc_^njiwsrsonjfeb^]_[Z[WXYUVXTUYUVZUY[VZZTX\\VZ^W^`Y`b"
+  "[bd]de^ef_gkallaombp\202odr\25odtpctobtuhzreym`tse|\203t\213\216\177"
+  "\226\214|\226\201q\213l\\vqa{l\\vfVqgWrhXsiYtm]zrb\177ud\204\202xg\207"
+  "\31wf\210sb\204m\\~iXxdTqgYsrd~\201s\215\210z\224\203u\216zl\206tf\177"
+  "\201s\215\212|\225\217\201\233\210z\223\200r\214|n\207yk\205ug\200wh"
+  "\177qbwo`wte|ug~\202tf}/wi\200vj\200\201u\211~u\206\207\177\216\236\226"
+  "\243\234\224\241\205\177\211}x\177vowzs{ogrd]ekdltmurmtqlrojpPKQTOUj"
+  "ei\\W[\77:>+),\37\35\40.*+845RNOb^_HDE&\"#0,-VRS\214\210\211\201}~qm"
+  "nZVWOKL[WX^Z[LHID at A($%956[WX\213\207\210\231\225\226\202rno\10d`a_[\\"
+  "^Z[VRSKGHPLMUQRJFG\210TPQ\1VRS\202UQR\1TPQ\202SOP\202RNO\204TPQ\204S"
+  "OP\4OKLPLMQMNRNO\204SOP\202UQR\1VRS\202WST\20VRSTPQSOPVRSUQRMIJVRSlh"
+  "i{wxwsta]^HDEPLMHDE<89\77;<\202@<=\202GCD\22MIJSOPUQRSOPMIJEAB>:;%!\""
+  "-)**&'\"\36\37/+,QMNkghsopmijjfg`\\]\202QMN\4eab_[\\>:;3/0\202B>\77\15"
+  "wst\230\224\225xtufbcYUVa]^UQRQMNPLMOKL]YZgcd`\\]\204RNM\202SON\16TP"
+  "OUQPUQRYUV[WX]YZfbcsopzvwyuvjfgeab`\\][WX\202YTX\202ZUY\15^W^_X_aZbc"
+  "\\de^fg`hhaiialmbpmbrobspctqdu\202qdv7qdxreyse|vg~xh\202\201q\213\210"
+  "x\222\200p\213ue\200r_{{h\204|i\205zg\205|i\207}j\210|i\207\200m\215"
+  "|i\211{g\212ye\210vb\205r^\203mY~jV{fUwn]}sc\200\200p\215\216~\233\221"
+  "\201\236\210x\223\202r\217\203s\216\212z\227\217\177\232\215}\232\203"
+  "s\216|l\211|l\207|l\211yi\204{k\205vf\200td~wg\201ue\177p`zoaztf}ym\203"
+  "|p\204\201v\207\226\213\233\250\240\255\224\214\231\202xp{\33ukvvlwm"
+  "bpbXcd\\gohprksqjrg`h818$\37%(#)!\34\"\"\35#3.2=8<&\"#.*+,()#\37\40""0"
+  ",-SOPnjkvrsmijjfg`\\]\202QMN\4eab_[\\>:;3/0\202B>\77\16wst\230\224\225"
+  "xtufbcYUVa]^UQRQMNPLMOKL]YZgcd`\\]QMN\203RNO\1SOP\203TPQ\202UQR\202T"
+  "PQ\1SOP\202RNO\1QMN\203SOP\202RNO\204QMN\3RNOSOPTPQ\204UQR\202VRS\1W"
+  "ST\202VRS\14UQRTPQSOPRNOVRSYUVUQR^Z[mijd`aWSTJFG\202XTU-RNOWSTVRSTPQ"
+  "YUVVRSTPQRNONJKHDE\77;<845512\177{|eabFBCC\77 at b^_\200|}|xygcd\77;<ZV"
+  "Wd`aXTUUQRYUVMIJ845512ZVWD at Aqmn\206\202\203UQRWSTMIJ]YZRNOQMNRNOLHIN"
+  "JKLHI\77;<\204QML\2RNMSON\202TPO\2UQRXTU\202ZVW\11`\\]lhizvw\203\177"
+  "\200vrsqmniefb^_^Y]\202\\W[\6[V\\c\\cd]ee^fg`hhai\202jbm\1kcp\202odt"
+  "\202pcu\1qdv\202qdx\5rd{qczn`yue\177vf\201\202{k\206\7cSpRB_eRpr_\177"
+  "yf\206}j\212\203p\220\202\205q\224*\211u\230\201m\220|h\215vb\207t`\205"
+  "r]\204r^\203u`\207ye\212\202o\217\202r\217\213z\232\225\205\242\222\201"
+  "\241\210w\227\207v\226\217~\236\213x\230\212y\231\210u\225~m\215|i\211"
+  "{j\212{h\210td\201wg\204vf\203wg\204yi\206xh\205ue\200ug\201{m\206xj"
+  "\203ym\203\205y\215\235\222\243\241\231\250\204|\211mertlyqft\202rgu"
+  "-peskcph`kd\\g^W_]V^E>FJEL`[agbh|w}\237\232\236\262\255\261\202}\201"
+  "fbcGCDD at Ac_`\201}~\177{|jfg\77;<ZVWd`aXTUUQRYUVMIJ845512ZVWD at Aqmn\206"
+  "\202\203UQRWSTMIJ]YZRNOQMNRNOLHINJKLHI\77;<\203QMN\1RNO\203SOP\205TP"
+  "Q\204SOP\202TPQ\202SOP\1RNO\203QMN\3TPQUQRVRS\203WST\202VRS\1WST\202"
+  "VRS\2UQRTPQ\203SOP8UQROKLWSTRNOYUV\\XY845!\35\36""2./HDEQMNUQR`\\]c_"
+  "`b^_ief_[\\VRSLHIHDEEABC\77 at HDEOKLlhi\200|}\232\226\227\243\237\240\215"
+  "\211\212hdeQMNMIJ>:;iefoklXTUOKLD at A3/02./KGHhdeTPQmij\205\201\202c_`"
+  "WSTUQRRNOMIJWST_[\\ZVW[WX^Z[VRS\205RNM\1SON\202SOP\21UQRVRSYUV[WX]YZ"
+  "eabsop\200|}\206\201\205\177z~vqulgkfagc^db[bb[cg`h\202h`k\2jbmlbm\203"
+  "mbp\202qdv\203qdx\15rd{sd{td~vf\200n^yue\200ue\202{h\206xe\203]JjO<\\"
+  "r\\\200}g\213\202\203m\221\\\207q\225\206p\226\205o\225\210r\230\200"
+  "j\220|f\215zd\213|f\215~g\221\177i\220\203l\226\207r\231\206r\225\207"
+  "t\224\220|\237\233\210\250\227\203\246\212v\231\211u\230\222~\241\211"
+  "s\227\206r\225\204n\222\177k\216}g\213zf\211xb\206ua\204}i\214|i\211"
+  "{h\210zg\207ud\204rb\177rb}rd}}o\210\205w\216\226\212\236\245\232\253"
+  "\230\215\235}r\200tiw~s\201vk{peutiyzo\177ujzi^l`Uc\\R]0(3KDL\212\203"
+  "\213\266\257\267\254\245\254\227\220\227\213\204\213~x|ojn\202}\201\233"
+  "\226\232\243\236\242\214\207\213gbfQLPMHL>:;iefoklXTUOKLD at A3/02./KGH"
+  "hdeTPQmij\205\201\202c_`WSTUQRRNOMIJWST_[\\ZVW[WX^Z[VRS\205RNO\204SO"
+  "P\204TPQ\203UQR\202VRS\202UQR\1TPQ\203SOP\202VRS\203WST\7VRSUQRTPQWS"
+  "TVRSUQRTPQ\203RNO\13QMNYUVIEFTPQRNOZVWXTU($%\22\16\17A=>VRS\202^Z[\202"
+  "d`a\25a]^hdeZVWRNONJKPLMSOPTPQ[WXeabJFGd`afbcPLMQMNc_`RNO*&'=9:jfgie"
+  "f\202SOP\15@<=$\40!'#$956JFGIEFWST}yzqmnKGHNJKVRSQMN\202WST\4JFGIEFR"
+  "NOTPQ\202SON\204RNM\202SOP\202TPQ\17WST\\XY]YZ_[\\kghxtu\221\214\220"
+  "\212\205\211\177z~uptmhnidjg`hf_gial\202jbm\1kcp\202mbp\202mbr\2reyr"
+  "d{\202qcz-qc|rd}td\177ue\200xh\205sc\200|k\213ra\201lYymY|hTws_\202\235"
+  "\207\255\245\217\265\243\215\264\232\204\252\224~\245\214v\235\206p\227"
+  "\207q\230\202k\225\201j\224\203l\226\210q\233\211r\234\205n\230\203l"
+  "\226\205o\226\202n\223\204p\223\221}\240\241\215\260\236\212\255\216"
+  "z\237\212t\232\221{\241\207q\227\204n\224\201k\222\200j\220~h\217}g\216"
+  "~h\217\200j\220{e\213\202zf\213\36ye\210yh\212{j\212zj\207yi\204{m\207"
+  "\210z\223\236\220\247\236\222\246\202w\210j_ok`pvk{\177t\205odumbsuj"
+  "zodtbWg^Sc_Tb+#0JBM\202z\205\231\222\232~w\177g`ge^e_X_RMS\202jei\202"
+  "RMQ\6c^bSNR+&*=9:jfgief\202SOP\15@<=$\40!'#$956JFGIEFWST}yzqmnKGHNJK"
+  "VRSQMN\202WST\4JFGIEFRNOTPQ\212SOP\202TPQ\1UQR\203VRS\1YUV\202XTU\2W"
+  "STVRS\203UQR\1VRS\203WST\10VRSUQRTPQSOPWSTVRSTPQSOP\204QMN\23UQRLHI^"
+  "Z[KGH>:;@<=401IEF\204\200\201\222\216\217\215\211\212}yztpqhde]YZ`\\"
+  "]ZVWWSTZVW\202b^_\33[WXXTU\\XY\77;<GCD@<=.*+-)*=9:@<=512845UQRlhiTPQ"
+  "PLMD at A\40\34\35:67MIJLHIb^_vrskgh[WXXTUVRS\210SOP\2OKJQML\202SON\27R"
+  "NOSOPXTU\\XYUQRTPQTOSUPTYTX`[_idhnim\201|\202\213\206\214\215\206\215"
+  "\200y\200sltpiqnfqjbmphumerodr\202peu\11ncsnctpevqczrb|sc}td~ue\200v"
+  "f\201\202wg\204\25xe\205yf\206zf\211{g\212~j\215\204p\225\216z\237\226"
+  "\201\250\242\214\263\234\203\253\223z\244\216u\235\216u\237\215t\236"
+  "\211p\232\205l\226\200f\223}c\220{a\216}c\220\201g\224\202\205k\230\15"
+  "\201j\224\210s\232\213w\234\215y\236\244\220\265\235\207\255\227\201"
+  "\250\220z\241\212t\233\203j\222\206m\225\206m\227\203j\222\202\202i\223"
+  "\5\177f\220za\213\177h\222|f\215{f\215\202|h\2153{g\212{j\212\177o\214"
+  "\203s\216\226\210\241\242\224\255\223\205\234xl\202j^rnbvxl\200\231\214"
+  "\240\216\201\225\200s\207|o\201qdvj]naVfD9G5*8`VatjucYbSLTQJRHAI<5<I"
+  "DJQLRIDJ3.4.)-<7;\77:>504<7;XSWmijTPQPLMC\77@\37\33\34""845MIJLHIb^_"
+  "vrskgh[WXXTUVRS\210SOP\2QMNRNO\203SOP\5UQRXTUZVWUQRTPQ\203RNO\21TPQV"
+  "RSXTUVRSUQRSOPRNOQMNSOPTPQVRSZVWYUVXTUWSTVRSUQR\202TPQ\210SOP*QMNSOP"
+  "UQRTPQVRS`\\]plm}yz\220\214\215\201}~oklhdeiefhdea]^XTUQMNJFGEABHDEQ"
+  "MNXTUYUVWST7345121-.401C\77 at NJK\77;<&\"#OKLXTUNJK!\35\36\35\31\32'#$"
+  "+'(_[\\\236\232\233\217\213\214\202\220\214\215\4yuvb^_ZVWUQR\210SOP"
+  "\202WSR\3VRQUQPSOP\203RNO\2WSTVRS\202VQU*XSW]X\\c^bgbfrms\202}\203\221"
+  "\212\221\217\210\217\202{\203unvrjutlwnfskcrmbrodupevoduocwqeysc}sc~"
+  "td\177ue\202vf\203wf\206xg\207xg\211xd\207zf\213{g\214{f\215|g\216\177"
+  "j\221\205p\227\213t\236\210o\231\205l\226\202h\225\202i\223\204j\227"
+  "\206l\231\202\207m\232\4\214r\237\213q\236\212p\235\214r\237\202\216"
+  "t\241\40\215s\240\211r\234\211s\232\217{\240\226\202\247\256\232\277"
+  "\244\216\265\233\205\254\225\177\246\217y\240\207n\230\206m\227\204k"
+  "\225\203j\224\204k\225\205k\230\204i\226\200f\223\202h\225}f\220|g\220"
+  "|g\216}h\217|h\215\177k\216\201p\220\212z\227\235\215\250\244\226\260"
+  "\225\207\240\204v\217\200t\214\202\202v\214\"wi\200`RiZLck^r`SgG:LA6"
+  "G8-=\\Qaujxvky_U`PHSNGOF\77G<5=C>EA<B<7=;6<HCIQLPA<@(#'OJNWRVLHI\37\33"
+  "\34\34\30\31($%+'(^Z[\236\232\233\217\213\214\202\220\214\215\4yuvb^"
+  "_ZVWUQR\210SOP\202XTU\1VRS\202UQR\7TPQRNOQMNWSTVRSTPQSOP\204RNO\1UQR"
+  "\203TPQ\2UQRVRS\202XTU\5YUVXTUWSTVRSUQR\202TPQ\211SOP0QMNTPQVRSTPQRN"
+  "OUQR^Z[fbc]YZWSTQMNPLMTPQXTUYUVXTU`\\]]YZ[WX]YZ`\\]a]^^Z[[WXRNOZVWd`"
+  "ajfgiefa]^YUVUQR`\\]]YZ\77;<\32\26\27,()KGH_[\\\222\216\217\232\226\227"
+  "\203\177\200xturno^Z[PLMNJKJFG\210SOP\1QML\202PLK\"TPOWSTYUVWSTUQRSN"
+  "RTOSVQUWRVYTZ\\W]`[ac^dibiwpw\213\204\214\230\221\231\224\214\227\204"
+  "|\207zr\177xp}rgwodtnctpdxqeypdxpdzqe{td\177ue\202vf\203wf\206zg\207"
+  "\202{g\212\5|h\215ye\212{f\215~h\217~g\221\202}f\220\2\177h\222\201j"
+  "\226\202\205k\230\11\206l\233\207m\232\210n\235\212p\237\214r\241\216"
+  "t\243\217u\244\220v\245\222x\247\203\224z\251\14\222x\247\217x\244\215"
+  "v\240\225\200\247\233\206\255\261\234\303\244\217\266\231\204\253\224"
+  "}\247\221z\244\216t\241\212p\235\202\206l\231\7\207l\231\205i\231\204"
+  "h\230\202h\227\203i\230\177h\224~g\221\202\177i\2203~j\217\202n\221\207"
+  "t\224\227\206\246\241\221\256\237\217\254\216\200\232\205w\221\210z\224"
+  "\205w\221{m\207td~UE_E7PN at W\77""1H5(<XK_wj|\200s\204\215\201\217\212"
+  "\177\215{q|tjuoepbXcVOW\\W^b]dkfmpkqmhne`f\\W[VQU_Z^[VZ>:;\31\25\26-"
+  ")*LHI`\\[\222\216\215\232\226\227\203\177\200xturno^Z[PLMNJKJFG\210S"
+  "OP\1RNO\202PLM\4TPQYUVZVWWST\203SOP\203TPQ\10SOPRNOQMNTPQUQRVRSXTUYU"
+  "V\203ZVW\203VRS\2UQRTPQ\202SOP\1RNO\210SOP\10OKLSOPVRSUQRQMNOKLQMNTP"
+  "Q\205WST\6YUV]YZ_[\\c_`eabhde\202kgh\33gcdb^__[\\\177{|\203\177\200\212"
+  "\206\207\211\205\206yuviefmij|xyyuvvrsXTUIEFkgh|xytpq\204\200\201xtu"
+  "a]^XTUWSTPLMRNOWSTUQR\210SOP\1OKJ\202MIH\"RNMXTUZVWVRSQMNLGKOJNSNRXS"
+  "W[V\\_Z`c^de`flelpip}v~\220\211\221\234\224\237\226\216\231\205}\212"
+  "vn{wl|shypdxqeyrf|pdzocyqc|ue\202ve\205wf\206xg\211{g\212\202|h\215\5"
+  "}h\217ze\214|g\220\177h\222\200i\225\202\177h\224\2\200i\225\202k\231"
+  "\202\207m\234\202\210n\235\2\211o\236\212p\237\202\213q\240\3\215s\242"
+  "\220v\245\223y\250\204\225{\2523\224}\251\224\177\250\232\205\254\234"
+  "\207\256\260\233\302\241\214\263\226\201\250\221z\244\214u\237\212p\235"
+  "\211o\234\212p\235\215s\240\214p\240\207k\233\205i\231\207k\233\205k"
+  "\232\201j\230\200i\225\200i\223\200j\221\201k\221\205q\226\214x\233\237"
+  "\216\256\234\213\253\221\200\240\202q\221|m\214~o\216zk\212qb\177\215"
+  "}\230\220\200\232\230\212\243\231\213\244wi\202aSjyk\202\214\177\223"
+  "\222\205\227\232\215\236\230\215\235\222\207\225\217\204\222\211\177"
+  "\212\177u\200xp{\210\201\211\211\204\213\202\215\210\217\24}x~mhnojp"
+  "|w{{vzwrvYUVJFGmij~z{uqp\202~}xtua]^XTUWSTPLMRNOWSTUQR\210SOP\1OKL\202"
+  "MIJ\11RNOYUV[WXVRSPLMKGHMIJPLMTPQ\204VRS\3TPQUQRWST\203YUV\3WSTVRSUQ"
+  "R\202TPQ\202SOP\203RNO\210SOP\2NJKRNO\202VRS\1TPQ\202RNO\2TPQWST\202"
+  "VRS\2TPQSOP\203RNO\3UQRZVWa]^\202d`a\25b^_a]^`\\]\201}~okleabiefhde`"
+  "\\]]YZc_`eabnjkUQRSOPwst\200|}vrs{wxtpq`\\]\202YUV\4TPQVRSZVWRNO\210"
+  "SOP\2YUTUQP\202RNM\31TPQRNOJFGC\77 at NIMQLPUPVZU[]X_`[bc^ed_fmfnohptmu"
+  "\200y\201\223\213\226\235\225\242\224\211\231\202w\207|q\202vk|rfzqe"
+  "{se~\202rd}\10rd~ve\205xd\207ye\210zf\213{g\214|g\216~h\217\202~g\221"
+  "\2\177h\224\200i\225\202\201j\230\4\203l\232\206l\233\210n\235\207m\234"
+  "\202\206l\233\2\211o\236\215s\242\202\217u\244<\216t\243\220v\245\222"
+  "x\247\224z\251\225{\252\226|\253\227}\254\231\177\254\230\201\253\227"
+  "\202\251\231\210\254\233\211\257\260\236\304\246\221\270\231\204\253"
+  "\217z\243\206q\232\200i\225\206o\233\220v\245\224z\251\221u\245\214p"
+  "\240\213o\240\216r\243\210n\235\206l\233\205k\230\204k\225\202l\223\204"
+  "n\224\212v\233\222~\241\242\216\261\225\201\244\205t\226~m\217|k\215"
+  "zi\213yj\213zk\214xh\205~n\211\202r\215|l\206aQk^Of\177q\210\222\205"
+  "\231\232\215\237\231\214\235\217\202\223\203w\205|q\177xm{zp{\200x\203"
+  "\216\207\217yt{lgn\202pkr\15gbhb]cfaghcgpkoVRSUQRyuv\201}~wsrzvutpq`"
+  "\\]\202YUV\4TPQVRSZVWRNO\210SOP\15YUVUQRQMNRNOUQRRNOJFGA=>LHINJKQMNT"
+  "PQVRS\202WST\202VRS\1WST\202XTU\4WSTTPQRNOPLM\204SOP\204RNO\210SOP\2"
+  "RNOSOP\202TPQ\202SOP$UQRWSTQMNNJKLHIOKLTPQVRSTPQPLMNJKQMNUQRXTUYUVZV"
+  "W\\XY^Z[\\XYVRSUQRYUVXTURNOUQR^Z[XTUfbcB>\77:67WSTa]^plm\202~\177jfg"
+  "[WX\202WST\4QMNSOPTPQIEF\210SOP\14UQPSONQMLRNMRNOQMNMIJIEFWRVYTX[V\\"
+  "]X^\202^Y`\16`[ba\\chaiohpsltumx\202z\207\223\213\230\232\217\237\225"
+  "\212\232\203x\211{o\203th~rf|\202tf\177\10ug\201vg\204yf\206ye\210zf"
+  "\213{g\214|g\216}h\217\202\177h\222\202\203l\230\7\202k\231\203l\232"
+  "\204m\233\205n\234\211o\237\212p\240\217u\244\202\215s\242\6\220v\245"
+  "\224z\251\227}\254\226|\253\225{\252\224z\251\202\225{\252G\227}\254"
+  "\230~\255\231\177\256\232\200\255\230\201\253\226\201\250\231\210\254"
+  "\236\214\262\267\245\313\256\231\300\240\213\262\222}\246\206q\232\214"
+  "u\241\225~\252\235\203\262\233\201\260\225y\251\217s\243\215q\242\214"
+  "p\241\214r\241\212p\237\211o\234\210o\231\206o\231\210r\231\220|\241"
+  "\231\205\250\242\216\261\221}\240\202q\223\200o\223~m\221zi\215zj\217"
+  "\201q\225\204s\223ue\202jZul\\waQleUo\205w\216\224\206\235\227\212\236"
+  "\222\205\227\203v\207tgxlaoi^lkalukvkdlc^e`[bd_fb]d[V][V\\c^dYTXe`d@"
+  "<=956WSTb^_rnm\203\177~jfg[WX\202WST\4QMNSOPTPQIEF\210SOP\2VRSSOP\202"
+  "QMN\5SOPQMNLHIGCDTPQ\204UQR\1TPQ\202SOP\202WST\6VRSUQRSOPQMNNJKMIJ\220"
+  "SOP\4WSTUQRSOPQMN\202PLM\11RNOSOPYUVUQRQMNTPQYUV\\XYXTU\202TPQ\203SO"
+  "P\2UQRWST\202YUV\30LHIVRS_[\\^Z[VRSSOP_[\\mijkghplm;78734YUV]YZc_`b^"
+  "_gcd\\XY[WXZVWUQRZVW^Z[UQR\210SOP\12MIHNJIPLKQMLSOPUQRWSTYUV]X\\^Y]\202"
+  "_Z`\6_Za`[bb]dd_fg`hmfn\202qit\11xm{\206{\211\225\212\232\236\223\243"
+  "\221\206\227\206z\216|p\206wk\203xj\204\202wi\203\11xi\206{g\212{g\214"
+  "|g\216}h\217~i\220\177j\221\200i\223\201j\224\202\204m\231\6\205n\234"
+  "\207p\236\213q\241\214r\242\215r\245\216t\244\203\220y\247\5\221z\250"
+  "\223|\252\225~\254\226\177\255\227\200\256\202\233\204\262\22\234\205"
+  "\261\237\210\264\243\214\270\244\215\271\243\214\270\240\213\264\237"
+  "\215\263\244\224\270\252\230\276\301\257\325\264\242\310\247\225\273"
+  "\236\211\262\225\200\251\242\213\267\250\221\275\251\217\276\236\204"
+  "\263\202\226|\254:\223w\250\215q\242\221w\246\217u\244\216t\241\215t"
+  "\236\212s\235\215w\236\227\201\247\241\213\261\234\210\253\217{\236\202"
+  "q\225\177n\222~l\222{i\217{i\221~m\221n]}ZJgO\77\\ZJe`Pkp`z\223\204\233"
+  "\237\220\247\221\204\230\212}\217{n\177revrftocqj^ji_j[S^d^hmhokfm_Z"
+  "aZU\\d_ermsnimpko:67512XTU^Z[ea`d`_gcd\\XY[WXZVWUQRZVW^Z[UQR\210SOP\6"
+  "MIJNJKOKLQMNSOPUQR\202VRS\3YUVXTUWST\202UQR\202TPQ\6UQRXTUVRSUQRSOPQ"
+  "MN\203PLM\204SOP\204TPQ\210SOP\3UQRTPQRNO\204QMN\6PLMUQRSOPQMNOKLNJK"
+  "\203MIJ\12WSTTPQRNOSOPWSTYUVWSTUQRXTURNO\202LHI\24UQR_[\\a]^^Z[HDEJF"
+  "G\36\32\33=9:\205\201\202\220\214\215\177{|_[\\ief_[\\[WXUQRLHIPLMVR"
+  "SMIJ\210SOP\4TPOUQPVRQTPO\202RNO\27UQRYTX\\W[]X\\^Y__Z`a\\cd_fibjlem"
+  "kdlialkcnogrujx}r\200\214\201\221\232\217\240\236\222\246\222\206\232"
+  "\205y\221~p\211{m\207\202yk\205\24zi\211|h\215|g\216}h\217~i\222\177"
+  "j\223\200k\224\202k\225\202k\227\203l\230\204m\231\207p\236\212s\241"
+  "\220v\246\222x\250\223x\253\223y\251\223|\252\226\177\255\231\202\260"
+  "\202\233\204\262\2\236\207\265\243\214\272\203\250\221\277N\253\224\300"
+  "\261\232\306\267\240\314\271\242\316\266\237\313\263\234\306\263\241"
+  "\307\270\247\313\271\247\315\313\271\337\273\251\317\257\235\303\254"
+  "\227\300\251\224\275\254\225\301\257\230\304\252\220\277\234\202\261"
+  "\231\177\256\240\206\266\237\205\265\226|\253\224z\251\222x\245\221w"
+  "\244\220w\241\215v\240\221{\242\233\205\254\245\217\266\221}\242\212"
+  "v\233\202m\224}k\221\201l\225\201o\227\201l\227~i\220ye\210vc\203xe\205"
+  "\200m\213~k\211\204t\217\227\207\241\223\203\235\222\203\232\206y\215"
+  "rewj]nqdurfti]kbXciald^h_X`[V]`[bgbihcid_ePKOOJN\37\33\34=9:\204\200"
+  "\201\221\215\216\200|{`\\[ief_[\\[WXUQRLHIPLMVRSMIJ\210SOP\1TPQ\202U"
+  "QR\1TPQ\202RNO\15TPQVRSWSTVRSUQRTPQUQRWSTYUV[WXWSTVRSSOP\203QMN\1RNO"
+  "\203SOP\203TPQ\203UQR\210SOP\202PLM\12RNOTPQVRSWSTUQRSOPRNOVRSYUVVRS"
+  "\202RNO#YUV`\\]SOPOKLNJKRNOYUV[WXWSTRNOXTUKGHNJKXTUYUV\\XY]YZRNOPLM\40"
+  "\34\35\"\36\37QMN\220\214\215vrs^Z[SOPd`ahde_[\\LHIGCDSOP\\XYZVWWST\202"
+  "OKL\2GCD^Z[\202MIJ\2PLMTRS\203SQR\12SQTUSVXSWZU[aZa`Y``Yab[cd\\ge]h\202"
+  "g]h\2kalmbp\202odr\24revyl}\204w\211\214\177\221\242\225\251\234\217"
+  "\243\222\204\235\207w\221\200p\213}m\212{k\210{j\214ze\214\177h\222\201"
+  "j\224\200i\225\204m\231\210q\235\206o\233\200i\227\202\212s\241\16\213"
+  "t\242\216w\245\220x\250\222z\252\225}\255\230\200\260\230~\255\240\206"
+  "\263\246\214\271\250\216\273\254\222\277\262\230\305\266\234\311\267"
+  "\235\312\202\254\222\277\2\252\220\275\247\215\272\203\244\212\267\31"
+  "\243\214\266\242\215\264\234\210\255\252\226\273\306\262\327\264\237"
+  "\306\250\223\272\247\222\273\263\236\307\275\246\320\273\244\316\267"
+  "\240\314\262\233\307\255\226\302\246\217\275\240\211\267\234\205\263"
+  "\227\200\254\232\203\255\230\201\253\223|\246\227\200\252\241\212\264"
+  "\243\214\266\236\207\261\202\220y\2433\213t\240\203n\231\202k\227\201"
+  "l\227\200i\227|e\217mW}mW{\177i\215\205o\223\210r\226\204q\221p]{m]z"
+  "\215}\230\202r\214xj\201qdxnasqdupesj_mh^i^Vaf\\gjbme^fd]ed]dZSZXRV("
+  "\"&%\40$PKO\217\213\214yuv`\\]RNOc_`hde_[\\MIJHDETPQ[WXYUVVRSOKLPLMH"
+  "DE_[\\\202MIJ\1NJK\202VRS\202UQR\1TPQ\202SOP\3RNOYUVWST\202UQR\202VR"
+  "S\2TPQRNO\203UQR\5SOPQMNRNOUQRXTU\210SOP\20NJKXTU[WXUQRTPQZVWVRSLHIM"
+  "IJRNOTPQQMNTPQZVWWSTNJK\210SOP\6LHIPLMTPQUQRVRSWST\202YUV!LHIJFGVRSZ"
+  "VWOKLMIJRNONJK[WX734\\XY\200|}\177{|XTUd`ahdeSOPeabqmnkghc_`]YZSOPEA"
+  "BOKLYUVc_`SOP\\XYHDERNO]YZSQR\202RPQ\13SQRTRUVTWYTZ[V\\`Y`_X_`Yac\\d"
+  "h^ij`k\202kal\30laoncqpespeurevviz~q\203\205x\214\221\204\230\236\220"
+  "\247\240\220\252\220\200\233\202r\217\201q\216\177n\216yh\212\201j\224"
+  "\202k\227\201j\226\200i\225\202k\231\207p\236\211r\240\210q\237\202\213"
+  "t\242\16\216w\245\222{\251\226~\256\231\201\261\234\204\264\236\207\265"
+  "\252\220\277\257\225\302\263\231\306\260\226\303\254\222\277\250\216"
+  "\273\241\207\264\233\201\256\202\235\203\260V\232\200\255\225{\250\223"
+  "y\246\225{\250\224z\247\217x\242\216x\237\216z\237\241\215\262\273\247"
+  "\314\247\222\271\234\207\256\232\205\256\244\217\270\241\212\264\242"
+  "\213\265\244\215\271\247\220\274\252\223\277\254\225\301\256\227\305"
+  "\256\227\303\245\216\272\243\214\266\234\205\257\226\177\251\233\204"
+  "\260\244\215\271\245\216\272\236\207\263\222{\247\220y\245\214u\243\210"
+  "q\237\206o\235\203l\232\177h\226zc\217x_\207t[\202za\210\205l\223\243"
+  "\215\263\252\224\270{g\212XEefVsvf\201~p\211zl\203reyobtodtqfti_jbXc"
+  "f\\gh^i]V^^W_b[b\\U\\aZa\77""9=b]a\202}\201\177{|XTUd`afbcTPQfbcplmj"
+  "fgb^_]YZSOPFBCOKLYUVd`aSOP]YZHDEQMN]YZ\203UQR\203TPQ\202SOP\7WSTUQRT"
+  "PQUQRWSTXTUWST\202UQR\202VRS\5UQRRNOQMNSOPUQR\210SOP\17VRSXTUUQRPLMO"
+  "KLSOPUQRRNOUQRWSTVRSRNOPLMRNOTPQ\211SOP\1RNO\202VRS\202QMN\202UQR\5O"
+  "KL_[\\XTUYUVTPQ\202FBC\1NJK\202KGH\27\3\0\0\40\34\35_[\\yuviefnjkNJK"
+  "plmwstsop_[\\RNOUQR[WX]YZWSTOKLIEF<89\\XYVRSPLMC\77@\202QOP\6RPQSQRU"
+  "SVWUX[V\\\\W]\202_X`\4`Xcd\\gj`kmcn\202ncq\3narpctsfw\202rew\22sfxxk"
+  "\177}p\204\203t\213\227\207\241\246\226\261\237\217\254\217\177\234\205"
+  "t\224\177n\220|k\217\200i\223\177h\224\200i\225\202k\227\205n\232\210"
+  "q\235\215v\244\203\222{\251\36\224}\253\230\201\257\236\206\266\245\215"
+  "\275\253\223\303\256\227\305\260\226\305\256\224\301\251\217\274\241"
+  "\207\264\234\202\257\230~\253\224z\247\220v\243\214r\237\217u\242\215"
+  "s\240\211o\234\212p\235\220v\243\217u\242\207p\232}g\216\207s\230\236"
+  "\212\257\263\237\304\234\207\256\221|\243\217z\243\224\177\250\202\224"
+  "}\247\15\226\177\253\230\201\255\235\206\262\242\213\267\246\217\275"
+  "\251\222\276\261\232\306\256\227\301\250\221\273\247\220\272\253\224"
+  "\300\255\226\302\244\215\271\202\230\201\255\33\223|\250\216w\245\214"
+  "u\243\212s\241\204m\233~g\225zc\217qX\202za\211\177f\216\202i\220\223"
+  "}\243\217y\235p\\\177iVv|k\213\214|\231\210x\222xi\200reypcum`qocqwm"
+  "xkalh^ie[f\202YRZ\32\\U]TMTRKR\13\4\13+%)e_cyuvhdenjkMIJplmwstrno`\\"
+  "]RNOUQR\\XY^Z[XTUPLMIEF<89\\XYVRSQMND at A\211TPQ\4SOPRNOTPQWST\202YUV\6"
+  "WSTTPQVRSXTUWSTTPQ\202QMN\1RNO\210SOP\4UQRQMNPLMSOP\202TPQ\12WST\\XY"
+  "UQRTPQUQRVRSRNONJKPLMUQR\210SOP\34PLMWSTVRSOKLUQRa]^`\\]TPQMIJGCDLHI"
+  "SOPVRS_[\\a]^SOP1-.\24\20\21A=>oklxtuTPQZVWYUVMIJZVW_[\\UQR\202JFG\30"
+  "QMNTPQ\\XYfbckghPLMXTUJFGVRS]YZPNOQOPRPQTRSVTWXVY\\W]]X^_X``YaaYdd\\"
+  "gi_jlbm\202ncq\4narpcusfxtg{\202sfz\37vh\177xj\201\200p\212\210x\223"
+  "\232\212\247\250\227\267\241\220\260\214{\235\201p\222\206r\227\200i"
+  "\223\177h\224\203l\230\211r\236\213t\240\211r\236\214u\243\223|\252\224"
+  "}\253\231\202\260\240\211\267\246\217\275\253\223\303\256\226\306\255"
+  "\225\305\253\224\302\241\207\264\234\202\257\224z\247\216t\241\215s\240"
+  "\202\216t\241\2\215s\240\205k\230\202\211o\234U\204j\227\207m\232\215"
+  "s\240\212p\235~g\221xb\211\210t\231\241\215\262\260\234\301\224\177\246"
+  "\213v\235\211t\235\214w\240\217x\242\216w\241\214u\241\213t\240\214u"
+  "\241\217x\244\223|\252\226\177\253\244\215\271\250\221\273\257\230\302"
+  "\267\240\312\274\245\321\270\241\315\251\222\276\233\204\260\231\202"
+  "\256\220y\245\210q\237\206o\235\203l\232~g\225yb\220xa\215\201h\222{"
+  "b\212rY\201}d\214\210r\231nX~VBgjVy\241\220\262\250\227\267\220\200\233"
+  "sc}rd{tg{obtqduk`ncYdi_joepkcnmfnjckYRZ>7>!\32!LFJvpt{wxUQR[WXYUVIEF"
+  "XTU`\\]XTUNJKLHIPLMRNO]YZgcdkghOKLWSTKGHWST_[\\\202SOP\203TPQ\203UQR"
+  "\12SOPRNOQMNRNOUQRWSTVRSUQRRNOUQR\202WST\2UQRSOP\202RNO\210SOP\3RNOL"
+  "HIOKL\202YUV\6PLMNJKUQRPLMMIJQMN\202YUV\2QMNOKL\211SOP\1NJK\202WST-O"
+  "KLVRSc_`]YZJFG[WX`\\]mijnjkb^_\\XYPLM:67\13\7\10""623mij}yz|xy:67401"
+  "[WXNJKIEF956$\40!\36\32\33""0,-QMNiefZVWTPQOKL@<=\\XYUQRYUVWSTQOPRPQ"
+  "SQTUSVYTX[VZ]X^^Y_\202aZb\3dZef\\gi^l\202k`n\4k`pnaspcwtg{\203ug~\15"
+  "xh\202yi\204\201q\216\177n\216\213z\232\237\216\260\250\224\267\234\210"
+  "\255\216z\237\212u\234\207p\232\205n\232\211r\236\202\217x\244\15\215"
+  "v\242\220y\245\226\177\253\232\203\261\243\214\272\255\226\304\260\231"
+  "\307\256\227\305\250\221\277\236\207\265\225~\254\220v\243\216t\241\202"
+  "\214r\237\\\213q\236\210n\233\204j\227\201g\224\202h\225\206l\231\204"
+  "j\227\200f\223\177e\222\200f\223y_\214kT~wa\210\210t\231\237\213\260"
+  "\252\226\273\214w\236\206q\230\206q\232\211t\235\204m\227\203l\226\203"
+  "l\230\202k\227\203l\230\207p\234\214u\243\221z\246\216w\243\226\177\251"
+  "\244\215\267\262\233\305\270\241\315\265\236\312\257\230\304\252\223"
+  "\277\230\201\255\216w\243\204m\233~g\225{d\222zc\221yb\220zc\217\205"
+  "l\226\210o\231\205n\230\230\201\253\236\207\261xb\211gRy\203o\224\243"
+  "\217\262\256\233\273\227\207\244yi\204vf\200vg~pbytg{odtpes|q\177\200"
+  "v\201tjuoepf_gUNV\35\26\35B;Btnr\202|\200\201{\177>8<512[WXLHIHDE:67"
+  "&\"#\37\33\34""1-.PLMhdeZVWSOPNJK\77;<[WXUQRZVWYUV\206TPQ\202UQR\4SO"
+  "PRNOPLMQMN\202SOP\1RNO\202PLM\7SOPVRSWSTUQRTPQSOPTPQ\210SOP\3VRSOKLP"
+  "LM\202XTU\4NJKLHISOPVRS\202RNO\5VRSXTUUQRTPQUQR\210SOP.RNOYUVWSTNJKO"
+  "KLRNOEAB/+,<89FBCRNOFBC2./734GCDHDEd`a\217\213\214\240\234\235\221\215"
+  "\216\234\230\231VRS1-.EABNJKZVWd`ab^_UQRHDEB>\77A=>=9:\26\22\23\7\3\4"
+  "\36\32\33jfgqmn^Z[B>\77SQRTRSUSVWUX[VZ\\W[\202^Y_\5c\\db[ce[fg]hi^l\202"
+  "k`n#k`ppcwrd{tf}ug\200vh\201vh\202yi\206zj\207|k\213\200o\221\204s\225"
+  "\214{\237\235\211\256\247\223\270\236\212\257\216y\240\213t\236\212s"
+  "\237\214u\241\220y\245\224}\251\230\201\255\236\207\263\244\215\271\253"
+  "\224\302\260\231\307\257\230\306\245\216\274\233\204\262\225~\254\221"
+  "z\250\214u\243\212p\235\207m\232\202\205k\230\5\204j\227\201g\224\177"
+  "e\222\200f\223\201g\224\202\202h\225\15\200f\223\177e\222~d\221x^\213"
+  "oX\202|g\216\212v\233\235\211\256\246\222\267\212u\234\205p\227\207r"
+  "\233\212u\236\202\204m\227\12\203l\230\201j\226\200i\225\201j\226\205"
+  "n\234\210q\235\207p\234\213t\236\225~\250\236\207\261\202\241\212\266"
+  "\10\246\217\273\255\226\302\240\211\265\234\205\261\223|\252\212s\241"
+  "\207p\236\211r\240\202\213t\242&\207m\232\245\214\266\251\222\274\241"
+  "\212\264\213t\236mV\200s^\207\221|\243wc\210}i\214o^~cSpm]xwg\201tf\177"
+  "se|f[lf[ki^n^SaJ\77MJ at KRJUPIQvow\232\223\232\244\235\244\225\217\223"
+  "\242\234\240\\VZ2./EABRNO[WXc_`_[\\RNOGCD\202C\77@\10;78\25\21\22\5\1"
+  "\2\34\30\31iefplm^Z[B>\77\203UQR\203TPQ\202SOP\12TPQRNOPLMQMNRNOSOPQ"
+  "MNOKLRNOTPQ\202VRS\1TPQ\202SOP\1UQR\210SOP\20TPQQMNRNOXTU[WX\\XY_[\\"
+  "eabVRSZVWYUVSOPPLMTPQXTUYUV\210SOP\1RNO\202UQR\202RNO\30OKLD at A845`\\"
+  "]YUVLHI/+,\23\17\20\27\23\24\"\36\37\35\31\32<89fbc{wx^Z[c_`SOPnjk\225"
+  "\221\222\205\201\202\201}~yuvkgh]YZ\202SOP\21WST.*+,()D at A\\XY\200|}d"
+  "`a`\\]iefVTUWUVXVYYWZ\\W]]X^^W__X`\202c[f\7f[ii^llaqodtqduqdvvg~\202"
+  "vf\200\1vf\201\202vf\203\34wf\206xg\211{g\212\202n\223\204p\225\204o"
+  "\226\220{\242\241\214\263\244\217\266\232\205\254\220y\243\222{\245\222"
+  "{\247\224}\251\231\202\256\237\210\264\243\214\270\244\215\271\242\213"
+  "\267\247\220\274\243\214\272\225~\254\211r\240\207p\236\211r\240\212"
+  "s\241\204m\231\201j\226\202~g\2230}f\222|e\221\200i\225\204m\231\201"
+  "j\226\177h\224\200i\225\204m\231\205n\232\203l\230\202k\227\204m\227"
+  "\207r\231\220|\241\236\212\257\247\223\270\214w\236\206q\230\206q\232"
+  "\211t\235\210q\233\211r\234\207p\234\203l\230\177h\224|e\221}f\224\177"
+  "h\224\207p\234\210q\233\216w\241\225~\250\224}\251\221z\246\226\177\253"
+  "\237\210\264\246\217\273\253\224\300\250\221\277\236\207\265\233\204"
+  "\262\237\210\266\240\211\267\234\205\263\236\207\263\255\226\302\223"
+  "|\250r[\207\202_Ht\7v_\213\200i\223hSzgSxeQtgTtrb\177\202}m\210\"vh\201"
+  "{o\203peveZkQFV;0@<1\77C9D<2;JCKoho\201z\201f_fmgkZTXqko\227\221\225"
+  "\211\205\206\203\177\200yuvjfg[WXQMNRNOWST+'()%&B>\77ZVW~z{c_`_[\\hd"
+  "eWST\202VRS\3UQRTPQSOP\202RNO\10SOPRNOQMNRNOTPQVRSUQRSOP\203XTU\4UQR"
+  "QMNPLMQMN\211SOP\2NJKUQR\202[WX\14ZVWXTUQMNIEF401PLMa]^XTUMIJRNOXTUU"
+  "QR\211SOP'OKLQMNWSTYUVUQRTPQXTUOKLMIJVRSd`axtu\221\215\216\217\213\214"
+  "rno\203\177\200\200|}tpq845$\40!3/0rno\214\210\211uqroklhdea]^ZVWVRS"
+  "ZVW`\\]b^_c_`\201}~\223\217\220\234\230\231a]^NJKXTU\202XVW\2YWZZX[\202"
+  "]X^\202^W_\202c[f\31g\\jj_modtrgwuhzvi}zj\204yi\204wg\202ue\202tc\203"
+  "tc\205ud\206ve\211|g\216\177j\221\202m\224\205p\227\213v\235\225\200"
+  "\247\240\213\262\250\223\272\233\204\256\236\207\261\236\207\263\202"
+  "\233\204\260\24\235\206\262\231\202\256\222{\247}f\222\215v\242\227\200"
+  "\256\223|\252\212s\241\204m\233\200i\227|e\223~g\223\177h\224\204m\231"
+  "\210q\235\207p\234\201j\226\177h\224\202k\227\207p\234\202\202k\227\202"
+  "\206o\233\\\203l\230\206o\233\215v\240\221|\243\225\201\246\240\214\261"
+  "\250\224\271\214w\236\204o\226\201l\225\203n\227\200i\223\202k\225\204"
+  "m\231\203l\230\200i\225\177h\224\201j\230\204m\231\177h\224\202k\225"
+  "\215v\240\231\202\254\231\202\256\221z\246\220y\245\226\177\253\241\212"
+  "\266\255\226\302\257\230\306\246\217\275\242\213\271\247\220\276\246"
+  "\217\275\236\207\265\230\201\255\232\203\257xa\215\\EqZCoxa\215\245\216"
+  "\272\260\231\305\252\225\276\260\233\302\267\243\310\257\233\276\227"
+  "\206\246\206v\223|l\211sc}pcwi^opev}r\203\210}\216\230\215\235\227\214"
+  "\232\203y\204\217\207\222\212\203\213\177x\200F\77F2+2<6:wqu\221\213"
+  "\217sopplmkgheab]YZWSTVRSZVW]YZ_[\\~z{\221\215\216\233\227\230`\\]LH"
+  "IVRSXTUWSTVRSUQRSOPRNOQMNPLMSOP\202QMN\2SOPWST\202YUV\11XTU]YZ\\XYYU"
+  "VUQROKLMIJNJKPLM\210SOP\20PLM_[\\fbc]YZMIJ:67\35\31\32\3\0\0\7\3\4>:"
+  ";fbca]^QMNRNOTPQMIJ\210SOP\3[WXQMNOKL\202VRS\14NJKSOPa]^TPQSOPRNOTPQ"
+  "XTU_[\\fbcjfgplm\202rno\31YUVA=>[WXwstlhi_[\\\\XYZVWXTUQMNMIJ[WXnjkd"
+  "`alhi~z{\205\201\202vrseab\\XYXTU^Z[YUVVQUUPT\202SNT\25[T\\c\\daWbj_"
+  "mrgwqfvpcurewtg{ug~sc~vf\203{k\210\203r\222\207s\226}i\216va\210|g\216"
+  "\204o\230~i\222\203l\226\202\210q\233\24\216w\241\233\204\256\242\213"
+  "\265\253\224\276\241\212\264\243\214\266\230\201\253\256\227\301\220"
+  "y\243\217x\244\230\201\255\245\216\272\265\236\312\250\221\275\206o\233"
+  "zc\221\205n\234\210q\237\201j\230\201j\226\202\202k\225\5\224}\247\217"
+  "x\242\214u\237\201j\224\206o\231\205\207p\232\202\210q\233\25\207p\232"
+  "\213v\235\221}\242\246\222\267\230\204\251\216y\240\206q\230\207r\233"
+  "\205p\231\202k\225\200i\223}f\222|e\221~g\223\202k\227\207p\236\212s"
+  "\237\202k\227\222{\245\235\206\260\217x\242\202\210q\235\11\201j\226"
+  "\206o\233\223|\250\230\201\255\242\213\271\257\230\306\265\236\314\260"
+  "\231\307\245\216\274\202\236\207\265^\217x\246\220y\247qZ\210w`\216\231"
+  "\202\260\254\225\301\250\221\275\226\177\251\220z\241\207s\230\177k\216"
+  "zf\211xe\205wd\202td\177rd{qdxpcwpcurgxvk{xm}yn|}s~\177u~~w\177c\\cK"
+  "DKc\\c~x|rlp_[\\[WXZVWWSTOKLJFGTPQeab\\XY_[\\sop\177{|mij]YZYUVUQR\\"
+  "XYSOPLHIKGHHDEFBCMIJYUVGCDUQR^Z[YUVUQRWSTXTUVRSTPQXTUYUVa]^hdeZVWLHI"
+  "RNOZVWOKLSOPYUVRNOPLMRNOMIJ_[\\QMN_[\\D at ARNO\3\0\0\31\25\26UQRyuv\236"
+  "\232\233\216\212\213UQREABYUV_[\\\202SOP\202RNO\202QMN\202RNO\2SOPTP"
+  "Q\203UQR\203TPQ\1UQR\202SOP\202RNO\15SOPTPQUQRVRSXTU^Z[]YZHDE;78VRS{"
+  "wx\211\205\206_[\\\202ZVW\7]YZZVWWST_[\\lhi|xyzvw\202\177{|Sqmneab`\\"
+  "]\\XY[WXYUVYTX\\W[_Z`a\\be^fialk`nlaok`pj_onassfxtg{rd{o_zzj\207}l\214"
+  "xg\211ua\206q\\\203t_\210\177j\223\202m\230}h\223\204m\231\213t\240\210"
+  "q\233\214u\237\234\205\257\250\221\273\256\227\301\257\230\302\254\225"
+  "\277\253\224\276\233\204\256\214u\237\237\210\264\255\226\302\262\233"
+  "\307\243\214\270\215v\242\200i\225\177h\226}f\224{d\222}f\222\205n\230"
+  "\204m\227\210q\233\221z\244\233\204\256\221z\244\210q\233\211r\234\215"
+  "v\240\213t\236\210q\233\207p\232\210q\233\212s\235\213t\236\212t\233"
+  "\214w\236\220|\241\243\217\264\225\201\246\216y\240\211t\233\215x\241"
+  "\213v\237\213t\236\210q\233\204m\231\203l\230\204m\231\207p\234\211r"
+  "\240\202\211r\236\7\213t\236\212s\235~g\221\177h\224\204m\231{d\220|"
+  "e\221\202\215v\242C\222{\251\240\211\267\263\234\312\274\245\323\263"
+  "\234\312\245\216\274\244\215\273\224}\253\217x\246|e\223\207p\236\234"
+  "\205\263\243\214\270\217x\244\204m\231\202k\225\177j\221~j\217|h\213"
+  "zf\211xe\205vc\177sc}qczoaxobvnbvnctmbslaqmbppfqjckTMUHAH`Y`\177y}\207"
+  "\201\205_[\\YUVXTU\\XYYUVRNOUQR_[\\hdec_`oklxtujfg]YZXTUPLMVRSPLMOKL"
+  "UQRWSTSOPQMNTPQYUVWSTPLMKGHOKL\202WST\15PLMHDE]YZ^Z[OKLHDEFBCIEFUQRX"
+  "TUSOPZVW[WX\202NJK\23]YZd`aJFGd`a]YZ@<=!\35\36($%gcd~z{\240\234\235\206"
+  "\202\203b^_RNOSOPNJKIEFNJKVRS\202UQR\202TPQ\202UQR\13VRS[WXWSTRNOOKL"
+  "PLMRNOTPQUQRRNOSOP\202TPQ\25RNOPLMMIJKGHQMN[WXXTUPLMQMNPLMSOP^Z[\\XY"
+  "UQRVRS\\XY[WXUQRWST`\\]\203\177\200\202~z{\27{wxokleab_[\\YUVZVWXTUY"
+  "TX_Z^f_fhahhaih`kj_mlaqnaspcutg{xk\177yk\202wi\202~n\213~k\213\202\200"
+  "l\217&mX\177S>gZCmzc\217\217x\246\177h\226}f\224\210q\235\220w\241\223"
+  "z\244\230\177\247\232\201\251\250\221\273\273\244\316\274\245\317\273"
+  "\244\316\201j\224\200i\223\242\213\265\273\244\316\246\217\273\213t\240"
+  "xa\215|e\221\201j\226}f\222{d\220\202k\227\206o\231\205n\230\212s\235"
+  "\214u\237\244\215\267\226\177\251\217x\242\213t\236\222{\245\216w\241"
+  "\202\211r\234\16\214u\237\220y\243\222{\245\222|\243\222}\244\222~\243"
+  "\242\216\263\223\177\244\216y\240\214w\236\217z\243\216y\242\214u\237"
+  "\213t\236\202\212s\237\5\211r\236\206o\233\200i\227|e\221\205n\232\202"
+  "\206o\231.{d\216{d\220~g\223xa\215~g\223\211r\236\212s\237\215v\244\227"
+  "\200\256\250\221\277\265\236\314\262\233\311\247\220\276\232\203\257"
+  "\222{\247\211r\240\177h\226\211r\240\223|\252\243\214\272\225~\252{d"
+  "\220{d\216|f\215}g\215}g\213|f\212ze\206wd\202ue\200se|qczpcwnauk^pg"
+  "\\mdYif[indoj`ibXabX`^T\\[T[a[_^Z[\202VRS\7]YZ[WXQMNLHIOKLoklb^_\202"
+  "a]^\10UQRPLMQMNKGHIEFFBCHDEQMN\202XTU\202VRS\1SOP\202TPQ%UQRZVW^Z[ZV"
+  "WSOP[WXYUV\\XY^Z[@<=\17\13\14\27\23\24NJKiefOKLEABLHIRNOXTUVRSIEFPLM"
+  "`\\]VRSeab\16\12\13&\"#zvw\264\260\261\224\220\221b^_B>\77PLM[WXOKLI"
+  "EFVRS\202SOP\1RNO\202QMN\1RNO\202SOP\10^Z[VRSMIJKGHPLMWSTZVW[WX\202S"
+  "OP\204UQR\4SOPRNOXTUMIJ\202401\5QMN[WX_[\\wsteab\202^Z[\14c_`]YZSOPT"
+  "PQ_[\\hdeqmn\202~\177\213\207\210\204\200\201zvwsop\202kgh\1hde\202f"
+  "ae\2ibiibj\202ial)k`ppeuwj|xk}xk\177zm\201~p\207\202r\214zg\205ub\202"
+  "wc\206|h\215p[\202]Hqr[\207\237\210\264\225~\254\214u\243\216w\245\225"
+  "~\252\224z\247\223z\244\233\202\252\244\213\263\263\234\306\266\237\311"
+  "\260\231\303\251\222\274\202k\225\217x\242\223|\246\240\211\263\217x"
+  "\244\203l\230}f\222~g\223\200i\225\203l\230\206o\233\207p\234\207p\232"
+  "\202\212s\2358\215v\240\246\217\271\241\212\264\225~\250\217x\242\222"
+  "{\245\215v\240\212s\235\214u\237\222{\245\230\201\253\231\202\254\230"
+  "\202\251\230\203\252\226\202\247\244\220\265\225\201\246\220{\242\215"
+  "x\237\217z\243\213v\237\212s\235\217x\242\225~\252\230\201\255\225~\252"
+  "\216w\243\206o\235\202k\227\206o\233\220y\243\230\201\253\213t\236~g"
+  "\223v_\213qZ\206}f\222zc\217\205n\232\222{\251\233\204\262\241\212\270"
+  "\247\220\276\257\230\306\266\237\315\245\216\272\232\203\257\202k\231"
+  "v_\215\177h\226\202k\231\231\202\260\220y\245\202k\227\200i\223~h\217"
+  "\202|f\214%|f\212{f\207yf\204xh\203ug\200tf\177rd{qczobvk_si^ok`pdYg"
+  "LBMJ at IaW`g]ejcj\204~\202kfjb^__[\\c_`^Z[QMNLHIRNO]YZZVWd`agcdZVWVRSZ"
+  "VWVRSWSTTPQ\202RNO\25TPQUQRXTU[WXNJKWST`\\]a]^^Z[]YZa]^eabUQRJFGMIJY"
+  "UVC\77@\34\30\31""845\206\202\203lhi\202^Z[\27`\\]XTUWSTZVWVRSoklIEF"
+  "623WST/+,JFG^Z[\225\221\222jfgVRSNJKSOPTPQUQRYUVXTUTPQSOP\204RNO\13S"
+  "OPTPQXTUPLMIEFKGHUQR_[\\b^_a]^TPQ\202SOP\12RNOSOPTPQVRSWSTLHIKGH@<=J"
+  "FGb^_\202`\\]\177yuv^Z[VRSSOPTPQLHIB>\77KGH\\XYa]^njk\204\200\201\215"
+  "\211\212\210\204\205\211\205\206\221\215\216\224\220\221\206\201\205"
+  "\203~\202~y}vquqjqpiqsitukvujzwl|yl~yl\200vh\177rd{rb|sc~|i\207\204q"
+  "\221}g\213kU{fPwr[\205\213t\240\243\214\272\236\204\264\220v\246\214"
+  "r\241\222x\245\226|\251\235\204\256\247\216\266\254\223\273\260\231\303"
+  "\253\224\276\251\222\274\215v\240\206o\231\222{\245\200i\223\220y\243"
+  "\221z\246\210q\235\205n\232\203l\230\177h\224\206o\233\213t\240\205n"
+  "\232\212u\236\220{\244\211t\235\224\177\250\242\215\266\255\230\301\235"
+  "\210\261\225\200\251\217z\243\214w\240\213v\237\217z\243\225\200\251"
+  "\231\204\255\230\203\254\225\200\247\226\201\250\225\201\246\244\220"
+  "\265\227\203\250\224\177\246\222}\244\223~\247\216y\242\223|\246\233"
+  "\204\256\243\214\270\245\216\272\241\212\266\234\205\261\234\205\263"
+  "\235\206\262\250\221\275\242\213\265\226\177\251}f\220t]\211xa\215{d"
+  "\220\212s\237\205n\232\217x\244\234\205\263\241\212\270\227\200\256\220"
+  "y\247\230\201\257\250\221\277\263\234\310\245\216\272\212s\237\205n\232"
+  "\233\204\260\234\205\261\244\215\271\220y\245\205n\232\202k\225\177i"
+  "\220}g\215\177f\215~f\212\24~f\210{f\205xh\203ug\201se\177rd}qczqdxp"
+  "cwobtg\\leZhXNY]S\\qgplbkj`h\202|\200gbf[WX\202TPQ\24LHIA=>FBCUQRVRS"
+  "a]^tpqvrsd`aa]^lhinjkjfglhijfgc_`[WXXTUZVW\\XY\202`\\]\3_[\\[WXVRS\202"
+  "QMN\16TPQXTUgcdVRS3/0*&'\77;<fbc\212\206\207{wx_[\\RNOWST[WX\202b^_\21"
+  "VRSKGHNJKSOP\37\33\34($%c_`PLMnjkokla]^]YZWSTLHISOPZVWMIJ\202YUV\1XT"
+  "U\202WST\1XTU\202YUV\32PLMKGHHDEMIJWST^Z[]YZYUVUQRSOPQMNOKLNJKOKLPLM"
+  "QMNIEF_[\\tpq|xynjkLHI>:;JFGc_`SOP\202JFGEFBCB>\77PLMfbc\177{|yuvplm"
+  "`\\]VRShde\212\206\207\240\234\235\211\204\210\212\205\211\207\202\206"
+  "\177z~yrzwpxyozzp{vk{ujzwj~yl\200tf}fXoWGaN>YkXvr_\177oY\177fPvjS}v_"
+  "\213\201j\230\212s\241\241\207\267\225{\253\217u\244\217u\242\223y\246"
+  "\240\207\261\255\224\274\260\227\277\242\213\265\227\200\252\224}\247"
+  "t]\207\210q\233\222{\245\202k\225\216w\241\242\213\267\207p\234\177h"
+  "\224\205n\232\204m\231\207p\234\215v\242\211r\236\214w\240\220{\244\213"
+  "v\237\226\201\252\231\204\255\257\232\303\245\220\271\231\204\255\221"
+  "|\245\202\220{\244\11\222}\246\226\201\252\227\202\253\224\177\250\221"
+  "|\243\217z\241\220|\241\243\217\264\231\205\252\202\230\203\252\6\233"
+  "\206\257\230\203\254\241\212\264\243\214\266\243\214\270\236\207\263"
+  "\202\230\201\255\32\236\207\265\245\216\272\234\205\261\225~\250\215"
+  "v\240\204m\227\220y\245\233\204\260\215v\242\205n\232\203l\230\205n\232"
+  "\210q\237\212s\241\205n\234\203l\232\214u\243\230\201\257\236\207\263"
+  "\243\214\270\242\213\267\244\215\271\270\241\315\260\231\305\247\220"
+  "\274\223|\250\202\200i\223X\177i\220\177i\217\201h\217\200h\214~f\210"
+  "{f\207xh\205ug\201rd~pb|pb{oaxnaum`rf[ltiw\202w\205\212\200\213\200v"
+  "\177`V_LBJPJNkeiYUVLHIIEFD at A@<=NJKc_`wstqmniefQMN845B>\77a]^qmnNJKWS"
+  "T^Z[_[\\^Z[`\\]_[\\]YZa]^ZVWWSTZVWVRSC\77@)%&\30\24\25;78HDE<89+'(40"
+  "1FBCSOP]YZ\204\200\201fbcSOPMIJHDENJKVRSSOPA=>RNOYUV\5\1\2*&'`\\]RNO"
+  "a]^\216\212\213^Z[OKLWSTPLMRNOZVWPLMWSTVRS\204UQR\3VRSWSTMIJ\202KGH\1"
+  "OKL\202TPQ\2OKLJFG\204UQR\4TPQSOPQMNPLM\202]YZ\10d`a\\XYC\77@;78MIJ\\"
+  "XYyuv\\XY\202GCD\20KGHMIJZVWlhitpqfbcSOP\77;<845OKLqmn\203\177\200rm"
+  "qytx\177y}\201{\177\202\202{\203\2\200v\201{q|\202rgw!reynaucUlVHaRB"
+  "\\RB]S@^VAb]GmpZ\200\205n\230\213t\240\213t\242\222z\252\215s\243\226"
+  "|\254\236\204\263\230~\253\220v\243\231\200\252\251\220\270\256\225\274"
+  "\226\200\247\177i\220jS}mV\200\223|\246\244\215\267\241\212\264\215v"
+  "\240\246\217\271\206o\231}f\222\202\207p\234\6\212s\237\221z\246\215"
+  "v\242\215x\241\213v\237\220{\244\202\223~\247\3\250\223\274\255\230\301"
+  "\232\205\256\202\225\200\251\2\226\201\252\227\202\253\202\230\203\254"
+  "\40\225\200\251\223~\245\221|\243\222~\243\246\222\267\233\207\254\232"
+  "\205\254\233\206\255\237\212\263\235\210\261\245\216\270\241\212\264"
+  "\233\204\260\224}\251\220y\245\224}\251\233\204\262\242\213\267\251\222"
+  "\276\240\211\263\213t\236qZ\204xa\215\221z\246\226\177\253\232\203\257"
+  "\233\204\260\224}\251\200i\227kT\202bKyfO}\202kT\202\13\214u\241\241"
+  "\212\264\265\236\312\254\225\301\261\232\306\242\213\267\217x\244\206"
+  "o\233\207p\232\205n\230\203j\222\202\201h\217,\200h\214\177g\211|g\210"
+  "zj\207wh\205vh\202ug\201tf\177se|pcwnasshypestiwndoYOXRHQ_U]hbf\201{"
+  "\177c_`LHIIEFJFGKGHXTUkghsopa]^LHI1-.\40\34\35""3/0RNO\\XY/+,512;78C"
+  "\77 at RNO`\\]a]^YUVPLM\202NJK\5MIJ@<=+'(\34\30\31\30\24\25\202\26\22\23"
+  "\40\36\32\33>:;`\\]a]^ZVWb^_XTU_[\\iefUQR)%&\36\32\33\77;<]YZYUV956\34"
+  "\30\31\36\32\33\\XYuqrwst]YZ\221\215\216VRSHDEWSTPLMSOP^Z[TPQPLMOKL\204"
+  "NJK\3OKLPLMMIJ\202NJK\10PLMQMNOKLJFGGCDUQRXTU\\XY\202_[\\S]YZZVWWSTg"
+  "cdQMNLHIEAB3/0;78MIJHDEhdeA=>!\35\36\40\34\35*&'/+,734C\77@;78<89D at A"
+  "LHITPQc^bmhlkfj^Y]jeiysw\205~\205\216\207\217\220\211\221\212\200\213"
+  "\200u\203wl|tizk^rXK_E7NF8QbRl~n\211\203p\220\210r\230\203m\224\200j"
+  "\221\215v\240\225~\252\216w\245\204l\234}c\223tZ\211pV\205|b\217\225"
+  "{\250\251\220\272\234\203\253|c\213qZ\204xa\213pY\203\210q\233\216w\243"
+  "\226\177\251\274\245\317\254\225\277\241\212\264\213t\236\211r\236\214"
+  "u\241\205n\232\212s\235\221z\246\210q\233\222}\246\211t\235\230\203\254"
+  "\221|\243\224\177\246\244\217\266\266\241\310\235\210\257\202\231\204"
+  "\253\32\232\205\254\233\206\255\234\207\256\233\206\257\232\205\256\232"
+  "\205\254\230\204\251\231\205\252\253\227\274\236\212\257\232\205\254"
+  "\231\204\253\235\210\257\234\207\256\240\213\264\233\206\257\227\200"
+  "\252\225\200\251\232\203\255\240\213\264\251\222\276\254\227\300\235"
+  "\207\256\255\230\277\256\230\277\212t\233\202s\\\206\10pY\203v_\211\200"
+  "i\223}f\222iR~O8fP9gmV\204\202\200i\227\21\223|\252\243\214\272\271\242"
+  "\320\251\222\300\263\234\312\257\230\306\233\204\262\226\177\255\226"
+  "\177\253\217x\244\210o\231\201h\220~e\214~f\210\177g\207\177j\211~k\211"
+  "\202|l\207\202}m\210\77zl\205vh\177sfz{n\200i^ni^laWbI\77HLBJ]TYXRVq"
+  "kmJFG+'('#$,().*+623C\77@:67845@<=FBCJFGXTU[WXKGH:67401-)*1-.FBC[WX\\"
+  "XYPLMNJKMIJD at A+'(\17\13\14\14\10\11""1-.[WXd`ahdeYUVQMNfbcrno`\\]KGH"
+  "2./\23\17\20\7\3\4\24\20\21#\37\40-)*%!\"\17\13\14\30\24\25-)**&'`\\"
+  "]\202_[\\\12\251\245\246\225\221\222\201}~]YZ[WX]YZHDENJK[WXGCD\202O"
+  "KL\204NJK\202OKL\6NJKOKLQMNRNOQMNPLM\202OKL\26D at Ac_`iefVRSPLMVRSa]^o"
+  "kl[WXHDEEAB.*+$\40!956C\77 at JFGMGK2,0\4\0\0\33\25\27A;=@:<\202PJJ8@:<"
+  "NHJXRVb\\`nhllelngn}v}touvqw\212\205\213\205\200\207\210\203\212\236"
+  "\230\242\226\216\233\206~\213qfvaVgL at TJ>RdVm\204v\215\215\177\230\205"
+  "u\222\217z\241\215v\242\216w\243\220y\245\211r\236\200i\227\204m\233"
+  "\217x\246\223|\252\214u\243\220y\247\243\214\270\264\235\311\262\233"
+  "\307\244\215\267\230\201\255\216t\243\214r\241\215s\242\211o\234\216"
+  "t\243\251\217\274\265\233\310\245\213\270\220y\245\216w\243\213t\236"
+  "\211r\234\212s\235\216x\237\222{\245\225\177\246\202\222|\243\11\224"
+  "\177\246\226\202\247\233\207\254\247\223\270\257\233\300\254\230\275"
+  "\241\215\262\240\214\261\236\215\261\202\237\216\262e\237\215\263\236"
+  "\214\262\235\213\261\225\204\250\243\222\266\246\225\271\233\212\256"
+  "\236\215\261\241\220\264\231\210\254\234\213\257\233\211\257\235\214"
+  "\260\236\212\257\236\215\261\242\216\263\257\236\302\304\260\325\267"
+  "\246\312\264\240\303\270\247\307\252\226\271\216z\235\206r\227\220|\241"
+  "\206q\230mX\177ePw_JsfO{yb\216\210q\237\213t\242\215v\244\224|\254\200"
+  "h\234\214s\252\245\215\301\266\236\320\260\230\312\245\215\275\241\211"
+  "\271\237\207\267\227|\257\221w\247\212p\237\205l\226\200g\216\177g\207"
+  "\203l\210\210q\215t`{\203p\214\206s\217wd\200ub~wg\202xh\203\202t\215"
+  "ug~m`raVfF<G:3:MGKWQSXRRVPR<6:\13\5\7#\35\37C===77NHHSMM>88MGGVPP_YY"
+  "hbda[]_Y]mgk_[\\QMNc_`MIJEABZVWKGHIEF2./\"\36\37\12\6\7\7\3\4""0,-ea"
+  "btpqd`anjkjfg\202kgh\1]YZ\202JFG\202WST\37OKLC\77 at D@AXTUkghjfg]YZZVW"
+  "YUV`\\]^Z[eab\214\210\211\226\222\223oklb^_^Z[WSTPLMMIJOKLTPQXTUOKLR"
+  "NONJKPLMWSTNJKGCDPLM\202YUV\13XTUZVW^Z[_[\\VRSLHIc_`YUVJFGEABD at A\202"
+  "623\23LHIEAB;780,-\27\23\24+'(^Z[njkxtu\240\232\236\212\204\210TNPYS"
+  "Uvprtnpqkk[UUtnprln\202hbf.vov{t{\203|\204\224\215\225\202}\203\200{"
+  "\201\204\177\206\202}\204zt~tnx{s\200\221\211\230\214\201\222\204y\212"
+  "\203w\213\213\177\223\214~\225\207y\220\215\177\230\234\214\251\232\205"
+  "\254\233\204\262\236\207\265\234\205\263\220y\247\205n\234\213t\242\232"
+  "\203\261\235\206\264\240\211\267\251\222\276\264\235\311\270\241\315"
+  "\256\227\303\235\206\262\221z\246\225{\252\221w\247\217u\244\212p\237"
+  "\214r\241\237\205\264\246\214\271\231\177\254\224}\251\222{\247\202\217"
+  "x\242\32\220z\241\221{\242\217y\240\215w\236\235\207\256\241\213\262"
+  "\237\213\260\232\206\253\236\212\255\250\224\267\262\236\301\267\243"
+  "\306\244\220\263\234\210\253\232\211\253\237\216\260\241\220\264\246"
+  "\225\271\247\225\273\241\217\265\233\212\256\247\226\272\254\233\277"
+  "\243\222\266\240\217\263\241\220\264\202\235\214\260a\231\210\254\240"
+  "\217\263\240\217\261\247\226\270\257\236\300\274\253\315\310\267\331"
+  "\276\255\317\273\252\312\266\245\305\245\224\266\221\200\242\220|\241"
+  "\232\205\254\234\207\260\223~\251\225\177\255\214v\245\212t\245\222{"
+  "\257\226\177\265\221z\260\217x\256\222z\264\236\206\304\227\177\275\224"
+  "|\270\225}\267\230\201\271\234\205\275\224}\265\202k\243\177f\237}d\235"
+  "\200h\234\213s\243\223|\250\217y\237\203n\217ze\204\210s\222xe\203u`"
+  "\177q^|gTr[Kf_Oin`w]OfZM_ODT:0;E>Fkeiysw{uw\247\241\245\217\211\215W"
+  "QU^XZ|vxxrrqkk[UUuootnnjddiccsmouoqztx\212\204\210vrslhiokld`aOKL956"
+  "'#$401.*+/+,EABeabjfg_[\\hde\202~\177zvw\201}~\212\206\207\204\200\201"
+  "hdeNJKRNOgcdhde\203jfg\7qmnuqrlhi_[\\njkgcdfbc\202`\\]\25yuv~z{_[\\["
+  "WXZVWYUVXTUUQRPLMKGHGCD[WXc_`]YZWST\\XY[WXYUV`\\]TPQQMN\202MIJ\10SOP"
+  "YUV[WXYUV956JFG=9:\35\31\32\202\17\13\14&\23\17\20\33\27\30\6\2\3""1"
+  "-.MIJEABfbc\222\216\217\225\221\222\242\236\237oimlfjE\77A=79VPRgaco"
+  "iia[[pjlrlnmgkuos\205~\205\203|\203|u}\201z\202jekpkq`[bb]dtlwrjuzr\177"
+  "\220\210\227\232\217\240\233\220\241\240\223\247\245\227\256\202\246"
+  "\230\261+\247\231\262\252\232\267\261\234\303\242\213\267\226\177\253"
+  "\232\203\257\240\211\265\237\210\264\232\203\257\231\202\256\254\225"
+  "\301\266\237\313\276\247\323\273\244\320\257\230\304\236\207\263\216"
+  "w\243\204m\231\221w\246\215s\242\216t\243\220v\245\224z\251\236\204\263"
+  "\240\211\265\227\200\254\234\205\257\227\200\252\221z\244\217x\242\222"
+  "|\243\225\177\246\225\200\247\224\177\246\221|\243\225\200\247\233\207"
+  "\254\250\224\271\257\233\276\246\222\265\251\226\266\277\254\314\253"
+  "\232\272\202\237\216\256\12\243\222\262\236\215\257\240\217\261\244\223"
+  "\267\236\215\261\260\237\303\245\224\270\245\224\266\253\232\274\244"
+  "\223\265\202\232\211\253v\237\216\260\234\213\255\254\233\275\250\227"
+  "\271\245\224\266\255\234\276\303\262\324\350\327\371\374\353\377\373"
+  "\352\377\365\344\377\355\333\377\347\325\375\344\322\374\342\317\374"
+  "\340\314\375\337\313\377\332\305\376\320\273\366\312\264\364\312\264"
+  "\365\310\261\365\300\251\357\273\244\354\274\244\356\270\242\355\266"
+  "\240\351\265\237\347\271\244\351\304\257\362\313\266\367\265\240\341"
+  "\217z\273pZ\233iS\223gQ\217nY\224s^\226kW\212XEsI6clZ\202lZ\200iUzUD"
+  "fA1NA1KH9PD7I7*<NCS]R`]S^xp{\236\226\241\245\235\250\247\240\250vovq"
+  "koICGC=\77]WYlfhpjja[[oiiqkkmggtnn\202|~~xztnpxrtTPQ]YZHDEIEFUQRHDEG"
+  "CDPLMQMNPLMVRSd`asop\201}~\222\216\217\237\233\234\243\237\240\211\205"
+  "\206vrs{wx\203\177\200}yznjkd`a\202~\177\210\204\205\211\205\206\200"
+  "|}uqrief\\XYRNOlhid`afbcjfgmijyuvzvwfbc`\\][WXVRSSOPTPQ\202VRS\23UQR"
+  "A=>B>\77OKLlhivrsYUVJFG\\XYWSTRNOMIJKGHLHIOKLQMNSOPZVW<89\202\17\13\14"
+  "-OKL\213\207\210\226\222\223\215\211\212mijiefTPQOKL\214\210\211\247"
+  "\243\244uqr_[\\RLPKEI5/1B<>ysu\243\235\237\254\246\246\244\236\236\242"
+  "\234\236\245\237\241\241\233\237\237\231\235\235\226\235\205~\205ibj"
+  "c\\dojp\213\206\214fahSNUskv\203{\210\212\202\221\215\205\224\221\206"
+  "\227\231\215\241\251\233\262\273\255\304\306\270\321\302\264\315\256"
+  "\240\271\235\215\252\216z\237\202\212s\235)\222{\245\233\204\260\243"
+  "\214\270\257\230\304\272\243\317\262\233\307\274\245\321\276\247\323"
+  "\261\232\306\237\210\264\222{\247\213t\240\206o\233\212p\237\207m\234"
+  "\212p\237\222x\247\232\200\257\237\205\264\234\205\261\231\202\256\231"
+  "\202\254\226\177\251\223|\246\221z\244\222|\243\225\177\246\225\200\247"
+  "\226\201\250\243\216\265\244\220\265\232\206\253\230\204\247\237\213"
+  "\256\232\207\247\243\220\260\304\261\321\257\236\276\242\221\261\245"
+  "\224\264\252\231\271\202\240\217\261\23\246\225\267\244\223\265\243\222"
+  "\266\251\230\272\256\235\277\257\236\300\255\234\276\265\244\306\267"
+  "\246\310\240\217\261\271\250\312\334\313\355\353\332\374\362\341\377"
+  "\364\343\377\357\336\377\366\345\377\376\355\377\361\340\377\202\357"
+  "\335\377j\360\336\377\353\330\377\340\316\376\327\304\373\324\300\373"
+  "\326\301\377\320\273\377\313\265\376\310\263\377\304\256\377\276\250"
+  "\373\271\243\370\271\242\372\255\231\360\256\232\361\257\234\356\256"
+  "\233\354\265\242\361\303\261\375\300\256\370\253\232\341\255\231\341"
+  "\264\240\350\265\241\350\241\215\322\200m\257fS\223cQ\217jX\222ta\230"
+  "jX\210M:gH8_ra\203\234\216\250\246\230\257\227\212\234\200u\203~s\201"
+  "rhspes\222\212\227\243\233\252\202y\212lds]V^XQXC=ANHL|vx\240\232\234"
+  "\253\245\245\247\241\241\241\233\233\243\235\235\236\230\230\234\226"
+  "\226\231\223\225~xz`Z\\XRTa]^\203\177\200PLM956SOPa]^tpqplmd`aeablhi"
+  "\200|}\227\223\224\236\232\233\212\206\207sop\\XYYUV[WXfbcrno\177{|\223"
+  "\217\220\244\240\241\207\203\204\206\202\203\201}~uqrhde_[\\ZVWXTUc_"
+  "`[WX_[\\mijwstyuvsopjfg\\XYWSTQMNOKLPLM\202QMN\12PLMhde]YZKGHIEFMIJC"
+  "\77 at D@AWSTTPQ\202QMN\202TPQGPLMNJKOKLWST512;78\202~\177\270\264\265\235"
+  "\231\232sopqmnsop\207\203\204\215\211\212\200|}\206\202\203njkEABXTU"
+  "&\40$\32\24\30\36\30\32HBD\215\207\211\251\243\245\214\206\206tnnYSU"
+  "^XZ[UY^X\\hahf_ff_gtmu|w~\222\215\224kcn[S^\177w\204\224\214\231\243"
+  "\230\250\253\240\261\243\227\253\237\223\247\255\237\266\302\264\315"
+  "\303\263\316\255\235\270\241\221\254\246\226\263\234\210\255\227\201"
+  "\250\222|\243\217y\240\214u\237\215v\240\226\177\251\240\211\263\255"
+  "\226\300\262\233\305\260\231\305\243\214\270\230\201\255\225~\252\225"
+  "~\254\224}\253\226|\253\215s\242\207m\234\214r\241\202\222{\247\4\217"
+  "x\244\220y\245\236\207\261\242\213\265\202\246\220\267~\241\214\263\236"
+  "\211\260\235\211\256\236\212\257\225\201\246\252\226\273\254\230\275"
+  "\246\222\265\252\231\273\247\226\266\241\220\260\252\232\267\265\245"
+  "\302\244\224\261\242\223\260\253\234\271\254\235\274\255\236\275\261"
+  "\242\301\260\241\300\256\237\300\261\242\301\263\244\303\271\252\311"
+  "\255\236\275\264\245\304\342\323\362\372\353\377\350\331\370\363\344"
+  "\377\352\333\372\351\332\371\362\343\377\360\341\377\356\337\376\354"
+  "\335\376\362\343\377\362\342\377\357\337\377\352\332\377\345\324\377"
+  "\342\322\377\337\316\377\334\311\377\320\274\377\314\272\377\311\266"
+  "\377\305\261\377\300\253\377\272\245\377\264\236\377\261\235\377\256"
+  "\234\377\252\232\374\250\231\370\245\226\363\244\224\355\260\241\366"
+  "\277\260\377\302\263\377\262\243\364\250\231\352\243\222\342\246\225"
+  "\345\254\233\353\251\230\350\236\215\335\225\203\317r^\243p^\232dQ\211"
+  "\212z\251\272\252\321\244\227\265\204x\220\177t\205\210}\213\222\210"
+  "\223\224\211\227\216\203\221\222\207\230\201u\211`Tj]Qe80;+$+,&*RLP\220"
+  "\212\214\246\240\242\212\204\204wqq[UU^XXZTT\\VVe_aa[]^XZicerno\216\212"
+  "\213WSTFBCkgh\177{|\226\222\223\223\217\220\206\202\203{wx\214\210\211"
+  "\253\247\250\236\232\233kghRNO\\XYc_`b^_`\\]ZVWSOPPLMXTUd`anjkief\202"
+  "d`a\3gcdkghplm\202tpq\11eabYUV^Z[gcdb^_WSTVRSkghlhi\202mij\15jfgc_`["
+  "WXVRSGCDhdemij^Z[b^_d`aMIJ3/0SOP\202NJK\1VRS\202\\XY@^Z[b^_734B>\77Z"
+  "VWxtuuqrPLMOKLuqrSOPXTUeabhdelhiNJK\40\34\35*&'\22\14\20""2,0hbd\207"
+  "\201\203\231\223\225\207\201\203XRRPJJ_Y[b\\^[UYWQUZSZTMTTMUc\\da\\c"
+  "KFM3+6YQ\\\232\222\237\251\241\260\243\230\251\245\231\255\240\224\250"
+  "\232\216\244\227\211\242\226\210\242\224\204\237\223\203\240\234\214"
+  "\251\251\230\270\243\215\261\232\204\252\222|\243\221{\242\225\177\246"
+  "\227\201\250\232\203\255\234\205\257\254\225\277\251\222\274\242\213"
+  "\267\230\201\255\222{\247\221z\246\202\222{\251\14\242\210\267\226|\253"
+  "\206l\233\204j\231\214u\241\216w\243\213t\240\217x\242\231\202\254\235"
+  "\206\260\237\211\260\234\206\255\202\227\202\251!\235\211\256\244\220"
+  "\265\250\224\271\247\223\270\243\217\262\246\222\265\244\223\263\227"
+  "\207\244\233\213\250\263\243\300\307\267\324\262\242\277\242\223\260"
+  "\251\232\267\263\244\301\261\242\301\254\235\274\257\240\277\263\244"
+  "\303\263\244\301\273\254\313\345\326\365\366\347\377\354\335\374\362"
+  "\343\377\354\335\374\356\337\376\363\344\377\352\333\372\354\335\374"
+  "\363\344\377\362\343\377\364\345\377\202\356\337\376\26\357\340\377\352"
+  "\333\374\340\322\366\334\315\370\332\314\375\327\310\377\322\302\377"
+  "\314\273\377\314\274\377\313\271\377\303\263\377\275\254\377\270\246"
+  "\377\263\241\377\257\234\377\246\227\377\241\221\374\244\225\376\252"
+  "\233\377\251\231\373\252\233\370\262\243\376\202\266\250\377\37\262\244"
+  "\373\257\237\367\252\232\362\244\224\355\236\215\351\235\214\352\237"
+  "\217\347\241\216\337\234\213\322}j\254\203t\255\213{\254dX~k^|\220\204"
+  "\234mbsodtwl|yn~yn\177dXlF:PE9M(\40+>7>kdk\211\203\207\235\227\233\213"
+  "\205\207YSUNHH\202c]]\37YSSTNNVPRNHJJDFVPRMIJ401\24\20\21A=>\216\212"
+  "\213\243\237\240\231\225\226\217\213\214\214\210\211\202~\177{wxrno]"
+  "YZIEFOKLb^_OKLIEFHDEQMN^Z[b^_ZVWPLMXTU\202RNO\11[WXgcdmijplmsop\206\202"
+  "\203qmnRNOJFG\202XTU\17NJKRNOc_`a]^[WXTPQNJKPLMWST^Z[d`a_[\\VRSSOPMI"
+  "J\202956USOPjfgZVWOKLSOPZVW]YZb^_jfgwst\210\204\205\203\177\200sopok"
+  "ld`aKGH;78UQRVRS[WX734\21\15\16\10\4\5\27\23\24B>\77.(,mgk\262\254\256"
+  "\244\236\240\202|~iceNHH`ZZICERLNVPTa[_ngnhah_X`d]e^VaB:EJBOyq~\245\232"
+  "\252\242\227\247\201v\207th|wi\200\177q\212\200p\212{k\206\201q\216\216"
+  "}\235\223\202\242\214{\235\240\212\256\247\221\265\254\226\274\246\220"
+  "\266\232\204\252\223}\243\232\204\253\245\217\266\260\231\303\243\214"
+  "\266\224}\251\213t\240\207p\234\205n\232\206o\233\210q\235\232\200\255"
+  "\221w\244~g\223\177h\224\221z\246\227\200\254\223|\246\225~\250\243\214"
+  "\266\245\217\266\243\216\265\237\212\261\202\233\207\254\14\242\216\263"
+  "\250\224\271\250\227\273\237\216\262\243\222\264\256\235\277\242\221"
+  "\261\211y\226\214|\231\245\225\260\313\275\327\276\260\312\202\253\235"
+  "\267\16\264\246\300\255\236\273\253\236\272\277\262\316\260\241\276\353"
+  "\335\367\372\353\377\363\344\377\353\334\371\356\337\374\374\355\377"
+  "\351\332\367\361\342\377\365\346\377\202\361\342\377p\352\333\370\347"
+  "\330\365\361\342\377\356\337\374\360\343\375\357\342\374\355\340\374"
+  "\346\333\373\341\325\373\334\317\373\325\307\372\315\300\370\315\276"
+  "\377\316\301\377\314\276\377\302\265\377\273\255\377\267\250\377\264"
+  "\245\377\257\240\377\254\234\377\240\222\377\237\222\376\242\225\377"
+  "\244\225\374\251\233\375\262\244\377\267\252\377\307\272\377\272\255"
+  "\377\256\240\370\251\232\365\250\231\370\247\227\372\245\224\374\244"
+  "\222\366\237\214\346\247\225\347\232\207\326\241\222\327\236\216\314"
+  "~q\246na\214UJlpf\201nd|lcvSJ[6->+#23(9J\77O at 8Cunu\257\250\257\243\235"
+  "\241\207\201\205oikOIK]WYKEEPJJQKKZTTgac`Z\\SMOUOQOKL+'(3/0eab\225\221"
+  "\222\223\217\220hdeXTUVRSa]^\\XYJFGMIJ^Z[\\XYIEFLHI]YZiefb^_QMNHDEMI"
+  "JWSTTPQMIJKGHSOPYUVZVW]YZb^_uqrgcdFBCA=>^Z[fbc[WX\\XYqmnplmhdeYUV\202"
+  "LHI\17WSTc_`^Z[SOPTPQ\\XYA=>\12\6\7\14\10\11B>\77|xyd`aRNOUQR[WX\202"
+  "ZVWg_[\\plmnjk]YZQMNRNOOKLQMN_[\\XTUKGHQMND at AHDEokl\210\204\205\231\225"
+  "\226XRV\201{\177\240\232\234nhjPJLWQSICCXRRWQSXRTUOS]W[kdkd]dUNVTMUv"
+  "ny\214\204\217\273\263\300\272\262\277\233\220\240\205z\213qeypdzrd}"
+  "se\177wg\202|l\211}l\214~m\217\204s\225\216z\235\224~\242\230\202\246"
+  "\236\210\256\245\217\265\250\222\270\252\224\272\253\225\274\254\226"
+  "\275\260\231\303\235\206\260\211r\236\200i\225~g\223\177h\224\204m\231"
+  "\213t\240\211o\234\206l\231yb\216\177h\224\227\200\254\237\210\262\227"
+  "\200\252\225~\250\222|\243\227\201\250\232\205\254\232\206\253\223\177"
+  "\244\211u\232\200l\221|h\215\226\205\251\240\217\261\244\223\265\226"
+  "\205\245\212z\227\231\211\244\262\242\275\274\256\310\271\253\305\276"
+  "\260\311\263\245\277\260\242\273\267\251\303\260\242\274\275\260\312"
+  "\350\333\365\363\345\377\374\356\377\350\332\364\360\342\374\367\351"
+  "\377\351\333\365\202\363\344\377\4\361\342\377\356\337\374\355\336\373"
+  "\363\344\377\202\356\337\374T\365\346\377\347\332\366\357\342\374\351"
+  "\334\366\342\327\365\341\326\366\336\322\370\330\315\367\324\310\370"
+  "\321\307\374\320\305\377\322\307\377\315\301\377\277\264\377\265\251"
+  "\375\261\245\373\255\240\372\251\233\374\252\232\377\246\225\377\247"
+  "\227\377\250\230\377\245\226\375\251\233\375\261\242\377\261\244\376"
+  "\300\262\377\272\254\377\264\246\376\261\242\375\257\235\377\251\230"
+  "\377\246\223\377\245\222\375\242\221\361\244\224\355\237\215\343\250"
+  "\226\350\237\217\330\233\214\317\237\221\314sg\231h]\207cXzf\\w]Ti\\"
+  "Sdtly\215\205\220\243\234\244d]e\210\201\211\242\233\243qjqTNRYSWICE"
+  "XRTXRRVPPOIIVPPe_a\\VXICEF at Bief{wx\271\265\266\266\262\263\216\212\213"
+  "rnoOKLUQRRNOLHIMIJVRSYUVUQRRNOTPQYUVRNO\202JFG\1SOP\202\\XY'VRSSOPKG"
+  "HGCDKGHMIJOKLYUVeabXTUTPQ<89\77;<fbcqmn^Z[WSTD at APLMWSTKGH1-.\26\22\23"
+  "\7\3\4\3\0\0-)*RNOPLM&\"#\20\14\15$\40!SOP~z{tpq]YZPLMYUVc_`_[\\\202"
+  "YUV\210SOPXTPQRNOVRSeabwst\200|}|xytpq~x|\206\200\204xrtXRTNHJYSUYSS"
+  "HBBUOQXRTPJNYSWngnb[bSLTb[cqgrqftujxtiwpeuuj{zm\201vh\177xh\202wg\202"
+  "vf\203wf\206{g\212~j\217\200l\221\201m\222\207q\227\215w\235\217y\237"
+  "\240\212\260\243\215\263\263\235\303\265\237\306\274\246\315\253\224"
+  "\276\236\207\261\217x\242\205n\230\201j\226\200i\225\203l\230\210q\235"
+  "\203l\230\200i\225_Hr\207p\232\237\210\262\224}\247\252\225\276\226\201"
+  "\250\231\204\253\211t\233|h\215\200l\221\213w\234\226\202\245\234\213"
+  "\255\243\222\264\226\205\247\237\216\260\222\203\244\223\204\243\257"
+  "\240\275\270\252\304\267\251\303\305\267\320\303\265\316\307\273\321"
+  "\254\240\270\272\256\304\265\251\301\364\350\377\365\351\377\361\345"
+  "\375\206\362\346\376\202\361\344\376R\363\346\377\350\333\365\360\343"
+  "\375\365\350\377\352\335\371\366\351\377\352\335\371\347\332\370\354"
+  "\337\375\351\336\376\346\333\375\342\326\374\334\321\371\327\313\371"
+  "\325\311\373\324\311\377\340\325\377\303\270\372\306\273\377\266\253"
+  "\367\267\254\372\254\243\364\253\242\365\262\245\377\256\240\377\255"
+  "\234\377\253\232\377\252\231\377\253\232\377\256\236\377\262\241\377"
+  "\263\245\375\271\252\377\306\267\377\301\262\377\263\243\374\263\237"
+  "\377\255\233\377\251\223\377\250\225\377\247\225\371\244\225\364\243"
+  "\222\360\242\221\355\243\223\353\243\224\347\243\225\340\242\226\330"
+  "dY\223k_\217g]\202kb}\204}\215\211\203\215ytx|vz\201z\202\205~\206xq"
+  "y]V]SMQ_Y][UWC=\77SMMVPPMGGSMMe_aUOQD>@QKM_[\\\\XYa]^_[\\VRS[WX^Z[RN"
+  "OXTUTPQ\202QMN\10SOPTPQQMNMIJQMNRNOSOPTPQ\202UQR\202TPQ\4[WXZVWXTUVR"
+  "S\202UQR\"WSTYUVNJKIEF\3\0\0MIJvrsWST\200|}UQR[WX401\22\16\17\21\15\16"
+  "$\40!734FBCQMN:671-.$\40!.*+PLMgcdvrs\210\204\205\202~\177\\XYSOPeab"
+  "fbcYUVSOPPLM\211SOP3PLMNJKPLMTPQVRSTPQPLMXRVa[_]WYOIKMGIYSU[UUQKKVPR"
+  "[UWRLPQKOXQXHAH\77""8 at QJRtiwodrqfttiyshyvj~zl\203vh\201{k\206zj\207z"
+  "i\211{j\214~j\217\200l\221\201l\223\202m\224\214v\235\214v\234\223}\244"
+  "\226\200\246\235\207\256\251\223\272\265\237\306\266\240\307\245\216"
+  "\270\231\202\254\212s\235\202k\225\202\177h\224\"\201j\226\203l\230\\"
+  "EqmV\202{d\216\227\200\252\236\207\261\224}\247\235\210\257\236\211\260"
+  "\237\212\261\240\214\261\242\216\263\244\220\265\245\221\264\250\224"
+  "\267\254\233\275\263\242\304\267\246\310\256\235\275\261\242\301\267"
+  "\250\305\260\242\274\262\244\275\275\257\310\301\263\312\276\262\310"
+  "\270\254\302\305\271\317\360\344\372\364\350\376\366\352\377\361\345"
+  "\373\374\360\377\202\364\350\376\202\363\347\375\204\363\347\377\33\356"
+  "\341\373\370\353\377\364\347\377\352\335\367\361\344\377\364\347\377"
+  "\350\333\367\376\361\377\354\340\377\346\332\377\337\323\373\334\317"
+  "\372\333\317\375\333\317\377\332\320\377\332\317\377\317\303\377\302"
+  "\267\371\306\273\377\273\261\372\270\255\373\272\261\377\264\250\372"
+  "\256\242\370\262\243\377\261\240\377\257\235\377\202\255\233\376=\257"
+  "\236\376\264\241\373\264\245\372\272\250\372\305\264\377\304\262\377"
+  "\272\250\374\265\242\376\262\236\377\257\230\377\255\227\377\251\227"
+  "\373\246\226\370\244\224\367\243\223\366\244\222\365\244\223\363\244"
+  "\224\355\243\224\347\243\226\336\232\216\314d[\212aZ|^Vm_\\g]X\\hcgd"
+  "]eiald\\gUNVOHOVPTZTVUOQTNNWQQLFFHBBLFH:460*,B<>_[\\VRSYUV^Z[YUV]YZ`"
+  "\\]WST]YZZVWWSTVRSWSTVRSRNONJKWSTXTU\202YUV\5WSTTPQPLMMIJHDE\202FBC\20"
+  "IEFOKLRNOSOPRNO\11\5\6%!\"845gcdmijTPQeabhde^Z[[WXYUV\202ZVW\23\\XYf"
+  "bcrnowstnjkZVWSOP^Z[b^_hdextu}yzc_`_[\\jfggcda]^eabgcd\210SOP\13\\XY"
+  "ZVWWSTSOPRNOSOPWSTZVWOIMSMQUOQ\202SMOKVPRUOOQKKQKMZTVXRVVPTWPWPIPTMU"
+  "jckzo}ncqj_oodtpcuobvo`wjZto_|q`\200ua\204xd\211|h\215\177j\221\203l"
+  "\226\204m\227\212s\235\207q\230\225~\250\220z\241\234\205\257\244\215"
+  "\267\267\240\312\255\226\300\244\215\267\236\207\261\231\202\254\226"
+  "\177\251\217x\242\201j\224s\\\206jS}eNxpY\203\224}\247\240\211\263\242"
+  "\215\264\243\216\265\224\177\246\233\206\255\241\215\262\252\226\273"
+  "\262\236\303\262\236\301\255\234\276\253\232\274\254\233\275\255\234"
+  "\276\256\237\276\253\234\273\260\241\300\262\243\300\260\242\274\271"
+  "\253\304\276\262\312\264\250\276\306\272\320\310\274\320\346\332\356"
+  "\370\354\377\376\365\377\354\343\366\360\347\372\361\350\373\204\363"
+  "\352\375\204\362\351\376M\371\357\377\357\345\375\362\350\377\355\343"
+  "\373\356\344\375\357\345\376\351\337\370\344\331\371\356\341\377\346"
+  "\331\377\335\317\377\332\314\377\333\316\377\335\320\377\332\314\377"
+  "\324\310\377\310\274\376\277\264\371\301\265\377\274\260\374\270\253"
+  "\372\301\266\377\275\260\377\270\253\375\270\251\376\270\246\374\265"
+  "\242\374\263\240\374\262\236\375\263\240\374\265\241\372\265\243\367"
+  "\273\250\367\301\257\373\307\265\377\303\260\377\271\245\374\266\241"
+  "\376\270\237\377\262\233\377\255\233\377\252\232\375\247\226\374\245"
+  "\224\374\245\224\376\244\223\373\243\222\370\242\223\362\240\222\347"
+  "\241\225\337\235\223\317]V\202]Vub_r`]hb_fTNXYQ\\ZR][T\\ZSZTNRQKMVPR"
+  "NHHUOOPJJKEEICCA;;E\77A[UWiefSOPOKLVRSQMN\202LHI\20FBCHDEIEFJFGOKLSO"
+  "PVRSUQRTPQSOPUQRXTUYUVXTUVRSSOP\202QMN\31WST`\\]fbc`\\]MIJ2./\37\33\34"
+  "\22\16\17!\35\36`\\]oklqmnplmRNO`\\]a]^plm{wxxtumijeab`\\]]YZ\\XY_[\\"
+  "\202ZVW\6b^_a]^d`atpqokld`a\202fbc\4WSTSOPXTUWST\211SOPDQMNOKLNJKPLM"
+  "TPQXTU[WXWQUUOSVPRYSUXRTSMOQKKRLLOIKWQS]W[`Z^c\\chahunv\206~\211\177"
+  "t\202laof[klarm`tk]tjZtgWrkZzm\\~s_\204xc\212|g\216\177j\223\203l\226"
+  "\205n\232\210q\235\206o\233\223|\250\224}\251\234\205\261\250\221\273"
+  "\261\232\304\236\207\261\220y\243\212s\235\206o\231\207p\232\214u\237"
+  "\222{\245\230\201\253\235\206\260\264\235\307\257\230\302\277\250\322"
+  "\266\237\311\263\236\305\271\244\313\244\217\266\247\223\270\234\210"
+  "\255\241\215\262\246\222\265\251\225\270\257\236\300\202\267\246\310"
+  "\21\261\240\300\256\237\276\272\253\310\262\243\300\261\243\275\277\261"
+  "\312\272\254\305\262\246\274\303\267\313\351\335\361\361\346\367\377"
+  "\366\377\357\344\365\361\350\371\360\347\372\375\364\377\361\350\373"
+  "\204\364\353\376\202\363\352\375\202\363\352\377\2\357\345\375\350\336"
+  "\366\202\370\356\377\202\355\343\374\26\367\355\377\360\345\377\351\334"
+  "\377\346\330\377\342\324\377\340\322\377\340\323\377\336\321\377\327"
+  "\311\377\317\301\377\325\306\377\307\272\377\312\275\377\305\267\377"
+  "\302\264\377\274\257\376\300\261\377\276\260\377\275\254\372\274\253"
+  "\371\271\247\373\267\244\375\202\267\242\3758\267\243\372\270\245\367"
+  "\275\253\367\276\254\366\311\267\377\312\270\377\277\251\374\273\244"
+  "\376\275\245\377\264\236\377\257\235\377\254\234\377\251\230\376\246"
+  "\225\375\245\223\377\244\222\376\243\222\374\241\220\366\230\211\346"
+  "\240\223\345\237\224\331\225\215\306\226\217\271ZWv`^tURc\\Vd[S`WOZ["
+  "S^`YaVOVNHLRLNJDFQKKSMMTNNVPPZTTf`bwqsplmRNOJFGSOPNJKFBCD at AA=>@<=C\77"
+  "@GCDMIJRNOVRS\202WST\1TPQ\202SOP\202RNO\1QMN\202PLM\16HDEEABB>\77D at A"
+  "NJK^Z[qmn}yz\242\236\237\223\217\220\257\253\254\231\225\226\225\221"
+  "\222\234\230\231\202lhi\24UQR]YZb^_eabplmzvwrnoa]^VRS`\\]d`aiefokld`"
+  "aZVWa]^c_`d`akghgcd\202YUV\2]YZTPQ\210SOP0VRSRNONJKOKLRNOSOPPLMLHISM"
+  "QNHLNHJUOQVPRSMOTNN[UUUOQVPR[UY_Y]aZakdkunvvnywlzi\\mfYkobtreyse|ue\177"
+  "td\177yf\206|h\213~j\217\200k\222\201j\224\202k\227\203l\230\205n\234"
+  "\212s\241\214u\243\216w\245\230\201\257\233\204\262\255\226\302\244\215"
+  "\271\217x\244\202\211r\236\11\214u\237\217x\242\216x\237\214v\235\213"
+  "u\234\215w\236\225~\250\232\203\255\243\216\265\202\236\211\260\26\253"
+  "\226\275\264\240\305\277\253\320\313\267\334\312\266\331\302\261\323"
+  "\274\253\315\274\253\313\276\255\315\270\247\307\256\235\275\261\242"
+  "\301\270\253\307\267\252\306\275\260\312\302\266\316\263\247\277\300"
+  "\264\312\362\346\372\371\360\377\365\354\375\371\360\377\202\366\356"
+  "\375\3\365\354\375\373\362\377\366\355\376\202\365\354\375\204\364\353"
+  "\374\202\364\353\376\35\361\350\375\371\360\377\355\344\371\351\340\365"
+  "\363\351\377\356\344\374\346\334\364\355\343\376\337\323\371\342\325"
+  "\377\343\326\377\341\324\377\340\322\377\336\320\377\327\310\377\321"
+  "\302\375\313\273\372\307\270\371\321\302\377\307\267\376\314\274\377"
+  "\275\257\372\312\271\377\300\260\373\301\262\367\300\260\367\276\255"
+  "\373\273\251\375\272\247\377\202\271\246\377\33\271\247\373\276\253\372"
+  "\275\253\365\310\267\376\315\273\377\301\256\375\273\247\374\273\246"
+  "\377\264\236\377\257\235\377\255\233\377\250\227\375\246\225\375\244"
+  "\223\375\242\221\373\240\221\372\236\217\364\243\225\364\226\211\341"
+  "\226\213\331\242\233\337\222\212\305\215\211\273PMzPLo[ShWO\\\202RJU"
+  "\17TMUSLSUOSZTVNHJMGIQKKSMMUOO]WWd^`c]_eabJFGGCD\202VRS\1RNO\202VRS\2"
+  "UQRWST\202YUV\10XTUVRSUQRTPQXTUUQROKLJFG\202HDE\4IEFKGHOKLXTU\202a]^"
+  "\2XTUOKL\202LHI\21\\XYeabvrslhikgh~z{\206\202\203\226\222\223\257\253"
+  "\254\251\245\246\231\225\226\213\207\210\211\205\206\210\204\205vrs_"
+  "[\\`\\]\202fbc\15kghsopgcdXTU[WXKGHIEFNJKMIJIEFUQR^Z[TPQ\210SOP\4XTU"
+  "UQRSOPVRS\202[WX\36VRSPLMVPTRLPPJLSMOTNPSMOVPP[UUXRTTNPZTX]W[]V]jcjq"
+  "jrc[feYg_RcdWinaspbyse~xh\203xh\205}j\212\177k\220\201l\223\201l\225"
+  "\202\201j\226\26\203l\232\205n\234\207o\237\215u\245\207o\237\227\177"
+  "\257\237\207\267\260\231\307\236\207\265\221z\246\213t\240\204m\231}"
+  "f\220{d\216~h\217\206p\227\225\177\246\241\213\262\226\177\251\236\207"
+  "\261\235\210\257\232\205\254\202\224\177\246\32\237\213\260\245\221\266"
+  "\243\217\262\251\225\270\254\233\275\256\235\277\260\237\277\264\243"
+  "\303\267\246\306\267\250\307\260\241\276\262\245\301\272\255\307\270"
+  "\253\305\265\251\301\313\277\325\354\340\364\372\357\377\365\354\375"
+  "\357\346\367\357\347\366\366\356\375\365\355\374\367\357\376\365\354"
+  "\375\360\350\367\202\366\356\375\204\365\354\375\202\365\354\377\4\361"
+  "\350\375\372\361\377\356\345\372\371\360\377\202\363\351\377F\354\342"
+  "\372\353\341\372\350\335\373\354\341\377\353\340\377\343\327\373\335"
+  "\321\367\333\316\371\331\314\372\325\307\372\331\312\377\333\314\377"
+  "\332\312\377\315\275\374\315\274\377\311\270\376\324\303\377\302\263"
+  "\370\305\267\365\302\266\366\302\262\375\300\256\377\276\253\377\274"
+  "\251\377\273\250\377\272\250\376\274\253\373\273\253\364\304\263\372"
+  "\313\272\377\306\263\377\275\251\376\270\243\376\263\237\377\256\234"
+  "\377\253\231\375\247\227\372\244\223\371\242\221\367\240\217\365\235"
+  "\216\363\234\216\360\222\204\345\246\234\365\215\203\331\224\213\332"
+  "\214\204\315\227\222\325\205\200\302^Z\215QKeQIVVN[WOZOHPOHOVOVWQUOI"
+  "KICENHHQKKPJJ\\VV_Y[NHJMIJ\77;<EABSOP\202QMN\10WSTVRSXTUZVW\\XYZVWWS"
+  "TTPQ\202SOP\10MIJKGHHDEGCDIEFMIJSOPWST\202VRS\20RNOJFGFBCMIJ^Z[lhiVR"
+  "Sc_`a]^ZVWOKLMIJ]YZc_`^Z[d`a\202hde\24iefnjkplmnjk]YZ_[\\ZVW_[\\jfgg"
+  "cdc_`lhiTPQGCD\77;<8452./<89EAB=9:\210SOP\5JFGKGHMIJPLMQMN\202RNOLQM"
+  "NYSWZTXXRTTNPSMOUOQUOOSMMXRTTNP^X\\a[_\\U\\leltmu`XcNBPUHYeXjpcuqbyt"
+  "d~yi\204xh\205|i\211~j\217\201k\222\200i\223\177h\224\200i\225\203l\232"
+  "\206n\236\204l\236\217w\251\216v\250\231\201\261\255\225\305\256\227"
+  "\305\232\203\261\223|\252\201j\226~g\223\177h\222\204m\227\212t\233\215"
+  "w\236\217y\237\221{\241\226\201\250\224\177\246\226\201\250\230\203\252"
+  "\233\206\255\234\207\256\233\207\254\234\210\255\237\216\260\243\222"
+  "\264\252\231\273\257\236\300\257\236\276\260\237\277\266\245\305\273"
+  "\254\313\302\263\320\306\271\325\306\271\323\276\261\313\311\275\325"
+  "\356\342\370\374\363\377\351\340\361\371\360\377\367\357\376\371\361"
+  "\377\202\365\355\374\5\372\362\377\374\366\377\362\354\372\367\357\376"
+  "\367\357\374\203\367\357\376\1\366\356\375\202\366\355\376\2\363\352"
+  "\375\371\360\377\202\353\342\367Q\254\242\272\243\231\261\245\233\263"
+  "\242\231\256\240\227\252\242\231\254\234\223\250\220\206\236\207}\226"
+  "\206{\231\204y\233\200t\232\330\311\364\324\304\363\307\266\352\335\314"
+  "\377\326\304\377\324\302\377\321\276\376\311\271\367\307\274\366\305"
+  "\273\370\304\267\377\301\262\377\276\256\377\273\252\377\271\250\377"
+  "\270\250\377\270\251\372\271\253\366\275\255\366\305\265\376\310\267"
+  "\377\276\254\377\263\240\372\264\240\377\255\233\376\252\230\374\247"
+  "\225\371\244\222\365\241\221\363\237\217\361\234\216\357\233\215\354"
+  "\240\225\363\220\205\341\240\225\361\221\210\341\227\217\345\210\203"
+  "\327\204\177\323\205~\301d]~SKXWO\\^VaQJRPIPUNUKEIOIKHBDNHHPJJLFFZTT"
+  "`ZZICC2./401FBCRNONJKQMNWSTQMNSOPVRSXTUVRSSOP\202QMN\20SOPGCDHDEJFGN"
+  "JKRNOWST\\XY^Z[GCDMIJWST`\\]c_`a]^[WX\202VRS\5NJKMIJOKLSOPUQR\202PLM"
+  "\13TPQYUV`\\]c_``\\]\\XYb^_lhiuqrzvwuqr\202qmn\13fbc`\\]lhiwstgcda]^"
+  "[WXLHIGCDFBC\77;<\210SOPXUQRYUV[WXXTUQMNOKLRNOWSTLFJSMQTNPPJLQKMWQSW"
+  "QQQKKZTVVPRb\\`a[_TMTb[blemXNY>1BPCUj]oxk\177zk\202\177o\211\206v\221"
+  "\205t\224\207s\226\210t\231\211s\232\206o\231\202k\227\201j\226\203l"
+  "\232\206n\236\211q\243\227\177\261\236\206\266\240\210\270\274\244\324"
+  "\247\220\276\221z\250\213t\242\211r\236\202k\227}f\220\201j\224\211r"
+  "\234\214v\235\213u\234\211s\232\227\202\251\220{\242\233\206\255\232"
+  "\205\254\234\207\256\242\216\263\234\210\255\246\222\265\245\224\266"
+  "\242\221\263\244\223\263\252\231\271\256\235\275\257\237\274\263\243"
+  "\300\271\252\307\271\254\310\302\265\317\276\261\313\315\301\331\360"
+  "\344\372\367\353\377\360\347\370\375\364\377\370\360\377\357\347\366"
+  "\372\362\377\370\360\377\375\365\377\363\353\370\373\365\377\372\364"
+  "\377\202\367\361\375\204\370\360\377\202\367\356\3772\371\360\377\360"
+  "\347\372\256\245\270\257\246\273\233\222\247\247\236\263\224\213\240"
+  "\226\215\240\230\220\237\232\222\237\225\215\234\212\201\222\203z\215"
+  "\202x\220\177u\216zo\215}o\222xi\220zk\226\324\304\361\330\310\371\333"
+  "\312\376\314\271\360\331\310\377\314\276\371\310\276\375\307\271\377"
+  "\303\264\377\277\257\377\274\253\377\271\250\377\267\247\377\266\247"
+  "\372\270\252\371\267\251\364\300\262\375\313\272\377\277\255\377\261"
+  "\236\370\265\241\377\254\232\375\252\230\374\246\224\367\243\221\364"
+  "\240\221\360\237\220\357\234\216\355\232\215\351\231\216\352\224\211"
+  "\345\202\217\206\341\27\212\204\336\213\205\337\216\210\342\211\202\317"
+  "\204|\255VOnKCZSM[JELPJLYSUJDFQKMJDFPJJMGGA;;NJIUQP>:;\35\31\32-)*KG"
+  "H\202ZVW\2c_`kgh\202d`a\32eabd`a^Z[VRSPLMOKLPLMVRSXTUYUVZVWYUVVRSSOP"
+  "QMNa]^XTUPLMQMNYUV^Z[[WXUQRa]^NJK\\XY\202TPQ\15ZVWIEF[WXWSTMIJKGHTPQ"
+  "XTUVRS[WXeaba]^qmn\202wst\14sopb^_[WXhdejfgc_`njkwsthdeZVWTPQMIJ\220"
+  "SOP\202TOS&TPQSOPRNOSOPTPQVRSZTVXRTXRV^W^c\\d`YaSKVJ\77MXK]vg|\221\202"
+  "\227\224\205\234\212{\222\205u\217\210u\221\213x\230\201k\217\201k\221"
+  "\177i\220\177h\222\202h\225\207m\234\215s\243\221w\247\225~\254\220y"
+  "\247\234\205\263\255\226\304\254\225\303\237\210\264\221z\246\207p\234"
+  "\202\201j\226\22\202k\227\205n\232\210q\235\214u\237\216w\241\217x\242"
+  "\220y\243\222{\245\226\200\247\231\203\252\233\207\254\236\212\257\242"
+  "\216\263\244\220\263\236\215\257\254\233\273\250\230\265\245\225\260"
+  "\202\260\242\274\12\254\236\270\266\250\301\275\261\311\270\254\302\275"
+  "\264\311\364\353\377\357\346\371\362\351\374\361\350\371\373\362\377"
+  "\202\370\360\377\4\367\361\375\370\362\376\371\363\377\371\363\375\202"
+  "\372\364\376\2\371\363\377\367\363\377\203\371\363\377\1\370\362\377"
+  "\202\367\360\377S\362\353\373\274\265\305\276\265\306\260\247\272\266"
+  "\255\300\251\240\263\241\230\253\215\204\227\226\215\236\224\213\234"
+  "\217\206\227\210\177\222\203w\213~r\210|p\210{n\210vi\205vi\207qc\206"
+  "i[\177p`\207\326\305\357\324\303\355\317\277\360\324\306\377\304\267"
+  "\377\307\266\377\306\267\377\270\250\377\302\261\377\262\241\375\267"
+  "\247\377\264\244\374\264\245\370\271\247\371\300\256\377\306\262\377"
+  "\302\256\377\271\245\376\262\235\372\256\232\373\252\230\373\247\225"
+  "\370\242\220\363\235\215\357\233\213\355\232\214\355\233\215\354\225"
+  "\212\350\224\211\345\221\210\343\217\206\337\216\206\334\214\204\332"
+  "\207\201\327\205\200\322\204}\312\216\210\306D\77gOL_OMPJG at LGCUPMPGJ"
+  "NEJKEGNHHNJGED at 645*(+1-.YUV{wx|xyplmjfghded`a]YZZVWUQR\202SOP\10WST\\"
+  "XY_[\\]YZ[WXYUVWSTUQR\202TPQ\1SOP\202TPQ\2VRSYUV\202\\XY\2ZVWWST\210"
+  "SOP\202RNO\202QMN\15RNOTPQWSTXTU`\\]c_`b^_eabfbcWSTRNOd`a_[\\\203fbc"
+  "\1hde\202_[\\\1plm\220SOP\2RMQSNR\202SOP*RNOSOPTPQVRS[UW\\VX]V]_X_aZ"
+  "be^fialncqxk}\210y\216\221\202\231\213|\223\201q\213}m\207\200m\213\200"
+  "m\215\203m\221\202l\222\201k\222\177h\222\201g\224\204j\231\210n\236"
+  "\214r\241\222{\247\220y\245\235\206\262\256\227\303\253\224\300\236\207"
+  "\263\221z\246\210q\235\201j\226\202k\227\203l\230\206o\233\211r\236\214"
+  "u\241\202\216w\243\14\220y\243\223|\246\226\200\247\231\203\252\233\207"
+  "\254\237\213\260\242\216\261\244\220\263\247\226\266\254\234\271\250"
+  "\230\265\250\230\263\202\257\241\272\5\262\244\275\277\261\312\266\252"
+  "\300\272\256\304\301\270\313\202\366\355\377\5\370\357\377\362\351\372"
+  "\372\362\377\370\360\377\370\360\375\202\370\362\376\5\371\363\375\372"
+  "\364\376\372\365\374\372\364\376\367\364\377\203\367\363\3772\371\363"
+  "\377\370\362\377\370\361\377\367\360\377\370\361\377\262\253\273\244"
+  "\233\254\264\253\274\241\230\251\227\216\237\237\226\247\247\236\257"
+  "\232\221\244\225\214\237\215\204\227\205|\217\177s\207zn\202vj\200ui"
+  "\177rf~m`zk^zdWupa\202YIm\342\322\367\326\306\363\301\261\360\330\310"
+  "\377\277\256\376\274\252\376\276\256\377\266\245\377\271\250\377\267"
+  "\246\377\263\243\374\262\242\372\267\245\373\276\254\377\305\261\377"
+  "\303\257\377\274\245\377\262\235\370\255\231\372\250\226\371\244\222"
+  "\365\240\216\361\234\214\356\232\212\354\202\230\212\353\26\225\212\350"
+  "\223\210\344\220\207\342\217\206\337\216\206\334\214\204\331\207\202"
+  "\326\205\200\324}x\322yu\302NL}<<TIIKIIAMJCE@=KBEKBGICEJFEMIFMLJ\202"
+  "LLN\14_[\\qmnxtumij`\\]^Z[]YZWST[WXXTUTPQPLM\202NJK\2PLMRNO\203UQR\3"
+  "VRSWSTXTU\202ZVW\10UQRVRSXTU[WX\\XY[WXXTUVRS\210SOP\202RNO\202QMN\12"
+  "RNOTPQVRSXTUYUV_[\\YUVWSTa]^`\\]\202VRS\10hdenjkfbc_[\\a]^]YZZVWc_`\220"
+  "SOP\2RMQSNR\204SOP(UQRVRSXRT^XZb[baZa]V^aZbldoyn|\177r\203\201t\206~"
+  "q\205wi\200ue\177wg\201xh\205ve\205\200l\217\200l\221\200j\221\177h\222"
+  "\177h\224\202k\227\205n\234\210q\237\221z\246\223|\250\242\213\267\260"
+  "\231\305\251\222\276\232\203\257\216w\243\207p\234\202k\227\203l\230"
+  "\205n\232\210q\235\212s\237\214u\241\202\216w\243\34\221z\244\223|\246"
+  "\227\201\250\232\204\253\234\210\255\237\213\260\243\217\262\245\221"
+  "\264\251\230\270\251\231\266\253\234\271\260\242\274\261\243\274\257"
+  "\241\272\261\243\274\270\252\303\264\250\276\322\311\334\336\325\350"
+  "\372\361\377\367\356\377\374\363\377\365\354\375\366\356\375\370\362"
+  "\377\370\362\376\371\363\377\371\363\375\202\372\364\376\2\373\366\375"
+  "\373\365\377\204\370\365\377\2\372\364\377\371\363\377\202\370\362\377"
+  "M\262\254\272\241\233\251\252\244\262\221\213\231\240\230\247\247\237"
+  "\256\223\213\232\220\207\230\222\211\234\214\203\226\203z\213|s\204x"
+  "o\202ul\177th|rf|j^vna{m`|VIgdUviZ{TDh\314\275\350\317\300\373\301\260"
+  "\367\301\261\374\306\264\377\302\262\377\273\252\377\263\242\377\254"
+  "\233\371\262\241\377\260\237\373\263\240\371\272\250\376\303\257\377"
+  "\304\260\377\273\247\377\262\235\370\255\231\372\247\225\370\242\220"
+  "\364\236\214\360\234\214\357\232\212\355\230\212\353\226\210\351\224"
+  "\211\347\222\207\343\217\206\341\216\205\336\215\205\333\213\203\330"
+  "\206\201\325\204~\324\202~\325\201}\312vs\250RQpECNHGEPLIHDAGACICEJD"
+  "HHDEGCDIGHQQQXXXeabfbc_[\\RNOPLM\202VRS\6PLMXTUVRSTPQQMNPLM\202OKL\14"
+  "PLMSOPTPQUQRWSTYUVZVW[WX\\XYVRSXTU[WX\202]YZ\3ZVWWSTTPQ\210SOP\204RN"
+  "O\2SOPTPQ\202VRS\4QMNeabd`aXTU\202ZVW\12SOPRNO\\XYkghhde`\\]gcdkghfb"
+  "ceab\220SOP\2SNRTOS\202UQR\202TPQ\14UQRWSTSMO]WYf_fg`gb[c`Yad\\gjbon"
+  "csobt\202m`t4sd{yi\203yi\204vf\203}j\212~j\215\201k\221\202l\223\204"
+  "m\227\210q\235\214u\243\217x\246\224}\251\231\202\256\250\221\275\262"
+  "\233\307\247\220\274\225~\252\212s\237\203l\230\202k\227\204m\231\206"
+  "o\233\211r\236\213t\240\214u\241\216w\243\217x\244\222{\245\224}\247"
+  "\230\202\251\233\205\254\235\211\256\240\214\261\244\220\263\246\222"
+  "\265\247\226\266\246\226\263\254\236\270\261\243\275\261\243\274\264"
+  "\246\277\267\251\302\264\250\276\265\254\301\356\345\370\373\362\377"
+  "\372\361\377\360\347\370\374\363\377\372\362\377\366\356\375\202\371"
+  "\363\377\202\372\364\376\202\373\365\377\202\374\367\376\204\371\366"
+  "\377\2\373\365\377\372\364\377\202\371\363\377\35\362\354\372\244\236"
+  "\254\225\217\235\226\220\236\223\213\232\214\204\223\212\202\221\215"
+  "\205\224\205|\215\200w\210yp\201tk|sj{qh{pdxmauk_ug[sYLftg\203]NmXIj"
+  "ZKlbS|\315\276\365\313\273\374\303\263\372\300\257\377\262\242\372\202"
+  "\265\244\377)\265\243\377\260\237\377\256\235\373\260\235\371\266\243"
+  "\374\301\255\377\304\260\377\275\251\377\261\236\370\256\232\373\247"
+  "\225\370\241\217\363\236\214\360\235\215\360\234\214\357\230\212\353"
+  "\225\207\350\223\210\350\221\206\344\216\205\340\215\204\335\214\203"
+  "\334\212\202\330\205\177\325\203}\323\177{\322\204\201\320\201}\270q"
+  "o\226><Q=<BDCAIEBE\77\77ICEKEIHCGB at CB@AFFDLLJ\202LHI\16JFGHDENJKVRSU"
+  "QRMIJTPQUQRVRSXTUYUVZVW[WX\\XY\203[WX\202ZVW\1YUV\203WST\7ZVW]YZ^Z[\\"
+  "XYXTUUQRTPQ\210SOP\204RNO\1SOP\202TPQ\21UQRXTUa]^]YZ[WXb^_^Z[RNOQMNJ"
+  "FGfbcmijgcdnjkuqrnjkief\220SOP\2SNRTOS\204UQR4VRSWSTXRT]WYd]dhahibjh"
+  "aig_jh`mmbrncsnctpdxug~yk\204yk\205wh\205yh\210{j\214\200l\221\203n\225"
+  "\207r\233\213v\237\221z\246\224}\251\226\177\253\234\205\261\254\225"
+  "\301\262\233\307\244\215\271\222{\247\210q\235\202k\227\201j\226\204"
+  "m\231\207p\234\211r\236\212s\237\214u\241\216w\243\220y\245\223|\246"
+  "\225\177\246\231\203\252\234\206\255\236\212\257\241\215\262\243\222"
+  "\264\245\224\266\250\227\267\251\231\266\202\253\235\267\14\257\241\272"
+  "\272\254\305\277\263\313\271\255\303\307\276\323\364\353\376\373\362"
+  "\377\366\355\377\361\350\371\371\360\377\375\365\377\374\364\377\202"
+  "\372\364\377\202\373\365\377\202\374\367\376\202\375\370\377\202\372"
+  "\367\376\203\372\367\377\1\371\366\377\202\372\364\376X\375\367\377\372"
+  "\364\377\230\222\236\221\213\227\223\215\231\177y\205\210\200\215{s\202"
+  "\177w\206{s\202um|rjyogvlctf]naXk^Rfi]sdXpVIcdWsVIgWJhM\77cI;l\310\271"
+  "\364\265\246\351\300\260\373\277\260\377\260\237\375\270\246\377\252"
+  "\230\376\256\234\377\254\232\375\253\232\370\260\237\373\275\252\377"
+  "\303\261\377\275\251\377\262\237\370\255\231\372\246\224\370\241\217"
+  "\363\236\214\360\235\215\360\234\214\357\227\211\353\224\206\347\222"
+  "\207\347\221\206\344\216\205\340\214\203\334\213\202\333\211\201\327"
+  "\204~\324\202|\322\177{\320zw\306up\262~z\254TQp96GA\77DDC\77B>=EABH"
+  "CIHCJEBIDBEDE at FGBIEDLHINJKOKLPLMSOPRNONJKPLMRNOUQRYUV\\XY^Z[_[\\`\\]"
+  "\203^Z[\7]YZ[WXXTUVRSTPQWSTZVW\202]YZ\2YUVUQR\202TPQ\210SOP\202RNO\206"
+  "SOP\20gcdSOPC\77 at QMNeabYUVFBCHDENJKkghrnofbciefoklmijnjk\220SOP\3RMQ"
+  "SNRUQR\202WST\11XTUYUVZVWe_ab\\^`Y`aZae^fibj\202jbm\2qftrgw\202rgx&t"
+  "g{ug~wi\202xj\204wg\204yh\210}i\216\177k\220\202m\224\206q\232\214u\241"
+  "\217x\244\224}\251\234\205\261\253\224\300\257\230\304\240\211\265\221"
+  "z\246\210q\235\203l\230\201j\226\203l\230\206o\233\210q\235\211r\236"
+  "\213t\240\217x\244\223|\246\224}\247\226\200\247\232\204\253\235\207"
+  "\256\237\213\260\242\216\263\244\223\265\246\225\265\245\225\262\255"
+  "\235\272\202\261\243\275\14\264\246\277\267\251\302\266\252\302\263\247"
+  "\275\354\343\366\364\353\376\360\347\372\371\360\377\374\363\377\367"
+  "\357\376\372\362\377\375\365\377\202\373\365\377\202\374\366\377\202"
+  "\375\370\377\202\376\371\377\205\373\370\377\1\372\367\377\202\373\365"
+  "\377V\376\370\377\362\354\366\366\360\374\225\217\233\201{\207\204~\212"
+  "\211\201\216}u\202vn}tl{qixogvmetiapd\\k`Wh_Te`Th_SiZNfPC]ZMi[NjSEhZ"
+  "Mx\273\255\340\307\267\365\303\263\372\264\242\366\257\236\374\264\242"
+  "\377\256\233\377\254\231\377\253\231\377\252\230\373\255\234\372\271"
+  "\246\377\301\257\377\276\252\377\263\240\371\250\227\367\245\223\367"
+  "\241\217\363\236\214\360\233\213\356\231\211\354\226\210\352\223\205"
+  "\347\222\207\347\221\206\346\216\205\342\214\203\336\213\202\333\211"
+  "\200\331\204~\324\202|\322\202~\323yv\305}z\301\200|\267qn\23152M@\77"
+  "GCABC\77>B>\77B=DC=GC at IDBEDE\77DC>KGFMIJNJKMIJLHINJKRNOWSTOKLPLMQMNS"
+  "OPUQRVRS\202WST\2XTUYUV\203[WX\13YUVWSTUQRWSTZVW\\XYYUVTPQRNOTPQWST\210"
+  "SOP\2QMNRNO\204SOP\4RNOQMNfbcVRS\202HDE\14A=>($%)%&JFG]YZplmoklfbclh"
+  "iuqr}yz\210\204\205\220SOP\12SNRUPTXTU[WX]YZ^Z[`\\]b^_nhjkeg\202hah\2"
+  "jcklem\202nfq\37rjwskxvk{vk|vj~vj\200zl\205}o\211zk\210{l\213}l\220~"
+  "m\221\201l\223\205p\227\211t\235\214w\240\224}\251\233\204\260\251\222"
+  "\276\254\225\301\234\205\261\216w\243\206o\233\201j\226\200i\225\203"
+  "l\230\205n\232\207p\234\210q\235\213t\240\220y\245\202\225~\250\27\227"
+  "\201\250\232\205\254\235\210\257\240\214\261\243\217\264\245\224\266"
+  "\247\226\266\244\225\262\256\237\274\262\244\276\267\251\303\271\255"
+  "\305\261\245\275\263\247\275\304\270\316\376\365\377\366\355\376\361"
+  "\350\371\374\363\377\376\365\377\366\356\375\373\365\377\371\363\377"
+  "\203\374\366\377\1\375\370\377\202\374\371\377\202\375\373\377\205\374"
+  "\372\377\1\373\370\377\202\372\367\376\10\371\364\373\373\366\375\373"
+  "\365\377\365\357\371\375\367\377~x\202qkuwq{\202nhtFmerkcph`me]jbZga"
+  "Yhd\\kLCTaUiWKaTH`UHbXKeNA_OAeQDp\270\251\340\277\260\363\260\236\360"
+  "\273\250\377\260\236\377\255\232\377\252\227\377\253\230\377\252\230"
+  "\374\253\232\372\266\243\375\276\254\377\274\252\376\264\242\370\247"
+  "\226\366\245\223\367\242\220\364\237\215\361\233\213\356\230\210\353"
+  "\225\207\351\224\206\350\222\207\347\221\206\346\216\205\342\214\203"
+  "\336\213\202\333\211\200\331\204~\326\202|\322~z\316{x\311\204\200\315"
+  "ys\271|w\257EAf63D:9>@\77==;<=8\77=7A>;D@>AA@;@@8FBAFBCGCDHDEIEFLHIR"
+  "NOXTU\205PLM\2QMNRNO\202SOP\2TPQVRS\202XTU\4VRSTPQSOPVRS\202YUV\5UQR"
+  "OKLNJKTPQZVW\210SOP\3QMNRNOSOP\202TPQ\23SOPQMNPLMZVWPLM<89.*+#\37\40"
+  "\32\26\27""1-.]YZeabkghgcdjfgzvw\202~\177\205\201\202\217\213\214\220"
+  "SOP\16TOSWRV\\XY_[\\b^_eabhdejfgmgirlnwpwzsz{t|zs{\202zr}\12{s\200|t"
+  "\201\200u\205\202w\207\201u\211\177s\207\201s\214\203u\217\202s\220\203"
+  "t\223\202\204s\227,\210s\232\213v\235\220{\244\223~\247\226\177\253\234"
+  "\205\261\250\221\275\251\222\276\231\202\256\212s\237\203l\230|e\221"
+  "\200i\225\202k\227\205n\232\206o\233\207p\234\212s\237\221z\246\226\177"
+  "\251\225\177\246\230\202\251\232\205\254\235\211\256\240\214\261\244"
+  "\220\263\245\224\264\250\227\267\253\234\271\256\237\274\253\235\267"
+  "\260\242\273\267\253\303\262\246\276\304\270\316\361\345\371\362\351"
+  "\374\364\353\374\370\357\377\372\361\377\365\355\374\366\356\375\377"
+  "\374\377\371\363\377\202\374\366\377\202\375\370\377\1\374\371\377\203"
+  "\375\373\377\202\374\372\377\1\375\373\377\202\374\372\377S\373\371\376"
+  "\373\370\377\372\367\376\377\373\377\364\357\366\375\367\377\371\363"
+  "\375\366\360\372\370\362\374\177y\203keoqkwoiumerh`mbZg]Ub[S`ZR_UM\\"
+  "]UdPEVXL`VJ`QE]MAYSF`NA_N\77f\300\262\343\275\255\354\272\251\371\262"
+  "\237\373\261\237\377\252\227\377\250\225\377\253\230\377\252\230\376"
+  "\252\231\371\264\241\375\275\253\377\274\252\376\265\243\371\250\227"
+  "\367\247\225\371\245\223\367\241\217\363\234\214\357\231\211\354\227"
+  "\211\353\226\210\352\222\207\347\221\206\346\216\205\342\215\204\341"
+  "\213\202\335\211\200\331\205\177\327\202~\323\203\177\323\177~\316}y"
+  "\315tp\275\205\200\300qn\23397M98 at 999978;6==7A>;DA\77BBA<AA9KGFIEFJF"
+  "GNJKOKLNJKMIJNJK\202RNO\202QMN\6RNOTPQWSTXTURNOSOP\202UQR\14TPQRNOOK"
+  "LMIJVRSXTUWSTRNOLHIMIJTPQ[WX\210SOP\3QMNRNOSOP\202TPQ\23RNOQMNPLMVRS"
+  "401\10\4\5\3\0\0*&'NJK`\\]okliefgcdb^_njk\202~\177~z{qmnrno\220SOP\22"
+  "SNRVQU\\XYfbcmijrnoxtu~z{\200z|\202|~\205~\205\207\200\207\211\202\212"
+  "\213\204\214\215\205\220\216\206\221\214\204\221\215\205\222\202\220"
+  "\205\225\6\217\203\227\215\201\225\215\177\230\215\177\231\213|\231\214"
+  "}\234\202\216}\241\15\220{\242\221|\243\223~\247\224\177\250\236\207"
+  "\261\242\213\265\266\237\311\247\220\272\232\203\255\214u\237\207p\232"
+  "\201j\224\200i\223\202\202k\225\3\203l\226\211r\234\223|\246\202\227"
+  "\200\252\26\224\177\246\226\201\250\232\206\253\236\212\257\240\217\263"
+  "\243\222\264\247\226\266\252\231\271\246\227\264\261\242\277\254\237"
+  "\271\262\246\276\263\247\277\267\253\301\270\254\302\366\352\376\366"
+  "\355\377\366\355\376\366\360\376\370\362\377\371\363\377\373\365\377"
+  "\202\374\366\377\202\375\367\377\3\374\371\377\375\372\377\375\373\377"
+  "\203\376\374\377\204\374\374\376W\374\372\375\373\371\374\373\371\376"
+  "\372\370\375\367\364\373\375\372\377\377\375\377\357\352\361\373\365"
+  "\377\371\363\375\373\365\377nhrmgse_kc]g\\V`ZT^VPZXP[UMXVN[UM\\UL]SJ"
+  "]TH\\SG]RF\\QE]M at ZQCdI<h\264\245\340\274\254\367\274\251\377\255\233"
+  "\377\256\233\377\251\227\377\254\232\377\251\227\375\254\233\373\257"
+  "\236\372\270\251\376\304\262\377\271\247\373\255\234\372\246\224\367"
+  "\241\217\362\237\215\360\235\215\360\233\213\356\227\211\353\226\210"
+  "\352\223\210\350\222\207\347\217\206\343\216\205\342\214\203\336\213"
+  "\202\335\206\200\330\203\177\324\200}\316\204\203\323yu\312{v\310|v\276"
+  "|w\25532Q0/=65:66674;85<:7><:=>=8\77\77""7D@\77FBCHDEIEFJFGLHINJKOKL"
+  "NJKOKLPLM\202QMN\204RNO\17SOPUQRTPQPLMMIJQMNWSTXTUVRSPLMLHISOP`\\]b^"
+  "_[WX\210SOP\204RNO\204QMN\7C\77 at B>\77""2./\\XYfbcc_`]YZ\202rno\7fbch"
+  "dekgh\210\204\205rnomijplm\220SOP\34RMQTOSYUV`\\]fbciefnjksopztv}wy\202"
+  "{\202\207\200\207\214\205\215\220\211\221\225\215\230\227\217\232\234"
+  "\224\241\236\226\243\242\227\247\243\230\251\243\227\253\243\227\255"
+  "\244\226\257\245\227\261\242\223\260\242\223\262\243\222\266\242\221"
+  "\265\202\242\215\264\"\243\216\267\244\217\270\246\217\271\252\223\275"
+  "\274\245\317\254\225\277\237\210\262\220y\243\213t\236\204m\227\205n"
+  "\230\207p\232\210q\233\211r\234\215v\240\223|\246\225~\250\223|\246\224"
+  "\177\246\226\201\250\232\206\253\235\211\256\236\215\257\241\220\262"
+  "\244\223\263\247\226\266\250\231\266\262\244\276\255\241\271\262\246"
+  "\276\264\250\276\266\252\300\306\272\320\362\351\374\202\366\355\376"
+  "\4\366\360\376\370\362\377\371\363\377\373\365\377\202\374\366\377\4"
+  "\375\367\377\375\370\377\374\371\377\375\373\377\204\376\374\377\202"
+  "\375\375\375\24\375\375\377\374\374\376\375\373\376\374\372\375\373\371"
+  "\376\372\370\375\377\375\377\366\363\372\371\364\373\363\356\365\377"
+  "\374\377\374\366\377\352\344\356rlvf`lRLX[U_c]gSMW^Xb\202UMX\202RJW="
+  "RJYQHYRFZQEYQE[PDZNBXI<XL=f\313\274\363\265\245\356\270\245\376\252\230"
+  "\373\257\234\377\253\231\377\256\235\377\253\231\377\256\235\375\261"
+  "\241\372\272\253\377\306\264\377\273\251\375\257\236\372\251\227\372"
+  "\243\221\364\241\217\362\237\217\361\235\215\360\231\213\355\231\213"
+  "\354\224\211\351\222\207\345\217\206\343\216\205\340\215\204\337\213"
+  "\202\333\207\201\331\204\200\325\200\177\317\203\202\322~z\321|x\315"
+  "zv\302zv\263cc\211<=Q33;44653864986;:89<;7=<7C\77>D at AGCDHDEIEFJFGLHI"
+  "\202NJK\1OKL\202PLM\1QMN\203RNO\20TPQUQRVRSWSTUQRQMNPLMRNOUQRVRSTPQR"
+  "NOXTUa]^_[\\WST\211SOP\204RNO\203QMN\20b^_oklfbcyuvief^Z[YUVuqrb^__["
+  "\\gcdief\211\205\206yuvsopmij\220SOP<RMQSNRVRS[WX^Z[_[\\b^_gcdlfhoik"
+  "slswpwzs{~w\177\201y\204\204|\207\213\200\216\215\202\222\220\205\226"
+  "\223\210\231\225\210\234\227\211\240\230\212\243\231\213\245\236\216"
+  "\253\237\216\256\242\216\263\243\217\264\245\220\267\247\222\273\253"
+  "\224\300\255\226\302\262\233\305\267\240\312\312\263\335\270\241\313"
+  "\251\222\274\234\205\257\227\200\252\221z\244\215v\240\220y\243\222{"
+  "\245\224}\247\227\200\252\232\203\255\231\202\254\226\177\251\231\204"
+  "\253\233\207\254\236\212\257\241\215\262\241\220\262\243\222\264\245"
+  "\226\265\247\230\267\247\230\265\257\241\273\256\242\272\263\247\277"
+  "\202\273\257\305\10\342\331\356\371\360\377\366\355\376\365\357\375\366"
+  "\360\376\370\362\377\371\363\377\373\365\377\202\374\366\377\202\373"
+  "\370\377\2\374\371\377\375\373\377\204\376\374\377\204\375\375\375\202"
+  "\374\374\376\6\374\372\377\373\371\376\373\370\377\370\365\374\377\374"
+  "\377\367\364\375\202\361\356\367\12\377\374\377\350\342\356XR^icoTNZ"
+  "SMYYS]LFPVPZPJT\202PHU\2PHWOFW\202OFY>NEXPDXQEYOB\\N\77f\261\243\330"
+  "\272\253\360\272\250\374\260\237\375\266\244\377\253\232\377\255\234"
+  "\377\252\232\375\254\235\372\260\240\371\272\253\376\304\265\377\270"
+  "\251\374\257\236\372\251\230\370\243\222\362\242\221\361\237\220\357"
+  "\234\214\356\231\213\354\230\212\353\225\212\352\224\211\347\221\210"
+  "\345\220\207\342\217\206\341\215\204\335\210\202\332\205\201\326\201"
+  "\200\320}~\320~|\320|x\315yv\305tr\263\205\203\262//K0/=015113333534"
+  "875<87=96A=>B>\77EABFBCGCDIEFKGHLHIMIJNJKOKLPLM\204QMN\2RNOUQR\202WS"
+  "T\14UQRRNOPLMOKLSOPVRSXTUYUV^Z[`\\][WXRNO\212SOP\206RNO\20SOPeabb^_k"
+  "gh[WXYUVMIJc_`gcdjfgnjkb^_~z{uqroklb^_\220SOP\202TOS\2UQRXTU\202YUV'"
+  "[WX_[\\f`bhbdkdkmfmohppiqrjutlyvk{xm}|q\202~r\206\201s\212\203u\216\205"
+  "w\221\206w\224\207v\226\211x\232\216z\237\221|\243\224\177\250\231\204"
+  "\255\237\210\264\242\213\267\245\216\270\255\226\300\302\253\325\256"
+  "\227\301\235\206\260\221z\244\220y\243\216w\241\215v\240\220y\243\224"
+  "}\247\227\200\252\232\203\255\202\234\205\257\33\233\205\254\234\207"
+  "\256\236\212\257\241\215\262\243\217\264\243\222\264\246\225\267\250"
+  "\231\270\252\233\270\250\232\264\256\240\272\256\242\272\263\247\277"
+  "\275\261\307\273\257\305\367\356\377\371\360\377\365\356\376\365\357"
+  "\375\366\360\376\370\362\376\371\363\377\373\365\377\374\366\377\374"
+  "\367\376\373\370\377\374\372\377\202\375\373\377\204\376\374\377\204"
+  "\376\376\376\2\375\375\377\374\374\376\202\374\372\377\2\375\372\377"
+  "\366\363\372\202\372\367\377\14\366\363\374\367\364\375\375\367\377\377"
+  "\373\377\364\356\372SMYWQ]OIURLVLFPOISRLV\202PHU\202PHW\1PGX\203OFY\26"
+  "K>PVHaH:^_N\202\276\256\357\266\245\365\265\245\376\261\237\377\253\233"
+  "\376\256\236\377\252\233\372\254\235\370\260\240\370\271\252\375\303"
+  "\264\377\267\250\373\257\237\370\252\231\367\245\224\362\242\221\361"
+  "\237\220\357\233\214\353\202\231\213\352%\226\213\351\225\212\346\222"
+  "\211\344\221\210\341\220\207\340\216\206\334\212\204\332\207\203\327"
+  "\205\203\326{|\316}{\317~|\317}z\311ts\267}}\261\32\32>+,>-.3//-01,3"
+  "2.653:67;78\77;<A=>C\77 at D@AFBCGCDJFGKGHLHIMIJNJKOKLPLM\203QMN\4OKLUQ"
+  "RXTUSOP\202MIJ\12PLMRNOUQRWSTYUV\\XY_[\\^Z[XTUQMN\215SOP\203RNO\6OKL"
+  "WSTRNO_[\\fbcwst\202VRS\10okltpqqmnZVWrnooklnjka]^\220SOP\3TOSSNRTPQ"
+  "\203VRSHXTU[WX^XZ`Z\\d]dg`gibjlemnfqphushxvi{xk\177zm\201|m\204}m\207"
+  "\177o\212\200p\215\203p\220\204p\223\206p\226\207q\230\211r\234\214u"
+  "\241\220y\247\223|\250\227\200\252\243\214\266\271\242\314\243\214\266"
+  "\220y\243\204m\227\207p\232\206o\231\207p\232\210q\233\214u\237\220y"
+  "\243\223|\246\224}\247\226\177\251\230\202\251\230\203\252\232\206\253"
+  "\233\212\256\236\215\261\241\220\262\244\223\265\246\227\266\251\232"
+  "\267\256\240\272\257\241\273\260\244\274\262\246\276\266\255\302\262"
+  "\251\276\370\357\377\357\346\371\365\356\376\365\357\375\366\360\374"
+  "\370\362\376\371\363\377\373\365\377\372\367\377\372\367\376\373\370"
+  "\377\374\372\377\375\373\377\376\374\377\375\375\377\376\376\377\206"
+  "\376\376\376\10\375\375\377\374\374\376\374\373\377\373\372\377\377\375"
+  "\377\370\365\374\366\363\374\372\367\377\202\375\372\377\12\351\345\363"
+  "\352\346\364\362\354\372[UcGAMMGS[UaSMYMGQICM\202QIV\202PHW\202PGX\202"
+  "PGZ8NASXJcM\77b<,]\301\261\360\266\246\361\276\257\377\255\234\372\255"
+  "\236\375\257\240\377\253\234\371\256\240\370\262\243\370\273\254\377"
+  "\304\265\377\270\251\374\261\241\372\254\233\367\247\226\362\245\224"
+  "\362\241\222\357\235\216\353\232\215\351\233\216\352\226\213\347\225"
+  "\212\346\222\211\344\221\210\341\220\207\340\216\206\334\211\203\331"
+  "\206\202\326\206\204\327\177\200\322}~\320\177\200\320|{\311|{\301po"
+  "\25165_))A++3-.).0%11)43/839:5<=8<\77;<A=>C\77 at EABFBCIEFKGH\202LHI\3"
+  "MIJOKLPLM\203QMN\7RNO\\XY]YZPLMEABHDERNO\202YUV\202XTU\202[WX\3YUVVR"
+  "STPQ\220SOP\20[WXZVWWST^Z[hde|xyHDE\77;<c_`kghokl\\XYsopmijrnolhi\220"
+  "SOP\3SNRRMQRNO\202TPQ3SOPUQRYUVYSU[UW_X_aZac\\df_gh`klaopctqdvsfztf}"
+  "ue\177vf\200xh\205zi\211\200l\217\200l\221\202l\223\203l\226\204m\231"
+  "\210q\235\214u\243\217x\246\233\204\260\245\216\270\272\243\315\242\213"
+  "\265\217x\242\205n\230\207p\232\205n\230\203l\226\204m\227\206o\231\212"
+  "s\235\214u\237\215v\240\220y\243\224~\245\226\201\250\230\204\251\232"
+  "\211\255\235\214\260\240\217\261\243\222\262\246\227\266\250\231\266"
+  "\202\256\240\272\2\261\245\275\263\247\277\202\263\252\277\2\370\357"
+  "\377\360\347\370\202\365\357\375\4\366\360\374\370\362\376\371\363\375"
+  "\373\365\377\202\372\367\376\202\374\372\377\2\375\373\376\376\374\377"
+  "\202\376\376\377\206\376\376\376\5\375\375\377\374\374\376\374\373\377"
+  "\373\372\377\373\370\377\202\376\373\377\15\371\366\377\366\363\376\370"
+  "\365\377\366\362\377\377\374\377\360\352\370\363\355\373VP\\B<HJDPA;"
+  "GRLVUOY\202PHU\202PHW\202QHY\202RI\\8XK]TF_WIlWGv\277\257\355\271\251"
+  "\362\304\262\377\257\237\370\256\237\374\260\241\376\254\236\366\256"
+  "\240\367\262\243\366\273\254\375\304\266\377\270\251\372\262\242\372"
+  "\256\235\371\251\230\364\246\225\361\241\222\357\235\216\353\233\216"
+  "\352\234\217\353\227\214\350\226\213\347\223\212\343\222\211\342\221"
+  "\211\337\217\207\335\212\205\331\207\203\327\204\202\325\202\203\325"
+  "\177\200\320\177\201\316wv\302~~\306ss\261mn\236%&D'*3),%,.\40//#21,"
+  "61882<;6:=9:@<=B>\77C\77 at EABHDEIEF\202KGH\4MIJNJKOKLPLM\202QMN\7XTU_"
+  "[\\\\XYLHIC\77 at KGHVRS\202ZVW\202VRS\202YUV\3UQRTPQWST\213SOP\207TPQ\16"
+  "\\XYWSTQMN^Z[*&'1-._[\\fbcrnogcdvrsa]^eabjfg\220SOP\3SNRRMQRNO\202SO"
+  "P\40RNOTPQXTU^XZ`Z\\c\\cd]de^fg`hh`klaoobtqbwsd{te|ue\177wg\201{h\206"
+  "}j\212{e\211|f\214~h\217\200i\223\205k\230\212p\237\217u\245\223y\250"
+  "\231\202\256\240\211\263\260\231\303\232\203\255\214u\237\202\206o\231"
+  "\1\177h\222\202\202k\225\2\206o\231\213t\236\202\215v\240\30\220y\243"
+  "\224~\245\227\202\251\227\206\252\233\212\256\236\215\261\241\220\262"
+  "\244\223\263\247\230\267\251\232\267\254\237\271\252\235\267\261\245"
+  "\275\265\251\301\264\253\300\271\260\305\367\356\377\371\360\377\365"
+  "\357\375\365\357\373\366\360\374\370\362\376\367\364\375\371\366\377"
+  "\202\372\367\376\202\374\372\377\2\375\373\376\376\374\377\207\376\376"
+  "\376\3\375\375\375\375\375\377\374\374\376\202\373\372\377\20\373\370"
+  "\377\374\371\377\371\366\377\370\365\377\376\372\377\370\364\377\366"
+  "\362\377\361\355\373\373\367\377\354\350\366LFTOIWF at LPJVF@LMGS\202NH"
+  "TDQIXRJYTK\\UL]VM`WNaWJ^SE^SEhbR\201\275\256\351\272\252\361\273\252"
+  "\372\263\244\371\262\244\374\264\246\376\260\242\371\262\244\371\265"
+  "\250\372\275\260\377\310\272\377\274\255\376\266\246\376\262\242\373"
+  "\256\236\367\253\233\364\245\226\361\241\222\355\237\222\356\240\223"
+  "\357\234\222\353\233\221\352\230\217\350\227\216\347\226\216\344\224"
+  "\214\342\217\212\336\214\210\334\206\204\330\205\206\330\201\203\320"
+  "\200\202\315zz\304}}\305|{\275\203\203\271\"#B$&2'*!),\31-.\36""00(4"
+  "/67/<94:;78>:;@<=A=>C\77 at FBCHDEJFGKGHLHINJKOKLPLM\202QMN\20TPQVRSOKL"
+  "D at AGCDUQRZVWTPQVRSSOPUQRZVWYUVSOPRNOVRS\212SOP\203TPQ\203UQR\20ZVWTP"
+  "Q_[\\XTULHIZVW,()D at AgcdeaboklgcdmijLHIXTUqmn\220SOP\3TOSRMQRNO\202SO"
+  "P\"RNOTPQXTUXRTZTV^W^`Y`b[ce^fg_jk`nm`rnauqbysd{ue\177wg\202|i\207~k"
+  "\213~h\214\177i\217\200i\223\202k\225\206l\233\213q\240\220v\246\224"
+  "z\251\232\203\257\235\206\260\253\224\276\226\177\251\217x\242\215v\240"
+  "\212s\235\202\177h\222\27\200i\223\205n\230\214u\237\217x\242\216w\241"
+  "\221z\244\226\177\251\227\202\251\227\206\252\233\212\256\236\215\261"
+  "\240\217\261\243\222\264\246\227\266\250\231\266\256\237\274\253\236"
+  "\270\262\245\277\266\252\302\261\247\277\271\260\305\356\345\372\367"
+  "\356\377\202\365\357\375\4\366\360\376\370\362\376\367\364\377\371\366"
+  "\377\202\372\367\376\4\374\372\377\375\373\377\375\373\376\376\374\377"
+  "\204\376\376\376\3\375\375\375\376\376\376\375\375\375\202\375\375\377"
+  "\20\374\373\377\373\372\377\372\371\377\374\371\377\376\373\377\373\370"
+  "\377\367\364\377\373\367\377\360\354\372\371\365\377\364\360\376\357"
+  "\353\371\373\367\377E\77ME\77KOIU\202F at LGMGSNHTOIURJYTK\\WN_YPc[Re^R"
+  "f]QgeYqVHkUHt\314\274\373\310\270\377\273\254\375\304\265\377\271\253"
+  "\377\274\256\377\270\252\377\272\255\377\274\257\376\306\270\377\317"
+  "\301\377\303\264\377\276\257\377\272\253\377\266\247\374\262\243\370"
+  "\255\237\366\250\232\361\246\231\361\250\234\362\242\230\356\240\226"
+  "\354\235\225\352\234\224\347\233\223\346\231\222\342\225\220\340\222"
+  "\217\336\220\217\335\213\215\332\204\206\320\207\212\321\202\205\314"
+  "}}\303\200\177\303uu\253!\"@\"%.&'!)*\34+,\36..&2-44.8839:67<89>:;@<"
+  "=B>\77EABFBCJFGKGHLHINJKOKLPLM\202QMN\20KGHIEF@<=;78JFG]YZ\\XYMIJSOP"
+  "PLMUQR\\XY[WXRNOPLMTPQ\212SOP\203TPQ\203UQR\20d`aOKLRNOLHIGCDZVW)%&D"
+  "@Aief\\XYa]^[WXa]^B>\77]YZ\212\206\207\220SOP\202SNR\202SOPBRNOSOPUQ"
+  "RVRS[UW]WY_X_`Y`b[ce^fh`kkcpmbsocwrd{se|tf\177vh\202yi\206{j\212}i\214"
+  "~j\217\200i\223\202k\225\204m\233\210q\237\217u\245\222x\247\226\177"
+  "\253\233\204\256\262\233\305\230\201\253\216w\243\211r\236\210q\235\204"
+  "m\231\177h\224\206o\233\216w\243\217x\244\215v\242\214u\241\221z\246"
+  "\227\200\252\230\203\252\232\206\253\234\210\255\236\212\257\236\215"
+  "\257\243\222\264\246\225\265\247\230\265\255\236\273\252\234\266\256"
+  "\241\273\261\245\275\264\250\300\307\273\323\364\350\377\364\353\377"
+  "\365\356\377\365\356\376\366\357\377\370\362\377\367\364\377\371\366"
+  "\377\202\372\367\376\5\373\371\376\374\372\377\375\373\376\376\374\377"
+  "\375\375\377\203\376\376\377\202\377\375\377\202\376\374\377\202\375"
+  "\373\377\202\374\371\377\202\375\370\377\4\374\366\377\372\364\376\371"
+  "\363\377\370\362\376\202\367\361\375\202\363\360\373\26C at KB\77JF at LGA"
+  "KICOKEQLDSNFUQHYSJ[VJ^XLbZNd[Oe^Rj\\Oi[Mn\\O}\304\263\371\304\262\377"
+  "\300\261\377\275\256\377\202\277\260\3771\302\263\377\304\265\377\307"
+  "\272\377\323\304\377\331\311\377\323\302\377\316\300\377\312\274\377"
+  "\305\270\377\301\264\377\277\262\377\274\257\376\270\255\373\266\253"
+  "\371\260\250\365\256\246\361\254\246\360\252\244\354\245\242\347\242"
+  "\237\342\236\233\336\233\230\333\231\230\334\226\227\332\220\223\326"
+  "\214\217\322\210\214\314\202\205\310\177\200\303~~\264\"#8#$(%#$%$\""
+  "'&\"+*(--///1224534867;9:=;<@>\77CABECDGEFIGHMIJ\202NJK\26OKLPLMQMNP"
+  "LMHDEA=>B>\77JFGTPQZVW]YZOKLYUVa]^^Z[TPQNJKRNOYUVUQRVRSTPQ\202QMN\5S"
+  "OPRNOOKLRNOSOP\202TPQ\24MIJkghPLMhde^Z[PLMEABOKLXTUD at A512\77;<iefjfg"
+  "c_`hdeVRSrno{wx}yz\220SOP\202SNR\202SOPDRNOSOPUQRVRS\\VX]WY_X_`Y`aZb"
+  "c\\df^ih`mmbsnbvpdzrf|tf\177ug\201xh\205zi\211|h\215}i\216\200i\223\201"
+  "j\224\204m\233\210q\237\216t\244\222x\247\231\202\256\241\212\264\271"
+  "\242\314\245\216\270\230\201\255\215v\242\207p\234\177h\224\202k\227"
+  "\205n\232\211r\236\213t\240\214u\241\216w\243\223|\250\227\200\252\221"
+  "|\243\227\203\250\236\212\257\241\215\262\240\217\261\243\222\264\247"
+  "\226\266\251\230\270\253\234\271\254\235\272\266\251\303\263\246\300"
+  "\262\246\276\274\260\310\361\345\375\364\353\377\366\355\377\365\356"
+  "\377\366\357\377\370\362\377\367\363\377\371\366\377\372\367\377\372"
+  "\367\376\202\374\372\377\3\375\373\376\376\374\377\375\375\377\203\376"
+  "\376\377\202\377\375\377\202\376\374\377\2\375\373\377\374\372\377\202"
+  "\374\371\377\6\375\370\377\374\367\376\373\365\377\372\364\376\371\363"
+  "\377\370\362\376\202\367\361\375\202\362\357\372\202A>I\34D>HF at JHBNJ"
+  "DPLDSNFUQHYSJ[WKaXLbZNf\\Ph]Qi[NhXMmZM{\276\256\367\276\253\377\272\252"
+  "\377\267\250\375\265\246\371\264\245\372\267\247\377\271\252\373\276"
+  "\256\365\310\271\374\315\275\377\307\266\377\202\276\260\375)\274\260"
+  "\374\271\255\371\270\254\370\267\253\367\267\254\370\271\256\372\271"
+  "\261\374\270\260\371\266\260\370\266\260\366\264\261\364\262\260\361"
+  "\257\255\356\255\253\354\244\244\344\240\241\342\234\235\336\226\232"
+  "\332\220\225\325\213\217\317\207\207\315\206\206\272!\"4###$\"'&!%&$"
+  "'(((+++,.-000222645978;9:><=A\77 at CABECDGEFKGH\202MIJ\4NJKPLMQMNVRS\202"
+  "UQR\17YUV]YZ\\XYVRSPLMYUV[WX\\XYYUVTPQRNOVRSZVWKGHRNO\202XTU\202VRS\32"
+  "XTUYUVb^_FBCHDETPQVRS^Z[IEF_[\\TPQSOPMIJLHIJFG734-)*956b^_gcdjfg\177"
+  "{|wst\220\214\215\212\206\207\177{|\220SOP\202SNR\202SOP#RNOSOPUQRVR"
+  "S[UW]WY_X_aZab[cc\\de]hg_llarnbvpdzqe{se~tf\200wg\204yh\210{g\214|h\215"
+  "\177h\222\201j\224\203l\232\207p\236\216t\244\222x\247\224}\251\236\207"
+  "\263\265\236\312\251\222\276\233\204\260\217x\244\207p\234\202\177h\224"
+  "\37\201j\226\204m\227\207p\232\212s\235\215v\240\220y\243\221z\244\221"
+  "|\243\227\203\250\235\211\254\240\214\257\237\216\260\241\220\262\247"
+  "\226\266\255\234\274\245\226\263\247\230\265\266\250\302\260\242\274"
+  "\267\253\303\272\256\306\371\355\377\372\361\377\366\355\377\365\356"
+  "\377\366\357\377\370\362\377\371\363\377\372\364\376\371\366\377\372"
+  "\367\376\202\374\372\377\2\375\373\376\376\374\377\204\376\375\377\203"
+  "\376\374\377\1\375\373\377\202\374\372\377\202\375\370\377\202\374\366"
+  "\377\6\373\365\377\372\364\376\371\363\377\370\362\376\370\360\375\366"
+  "\360\374\202\361\356\371X\77<G>;FB<FD>HF at LHBNLDSNFUQHYTK\\WKaYMc[Og]"
+  "Qi^Rh\\OiYNnYK|\273\253\366\271\246\377\264\244\375\261\241\372\260\240"
+  "\370\256\236\366\260\240\371\261\242\365\267\247\360\301\262\367\305"
+  "\265\377\276\255\375\265\246\367\266\247\372\263\246\370\257\242\364"
+  "\252\235\357\251\234\356\252\236\360\255\242\361\250\237\356\247\237"
+  "\354\246\237\354\247\241\353\245\242\351\245\242\347\243\240\345\241"
+  "\236\343\241\240\344\235\236\341\232\233\336\224\227\332\217\224\326"
+  "\213\216\321\210\210\316\206\206\274\37\40""2!!!\"\40%$\37#$\"%&&&))"
+  "))+*...000423645867;9:><=@>\77CABECDIEFKGHLHIMIJOKLPLMLHIOKLUQR]YZa]"
+  "^^Z[VRSOKLUQRTPQ\203SOP\2RNOPLM\202NJK\12SOPWSTTPQNJKLHIRNOZVW<89PLM"
+  "okl\202UQR\23jfgb^_C\77@@<=ZVW\\XYA=>%!\"\35\31\32:67fbcjfglhiokl\211"
+  "\205\206\202~\177\220\214\215{wxd`a\220SOP\202SNR\202SOPDRNOSOPUQRVR"
+  "SZTV\\VX_X_b[bd]ef_gh`kjbolarnbvocyqe{rd}se\177vf\203xg\207zf\211{g\214"
+  "~g\221\200i\223\203l\232\207p\236\216t\244\222x\250\223|\252\234\205"
+  "\261\254\225\301\246\217\273\226\177\253\214u\241\207p\234\201j\226|"
+  "e\221\200i\223\205n\230\211r\234\213t\236\214u\237\215v\240\216x\237"
+  "\230\204\251\231\205\252\232\206\251\234\210\253\234\213\255\240\217"
+  "\257\250\227\267\257\237\274\263\244\301\257\241\273\271\253\305\260"
+  "\242\273\273\257\307\265\251\301\366\352\377\360\347\374\365\354\377"
+  "\365\356\377\366\357\377\367\361\377\371\363\377\372\364\376\371\366"
+  "\377\372\367\376\202\374\372\377\3\375\373\376\376\374\377\375\374\377"
+  "\203\376\375\377\203\375\373\377\202\374\372\377\4\373\371\376\375\370"
+  "\377\374\367\376\374\366\377\202\373\365\377U\371\363\375\370\362\376"
+  "\367\361\375\367\357\374\366\360\374\364\356\372\360\355\370=:E<9D@:"
+  "DC=GE\77KF at LKCRNFUQHYTK\\XLbZNd\\Ph^Rj`Tj_Sk]Rp[M~\273\252\370\267\244"
+  "\377\262\241\377\257\236\374\261\240\374\255\234\370\256\235\373\260"
+  "\240\370\266\246\361\301\261\370\303\262\377\272\250\372\263\243\373"
+  "\260\240\370\252\234\364\245\227\357\240\222\352\236\220\350\235\220"
+  "\350\236\222\350\234\222\350\233\222\345\231\221\344\231\222\342\227"
+  "\223\340\226\222\336\224\220\334\222\216\330\221\220\326\217\217\325"
+  "\214\214\324\210\213\320\205\212\316\202\205\312\200\200\310\200\200"
+  "\266\34\35/\36\36\36\40\36##\36\"#!$%%%((((*)+++---1/0423645978<:;><"
+  "=A\77 at CABGCDJFGKGHLHINJKPLM\202MIJ\30OKLRNOUQRVRSUQRSOPLHIOKLSOPVRSU"
+  "QRQMNLHIHDEXTUTPQQMNNJKKGHLHIVRS`\\]plmKGH\202[WX\6]YZ=9:EABFBC\13\7"
+  "\10\14\10\11\202\3\0\0\14$\40!EABPLMUQRsopplmmij\202~\177sop|xyeabQM"
+  "N\220SOP\202SNR\202SOP\36RNOSOPUQRVRSXRT[UW_X_c\\cf_gibjkcnmerk`qmau"
+  "ocwpdzrd}se\177vf\203xg\207{g\212|h\215~g\221\200i\223\203l\232\207p"
+  "\236\216t\244\221w\247\230\201\257\241\212\270\202\252\223\301\7\227"
+  "\200\254\212s\237\204m\231~g\223\177h\222\203l\226\207p\232\202\211s"
+  "\232\4\213u\234\220z\241\224~\245\232\206\253\202\227\203\246\26\234"
+  "\210\253\241\216\256\245\222\262\250\227\267\256\236\273\252\233\270"
+  "\252\234\266\262\244\276\254\236\267\266\252\302\257\243\271\367\353"
+  "\377\364\353\377\365\354\377\365\356\377\366\357\377\367\361\377\370"
+  "\362\377\372\364\376\373\365\377\373\366\375\373\371\376\202\374\372"
+  "\377\1\375\373\377\204\376\374\377\6\375\373\377\374\372\377\374\371"
+  "\377\373\370\377\375\370\377\374\367\376\202\374\366\377\202\373\365"
+  "\377\3\372\364\377\371\363\377\371\361\377\202\367\357\376$\365\357\375"
+  "\364\356\372\360\355\370;8C:7B\77""9CB<FD>JE\77KJBQMETPGXSJ[WKaZNd\\"
+  "Ph^Rh`ThaUk_Tr]O\200\273\252\370\267\243\377\262\241\377\260\236\377"
+  "\257\236\376\253\232\372\254\232\375\257\236\372\266\245\363\277\257"
+  "\370\300\257\377\265\243\371\257\236\372\251\230\366\242\223\362\203"
+  "\236\217\3560\234\216\355\232\215\351\233\220\354\231\217\350\227\217"
+  "\345\226\216\343\223\216\342\222\215\337\217\212\334\216\211\331\211"
+  "\206\323\206\206\320\205\205\317\201\203\315~\202\311|\177\306{{\303"
+  "zy\262\30\31+\34\34\34\36\34!!\34\40\"\40#$$$'''(*)***,,,0./31264586"
+  "7<:;><=@>\77B at AGCDIEFJFGLHINJKPLMZVWXTUVRSSOPQMNOKL\202NJK(QMNVRSZVW"
+  "YUVUQRSOPTPQWST[WXRNOOKLUQR[WX]YZ_[\\d`aGCDVRS_[\\A=>RNOQMNEAB\10\4\5"
+  "\26\22\23\77;<XTU[WXc_`jfgoklxtukghlhimij\201}~njktpqeab\\XY\220SOP\202"
+  "SNR\202SOP'RNOSOPUQRVRSVPRZTV_X_d]dg`hibjkcnldqk`ql`tocwpdxrd}tf\177"
+  "wg\204yh\210|h\213}i\216\177h\222\201j\224\203l\230\207p\236\215s\243"
+  "\221w\247\220y\247\236\207\265\246\217\275\261\232\310\234\205\261\214"
+  "u\241\204m\231|e\221\201j\224\203l\226\204n\225\202\203m\224\35\210r"
+  "\231\222|\243\231\203\251\227\203\246\225\201\244\230\204\247\242\216"
+  "\261\251\226\266\252\227\267\247\227\264\251\231\266\262\244\276\267"
+  "\251\303\271\253\304\264\246\277\260\244\272\245\231\257\360\344\372"
+  "\365\351\377\365\354\377\364\355\375\365\356\376\367\361\377\370\362"
+  "\376\372\364\376\373\365\377\373\366\375\372\370\375\373\371\376\202"
+  "\374\372\377\204\375\373\377\202\374\372\377\202\373\370\377\2\374\367"
+  "\376\373\366\375\203\373\365\377V\372\364\377\371\363\377\370\362\376"
+  "\370\360\377\367\357\376\366\356\375\365\357\375\365\357\373\357\354"
+  "\367:7B85@=7AA;EC=ID>JIAPLDSOFWRIZWKaYMc\\Ph^Rh^Rf`Tj`Us]O\200\272\251"
+  "\371\264\240\377\260\236\377\257\235\377\256\234\377\252\230\374\253"
+  "\231\377\257\236\374\267\246\366\300\260\373\277\255\377\262\237\370"
+  "\257\236\376\250\226\371\240\220\363\236\216\361\237\217\362\240\220"
+  "\363\234\216\360\230\212\353\225\212\352\223\210\346\221\210\343\220"
+  "\207\340\215\207\337\215\207\335\213\205\333\212\205\331\210\205\324"
+  "\205\204\322\203\202\320\177\201\314{\177\310y|\303ww\301vu\256\26\27"
+  ")\32\32\32\34\32\35\40\33\37!\37\40###%%%&('(((***/-.201534978<:;\77"
+  "=>@>\77B at AGCDIEFKGHLHINJK\202PLM\7SOPVRSWSTUQRQMNMIJKGH\202WST\7UQRP"
+  "LMLHIPLM[WXd`a\\XY\202RNO\31^Z[c_`ZVWNJKJFGZVW\\XY[WXhde]YZ\30\24\25"
+  "\16\12\13\"\36\37\\XYhdegcdhdextuzvwgcdYUVfbckghrno\207\203\204\202n"
+  "jk\2`\\]\\XY\220SOP\202SNR\202SOP$RNOSOPUQRVRSWQSZTV_X_c\\cd]ee^fe]h"
+  "e]jj_olarnbvpdxse~ug\200xh\205zi\211}i\214~j\217\200i\223\202k\225\203"
+  "l\230\207p\234\215s\242\220v\245\211r\240\232\203\261\241\212\270\264"
+  "\235\313\237\210\264\217x\244\207p\232~g\221\202\177h\222\35\200j\221"
+  "\202l\223\206p\226\215w\235\225\177\245\232\204\252\232\204\250\231\203"
+  "\247\236\210\254\250\222\266\253\230\270\250\225\265\244\224\261\245"
+  "\225\262\210x\223\216~\231\213}\226\230\212\243\236\220\247\243\225\254"
+  "\361\345\373\370\354\377\365\354\377\365\354\375\365\356\376\367\361"
+  "\377\370\362\376\371\363\375\372\364\376\202\373\366\375\1\374\367\376"
+  "\202\373\370\377\204\374\371\377\202\373\370\377\2\375\367\377\374\366"
+  "\377\202\373\365\377\204\372\364\377\34\372\362\377\371\361\377\370\357"
+  "\377\367\356\377\366\355\376\364\356\374\364\356\372\356\353\36674\77"
+  "63>;5\77\77""9CA;GB<HH at OJBQNEVRIZVJ`YMc\\Ph^Rh]Rc`Th`Us]O\200\270\247"
+  "\367\262\236\377\203\255\233\377H\251\227\375\253\230\377\261\237\377"
+  "\272\250\374\302\261\377\277\255\377\260\235\371\256\234\377\251\227"
+  "\373\242\221\367\237\216\364\236\215\363\234\213\361\230\211\356\224"
+  "\206\350\225\211\353\223\210\350\220\206\346\217\206\343\215\207\341"
+  "\214\206\336\212\204\334\211\203\331\204\200\324\202\201\321\177~\316"
+  "{}\312x|\305vx\302ts\277sr\253\26\27)\31\31\31\33\31\34\36\31\35\36\34"
+  "\35\40\40\40\"\"\"\"$#&&&))).,-1/0534978=;<\77=>A\77 at CABHDEJFGKGHMIJ"
+  "OKLPLMD at AJFGQMNUQRTPQRNOPLMNJKSOPQMNNJKMIJOKLTPQ[WX_[\\YUV\202OKL\7Y"
+  "UVXTUJFG\77;<>:;\3\0\0$\40!\202\3\0\0\24\12\6\7\25\21\22@<={wxc_`qmn"
+  "mij`\\]\\XY_[\\mij\205\201\202mijnjkqmn\204\200\201hdefbcXTUVRS\220S"
+  "OP\202SNR\202SOP*RNOSOPUQRVRSXRT[UW_X_aZaaZb`Ya`Xc_Wdj_olarnbvpdxse|"
+  "ug\200yi\204{j\212\177k\216\177k\220\201k\222\202k\225\204m\231\207p"
+  "\234\215s\242\220v\245\220y\247\237\210\266\242\213\271\267\240\316\240"
+  "\211\265\216w\243\206o\231~g\221}f\220~g\221\202l\223\211s\232\221{\241"
+  "\227\201\247\202\232\204\252\27\240\212\256\237\211\255\243\215\261\251"
+  "\223\267\250\224\267\242\217\257\240\217\257\244\224\261\301\261\316"
+  "\273\253\306\243\225\257\261\243\274\265\247\300\271\253\302\367\353"
+  "\377\362\346\374\365\354\377\365\354\375\365\357\375\366\360\376\370"
+  "\362\376\371\363\377\372\364\376\203\373\366\375\2\372\367\376\373\370"
+  "\377\204\374\371\377\202\373\370\377\202\374\366\377\202\373\365\377"
+  "\204\372\364\377\4\372\362\377\371\361\377\370\357\377\366\355\376\202"
+  "\365\354\375U\363\355\373\354\351\36463>41<:4>>8B@:FA;GG\77NJBQMDUQH"
+  "YVJ`YMc\\Ph^Rh^SdaUiaVt]O\200\270\247\367\261\235\377\254\232\377\254"
+  "\231\377\253\230\377\250\225\376\252\227\377\260\236\377\272\250\376"
+  "\303\261\377\276\253\377\256\232\371\247\225\370\245\223\371\240\217"
+  "\365\236\215\363\233\212\360\232\211\357\227\210\355\226\210\352\225"
+  "\211\353\222\207\347\217\205\345\215\204\341\211\203\335\207\201\331"
+  "\205\177\327\204~\324\200|\321}{\316|z\315y{\310vz\304uw\301ts\277ts"
+  "\254\26\27)\31\31\31\32\30\33\35\30\34\35\33\34\35\35\35\37\37\37\36"
+  "\40\37%%%'''-+,1/0423978=;<\77=>B at ADBCIEFKGHLHIMIJOKLPLMSOPUQRVRSTPQ"
+  "PLM\202MIJ\12NJKOKLNJKPLMWST`\\]b^_]YZVRSOKL\202FBC\35NJKOKLHDELHIXT"
+  "U\210\204\205\211\205\206<89ZVWyuvfbcXTU\211\205\206\236\232\233\214"
+  "\210\211mij`\\]iefgcd_[\\a]^uqrnjkjfg|xyd`agcd_[\\a]^\210RNO\13XTUSO"
+  "PVRS]YZYUVOKLPLMYUVPKOSNRRNO\202MIJCRNOWSTYUV\\VX]WY`Y`e^ee^fc\\dd\\"
+  "giank`plarnbvocwrd{tf\177xh\203{j\212vb\205|h\215\201k\222\200i\223\200"
+  "i\225\205n\232\215s\242\220v\245\222{\247\216y\244\240\213\266\260\233"
+  "\306\243\216\271\221|\247\211t\235\205p\231\216y\240\210s\232\205p\227"
+  "\212u\234\227\203\250\243\217\264\250\224\271\251\225\272\261\233\301"
+  "\254\226\274\244\216\264\235\207\253\231\205\250\235\212\252\241\216"
+  "\256\242\217\255\252\232\267\237\217\252\260\242\274\301\263\314\327"
+  "\311\342\325\307\340\315\277\330\373\357\377\357\346\371\374\363\377"
+  "\365\355\374\366\356\375\375\365\377\372\362\377\370\362\374\367\361"
+  "\373\203\373\366\375\1\374\367\376\203\372\367\377\1\373\370\377\202"
+  "\374\366\377\202\373\365\377\202\372\364\377\202\373\363\377\22\372\362"
+  "\377\362\351\372\370\357\377\364\353\374\372\361\377\363\352\375\373"
+  "\357\377\362\351\372\356\350\366\362\357\37263>52=93=3-7\77""9EB<HC;"
+  "JIAP\202LCT\32QE[XLb]Qi^RhaUi_Si_Tr^P\201\262\241\361\256\232\373\260"
+  "\236\377\252\230\376\251\227\375\251\226\377\254\231\377\263\241\377"
+  "\276\253\377\302\260\377\271\246\377\256\232\371\247\225\370\245\223"
+  "\367\242\222\365\236\216\361\232\212\355\230\210\353\202\227\211\353"
+  "\"\223\207\351\221\206\346\217\206\343\216\205\340\213\205\337\211\203"
+  "\333\206\200\330\205\177\325\203\177\324~|\320tr\305\201\202\322or\277"
+  "su\300ww\301sr\253\25\26(\32\32\32\34\32\35\36\31\35\35\33\34\35\35\35"
+  "\37\37\37\40\"!$$$'''+)*.,-1/0534:89><=:89@>\77\203GCD3JFGOKLQMNNJKL"
+  "HIQMNWSTQMNFBCGCDSOPa]^XTUQMNTPQ]YZb^_]YZVRSc_`]YZSOPJFGIEFNJKOKLNJK"
+  "ZVWFBCSOP\214\210\211\271\265\266\266\262\263\237\233\234\222\216\217"
+  "qmnvrs\177{|\204\200\201\203\177\200\220\214\215ZVW[WXxturnogcda]^d`"
+  "aiefd`aZVW\203SOP\202TPQ\203UQR\16NJKOKLRNOWSTXTUVRSZVWa]^KFJSNRZVWX"
+  "TUTPQSOP\202TPQ\4TNPUOQZSZ`Y`\202b[c\4e]hjboshxrgx\202rfz\6se|tf\177"
+  "ue\200ue\202~k\213~j\215\202~h\217\26\177h\224\200i\225\204j\231\203"
+  "l\232\224}\251\223~\247\240\213\266\254\227\300\244\217\272\224\177\250"
+  "\214w\240\213v\237\210s\232\217z\241\234\207\256\252\225\274\264\240"
+  "\305\263\237\304\254\230\275\244\220\265\236\210\256\232\204\252\202"
+  "\226\200\246\24\230\204\251\234\210\253\237\213\256\241\216\256\251\230"
+  "\270\253\233\270\275\256\313\276\260\312\274\256\310\264\246\277\272"
+  "\254\305\362\346\374\366\352\376\364\353\374\362\352\371\373\363\377"
+  "\372\362\377\365\355\372\375\367\377\376\370\377\204\373\366\375\204"
+  "\371\366\377\202\372\364\376\202\372\364\377\202\371\363\377l\372\362"
+  "\377\371\361\377\366\355\376\377\366\377\364\353\374\376\365\377\365"
+  "\354\377\356\345\370\370\354\377\356\345\366\354\346\364\360\355\370"
+  ")&1/,7=7A:4>A;G60<D<KH at OKBSMDUSG]ZNd[OgYMc[OcbVnaVtZL}\276\255\373\263"
+  "\237\376\256\234\377\245\223\367\251\227\373\251\227\375\254\231\377"
+  "\265\243\377\276\253\377\276\254\377\264\241\375\253\227\370\246\224"
+  "\367\244\222\365\240\220\363\234\214\356\231\211\354\227\207\351\226"
+  "\210\352\226\210\351\221\206\346\220\205\343\215\204\337\214\203\334"
+  "\211\203\333\207\201\327\205\177\325\203}\323\200|\323}{\317xv\312|}"
+  "\315nq\276rt\276oo\271kk\241\21\22$\26\26\26\30\26\31\33\26\32\32\30"
+  "\31\33\33\33\36\36\36\37!\40***,,,/-.0./201423756978\77=>@>\77C\77 at E"
+  "ABGCDIEFKGHLHITPQUQRWSTTPQIEFA=>GCDRNOSOPUQRZVWa]^fbceab^Z[YUV\\XYSO"
+  "P\202MIJ\34QMNRNOPLMNJK\\XYb^_sop\177{|plmUQRPLM]YZ[WX^Z[kgh\202~\177"
+  "\211\205\206\215\211\212OKLHDEd`ab^_\\XYYUVd`aplmhdeWST\210RNO\16QMN"
+  "UQRTPQNJKJFGMIJOKLNJKMHLTOSZVWYUVTPQRNO\202SOP\4[UW\\VX_X_aZa\202`Ya"
+  "\34bZef^kncsmbslarnbvrd{tf\177vf\201ue\202~k\213xd\207xb\211\177i\220"
+  "\205n\232\207p\234\212p\237\213t\240\215v\240\222}\244\234\207\260\250"
+  "\223\272\256\231\302\245\220\267\235\210\257\240\213\262\244\217\266"
+  "\246\221\270\202\251\224\273\34\244\217\266\233\206\255\220{\242\211"
+  "t\233\221{\242\216x\237\217y\240\226\200\246\234\206\254\235\207\253"
+  "\236\212\255\242\217\257\242\221\261\244\224\261\263\243\300\263\243"
+  "\276\265\247\301\267\251\303\277\261\313\352\336\366\375\361\377\364"
+  "\353\374\362\352\371\375\365\377\372\362\377\365\355\372\377\367\377"
+  "\376\366\377\204\372\364\376\206\371\363\377\202\370\362\377\2\371\361"
+  "\377\370\360\377\202\370\357\377\11\367\356\377\364\353\374\372\361\377"
+  "\347\336\361\367\353\377\371\355\377\374\360\377\366\355\377\366\360"
+  "\376\20230;==:E,&082<5/;A;GD<KF>MH\77PLCTTH^ZNdYMeVJbYMcbUoYNnTFw\273"
+  "\252\370\261\236\372\260\237\375\253\232\372\254\233\373\252\230\373"
+  "\256\234\377\271\247\377\300\255\377\272\250\376\257\233\372\251\225"
+  "\366\244\222\365\242\221\361\236\216\360\233\214\353\230\210\352\226"
+  "\207\346\224\206\347\224\206\345\220\205\343\217\204\340\214\203\334"
+  "\213\203\331\210\202\330\206\201\325\203~\322\201|\320\177{\320|z\316"
+  "yw\313uv\306mq\273vx\302ss\275zz\260\21\22$\25\25\25\30\26\31\33\26\32"
+  "\32\30\31\34\34\34\37\37!\40!#\202%%%\13(&'+)*0./423756867@>\77;9:>:"
+  ";FBCNJK\202OKL\27QMNKGHSOPTPQKGHC\77 at GCDSOP[WXMIJTPQ[WX^Z[[WXUQROKLL"
+  "HIVRSKGHIEFSOPXTUSOP\202NJK\20QMNWST^Z[a]^ZVWRNOTPQ\\XYhde[WXQMNc_`h"
+  "denjkFBCOKL\202sop\6gcd]YZeabsopjfgTPQ\202UQR\1TPQ\202SOP\1RNO\202QM"
+  "N$XTU]YZXTUJFGD at AJFGIEFB>\77WRVTOSPLMNJKOKLSOPVRSXTU]WY^XZ_X_`Y`_X``"
+  "Yac[ff^kj_oh]nf[li^opbyvh\177zj\205zj\207\200m\215xd\207yc\212\203m\224"
+  "\202\211r\236\10\216t\243\222{\247\214v\235\225\201\246\234\207\256\252"
+  "\225\274\274\247\316\271\244\313\202\255\230\277\4\252\225\274\243\216"
+  "\265\231\204\253\220{\242\202\214w\236\26\216y\242\220{\242\216w\241"
+  "\214v\235\221{\242\231\203\252\233\205\254\232\204\252\234\210\255\242"
+  "\216\261\254\233\275\250\227\267\255\234\274\257\237\274\271\252\307"
+  "\276\260\312\272\254\306\312\276\326\354\340\364\367\356\377\363\353"
+  "\372\365\355\374\202\374\364\377\2\375\365\377\371\361\374\202\373\365"
+  "\377\202\372\364\376\1\371\363\377\202\370\362\376\1\367\361\375\202"
+  "\370\362\376\4\370\362\377\367\361\377\370\360\377\367\357\376\202\367"
+  "\356\377\26\361\350\371\377\367\377\363\352\375\367\356\377\377\371\377"
+  "\347\333\361\356\342\370\356\345\370\351\343\361(%030;(%04.8<6@=7C5/"
+  ";B:ID<KG>OKBSRF\\VJ`\202XLd\6YLf_RnXMord\225\266\246\361\262\237\371"
+  "\202\263\243\3745\257\236\372\255\234\372\263\241\377\277\256\377\303"
+  "\261\377\270\246\374\256\232\371\252\226\371\244\223\363\241\220\360"
+  "\234\215\354\231\212\351\227\210\347\225\206\345\223\205\344\222\204"
+  "\343\220\205\341\217\204\340\214\203\334\212\202\330\207\202\326\205"
+  "\200\324\203~\320\200{\317yu\312wu\311}{\316yz\312rv\300or\271cc\253"
+  "jj\236\22\24#\26\26\24\30\26\27\33\26\32\32\30\31\34\34\34\37\37!\40"
+  "!#!!!\40\40\40\"\40!&$%.,-534:89<:;A\77@<:;A=>LHISOP\202PLM\2SOPEAB\202"
+  "MIJ\202D at A\10QMNZVWYUV\\XY]YZ_[\\^Z[\\XY\202ZVW\13YUVRNOJFGLHIVRSWST"
+  "MIJLHIUQRief`\\]\202VRS\25b^_lhifbcZVWb^_eaba]^vrsgcdUQR401FBCjfgplm"
+  "jfga]^lhi\204\200\201\206\202\203xtuTPQ\202UQR\3VRSWSTXTU\202YUVPSOP"
+  "YUVVRSMIJOKLYUV\\XYUQR^Y]SNRJFGLHIUQR[WXZVWWSTUOQXRTZSZ[T[]V^aZbg_jk"
+  "cpodtlaqi^ok`qrd{xj\201}m\210~n\213\204q\221~j\215\177i\220\203m\224"
+  "\203l\230\177h\224\203i\226\211r\234\231\203\251\241\215\260\244\220"
+  "\265\256\232\277\301\255\322\277\253\320\254\227\276\242\215\264\220"
+  "{\244\212u\236\204o\230\203n\227\206q\232\213v\237\215x\243\215x\241"
+  "\211r\236\215t\236\221z\244\227\200\252\226\177\251\226\200\247\233\206"
+  "\255\245\221\266\252\226\273\254\230\273\261\240\302\261\240\300\262"
+  "\241\301\264\244\301\262\243\300\273\256\310\305\271\315\366\355\376"
+  "\371\361\377\357\347\366\374\364\377\377\367\377\373\363\376\374\364"
+  "\377\202\373\365\377\202\372\364\376\2\371\363\377\370\362\376\204\367"
+  "\361\377\202\370\360\377\202\367\356\377\202\366\355\376\2\373\362\377"
+  "\367\356\377\202\361\345\373]\352\336\364\377\365\377\372\356\377\360"
+  "\347\3741+9/,7(%0:7B3-70*460<93\77=5D at 8GE<MH\77PMAWQE[XLd^Qk^Qm`Rsg["
+  "\177\260\242\323\276\256\367\271\247\375\262\243\370\261\242\365\262"
+  "\243\370\261\241\371\267\246\377\302\261\377\304\262\377\270\246\374"
+  "\256\232\371\255\231\374\244\223\363\241\220\360\234\215\354\231\212"
+  "\351\227\210\347\226\207\346\223\205\344\222\204\343\217\204\340\215"
+  "\202\336\212\201\332\211\201\327\205\200\324\203~\322\201|\316\177z\314"
+  "~z\316tr\305wu\310su\302os\274lo\264nn\264tt\250\22\24#\25\25\23\27\25"
+  "\26\31\25\26\27\25\30\31\31\33\34\33\40\35\36\40'''%%%%#$(&'/-.645<:"
+  ";><=CABA\77 at FBCNJKLHID@AA=>EABJFGNJKKGHEABKGHVRSUQRJFGTPQ\202RNO_UQR"
+  "ZVW\\XYZVWXTUKGHJFGOKLUQRQMNKGHTPQc_`d`ahdeeab[WXVRSZVW[WXWSTPLM^Z[Q"
+  "MNVRS401\40\34\35!\35\36IEFfbcnjklhib^_c_`njkmijb^_KGHLHINJKPLMRNOUQ"
+  "RVRSWSTPLMQMNPLMOKLTPQ\\XY^Z[[WX\\W[SNROKLVRS_[\\a]^YUVQMNb\\^c]_c\\"
+  "c_X_]V^`Yae]hg_jk`pi^nh]nk`qrd{xj\201|l\207~n\213wd\204wc\206{e\213\177"
+  "i\220\177h\222\177h\224\210n\233\220y\243\237\211\257\243\217\262\245"
+  "\221\264\253\227\272\270\244\311\271\245\312\247\222\271\226\201\250"
+  "\214w\240\210s\234\202\204o\230\35\204o\232\202m\230}h\223xc\216\206"
+  "l\231\214r\237\220y\245\223|\246\224}\247\231\202\254\241\214\263\251"
+  "\224\273\241\215\262\244\220\265\250\227\271\254\233\275\257\236\300"
+  "\263\242\302\272\253\312\300\262\314\261\245\271\357\346\367\375\365"
+  "\377\365\355\374\374\364\377\371\361\376\371\361\374\377\370\377\373"
+  "\365\377\202\372\364\376\1\371\363\375\202\370\362\376\202\367\361\377"
+  "\202\366\360\376\202\367\357\376\202\366\355\376\202\365\354\375a\361"
+  "\350\373\357\346\371\367\353\377\360\344\372\376\362\377\343\327\355"
+  "\353\337\367\365\354\3774.<\40\35(&#.30;)#-5/94.:=7C:2A=5DB9JF=NI=SM"
+  "AWVJb_Rli\\zfX{ma\207\324\306\371\300\260\367\276\254\376\264\246\365"
+  "\263\245\364\265\247\366\266\247\372\274\254\377\302\262\377\301\257"
+  "\377\266\244\370\257\233\374\255\230\375\246\224\367\242\221\361\235"
+  "\216\355\232\213\352\231\212\351\230\211\350\224\206\345\222\204\343"
+  "\216\203\341\214\201\335\211\200\333\207~\327\204~\324\202}\321\177z"
+  "\316}x\312\200|\320vu\305rq\301pr\275nr\271mp\265xx\276cc\225\23\25\""
+  "\26\27\22\27\26\24\31\25\26\27\25\30\30\30\32\34\33\40\35\36\"##%###"
+  "%#$(&'.,-534;9:><=867:89A=>D at AA=>:67956>:;EABFBCGCDKGHTPQ\\XYYUVQMNU"
+  "QR\202SOP\35UQRVRSRNOHDE\77;<D at AKGHQMNPLMNJKRNO`\\]lhiRNOYUV\\XYWSTR"
+  "NOTPQXTU[WXRNO]YZ:673/0\23\17\20\25\21\22<89sop\202lhi\6gcd^Z[TPQHDE"
+  "956-)*\203NJK\202MIJ\1LHI\202KGH4RNOMIJKGHQMNTPQSOPRNOSOPZUYUPTTPQXT"
+  "UZVWWSTRNOPLMd^`f`bc\\c]V][T\\^W_bZec[fdYieZjg\\mj_pn`wpbysc~sc\200f"
+  "SskWzs]\203xb\211~g\221\206o\231\223y\246\232\203\255\227\201\245\231"
+  "\206\246\236\213\253\241\216\256\247\223\266\260\234\277\253\227\274"
+  "\231\204\253\223~\247\217z\243\211t\237\205p\233\204\203m\233\30\207"
+  "m\234\216t\241\223y\246\222x\245\224}\247\235\206\260\243\216\267\244"
+  "\217\266\251\225\272\245\221\266\242\221\265\253\232\274\257\236\300"
+  "\262\241\301\266\247\306\263\245\277\265\251\275\323\310\331\346\336"
+  "\355\370\360\377\374\364\377\366\356\373\372\362\375\375\365\377\202"
+  "\372\362\375\202\370\362\376\202\367\361\375\202\366\360\376\202\366"
+  "\356\375\203\365\354\375\1\364\353\374\202\364\353\376\"\370\354\377"
+  "\365\351\377\364\350\376\373\357\377\362\346\376\361\345\375\353\337"
+  "\367.%:\"\34*41<1.9(%05/9-'160<3-991@:2A\77""6GD;LI=SL at VSG_[NhfXyeW{"
+  "dX~\321\303\366\304\264\373\305\264\377\275\257\374\275\257\372\271\253"
+  "\366\276\260\377\202\302\263\377\7\276\254\376\267\245\371\261\235\376"
+  "\256\231\376\250\226\371\244\222\365\236\216\360\202\233\213\355/\232"
+  "\212\354\226\210\351\224\206\345\217\204\342\215\202\336\212\201\334"
+  "\210\177\330\205\177\325\202}\321\200{\317}x\314tq\302xw\307wv\304wy"
+  "\303rw\273fi\254_`\243\22\22D\23\25\"\26\27\22\27\26\24\31\25\26\30\26"
+  "\31\31\31\33\35\34!\37\40$\33\33\35\35\35\35#!\"'%&+)*0./312645)'(.,"
+  "-734:67;78=9:C\77 at HDEEABFBCLHITPQ\202YUV\2[WX`\\]\202iefrhdec_`[WXSO"
+  "PKGHGCDIEFSOPTPQMIJOKL]YZeabc_`d`a\\XYUQRVRSWSTUQROKLKGHMIJhdeTPQgcd"
+  "`\\]d`awst\213\207\210eabUQRMIJUQR\\XYWSTPLMOKL`\\]^Z[ZVWUQROKLJFGFB"
+  "CD at ARNOHDEIEFUQRZVWUQRTPQYUV\\W[XSWTPQPLMJFGGCDLHITPQICEMGKPJNOHOSLS"
+  "]V^f_gjbmg\\ji^nlaqlark^rhZqfVpdToeRpjWwq[\201s]\204yc\212\204m\227\220"
+  "v\243\223|\246\220z\240\222~\241\232\204\250\231\205\250\232\204\252"
+  "\251\225\272\260\232\301\240\213\262\221z\244\214w\242\206o\233}h\223"
+  "yb\220yc\221\200i\227\204m\233\211r\240\217x\246\222x\245\215v\242\222"
+  "{\245\235\206\260\236\211\262\230\203\252\237\212\261\236\212\257\241"
+  "\220\264\254\233\277\202\255\234\276\11\264\243\303\260\241\276\267\253"
+  "\301\252\237\260\300\267\310\361\351\370\374\364\377\367\357\374\377"
+  "\370\377\202\371\361\376\1\370\360\375\202\367\361\377\202\366\360\376"
+  "\4\366\357\377\365\356\376\365\354\375\364\353\374\202\364\353\376\204"
+  "\363\352\375+\365\351\377\364\350\376\361\345\373\357\343\371\350\334"
+  "\362\361\345\373*\36""4-$7.(6-*5#\40+0-6'!+60:/)560<91 at 90A=4ED;NK\77"
+  "UL at VPDZVJbSFb\\No]Qw\313\275\360\324\305\377\324\303\377\307\267\377"
+  "\302\265\375\276\261\366\304\267\375\307\271\377\303\265\377\276\256"
+  "\371\270\246\370\263\237\377\257\232\377\251\227\373\245\223\366\237"
+  "\217\361\202\234\214\357\40\232\214\356\227\211\353\223\210\350\221\206"
+  "\346\217\206\343\215\204\341\211\203\335\207\201\331\204\200\325\201"
+  "}\321\177|\315yx\310|~\313oq\276km\270kn\265lp\260pp\260\11\12""6\16"
+  "\20\34\22\23\16\23\22\16\26\22\21\25\23\24\30\26\31\33\32\"\36\35#\34"
+  "\34\36\40\40\40'%&*())'(\203(&'#'%&,*+3/0623;78EABNJKRNOVRSUQRZVW_[\\"
+  "VRSKGHOKL^Z[WSTYUVWSTPLMGCDEABLHITPQSOP\\XYXTULHIRNOc_`b^_RNOWSTRNOQ"
+  "MN\202VRS_PLMSOPZVWNJKeabJFGiefxtu\212\206\207\225\221\222\224\220\221"
+  "\203\177\200`\\]JFGVRSiefmijqmnyuvRNOSOPUQRWSTZVW]YZ^Z[_[\\^Z[TPQNJK"
+  "SOPUQRQMNNJKPLMNJKGCDEABJFGNJKMIJLHIMIJNIMKFJD\77CRMQE at D_Z`e`fg`gf\\"
+  "gk`nmbpj_om`ruh||m\204{k\205\202r\217wf\206wc\206}i\216\177j\221\201"
+  "l\223\202k\225~g\221\217y\240\223}\244\227~\250\225~\250\237\205\262"
+  "\250\221\275\255\223\300\246\217\273\214r\237\207p\236\203i\230zc\221"
+  "{a\216}f\222\205k\230\207p\234\213t\240\215x\243\224}\251\215x\243\227"
+  "\202\253\230\203\254\236\211\260\230\203\252\236\211\260\240\213\262"
+  "\245\221\266\252\226\273\202\254\230\273\3\257\233\276\261\240\300\261"
+  "\243\274\202\271\255\303\3\253\237\263\373\360\377\367\354\374\202\367"
+  "\357\376\2\365\355\374\375\365\377\202\371\360\377\5\370\357\377\361"
+  "\350\375\364\354\377\366\356\377\363\352\377\203\365\351\377\202\364"
+  "\350\376\36\365\351\377\366\352\377\357\346\371\360\347\372\362\351\374"
+  "\356\345\370\354\343\366-$71(;(\37""0-'5*'2*'0*'.,'.-(/0(32*99.\77<0"
+  "D\77""3IB6LF8OI;RM at TOCWSHYOE]\327\313\361\304\266\353\202\320\277\377"
+  "\17\316\276\377\326\306\377\320\302\377\324\307\377\322\305\375\310\272"
+  "\365\273\256\363\266\250\367\262\241\377\260\236\377\253\231\375\247"
+  "\225\370\242\220\364\236\216\361\234\213\361\202\231\212\357\"\226\212"
+  "\356\222\210\353\217\210\350\215\206\343\212\205\337\210\204\333\204"
+  "\202\326\201\177\322|}\315ux\307v|\310nq\300vx\305mo\271no\257ii\237"
+  "\20\20""2\21\24\35\21\22\15\20\20\6\22\22\10\25\24\20\27\25\30\32\26"
+  "$\35\31'\37\35\"%#$'%&%#$'%&1/0978<:;DBC\202:89\6CABGEFHFGFDE@>\77WS"
+  "T\202a]^\10UQRQMNVRSQMND at AB>\77JFGMIJ\202HDE\12PLMUQRTPQYUV[WXb^_OKL"
+  "^Z[[WXd`a\202VRS\11QMNPLMUQRWSTTPQRNOSOPTPQSOP\203QMN\14SOPTPQVRSlhi"
+  "}yz\215\211\212\224\220\221\227\223\224\225\221\222\211\205\206{wxSO"
+  "P\202TPQ\3VRSWSTXTU\202YUV\3[WXUQRTPQ\202YUV\7RNOPLMRNOFBCB>\77C\77@"
+  "KGH\202PLMJOKLQMNIDHPKOVQUjeiXSWd_c\\W[WRX`V_bXcdYgh]kqdvyl~}n\205|l"
+  "\206|l\207sc\200t`\203ye\210ze\214\177j\221\205n\230\204m\227\215t\236"
+  "\217v\240\220v\243\221w\244\227}\254\243\211\270\253\221\300\257\225"
+  "\304\226|\253\220v\245\210n\235\200f\225{a\216z`\215~e\217\200i\223\201"
+  "j\226\205p\233\221|\247\222}\250\234\207\260\232\205\256\237\212\261"
+  "\233\206\255\242\215\264\241\214\263\242\216\263\245\221\266\247\223"
+  "\266\251\225\270\255\231\274\260\237\277\271\253\305\243\227\257\272"
+  "\256\306\277\263\311\264\250\274\271\256\277\353\342\363\377\366\377"
+  "\372\361\377\361\350\371\354\343\366\356\345\370\364\353\377\371\357"
+  "\377\364\354\377\357\345\375\203\364\350\377\1\363\347\375\203\362\346"
+  "\374\12\363\347\373\357\346\371\370\357\377\353\342\363\352\341\3626"
+  "->-$5!\30)2,:)&1\202)&/C)&-,'-/*14,77/<;0A=1E at 4JB6NF8OI;RM at TODUZNbKA"
+  "\\\315\300\353\316\277\372\314\272\377\313\270\377\313\272\377\321\302"
+  "\377\324\306\377\330\313\377\327\313\373\317\302\367\303\267\367\273"
+  "\255\372\264\243\377\257\235\377\254\233\373\251\230\370\245\223\366"
+  "\241\221\363\236\220\362\234\215\362\231\215\361\226\214\355\225\213"
+  "\354\221\212\351\216\211\345\213\206\340\210\206\332\205\203\326\177"
+  "\200\320|\177\316~\204\322w}\313sv\305mo\274kk\263ww\263st\240\10\11"
+  "%\21\21\33\21\23\16\25\25\13\30\30\14\31\30\23\32\30\33\34\30&\37\33"
+  ")\36\34!\40\36\37#!\"'%&.,-645\202:89\27\77=>867978\77=>B at AFDEJHIIGH"
+  "UQRVRSRNOLHIMIJRNOQMNLHIGCDOKLQMNJFGD at AIEFNJK\202OKL\16PLM_[\\YUVlhi"
+  "eabhde[WXYUVSOPQMNUQRVRSSOPRNO\202TPQ\1SOP\203RNO\2TPQUQR\202VRS\7`\\"
+  "]iefkghmijnjkhde_[\\\204TPQ\202SOP\202RNO\202XTU\16[WX\\XYXTUQMNPLMS"
+  "OPVRSSOPWST_[\\d`aa]^_[\\`\\]\202UPT\3SNRb]aPKO\202`[_\21b]ch^gdZedY"
+  "gncqzm\177\200s\205\200r\211\177q\212yi\204td\201xd\207{g\212xc\212z"
+  "e\214~i\222\177h\222\202\213r\234/\215s\240\217u\242\222x\247\231\177"
+  "\256\245\213\273\261\227\307\247\215\275\234\202\262\220v\245\210n\235"
+  "\202h\225~d\221\200g\221\203l\226\206o\233\205p\233\217z\245\216y\244"
+  "\224\177\250\216y\242\226\201\252\230\203\254\245\220\267\240\213\262"
+  "\236\212\257\237\213\260\242\216\261\245\221\264\252\226\271\255\234"
+  "\274\250\231\266\275\261\311\253\237\267\255\241\267\261\245\273\250"
+  "\234\260\255\241\265\356\343\364\370\357\377\357\346\367\376\365\377"
+  "\370\357\377\354\343\370\361\350\375\356\344\374\361\347\377\363\347"
+  "\377\202\362\346\374\11\363\347\375\362\351\376\363\352\375\365\354\377"
+  "\366\355\376\354\343\364\346\335\3562+;+%3\202)#1H/)7\"\34((%0(%.'$-"
+  "(%,-(/0+25-880=<1B>2F at 4JC7OG9PJ<SNAUOC[WJhQEm\316\277\366\324\304\377"
+  "\277\257\372\316\275\377\313\272\377\310\270\377\326\310\377\330\313"
+  "\377\331\315\377\324\307\375\314\300\376\305\270\377\274\254\377\265"
+  "\244\377\257\236\372\255\234\370\250\231\366\245\226\363\242\225\361"
+  "\240\222\361\234\221\357\231\220\355\230\217\354\224\216\350\220\214"
+  "\343\215\211\336\212\210\334\206\204\327\201\202\322}\200\317uz\313v"
+  "{\314z}\314y{\305uv\267op\246\3\5+\21\23*\22\22\32\22\24\21\26\26\16"
+  "\30\30\16\30\27\23\27\25\30\32\27\"\36\33&\40\36#\35\33\34\40\36\37*"
+  "()534<:;\202><=\15=;<;9:@>\77CAB@>\77A\77 at HFGIGHWSTPLMLHIOKLPLM\202N"
+  "JK\2PLMUQR\202[WX\24SOPLHINJKSOPVRSZVWRNO]YZWSTc_`PLMSOPLHI^Z[WSTRNO"
+  "TPQUQRSOPRNO\202UQR\202TPQ\6SOPTPQUQRVRSWSTQMN\202TPQ\5RNOSOPXTUYUVW"
+  "ST\202TPQ\202SOP\1RNO\203QMN\16VRSYUV[WXXTUPLMLHIOKLVRSZVWXTUZVW`\\]"
+  "_[\\XTU\202SOP\34b]aXSWPKOb]aWRVojnvqu|w}}s|vlwujx}r\200\203v\207\200"
+  "s\205|o\203{m\204qa|sc\200~k\213\202n\221}i\216|g\216~i\222}h\221\217"
+  "v\240\216u\237\220v\243\224z\247\202\222x\247/\236\204\264\256\224\304"
+  "\266\234\314\246\214\274\227}\254\221w\246\216t\241\212p\235\213r\234"
+  "\215v\240\223|\250\213v\241\215x\243\205p\233\211t\235\203n\227\223~"
+  "\247\236\211\262\243\216\265\236\211\260\231\205\252\233\207\254\237"
+  "\213\256\243\217\262\250\224\267\252\231\273\252\233\270\266\251\303"
+  "\247\232\264\256\242\272\255\241\271\263\247\275\241\225\253\255\241"
+  "\265\227\216\241\245\234\255\342\331\354\363\352\375\352\341\366\363"
+  "\352\377\355\344\371\362\351\376\365\351\377\363\347\373\361\345\373"
+  "\360\344\370\356\345\370\203\356\345\366\5E<M0(760>71=)#1\202+%1E5/;"
+  "*'2*'0*'.+(/0+23.55-86.;;0@=2C at 4JC7OH:SK=TOAXQDbTDq\306\267\360\274\254"
+  "\355\272\250\362\316\275\377\266\245\365\315\274\377\317\277\377\323"
+  "\305\377\323\306\376\322\305\373\321\304\374\316\302\377\314\277\377"
+  "\307\270\377\303\263\377\267\247\377\263\243\373\256\240\370\251\233"
+  "\363\245\230\360\243\226\356\237\225\354\234\224\352\230\222\350\225"
+  "\220\344\221\215\341\217\213\337\213\211\334\210\206\331\203\204\324"
+  "\201\202\324\205\207\332pr\305vx\305vv\274rs\254uv\244\13\14*\27\30*"
+  "\25\26\33\24\24\22\25\24\17\30\27\22\32\31\27\34\32\35\40\35$%\"++),"
+  "'%&(&'201\203:89\5<:;534:89FDEKIJ\202ECD\3KIJNLM`\\]\202WST\2^Z[XTU\202"
+  "JFG\7WSThdegcdc_`_[\\^Z[`\\]\202c_`\13lhi\\XY]YZMIJNJK734D at ANJKa]^YU"
+  "VSOP\202TPQ\3RNOSOPVRS\205UQR\202VRS\11WSTYUVXTUTPQQMNSOPYUV^Z[a]^\210"
+  "SOP\1RNO\202VRS&NJKGCDIEFSOP\\XY]YZ[WX]YZ_[\\\\XYSOPNJKOKLZUYUPTYTXy"
+  "txrmq~y}rmqkflyoxwmxzp{\200u\203\177r\203tgyk^ri[rgWrm]zzi\211\201p\222"
+  "\201m\222\205q\226\213v\235\212u\236\224{\245\202\221w\244\177\223y\246"
+  "\217u\244\215s\242\232\200\260\255\223\303\276\244\324\256\224\304\235"
+  "\203\262\225{\252\223y\246\217u\242\215s\240\214u\241\215v\242\207r\235"
+  "\214w\242\207r\235\215x\241\212u\236\235\210\261\251\224\275\235\210"
+  "\257\231\204\253\226\202\247\231\205\252\236\212\257\242\216\263\245"
+  "\221\266\247\226\270\253\234\273\246\227\264\255\236\273\260\242\274"
+  "\234\216\250\251\233\264\252\236\264\224\210\234\236\222\246\211}\221"
+  "\231\215\241\212~\222tk~yp\203mdwlcv`Wj[RcTK^NEVI at QE=L@:H>8F71\77""9"
+  "3\77&\40,60:-*5'$-/,5\35\32#)&/*'0-(/1,34/66187/:6.;80\77:1B at 4JC7OH:"
+  "SL>XQC]RCjSA\177\276\254\370\307\266\377\270\247\367\274\252\374\301"
+  "\260\377\305\265\377\311\271\377\320\301\377\314\276\374\306\273\367"
+  "\306\272\370\310\274\376\312\275\377\313\275\377\313\274\377\302\265"
+  "\377\276\260\377\270\252\377\261\243\370\253\237\361\247\233\355\241"
+  "\230\351\236\227\347\231\224\344\227\222\342\223\220\337\220\215\334"
+  "\215\214\334\212\211\331\206\207\327\203\204\326}\177\326\204\206\333"
+  "\200\202\315wx\270su\245\21\24""5\13\15\"\10\13\24\24\25\31\23\23\23"
+  "\25\24\22\33\32\30!\37\40#!$%#(&$),*-+)*)/-.6457560./,*+-+,*()312DBC"
+  "LJKKIJPNO[YZ_]^ief`\\]_[\\`\\]SOPEABPLMiefplmfbc^Z[`\\]fbcjfggcdd`ae"
+  "ab[WX_[\\NJKMIJ;78WSTlhia]^YUVSOP\202TPQ\3RNOSOPVRS\202TPQ\1UQR\205V"
+  "RS\10UQRRNOQMNRNOTPQXTU^Z[b^_\202RNO\202SOP\1TPQ\203UQR\11OKLSOPQMNH"
+  "DED at ALHIYUVb^__[\\\202^Z[\11`\\]\\XYUQRTPQXTUTOSNIMPKOlgk\202ZUY\24H"
+  "CGA<BTMU\\R]f\\gmcnm`qfYj_Rf]Ofl\\vo_zwg\204|k\213~j\215\207s\230\220"
+  "|\241\220{\242\221z\244\216t\241\202\214r\237\177\211o\236\214r\241\233"
+  "\201\261\254\222\302\270\236\316\260\226\306\243\211\270\230~\255\217"
+  "u\242\212p\235\206l\231\201j\226~i\224\201l\227\216y\244\217z\245\227"
+  "\202\253\222}\246\235\210\261\242\215\266\226\201\250\224\177\246\224"
+  "\200\245\230\204\251\234\210\255\236\212\257\242\216\263\245\221\266"
+  "\235\214\256\252\233\272\246\227\266\241\222\257\251\232\267\240\222"
+  "\254\230\214\244\242\226\254\231\215\243\207{\217\215\201\225\206z\216"
+  "{r\205}t\207mdwd[laXi[RcSJ[LDSF>MA9H;5C82>5/;82<5/9/)3)&/\37\34%*'0/"
+  ",5$!*%\"+)$+.)03.56187/:5-880=:2A at 4HC7MH:TL=ZPA`RBoXF\222\267\243\374"
+  "\265\243\371\271\247\373\305\263\377\276\255\375\301\261\374\312\272"
+  "\377\313\274\377\305\266\373\276\261\366\275\260\365\277\262\370\301"
+  "\264\374\304\266\377\307\271\377\312\275\377\307\272\377\301\264\377"
+  "\272\257\376\264\251\370\254\244\361\246\237\354\242\234\346\235\231"
+  "\345\232\226\342\226\224\337\223\220\335\217\216\334\214\213\333\210"
+  "\211\331\206\207\332\177\177\327~\177\322oo\267~\177\267wy\240\21\23"
+  "*\14\16\32\33\34\40\22\22\24\21\21\21\25\23\26\32\30\33\34\32\35\31\27"
+  "\32\25\23\24\24\22\23\27\25\26\35\33\34&$%\3-+,,*+'%&\202$\"#(0./534"
+  "@>\77GEFIGHTRSa_`dbchde_[\\YUVUQRIEFEAB[WXyuvhde\\XYSOPWST^Z[_[\\[WX"
+  "XTUUQRTPQa]^QMNUQRIEFc_`rno^Z[WSTRNOTPQUQRSOPRNOUQR\202SOP\2TPQUQR\202"
+  "VRS\202UQR\10QMNNJKOKLTPQWSTXTU[WX`\\]\205SOP\203TPQ\12SOPWSTUQRKGHI"
+  "EFRNO\\XYa]^SOPQMN\202PLM\11LHIHDEJFGQMNVQUNIMIDHYTX=8<\202@;\77WLGM"
+  "RKSWPX]S^^T_`UebWgeXleWnwg\201vf\201xh\205yh\210zg\207\202n\221\210t"
+  "\227\205q\226\210q\233\206o\233\205n\234\207p\236\210q\237\215v\244\227"
+  "\177\257\242\212\272\246\216\276\254\224\304\252\223\301\234\205\263"
+  "\215v\244\206o\235\202k\227\177h\224\177j\225\205p\233\223~\251\220{"
+  "\246\226\201\252\220{\244\226\201\252\223~\247\221|\243\220{\242\222"
+  "}\244\225\200\247\230\203\252\231\204\253\235\210\257\241\214\263\237"
+  "\216\262\233\212\256\236\216\262\247\230\271\242\223\262\237\220\255"
+  "\234\215\252\231\213\245\227\213\243\220\204\232\211}\223\177s\211wk"
+  "\177th|qfwpev_VgZRaRJYMETHBPF at LB<H\77""9E>8D60:+(1307(%,2/6\20\15\24"
+  "#\40'*%,)$+)#--'12,660:\20280;\22""91>;3B at 4HC7MF9SJ=[N at cP\77u\262\236"
+  "\363\257\233\376\302\257\377\274\251\377\252\230\352\303\262\377\312"
+  "\272\377\315\275\377\302\264\377\274\256\373\202\270\252\367\5\270\252"
+  "\371\267\251\370\271\253\372\275\257\376\303\266\377\202\302\266\377"
+  "<\301\266\377\277\264\377\267\257\372\257\251\363\252\244\354\243\237"
+  "\351\237\233\345\232\230\343\226\223\340\221\220\336\216\215\335\213"
+  "\211\334\211\207\333\212\207\340zx\313\206\207\310\200\202\262\5\11&"
+  "\14\20\34\17\23\26\16\20\15\20\20\20\22\22\24\26\24\31\27\24\33\24\22"
+  "\27\17\15\20\16\16\14\21\22\15\23\21\22\32\30\31\40\36\37#!\"$\"#(&'"
+  "+)*,*+<:;=;<A\77 at DBCFDEOMNWUVTRS\\XYVRSRNOPLMMIJOKL^Z[plm\\XYTPQPLMS"
+  "OPTPQPLMOKL\203RNO\4\\XYKGHVRSQMN\202c_`\13YUVSOPQMNUQRVRSSOPRNOTPQQ"
+  "MNRNOTPQ\203UQR\12TPQSOPTPQPLMQMNXTUZVWXTUZVW`\\]\203SOP\203RNO\202Q"
+  "MN\6YUV^Z[[WXQMNNJKVRS\202\\XY8]YZYUVWSTUQROKLKGHOKLWSTSNRTOSZUYnimR"
+  "MQZUYgbf\201|\200vowtmumcnaWb`Uch]mqdvreyxi\200wg\201yi\204yi\206{h\206"
+  "\200m\215\201n\216ye\212\177h\222\201j\226\205n\234\212s\241\215v\244"
+  "\221z\250\224|\254\230\200\260\227\177\257\251\221\301\262\233\311\244"
+  "\215\273\221z\250\211r\236\210q\235\206o\233\211t\237\216y\244\225\200"
+  "\253\214w\242\220{\244\216y\242\225\200\251\222}\246\202\216y\240v\220"
+  "{\242\223~\245\224\177\246\225\200\247\232\205\254\237\212\261\235\213"
+  "\261\234\212\260\230\210\255\240\220\264\222\203\244\234\215\254\227"
+  "\210\247\222\203\240\216\200\232\220\204\234\205y\221\203w\215\200t\210"
+  "ui}oduj_p^VeXP_QIXKCRGAME\77KA;G>8DB<F;5\77""529(%,\"\37&/,352941850"
+  "72-40*42,660:;5\77>6A=5@;3@=5DA6GC7MF9WH:]L=fL=v\257\232\365\271\244"
+  "\377\252\226\367\270\245\376\273\251\373\300\260\373\317\277\377\275"
+  "\255\370\273\254\375\267\250\373\266\246\376\267\247\377\266\246\376"
+  "\262\243\370\262\243\366\265\250\372\265\251\375\271\255\377\277\263"
+  "\377\302\271\377\303\273\377\277\267\377\267\261\373\262\254\366\247"
+  "\243\355\243\237\351\235\233\346\230\225\342\223\222\340\217\216\336"
+  "\213\211\334\211\207\333\211\206\335~{\310~~\272\203\205\254\14\17\""
+  "\20\23\30\24\26\21\22\25\16\22\22\20\25\25\27\31\26\35\31\26\37\26\23"
+  "\32\27\25\30\40!\34+,&*)',*+)'(\"\40!#!\"-+,645867@>\77\77=>B at ADBCFD"
+  "EMKLNLMFDE\202PLM\2RNOWST\202[WX\202ZVW!VRSSOPUQRVRSQMNIEFMIJWSTUQRR"
+  "NOUQRB>\77VRS\\XYlhib^_VRSQMNPLMUQRWSTTPQRNOSOPPLMQMNSOPTPQUQRTPQSOP"
+  "RNOUQR\202OKL\35UQRVRSSOPTPQ[WXWSTRNONJKPLMWSTZVWWSTSOPXTUYUVUQROKLQ"
+  "MNZVW^Z[\\XYUQRXTUVRSLHIEABHDEPLMWST\202TOS&YTXe`dsnrytxvqupkovowngo"
+  "b[c[S^]R`eZjoduui}se|zl\205{k\205yi\204}m\212\177o\214~k\211}i\214\200"
+  "j\221\202k\225\203l\230\205n\232\212s\241\220y\247\222{\251\220y\247"
+  "\230\201\257\232\203\261\244\215\273\254\225\303\245\216\272\225~\252"
+  "\214u\241\216w\241\202\232\203\257\10\225~\252\216w\243\205n\230yb\214"
+  "xa\213\205n\230\217x\242\221z\244\202\223|\246B\222{\245\223|\246\226"
+  "\200\247\230\203\252\225\203\253\227\205\253\231\207\255\231\210\254"
+  "\227\206\252\225\204\246\224\203\245\224\205\244\216\177\234\213}\227"
+  "\207y\222\206x\217zm\201vi}ym\201i^o]UdZRaTL[METIAPE=L@:F<6B<6@>8B:4"
+  ">3-71.585<;8\77""63:<7>=6>=5@=5B91>6.;80=<4ALDQ\77""7FE<M\77""5MC5VP"
+  "AjN>m\250\230\327\256\231\366\257\232\377\261\235\374\265\243\371\277"
+  "\256\376\310\270\377\301\263\376\266\250\367\266\247\374\265\244\377"
+  "\263\242\377\260\237\377\256\237\376\255\236\373\202\255\237\367\36\255"
+  "\240\370\254\242\371\257\245\373\263\252\375\267\256\377\272\263\377"
+  "\275\266\377\276\267\377\271\265\377\245\241\355\245\243\356\233\230"
+  "\345\225\224\342\223\222\342\220\216\341\213\211\334\213\210\331\204"
+  "\201\306\205\205\271\15\16-\17\23\36\20\25\21\20\23\12\16\20\5\24\23"
+  "\21\24\22\25\26\23\34\32\27\40\37\36$###\202%&\40\30,+)'%&\"\40!\40\36"
+  "\37$\"#+)*423978:89FDEECDDBCOMNPNOJHIMKLPLMQMNRNOUQR[WX`\\][WXQMN\210"
+  "SOP\20VRSQMNOKL[WXZVW\77;<734OKLWSTZVW\\XYWSTQMNNJKRNOWST\210SOP\26M"
+  "IJQMNZVWXTUQMNZVW`\\]TPQUQRXTU]YZ_[\\`\\]a]^b^_d`aXTUOKLFBCEABMIJUQR"
+  "\202XTU\21UQRRNOOKLNJKLHIMIJPLMUQRb]a^Y]\\W[_Z^faehcgc^b^Y]g`g\202g`"
+  "h\7ibjndoqftujzvk|qdxwi\200\202vf\200&}m\210\201q\216\202o\215\203p\220"
+  "\201k\222\202k\225\201j\226\200i\225\203l\230\211r\240\216w\245\217x"
+  "\246\222{\251\225~\254\243\214\272\261\232\306\257\230\304\240\211\263"
+  "\233\204\256\241\212\264\244\215\271\231\202\256\211r\236\202k\227\201"
+  "j\224|e\217{d\216\204m\227\202k\225\206o\231\213t\236\217x\242\220y\243"
+  "\221z\244\223}\244\225\177\246\225\200\251\225\203\253\202\226\204\252"
+  "\20\224\202\250\222\201\245\221\200\244\221\200\242\220\201\240\212{"
+  "\230\203u\217\201s\214wi\200uh|wk\177eYmdYj\\TcSJ[MET\202JBQ\16H at OD>"
+  "JC=IF at JD>H=7A;5\77<9@;8A94;3,43+66.;80\77\2027/>\1;3B\202 at 8E\13F>MI@"
+  "QMC\\I;_I9fE4j\261\240\344\254\231\363\254\230\373\261\236\372\273\251"
+  "\377\202\302\261\377\11\272\254\373\265\246\371\263\243\374\261\240\377"
+  "\257\235\377\255\233\377\252\231\377\252\232\375\252\233\372\202\251"
+  "\234\370/\250\236\367\252\240\367\255\243\371\256\246\371\261\251\374"
+  "\263\254\374\262\255\375\253\247\364\276\272\377\247\244\361\234\231"
+  "\346\241\240\356\226\225\343\221\220\336\216\213\330\205\202\311\212"
+  "\206\301\210\207\261\11\11!\12\15\22\15\20\11\21\23\10\33\35\22\25\24"
+  "\20\25\23\26\26\23\34\30\25\36\33\32\40\36\36\36\37\40\32\37\40\30#\""
+  "\40$\"#'%&,*+1/0645:89<:;:89DBCB at ACABOMNSQROMNSQR\202UQR\3QMNMIJPLM\202"
+  "VRS\1RNO\210SOP\3XTUUQRPLM\202UQR\13C\77@\77;<TPQC\77 at KGHTPQWSTUQRSO"
+  "PTPQWST\210SOP\7XTUSOPUQRRNOPLM\\XY^Z[\202KGHKQMNTPQNJKD at AA=>IEFRNOH"
+  "DE<89;78MIJ_[\\d`aeabhdeWSTLHIIEFPLMSOPOKLNJKSOPWRVRMQOJNQLPXSW\\W[["
+  "VZXSW]V]b[bibjqjrwmxyn|wl|vk|wj~yl\200tf}rd}yi\203|l\207zj\205|i\207"
+  "{e\213~h\217\200i\223\177h\222\200i\223\204m\231\211r\236\213t\240\216"
+  "w\243\223|\250\235\206\262\251\222\274\263\234\306\266\237\311\261\232"
+  "\304\254\226\275\237\210\262\223|\246\203l\226~g\221\203l\226\205n\230"
+  "\210q\233\221z\244\207p\232\212s\235\216w\241\217x\242\202\216w\241\3"
+  "\217x\242\221z\244\223~\247\203\224\177\250\17\217}\245\215{\241\214"
+  "z\240\214{\237\214{\235\206u\225\177p\215\200r\214zl\205zl\203{m\204"
+  "eYm]QeXM^RFZ\202ODU\2MDUKBS\202JBQ\202OGTCGAMB<H\77""9C<6B82<4-54,75"
+  "-<6->5,\77""4+>7.\77<4CG\77LNFUMDWJ@[E9_RDu\261\242\335\253\232\341\254"
+  "\232\360\255\232\366\263\243\373\277\260\377\301\262\377\270\251\372"
+  "\261\242\365\262\242\372\255\234\372\254\232\376\251\230\377\247\226"
+  "\377\245\224\376\245\224\374\245\225\370\245\227\370\245\227\366\244"
+  "\231\365\243\232\363\245\234\365\246\236\364\247\237\365\246\241\365"
+  "\247\242\366\253\246\370\260\255\374\244\241\356\252\247\364\240\240"
+  "\352\236\236\350\213\213\325\215\214\320\224\220\315\227\224\303\1\0"
+  "\40\27\30*\24\25\27\31\32\24\17\21\6\17\17\5\25\24\20\25\23\26\25\22"
+  "\31\27\24\33\31\30\35\33\33\33\202\33\34\26\21\37\36\34#!\"*()201867"
+  "<:;=;<><=A\77 at GEFA\77@@>\77KIJMKLIGHLJKNJK\202RNO\5NJKLHIPLMRNOQMN\210"
+  "SOP\2QMNVRS\202QMN\202YUV\7]YZmijTPQYUV]YZ\\XYVRS\202RNO\211SOPLWSTP"
+  "LMQMNSOPXTUd`a^Z[C\77 at WSTXTUUQRJFG@<=B>\77OKL\\XYYUVOKLSOPfbciefXTUI"
+  "EFHDEOKLD at AB>\77KGHMIJGCDJFGTPQPKONIMMHLQLPXSW]X\\^Y]\\W[]V]aZaf_gkd"
+  "lpfqrhsshvshxyl~xk\177qczoaxvf\200wg\201rb}rb\177s_\202{e\214\201k\222"
+  "\202k\225\201j\224\203l\226\205n\232\207p\234\214u\241\224}\247\227\200"
+  "\252\234\205\257\261\232\304\307\261\330\301\253\322\253\225\274\222"
+  "{\245\217x\242\207p\232\203l\226\202\206o\231\2\213t\236\226\177\251"
+  "\202\221z\244\6\220y\243\215v\240\212s\235\213t\236\217x\242\222{\245"
+  "\202\222}\246\4\221|\245\220{\244\214z\242\212x\240\202\211w\235\5\204"
+  "s\227\202q\223\177p\217\201r\217zl\206\202yk\204\10bTkTF]SG[TH^UI]TH"
+  "\\QEYOCW\202MDU\202QIX(LDSD<K=7C93A71=:2=91<91 at 90C7.C5,A7.A:1B;3BVN]"
+  "UL_ZPkVItQCx\253\233\334\251\227\341\260\236\360\264\242\370\271\252"
+  "\377\277\260\377\273\254\377\262\243\370\254\234\365\254\233\371\250"
+  "\226\371\247\225\373\244\223\375\242\221\373\241\220\372\241\220\370"
+  "\242\221\367\241\223\365\241\226\364\241\226\362\240\227\362\202\241"
+  "\230\363'\241\230\361\240\232\362\240\232\360\251\245\371\224\221\342"
+  "\242\237\354\245\243\356\237\237\345\223\224\327\224\225\326\232\232"
+  "\326\211\207\266\13\12,\30\31.\3\3\15\23\23\23\20\21\13\16\16\4\23\23"
+  "\13\24\23\21\25\23\26\26\23\32\30\25\34\31\31\33\33\33\33\34\35\27\35"
+  "\36\30#\"\40&$%)'(.,-201645;9:=;<CABGEF><=<:;\202GEF\4@>\77CAB\77;<L"
+  "HI\202VRS\202SOP\2RNOPLM\210SOP\20LHIWSTSOPOKLZVWc_`gcdqmniefgcda]^X"
+  "TUQMNOKLSOPWST\210SOP\3QMNNJKSOP\202WST\4\\XYNJK0,-TPQ\202UQR\20TPQU"
+  "QR[WXeablhiMIJIEFSOPb^_]YZGCD:67>:;D at A@<=C\77@\202IEF\6GCDQMNa]^gbfe"
+  "`dc^b\202b]a\5`[_[VZWRV_X_`Y`\202b[c\4c[ff^ilaopeu\202pcu\35l_snauxi"
+  "\200yj\201td~ue\200wd\204~j\217\203o\224\202m\224\200k\222\201l\223\204"
+  "o\230\205p\231\212u\236\221|\245\231\204\255\243\216\265\264\237\306"
+  "\301\255\322\274\250\315\256\232\277\227\201\250\225~\250\213t\236\204"
+  "m\227\203l\226\200i\223\177h\224\202\205n\232\204\206o\233\34\211r\236"
+  "\216w\243\222{\245\222}\246\221|\243\217z\243\215x\241\214w\240\213v"
+  "\237\211t\235\211t\233\203q\227\203r\226\201p\222~m\215td\201td\177w"
+  "g\201bTmZLe\\Ne_Qj`Ri[MdUG^TF]WK_QEY\202RGX\"ODUG<M=5D:1B:2A91<80=90"
+  "A;2G<2J=3K\77""6KC:MF>M=5DH\77TcXvaT\200\274\255\346\260\237\345\276"
+  "\254\370\267\246\366\273\254\375\276\257\377\271\251\377\262\242\373"
+  "\255\234\372\251\227\372\245\223\367\243\222\370\242\221\371\241\220"
+  "\370\237\216\366\236\215\365\202\237\216\364\3\237\221\363\236\223\357"
+  "\235\224\355\202\235\224\357\202\233\225\357&\234\226\360\234\226\356"
+  "\226\222\347\233\230\351\236\233\350\223\222\330\227\230\331\236\240"
+  "\335\214\216\307\213\215\275\30\27""9\12\10\36\27\26$\21\20\26\15\15"
+  "\15\21\20\13\15\14\7\40\37\32\27\26\24\30\26\31\32\30\35\33\31\36\33"
+  "\33\35\35\35\33\35\37\32\37\40\33%$\"&$%'%&)'(+)*0./645;9:<:;@>\77:8"
+  "9<:;\202JHI\7DBCHFGC\77 at PLM[WXYUVUQR\203TPQ\210SOP\20PLM[WXUQRLHISOP"
+  "VRSSOPUQRXTUVRSSOPOKLNJKQMNWST\\XY\210SOP\202TPQ\12XTUTPQIEFJFGC\77@"
+  ",()JFGMIJSOPYUV\202]YZ\5YUVUQR623845C\77@\202OKL\6IEFMIJXTUHDEOKLVRS"
+  "\202WST\27\\XYgcdrnokfjjeihcgfaeb]a]X\\WRVSNR[T[]V]_X``YaaYdd\\gj_mm"
+  "bpm`qnasl_spcw\202yj\201\17vf\200yi\204\202o\217\204p\223\204p\225\177"
+  "k\220|g\216\177j\221\205p\231\211t\235\213v\237\222}\244\244\217\266"
+  "\265\241\306\266\242\307\202\254\230\273\15\264\240\305\247\221\270\236"
+  "\207\261\215v\240\203l\226\205n\230\203l\226}f\222{d\220zc\217~g\223"
+  "\202k\227\205n\232\202\206o\233\6\211r\236\213t\236\221|\245\216y\240"
+  "\214w\240\212u\236\202\211t\235\23\210s\234\207r\233\202p\230\203q\227"
+  "\177n\222zi\213ra\201xh\205\202r\215rb|hZsfXqeWqcUn[MfUG`WIb^PgTH^\202"
+  "RFZ\11QEYK\77SC8I=4E\77""7F<4A:2\77;2E>4L\202 at 6O\33B8PF=PKCR at 8G\\Shb"
+  "WwaT\202\305\265\363\276\254\366\265\244\362\277\256\374\301\263\377"
+  "\275\256\377\262\242\373\252\231\371\252\230\374\247\224\375\241\216"
+  "\367\237\216\366\236\215\363\235\215\360\234\214\357\233\213\356\234"
+  "\214\357\235\215\360\234\216\357\231\216\352\202\230\217\350\1\230\217"
+  "\352\202\226\217\354\24\227\220\355\227\221\353\227\223\350\221\216\337"
+  "\227\225\340\232\231\335\225\227\322\204\207\274\232\236\316\24\30>\7"
+  "\10\35\21\21\33\23\22\30\23\23\25\21\20\16\34\33\27\40\37\33\23\22\16"
+  "\32\31\27\34\32\33\202\35\33\36\20\34\34\34\35\35\33\35\37\32\36\40\33"
+  "\"!\37%#$(&'+)*-+,1/0645:89<:;@>\77<:;@>\77\202MKL\3IGHOMNWST\202]YZ"
+  "\5TPQMIJOKLTPQWST\210SOP\14PLMYUVTPQOKLVRSUQRMIJOKLJFGMIJPLMTPQ\203U"
+  "QR\1TPQ\210SOP\202UQR\17XTUQMNGCDRNO[WXRNOVRSYUV\\XY]YZ\\XYVRSOKLJFG"
+  "PLM\202QMN\2PLMMIJ\202KGH\4LHIVRSc_`ief\202d`a\3lhimijhde\202ZUY\1YT"
+  "X\203XSW\202WRV+UPVYTZ_X_b[bc\\de]hj_mmbpodtodum`tpcwwh\177vg~te|zj\204"
+  "\204q\217\205r\222\202n\221}i\214{g\214\200l\221\207r\231\214w\236\225"
+  "\200\247\236\211\260\253\226\275\261\235\302\247\223\270\233\207\252"
+  "\236\212\255\252\226\271\257\231\300\250\221\273\230\201\253\215v\240"
+  "\216w\241\213t\236\204m\231\202k\227\177h\224\202k\227\207p\234\202\210"
+  "q\235\202\207p\234\5\210q\233\217x\242\214v\235\210s\232\206q\230\202"
+  "\206q\232T\206q\234\205p\231\202m\226\203n\225}l\220{j\214ve\205\200"
+  "p\215\213{\226yi\204n^yhXseUrdTo_OjYIcYKd^PiYKdUG^TF]WI`RF\\H<PC7KE:"
+  "KE:JB7GA5KC7OB8SA7RB8PD;PG>OJARJ at XaVv\315\277\360\322\302\377\316\274"
+  "\377\313\272\377\305\265\377\276\260\375\266\247\374\256\235\371\250"
+  "\226\374\246\223\376\243\220\374\240\215\371\233\212\362\232\212\355"
+  "\231\211\353\230\211\350\227\210\347\230\211\350\231\211\353\231\213"
+  "\352\225\213\344\224\214\342\222\214\344\222\214\346\222\213\350\222"
+  "\213\352\222\213\350\221\213\345\215\211\336\226\223\342\215\213\324"
+  "\223\223\323{~\265\231\235\314\3\10""2\6\13)\23\25!$$&\23\23\23\14\14"
+  "\14\40\37\35\26\25\23\22\16\15\40\34\33\32\26\27\34\30\31\202\34\32\33"
+  "\34\33\33\33\34\34\34\35\37\34\37!\36\40\36\37%#$+)*/-.1/0423867;9:\77"
+  "=>CAB><=A\77 at LJKKIJIGHRPQ^Z[`\\]\\XYRNOLHIOKLTPQVRS\210SOP\13QMNUQRP"
+  "LMRNO\\XYZVWTPQ[WXRNOTPQWST\202YUV\3VRSQMNNJK\210SOP\10PLMQMNWSTSOPN"
+  "JK]YZkghd`a\202RNO\31QMNMIJIEFHDEKGHNJKQMNTPQVRSTPQWSTYUVTPQJFG\\XYk"
+  "ghnjkc_`b^_ief^Z[IEFVQUUPTRMQ\202PKO\12SNRWRVZUYUPTYTZ_X_b[bc\\de^fk"
+  "al\202ncq\3mbrk^pm`t\202se|\13uf}}m\207}m\212\177n\216\200m\215}i\214"
+  "~j\215\203o\224\211u\232\215x\237\241\214\263\202\254\227\276\30\235"
+  "\211\256\223\177\244\227\203\250\232\206\251\227\203\250\256\230\277"
+  "\260\231\303\247\220\272\232\203\255\222{\245\212s\235\204m\231\206o"
+  "\233\204m\231\206o\233\210q\235\211r\236\210q\235\212s\237\215v\242\220"
+  "y\243\215v\240\212t\233\205p\227\203\204o\230\15\204o\232\203n\231\202"
+  "m\226\202m\224}k\221}l\216yh\212\177n\216\203s\220k[xm]zfVscSp\202gW"
+  "t\12aQl]Oi^Pi[MfUG`VHa[MdXJaL at VE9O\202F:N\3C7KC7OE8R\202F9S\25G;SJ>T"
+  "NBXNBZZOm^Rx\302\264\351\325\305\377\330\306\377\315\274\377\306\270"
+  "\377\272\254\371\260\241\366\255\234\372\251\227\375\242\217\373\237"
+  "\213\372\241\215\374\231\206\361\227\206\354\226\206\350\202\225\206"
+  "\345\10\224\206\345\226\210\347\224\211\345\223\213\341\221\214\340\220"
+  "\214\341\217\213\342\217\212\344\202\217\210\345\40\216\210\342\221\213"
+  "\341\206\201\321\210\205\312\217\216\307\212\213\267\25\32:\21\25.\24"
+  "\27&\27\30\34\23\23\21\27\27\25\36\36\34\31\30\26\23\22\20\36\34\35\21"
+  "\15\16\25\21\22\30\24\25\31\27\30\32\30\31\32\32\32\34\34\34\37\37\35"
+  "!!\37!!!'%&,*+0./201534978\202=;<\3@>\77<:;><=\203IGH\2VTUUQR\202ZVW"
+  "\2UQRRNO\202TPQ\1QMN\210SOP\12YUVVRSNJKQMNZVWRNOMIJXTUVRSTPQ\202RNO\1"
+  "SOP\203UQR\210SOP\40NJKPLMXTUUQRNJKUQRWSTFBCTPQJFGPLMXTUQMNOKLVRSWST"
+  "PLMSOPMIJOKL\\XYYUVLHIKGHd`aa]^_[\\`\\]]YZVRSSOPUQR\210SOP\34PJL[UY`"
+  "Z^]W[^W^g`hhaibZeh]kbWgbWhk`qsg{ui}uh|tf}\200r\214\177p\215~n\213|k\213"
+  "~m\215\205t\226\220\177\241\230\207\253\255\231\276\242\215\264\227\202"
+  "\251\222}\246\202\222{\245\22\224}\247\227\200\252\232\204\253\247\221"
+  "\270\263\235\304\257\231\300\237\211\260\217y\240\210q\233\211r\234\206"
+  "o\231\222{\245\235\206\260\236\207\261\227\200\252\221z\244\217x\242"
+  "\216w\241\202\205n\230S\204m\227\205n\232\206o\233\205n\232\204m\231"
+  "\202k\227\202m\226\177j\221}h\217{g\212~j\215\211v\226\211v\224|i\207"
+  "q^~o\\|jWwhUuiXxdTq^Nk`Pk\\LgWGaXHb]Oh^PiTF]L>UI;TJ;XJ;ZJ<VK;UK<SL=R"
+  "O at WRB\\WHeSCgaR{\300\262\343\305\266\357\322\303\377\321\302\377\323"
+  "\306\377\303\265\377\273\256\375\262\243\370\252\231\365\250\224\367"
+  "\245\220\371\242\214\371\237\211\370\234\206\365\227\204\360\224\203"
+  "\353\222\201\347\221\203\344\220\205\343\217\206\341\214\206\336\213"
+  "\207\334\213\211\334\215\213\336}{\316\221\217\343\207\203\332\215\207"
+  "\337\214\206\336\214\206\334\207\200\316\221\212\315\211\205\267\26\26"
+  "2\36\40,\14\16\15\26\31\22\30\30\26\26\26\26\24\24\24\23\23\23\24\24"
+  "\24\202\25\25\25\202\26\24\25\36\27\25\26\31\27\30\32\30\31\33\31\32"
+  "\35\33\34\40\36\37!!!\"\"\")))-+,,*+0./867;9:867<:;978=9:EABLHIMIJOK"
+  "LQMN\\XYZVWVRSSOPRNOQMNRNO\221SOP\12NJKRNOXTUYUVTPQPLMSOPYUVRNOSOP\204"
+  "TPQ\7SOPRNO[WXUQRPLMRNOYUV\202^Z[\26[WXYUVMIJRNOYUVSOPTPQ]YZ^Z[b^__["
+  "\\NJKD at AMIJRNOUQRa]^hdea]^\\XY[WXXTU\202RNO\1UQR\210SOP*ZTV]WY\\VZYS"
+  "W_X_kdkleme^f[P^^Saf[knctrfzsg{ui}zn\204yk\204zl\206{m\207~o\214\205"
+  "u\222\221\200\240\240\217\261\253\232\274\236\212\257\225\201\246\214"
+  "w\240\211t\235\212s\237\213t\240\216w\243\221z\246\230\201\253\235\207"
+  "\256\244\215\267\253\225\274\254\226\275\243\215\264\225~\250\212s\235"
+  "\224}\247\234\205\257\202\242\213\265\11\236\207\261\230\201\253\221"
+  "z\244\213t\236\203l\226\202k\225\200i\225\177h\224\200i\225\203\201j"
+  "\226M\202m\226\200k\222\177j\221}i\214\177k\216\210u\225\205r\220ub\200"
+  "s_\202o[~gTtfSsiXxgVv`PmaQnbRm]Mh[Kf_Oi`Rk[MfTF]PB\\K<]L<`N>[O\77YR@"
+  "VUCYXF\\[HdWFhjY\203dR\204\302\263\352\313\273\372\322\303\377\306\271"
+  "\376\317\302\377\310\274\377\277\262\377\265\246\373\255\235\366\252"
+  "\226\367\246\221\366\242\214\370\237\211\366\235\207\366\231\205\364"
+  "\225\204\356\222\203\352\217\203\345\216\205\342\212\204\336\210\204"
+  "\333\217\215\341|}\317\210\211\333\223\221\344\210\206\332\206\202\326"
+  "\203~\322\210\203\323\177x\305\224\215\320\177x\254\22\16""1\31\26'\24"
+  "\24\26\21\23\10\34\36\21\30\31\24\26\26\26\24\24\24\23\23\23\24\24\24"
+  "\203\25\25\25\12\27\25\26\31\27\30\32\30\31\34\32\33\35\33\34\37\35\36"
+  "!\37\40#!\"'''+++\202-+,\17""312<:;><=:89201645\77;<HDEMIJNJKRNOVRSX"
+  "TUVRSTPQ\203RNO\2SOPTPQ\220SOP\1UQR\202SOP\10TPQSOPQMNPLMQMNWSTUQRRN"
+  "O\202PLM\21QMNTPQUQRYUVUQRSOPUQRXTUWSTQMNKGHZVWNJKQMNVRSQMNUQR\202_["
+  "\\\20\\XYXTUEAB956C\77 at MIJYUVkghief`\\]XTUUQRRNOOKLPLMUQR\210SOP\2YU"
+  "VZVW\202YSW\14b[bjcje^fZS[UMZ_Wdmbrshxpevmbsqeyxl\202\202zl\205\40~p"
+  "\211\206x\222\221\202\237\233\214\251\242\221\261\245\224\266\220|\241"
+  "\211u\232\204o\230\203n\227\206o\233\210q\235\213t\242\216w\243\224}"
+  "\251\223|\246\230\201\255\244\215\267\257\230\302\260\231\303\244\215"
+  "\267\231\202\254\232\203\255\240\211\263\250\221\273\254\225\277\252"
+  "\223\275\241\212\264\221z\244\203l\226\200i\225\177h\224\202~g\223\202"
+  "\177h\224\20~g\223}f\222{f\217{f\215|g\216}i\214\202n\221\214y\231\210"
+  "u\223vc\201lX{iUxcOrfRuo\\|n[{\202eUr\1^Nk\202_Oj:`Pk`Rk_QjXJcOA[PAb"
+  "QBcSC`TD^XF^[I__MgbOmiW}o^\213\304\261\350\334\315\377\317\276\377\304"
+  "\264\373\267\252\362\300\262\375\312\276\377\303\266\377\272\253\376"
+  "\261\241\371\252\231\365\244\222\365\237\215\363\234\211\362\234\211"
+  "\364\231\210\362\226\205\357\223\204\351\217\203\345\214\203\340\210"
+  "\202\334\205\201\330\206\204\330}{\317\212\207\336yt\316\200|\323\203"
+  "~\322\206\202\317\204\177\302\216\211\301\26\24<\23\20-\25\24$\30\27"
+  "\37\21\21\23%#$\17\16\14\27\27\27\26\26\26\24\24\24\23\23\23\24\24\24"
+  "\203\25\25\25\30\31\27\30\32\30\31\34\32\33\35\33\34\37\35\36!\37\40"
+  "#!\"%#$))),,,.,-0./756=;<;9:423201:89GCDNJKMIJLHIOKLUQR\202TPQ\203RN"
+  "O\3SOPTPQUQR\220SOP\2XTUSOP\202OKL\4TPQWSTTPQOKL\202TPQ\1SOP\202RNO\203"
+  "QMN\202PLM\20TPQZVW^Z[\\XYTPQLHIWSTNJKRNOVRSQMNUQR[WXUQRFBCHDE\202\77"
+  ";<\11PLMYUV\\XYgcdeab[WXTPQSOPRNO\202PLM\211SOP0OKLTPQZTX^X\\b[baZaV"
+  "OWJCKYQ\\c[hpeushxodumbsqeywk\177|n\205}o\206\204v\215\222\204\235\236"
+  "\220\252\237\220\255\225\205\242\212y\231\206r\225\202n\223\177j\221"
+  "\201l\225\205n\232\206o\233\211r\240\214u\243\215v\242\220y\245\225~"
+  "\252\233\204\260\242\213\267\247\220\272\253\224\276\255\226\300\241"
+  "\212\264\244\215\267\250\221\273\251\222\274\250\221\273\241\212\264"
+  "\222{\245\204m\227\202~g\223\1\177h\224\202\201j\226M\200i\225}f\222"
+  "zc\217ze\216ze\214{f\215|h\215\203o\222\217|\234\212w\227vc\203gSvhT"
+  "wgSvjVyq^~lYybQqbRoRB_\\LicSpcSncUodVo]OhSE_WHgWHiYIfZJd^LdbPjhUqjY{"
+  "wd\221xf\232\317\275\371\275\255\356\276\256\365\302\264\377\273\255"
+  "\372\301\263\377\303\267\377\301\264\377\276\257\377\266\247\374\255"
+  "\235\366\244\223\361\236\214\357\233\212\360\233\212\362\230\211\360"
+  "\226\207\356\222\206\352\217\205\346\212\203\342\206\201\335\203~\330"
+  "\201}\324\202~\325\204\177\331\215\207\337\201{\321{w\304\200{\275\202"
+  "\200\262\23\22""4\26\27+\30\30\"\23\24\30\15\15\17\33\33\35\24\22\27"
+  "\37\35\"\27\27\31\25\25\25\202\23\23\23\1\24\24\24\203\25\25\25\14\31"
+  "\27\30\33\31\32\35\33\34\36\34\35\40\36\37\"\40!%#$'%&'''+++1/0423\202"
+  "756\11""201+)*756\77=>KGHPLMNJKMIJPLM\203TPQ\1SOP\202RNO\202SOP\1TPQ"
+  "\220SOP\13UQRSOPPLMOKLTPQZVWYUVUQRNJKQMNUQR\202XTU\24TPQOKLLHIPLMQMN"
+  "UQRZVW]YZZVWRNOLHIXTURNOXTU\\XYWSTXTUWSTJFGA=>\202FBC\3PLMgcdlhi\202"
+  "c_`\10_[\\WSTQMNTPQVRSSOPQMNRNO\210SOP#MIJTPQ[VZ^Y]\\U\\XQXTMUQJR^Va"
+  "c[fianldqpeutiyxm~{p\201zn\202\203w\213\221\204\230\234\216\245\236\220"
+  "\251\225\207\241\211y\226\177n\216}l\216{j\216|g\216~i\222\201j\226\202"
+  "k\227\204m\233\207p\236\211r\240\215v\244\222{\251\202\224}\253\16\232"
+  "\203\257\246\217\273\257\230\304\256\227\303\255\226\302\250\221\273"
+  "\242\213\265\236\207\261\232\203\255\222|\243\213t\236\202k\227\201j"
+  "\226\200i\225\203\177h\224\15}f\222|e\221\202m\226\200k\222~i\220{g\214"
+  "\201m\220\216{\233\210u\225q^~kWzmY~kWz\202jVy at cPp^KkbOoUDdcSpl\\yiY"
+  "vfVshXsfVq`Pk\\Kk^Mm`PmbRmgWqn^yve\207{i\221\211u\250\323\277\372\305"
+  "\261\366\303\261\373\301\260\377\277\260\377\257\240\363\272\255\377"
+  "\270\253\372\274\257\376\277\262\377\272\254\377\260\242\372\245\226"
+  "\361\237\220\357\235\215\357\233\213\356\230\212\354\224\210\352\221"
+  "\207\350\215\206\345\212\205\343\207\202\340\204\177\333\206\201\335"
+  "{u\317\203}\325wo\304\203}\307\204\200\275\210\205\264\21\20/\30\27%"
+  "\22\23\25\30\31\24\25\26\20!\40\34\33\31\32\25\22\31\24\21\32\27\27\31"
+  "\26\26\26\24\24\24\23\23\23\24\24\24\203\26\26\26\14\32\30\31\33\31\32"
+  "\36\34\35\37\35\36!\37\40#!\"&$%(&'(((---312534\202423\20""3121/0<:;"
+  "A\77 at JFGNJKPLMSOPVRSYUVWSTVRSUQRTPQSOPRNO\202QMN\220SOP\13QMNVRSUQRP"
+  "LMQMNVRSWSTSOPRNOSOPTPQ\202UQR\31TPQRNOQMN^Z[\\XYYUVVRSRNOLHIEAB@<=X"
+  "TUUQR[WX_[\\ZVW[WXVRSC\77 at D@AJFGKGHTPQhdejfg\203`\\]\7WSTRNOUQRXTUVR"
+  "SSOPRNO\210SOP\4VRSXTUYTXXSW\202VOV\26^W_f_gf^ih`kh`mianodtvk{zo\200"
+  "{p\201\203x\211\220\205\226\235\220\242\234\217\243\217\201\230\202t"
+  "\215\177o\212\201q\216{j\212yh\212|g\216~i\222\202\200i\225\25\202k\231"
+  "\204m\233\207p\236\211r\240\214u\243\216w\245\221z\250\225~\254\233\204"
+  "\260\240\211\265\253\224\300\256\227\303\257\230\302\255\226\300\250"
+  "\221\273\237\210\262\223}\244\211s\232\212s\237\206o\233\201j\226\202"
+  "}f\222\24~g\223\200i\225\201j\226\202m\226\200k\224}h\217ye\212\201m"
+  "\220\220|\237\212w\227r_\177jV{mY~jVygSvhTwfRuiUxs`\200p_\177\202xg\207"
+  "\1m]z\202dTq\1eUr\202cSp1fVsk[xqa|xh\205\177n\216\206t\232\211x\245~"
+  "k\243\304\261\363\276\254\370\274\252\374\267\250\375\267\247\377\256"
+  "\240\370\265\247\376\260\243\365\266\251\371\273\256\377\273\255\377"
+  "\264\246\376\253\234\367\244\225\362\240\222\361\232\214\355\226\213"
+  "\353\223\211\352\217\210\350\214\207\345\212\205\343\207\203\341\206"
+  "\201\337yr\317\213\202\333\202z\315|v\276}x\262(%P\32\32""6!\40.\35\36"
+  "\40\32\35\26\32\34\21\22\24\11\31\30\24\32\30\31\34\31\40\25\22\31\30"
+  "\30\32\26\26\26\202\24\24\24\2\25\25\25\27\27\27\202\30\30\30\12\33\31"
+  "\32\34\32\33\37\35\36\40\36\37\"\40!%#$(&'*()---000\203423\14""756=;"
+  "<B at AECDHFGLHIMIJPLMTPQVRSUQRWST\202VRS\5UQRTPQRNOQMNPLM\220SOP\1PLM\202"
+  "XTU\10QMNNJKSOPQMNKGHZVWVRSQMN\202NJK\27SOPYUV]YZa]^^Z[YUVSOPNJKJFGH"
+  "DEFBCOKLLHIQMNSOPOKLSOPNJK:67956FBCJFGOKL\202[WX\10WST^Z[ief]YZSOPTP"
+  "QWSTUQR\212SOP4YUVVRSTPQVRSWRVYTXaZajcjg`hkdlldojbmjboqivzo\177~s\203"
+  "\220\205\225\225\212\232\226\213\233\215\202\223\200s\207wi\200wi\203"
+  "{l\211{j\212zi\213|g\216~i\222\177j\225~i\224\201j\230\204m\233\204l"
+  "\234\205m\235\207o\237\212r\242\216w\245\221z\250\223|\252\224}\253\232"
+  "\203\257\244\215\271\260\231\303\270\241\313\271\243\312\261\233\302"
+  "\237\211\260\220z\241\222{\247\216w\243\211r\236\206o\233\202\205n\234"
+  "\202\206o\233\20}h\221|g\220yd\213wc\210\202n\221\224\200\243\216{\233"
+  "ub\202jTznX~lX}nZ\177t`\205vb\207{g\214\206r\225\202\205q\2248}l\216"
+  "q`\200hWwgVvhWwiYvqa~vf\203}m\212\203s\220\206w\226\207w\234\207v\242"
+  "\207v\254\305\262\362\263\241\353\303\260\377\256\233\364\257\236\372"
+  "\267\246\377\265\246\377\250\231\366\255\237\366\257\241\366\263\245"
+  "\374\266\250\377\265\250\377\260\243\375\247\232\366\236\223\357\233"
+  "\220\356\227\216\353\222\213\352\216\211\347\214\207\345\211\205\343"
+  "\207\203\341\207\202\336\216\205\336\210\177\320}v\272\201|\262!\35B"
+  "\40\36""4\26\26\36\35\35\35\25\26\21\22\23\15\14\13\6\37\36\32\24\23"
+  "\21\33\31\32\32\26\27\33\31\34\31\31\31\27\27\27\202\25\25\25\2\26\26"
+  "\26\30\30\30\202\31\31\31\31\34\32\33\36\34\35\40\36\37\"\40!$\"#&$%"
+  "*(),*+000111423645867<:;CABIGHKIJNLMQMNOKLNJKPLMQMNOKLSOP\204TPQ\3SO"
+  "PRNOQMN\220SOP\1OKL\202VRS\27RNOVRS]YZXTUKGHVRSUQRRNOQMNSOPWST\\XY_["
+  "\\TPQSOPPLMMIJJFGIEFJFGKGHC\77@\77;<\202B>\77\20\77;<FBCD at A1-.*&'@<="
+  "LHIQMNVRSSOPTPQb^_rnob^_TPQRNO\202TPQ\2SOPTPQ\210SOP\1TPQ\202OKLHWST"
+  "]X\\\\W[[T[\\U\\^W_g`hmepjbmianqiv\177t\202\207|\212\224\211\227\215"
+  "\202\220\203x\210}r\202|o\201zm\201xj\203ug\201yi\206xg\207zf\213|g\216"
+  "|g\220{f\221~g\225\201j\230\202j\232\204l\234\207o\237\210p\240\211r"
+  "\240\214u\243\220y\247\224}\253\223|\250\233\204\260\246\217\271\262"
+  "\233\305\274\246\315\275\247\316\263\235\304\247\220\272\226\177\253"
+  "\225~\252\224}\251\223|\250\222{\251\217x\246\213t\240\210q\235~i\224"
+  "}h\221ze\214xd\211\202n\223\222~\241\213x\230o[~pZ\200u_\205ua\206zf"
+  "\213\202n\223\203o\224\202n\223\211u\232\202n\223\177k\216yh\212\202"
+  "ud\206\21ve\205xg\211xg\207\177o\214\205u\222\214|\231\220\177\237\215"
+  "}\241\207v\240\200o\243yj\245\270\247\356\272\250\372\255\232\364\270"
+  "\247\377\256\234\377\247\227\372\202\255\235\377\7\255\236\373\252\234"
+  "\364\252\233\366\256\241\373\264\247\377\261\246\377\246\233\367\202"
+  "\234\223\360\31\227\220\355\222\215\351\216\211\345\213\210\343\211\206"
+  "\341\207\204\335\210\202\330\204{\312\203z\275\204{\260\34\30=&#8!\40"
+  "&\32\32\30\22\23\15\14\15\7\31\32\25\27\26\24\27\25\26\32\30\31\22\20"
+  "\21\23\17\16\31\30\26\31\31\31\27\27\27\202\26\26\26\1\27\27\27\203\31"
+  "\31\31\34\35\33\34\37\35\36!\37\40#!\"%#$(&'+)*-+,...///312978=;<@>\77"
+  "A\77 at CABFDELJKQMNPLMNJKQMNRNOQMNOKLPLMRNOSOP\202TPQ\2SOPRNO\220SOP\1"
+  "NJK\202RNO\15SOP`\\]mijeabRNOKGHPLMWST]YZ_[\\]YZZVWWST\202KGH\4HDEC\77"
+  "@=9:956\202734\2NJKOKL\202EAB\24QMNMIJ>:;:67+'(^Z[vrslhimijqmnfbcXTU"
+  "OKLTPQ)%&>:;eabRNOOKLWST\202VRS$ZVWTPQJFGRNOZVWQMNSQRTRSVRSSOPQLPTOS"
+  "\\W]c^d_Zahcjibjc\\dh`k{s~\210\200\213\211\201\214\205{\206\201w\202"
+  "yn|shxpevqeytf}wi\202wg\204xg\207yh\214{i\217}h\221~i\222\202}h\223\202"
+  "\200i\227\1\202k\231\202\205n\2348\206o\235\212s\237\217x\244\225~\252"
+  "\236\207\263\246\217\271\251\222\274\250\221\273\252\223\275\257\231"
+  "\300\263\234\306\260\231\305\257\230\306\250\221\277\243\214\272\237"
+  "\210\266\223|\252\213t\242\215v\242\201l\227t_\210hSzo[\200\200l\221"
+  "\234\210\253\214y\231\177k\216\177i\217~h\217\201k\222\205o\226\206p"
+  "\227\204n\225\205p\227\211t\233\210s\232\202n\223\201m\222\202n\223~"
+  "m\221\203r\224\211x\234\210w\231\232\207\247\235\212\250\206u\225\212"
+  "y\235\204t\233xf\226|j\244\265\244\350\262\237\360\261\236\367\257\236"
+  "\376\255\234\377\253\232\377\202\252\231\377\37\251\232\377\250\232\373"
+  "\247\231\370\250\232\371\253\235\374\256\240\377\253\240\377\250\235"
+  "\375\243\232\367\233\222\357\225\216\353\232\225\357\213\207\336\212"
+  "\206\335\215\211\336\206\202\326\211\205\317\200x\26381]\31\22""3&#8"
+  "&#,\36\34\35\35\34\30\26\25\20\22\21\15\33\31\32!\37\"\37\35\"\33\31"
+  "\34\32\30\31\202\32\31\25\5\23\23\21\34\34\34\11\11\11\17\17\17!!!\202"
+  "\32\32\32\3\34\34\34\40\36\37\"\40!\202'%&\27#!\"*()1/0.,-111555:89;"
+  "9:978;9:B at AHFGJHIPNOPLMHDEIEFRNOTPQMIJRNOPLMMIJ\202LHI\6PLMSOPVRSRNO"
+  "SOPUQR\202VRS\7UQRSOPRNONJKRNOUQRTPQ\202QMN>SOPWSTRNO^Z[UQRQMNa]^_[\\"
+  "VRS`\\]eabfbc^Z[ZVW\\XYPLMHDEQMNC\77@*&'\27\23\24\32\26\27)%&512>:;E"
+  "ABTPQ`\\]c_`d`agcdXTUD at AA=>VRSwst~z{mijhdefbc]YZVRSGCDPLM1-.GCDkghWS"
+  "TOKLUQRNJKKGHQMNSOPLHIRNOYUVQMNOMNQOPVRSWST\202XSW\2ZU[[V\\\202`[b\22"
+  "`Yab[cnfq|t\177\203{\206\202z\205\201w\202}s~xm{shvqfvqfwtg{ug~yi\204"
+  "zj\207zi\213{j\216\202}h\217#}h\221}h\223zc\217|e\221\200i\227\204m\231"
+  "\204m\233\204m\231\207p\234\214u\241\220y\245\222{\247\236\207\261\253"
+  "\224\276\246\217\271\227\200\252\226\200\247\240\211\263\261\232\306"
+  "\263\234\312\257\230\306\254\225\303\255\226\304\246\217\275\234\205"
+  "\263\232\203\261\214w\242\207r\233\205p\231\217z\241\233\207\254\262"
+  "\236\301\240\214\257\224\200\243\217y\240\202\216x\237\202\220z\241\34"
+  "\217y\240\220{\242\224\177\246\220{\242\216y\240\222}\244\227\203\250"
+  "\226\204\252\231\210\254\233\211\257\227\206\252\212w\227\205r\222\203"
+  "r\224\212x\240{j\227\202q\247wg\246\257\237\350\257\235\363\255\234\372"
+  "\254\233\377\252\231\377\251\230\377\250\227\377\246\227\376\246\227"
+  "\374\247\231\373\202\246\230\372%\246\232\374\250\234\376\250\236\377"
+  "\245\233\374\242\230\370\234\225\362\224\216\346\223\215\343\221\214"
+  "\336\223\216\336\206\202\316\210\204\316\204\200\273<6Z/*@1-<309$\"'"
+  "\36\34\35\35\34\32\25\24\20\33\32\30!\37\40$\"%!\37\"\34\32\35\31\27"
+  "\30\30\27\25\26\25\23\20\20\20\31\31\31\13\13\13\23\23\23###\35\35\35"
+  "\33\33\33\36\36\36\202\36\34\35\16$\"#'%&&$%+)*1/00./111555;9:><=\77"
+  "=>@>\77CABFDE\202IGH\12HDEFBCKGHRNOTPQPLMYUVWSTUQRSOP\202RNO\2TPQUQR"
+  "\204XTU\2WSTVRS\202TPQ\5JFGOKLTPQVRSTPQ\202SOPWTPQUQRGCDIEFc_`kghNJK"
+  "=9:MIJYUV\\XYSOPOKLXTUWSTPLMTPQ3/02./:67KGHVRSYUV[WX_[\\lhi{wx|xytpq"
+  "jfgVRSFBCIEFtpq\201}~zvwiefc_`[WXRNOTPQLHIVRSFBCZVWsop^Z[QMNTPQYUVOK"
+  "LSOPYUVSOPRNOTPQNJKRPQQOPRPQTRSXSWZUYYTXXSW_Z`VQWUPWc^etmu{t|zs{yrzt"
+  "musltsitqftqfvqfwsfztf}vh\201vh\202wf\206wf\210ye\210ye\212\202ze\214"
+  "!xa\213zc\215\177h\224\203l\226\204m\231\203l\226\205n\230\211r\234\216"
+  "w\241\235\206\260\244\215\267\233\204\256\217x\242\210q\233\177h\222"
+  "v_\211\205n\232\224}\253\236\207\265\247\220\276\263\234\312\264\235"
+  "\313\251\222\300\242\213\271\231\204\257\235\210\261\243\216\267\256"
+  "\231\300\265\241\306\307\263\326\265\241\304\254\230\273\242\214\263"
+  "\203\240\211\263\30\236\207\261\234\205\257\235\206\260\240\211\263\247"
+  "\222\273\242\215\266\243\216\267\241\214\263\232\205\256\225\200\247"
+  "\221|\245\211t\233\221}\240\215y\234\202p\226}j\227\203q\243uc\237\252"
+  "\231\337\270\246\370\252\231\365\251\231\374\250\227\377\245\225\377"
+  "\202\244\224\3778\243\224\375\243\224\373\242\226\372\241\225\371\240"
+  "\224\370\242\226\372\244\230\374\243\231\374\242\230\371\236\227\366"
+  "\222\214\346\232\225\351\212\206\323\223\215\327\231\224\327\217\212"
+  "\312\214\210\303;9a1-;:65;6:2-3%\")\"\37&\36\34!\26\24\27\"\40!$#!\""
+  "\"\40\36\36\34\32\32\32\30\30\32\26\25\32\24\23\30\23\23\25\34\34\34"
+  "\24\24\24\33\33\33'''\40\40\40\36\36\36!!!&$%\"\40!'%&-+,,*+-+,1/00."
+  "/555777;9:\77=>CABECD\202FDE\10JHIB at AA=>HDEPLMSOPUQRWST\202XTU\203WS"
+  "T\203VRS\6WSTVRSTPQRNOQMNPLM\202OKL(IEFNJKUQRXTUWSTUQRRNOQMNUQRRNOTP"
+  "QRNOGCD=9:($%\13\7\10<89OKLTPQSOP[WXQMN623$\40!'#$845RNOfbcjfgeabfbc"
+  "kgh_[\\fbc^Z[RNOOKLKGHMIJ\\XY\202qmn\1eab\202^Z[6UQROKLXTUTPQZVWUQRa"
+  "]^njk]YZMIJPLM]YZNJKQMNYUVSOPQMNTPQQMNWUVSQRNLMOMNUPTXSWYTXWRVZU[PKQ"
+  "SNUe`gtmusltpiqrkshaiibjmcnodrqfvrgwtgytg{tf}se~td\201sb\202vc\203wc"
+  "\206xd\207ye\212|f\215}g\216\200j\221\202\203m\224\34\202l\223\205n\230"
+  "\211r\234\222{\245\243\214\266\244\215\267\223|\246\215v\240\225~\250"
+  "\222{\245\202k\227\200i\227\207p\236\202k\231{d\222\202k\231\215v\244"
+  "\224}\253\227\200\256\234\207\262\242\215\270\253\226\277\265\240\307"
+  "\272\246\313\312\266\333\271\245\310\261\235\302\263\235\304\202\263"
+  "\234\306\2\262\233\305\260\231\303\202\255\226\3007\256\227\301\241\214"
+  "\265\233\206\257\230\203\254\225\200\251\216y\242\214w\240\213v\237\205"
+  "p\231~j\217\206q\230\177m\227{i\231\200m\244}m\254\265\245\360\242\222"
+  "\352\245\225\367\243\224\373\242\222\377\241\220\377\241\221\376\241"
+  "\221\374\241\222\371\241\222\367\240\224\370\237\223\367\236\222\370"
+  "\235\222\370\237\224\372\237\225\370\235\226\366\234\225\362\236\230"
+  "\356\217\210\330\236\230\340\225\217\317\213\206\276\205~\261;5a3/J<"
+  ";975)(%\40\"\36\37$!*\37\34'\31\26\37\36\33\"\"\40!\37\40\33\33\34\27"
+  "\30\31\24\26\26\24\27\27\31\202\30\27\37\25\30\30\32\36\36\36\33\33\33"
+  "\37\37\37&&&!!!\36\36\36\"\"\"*()$\"#(&'/-..,-/-.312423;;;999;9:><=D"
+  "BC\202HFG\15GEFJHI@>\77C\77 at OKLUQRRNOTPQ[WXOKLQMNTPQVRS\204XTU\6UQRS"
+  "OPQMNNJKMIJNJK\202OKLDQMNSOPVRSXTUWSTUQRSOPRNOSOPUQR\\XYRNOKGH`\\]]Y"
+  "Z2./\35\31\32+'(#\37\40\24\20\21!\35\36""512=9:A=>623EABYUVb^_^Z[YUV"
+  "\\XYb^_623:674013/0C\77 at OKLZVWkghlhid`aTPQPLMWSTSOPUQRfbcSOPRNOVRS[W"
+  "Xa]^ZVWLHIPLMRNOFBCIEFOKLKGHOKLXTUVRSTRSQOPPNORPQ\202VTU\33SNROJNRMQ"
+  "NIMUPVd_ejeke`ff_flemf_gh`kkcpmerqfvrgwrewreyse|se~td\177td\201ue\202"
+  "wf\206{h\210|h\213\202l\220\202\200j\220\10\201k\221\200j\220\201k\221"
+  "\205o\226\213u\234\241\213\262\232\204\253\225~\250\202\224}\247\7\221"
+  "z\244\220y\245\221z\246\200i\227\221z\250\231\202\260\224}\253\202\223"
+  "{\253,\217x\246\216w\245\230\203\256\235\210\263\245\220\271\257\232"
+  "\301\264\240\305\304\260\325\260\234\277\246\222\267\237\210\262\241"
+  "\212\266\242\213\267\241\212\266\236\207\263\234\205\261\231\202\256"
+  "\230\201\255\227\202\255\221|\247\217z\245\215x\243\210s\236\212u\240"
+  "\214w\242\210s\234\203m\224\204o\230\207t\241\210v\250o[\230\271\250"
+  "\356\250\226\350\256\235\371\243\222\370\240\220\373\236\215\375\234"
+  "\216\375\235\220\374\236\221\372\240\221\366\237\221\363\236\222\364"
+  "\234\222\363\202\233\221\364\40\233\220\366\232\222\365\232\223\362\232"
+  "\224\356\231\221\344\232\224\336\220\212\310\236\227\313,%O72R3-G*&4"
+  "!\36\31!\37\23\32\27\22\33\27\30!\36'\30\25\40\25\22\33%\")\40\40\40"
+  "\33\34\27\25\26\21\22\24\17\23\25\22\26\27\31\32\32\"\35\35%\32\32\34"
+  "\32\32\32\35\35\35\37\37\37\202###\5\40\40\40%%%'%&#!\"'%&\202,*+\3""0"
+  "./756978\202:::\25=;<B at AFDEHFGFDECABFDEA\77 at GCDSOPUQROKLPLMXTUPLMRNO"
+  "UQRWSTYUVXTUWST\202VRS\2UQRSOP\202RNO\7TPQVRSWST\\XYZVWWSTVRS\202UQR"
+  "\202TPQ\26_[\\FBCPLMfbcc_`a]^eab]YZ>:;`\\]jfg\\XYSOPHDE623-)*UQR_[\\"
+  "iefjfgeab`\\]\202^Z[#B>\77IEFGCDKGH[WX]YZXTU\\XYplmfbcRNOIEFPLMSOPZV"
+  "WmijRNOKGHYUV\\XYb^_hde[WX_[\\WSTTPQWSTSOPIEFOKLWSTQMNKIJOMNUST\202["
+  "YZ\17TRSLGKD\77CLGKOJNWRX_Z``[a^Y_b[bhahkcnldonfsogt\202qfv\14qdvpcu"
+  "pcwqczrb|sc~ue\202wg\204zg\205{h\210\202m\216\200k\214\203~h\214$\201"
+  "k\221\210r\230\220z\240\243\215\264\232\204\253\221z\244\216w\241\213"
+  "t\236\204m\227~g\223}f\222r[\211\203l\232\213t\242\211r\240\211q\241"
+  "\214t\244\221z\250\232\203\261\234\207\262\240\213\266\246\221\272\260"
+  "\233\302\266\241\310\303\257\324\254\230\273\236\212\257\234\205\257"
+  "\237\210\264\240\211\265\235\206\262\232\203\257\230\201\255\225~\252"
+  "\222{\247\224\177\252\202\217z\245\26\215x\243\207r\235\205p\233\204"
+  "o\232~i\224\200i\223\200k\226zd\223xe\234yg\245\273\252\361\254\232\360"
+  "\253\234\373\243\222\372\240\220\375\233\215\376\232\214\373\233\216"
+  "\372\235\220\371\236\217\364\233\220\360\233\221\361\202\232\220\361"
+  "%\231\217\362\227\217\362\227\220\360\230\221\360\230\222\350\221\212"
+  "\330\247\240\344\225\216\3041*TC<[%\36""0-'1/*.\40\35\30'$\37#\37\36"
+  "\37\33\34\"\40%\37\35\"\32\30\35\36\34\37\40\40\40\33\33\33\25\27\24"
+  "\24\26\23\24\26\25\27\30\32\33\34\40\37\40$\32\32\34\27\27\27\37\37\37"
+  "\"\"\"&&&+++''',,,\202,*+\2021/0\17.,-312:89978777;;;B at AGEFIGHFDEA\77"
+  "@=;<B at ADBCKGH\202QMN\13NJKOKLTPQZVW[WX\\XY[WXZVWXTUUQRTPQ\204SOP\7TP"
+  "QUQRVRSWST`\\][WXVRS\202TPQ\202UQR\14TPQUQRNJKVRS`\\]XTUMIJEAB<89%!\""
+  "B>\77MIJ\202EAB!LHIWSThdekghuqr}yz~z{{wxuqrkghb^_gcdoklkghieflhi^Z[K"
+  "GHHDE`\\]b^_VRSMIJSOPTPQVRSa]^KGH\77;<XTU]YZb^_plm\202_[\\\22UQR`\\]"
+  "ief]YZNJKWST^Z[PLMMKLQOPVTUWUVTRSMKLGEHDBENIMTOS\202XSW\4[V\\b]cfage"
+  "`f\202mep\202nfs\202peu\202odu\4obvpbyrb|sc}\202ue\200&vf\201xe\203}"
+  "h\207{f\205{f\207|g\210\177j\213\204n\222\216x\234\227\201\247\233\205"
+  "\254\226\200\247\220y\243\212s\235\203l\230{d\220v_\213t]\211s\\\212"
+  "\205n\234\224}\253\232\203\261\232\202\262\223{\253\220y\247\226\177"
+  "\255\247\222\275\250\223\276\251\224\275\257\232\301\263\236\305\301"
+  "\255\322\253\227\272\237\213\260\230\201\253\234\202\257\231\202\256"
+  "\223|\250\202\217x\244\6\215v\242\213t\240\210q\237\205n\234\210r\240"
+  "\212t\242\203\207q\237K\201l\227\200i\225\206p\236\201k\234\202o\247"
+  "\275\252\352\264\242\354\302\257\377\244\224\366\247\226\377\242\221"
+  "\377\234\216\377\232\214\375\233\216\370\233\217\365\232\216\360\230"
+  "\215\353\230\217\354\226\217\354\227\220\357\226\217\357\225\216\356"
+  "\225\216\355\225\216\353\225\220\344\236\230\342\221\213\311HBrOIkQL"
+  "`\77:@61.72.726618,'+$\40!%$\40$#\37\33\34\27\24\24\22\34\34\34\31\30"
+  "\35\27\30\35\30\31\36\26\32\35\25\31\32\30\34\33\36\40\35\32\32\32\24"
+  "\24\24!!!&&&***111+++....,-645=;<978423;9:A\77@<:;:::\77\77\77FDEHFG"
+  "FDEB at A\77=>><=DBCJHI\202OKL\15QMNVRSXTUVRS`\\]_[\\^Z[]YZ[WXXTUVRSUQR"
+  "RNO\202SOP\203TPQ\4SOPRNOZVWVRS\202SOP\13UQRVRSUQRSOPB>\77YUV_[\\VRS"
+  "RNOJFG;78\2023/0\2RNOhde\202okl+d`a^Z[ief}yz\205\201\202\207\203\204"
+  "\201}~{wxxtuqmniefhdeokliefc_`b^_UQRGCDHDEEABTPQWSTUQR[WXWSTNJKOKL95"
+  "6,()LHIRNOVRSd`aNJKIEF:67RNOfbc]YZRNOc_`lhi[WX\202WUV\7SQRLJKFDEECDI"
+  "GJNLOSNR\202XSW\5TOS[VZjeimhne`f\202jck\202kcn\2ncqodr\202peu\6rewsf"
+  "ztf}ug~wg\201vh\201\202wg\201\24xe\201wd\200xe\201|i\205\201n\214\207"
+  "t\222\223~\237\234\210\253\243\215\263\213u\233\202l\223\210r\231w`\212"
+  "W at jQ:dcLx\210q\237\220y\247\224}\253\227\200\256\202\232\203\261\16\240"
+  "\211\267\256\227\303\254\227\302\252\225\300\246\221\272\247\222\273"
+  "\251\224\273\271\245\312\250\224\271\240\214\261\237\206\260\240\206"
+  "\263\232\203\257\222{\247\203\216w\243Z\214u\241\215v\244\211r\240\212"
+  "s\241\213v\241\210q\237\210s\236\212s\241\204o\232\216w\243\177i\227"
+  "|h\235ye\240\303\262\366\266\245\363\263\244\371\256\237\374\251\232"
+  "\377\242\225\377\235\217\376\231\215\373\232\215\367\231\217\362\227"
+  "\216\353\225\214\347\224\215\354\224\217\355\226\217\356\225\217\351"
+  "\226\215\346\225\215\340\225\216\333\226\217\323\220\213\305D>nOImLG"
+  "^;5A512:5//*&.)/+%/)$*)%&#\"\35\33\33\23\24\25\17\23\24\17\27\27\27\26"
+  "\25\32\30\27\35\33\34!\33\34\40\30\31\33\30\32\27\34\36\31\30\30\26\20"
+  "\20\20\40\40\40%%%(((///'''(((#!\"1/0><=;9:867CABJHICABA\77 at ECDGEFDB"
+  "C\77=>=;<@>\77DBCJHIQOPSOPOKLTPQ`\\]b^_[WX]YZ\202\\XY\1[WX\202ZVW\202"
+  "YUV\11XTUYUVZVW[WXZVWXTUUQRTPQRNO\202PLM\33SOPWSTXTUTPQQMN\\XYWSTPLM"
+  "UQRIEF\25\21\22\3\0\0\36\32\33]YZjfgnjkrnowsttpq|xy\223\217\220\221\215"
+  "\216\223\217\220\212\206\207wstkghmij\202qmn\32YUVUQRQMNPLMSOPZVWb^_"
+  "hdeplmZVWB>\77FBCXTUSOPGCDLHI<89FBCa]^XTUZVWKGHHDE,()\32\26\27)%&\202"
+  "0,-\10\77;<VRSXTUHDEZVWYUVTPQKGH\202C\77 at -KGHSOP^Z[ZVWSOPPLMYUVfbcid"
+  "hc^bhbfd]daZbc\\dh`kldoldqkcppeuwl|mbsqfwsfzth|n`w{m\204zl\203n_vwg\201"
+  "\206v\220yi\204\215}\230\232\207\245\242\222\257\226\203\243\202n\221"
+  "\211u\232\205q\226}h\217ePwmX\177\211t\235\216y\244\234\206\264\251\223"
+  "\301\202\254\226\304P\256\231\304\252\225\300\244\217\272\230\203\256"
+  "\227\202\253\221|\245\226\201\252\246\221\270\252\225\274\235\210\257"
+  "\220{\242\223y\246\222x\247\225{\252\222x\247\207m\232\206l\231\215s"
+  "\240\221w\244\210n\233\205k\230\204j\227\204m\227\213q\236\211r\234\206"
+  "l\231\177h\222}h\217|j\224o\\\223\323\300\377\305\263\375\276\255\375"
+  "\257\242\364\254\240\366\247\234\370\243\231\372\236\223\373\226\215"
+  "\366\224\211\361\221\212\352\222\214\344\223\216\350\225\220\364\214"
+  "\207\355\223\216\354\230\223\347\215\206\314\233\223\317\230\220\301"
+  "TLsULkOG^F\77Q=7C6171-.-)&+'$#!$\"\40#\37\35\40\36\34\35\35\34\32\36"
+  "\35\33\37\36\34\40\37\35&$%\36\34\37\24\22\25\25\25\27\36\36\40\34\34"
+  "\34\30\30\30\35\35\33\25\23\24\33\31\32+)*)'(,*+\202&$%\21\32\30\31\17"
+  "\15\16\31\27\30\40\36\37#!\"-+,;9:><=867CABFBCEAB@<=;78<89EABMIJ\202"
+  "YUV\35QMNIEFPLM`\\]a]^VRSZVWTPQOKLQMNXTU\\XYZVWVRSSOPZVWOKL^Z[WSTYUV"
+  "JFGZVW[WXRNOOKL^Z[RNOc_`KGH\202WST\31A=>c_`a]^SOP*&'401[WXkgh\205\201"
+  "\202\232\226\227\234\230\231\232\226\227\234\230\231\225\221\222\210"
+  "\204\205{wxoklb^_[WX]YZ_[\\^Z[\\XYUQRTPQ\202SOP\40TPQWST[WX]YZXTUPLM"
+  "FBCOKL_[\\[WXUQR_[\\vrsuqryuvc_`eabMIJGCD956FBC]YZmijeabWSTLHI@<=401"
+  ">:;EABMIJPLM\202OKL\1RNO\202VRS\202WST\13YUVc_`kghief`\\]^X\\`Z^b[bc"
+  "\\cb[caZb\202aYd\\f[irguncstiyuj{wl}mauwk\177l_sdWk|n\205\202t\213\200"
+  "p\212\215}\227\233\213\246\232\212\245\217\177\234\221\200\240\211u\230"
+  "vb\205\200l\221hTydOv\221|\243\237\212\265\240\212\270\236\210\266\227"
+  "\202\255\220{\246\215x\243\212u\240\206q\232\202m\226\204o\230\205p\231"
+  "\215x\237\240\213\262\244\217\266\227\202\251\214w\236\220y\245\223y"
+  "\250\233\201\260\230~\255\201g\224tZ\207\200f\223\221w\244\225{\250\215"
+  "s\240\205l\226\200g\221\177f\220{b\214rY\203hRyZFk[JteR\211\305\265\366"
+  "\316\274\377\270\252\371\304\267\377\262\251\372\251\237\365\245\234"
+  "\371\236\226\373\230\217\370\223\213\362\221\212\352\217\213\340\220"
+  "\214\343\214\207\353\222\215\361\217\212\344\212\206\322\225\217\313"
+  "\220\211\265OHiZRiLCTI\77J at 9A9292-1,*+)'('&$$\"#\"\40!\40\36\37\35\33"
+  "\34\202\34\32\33\7\35\33\34\36\34\35\33\31\32\31\27\30\26\24\25\33\31"
+  "\32#!\"\202!\37\40\32(&'7566459780./201&$%$\"#\37\35\36.,-<:;FDEDBC="
+  ";<978423/-.512=9:EABHDEGCDFBCJFGNJKQMN\202VRS\6SOP[WXgcdc_`UQRVRS\202"
+  "WST6UQRQMNMIJKGHJFG[WXeabVRS]YZSOPYUVPLMa]^HDEC\77 at _[\\\\XYRNOMIJJFG"
+  "SOPa]^mijd`aA=>XTU/+,($%rno\210\204\205\214\210\211\210\204\205{wxpl"
+  "miefc_`[WXTPQPLMMIJOKLUQRZVW[WXZVWRNOSOPTPQVRSUQRTPQRNOQMNRNO\202VRS"
+  "\32\\XYb^_WSTQMN^Z[GCDRNO]YZYUVlhiEAB.*++'(iefnjkplmgcdXTUOKLPLMVRS>"
+  ":;EABNJKQMNPLM\202MIJ\2NJKRNO\202TPQ*VRS^Z[d`aa]^YUVWRV]X\\c\\cb[b`Y"
+  "`aZbialphsbZgldqf[kh]mj_pshypev}r\203{n\200k^p{n\202wj~\211{\222\237"
+  "\221\252\257\237\272\235\215\250\200p\215|l\211\177n\216m\\~nZ\177gS"
+  "xr^\203\213v\235\254\227\302\237\212\265\220{\246\205p\231~i\222\202"
+  "ze\216\22{f\217ze\216\177j\221\203n\225\215x\237\234\207\256\235\211"
+  "\256\216z\237\204o\226~g\223\203l\230\210q\235}f\222fO{bKwr[\205\177"
+  "h\222zc\215\202\177h\222+v_\211jT{fPwmW~v`\207xd\211\177o\226\332\310"
+  "\374\324\304\377\303\262\371\305\267\377\271\255\371\260\247\366\254"
+  "\242\370\250\237\374\241\231\376\233\222\373\224\215\364\220\212\352"
+  "\215\211\336\214\210\335\215\212\345\216\213\346\207\204\325\222\215"
+  "\320\225\221\304LEnGA]IAVB:I>6A92:4-4/*.*()'%&%%%$\"#\"\40!\37\35\36"
+  "\35\33\34\33\31\32\32\30\31\202\33\31\32\5\32\30\31\35\33\34\36\34\35"
+  "\"\40!%#$\202!\37\40\7)'(\40\36\37%#$-+,.,-978'%&\202\35\33\34=GEFKI"
+  "JNLMJHIB at A=;<><=B at A734>:;FBCJFGHDEGCDHDEJFGOKLSOPTPQRNOYUVb^_^Z[RNOO"
+  "KLUQRZVWVRSOKLNJKWSTa]^>:;PLMGCDOKLKGHZVWSOPa]^`\\]EAB^Z[JFGVRSWSTie"
+  "ffbcJFGHDEZVW>:;A=>734HDEief\237\233\234\212\206\207qmn`\\]UQR\202NJ"
+  "K\5QMNLHIMIJPLMRNO\202TPQ\1SOP\202QMN\2SOPTPQ\202UQR\33SOPPLMNJKWST^"
+  "Z[]YZ^Z[_[\\QMNIEFSOP[WX]YZWSTPLMsopVRSTPQplm\202~\177kghVRSOKLMIJKG"
+  "HOKLXTU\202\\XY\33ZVWUQRQMNPLMTPQWST_[\\[WXUQRQMNUQR[WX\\XYYUVYTX]X\\"
+  "`Y`^W^\\U\\b[bpiq|t\177tlywo|f[kbWgdYj\202pev!}r\203\202u\207rewxk\177"
+  "yl\200\225\207\236\257\241\270\246\226\260\202r\215\212z\225yi\206o_"
+  "|N=]L8[_Kn\177k\220\221}\242\254\227\300\230\203\254\206q\232\177j\221"
+  "~i\222{f\215}h\221\201l\223~i\220\203n\225\207r\231\220|\241\234\210"
+  "\255\231\205\252\211u\232\200l\221\202\200i\2234qZ\206XAkV\77kxa\213"
+  "\225~\250\226\200\247\203l\226yc\212pY\203s]\204~h\217\207q\230\210r"
+  "\231\203o\224\206u\227~n\225\333\312\376\334\314\377\321\302\377\303"
+  "\266\376\267\253\365\270\260\375\255\245\370\250\242\374\243\233\377"
+  "\235\226\376\227\220\370\222\214\354\215\211\336\213\210\331\217\213"
+  "\337\206\203\322\217\214\321\211\206\277TNzLGg@;QA:J=5@:3;6/62-3,*-("
+  "(*%%%###\"\40!!\37\40\36\34\35\34\32\33\33\31\32\32\30\31\202\33\31\32"
+  "\30\36\34\35\"\40!#!\"$\"#%#$\40\36\37\37\35\36&$%*(),*+-+,.,-B at A534"
+  "645FDESQRIGHA\77@><==;<<:;\77=>DBC\203OKL\12LHIJFGLHIRNOVRS\\XY[WXTP"
+  "QOKLRNO\202ZVW1TPQPLMTPQVRSQMNNJKTPQd`asopfbclhiQMNLHIHDE_[\\ZVWfbck"
+  "ghGCDSOPMIJa]^lhia]^FBCeabIEFGCD\24\20\21\14\10\11+'(]YZokl\236\232\233"
+  "}yz`\\]YUVVRSPLMSOP]YZWSTYUV[WXZVWVRSRNOPLMOKL\210SOP%QMNVRSRNOSOPZV"
+  "WTPQMIJUQRWSTXTURNOFBC_[\\:67734WSTeabUQRNJKUQRXTUPLMNJKSOPlhiiefd`a"
+  "`\\]_[\\c_`jfgoklhded`a^Z[YUVZVW\202\\XY(ZVWWRVZUY\\W[ZUYYRYZSZaZbg`"
+  "hZR]h`kkcp{s\200\204y\211~s\203dYi`Uek`p\201v\206\222\205\227\224\207"
+  "\231\224\207\233\241\223\252\213}\224|n\207bRlo_zcSpF5UiXx\200o\217\214"
+  "{\235\243\222\264\235\210\257\213v\235}h\217}i\216~i\220zf\213xc\212"
+  "\202|h\215<\200l\221\203o\224\215y\234\231\205\250\226\202\245\212v\231"
+  "\204p\225~h\217\201k\222~g\221v`\207\204m\227\246\220\267\263\235\304"
+  "\246\220\266\234\206\255\223}\243\213u\234\220z\240\233\205\253\236\210"
+  "\256\226\200\246\212v\231\202q\223\204t\231\337\317\377\324\305\376\310"
+  "\271\372\326\313\377\264\252\357\304\274\377\260\251\371\252\244\376"
+  "\245\235\377\237\230\377\232\223\373\224\220\357\216\214\340\213\210"
+  "\325\210\204\316\220\213\315\214\211\302A>kJFgC\77VGCR:4>;6=8394/51,"
+  "2+),'')##%!!#\40\36\37\37\35\36\35\33\34\34\32\33\33\31\32\202\34\32"
+  "\33\202\35\33\34\202\40\36\37\6!\37\40&$%%#$$\"#*(),*+\202/-.\2,*+97"
+  "8\202&$%\14""978DBC><=<:;A\77 at CAB@>\77A\77 at FDE`\\]^Z[\\XY\202YUV\10]"
+  "YZd`aiefeabb^_]YZWSTXTU\202[WX\1XTU\202UQR(SOPOKLLHINJKSOPXTUJFG[WXT"
+  "PQfbcgcdjfgFBC:67PLMfbc{wxoklHDELHIB>\77TPQ/+,IEF956\7\3\4C\77 at b^_lh"
+  "i\221\215\216\210\204\205jfgTPQUQRVRSMIJKGHSOPQMNSOP\202TPQ\202SOP'U"
+  "QRWSTUQRTPQRNOQMNRNOSOPVRSWSTQMNTPQMIJLHIUQRTPQNJKSOPMIJYUViefa]^gcd"
+  "8451-.D at ASOPTPQ[WX_[\\XTURNO[WXkghhdegcdfbceabd`a\202eabkfbcZVW[WX]Y"
+  "Z_[\\^Z[[WXVRSRNOOJNTOS[VZ_Z^`Y`\\U\\XQYUNVQITWOZTLYd\\ih]k]R`A6F at 5E"
+  "\77""4DbWgxk|\224\207\231\246\231\253\241\224\250`SgG9P\77""0GUE_gWr"
+  "hXu\225\205\242\256\236\273\250\230\265\235\214\254\207s\230|h\215ua"
+  "\206xd\207zf\213wc\206ua\206wc\206}i\214\177k\216\200l\217\211v\226\225"
+  "\201\244\222\177\237\207s\226\202n\221xb\210{e\213\211s\232\231\203\251"
+  "\237\211\260\237\211\257\230\202\250\214v\232\215w\235\226\200\244\237"
+  "\211\257\237\211\255\227\201\245\217y\235\213u\231\212w\227\177n\216"
+  "\347\331\375\347\327\377\346\327\377\311\275\373\304\271\373\326\315"
+  "\377\255\247\355\261\254\374\254\250\377\246\240\377\241\234\377\234"
+  "\227\375\227\223\362\221\217\342\215\214\322\213\207\304\213\207\272"
+  "NKvA=^KG`>:IA;E\77:@8375041,2,*/((*$%'!\"$\36\37!\35\35\35\36\34\35\203"
+  "\35\33\34\202\36\34\35\202\37\35\36\4\"\40!\37\35\36\40\36\37'%&\202"
+  "(&'\25,*++)*312=;<;9:<:;$\"##!\"1/0@>\77A\77 at ECDHFGFDEECDMKLXVW]YZ^Z"
+  "[_[\\`\\]\202a]^\202`\\]\33XTUZVW\\XY^Z[]YZ[WXUQRQMNPLMQMNTPQWSTVRSR"
+  "NOKGHFBC;78FBC@<=YUVXTUOKL#\37\40\30\24\25\25\21\22:67IEF\202`\\]\2a"
+  "]^\22\16\17\202\3\0\0\27!\35\36D at A@<=\205\201\202\245\241\242\230\224"
+  "\225\212\206\207hdeTPQJFGQMNUQRMIJIEFNJKSOPRNOPLMOKLPLMRNOTPQUQR\202"
+  "TPQ\1SOP\202RNO\202SOP\25TPQSOPZVWSOPNJKTPQQMNKGHPLMWSTUQR\\XYD at A=9:"
+  "+'(NJKlhirnooklfbcWST\202JFG\15YUViefa]^`\\]_[\\]YZ[WXWSTSOPQMNNJKPL"
+  "MTPQ\202WSTdTPQPLMNJKOKLSOPYTX_Z^a\\`_Z^]V][T[[T\\HAI'\37*#\33&\"\32"
+  "%&\36)/$2LAOWLZxm{vkyf[kncseZkYL^\201t\210\202u\211xj\201}o\210rd~\213"
+  "}\227\250\232\264\244\224\257\202r\217yh\210tc\205q`\202tc\203ve\207"
+  "ve\205wf\210zi\211~m\215}l\214|k\213\205u\222\221\200\240\214|\231\200"
+  "o\217{j\212\203o\222xd\207zf\213\201m\220~j\217ye\210zf\211}j\212|h\213"
+  "|i\211~j\215\203p\220\210u\225\207t\224\200m\215xg\207~o\216\334\316"
+  "\362\311\274\352\336\321\377\334\321\377\315\305\377\304\276\374\271"
+  "\264\367\265\261\376\257\253\377\251\243\377\242\235\377\236\231\375"
+  "\226\226\360\220\222\337\216\216\316\207\203\265HDiROn>:QPN\\:7 at 948@"
+  "<=4012./,*-)'*&%*#$(!\"$\40!#\36\36\36\204\36\34\35\1\37\35\36\202\40"
+  "\36\37\30\"\40!&$%%#$$\"#)'(*())'(-+,201312978-+,(&'\40\36\37""867OM"
+  "NUSTSQRNLMFDEA\77 at DBCPNO\\Z[\203XTU$YUVXTUVRSRNOPLMMIJOKLSOPWSTXTUTP"
+  "QOKLNJKLHIPLMUQRYUV[WXYUVTPQQMNRNO:67\14\10\11\12\6\7\3\0\0\11\5\6\12"
+  "\6\7+'(/+,ZVWEAB\6\2\3\3\0\0\12\6\7\37\33\34\202mij\13UQReabQMNnjk\225"
+  "\221\222\226\222\223eabWSTNJKJFGPLM\203UQR\5YUV\\XYWSTSOPRNO\202TPQ\2"
+  "QMNNJK\202SOP\202TPQ\37SOPRNOPLMOKLJFGWSTVRSRNOVRSUQRRNOYUVVRSUQReab"
+  "KGH9560,-^Z[yuvd`a[WXOKLJFGRNOa]^kghmij]YZZVWVRS\202TPQ\203UQR\2RNOP"
+  "LM\202OKL\6PLMQMNSOPVRSWSTVRS\202TOS\37UPTYTX_X_c\\chaib[cYRZogr}u\200"
+  "\211\201\214\231\217\232\276\264\277\301\266\304\277\264\302\234\221"
+  "\237~s\201\247\234\254\232\217\237\211|\215\251\234\256\272\255\277\261"
+  "\244\270\217\201\230j\\s\215\177\226\236\220\251\207w\221sc~zj\207xh"
+  "\205ue\202\202td\201\20vf\203zj\207}m\212yi\206wg\202wg\204\201q\214"
+  "\217\177\234\213{\226~n\213yi\206}j\212vc\203wd\204zg\207yf\206\202{"
+  "h\210+wd\202ub\200wd\202xe\203wd\202ub\200vc\177{h\206~n\213k]~\343\327"
+  "\375\331\315\373\335\323\377\333\322\377\314\304\377\277\273\366\304"
+  "\302\377\267\265\377\262\256\377\251\245\377\243\236\377\235\234\372"
+  "\227\227\355\220\222\334\216\217\307SOtJF_KH[B>LB\77F647GCB.*)2.--+,"
+  "*(+'')%&*%&(\"&'#$&\37\37\37\40\36\37\204\37\35\36\202\40\36\37\2\36"
+  "\34\35&$%\202'%&\1,*+\202-+,\24""201423645@>\77""201'%&%#$FDE][\\OMN"
+  "JHICAB@>\77ECDQOP[YZa_`YUVVRSRNO\202PLM\1RNO\202SOP\3RNOPLMOKL\202QM"
+  "N3PLMSOPVRSUQRVRSUQRRNOPLMQMNVRSZVW\\XYVRSHDEfbcokl~z{\212\206\207\270"
+  "\264\265\271\265\266\261\255\256rno%!\"fbcsopkgh\216\212\213\255\251"
+  "\252\244\240\241}yzFBC~z{\215\211\212hdeVRS[WXVRSRNOPLMRNOTPQYUV]YZU"
+  "QRPLMNJKQMNWSTYUVTPQNJK\202XTU\10WSTRNOMIJNJKUQR[WXWSTTPQ\202RNO\202"
+  "TPQ\14RNOPLMLHIPLMQMN[WXOKLJFGeabgcdJFGRNO\202VRS\1^Z[\202jfg\11a]^X"
+  "TUZVWRNOPLMWSTSOPMIJUQR\210SOP\202QOP\202SOP\32UPTWRVYTX[VZ]X^qlr\206"
+  "\177\206\224\215\225\234\225\235\226\217\227\212\203\213\205~\206|t\177"
+  "\206~\211\231\221\234yq|\254\241\257\315\302\320\300\265\303\246\233"
+  "\253\210}\215\206{\214\220\203\225\236\221\245\232\215\241\207y\220\202"
+  "yk\202\1tf\177\203tf\200\202ug\201\202vh\202\10se\177ug\200yk\205\200"
+  "r\213\203u\217\201s\214{m\207ug\201\205vf\203\202ue\202\3ue\200td\177"
+  "ue\200\203td\177+ue\177ue\200rc\200{o\223\315\305\356\335\323\377\327"
+  "\316\377\331\322\377\314\307\377\313\310\377\277\276\372\270\267\375"
+  "\262\261\377\262\256\377\244\240\377\237\234\367\237\236\356\222\223"
+  "\324\225\227\307LIfKGVFCND\77FA=>>:9:6351.320/-.)'*&&(&')()+%&(\40\""
+  "!\"\"\"#!\"\"\40!\40\36\37\36\34\35\37\35\36#!\"'%&\202&$%\5'%&)'(,*"
+  "+/-.1/0\202201\27""534645<:;756867LJKRPQ:89CABJHIMKLTRS^\\]`^_ZXYUQR"
+  "WSTOKLMIJUQRQMNLHITPQ\220SOP\30UQRd`a{wx\215\211\212\223\217\220\214"
+  "\210\211~z{tpqeab`\\]\\XY\14\10\11{wx\305\301\302\264\260\261\231\225"
+  "\226wstplm}yz\224\220\221\216\212\213lhiVRSYUV\210WST\210SOP\3PLMTPQ"
+  "YUV\202\\XY\12WSTRNONJKTPQUQRYUV\\XY^Z[]YZ[WX\202YUV\27HDEB>\77ZVWPL"
+  "M845JFGRNOPLMUQRRNOMIJUQReabhde_[\\VRSYUVRNOOKLVRSSOPNJKVRS\210SOP\202"
+  "QOP\202SOP\27TOSVQUXSWYTXQLRZU[^W^aZaf_fe^eb[ce^fpiq\214\205\215\234"
+  "\224\237kcn\217\205\220\250\235\253\222\207\225qftpesmbrsfw\202|o\201"
+  "\3tgyqdvtg{\203rd{\203se|\202tf}\4se~se|ug\200yk\204\202|n\207\2xj\203"
+  "tf\177\203ue\200;td~td\177td~td\177td~qa{rczsc}sd{td~uf}td~qd\200\277"
+  "\267\336\330\320\377\310\301\365\316\307\375\334\327\377\320\315\377"
+  "\312\312\376\302\303\374\301\302\377\257\256\374\256\253\377\245\242"
+  "\375\245\243\367\227\227\341\240\242\333NPwQNcMJSHCIA=>>:9<8596162/-"
+  ",*,*+**,))+'')\"$#\36\40\37\34\34\34\40\36\37\"\40!$\"#%#$&$%%#$$\"#"
+  "#!\"&$%)'(.,-201423645\202867\30""534312645CAB:89.,-<:;ECDFDEJHIIGHE"
+  "CDKIJXVW[YZUSTRNOVRSOKLMIJTPQQMNMIJUQR\220SOP\30OKLRNOVRSXTUWSTSOPNJ"
+  "KJFGFBC[WXfbc\20\14\15a]^\225\221\222xtuRNOXTUQMNVRSfbcgcdZVWVRS_[\\"
+  "\210UQR\210SOP(JFGOKLVRS]YZa]^]YZVRSPLMUQRXTU]YZ_[\\\\XYXTUUQRSOP[WX"
+  "^Z[_[\\eabJFG<89d`a{wxXTUa]^_[\\TPQWSTd`ab^_UQRRNOXTURNONJKUQRSOPOKL"
+  "VRS\210SOP\202QPN\202QOP\25SOPUQRVRSWST]X\\^Y]ZUYYTXa[_f`dkdksls\177"
+  "x\177\221\212\221\221\212\222f_g\212\203\213\235\225\240\202z\205f^i"
+  "j`k\202h]k\1j_o\202k`p\3laqodupcu\203pcw\202qdx\202rey\10se|reyqczrd"
+  "{tf}ug~tf}se|\203rd}1qczqc|qczqc|qczrd{reyrd{reyqczpcwn`wk`~\321\312"
+  "\366\320\313\377\301\274\364\315\312\377\326\326\377\311\313\376\313"
+  "\315\377\306\311\377\277\300\377\260\260\372\265\263\377\255\253\377"
+  "\250\245\364\240\237\341\231\233\314KLkJHVHCIC>B\77;:<8596132.0/+.-+"
+  ",*++),**,##%\32\32\32\27\27\25\30\30\26\36\34\35\40\36\37#!\"'%&\202"
+  "*()\5(&''%&*()/-.423\202756\203645\11=;<ECDKIJLJK978201MKLa_`LJK\202"
+  "TRS\2MKLOMN\202ZXY\11PNOOKLVRSPLMMIJTPQRNONJKUQR\220SOP\3YUVVRSRNO\202"
+  "OKL\23QMNTPQWST`\\]TPQOKL\31\25\26ief\215\211\212oklRNOSOPOKLMIJPLMQ"
+  "MNPLMSOPXTU\210TPQ\210SOP\26KGHNJKPLMRNOTPQWST[WX_[\\ZVW[WXYUVSOPKGH"
+  "D at AA=>@<=SOPeabWST845\35\31\32/+,\202^Z[\14D at A\\XYiefa]^^Z[fbcb^_RNO"
+  "NJKXTUSOPNJK\202TPQ\2PLMVRS\210SOP\202QPN\2QOPPNO\202SOP\202TPQ\23TO"
+  "SWRVXSW]X\\hbflfjpjnwquxqx\203|\203\213\204\213\202{\202\240\231\241"
+  "\221\212\222kdl`Xcj`klbmmcn\202mbp\3ncqmbpk`p\202obs\2obtobs\203pcu\3"
+  "qdvreypcw\202nau\3obvqdxqcz\204pby\6pcwpbypcwoaxobvqdx\202pcw2pcuobv"
+  "naspcwpe\203\273\267\351\303\302\374\304\303\377\312\311\377\310\311"
+  "\377\306\311\374\316\322\377\307\312\377\300\302\377\270\270\376\270"
+  "\267\377\261\256\377\240\237\345\243\242\334GIpLLd42=615734;76<85952"
+  "21-.-+1/0*(+$\"'\"\40#\33\31\32\21\21\17\21\20\14\26\25\21\37\36\34\40"
+  "\36\37\"\40!$\"#&$%)'(-+,0./1/0312423312/-.\203,*+\13<:;FDE><=+)*\33"
+  "\31\32)'(MKLWUV756OMN][\\\202XVW\13_]^\\Z[OMNLHIVRSRNOMIJSOPTPQPLMVR"
+  "S\220SOP\202PLM\22QMNSOPUQRXTUZVW[WXJFG1-.D at AQMN\220\214\215|xyOKLGC"
+  "DTPQXTUYUVVRS\202UQR\2RNOMIJ\210TPQ\210SOP\15PLMRNOSOPNJKJFGLHIUQR^Z"
+  "[\\XYXTUOKLFBC>:;\202;78\31<89\77;<<89!\35\36\30\24\25'#$LHId`aC\77@"
+  "-)*RNOief`\\]ZVWc_`a]^SOPKGHYUVWSTOKLTPQUQRQMNUQR\210SOP\203QPN\203P"
+  "OM\32RNOSOPOKLRNOSOPYUVa]^c_`f`bnhj\215\210\214\226\221\225\235\230\234"
+  "\230\223\227\231\224\232vqw`Y`ngo\\U]aZbe^ff^ij`klbmkalg\\j\202mbp\3"
+  "mbrncqncs\203odt\1nct\203mbs\202nct\2nbvmau\203nbv\6nctnbvmbsmaumbsl"
+  "ar\202j_p(laqmbsncstizxo\214\301\276\363\301\300\377\300\277\377\300"
+  "\302\377\300\302\373\310\316\377\317\325\377\301\307\371\304\306\377"
+  "\272\273\376\264\261\376\263\261\374\254\252\353\252\250\331\36\37=:"
+  "<K,+3,*-/-.54287365121/1/0)'*!\37$\32\30\35\31\27\32\26\24\25\22\21\15"
+  "\24\21\14\25\24\17!\40\36#!\"%#$\202$\"#\7&$%,*+1/04233120./,*+\202("
+  "&'\32*(),*+.,-*()\31\27\30\25\23\24\40\36\37;9:OMNDBC&$%IGH_]^XVWSQR"
+  "ZXYYWXLJKJFGXTUVRSNJKSOPUQRRNOVRS\220SOP\30PLMQMNRNOSOPRNOPLMNJKLHI\\"
+  "XYYUVwst\206\202\203\217\213\214b^_NJKeabFBCOKLTPQSOPUQRYUVUQRNJK\210"
+  "UQR\210SOP\5VRSZVW[WXWSTNJK\202HDE!IEFVRSOKLGCDB>\77C\77 at FBCHDEIEFJF"
+  "G@<=:67WSTiefoklzvwfbcIEFlhizvwd`aTPQZVWVRSD at AKGH\\XY[WXQMNTPQUQRRNO"
+  "UQR\210SOP\204QPN\202POM\202RNO\202[WX\20XTUZVW`\\]d`anhj}wy\225\220"
+  "\224\223\216\222\205\200\204rmqidj[V\\\\U\\ibi^W_`Ya\202b[c\4f\\gi_j"
+  "j`ki_j\202k`n\203lao\1mbp\202mbr\202k`p\1lar\203mbs\2lark`q\202mau\206"
+  "lar\2oduk`p\202j_o\202i^n\40odtrl\210\300\277\371\270\273\377\275\275"
+  "\377\300\304\377\301\306\377\304\312\376\307\316\374\304\312\372\303"
+  "\305\376\274\275\376\265\263\374\264\261\370\266\262\355\231\230\302"
+  "JK`EEOA at F;9>64753421/,+)(&'(&)\37\35\"\34\32\37\32\30\35\32\30\33\36"
+  "\32\33\40\34\31\202\"\37\30\2%$\"(&'\202+)*\1)'(\202'%&!(&'1/0/-.,*+"
+  "+)*,*+0./423756978423312GEFVTU\\Z[b`aVTUA\77 at a_`omn\\Z[NLMTRSQOP@>\77"
+  "IEF[WXZVWPLMSOPUQRRNOUQR\220SOP\30[WXYUVWSTUQRTPQUQRVRSWSTUQR\\XY^Z["
+  "OKLJFGEABNJKYUVMIJPLMQMNOKLPLMUQRVRSTPQ\210UQR\210SOP(^Z[]YZ\\XY]YZZ"
+  "VWQMND at A;78LHIFBCB>\77EABNJKSOPRNONJKhdenjkvrs\206\202\203qmnWSTc_``"
+  "\\]lhi\210\204\205\214\210\211okl]YZ^Z[KGH*&'LHI`\\]_[\\RNOTPQVRSSOP"
+  "TPQ\210SOP\206QPN\202POM\22TPOSONPLKRNMZVWa]^plm\205\201\202\215\210"
+  "\214\204\177\203snridhe`dhcggbf\\W[f_fd]d\202c\\c\4c\\dd]eg]fi_h\203"
+  "h^i\202i_j\1j`k\202j_m\3h]ki^lj_o\202k`p\1j_o\202j_p\203k`q\1j_p\204"
+  "j_o6odtk`pi^nj_mg\\jcXff[iib\201\261\261\355\260\264\376\272\274\377"
+  "\277\304\377\276\304\377\274\303\367\274\304\362\306\314\374\304\307"
+  "\376\305\306\377\275\274\377\260\255\362\254\251\340qo\226cbtLMRQPVG"
+  "EJ<:=645.,-#!\"\34\32\35\34\32\37\33\31\36\37\34#\40\33!\35\30\34!\33"
+  "\33+&\"1-$1.'*)'+)*-+,/-.0./-+,'%&#!\"-+,,*+-+,1/0756;9:\202><=\30TR"
+  "SYWXb`aomngefYWX\\Z[YWXb`a|z{\200~\177gefYWX[YZJHI*()JFG^Z[]YZQMNSOP"
+  "VRSSOPTPQ\220SOP\30QMNOKLNJKMIJOKLRNOVRSYUVHDEVRSUQRVRSZVWd`a^Z[EAB\\"
+  "XYXTUTPQSOPRNOPLMRNOVRS\220SOP\34eab]YZWSTZVW`\\]\\XYKGH;78FBCA=>@<="
+  "IEFTPQWSTOKLEAB^Z[oklrnoqmna]^^Z[plm`\\]hde\204\200\201\212\206\207t"
+  "pq\202jfg\3KGH\34\30\31MIJ\202b^_\202TPQ\3WSTSOPTPQ\210SOP\1POM\206Q"
+  "PN\2POMPLK\202SON\25XTS_[\\eabtpq\212\206\207\211\204\210zuyhcga\\`V"
+  "QUZUYb]aZUY_Y]\\VZ\\U\\`Y`aZa_X_`Y`f\\e\202e[f\203f\\g\1g]h\202g\\j\4"
+  "f[ig\\jh]ki^l\202h]m\207i^n\"i^lh]mh]keZjbWedYgh]kg\\jcXff[iib\201\264"
+  "\263\365\263\266\377\265\270\377\260\264\373\265\273\371\273\305\372"
+  "\273\303\364\301\311\372\277\304\374\307\311\377\277\276\377\267\262"
+  "\362\267\263\346pl\221`_qXW_KHOA\77D97:647/-.#!\"\33\31\34\202\33\31"
+  "\36\17\"\40%\"\35#\31\24\30\32\26\25)%\"72,:720/-,*++)*/-.423312,*+%"
+  "#$\202,*+\22/-.645=;<A\77@\77=>;9:QOP][\\b`aa_`VTUSQR][\\WUVdbc}{|\201"
+  "\177\200nlm\202gef\3GEF\32\30\31KGH\202`\\]\5RNOSOPVRSSOPTPQ\220SOP\202"
+  "RNO\203SOP\14RNOQMNPLMSOPXTUPLMVRSKGHJFGTPQRNOTPQ\202NJK\5TPQUQROKLP"
+  "LMVRS\210RNO\210SOP\33JFGQMNRNOIEFFBCOKLYUV\\XYb^__[\\[WXXTUWSTZVW]Y"
+  "Z`\\]^Z[ZVWOKLTPQNJKLHIXTUFBCC\77 at B>\77a]^\202[WX\7YUVnjkZVWxtugcdXT"
+  "USOP\203TPQ\1UQR\210SOP\1TPQ\202SOP\203RNO\202SOP\31RNOVRSZVW\\XYb^_"
+  "njk\177{|\213\207\210xtuplm]YZief_[\\UQRgcdMIJ_[\\YUVYTX`[_a\\`\\W[Z"
+  "UY_X_b[c\202bZe\203c[f\202d\\g\204e]h\211e]j\4e]he]je]hf^k\202g_j=e]"
+  "hbZe`XcaYd`Yz\260\256\371\257\257\377\256\261\377\262\266\377\263\273"
+  "\372\257\272\362\263\274\363\277\310\377\300\306\377\264\270\365\302"
+  "\302\377\275\271\364\263\260\337>:_<7N84B85<-+.+)*423645.,--+,425+),"
+  "(&)&$')'(*()*)'+'&)(&\"\40!(&',*+*())'(/-.756<:;=;<><=@>\77A\77 at CABF"
+  "DEJHIMKLQMNPLMHDENJKGCDEABRNOA=>\202@<=\2^Z[XTU\202WST\6lhiYUVxtugcd"
+  "XTUSOP\203TPQ\1UQR\220SOP\3QMNRNOSOP\202TPQ\16SOPRNOQMNMIJUQRJFGYUVV"
+  "RSPLM`\\]FBCVRSPLMOKL\202UQR\3OKLMIJQMN\220SOP\1LHI\202RNO\5LHIKGHQM"
+  "NVRSUQR\202XTU\1WST\202VRS\203UQR\24c_`b^_RNOOKLIEFNJK[WXD at AEABPLMhd"
+  "eVRSZVWXTUd`aPLMuqrfbcWSTSOP\203TPQ\1UQR\210SOP\1TPQ\202SOP\202RNO\203"
+  "SOP\32UQRWSTYUV[WXd`asop\201}~\210\204\205|xyoklXTU^Z[UQROKLfbcXTU\\"
+  "XYWSTXTU^Z[_[\\[WXZVW^Y]`Ya`Xc\203aYd\203bZe\220c[f\202`Xc\37bZed\\g"
+  "e]hf^ie]h`[{\252\247\364\247\250\377\251\253\376\255\263\375\263\274"
+  "\377\265\277\375\263\275\373\261\273\371\271\301\377\275\301\377\300"
+  "\300\376\271\271\357\264\261\334D at a=8N74\77""1/4,*+.,-5347560./.,-20"
+  "1*()\202(&'\3+)*-+,,*+\202+)*\13'%&+)*.,-,*+-+,201756978\77=>A\77 at CA"
+  "B\202DBC\3ECDFDEGEF\202WST\12IEFGCDB>\77HDEXTUC\77 at B>\77NJKeabRNO\202"
+  "VRS\6c_`OKLuqrfbcWSTSOP\203TPQ\1UQR\220SOP\2TPQSOP\204RNO\22SOPTPQ]Y"
+  "Z^Z[LHISOPOKLKGH^Z[OKLUQRPLMOKLTPQUQRPLMOKLRNO\220SOP\14IEFGCDB>\77>"
+  ":;B>\77JFGOKLMIJOKLQMNVRSYUV\202[WX\27YUVXTUVRSa]^]YZ[WXKGHGCDUQRC\77"
+  "@\3\0\0D at A\200|}|xy\214\210\211\205\201\202\204\200\201rnoplmc_`VRSS"
+  "OPTPQ\202SOP\1UQR\210SOP\1TPQ\206SOP\2TPQWST\202YUV\26\\XYief{wx\203"
+  "\177\200\200|}eab_[\\UQR^Z[YUVOKLXTUNJKXTUUQRVRSZVW[WXYUVZVW^Y]^W^\203"
+  "^W_\202_X`\202`Ya\221aZb\27_X`^W__X`^W_[T\\UNVLGe\253\253\363\244\250"
+  "\377\246\253\375\247\256\374\250\260\370\256\270\377\261\273\377\255"
+  "\265\376\260\266\377\275\301\377\272\273\374\273\274\362\266\266\334"
+  "77O11;779\202(&'\1)'(\202+)*\1(&'\202&$%\10'%&%#$&$%)'(+)**()(&')'(\202"
+  "'%&\33&$%%#$)'(0./645756:89><=CABGEFIGHKIJMKLNLMMIJXTUUQRTPQEABC\77@"
+  "TPQD at A\3\0\0B>\77~z{yuv\212\206\207\202\203\177\200\6qmnplmc_`VRSSOP"
+  "TPQ\202SOP\1UQR\220SOP\3UQRTPQRNO\202QMN\6RNOTPQUQRLHISOPNJK\202XTU\4"
+  "OKLUQRKGHSOP\202PLM\202TPQ\202QMN\1TPQ\220SOP\2FBC>:;\202512\15\77;<"
+  "MIJVRSWSTXTUYUV[WX\\XY[WXYUVVRSTPQPLM\202NJK\4a]^XTUC\77 at B>\77\202/+"
+  ",\12uqr\226\222\223iefa]^TPQ\\XY^Z[jfg_[\\UQR\202TPQ\202SOP\1UQR\210"
+  "SOP\1TPQ\205SOP\202TPQ\23WSTYUV[WXa]^sop\202~\177\200|}tpqrnohdeUQRN"
+  "JKLHIMIJVRSZVWSOPTPQUQR\203WST\2YUV]X\\\202[T[0\\U]\\U\\]V^]V]]V^]V]"
+  "^W_^W^^W_^W^^W_^W^^W_^W^^W_^W^^W_^W^^W_^W^^W_^W^`Ya_X_]V^\\U\\YRZUNU"
+  "OHPGC^\244\245\346\236\243\365\243\252\372\245\254\372\240\251\364\244"
+  "\255\372\254\265\377\255\265\377\254\261\377\265\270\377\264\267\372"
+  "\274\277\364\266\271\332\40#4\34\40!02-++),*+\202+)*\5.,-1/00./,*+(&"
+  "'\202&$%\26(&')'('%&(&')'(&$%\"\40!\37\35\36!\37\40)'(534=;<@>\77A\77"
+  "@CABFDEHFGIGHJHIKIJLJKKGH\202IEF\4\\XYSOP\77;<@<=\202-)*\12sop\225\221"
+  "\222gcd`\\]RNO[WX]YZjfg_[\\UQR\202TPQ\202SOP\1UQR\230SOP\10^Z[_[\\PL"
+  "MJFGNJKOKLVRS\\XY\202QMN\2RNOSOP\202RNO\2TPQWST\220SOP\1IEF\202D at A\37"
+  "MIJZVWeabjfglhijfgfbc`\\]YUVRNOLHIIEFGCDNJK401)%&FBC\77;<\37\33\34\40"
+  "\34\35\34\30\31""956hdeuqrIEFUQR]YZrnoxtuc_`ZVW\203TPQ\3RNOSOPVRS\215"
+  "SOP\202TPQ\202UQR\27YUV_[\\jfgzvw\204\200\201yuvgcdkghnjkd`aTPQZVW^Z"
+  "[QMNNJKQMNTPQVRSTPQSOPUQRXTU[WX\202YSW/ZSZZTX[T[[UY[T[[UY\\U\\\\VZ\\"
+  "U\\\\VZ\\U\\\\VZ\\U\\\\VZ\\U\\\\VZ\\U\\\\VZ\\U\\\\VZ\\U\\\\VZZSZ[UY]"
+  "V]]W[]V]^X\\_X_]Yp\233\235\330\225\233\347\234\244\357\245\255\370\243"
+  "\254\371\241\251\372\244\254\377\250\257\377\254\260\377\260\263\377"
+  "\264\267\374\272\275\360\266\271\330-1<&+%.1&-.)\202.,-\11""1/0978\77"
+  "=>;9:312/-.-+,+)*,*+\202+)*\20-+,0./)'('%&)'(1/0<:;FDEMKLPNOSQRQOPNL"
+  "MJHIECDB at A\202A\77@\22IEF/+,&\"#D at A=9:\35\31\32\36\32\33\31\25\26""7"
+  "34fbcsopHDEUQR\\XYqmnxtuc_`ZVW\203TPQ\3RNOSOPVRS\220SOP\3PLMRNOTPQ\202"
+  "UQR\11TPQRNOPLM_[\\jfgb^_RNOZVW]YZ\202NJK\10PLMSOPTPQRNOPLMRNOUQRXTU"
+  "\220SOP\14NJKRNO]YZnjkwstuqrplmnjkgcdc_`]YZXTU\202UQR\12WSTYUV`\\]ZV"
+  "WXTU\\XY,()\7\3\4""512eab\202\202~\177\2wstVRS\202jfg\5gcdQMN\\XYVRS"
+  "SOP\202TPQ\202RNO\1VRS\214SOP\202TPQ\202UQR\30WST[WXc_`plm|xy}yzplm`"
+  "\\]UQRa]^YUV;78NJKgcdRNOKGHPLMVRSWSTRNOOKLSOPXTUYUV\202WQU\203XRV\203"
+  "YSW\221ZTX![UY\\VZZTXYSWZTX^X\\^[p\242\243\333\237\243\354\231\237\351"
+  "\232\240\354\241\250\370\241\247\373\237\244\377\245\252\377\250\254"
+  "\377\255\257\377\263\266\375\266\271\356\247\252\313Z^jQVRBE<5536458"
+  "67;9:\77=>><=534+)*2010./\203/-.\17.,-0./423/-.312<:;HFGPNOSQRTRSUST"
+  "SQRRPQOMNLJK\202JHI\3MKLOMNYUV\202TPQ\5ZVW-)*\10\4\5""512c_`\202\201"
+  "}~\2wstVRS\202jfg\5gcdPLM\\XYVRSSOP\202TPQ\202RNO\1VRS\220SOP\3QMNRN"
+  "OTPQ\202UQR\23TPQRNOQMNIEF\\XYUQR956NJKfbcOKLMIJPLMVRSWSTRNONJKQMNVR"
+  "SXTU\220SOP\6\\XYa]^mijyuvwstjfg\202b^_\33ZVWYUVXTUYUV\\XYc_`iefmijr"
+  "no\206\202\203\216\212\213~z{A=>*&'qmn\253\247\250\233\227\230sop[WX"
+  "@<=PLMVRSc_`QMNWSTSOPRNO\202TPQ\3QMNRNOVRS\214SOP\1TPQ\202UQR\1VRS\202"
+  "]YZ\26d`aplmwstrnohde`\\]b^_eabC\77@\7\3\4%!\"c_`a]^eabQMNXTUZVWRNOM"
+  "IJQMNWSTXTU\204UOQ\202VPR\202WQS\220XRT\32\\VXZTVXRTUOQSMORLNSMORMa\214"
+  "\214\302\240\243\352\235\237\351\223\225\342\234\237\360\240\242\367"
+  "\235\236\372\247\250\377\245\244\377\254\251\377\257\255\370\265\264"
+  "\360{z\242ii\201[^gNOQGGGFDE\202DBC\4@>\77""9780./+)*\202-+,\1/-.\202"
+  "1/0&/-.1/0423978\77=>JHISQRTRSOMNMKLNLMIGHJHILJKNLMQOPWUV^\\]cabmij\201"
+  "}~\211\205\206{wx@<=+'(qmn\253\247\250\232\226\227sop[WXA=>QMNVRSd`a"
+  "QMNWSTSOPRNO\202TPQ\3QMNRNOVRS\220SOP\3VRSTPQRNO\202PLM\2RNOTPQ\202V"
+  "RS\17_[\\>:;\4\0\1&\"#c_``\\]jfgQMNYUVZVWRNOMIJQMNVRSWST\220SOP\202p"
+  "lm\6tpquqrjfgZVWVRS[WX\202WST\20VRSWSTZVW^Z[b^_eabVRS^Z[WSTPLM=9:D at A"
+  "plm{wxfbcKGH\202YUV\5^Z[VRSfbcVRSTPQ\202QMN\5UQRTPQQMNRNOVRS\214SOP\2"
+  "TPQUQR\202VRS\6b^_`\\]eaboklrnojfg\202c_`\20NJKgcd]YZ($%IEF}yzYUVD at A"
+  "RNOZVW[WXRNOLHIQMNVRSWST\203SMO\203TNP\202UOQ\220VPR\5WQSTNPSMOTNPWQ"
+  "S\202ZTV\34WSaUU{\216\217\305\241\242\332\226\227\320\240\240\336\242"
+  "\243\343\234\233\341\247\246\354\250\247\355\253\250\353\252\247\340"
+  "\265\264\340IHhPOaA at HFFHECDA\77@><=:89312+)**().,-)'(+)*/-.\202423\202"
+  "201\"423ECDIGHQOPTRSNLMFDEDBCGEFJHIKIJLJKNLMPNOUST[YZ^\\]VRS\\XYSOPL"
+  "HI;78C\77 at oklyuveabJFGYUVZVW`\\]WSTfbcVRSTPQ\202QMN\5UQRTPQQMNRNOVRS"
+  "\220SOP\3ZVWVRSPLM\202KGH\21PLMVRSZVWIEFgcd\\XY'#$JFGzvwUQREABRNO[WX"
+  "\\XYRNOLHIPLM\202VRS\220SOP\40rnooklhde]YZRNOMIJNJKQMNWSTTPQZVWYUVNJ"
+  "KOKLYUVXTUPLMMIJGCD<89\77;<^Z[wstuqr]YZZVWEABZVWa]^iefPLMRNO\205PLM\203"
+  "QMN\16WSTSOPQMNSOPQMNLHINJKUQROKLSOPWSTXTUVRSSOP\202RNO\3`\\]plm{wx\202"
+  "\201}~\34sop^Z[RNO[WXgcd[WXJFG\201}~\200|}gcdRNOc_``\\]]YZUQR=9:ZVWV"
+  "RS[WXUQPSONVRQZVUXTSRNMOKJQMLTPO\202SON\203RNM\4SONTPOSONQML\202WSR\6"
+  "PLKUQPXTSMIHSONTPO\202UQP\203TPO\32RPSWWcNP_\77 at R34F9:NGI^KKcBB\\VVp"
+  "cc{XWi;;G76;DDBHH at AA98758671/0,*+.,-,*+)'(,*+)'(\202,*+\5+)*.,-53497"
+  "8867\202JHI\10IGHECD@>\77><=@>\77B at ALJKIGH\202OMN\2DBCGEF\202RPQ\20N"
+  "JKKGHFBC<89\77;<^Z[xtuvrs]YZZVWEABZVWa]^iefPLMRNO\205PLM\203QMN\21WS"
+  "TSOPQMNSOPQMNLHINJKUQRPLMSOPWSTXTUUQRRNOPLMOKLXTU\202eab\36b^_hdea]^"
+  "OKLGCDXTUfbc[WXJFG\202~\177\200|}hdeTPQc_``\\]]YZUQR=9:ZVWVRS[WXUQRS"
+  "OPVRSZVWXTURNOOKLQMNTPQ\202SOP\203RNO\2SOPTPQ\203WST\16TPQRNOSOPXTU]"
+  "YZOKLLHIRNOWSTUQRVRSWSTQMNMIJ\202PLM\20TPQb^_lhihdea]^RNOb^_XTU]YZKG"
+  "HNJKLHIiefXTUVRSSOP\202PLM\5RNOUQRXTUPLMQMN\203RNO\1SOP\202TPQ\11UQR"
+  "SOPQMNNJKOKLUQR^Z[fbcd`a\202hde\3kghsoprno\202lhi\5UQROKLEAB>:;plm\202"
+  "rno\24oklWSTVRSIEF.*+2./njkRNOC\77 at YUTVRQUQPTPOQMLOKJVRQ_[ZUQPTPOSON"
+  "\203RNM\203SON\10PLKUQPTPOMIHTPO[WVRNMTPO\202UQP\31RNMOKJQMLVRQ\\XWa"
+  "_`RPQ==;442==;LLLQQQMMMeeg[[[GEF\77><NMHXUNHE>41*10.4230./,*+\202/-."
+  "\3*()+)**()\202-+,\3,*+.,-423\202645\3<:;><=@>\77\202A\77@\14B at AGEFJ"
+  "HICABA\77 at HFGOMNNLMPNORPQKIJKGH\202OKL\20SOPa]^lhiiefa]^RNOb^_XTU]YZ"
+  "KGHNJKLHIiefXTUVRSSOP\202PLM\5RNOUQRXTUPLMQMN\203RNO\1SOP\202TPQ\12U"
+  "QRTPQQMNNJKOKLTPQ\\XYc_``\\]]YZ\202PLM\11b^_iefgcdmijSOPNJKFBC\77;<p"
+  "lm\202rno\24plmWSTVRSIEF.*+2./njkRNOC\77 at YUVVRSUQRTPQQMNOKLVRS_[\\UQ"
+  "RTPQSOP\203RNO\202SOP%PLMQMNRNOQMNPLMQMNSOPVRS[WXUQRRNOTPQXTUYUVSOPK"
+  "GHa]^^Z[KGHMIJc_`_[\\OKLTPQeabd`aLHIUQRWSTa]^MIJRNOWSTVRSUQRSOPRNO\202"
+  "SOP\2TPQOKL\202WST\202RNO%YUVXTUQMNUQRSOPOKLLHIMIJUQR`\\]hded`aOKL0,"
+  "-\"\36\37)%&845MIJc_`TPQ/+,\27\23\24\3\0\0\32\26\27\34\30\31""956GCD"
+  "c_`RNO:67\34\30\31:67\201}~QMNPLMSONPLK\202OKJ\7LHGKGFSON\\XWVRQUQPT"
+  "PO\202RNM\1QML\202RNM\27XTSVRQ\\XWZVUOKJRNMUQPJFEVRQXTSZVUWSRTPORNMU"
+  "QPXTUMHL>9=512=98MIHXTQ\\XU\202^ZW\21NJIA=>KFJZU[SLT\77""8 at 507203534"
+  "0./*()-+,.,-)'('%&,*+.,-\202/-.\2""0./423\202534\11""867;9:><=@>\77A"
+  "\77 at CABFDEIGHNLM\202JHI\32OMNTRSUSTNLMECD`\\]\\XYJFGLHIc_`_[\\OKLUQR"
+  "eabd`aLHIUQRWSTa]^MIJRNOWSTVRSUQRSOPRNO\202SOP\2TPQOKL\202WST\202RNO"
+  "%YUVXTUQMNUQRSOPOKLLHIMIJSOP^Z[fbcXTU:67\20\14\15\5\1\2\31\25\26-)*D"
+  "@A`\\]RNO/+,\30\24\25\4\0\1\32\26\27\34\30\31""845HDEc_`RNO:67\34\30"
+  "\31:67\201}~QMNPLMSOPPLM\202OKL\7LHIKGHSOP\\XYVRSUQRTPQ\202RNO\1QMN\202"
+  "RNO\202WST)VRSUQRRNOOKLMIJLHI^Z[[WXPLMMIJTPQUQRQMNRNOIEFVRSSOPb^_wst"
+  "RNO#\37\40'#$EAB_[\\\\XYc_`TPQWSTKGHYUVTPQVRSYUV[WXZVWVRSQMNNJKWST_["
+  "\\\\XY\202NJK$ZVWYUVMIJPLMRNOTPQSOPRNOQMNSOPUQR401>:;MIJ_[\\b^_MIJ51"
+  "2/+,\3\0\0\10\4\5""401KGHb^_VRSYUVHDE\32\26\27\37\33\34>:;VRS~z{\225"
+  "\221\222B>\77UQRRNM\202NJI\11SONUQPRNMOKJPLKVRQUQPTPORNM\203QML\11RN"
+  "MWSRYUTc_^d`_YUTZVU[WVPLK\202]YX\1^ZY\202`\\[\31\\XWUQPOKLHBF\77""9="
+  "A;=PJLWQQPKHJEBLGCTOKE@=B<<SMQYRZD<I6->>8F4277560./(&'+)*.,-\202+)*\6"
+  ".,-/-.1/0201312534\202645\3<:;><=A\77@\203B at A%DBCECDSQRQOPHFGGEFPNOR"
+  "PQMKLNLMGCDUQRRNOa]^vrsRNO#\37\40'#$EAB_[\\\\XYc_`TPQWSTKGHYUVTPQVRS"
+  "YUV[WXZVWVRSQMNNJKWST_[\\\\XY\202NJK\7ZVWYUVMIJPLMRNOTPQSOP\202QMN\33"
+  "RNOSOP+'(/+,956RNO_[\\GCD,()+'(\3\0\0\11\5\6""623LHIb^_UQRYUVHDE\32\26"
+  "\27\37\33\34>:;VRS~z{\225\221\222B>\77UQRRNO\202NJK\11SOPUQRRNOOKLPL"
+  "MVRSUQRTPQRNO\203QMN\203RNO\36SOPTPQUQRTPQSOPQMNMIJUQRMIJJFGVRSUQRPL"
+  "MZVWFBCWSTVRSa]^njkGCD$\40!512HDE_[\\WSTZVWPLM[WXQMN[WX\204XTU7WSTUQ"
+  "RTPQSOPWST\\XYUQRGCDHDEWSTYUVNJKOKLSOPWSTXTUUQRPLMMIJLHIHDE]YZ{wx\224"
+  "\220\221\230\224\225~z{d`a]YZTPQqmn\246\242\243\251\245\246\246\242\243"
+  "\203\177\200eab623\"\36\37:67]YZlhinjkd`a\36\32\33C\77 at eabYUVRNOXTU_"
+  "[\\\\XYTPQNJKUQRTPQSOP\207RNO\"[WXZVWRNOZVWeab`\\]ZVWRNOLHIPLMXTUZVW"
+  "RNOIEF824713B<>SMOXRTTNNVQN`[XZUQGB>>:7OKLWRXC=G4.<96A0.34230./-+,\202"
+  "0./\2.,-0./\202.,-\22""0./201534645867978;9:=;<@>\77CABDBCECDFDEGEFD"
+  "BCLJKDBCB at A\202PNO\22LJKWUVEABVRSUQR`\\]mijGCD$\40!512HDE_[\\WSTZVWP"
+  "LM[WXQMN[WX\204XTU\13WSTUQRTPQSOPWST\\XYUQRGCDHDEWSTYUV\202NJK*RNOWS"
+  "TXTUUQRPLMLHIKGHFBCXTUsop\222\216\217\233\227\230{wx]YZ^Z[SOPrno\247"
+  "\243\244\253\247\250\246\242\243\202~\177eab623\"\36\37:67]YZlhinjkd"
+  "`a\36\32\33C\77 at eabYUVRNOXTU_[\\\\XYTPQNJKUQRTPQSOP\206RNO\202QMN\4R"
+  "NOTPQUQRSOP\202QMN\22`\\]WSTRNO`\\]XTUJFGVRS_[\\a]^TPQMIJPLMC\77 at HDE"
+  "jfg\200|}}yzWST\202PLM\6fbcSOPMIJXTUTPQMIJ\202GCD\3KGHQMNUQR\202PLM\7"
+  "JFGC\77 at IEFVRSYUVRNOSOP\202UQR\1TPQ\202RNO\5TPQVRSqmnnjkeab\202^Z[\25"
+  "b^_qmn\205\201\202|xy\206\202\203\211\205\206fbclhinjk}yzsopvrs\216\212"
+  "\213\177{|]YZ845956,()PLMtpqa]^\202QMN\6XTUYUVUQRRNOTPQSOP\203RNO\1S"
+  "OP\202TPQ\6XTUQMNOKLC\77 at 512\77;<\202PLM\5FBC956.*+/+,<89\202FBC\22B"
+  ">\77""845;78D>@NHLVPT]W[hbdtnnRMJJFCEA>IHFNLOA\77D41:418425\202645\4"
+  "756645-+,(&'\202.,-\15-+,/-.201534645867;9:=;<\77=>A\77 at DBCFDEGEF\202"
+  "HFG\23JHIYWXPNOKIJZXYSQRGEFSQR_[\\`\\]SOPMIJOKLB>\77GCDief\200|}}yzW"
+  "ST\202PLM\6fbcSOPMIJXTUTPQMIJ\202GCD\3KGHQMNUQR\202PLM\5JFGC\77 at IEFV"
+  "RSYUV\202RNO\13TPQUQRTPQRNOQMNSOPUQRnjkkgh^Z[XTU\202\\XY\24kgh\210\204"
+  "\205{wx\206\202\203\212\206\207gcdlhimij}yztpqvrs\216\212\213\177{|]"
+  "YZ845956,()PLMtpqa]^\202QMN\6XTUYUVUQRRNOTPQSOP\203RNO\1SOP\202TPQ\2"
+  "XTUUQR\202RNO\31TPQUQRRNOPLM\\XYfbcRNOJFG`\\][WXLHI[WXSOPWST\\XY[WXQ"
+  "MNFBCJFGXTUplm\216\212\213~z{fbcC\77@\202JFG\4]YZRNOOKLKGH\202HDE\13"
+  "KGHOKLRNOOKLKGHIEFLHISOPYUVXTUUQR\202TPQ!SOPQMNPLMQMNUQRYUVMIJVRSYUV"
+  "XTUVRSOKLKGHPLM^Z[fbc^Z[@<=VRSSOPb^_okld`a\177{|oklvrsXTUSOP[WXc_`nj"
+  "ka]^UQR\202RNO\3PLMQMNSOP\204QMN\22RNOTPQUQRVRS]YZWSTTPQEAB1-.401\77"
+  ";<=9:<896231-.2./845\77;<\202A=>&UQPVTUZUYZU[ZU\\YT[QLSGBH734IHFRQMK"
+  "LGGGEBBB99;335:89867756:89645(&'&$%423201/-.0./423645756:89><=A\77 at B"
+  "@ACABFDEHFGJHI\202KIJ\25VTU`^_MKLECD\\Z[WUVIGHXVWSOPWST[WXZVWPLMEABI"
+  "EFXTUplm\216\212\213~z{fbcC\77@\202JFG\4]YZRNOOKLKGH\202HDE\13KGHOKL"
+  "RNOOKLKGHIEFLHISOPYUVXTUUQR\203SOP\40QMNPLMQMNUQRXTUOKLYUVVRSSOPVRSP"
+  "LMLHITPQ\\XYeab^Z[@<=VRSSOPb^_plmd`a\177{|oklvrsXTUSOP[WXc_`njka]^UQ"
+  "R\202RNO\3PLMQMNSOP\204QMN\"RNOTPQUQRVRSSOPPLMOKLRNOXTU\\XY]YZ[WXSOP"
+  "UQR512-)*RNO^Z[YUVokl_[\\WSTTPQIEF623512C\77 at IEFMIJkghc_`_[\\QMN^Z[\202"
+  "OKL\3PLMTPQXTU\202\\XY\4YUVUQRRNOVRS\202OKL\12YUV_[\\\\XYWSTUQRPLMRN"
+  "OTPQSOPQMN\203OKL\26PLMXTUWSTSOPUQRVRSUQRXTUNJKZVWXTUKGHhdeKGHD at AVRS"
+  "a]^_[\\EAByuveabKGH\202[WX\10eabb^_`\\]_[\\XTUQMNPLMUQR\203PLM.QMNSO"
+  "PUQRVRSXTUWSTXVWb]a[Y\\LGMJEKOJNGBFEABKGFQMLTOLRMJMGGJDDICC:63HDAXTS"
+  "d_cpkqojqVQX83:(#'HFGXVWONLMMKPPNEEE5348673121/0534312(&'.,/ECD647\202"
+  "312\1""645\202978\40<:;A\77@\77=>@>\77CABGEFLJKPNOSQRTRSLJKPNO201+)*"
+  "QOP[YZUSTjhi_[\\WSTSOPHDE512401B>\77HDEMIJkghc_`_[\\QMN^Z[\202OKL\3P"
+  "LMTPQXTU\202\\XY\4YUVUQRRNOVRS\202OKL\7YUV_[\\\\XYWSTUQRNJKQMN\202SO"
+  "P\32QMNOKLNJKOKLNJKXTUSOPMIJVRSXTURNOSOPKGHYUVXTUKGHhdeLHIEABXTUa]^_"
+  "[\\EAByuveabKGH\202[WX\10eabb^_`\\]_[\\XTUQMNPLMUQR\203PLM\4QMNSOPUQ"
+  "RVRS\202XTU\25RNOQMNWST\\XY]YZ^Z[a]^XTUKGH/+,;78`\\]VRSJFGiefQMNPLMG"
+  "CD2./\36\32\33*&'\202C\77@\20*&'!\35\36\35\31\32\37\33\34/+,RNOeabZV"
+  "W_[\\^Z[]YZ[WXXTUVRSUQRTPQ\203VRS\1WST\202XTU\202YUV\210TPQ\202VRS\202"
+  "WST\35VRSUQRSOPRNOOKLQMNSOPUQRVRSTPQRNOQMNMIJTPQMIJhdec_`EABSOPVRSYU"
+  "Vfbceabb^_hdeeabZVWYUVRNO\202XTU<SOPTPQ[WX]YZXTUKJHOOOLJO>=E:7BEBMSP"
+  "YZX]fbaDA<NICb[SyrjpicndcrhfULCpg^ibZZROKBCHBDVPTKDKTMT_Z`[V\\NIMLFJ"
+  "HBD:46-')726=8</-0%#&(&)&$'205PNQ><A.,/0./:89843732@<;C\77>A=>D at AHDE"
+  "NJKRNOTPQUQR\202WST\15IEF-)*956^Z[UQRJFGjfgQMNPLMGCD2./\36\32\33*&'\202"
+  "C\77@\20*&'!\35\36\35\31\32\37\33\34/+,RNOeabZVW_[\\^Z[]YZ[WXXTUVRSU"
+  "QRTPQ\203VRS\1WST\202XTU\202YUV\210TPQ\202VRS\202WST\35VRSUQRSOPRNOO"
+  "KLQMNSOPUQRVRSTPQRNOQMNMIJTPQMIJhdec_`EABSOPVRSYUVfbceabb^_hdeeabZVW"
+  "YUVRNO\202XTU\37SOPTPQ[WX]YZXTUHDE]YZc_`VRSTPQVRS;78\24\20\21\37\33\34"
+  "845NJKgcduqr^Z[NJK`\\]512\25\21\22\31\25\26\16\12\13\40\34\35OKLVRSf"
+  "bcb^_c_`\202jfg\4iefvrsxtueab\202\\XY\6[WXYUVWSTVRSUQRTPQ\204VRS\204"
+  "WST\210UQR\202SOP\203TPQ\1SOP\202RNO\3PLMRNOTPQ\202VRS\5UQRSOPRNOMIJ"
+  "YUV\202MIJ\21""845&\"#LHIeab\\XYd`a]YZSOPWSTUQRNJKQMN\\XY_[\\\\XYUQR"
+  "TPQ\202XTU4RPQSRPPPPFEJ<;C><ILHVWT_[V\\KGFJE\77]YPund{tl}urqghqhi\205"
+  "~v\211\202x|xomhd]YXVRSVTWPNSMJQTOULGM=8<8241++&\36\34\33\26\23=79D\77"
+  "C;6:1/2205)',$\"'205:8=*(+1/0CABD@\77B>=IEBMIF<89RNOVRS\202FBC\25PLM"
+  "<89\27\23\24\35\31\32""623LHIeabsop]YZNJK`\\]512\25\21\22\31\25\26\16"
+  "\12\13\40\34\35OKLVRSfbcb^_c_`\202jfg\4iefvrsxtueab\202\\XY\6[WXYUVW"
+  "STVRSUQRTPQ\204VRS\204WST\210UQR\202SOP\203TPQ\1SOP\202RNO\3PLMRNOTP"
+  "Q\202VRS\5UQRSOPRNOMIJYUV\202MIJ\21""845&\"#LHIeab\\XYd`a]YZSOPWSTUQ"
+  "RNJKQMN\\XY_[\\\\XYUQRTPQ\202XTU!TPQplm_[\\UQRZVWYUVD at A&\"#\23\17\20"
+  "HDE]YZplmrnohdeZVWTPQWSTZVW&\"#845\77;<njk\244\240\241\214\210\211\235"
+  "\231\232\234\230\231\235\231\232\237\233\234\223\217\220}yztpqiefSOP"
+  "\202XTU\202WST\1VRS\202UQR\1TPQ\202VRS\204UQR\202TPQ\207UQR\1TPQ\202"
+  "PLM\3QMNRNOSOP\202RNO\4QMNSOPTPQUQR\202WST\2VRSTPQ\202SOP\22VRSHDEIE"
+  "FJFGKGH_[\\a]^LHIRNOGCD;78>:;@<=\77;<FBCQMNVRSXTU\202VRSSWSTTPQMKLFE"
+  "CAAA<:\77;8\77EBKSMWVQXRLPTOLXSMlgazuovqnmgk_Zac`g\\\\\\UWTZ\\[^_aae"
+  "h`chY\\a\\_d]`e`acWYXLNIJKEEG<>>2>;2@<;GCDA=>;78@;\77:59.,/0.11/2#!\""
+  "201KIJLKIBA\77@\77;\77>:^Z[PLMJFGSOPVRSD at A$\40!\15\11\12EAB[WXnjkqmn"
+  "gcdYUVTPQVRSZVW&\"#845\77;<njk\244\240\241\214\210\211\235\231\232\234"
+  "\230\231\235\231\232\237\233\234\223\217\220}yztpqiefSOP\202XTU\202W"
+  "ST\1VRS\202UQR\1TPQ\202VRS\204UQR\202TPQ\207UQR\1TPQ\202PLM\3QMNRNOS"
+  "OP\202RNO\4QMNSOPTPQUQR\202WST\2VRSTPQ\202SOP\22VRSHDEIEFJFGKGH_[\\a"
+  "]^LHIRNOGCD;78>:;@<=\77;<FBCQMNVRSXTU\202VRS\31WSTTPQOKL/+,845SOPb^_"
+  "IEF'#$1-.VRS\214\210\211\201}~qmnZVWOKL[WX^Z[LHID at A($%956[WX\213\207"
+  "\210\231\225\226\202rno\10d`a_[\\^Z[VRSKGHPLMUQRJFG\210TPQ\1VRS\202U"
+  "QR\1TPQ\202SOP\202RNO\204TPQ\204SOP\4OKLPLMQMNRNO\204SOP\202UQR\1VRS"
+  "\202WST\20VRSTPQSOPVRSUQRMIJVRSlhi{wxwsta]^HDEPLMHDE<89\77;<\202@<=\202"
+  "GCDMMIJSOPUQRSOPMIJEAB<:;431666<:=HCISNTYRYVPTOII_ZVupj\203\200{dca_"
+  "]b_]jUTfEF[W]sEMdGOfCKbFMgKRlDKeOWnMTgKRbDJVBFOCHK\77CB<A;CD\77D@\77"
+  "ICE\77;<845\77;<FBCE at DECDB@A-+,423GEF\77><+*(\37\36\32\30\27\25($%1-"
+  ".IEFXTUA=>\"\36\37/+,VRS\211\205\206\177{|oklZVWOKLZVW]YZJFGD at A($%95"
+  "6[WX\213\207\210\231\225\226\202rno\10d`a_[\\^Z[VRSKGHPLMUQRJFG\210T"
+  "PQ\1VRS\202UQR\1TPQ\202SOP\202RNO\204TPQ\204SOP\4OKLPLMQMNRNO\204SOP"
+  "\202UQR\1VRS\202WST\20VRSTPQSOPVRSUQRMIJVRSlhi{wxwsta]^HDEPLMHDE<89\77"
+  ";<\202@<=\202GCD\22MIJSOPUQRSOPMIJEAB>:;%!\"-)**&'\"\36\37/+,QMNkghs"
+  "opmijjfg`\\]\202QMN\4eab_[\\>:;3/0\202B>\77\16wst\230\224\225xtufbcY"
+  "UVa]^UQRQMNPLMOKL]YZgcd`\\]QMN\203RNO\1SOP\203TPQ\202UQR\202TPQ\1SOP"
+  "\202RNO\1QMN\203SOP\202RNO\204QMN\3RNOSOPTPQ\204UQR\202VRS\1WST\202V"
+  "RS\14UQRTPQSOPRNOVRSYUVUQR^Z[mijd`aWSTJFG\202XTUHRNOWSTVRSTPQYUVVRST"
+  "PQRNONJKHDE\77;<845312\77=>EEEOMNYUV\\VX]TU_WUc[Xje_tqlsrpgflRTcNPgD"
+  "GfRY\203CM\210HR\227cm\262hs\265it\266gr\262R]\233Q[\226T]\224PZ\213"
+  "HQ|DLqDJj<B\\5;Q<\77NDAHICEB<>935;57A=<FBCIEDEA@!\35\34\16\15\13\22\21"
+  "\17\20\17\15\25\24\22)(&764\36\32\33'#$&\"#\35\31\32($%JFGhdesopjfgg"
+  "cd_[\\\202QMN\4d`a^Z[=9:3/0\202B>\77\16wst\230\224\225xtufbcYUVa]^UQ"
+  "RQMNPLMOKL]YZgcd`\\]QMN\203RNO\1SOP\203TPQ\202UQR\202TPQ\1SOP\202RNO"
+  "\1QMN\203SOP\202RNO\204QMN\3RNOSOPTPQ\204UQR\202VRS\1WST\202VRS\14UQ"
+  "RTPQSOPRNOVRSYUVUQR^Z[mijd`aWSTJFG\202XTU-RNOWSTVRSTPQYUVVRSTPQRNONJ"
+  "KHDE\77;<845512\177{|eabFBCC\77 at b^_\200|}|xygcd\77;<ZVWd`aXTUUQRYUVM"
+  "IJ845512ZVWD at Aqmn\206\202\203UQRWSTMIJ]YZRNOQMNRNOLHINJKLHI\77;<\203"
+  "QMN\1RNO\203SOP\205TPQ\204SOP\202TPQ\202SOP\1RNO\203QMN\3TPQUQRVRS\203"
+  "WST\202VRS\1WST\202VRS\2UQRTPQ\203SOP=UQROKLWSTRNOYUV\\XY845!\35\36""2"
+  "./HDEQMNUQR`\\]c_`b^_ief_[\\VRSLHIHDEEABC\77 at HDEOKLWUVZXY^Z[\\VVWOMV"
+  "NKd[VslfnienjiWV\\_anEKcQZ{NW\202z\206\300w\206\331w\207\346z\212\351"
+  "n\177\333fw\321gw\317br\307cr\303Yg\262Vc\251MX\226EP\206 at J{6\77j.6["
+  "17Q;9FD\77CGBFD at A\77""9;\203<87(843($#-,*\77><IHFZYWxwu\212\211\207k"
+  "ghVRSA=>D at A`\\]yuvtpq`\\]<89XTUc_`WSTTPQYUVMIJ734512ZVWD at Aqmn\206\202"
+  "\203UQRWSTMIJ]YZRNOQMNRNOLHINJKLHI\77;<\203QMN\1RNO\203SOP\205TPQ\204"
+  "SOP\202TPQ\202SOP\1RNO\203QMN\3TPQUQRVRS\203WST\202VRS\1WST\202VRS\2"
+  "UQRTPQ\203SOP8UQROKLWSTRNOYUV\\XY845!\35\36""2./HDEQMNUQR`\\]c_`b^_i"
+  "ef_[\\VRSLHIHDEEABC\77 at HDEOKLlhi\200|}\232\226\227\243\237\240\215\211"
+  "\212hdeQMNMIJ>:;iefoklXTUOKLD at A3/02./KGHhdeTPQmij\205\201\202c_`WSTU"
+  "QRRNOMIJWST_[\\ZVW[WX^Z[VRS\205RNO\204SOP\204TPQ\203UQR\202VRS\202UQ"
+  "R\1TPQ\203SOP\202VRS\203WST\7VRSUQRTPQWSTVRSUQRTPQ\203RNO\13QMNYUVIE"
+  "FTPQRNOZVWXTU($%\22\16\17A=>VRS\202^Z[\202d`aZa]^hdeZVWRNONJKPLMSOPT"
+  "PQ[WXeab][^\\Z[]YZZURTLISJEcZSvoia[[pns[]jBH`T^\201\206\223\300\206\225"
+  "\314\204\227\334|\221\356~\223\374x\216\364u\213\361n\204\351h|\335e"
+  "z\327]q\312Tf\272Tf\262L[\240BP\215\77L\2038Dv0;h1:[/1 at 96=FDIKINE at D<"
+  "89843621\24\20\15-)&`_[\206\205\201\202\201\177utroomjiga]^rno\213\207"
+  "\210\225\221\222\177{|\\XYLHIOKL=9:gcdmijVRSNJKC\77 at 3/02./KGHhdeTPQm"
+  "ij\205\201\202c_`WSTUQRRNOMIJWST_[\\ZVW[WX^Z[VRS\205RNO\204SOP\204TP"
+  "Q\203UQR\202VRS\202UQR\1TPQ\203SOP\202VRS\203WST\7VRSUQRTPQWSTVRSUQR"
+  "TPQ\203RNO\13QMNYUVIEFTPQRNOZVWXTU($%\22\16\17A=>VRS\202^Z[\202d`a\25"
+  "a]^hdeZVWRNONJKPLMSOPTPQ[WXeabJFGd`afbcPLMQMNc_`RNO*&'=9:jfgief\202S"
+  "OP\15@<=$\40!'#$956JFGIEFWST}yzqmnKGHNJKVRSQMN\202WST\4JFGIEFRNOTPQ\212"
+  "SOP\202TPQ\1UQR\203VRS\1YUV\202XTU\2WSTVRS\203UQR\1VRS\203WST\10VRSU"
+  "QRTPQSOPWSTVRSTPQSOP\204QMN\23UQRLHI^Z[KGH>:;@<=401IEF\204\200\201\222"
+  "\216\217\215\211\212}yztpqhde]YZ`\\]ZVWWSTZVW\202b^_>[WXXTU\\XYVTWXT"
+  "U\\VV_ZW]VPZSMe^XsnkhciOO[SXnPX|\237\253\333\245\265\360\244\267\371"
+  "\225\254\372\200\230\370~\231\377s\214\363z\223\370x\221\366j\202\344"
+  "f~\336Yq\313Oe\272Qf\265J\\\244>P\220=L\2079I}3Ap5\77c).B11=\77\77II"
+  "HP@\77E55731221/\14\10\7+'$[ZVqpl]\\ZJIGGGEDDB@<=WSTYUVIEFMIJ^Z[MIJ'"
+  "#$;78hdegcd\202QMN\15\77;<$\40!($%956JFGIEFWST}yzqmnKGHNJKVRSQMN\202"
+  "WST\4JFGIEFRNOTPQ\212SOP\202TPQ\1UQR\203VRS\1YUV\202XTU\2WSTVRS\203U"
+  "QR\1VRS\203WST\10VRSUQRTPQSOPWSTVRSTPQSOP\204QMN\23UQRLHI^Z[KGH>:;@<"
+  "=401IEF\204\200\201\222\216\217\215\211\212}yztpqhde]YZ`\\]ZVWWSTZVW"
+  "\202b^_\33[WXXTU\\XY\77;<GCD@<=.*+-)*=9:@<=512845UQRlhiTPQPLMD at A\40\34"
+  "\35:67MIJLHIb^_vrskgh[WXXTUVRS\210SOP\2QMNRNO\203SOP\5UQRXTUZVWUQRTP"
+  "Q\203RNO\21TPQVRSXTUVRSUQRSOPRNOQMNSOPTPQVRSZVWYUVXTUWSTVRSUQR\202TP"
+  "Q\210SOPKQMNSOPUQRTPQVRS`\\]plm}yz\220\214\215\201}~oklhdeiefhdea]^X"
+  "TUQMNJFGEABHDEQMNXTUYUVWST[VZ]YZ]WWXSP[VRfa]iccd_eZZfPRiX^\200\222\237"
+  "\314\215\235\330\241\265\372\237\266\377\212\245\366l\212\344x\227\362"
+  "\202\237\373\200\235\371x\225\361q\214\347g\202\333_y\316Xq\301Sk\265"
+  "Qh\254\77T\223>Q\2131Bv5Ev4Bi9 at Z(-@$*:JNZ;>GBEJ,-/\"\"\"\16\15\13:97"
+  "MLH;:610.653000###:67@<=;78\202-)*\23""956;781-.845TPQkghRNONJKB>\77"
+  "\37\33\34:67NJKLHIb^_vrskgh[WXWSTVRS\210SOP\2QMNRNO\203SOP\5UQRXTUZV"
+  "WUQRTPQ\203RNO\21TPQVRSXTUVRSUQRSOPRNOQMNSOPTPQVRSZVWYUVXTUWSTVRSUQR"
+  "\202TPQ\210SOP*QMNSOPUQRTPQVRS`\\]plm}yz\220\214\215\201}~oklhdeiefh"
+  "dea]^XTUQMNJFGEABHDEQMNXTUYUVWST7345121-.401C\77 at NJK\77;<&\"#OKLXTUN"
+  "JK!\35\36\35\31\32'#$+'(_[\\\236\232\233\217\213\214\202\220\214\215"
+  "\4yuvb^_ZVWUQR\210SOP\202XTU\1VRS\202UQR\7TPQRNOQMNWSTVRSTPQSOP\204R"
+  "NO\1UQR\203TPQ\2UQRVRS\202XTU\5YUVXTUWSTVRSUQR\202TPQ\211SOP`QMNTPQV"
+  "RSTPQRNOUQR^Z[fbc]YZWSTQMNPLMTPQXTUYUVXTU`\\]]YZ[WX]YZ`\\]a]^^Z[[WX^"
+  "Y]\\XY^XXa\\Y_[XWSThfkffrIKbY_\201\221\234\312\230\247\342\220\243\350"
+  "\246\275\377\224\256\377\201\237\365x\226\356r\221\353w\226\360\200\237"
+  "\371|\231\365l\212\344h\203\336m\210\337e\177\323_x\310Yq\273AX\234<"
+  "Q\2202F\2018K\2036Hv3Bc=Ia%0F\25\35""0-5B\30\37)\17\24\30\0\0\4///KJ"
+  "HONL:95/.,0/-,,,&$%4010,-+'(/+,\77;<JFG=9:($%MIJWSTLHI\37\33\34\33\27"
+  "\30&\"#*&'^Z[\236\232\233\220\214\215\221\215\216\220\214\215yuvb^_Y"
+  "UVTPQ\210SOP\202XTU\1VRS\202UQR\7TPQRNOQMNWSTVRSTPQSOP\204RNO\1UQR\203"
+  "TPQ\2UQRVRS\202XTU\5YUVXTUWSTVRSUQR\202TPQ\211SOP0QMNTPQVRSTPQRNOUQR"
+  "^Z[fbc]YZWSTQMNPLMTPQXTUYUVXTU`\\]]YZ[WX]YZ`\\]a]^^Z[[WXRNOZVWd`ajfg"
+  "iefa]^YUVUQR`\\]]YZ\77;<\32\26\27,()KGH_[\\\222\216\217\232\226\227\203"
+  "\177\200xturno^Z[PLMNJKJFG\210SOP\1RNO\202PLM\4TPQYUVZVWWST\203SOP\203"
+  "TPQ\10SOPRNOQMNTPQUQRVRSXTUYUV\203ZVW\203VRS\2UQRTPQ\202SOP\1RNO\210"
+  "SOP\10OKLSOPVRSUQRQMNOKLQMNTPQ\205WST\6YUV]YZ_[\\c_`eabhde\202kghKgc"
+  "db^__[\\ZTVa[]_[Z^ZYgefedjnp}Y^t]c\207\205\217\300\234\253\346\231\254"
+  "\361\240\267\377\223\255\377\237\275\377n\214\346y\226\362}\232\370\177"
+  "\233\374~\232\373z\230\372w\225\367r\216\361n\210\351h\202\341c|\330"
+  "Xr\311 at Y\253;R\2407M\230<P\2278L\211;P{4Hi$7U\33+E\37+A\0\3\21.7 at NSY"
+  "MNR\\\\\\^][UTRPNOJHIB at A><=IEFOKLXTU`\\]_[\\ZVWUQRTPQ\\XYYUV=9:\31\25"
+  "\26+'(JFG^Z[\221\215\216\232\226\227\203\177\200xturno^Z[PLMNJKJFG\210"
+  "SOP\1RNO\202PLM\4TPQYUVZVWWST\203SOP\203TPQ\10SOPRNOQMNTPQUQRVRSXTUY"
+  "UV\203ZVW\203VRS\2UQRTPQ\202SOP\1RNO\210SOP\10OKLSOPVRSUQRQMNOKLQMNT"
+  "PQ\205WST\6YUV]YZ_[\\c_`eabhde\202kgh\33gcdb^__[\\\177{|\203\177\200"
+  "\212\206\207\211\205\206yuviefmij|xyyuvvrsXTUIEFkgh|xytpq\204\200\201"
+  "xtua]^XTUWSTPLMRNOWSTUQR\210SOP\1OKL\202MIJ\11RNOYUV[WXVRSPLMKGHMIJP"
+  "LMTPQ\204VRS\3TPQUQRWST\203YUV\3WSTVRSUQR\202TPQ\202SOP\203RNO\210SO"
+  "P\2NJKRNO\202VRS\1TPQ\202RNO\2TPQWST\202VRS\2TPQSOP\203RNO\3UQRZVWa]"
+  "^\202d`a.b^_a]^`\\]c]_gacYUVOMPTSYQS`CH^MUy\226\240\321\226\244\341\252"
+  "\274\377\231\256\377\244\276\377\226\261\377\204\243\376t\223\356y\226"
+  "\364\205\242\377\211\245\377\200\234\375y\226\372w\224\370n\213\357a"
+  "}\341g\203\346d\200\341\\v\323Lg\300Jd\270Mf\266Le\265F^\2446Q\2063P"
+  "z&\77g)@b\34""0K\33*\77\77KY_hq^cgdegeee\202hfg\25_]^XVW^Z[mijqmnzvw"
+  "|xyokl`\\]d`atpqsopqmnUQRHDEjfg|xytpq\202~\177wst`\\]\202WST\4PLMQMN"
+  "WSTUQR\210SOP\1OKL\202MIJ\11RNOYUV[WXVRSPLMKGHMIJPLMTPQ\204VRS\3TPQU"
+  "QRWST\203YUV\3WSTVRSUQR\202TPQ\202SOP\203RNO\210SOP\2NJKRNO\202VRS\1"
+  "TPQ\202RNO\2TPQWST\202VRS\2TPQSOP\203RNO\3UQRZVWa]^\202d`a\25b^_a]^`"
+  "\\]\201}~okleabiefhde`\\]]YZc_`eabnjkUQRSOPwst\200|}vrs{wxtpq`\\]\202"
+  "YUV\4TPQVRSZVWRNO\210SOP\15YUVUQRQMNRNOUQRRNOJFGA=>LHINJKQMNTPQVRS\202"
+  "WST\202VRS\1WST\202XTU\4WSTTPQRNOPLM\204SOP\204RNO\210SOP\2RNOSOP\202"
+  "TPQ\202SOPTUQRWSTQMNNJKLHIOKLTPQVRSTPQPLMNJKQMNUQRXTUYUVZVW\\XY_Y[`W"
+  "XYPSOIKXV[VXdPUiDMn\237\254\331\250\270\364\244\266\377\253\301\377\243"
+  "\274\377\233\265\377\203\242\377u\224\357\203\242\375\207\245\377\207"
+  "\242\375\206\243\377\204\241\375w\225\365d\202\342Yw\331Vw\326Tu\324"
+  "Qr\317Eg\300\77_\264\77`\261Hh\265Ff\263\77`\2456X\2259]\221$Ds$Ai!9"
+  "[$8S\37.Adp|nu}ehmXXZSQRRPQPLMSNRa\\`okl_[\\WST]YZ_[\\XTUWST\\XY^Z[i"
+  "efQMNRNOwst\177{|uqryuvsop_[\\\202XTU\4SOPVRSYUVRNO\210SOP\15YUVUQRQ"
+  "MNRNOUQRRNOJFGA=>LHINJKQMNTPQVRS\202WST\202VRS\1WST\202XTU\4WSTTPQRN"
+  "OPLM\204SOP\204RNO\210SOP\2RNOSOP\202TPQ\202SOP$UQRWSTQMNNJKLHIOKLTP"
+  "QVRSTPQPLMNJKQMNUQRXTUYUVZVW\\XY^Z[\\XYVRSUQRYUVXTURNOUQR^Z[XTUfbcB>"
+  "\77:67WSTa]^plm\202~\177jfg[WX\202WST\4QMNSOPTPQIEF\210SOP\2VRSSOP\202"
+  "QMN\5SOPQMNLHIGCDTPQ\204UQR\1TPQ\202SOP\202WST\6VRSUQRSOPQMNNJKMIJ\220"
+  "SOP\4WSTUQRSOPQMN\202PLM\11RNOSOPYUVUQRQMNTPQYUV\\XYXTU\202TPQ\203SO"
+  "P7UQRWSTYUVZTV[RSTKLLFJTSYORaKRlAOv\226\247\335\233\257\366\247\275\377"
+  "\214\245\377\225\257\377\203\241\377u\223\363\200\242\374\206\245\377"
+  "\217\255\377\215\253\377\207\245\377y\230\363m\214\351b\203\340[|\333"
+  "Ux\326a\204\340Y~\327In\306Ek\276Af\266Jp\273Jn\272Io\266En\256'Q\213"
+  "(P\204%Jw!>f\26/N\36""0Hiv\206s|\205dgnLMQA\77BB>\77A=>F at DRLPMIJHDEG"
+  "CD\202KGH\15JFGPLMYUVRNO`\\]=9:734UQR_[\\okl\200|}hdeYUV\202VRS\4PLM"
+  "SOPTPQIEF\210SOP\2VRSSOP\202QMN\5SOPQMNLHIGCDTPQ\204UQR\1TPQ\202SOP\202"
+  "WST\6VRSUQRSOPQMNNJKMIJ\220SOP\4WSTUQRSOPQMN\202PLM\11RNOSOPYUVUQRQM"
+  "NTPQYUV\\XYXTU\202TPQ\203SOP\2UQRWST\202YUV\30LHIVRS_[\\^Z[VRSSOP_[\\"
+  "mijkghplm;78734YUV]YZc_`b^_gcd\\XY[WXZVWUQRZVW^Z[UQR\210SOP\6MIJNJKO"
+  "KLQMNSOPUQR\202VRS\3YUVXTUWST\202UQR\202TPQ\6UQRXTUVRSUQRSOPQMN\203P"
+  "LM\204SOP\204TPQ\210SOP\3UQRTPQRNO\204QMN\6PLMUQRSOPQMNOKLNJK\203MIJ"
+  "FWSTTPQRNOSOPWSTYUVWSTVPRTJKSIJOJNPPXTYlZe\203r\203\261\205\231\326\217"
+  "\246\364\177\230\364\201\235\377u\222\370u\222\366\215\256\377~\240\372"
+  "\211\250\377\210\246\377\215\253\377\202\237\373n\215\352i\212\347s\226"
+  "\364q\223\364a\205\343e\214\347_\207\337Px\317Mv\310>g\266 at j\264>h\262"
+  "Eo\267>m\261#S\2230]\230#K\177#Do-Jl0E`#2Emu\202_clHIN=;>D at AGACE<AC="
+  "A;78GCDQMNOKLHDEJFGWSTd`aeabjfg7343/0UQRZVW\202a]^\2eabZVW\202YUV\4T"
+  "PQYUV^Z[UQR\210SOP\6MIJNJKOKLQMNSOPUQR\202VRS\3YUVXTUWST\202UQR\202T"
+  "PQ\6UQRXTUVRSUQRSOPQMN\203PLM\204SOP\204TPQ\210SOP\3UQRTPQRNO\204QMN"
+  "\6PLMUQRSOPQMNOKLNJK\203MIJ\12WSTTPQRNOSOPWSTYUVWSTUQRXTURNO\202LHI\24"
+  "UQR_[\\a]^^Z[HDEJFG\36\32\33=9:\205\201\202\220\214\215\177{|_[\\ief"
+  "_[\\[WXUQRLHIPLMVRSMIJ\210SOP\1TPQ\202UQR\1TPQ\202RNO\15TPQVRSWSTVRS"
+  "UQRTPQUQRWSTYUV[WXWSTVRSSOP\203QMN\1RNO\203SOP\203TPQ\203UQR\210SOP\202"
+  "PLM\12RNOTPQVRSWSTUQRSOPRNOVRSYUVVRS\202RNO\37YUV`\\]SOPOKLNJKRNOYUV"
+  "[WXWSTSMObVXSIJPLMLOVFNc=Mq\205\230\320z\222\332r\214\341u\222\360t\221"
+  "\365\200\235\377\210\245\377\213\254\377\222\261\377\177\236\371\202"
+  "\241\376x\227\364m\216\355l\217\355s\227\365\202w\236\375\31s\233\372"
+  "j\225\361f\224\354[\211\336[\212\334Ds\303>n\2728h\264Cu\2761f\2542e"
+  "\247(X\226$Q\212&P\202%Gt$@e+@[fr\202[_hABG446=;>GBFA;=935\202D at A\202"
+  "A=>\1LHI\202XTU\21OKLD at AEAB\31\25\26""845\201}~\215\211\212}yz]YZgcd"
+  "\\XYYUVTPQJFGPLMUQRMIJ\210SOP\1TPQ\202UQR\1TPQ\202RNO\15TPQVRSWSTVRS"
+  "UQRTPQUQRWSTYUV[WXWSTVRSSOP\203QMN\1RNO\203SOP\203TPQ\203UQR\210SOP\202"
+  "PLM\12RNOTPQVRSWSTUQRSOPRNOVRSYUVVRS\202RNO'YUV`\\]SOPOKLNJKRNOYUV[W"
+  "XWSTRNOXTUKGHNJKXTUYUV\\XY]YZRNOPLM\40\34\35\"\36\37QMN\220\214\215v"
+  "rs^Z[SOPd`ahde`\\]NJKIEFTPQ\\XYZVWVRSOKLPLMHDE_[\\\202MIJ\1NJK\202VR"
+  "S\202UQR\1TPQ\202SOP\3RNOYUVWST\202UQR\202VRS\2TPQRNO\203UQR\5SOPQMN"
+  "RNOUQRXTU\210SOP\20NJKXTU[WXUQRTPQZVWVRSLHIMIJRNOTPQQMNTPQZVWWSTNJK\210"
+  "SOPULHIPLMTPQUQRVRSWSTYUV\\SVZKPOCGOKHOTXDSjAV\203~\225\331\203\235\361"
+  "\205\243\375\200\237\374|\232\372\203\241\377\220\255\377{\230\376\200"
+  "\234\377q\217\361i\206\352j\212\355f\210\352`\206\347l\224\364|\247\377"
+  "v\245\377c\224\360c\226\357V\214\342\\\224\351Z\222\345By\3148o\301A"
+  "x\312Bz\307'b\246-g\2460c\242&X\225\37Q\220\40Q\214&O\203*Jq_n\205\\"
+  "`k=>B9999:>89;A\77@@<;@<=:89><=DBCFDEJHIMKLJHIFDE\36\34\35\33\31\32G"
+  "EF\216\214\215sqrVTUQOP`\\]eab^Z[LHIGCDRNO[WXZVWVRSOKLPLMHDE_[\\\202"
+  "MIJ\1NJK\202VRS\202UQR\1TPQ\202SOP\3RNOYUVWST\202UQR\202VRS\2TPQRNO\203"
+  "UQR\5SOPQMNRNOUQRXTU\210SOP\20NJKXTU[WXUQRTPQZVWVRSLHIMIJRNOTPQQMNTP"
+  "QZVWWSTNJK\210SOP\6LHIPLMTPQUQRVRSWST\202YUV\40LHIJFGVRSZVWOKLMIJRNO"
+  "NJK[WX734\\XY\200|}\177{|XTUd`ahdeTPQfbcqmnkghb^_^Z[TPQGCDOKLYUVd`aS"
+  "OP]YZHDEQMN]YZ\203UQR\203TPQ\202SOP\7WSTUQRTPQUQRWSTXTUWST\202UQR\202"
+  "VRS\5UQRRNOQMNSOPUQR\210SOP\17VRSXTUUQRPLMOKLSOPUQRRNOUQRWSTVRSRNOPL"
+  "MRNOTPQ\211SOP\1RNO\202VRS\202QMN\202UQRQRILPAHL at DIFATY\\M]vj\200\261"
+  "\211\243\356\203\236\371\211\246\377\205\244\377\207\246\377\203\241"
+  "\377\204\240\377m\211\355n\212\355g\205\347e\205\350d\206\352g\213\354"
+  "j\222\362l\227\366l\233\367k\236\371l\242\374[\224\353R\216\344Z\227"
+  "\352[\230\353F\203\326<y\312>x\3123q\2765t\2713p\257-e\242\"Y\231\32"
+  "U\231\34U\230\"V\222+Q\200/C^OUaNOSACB/47.25\77><\77;8986978\77=>B at A"
+  "><=\77=>DBCECDHFG/-.RPQqopustNLMYWXb`aQMNd`aplmief`\\]\\XYSOPGCDOKLY"
+  "UVd`aSOP]YZHDEQMN]YZ\203UQR\203TPQ\202SOP\7WSTUQRTPQUQRWSTXTUWST\202"
+  "UQR\202VRS\5UQRRNOQMNSOPUQR\210SOP\17VRSXTUUQRPLMOKLSOPUQRRNOUQRWSTV"
+  "RSRNOPLMRNOTPQ\211SOP\1RNO\202VRS\202QMN\202UQR\5OKL_[\\XTUYUVTPQ\202"
+  "FBC\1NJK\202KGH\27\3\0\0\40\34\35_[\\yuviefnjkNJKplmwstsop`\\]SOPUQR"
+  "\\XY^Z[XTUPLMIEF<89\\XYVRSQMND at A\211TPQ\4SOPRNOTPQWST\202YUV\6WSTTPQ"
+  "VRSXTUWSTTPQ\202QMN\1RNO\210SOP\4UQRQMNPLMSOP\202TPQ\12WST\\XYUQRTPQ"
+  "UQRVRSRNONJKPLMUQR\210SOPXPLMWSTVRSOKLUQRa]^`\\]UOQG:ANCGKJFW_bKYs\202"
+  "\226\310\201\230\346s\216\351v\223\357{\230\366\212\247\377~\233\371"
+  "s\214\360f\177\343l\211\347|\233\370\205\246\377{\237\377w\236\375{\246"
+  "\377~\253\377w\251\377p\246\376o\247\376f\237\366Y\225\353V\223\346P"
+  "\217\337D\203\323D\203\322F\203\3238x\302<\177\3030r\257%a\237\37[\232"
+  "\33Z\237\32Y\236\37V\226(T\2051Iegp\177Z]b89;6;>.250/-=96\77><=;<><="
+  "=;<645756=;<><=ECD\5\3\4\"\40!WUVqopcabighJHInjkvrsrno_[\\QMNTPQ[WX^"
+  "Z[XTUPLMIEF<89\\XYVRSQMND at A\211TPQ\4SOPRNOTPQWST\202YUV\6WSTTPQVRSXT"
+  "UWSTTPQ\202QMN\1RNO\210SOP\4UQRQMNPLMSOP\202TPQ\12WST\\XYUQRTPQUQRVR"
+  "SRNONJKPLMUQR\210SOP(PLMWSTVRSOKLUQRa]^`\\]TPQMIJGCDLHISOPVRS_[\\a]^"
+  "SOP1-.\24\20\21A=>oklxtuTPQZVWYUVJFGXTU`\\]YUVNJKLHIPLMRNO]YZgcdkghO"
+  "KLWSTKGHWST_[\\\202SOP\203TPQ\203UQR\12SOPRNOQMNRNOUQRWSTVRSUQRRNOUQ"
+  "R\202WST\2UQRSOP\202RNO\210SOP\3RNOLHIOKL\202YUV\6PLMNJKUQRPLMMIJQMN"
+  "\202YUV\2QMNOKL\211SOP\1NJK\202WSTUOKLVRSc_`]YZKEGD7>QFJYXTW_bAOiw\213"
+  "\275k\202\320g\200\334l\206\343g\204\340y\223\360r\214\351q\213\352y"
+  "\223\362\200\233\366\223\263\377\217\262\377\212\257\377\200\251\377"
+  "z\246\377z\251\377y\254\377p\246\376d\235\364k\247\375\\\232\357O\215"
+  "\340C\204\324@\202\320J\214\330K\215\331<\177\3067|\277&l\252\35_\234"
+  "\37`\240\37e\253\34b\247\33[\233#U\2106Qo\213\230\250os|%),5:>269+'$"
+  "B=:40/201978\77=>B at AHFGIGHCAB#!\"\14\12\13""756][\\hfgLJKVTUSQRGCDWS"
+  "T`\\]XTULHIKGHOKLRNO]YZgcdkghOKLWSTKGHWST_[\\\202SOP\203TPQ\203UQR\12"
+  "SOPRNOQMNRNOUQRWSTVRSUQRRNOUQR\202WST\2UQRSOP\202RNO\210SOP\3RNOLHIO"
+  "KL\202YUV\6PLMNJKUQRPLMMIJQMN\202YUV\2QMNOKL\211SOP\1NJK\202WST%OKLV"
+  "RSc_`]YZJFG[WX`\\]mijnjkb^_\\XYPLM:67\13\7\10""623mij}yz|xy:67401[WX"
+  "LHIHDE956&\"#\37\33\34""1-.PLMhdeZVWSOPNJK\77;<[WXUQRZVWYUV\206TPQ\202"
+  "UQR\4SOPRNOPLMQMN\202SOP\1RNO\202PLM\7SOPVRSWSTUQRTPQSOPTPQ\210SOP\3"
+  "VRSOKLPLM\202XTU\4NJKLHISOPVRS\202RNO\5VRSXTUUQRTPQUQR\210SOPCRNOYUV"
+  "WSTNJKOKLRNOEAB0*,F;AMDG_`[RZ]CQkj~\260g|\313p\207\344y\222\357h\202"
+  "\337l\205\337q\212\344\200\231\365\223\256\377\213\247\373\215\255\377"
+  "\203\247\373\205\255\377\201\256\377x\246\374n\240\367i\237\367i\241"
+  "\370e\241\371^\236\365U\227\353L\217\340F\211\327I\215\330O\223\334E"
+  "\211\320/u\272.w\273\40j\253\33b\242\"l\255%s\273!o\267!g\254*c\2328"
+  "Yz\207\230\252{\202\214(+0*/5.250,)<73;76><=IGHMKLHFGFDEA\77 at 756\13\11"
+  "\12""423fde\202nlm\23""4230./PNOIEFFBC845%!\"\35\31\32/+,OKLhdeZVWSO"
+  "PNJK\77;<[WXUQRZVWYUV\206TPQ\202UQR\4SOPRNOPLMQMN\202SOP\1RNO\202PLM"
+  "\7SOPVRSWSTUQRTPQSOPTPQ\210SOP\3VRSOKLPLM\202XTU\4NJKLHISOPVRS\202RN"
+  "O\5VRSXTUUQRTPQUQR\210SOP\36RNOYUVWSTNJKOKLRNOEAB/+,<89FBCRNOFBC2./7"
+  "34GCDHDEd`a\217\213\214\240\234\235\221\215\216\234\230\231VRS1-.EAB"
+  "RNO[WXb^_^Z[RNOFBC\202B>\77\10;78\25\21\22\5\1\2\34\30\31iefplm^Z[B>"
+  "\77\203UQR\203TPQ\202SOP\12TPQRNOPLMQMNRNOSOPQMNOKLRNOTPQ\202VRS\1TP"
+  "Q\202SOP\1UQR\210SOP\20TPQQMNRNOXTU[WX\\XY_[\\eabVRSZVWYUVSOPPLMTPQX"
+  "TUYUV\210SOP\1RNO\202UQR\202RNOSOKLD at A935SHNNEH[\\WLTWKYsfx\252k~\313"
+  "w\214\347z\221\356x\220\352{\223\353\202\234\361\206\240\367\222\254"
+  "\377\210\245\365\206\247\364\210\257\376\177\252\371z\251\371z\252\376"
+  "t\250\374h\240\367a\235\365`\240\370Z\234\363U\231\356K\222\344F\215"
+  "\333K\223\335L\224\334>\207\314+v\271&u\270\35l\256\34j\252#t\266%{\304"
+  "$z\303&v\2733t\252Fl\220:Od8 at K\35\40'%*0+,051.1,(*&%.,-423.,-#!\"&$%"
+  "0./1/0JHInlm\200~\177wuv\212\210\211RPQ312B at AMIJXTU`\\]]YZPLMEABA=>C"
+  "\77@;78\25\21\22\5\1\2\34\30\31iefplm^Z[B>\77\203UQR\203TPQ\202SOP\12"
+  "TPQRNOPLMQMNRNOSOPQMNOKLRNOTPQ\202VRS\1TPQ\202SOP\1UQR\210SOP\20TPQQ"
+  "MNRNOXTU[WX\\XY_[\\eabVRSZVWYUVSOPPLMTPQXTUYUV\210SOP\1RNO\202UQR\202"
+  "RNO$OKLD at A845`\\]YUVLHI/+,\23\17\20\27\23\24\"\36\37\35\31\32<89fbc{"
+  "wx^Z[c_`SOPnjk\225\221\222\210\204\205\203\177\200xtujfgZVWQMNRNOWST"
+  "+'()%&B>\77ZVW~z{c_`_[\\hdeWST\202VRS\3UQRTPQSOP\202RNO\10SOPRNOQMNR"
+  "NOTPQVRSUQRSOP\203XTU\4UQRQMNPLMQMN\211SOP\2NJKUQR\202[WX\14ZVWXTUQM"
+  "NIEF401PLMa]^XTUMIJRNOXTUUQR\211SOPXOKLQMNWSTYUVUQRTPQYSU`W\\XRTZ[VN"
+  "VYO[sbr\243iy\306u\206\340v\212\343\204\232\360\204\232\355\215\246\370"
+  "\201\233\357\203\236\357\203\240\354\201\246\355|\246\360q\241\355l\235"
+  "\354o\242\365p\246\374i\242\371X\230\360M\220\351T\232\362O\227\354C"
+  "\216\341>\213\331C\221\333C\221\3319\210\3130\201\303\40u\270\37t\267"
+  "\"w\270&}\302\"\202\314!\201\313(\177\3047~\266;g\214#9P%/;\24\30!)."
+  "4./37303.*843312-+,\36\34\35\20\16\17\23\21\22\33\31\32\32\30\31""75"
+  "6VTUljkTRSWUVGEFb`a\201\177\200\202~\177~z{uqrgcdWSTOKLQMNXTU+'()%&B"
+  ">\77ZVW~z{c_`_[\\hdeWST\202VRS\3UQRTPQSOP\202RNO\10SOPRNOQMNRNOTPQVR"
+  "SUQRSOP\203XTU\4UQRQMNPLMQMN\211SOP\2NJKUQR\202[WX\14ZVWXTUQMNIEF401"
+  "PLMa]^XTUMIJRNOXTUUQR\211SOP\34OKLQMNWSTYUVUQRTPQXTUOKLMIJVRSd`axtu\221"
+  "\215\216\217\213\214rno\203\177\200\200|}tpq845$\40!3/0rno\214\210\211"
+  "sopokljfgeab]YZ\202VRS\22YUV]YZ_[\\~z{\221\215\216\233\227\230`\\]LH"
+  "IVRSXTUWSTVRSUQRSOPRNOQMNPLMSOP\202QMN\2SOPWST\202YUV\11XTU]YZ\\XYYU"
+  "VUQROKLMIJNJKPLM\210SOP\20PLM_[\\fbc]YZMIJ:67\35\31\32\3\0\0\7\3\4>:"
+  ";fbca]^QMNRNOTPQMIJ\210SOP\3[WXQMNOKL\202VRS\\NJKSOPa]^c]ad`a^`[V^`N"
+  "Zpcq\240iw\300u\205\332\200\222\346\211\233\355x\216\332\206\235\351"
+  "\177\231\346\200\235\351\177\240\345t\233\340`\214\325k\234\350o\242"
+  "\361g\236\360e\237\363h\246\375^\237\371J\221\351C\215\346A\216\346;"
+  "\211\3348\211\332>\220\334;\215\3262\205\313-\201\307\35u\274\40{\301"
+  "(\204\307+\211\317%\213\325\"\210\322(\205\3126\201\272>l\220\207\240"
+  "\266\230\242\256\77CL49\77""4592.+1,(-)(,*+534@>\77MKL^\\]a_`USTgef["
+  "YZZXY-+,\32\30\31*()ljk\202\200\201kghieffbca]^ZVWTPQUQRZVW]YZ_[\\~z"
+  "{\221\215\216\233\227\230`\\]LHIVRSXTUWSTVRSUQRSOPRNOQMNPLMSOP\202QM"
+  "N\2SOPWST\202YUV\11XTU]YZ\\XYYUVUQROKLMIJNJKPLM\210SOP\20PLM_[\\fbc]"
+  "YZMIJ:67\35\31\32\3\0\0\7\3\4>:;fbca]^QMNRNOTPQMIJ\210SOP\3[WXQMNOKL"
+  "\202VRS\14NJKSOPa]^TPQSOPRNOTPQXTU_[\\fbcjfgplm\202rnoDYUVA=>[WXwstl"
+  "hi_[\\\\XYZVWWSTQMNNJKWSTc_`\\XY_[\\sop\177{|mij]YZYUVUQR\\XYSOPLHIK"
+  "GHHDEFBCMIJYUVGCDUQR^Z[YUVUQRWSTXTUVRSTPQXTUYUVa]^hdeZVWLHIRNOZVWOKL"
+  "SOPYUVRNOPLMRNOMIJ_[\\QMN_[\\D at ARNO\3\0\0\31\25\26UQRyuv\236\232\233"
+  "\216\212\213UQREABYUV_[\\\202SOP\202RNO\202QMN\202RNO\2SOPTPQ\203UQR"
+  "\203TPQBUQRXRV\\XYUXQKTSITh[h\222\\i\255\203\220\337\202\222\340\206"
+  "\230\344\203\227\336z\221\327{\225\337\201\237\347z\235\337h\221\323"
+  "t\243\353d\230\344[\223\340a\232\353e\241\367_\241\367W\235\365Q\233"
+  "\364I\226\360E\227\355C\225\353>\223\3448\217\3362\212\324+\203\313$"
+  "\177\306\31u\276'\205\315)\207\315#\210\316&\222\333(\222\334'\210\314"
+  "8\205\275Hv\232Uk\202QYf\37\")\36!(()-)%\",'#.*)-+,0./312756><=ECDIG"
+  "HOMNVTUWUVCAB645MKLhfgjhiZVW\203VRS;PLMJFGSOPb^_\\XY_[\\tpq\200|}okl"
+  "^Z[ZVWVRS\\XYSOPLHIKGHHDEFBCMIJYUVGCDUQR^Z[YUVUQRWSTXTUVRSTPQXTUYUVa"
+  "]^hdeZVWLHIRNOZVWOKLSOPYUVRNOPLMRNOMIJ_[\\QMN_[\\D at ARNO\3\0\0\31\25\26"
+  "UQRyuv\236\232\233\216\212\213UQREABYUV_[\\\202SOP\202RNO\202QMN\202"
+  "RNO\2SOPTPQ\203UQR\203TPQ\1UQR\202SOP\202RNO\15SOPTPQUQRVRSXTU^Z[]YZ"
+  "HDE;78VRS{wx\211\205\206]YZ\202YUV\32\\XYZVWUQRWST]YZhdec_`oklxtujfg"
+  "]YZXTUPLMVRSPLMOKLUQRWSTSOPQMNTPQYUVWSTPLMKGHOKL\202WST\15PLMHDE]YZ^"
+  "Z[OKLHDEFBCIEFUQRXTUSOPZVW[WX\202NJK\23]YZd`aJFGd`a]YZ@<=!\35\36($%g"
+  "cd~z{\240\234\235\206\202\203b^_RNOSOPNJKIEFNJKVRS\202UQR\202TPQ\202"
+  "UQRfVRS[WXWSTRNOOKLPLMRNOTPQUPTVOVTPQNOIDJHBK\\OY}lv\263|\206\316~\212"
+  "\322\201\220\325|\217\321v\215\320w\222\327|\233\336u\230\330e\221\320"
+  "m\237\346]\225\340U\216\333T\221\341T\225\347P\224\351K\225\354K\230"
+  "\360G\231\357B\230\355\77\225\3529\222\3444\217\336.\212\327)\205\320"
+  "$\201\316\"\202\3171\223\336/\224\334\"\212\321\31\211\323\32\211\321"
+  "'\210\314\77\214\302My\234I^s7=I!\40&$$,$%)!\40\34(%\40*)'+)*.,-0./3"
+  "12645:89=;<\77=>IGHKIJ<:;534IGHcabmklWSTSOPUQR[WXXTUQMNTPQ]YZgcdc_`o"
+  "klyuvkgh_[\\YUVQMNVRSPLMOKLUQRWSTSOPQMNTPQYUVWSTPLMKGHOKL\202WST\15P"
+  "LMHDE]YZ^Z[OKLHDEFBCIEFUQRXTUSOPZVW[WX\202NJK\23]YZd`aJFGd`a]YZ@<=!\35"
+  "\36($%gcd~z{\240\234\235\206\202\203b^_RNOSOPNJKIEFNJKVRS\202UQR\202"
+  "TPQ\202UQR\13VRS[WXWSTRNOOKLPLMRNOTPQUQRRNOSOP\202TPQ\26RNOPLMMIJKGH"
+  "QMN[WXXTUPLMQMNPLMSOP^Z[ZVWUQRWST]YZ[WXRNOMIJOKLoklb^_\202a]^\10UQRP"
+  "LMQMNKGHIEFFBCHDEQMN\202XTU\202VRS\1SOP\202TPQ%UQRZVW^Z[ZVWSOP[WXYUV"
+  "\\XY^Z[@<=\17\13\14\27\23\24NJKiefOKLEABLHIRNOXTUVRSIEFPLM`\\]VRSeab"
+  "\16\12\13&\"#zvw\264\260\261\224\220\221b^_B>\77PLM[WXOKLIEFVRS\202S"
+  "OP\1RNO\202QMN\1RNO\202SOPA^Z[VRSMIJKGHPLMWSTZVW[VZ\\U\\TNRLLDBGC at FR"
+  "CLkv}\263q{\271w\202\300u\203\300r\205\300p\210\304q\215\316p\222\322"
+  "k\221\320a\216\317e\231\342Z\224\336U\220\334S\222\341O\222\341H\221"
+  "\340E\223\345E\227\351<\222\3457\222\3433\216\337/\214\334*\211\331'"
+  "\207\324%\205\322!\202\321\33~\317#\210\330\"\210\322\32\205\315\35\217"
+  "\330&\225\3340\222\323C\214\277Hq\221BSe&&0#\36$\"!'\40!%\40\37\33$#"
+  "\37&%#)'(,*+.,-/-.1/0312423:89\202B at A\16<:;><=ECDLJKTRSRNONJKQMNZVWY"
+  "UVOKLJFGOKLokl\203b^_\1VRS\202QMN\5KGHIEFFBCHDEQMN\202XTU\202VRS\1SO"
+  "P\202TPQ%UQRZVW^Z[ZVWSOP[WXYUV\\XY^Z[@<=\17\13\14\27\23\24NJKiefOKLE"
+  "ABLHIRNOXTUVRSIEFPLM`\\]VRSeab\16\12\13&\"#zvw\264\260\261\224\220\221"
+  "b^_B>\77PLM[WXOKLIEFVRS\202SOP\1RNO\202QMN\1RNO\202SOP\10^Z[VRSMIJKG"
+  "HPLMWSTZVW[WX\202SOP\204UQR\4SOPRNOXTUMIJ\202401\5QMN[WX_[\\wstfbc\202"
+  "_[\\\17d`a^Z[PLMMIJTPQ]YZZVWd`agcdZVWVRSZVWVRSWSTTPQ\202RNO\25TPQUQR"
+  "XTU[WXNJKWST`\\]a]^^Z[]YZa]^eabUQRJFGMIJYUVC\77@\34\30\31""845\206\202"
+  "\203lhi\202^Z[\27`\\]XTUWSTZVWVRSoklIEF623WST/+,JFG^Z[\225\221\222jf"
+  "gVRSNJKSOPTPQUQRYUVXTUTPQSOP\204RNO'SOPTPQXTUPLMIEFKGHUQR_[\\b^_b\\`"
+  "bX`UOSKKCGJCDHQEKecj\230ho\246oz\260jz\256i}\260j\203\273j\210\306f\211"
+  "\311b\212\310\\\214\314W\215\325S\217\330T\224\336V\232\345S\233\345"
+  "K\227\342A\223\337<\223\3409\223\3414\221\336/\217\334+\214\331+\214"
+  "\333\202)\215\3333'\214\334\"\210\334$\212\336\37\206\323\30\204\315"
+  "\35\217\330*\231\3363\223\320;\203\263;`{BN\\#\40'%\34!\31\27\34\35\35"
+  "\37##!#\"\36$#!'%&*(),*+/-.1/0423534<:;756)'(*()><=KIJVTUfde\\XYWSTZ"
+  "VW`\\][WXMIJKGHSOP\\XYZVWd`agcd[WXWST[WXVRSWSTTPQ\202RNO\25TPQUQRXTU"
+  "[WXNJKWST`\\]a]^^Z[]YZa]^eabUQRJFGMIJYUVC\77@\34\30\31""845\206\202\203"
+  "lhi\202^Z[\27`\\]XTUWSTZVWVRSoklIEF623WST/+,JFG^Z[\225\221\222jfgVRS"
+  "NJKSOPTPQUQRYUVXTUTPQSOP\204RNO\13SOPTPQXTUPLMIEFKGHUQR_[\\b^_a]^TPQ"
+  "\202SOP\12RNOSOPTPQVRSWSTLHIKGH@<=JFGb^_\202`\\]\31yuv`\\]VRSSOPTPQK"
+  "GH@<=FBCWSTVRSa]^tpqvrsd`aa]^lhinjkjfglhijfgc_`[WXXTUZVW\\XY\202`\\]"
+  "\3_[\\[WXVRS\202QMN\16TPQXTUgcdVRS3/0*&'\77;<fbc\212\206\207{wx_[\\R"
+  "NOWST[WX\202b^_\21VRSKGHNJKSOP\37\33\34($%c_`PLMnjkokla]^]YZWSTLHISO"
+  "PZVWMIJ\202YUV\1XTU\202WST\1XTU\202YUV at PLMKGHHDEMIJWST^Z[]YZZTXVLUNE"
+  "JFC:IJBJNQMReFKq_e\225hs\240es\240cx\245e\177\260d\204\277^\204\303Z"
+  "\206\303Y\212\314J\203\310H\207\316L\217\326T\232\340V\241\345N\236\343"
+  "B\227\3326\222\3252\217\324-\216\323&\213\321$\212\324$\212\325%\212"
+  "\330$\213\330$\212\334\"\212\341'\217\346'\221\337\37\213\324\33\215"
+  "\326+\230\333;\230\323I\214\2676Vm8 at K\35\27\33&\34\35\32\25\31\33\33"
+  "\35\"\"\40\40!\34$#!%#$'%&)'(,*+/-.423645\202534\7""201;9:LJKOMNSQRc"
+  "abUQR\202NJK\25PLMHDE=9:EABVRSUQR`\\]tpqvrsd`ab^_lhinjkjfglhijfgc_`["
+  "WXXTUZVW\\XY\202`\\]\3_[\\[WXVRS\202QMN\16TPQXTUgcdVRS3/0*&'\77;<fbc"
+  "\212\206\207{wx_[\\RNOWST[WX\202b^_\21VRSKGHNJKSOP\37\33\34($%c_`PLM"
+  "njkokla]^]YZWSTLHISOPZVWMIJ\202YUV\1XTU\202WST\1XTU\202YUVZPLMKGHHDE"
+  "MIJWST^Z[]YZYUVUQRSOPQMNOKLNJKOKLPLMQMNIEF_[\\tpq|xynjkLHI>:;JFGd`aR"
+  "NOGCDHDED at A\77;<MIJeabwstqmniefQMN845B>\77a]^qmnNJKWST^Z[_[\\^Z[`\\]"
+  "_[\\]YZa]^ZVWWSTZVWVRSC\77@)%&\30\24\25;78HDE<89+'(401FBCSOP]YZ\204\200"
+  "\201fbcSOPMIJHDENJKVRSSOPA=>RNOYUV\5\1\2*&'`\\]RNOa]^\216\212\213^Z["
+  "OKLWSTPLMRNOZVWPLMWSTVRS\204UQR\3VRSWSTMIJ\202KGH\1OKL\202TPQ\177OKL"
+  "KEIG=FE<AD at 7LLBRTSWZi<AaX]\205^g\216]k\222^q\231^y\246\\|\265X\200\276"
+  "V\204\302U\210\311L\207\313G\207\316H\213\317M\227\330S\241\341P\244"
+  "\342G\240\334=\232\327/\217\314*\216\314$\213\315\"\213\317\"\212\323"
+  "\40\212\324\37\211\325\36\211\333\34\205\340!\213\343)\222\343)\225\340"
+  "(\232\3417\243\344=\230\317=|\2457Sh%(1\24\12\13&\30\30!\34\40\31\31"
+  "\33\32\34\31\35\37\34!!!$\"#%#$'%&)'(,*+0./3121/0\77=>QOP][\\VTUA\77"
+  "@978A\77 at YUVKGHC\77 at D@A@<==9:LHId`avrsplmhdeQMN845B>\77a]^plmNJKWST^"
+  "Z[_[\\^Z[`\\]_[\\]YZa]^ZVWWSTZVWVRSC\77@)%&\30\24\25;78HDE<89+'(401F"
+  "BCSOP]YZ\204\200\201fbcSOPMIJHDENJKVRSSOPA=>RNOYUV\5\1\2*&'`\\]RNOa]"
+  "^\216\212\213^Z[OKLWSTPLM\5RNOZVWPLMWSTVRS\204UQR\3VRSWSTMIJ\202KGH\1"
+  "OKL\202TPQ\2OKLJFG\204UQR\4TPQSOPQMNPLM\202]YZ\37d`a\\XYC\77@;78MIJ\\"
+  "XYyuv[WXEABGCDKGHJFGWSTlhisopa]^LHI1-.\40\34\35""3/0RNO\\XY/+,512;78"
+  "C\77 at RNO`\\]a]^YUVPLM\202NJK\5MIJ@<=+'(\34\30\31\30\24\25\202\26\22\23"
+  "\40\36\32\33>:;`\\]a]^ZVWb^_XTU_[\\iefUQR)%&\36\32\33\77;<]YZYUV956\34"
+  "\30\31\36\32\33\\XYuqrwst]YZ\221\215\216VRSHDEWSTPLMSOP^Z[TPQPLMOKL\204"
+  "NJK\3OKLPLMMIJ\202NJK^PLMQMNOKLJFGHBFD8DF;AJC;QOCVVTUXaGKfFJmOXyQ`\201"
+  "Sg\214Rm\230Or\250Px\266N~\276L\201\303L\211\314D\207\313B\207\310D\216"
+  "\313J\231\324L\241\330H\242\327@\237\3255\230\3171\230\322/\231\325-"
+  "\231\331.\231\335-\231\341,\230\343+\226\350.\227\362+\224\357-\226\351"
+  ",\230\343+\234\3424\236\334+\205\271\32X}-FZ\30\27\35\33\15\15\"\22\22"
+  "!\33\35\30\30\32\26\32\31\33\40\34\40\40\40#!\"&$%(&'*()-+,0./201;9:"
+  "><=HFGIGH:890./:89HFGoklUQRB>\77C\77 at GCDIEFWSTjfgqmn`\\]KGH1-.\40\34"
+  "\35""3/0RNO\\XY/+,512;78C\77 at RNO`\\]a]^YUVPLM\202NJK\5MIJ@<=+'(\34\30"
+  "\31\30\24\25\202\26\22\23\40\36\32\33>:;`\\]a]^ZVWb^_XTU_[\\iefUQR)%"
+  "&\36\32\33\77;<]YZYUV956\34\30\31\36\32\33\\XYuqrwst]YZ\221\215\216V"
+  "RSHDEWSTPLMSOP^Z[TPQPLMOKL\204NJK\3OKLPLMMIJ\202NJK\10PLMQMNOKLJFGGC"
+  "DUQRXTU\\XY\202_[\\\17]YZZVWWSTgcdQMNLHIEAB3/0;78MIJHDEjfgA=>\"\36\37"
+  "$\40!\202-)*.512C\77@:67845@<=FBCJFGXTU[WXKGH:67401-)*1-.FBC[WX\\XYP"
+  "LMNJKMIJD at A+'(\17\13\14\14\10\11""1-.[WXd`ahdeYUVQMNfbcrno`\\]KGH2./"
+  "\23\17\20\7\3\4\24\20\21#\37\40-)*%!\"\17\13\14\30\24\25-)**&'`\\]\202"
+  "_[\\\12\251\245\246\225\221\222\201}~]YZ[WX]YZHDENJK[WXGCD\202OKL\204"
+  "NJK\202OKL|NJKOKLQMNRNOQMNPLMOKLPJNF<EI at EPIAQOCSRNMLRUVj15NCJdGUpJ_~"
+  "Gc\212Gh\233Iq\254Hy\264E{\271A\201\276<\200\2758\200\2727\204\274;\214"
+  "\303\77\224\312<\227\3147\226\3140\225\313-\226\317+\227\325+\233\333"
+  "-\234\341-\235\345,\235\351)\234\355.\241\374,\235\371/\232\354(\220"
+  "\327$\210\3062\214\3008\177\2511`|!3A\25\24\31&\34\33\33\17\17\31\23"
+  "\25\30\30\30\34\36\33\35\37\34\36\36\36#!\"(&',*+/-.1/0312423B at A6455"
+  "34201&$%)'(<:;FDE`\\]<89\40\34\35!\35\36*&'-)*512B>\77""845734\77;<F"
+  "BCJFGXTU[WXKGH:67401-)*1-.FBC[WX\\XYPLMNJKMIJD at A+'(\17\13\14\14\10\11"
+  "1-.[WXd`ahdeYUVQMNfbcrno`\\]KGH2./\23\17\20\7\3\4\24\20\21#\37\40-)*"
+  "%!\"\17\13\14\30\24\25-)**&'`\\]\202_[\\\12\251\245\246\225\221\222\201"
+  "}~]YZ[WX]YZHDENJK[WXGCD\202OKL\204NJK\202OKL\6NJKOKLQMNRNOQMNPLM\202"
+  "OKL\26D at Ac_`iefVRSPLMVRSa]^okl[WXHDEEAB.*+$\40!956C\77 at JFGLHI1-.\3\0"
+  "\0\32\26\27@<=\77;<\202OKL\32=9:LHIUQR^Z[gcd`\\]^Z[lhi_[\\QMNc_`MIJE"
+  "ABZVWKGHIEF2./\"\36\37\12\6\7\7\3\4""0,-eabtpqd`anjkjfg\202kgh\1]YZ\202"
+  "JFG\202WST\37OKLC\77 at D@AXTUkghjfg]YZZVWYUV`\\]^Z[eab\214\210\211\226"
+  "\222\223oklb^_^Z[WSTPLMMIJOKLTPQXTUOKLRNONJKPLMWSTNJKGCDPLM\202YUVhX"
+  "TUZVW^Z[_[\\VRSLHIB<>NHHTOKQLHRMJYUVVSZLLX8>N\77J^9Jf=Wz at c\215Bl\236"
+  ";i\235 at w\255>\200\2624~\2552~\2579\207\270=\217\3019\216\304-\210\277"
+  "$\203\275\31}\271\37\211\307(\230\332+\235\343(\236\346*\244\355-\250"
+  "\365#\244\365\36\243\376(\251\377\33\214\3306\226\323A\216\274N\206\247"
+  "Bf~5KY\17\26\36\26\26\30\31\27\30\34\30\31\27\25\26\26\25\23\33\32\26"
+  "!\40\34\26\25\23(&'-+,&$%$\"#*()645A\77 at 8673120./\35\33\34\30\26\27-"
+  "+,867<:;C\77 at .*+\3\0\0\32\26\27;78845KGHPLM<89KGHUQR^Z[fbc`\\]^Z[lhi"
+  "_[\\QMNc_`MIJEABZVWKGHIEF2./\"\36\37\12\6\7\7\3\4""0,-eabtpqd`anjkjf"
+  "g\202kgh\1]YZ\202JFG\202WST\37OKLC\77 at D@AXTUkghjfg]YZZVWYUV`\\]^Z[ea"
+  "b\214\210\211\226\222\223oklb^_^Z[WSTPLMMIJOKLTPQXTUOKLRNONJKPLMWSTN"
+  "JKGCDPLM\202YUV\13XTUZVW^Z[_[\\VRSLHIc_`YUVJFGEABD at A\2026232LHIEAB;7"
+  "80,-\27\23\24+'(^Z[njkxtu\237\233\234\211\205\206SOPXTUuqrsopplmZVWt"
+  "pqsopiefhdernotpqyuv\211\205\206vrslhiokld`aOKL956'#$401.*+/+,EABeab"
+  "jfg_[\\hde\202~\177zvw\201}~\212\206\207\204\200\201hdeNJKRNOgcdhde\203"
+  "jfg\7qmnuqrlhi_[\\njkgcdfbc\202`\\]\25yuv~z{_[\\[WXZVWYUVXTUUQRPLMKG"
+  "HGCD[WXc_`]YZWST\\XY[WXYUV`\\]TPQQMN\202MIJLSOPYUV[WXYUVXTSWSRTNNOJG"
+  "RJHRLLLFHA\77DACO6\77P0 at Y,Ec>^\2043Z\2055_\2177k\2320o\2321x\242:\203"
+  "\260=\211\2727\207\272,\201\270$~\272!\177\277+\216\322\26~\305\22~\307"
+  "%\225\3373\247\362.\244\356#\233\347\35\233\350\24\232\357\33\232\353"
+  "6\241\345@\223\307M\205\250!DZ\40""0=\16\23\31\17\20\24\14\14\16\14\15"
+  "\17\25\26\30\35\37\36\40\40\36\37\34\27\33\30\23$#!\40\36\37\33\31\32"
+  "\34\32\33\37\35\36\33\31\32\35\33\34(&'&$%%#$\40\36\37\22\20\21#!\"J"
+  "HI\\Z[cab\216\212\213{wxHDERNOrnosopoklZVW\202rno\37hdegcdrnotpqyuv\211"
+  "\205\206vrslhiokld`aOKL956'#$401.*+/+,EABeabjfg_[\\hde\202~\177zvw\201"
+  "}~\212\206\207\204\200\201hdeNJKRNOgcdhde\203jfg\7qmnuqrlhi_[\\njkgc"
+  "dfbc\202`\\]\25yuv~z{_[\\[WXZVWYUVXTUUQRPLMKGHGCD[WXc_`]YZWST\\XY[WX"
+  "YUV`\\]TPQQMN\202MIJ\10SOPYUV[WXYUV956JFG=9:\35\31\32\202\17\13\14G\23"
+  "\17\20\33\27\30\6\2\3""1-.MIJEABfbc\222\216\217\225\221\222\242\236\237"
+  "njkkghD at A<89UQRfbcnjk`\\]njkplmlhisop\201}~}yzsopwstTPQ]YZHDEIEFUQRH"
+  "DEGCDPLMQMNPLMVRSd`asop\201}~\222\216\217\237\233\234\243\237\240\211"
+  "\205\206vrs{wx\203\177\200}yznjkd`a\202~\177\210\204\205\211\205\206"
+  "\200|}uqrief\\XYRNOlhid`afbcjfgmijyuvzvwfbc`\\][WXVRSSOPTPQ\202VRSQU"
+  "QRA=>B>\77OKLlhivrsYUVJFG\\XYWSTRNOMIJKGHLHIOKLQMNSOP[YZUQPRLLWQQ\\T"
+  "RTNNJDF@>CPPZEL\\)8M+@['Df4W\177-T\1775a\216-b\2144o\231>|\253>\201\265"
+  "0{\264\"s\262\35t\271\37{\304!\203\316\"\207\325!\206\324!\210\325%\214"
+  "\327'\216\331*\222\3331\234\344,\234\3467\242\346E\236\326M\220\273&"
+  "Rm\10\"1\4\16\27\4\5\11\12\10\13\5\3\6\2\2\4\10\11\13\17\20\22\16\20"
+  "\17\7\10\3\1\0\0\22\21\17\34\32\33\31\27\30\14\12\13\10\6\7\11\7\10\14"
+  "\12\13\21\17\20\10\6\7!\37\40""1/0201NLMsqr}{|\205\203\204\202`\\];="
+  "9:845SOPeablhi]YZmijoklkghrno\200|}|xysopwstTPQ]YZHDEIEFUQRHDEGCDPLM"
+  "QMNPLMVRSd`asop\201}~\222\216\217\237\233\234\243\237\240\211\205\206"
+  "vrs{wx\203\177\200}yznjkd`a\202~\177\210\204\205\211\205\206\200|}uq"
+  "rief\\XYRNOlhid`afbcjfgmijyuvzvwfbc`\\][WXVRSSOPTPQ\202VRS\23UQRA=>B"
+  ">\77OKLlhivrsYUVJFG\\XYWSTRNOMIJKGHLHIOKLQMNSOPZVW<89\202\17\13\14IO"
+  "KL\213\207\210\226\222\223\215\211\212mijiefTPQOKL\214\210\211\247\243"
+  "\244uqr_[\\QMNJFG401A=>xtu\242\236\237\253\247\250\243\237\240\240\234"
+  "\235\242\236\237\235\231\232\233\227\230\230\224\225}yz_[\\WSTa]^\203"
+  "\177\200PLM956SOPa]^tpqplmd`aeablhi\200|}\227\223\224\236\232\233\212"
+  "\206\207sop\\XYYUV[WXfbcrno\177{|\223\217\220\244\240\241\207\203\204"
+  "\206\202\203\201}~uqrhde_[\\ZVWXTUc_`[WX_[\\mijwstyuvsopjfg\\XYWSTQM"
+  "NOKLPLM\202QMN\12PLMhde]YZKGHIEFMIJC\77 at D@AWSTTPQ\202QMN\202TPQ9PLMN"
+  "JKOKLTRSPNOYUVjddrjhg_]\\VV[VZjiqX\\hKVh!1J-Dc#@b6V|+R{2e\2202l\2326"
+  "t\2474w\256+s\256\"p\262\40t\274\"z\304\33x\305&\206\323)\210\330'\210"
+  "\327/\217\3341\221\335+\213\325)\210\3148\225\322=\220\304H\213\266."
+  "a\200\22""1E\14\32##'*\37\35\36#\37\40\37\35\36\34\34\36\26\32\35\22"
+  "\26\27\15\21\22\17\21\16\22\22\20\40\36\37\26\24\25\3\1\2\4\2\3#!\"B"
+  "@A\202MKL\10A\77 at B@A<:;\77=>ecdywxa_`SQR\202IEF;845C\77 at rno\231\225\226"
+  "\246\242\243\242\236\237\236\232\233\241\235\236\234\230\231\232\226"
+  "\227\227\223\224}yz^Z[WSTa]^\203\177\200PLM956SOPa]^tpqplmd`aeablhi\200"
+  "|}\227\223\224\236\232\233\212\206\207sop\\XYYUV[WXfbcrno\177{|\223\217"
+  "\220\244\240\241\207\203\204\206\202\203\201}~uqrhde_[\\ZVWXTUc_`[WX"
+  "_[\\mijwstyuvsopjfg\\XYWSTQMNOKLPLM\202QMN\12PLMhde]YZKGHIEFMIJC\77@"
+  "D at AWSTTPQ\202QMN\202TPQ=PLMNJKOKLWST512;78\202~\177\270\264\265\235\231"
+  "\232sopqmnsop\207\203\204\215\211\212\200|}\206\202\203njkEABXTU%!\""
+  "\31\25\26\35\31\32GCD\214\210\211\250\244\245\213\207\210sopZVW]YZYU"
+  "V[WXd`a`\\]]YZhderno\216\212\213WSTFBCkgh\177{|\226\222\223\223\217\220"
+  "\206\202\203{wx\214\210\211\253\247\250\236\232\233kghRNO\\XYc_`b^_`"
+  "\\]ZVWSOPPLMXTUd`anjkief\202d`a\3gcdkghplm\202tpq\11eabYUV^Z[gcdb^_W"
+  "STVRSkghlhi\202mij\15jfgc_`[WXVRSGCDhdemij^Z[b^_d`aMIJ3/0SOP\202NJK\1"
+  "VRS\202\\XY\37^Z[b^_[Y\\[YZeabrlltljkcalcdsmonkrggqQWeCN`*:S+@[,Ec,O"
+  "u-e\226*m\244/t\255/u\260)p\256#n\257&u\270*}\303-\201\312'\177\311%"
+  "\177\313,\210\3250\215\333\202*\212\327\33""8\217\324H\216\277L\204\247"
+  "6b}4Sg\10\31#)-0'#\"'\"\37&\40\40&\"#\"#%\35!$\27\33\36\25\31\32\33\37"
+  "\36%'&\37\37\37\22\20\21\27\25\26;9:USTKIJ><=CABFDETRS\202^\\].ecdYW"
+  "X@>\77ECD\35\31\32\26\22\23\34\30\31D at A\204\200\201\236\232\233\206\202"
+  "\203tpqYUV\\XYXTUZVWc_`_[\\]YZhderno\216\212\213WSTFBCkgh\177{|\226\222"
+  "\223\223\217\220\206\202\203{wx\214\210\211\253\247\250\236\232\233k"
+  "ghRNO\\XYc_`b^_`\\]ZVWSOPPLMXTUd`anjkief\202d`a\3gcdkghplm\202tpq\11"
+  "eabYUV^Z[gcdb^_WSTVRSkghlhi\202mij\15jfgc_`[WXVRSGCDhdemij^Z[b^_d`aM"
+  "IJ3/0SOP\202NJK\1VRS\202\\XY\32^Z[b^_734B>\77ZVWxtuuqrPLMOKLuqrSOPXT"
+  "UeabhdelhiNJK\40\34\35*&'\21\15\16""1-.gcd\206\202\203\230\224\225\206"
+  "\202\203WSTOKL\202b^_\37XTUSOPUQRMIJIEFUQRMIJ401\24\20\21A=>\216\212"
+  "\213\243\237\240\231\225\226\217\213\214\214\210\211\202~\177{wxrno]"
+  "YZIEFOKLb^_OKLIEFHDEQMN^Z[b^_ZVWPLMXTU\202RNO\11[WXgcdmijplmsop\206\202"
+  "\203qmnRNOJFG\202XTU\17NJKRNOc_`a]^[WXTPQNJKPLMWST^Z[d`a_[\\VRSSOPMI"
+  "J\202956QSOPjfgZVWOKLSOPZVW]YZb^_hfgdbebbda_`_[\\WQQVNL_VWjdfc^bKJP["
+  "^gJP^OZl'6K;Kd5Rp&Z\202(h\2266u\2506y\256+r\252#n\250'r\263.}\277,|\301"
+  "+~\304/\202\310-\200\306({\2770\203\3056\207\3115|\264Ew\232*Mc-GV\21"
+  "\37(\40$'\26\22\21%\35\32\33\21\17\26\21\16\24\20\21\20\21\23\21\25\30"
+  "\22\27\32\22\30\30\26\32\31\33\35\34\21\21\21\27\25\26#!\"312534)'(."
+  ",-ECD534:89GEFMKLNLM978\37\35\36#!\"\20\14\15,()]YZ}yz\222\216\217\203"
+  "\177\200TPQJFG\202a]^\37WSTRNOTPQMIJIEFUQRMIJ401\24\20\21A=>\216\212"
+  "\213\243\237\240\231\225\226\217\213\214\214\210\211\202~\177{wxrno]"
+  "YZIEFOKLb^_OKLIEFHDEQMN^Z[b^_ZVWPLMXTU\202RNO\11[WXgcdmijplmsop\206\202"
+  "\203qmnRNOJFG\202XTU\17NJKRNOc_`a]^[WXTPQNJKPLMWST^Z[d`a_[\\VRSSOPMI"
+  "J\202956USOPjfgZVWOKLSOPZVW]YZb^_jfgwst\210\204\205\203\177\200sopok"
+  "ld`aKGH;78UQRVRS[WX734\21\15\16\10\4\5\27\23\24B>\77-)*lhi\261\255\256"
+  "\243\237\240\201}~hdeMIJ_[\\JFGOKLPLMYUVfbc_[\\RNOTPQOKL+'(3/0eab\225"
+  "\221\222\223\217\220hdeXTUVRSa]^\\XYJFGMIJ^Z[\\XYIEFLHI]YZiefb^_QMNH"
+  "DEMIJWSTTPQMIJKGHSOPYUVZVW]YZb^_uqrgcdFBCA=>^Z[fbc[WX\\XYqmnplmhdeYU"
+  "V\202LHI\17WSTc_`^Z[SOPTPQ\\XYA=>\12\6\7\14\10\11B>\77|xyd`aRNOUQR[W"
+  "X\202ZVW9][\\[Y\\\\\\^XVWOKLJDDMGGVNLYPQXRTJEIQPVUU_NR^;BR=FW4EW,Oe."
+  "\\t9j\212<t\2312r\236'n\242$q\251&v\263!r\261&v\2633\177\2714{\2615w"
+  "\247H\205\2618o\230\5""2S\27""3H\14\34)\11\23\34\5\11\14\17\13\12\37"
+  "\25\23\32\21\14\36\24\22\34\27\24\26\24\25\24\25\27\26\32\35\31\35\36"
+  "\32\36\37\35\37\36\36\40\35***5344230./312201)'(\"\40!\202645B978'%&"
+  "\17\15\16\7\5\6\23\21\22""0./-)*fbc\245\241\242\231\225\226}yzgcdJFG"
+  "XTUIEFNJKOKLYUVfbc_[\\RNOTPQOKL+'(3/0eab\225\221\222\223\217\220hdeX"
+  "TUVRSa]^\\XYJFGMIJ^Z[\\XYIEFLHI]YZiefb^_QMNHDEMIJWSTTPQMIJKGHSOPYUVZ"
+  "VW]YZb^_uqrgcdFBCA=>^Z[fbc[WX\\XYqmnplmhdeYUV\202LHI\17WSTc_`^Z[SOPT"
+  "PQ\\XYA=>\12\6\7\14\10\11B>\77|xyd`aRNOUQR[WX\202ZVW\30_[\\plmnjk]YZ"
+  "QMNRNOOKLQMN_[\\XTUKGHQMND at AHDEokl\210\204\205\231\225\226WST\200|}\237"
+  "\233\234mijOKLVRSHDE\202WST\31UQRNJKUQRd`a[WXHDEEABief{wx\271\265\266"
+  "\266\262\263\216\212\213rnoOKLUQRRNOLHIMIJVRSYUVUQRRNOTPQYUVRNO\202J"
+  "FG\1SOP\202\\XYTVRSSOPKGHGCDKGHMIJOKLYUVeabXTUTPQ<89\77;<fbcqmn^Z[WS"
+  "TD at APLMWSTKGH1-.\26\22\23\7\3\4\3\0\0-)*RNOPLM&\"#\20\14\15$\40!SOP~"
+  "z{tpq]YZPLMYUVc_`_[\\YUVWUVMKNUUWXVYRPQWQQ_YY`XVVNL_YYSMO\\W[A\77DHG"
+  "O99C<>J\31!,:NW5Q\\8Yh=fz at o\213:p\2221l\224,i\2258w\2435r\236E|\243@"
+  "r\225)Ur0Vm.Qe\21+:\25#,\40%+!\"&\27\23\24\30\20\16*\40\36\30\16\14\25"
+  "\15\12\26\22\21\24\22\23\23\24\26\202\22\26\27\7\24\26\25\32\34\31\""
+  "\"\40$\"#(&''%&%#$\202(&'\21,*+534867201756312756RPQpno\212\210\211K"
+  "GHuqr\224\220\221d`aIEFRNOFBC\202VRS\31TPQMIJTPQc_`[WXHDEEABief{wx\271"
+  "\265\266\266\262\263\216\212\213rnoOKLUQRRNOLHIMIJVRSYUVUQRRNOTPQYUV"
+  "RNO\202JFG\1SOP\202\\XY'VRSSOPKGHGCDKGHMIJOKLYUVeabXTUTPQ<89\77;<fbc"
+  "qmn^Z[WSTD at APLMWSTKGH1-.\26\22\23\7\3\4\3\0\0-)*RNOPLM&\"#\20\14\15$"
+  "\40!SOP~z{tpq]YZPLMYUVc_`_[\\\202YUV\210SOP\15TPQRNOVRSeabwst\200|}|"
+  "xytpq{wx\203\177\200uqrVRSLHI\202XTU\23HDETPQWSTMIJTPQeabUQRC\77 at PLM"
+  "`\\]]YZa]^]YZTPQZVW^Z[SOPWSTSOP\202OKL\10RNOSOPQMNOKLQMNRNOSOPTPQ\202"
+  "UQR\202TPQ\4[WXZVWXTUVRS\202UQR|WSTYUVNJKIEF\3\0\0MIJvrsWST\200|}UQR"
+  "[WX401\22\16\17\21\15\16$\40!734FBCQMN:671-.$\40!.*+PLMgcdvrs\210\204"
+  "\205\202~\177\\XYSOPeabfbcYUVSOPNLMKILUUW`^a`^__YY]WW^VT]USQIGOFGGAA"
+  "NHJOJN.,1\30\26\33#&+GSS=MMEWY`syg{\202J`k9O\\AXf=Tb9P^2HU)=H\37""1;"
+  "\27(0\22#+\23\40&\32\37#\35\36\"\36\34\37\36\32\33\35\27\27\34\24\22"
+  "\30\23\20\26\22\21\24\22\23\24\24\26\23\24\26\24\25\27\26\30\27\30\30"
+  "\26\33\32\26\34\33\27\36\35\33\40\36\37\"\40!%#$'%&+)*.,-1/0423645=;"
+  "<JHIXVWa_`cabb`ajfgwstoklTPQLHIXTUWSTGCDRNOUQRLHISOPeabUQRC\77 at QMN`\\"
+  "]]YZa]^]YZTPQZVW^Z[SOPWSTSOP\202OKL\10RNOSOPQMNOKLQMNRNOSOPTPQ\202UQ"
+  "R\202TPQ\4[WXZVWXTUVRS\202UQR\"WSTYUVNJKIEF\3\0\0MIJvrsWST\200|}UQR["
+  "WX401\22\16\17\21\15\16$\40!734FBCQMN:671-.$\40!.*+PLMgcdvrs\210\204"
+  "\205\202~\177\\XYSOPeabfbcYUVSOPPLM\211SOP!PLMNJKPLMTPQVRSTPQPLMVRS_"
+  "[\\[WXMIJLHIXTUZVWPLMUQRYUVMIJIEFLHI:67/+,A=>_[\\VRSZVW^Z[YUV\\XY_[\\"
+  "VRS\\XYYUV\202UQR\6VRSUQRRNOOKLWSTXTU\202YUV\5WSTTPQPLMMIJHDE\202FBC"
+  "\20IEFOKLRNOSOPRNO\11\5\6%!\"845gcdmijTPQeabhde^Z[[WXYUV\202ZVW\32\\"
+  "XYfbcrnowstnjkZVWSOP^Z[b^_hdextu}yzc_`_[\\jfggcda]^eabgcd[Y\\ZZ\\[Y\\"
+  "[WXUQROIIOFG\202QIG\37SKILCDI at A>88\"\34\36\33\25\27""40/\77@;;>7AC at R"
+  "TQOST489$(++/2'*/&).%&*!\"$\36\36\36\33\33\31\31\30\26\27\27\25\33\33"
+  "\33\32\32\34\32\30\33\31\27\30\31\25\26\30\24\25\25\23\24\24\22\23\203"
+  "\25\25\27/\26\26\26\30\30\26\33\32\26\36\33\26\37\33\30\37\36\34!\37"
+  "\40#!\"&$%(&'+)*/-.1/0312423867=;<CABGEFIGHJHILHIWSTVRSIEFHDETPQWSTM"
+  "IJSOPWSTLHIIEFLHI:67/+,A=>_[\\VRSZVW^Z[YUV\\XY_[\\VRS\\XYYUV\202UQR\6"
+  "VRSUQRRNOOKLWSTXTU\202YUV\5WSTTPQPLMMIJHDE\202FBC\20IEFOKLRNOSOPRNO\11"
+  "\5\6%!\"845gcdmijTPQeabhde^Z[[WXYUV\202ZVW\23\\XYfbcrnowstnjkZVWSOP^"
+  "Z[b^_hdextu}yzc_`_[\\jfggcda]^eabgcd\210SOP\17\\XYZVWWSTSOPRNOSOPWST"
+  "ZVWLHIQMNSOPQMNRNOUQRTPQ\202PLM\36WSTRNOLHIJFGA=>EAB[WXhdeSOPQMNXTUS"
+  "OPMIJKGHD at AGCDHDEJFGOKLTPQVRSUQRTPQSOPUQRXTUYUVXTUVRSSOP\202QMN\31WS"
+  "T`\\]fbc`\\]MIJ2./\37\33\34\22\16\17!\35\36`\\]oklqmnplmRNO`\\]a]^pl"
+  "m{wxxtumijeab`\\]]YZ\\XY_[\\\202ZVW\6b^_a]^d`atpqokld`a\202fbc(WSTSO"
+  "PXTUWSTZX[PNQLHIKGHGCDC\77>JDDVPPOIIMGGD<::201)'!\30\31*!\"KA\77bUMd"
+  "UN`UQ\\TRLJO33;$&2(,8\40$0!#/%\"+'!%)\35\35)\32\25)\30\20%\30\20\34\30"
+  "\27\27\30\32\27\27\31\25\24\31\202\24\25\31\202\24\25\27\33\25\26\30"
+  "\26\26\30\27\27\27\31\30\26\32\31\27\36\32\27\37\34\27\40\34\31\40\37"
+  "\35\"\40!%#$'%&)'(,*+0./201867:89<:;=;<\77=>B at AGEFJHIGCDLHINJK\202LH"
+  "I\2PLMQMN\202NJK\36UQRQMNLHIJFGB>\77EAB[WXhdeSOPQMNXTUSOPMIJKGHD at AGC"
+  "DHDEJFGOKLTPQVRSUQRTPQSOPUQRXTUYUVXTUVRSSOP\202QMN\31WST`\\]fbc`\\]M"
+  "IJ2./\37\33\34\22\16\17!\35\36`\\]oklqmnplmRNO`\\]a]^plm{wxxtumijeab"
+  "`\\]]YZ\\XY_[\\\202ZVW\6b^_a]^d`atpqokld`a\202fbc\4WSTSOPXTUWST\211S"
+  "OP\21QMNOKLNJKPLMTPQXTU[WXUQRSOPTPQXTUWSTRNOOKLQMNMIJSOP\202VRS\25WS"
+  "T[WXgcdwstplmSOPKGHUQRPLMFBCD at AA=>\77;<B>\77GCDNJKSOPVRSWSTVRSTPQ\202"
+  "SOP\202RNO\1QMN\202PLM\16HDEEABB>\77D at ANJK^Z[qmn}yz\242\236\237\223\217"
+  "\220\257\253\254\231\225\226\225\221\222\234\230\231\202lhi\24UQR]YZ"
+  "b^_eabplmzvwrnoa]^VRS`\\]d`aiefokld`aZVWa]^c_`d`akghgcd\202YUV\10]YZ"
+  "TPQIDHKFJTPQVRS>:;\30\24\25\202\3\0\0\35\23\15\15\25\17\17\26\20\20%"
+  "\35\33""5-+=53LDBe[Y|nm}onocc[RWJEL97B/.<.0=*)9((4'$/(!()\35\37(\32\31"
+  "(\26\22#\25\22\36\32\31\31\32\34\27\30\32\24\30\33\23\26\33\202\24\30"
+  "\33\34\25\31\32\26\27\31\27\27\27\31\30\26\32\31\27\35\31\26\37\33\30"
+  "\40\34\31\37\36\32!\37\40#!\"&$%(&'*()-+,0./312756867:89<:;\77=>CABH"
+  "FGKIJOKLMIJOKL\202RNO\202NJK\32RNOLHIRNOUQRVRSXTU[WXgcdxtuplmSOPKGHU"
+  "QRPLMFBCD at AA=>\77;<B>\77GCDNJKSOPVRSWSTVRSTPQ\202SOP\202RNO\1QMN\202"
+  "PLM\16HDEEABB>\77D at ANJK^Z[qmn}yz\242\236\237\223\217\220\257\253\254"
+  "\231\225\226\225\221\222\234\230\231\202lhi\24UQR]YZb^_eabplmzvwrnoa"
+  "]^VRS`\\]d`aiefokld`aZVWa]^c_`d`akghgcd\202YUV\2]YZTPQ\210SOP\20VRSR"
+  "NONJKOKLRNOSOPPLMLHIQMNLHIMIJSOPUQRQMNSOPYUV\202QMN\32TPQVRSWST_[\\f"
+  "bceabgcdLHIHDEVRSUQRRNOVRSXTUUQRWSTYUVZVWYUVWSTTPQSOPXTUUQROKLJFG\202"
+  "HDE\4IEFKGHOKLXTU\202a]^\2XTUOKL\202LHI\21\\XYeabvrslhikgh~z{\206\202"
+  "\203\226\222\223\257\253\254\251\245\246\231\225\226\213\207\210\211"
+  "\205\206\210\204\205vrs_[\\`\\]\202fbc)kghsopgcdXTU[WXKGHIEFNJKMIJIE"
+  "FUQR^Z[TPQc_`TPQ@<=0,-$\40!*&'KGHkij`\\]^Z[]YZa[[c]][UUTOLTPQkkskmy["
+  "[gAAM53 at 30;/,7-*3.(4)&/%\"-#\40)\202\40\37'\20\36\35%\34\35\"\35\35\37"
+  "\33\35\34\31\32\34\26\32\33\25\31\34\24\31\34\26\32\35\26\32\33\27\31"
+  "\30\30\30\26\32\31\27\35\31\26\35\34\32\36\35\33\202\40\36\37\10#!\""
+  "$\"#'%&)'(+)*.,-1/0312\202:89\3;9:><=B at A\203ECD$IEFEABHDEOKLRNOOKLRN"
+  "OZVWQMNPLMTPQVRSXTU`\\]fbceabgcdLHIHDEVRSUQRRNOVRSXTUUQRWSTYUVZVWYUV"
+  "WSTTPQSOPXTUUQROKLJFG\202HDE\4IEFKGHOKLXTU\202a]^\2XTUOKL\202LHI\21\\"
+  "XYeabvrslhikgh~z{\206\202\203\226\222\223\257\253\254\251\245\246\231"
+  "\225\226\213\207\210\211\205\206\210\204\205vrs_[\\`\\]\202fbc\15kgh"
+  "sopgcdXTU[WXKGHIEFNJKMIJIEFUQR^Z[TPQ\210SOP\4XTUUQRSOPVRS\202[WX\21V"
+  "RSPLMUQRQMNOKLQMNRNOQMNTPQYUVTPQNJKQMNTPQSOP^Z[a]^\202PLM\3A=>EABRNO"
+  "\202QMN\202XTU\6YUV[WX\\XY[WXWSTTPQ\202RNO\10MIJKGHHDEGCDIEFMIJSOPWS"
+  "T\202VRS\20RNOJFGFBCMIJ^Z[lhiVRSc_`a]^ZVWOKLMIJ]YZc_`^Z[d`a\202hdeQi"
+  "efnjkplmnjk]YZ_[\\ZVW_[\\jfggcdc_`lhiTPQGCD\77;<8452./<89EAB=9:;57<6"
+  "8935/+,($%*();9<JHKLJMMKLPNOWST[WXb\\\\hbbigjX\\e\\doQU`8;D219529506"
+  "3-14.2/*.)',%$*\"%,!%.\36%-\34#)\35\37\36\35\35\33\33\35\34\27\33\34"
+  "\26\32\33\25\33\33\26\32\33\30\32\31\32\32\30\33\32\26\36\32\27\37\33"
+  "\30\36\35\33\37\37\37\40\40\"!!#%#$&$%)'(+)*-+,/-.201534;9:<:;><=CAB"
+  "GEF\202IGH\2HFGNJK\202LHI\14OKLPLMOKLRNOXTUTPQNJKRNOUQRTPQ_[\\a]^\202"
+  "PLM\3A=>EABRNO\202QMN\202XTU\6YUV[WX\\XY[WXWSTTPQ\202RNO\10MIJKGHHDE"
+  "GCDIEFMIJSOPWST\202VRS\20RNOJFGFBCMIJ^Z[lhiVRSc_`a]^ZVWOKLMIJ]YZc_`^"
+  "Z[d`a\202hde\24iefnjkplmnjk]YZ_[\\ZVW_[\\jfggcdc_`lhiTPQGCD\77;<8452"
+  "./<89EAB=9:\210SOP\5JFGKGHMIJPLMQMN\202RNO\1QMN\202YUV\3WSTSOPQMN\202"
+  "SOP(QMNTPQLHISOPTPQOKL^Z[c_`LHI401623GCDSOPOKLRNOWSTRNOUQRWSTYUVWSTS"
+  "OPPLMQMNTPQGCDHDEJFGNJKRNOWST\\XY^Z[GCDMIJWST`\\]c_`a]^[WX\202VRS\5N"
+  "JKMIJOKLSOPUQR\202PLM\13TPQYUV`\\]c_``\\]\\XYb^_lhiuqrzvwuqr\202qmn&"
+  "fbc`\\]lhiwstgcda]^[WXLHIGCDFBC\77;</))4..4.01-.A<@[Y\\nlqqpuedi``bZ"
+  "Z\\TRSPNOWSR]YXZYWCDFSTVPRQ>>>875;768304/,50,0-()(#\202%&!\7\"$!\35\""
+  "\36\32\37\33\37\36\31!\36\31\35\36\31\33\35\32\202\30\34\33\33\31\33"
+  "\32\31\33\30\34\35\30\36\35\30\40\35\30!\35\32!\37\40!!#\40#(#$(&&()"
+  "'(+)*-+,/-.1/0423756534867<:;@>\77CABECDGEFIGHSOP\202UQR,QMNOKLPLMQM"
+  "NPLMTPQMIJTPQUQRPLM^Z[c_`LHI401623GCDSOPOKLRNOWSTRNOUQRWSTYUVWSTSOPP"
+  "LMQMNTPQGCDHDEJFGNJKRNOWST\\XY^Z[GCDMIJWST`\\]c_`a]^[WX\202VRS\5NJKM"
+  "IJOKLSOPUQR\202PLM\13TPQYUV`\\]c_``\\]\\XYb^_lhiuqrzvwuqr\202qmn\13f"
+  "bc`\\]lhiwstgcda]^[WXLHIGCDFBC\77;<\210SOP\15UQRYUV[WXXTUQMNOKLRNOWS"
+  "TKGHRNOSOPNJKOKL\202UQR,OKLVRSOKLUQRRNOEABRNOZVWB>\77\36\32\33/+,MIJ"
+  "]YZ\\XYd`alhid`afbcgcdd`a^Z[UQRPLMOKLQMNVRSXTUYUVZVWYUVVRSSOPQMNa]^X"
+  "TUPLMQMNYUV^Z[[WXUQRa]^NJK\\XY\202TPQ\15ZVWIEF[WXWSTMIJKGHTPQXTUVRS["
+  "WXeaba]^qmn\202wst,sopb^_[WXhdejfgc_`njkwsthdeZVWTPQMIJE\77\77OIIPJL"
+  "OKLa\\`usvqorZZ\\dbg]]_ZX[VTWRPQPNOIED653431KLGSRNED@=<8=9685030+41*"
+  "1.',,$++#*+%()#\"%\36\36!\32\202\"\37\32\32\40\37\33\36\36\34\35\37\36"
+  "\34\36\35\33\35\32\34\34\32\37\36\32\40\37\33\"\36\33!\40\34#!\"##%$"
+  "%)%&*((*+)*-+,/-.1/0312645867=;<A\77 at ECDFDE\202DBC5HFGLJKEABMIJOKLKG"
+  "HLHISOPUQRQMNWSTOKLVRSSOPFBCSOPZVWA=>\36\32\33/+,MIJ]YZ\\XYd`alhid`a"
+  "fbcgcdd`a^Z[UQRPLMOKLQMNVRSXTUYUVZVWYUVVRSSOPQMNa]^XTUPLMQMNYUV^Z[[W"
+  "XUQRa]^NJK\\XY\202TPQ\15ZVWIEF[WXWSTMIJKGHTPQXTUVRS[WXeaba]^qmn\202w"
+  "st\14sopb^_[WXhdejfgc_`njkwsthdeZVWTPQMIJ\230SOP\36TPQQMNPLMTPQVRSMI"
+  "J:67*&'734^Z[\177{|\200|}sopmijjfgfbc^Z[[WXVRSSOPTPQWST\\XY_[\\\\XY["
+  "WXYUVWSTVRSUQR\204TPQ\2VRSYUV\202\\XY\2ZVWWST\210SOP\202RNO\202QMN\15"
+  "RNOTPQWSTXTU`\\]c_`b^_eabfbcWSTRNOd`a_[\\\203fbc\1hde\202_[\\\13plmd"
+  "`a]YZZVW_[\\ieftpq\177{|\205\203\204\224\217\223\216\214\215\202\214"
+  "\210\211\24\207\203\204tpqWST\77=>OMN]][YYWCCA::8<;998654243121/..,,"
+  ",***())'''%%%#\202$#!\3#\"\40\"\40!!!!\202\40\40\40\1!\37\40\203\"!\37"
+  "\26#\"\40$\"#&$%&&('')*(),*+/-.1/0312534867:89=;<\77=>B at ADBCECDGEFHF"
+  "GJHINJK\202OKL\1PLM\202QMN\202RNO\1SOP\202PLM\33TPQVRSMIJ;78+'(734^Z"
+  "[\177{|\200|}sopmijjfgfbc^Z[[WXVRSSOPTPQWST\\XY_[\\\\XY[WXYUVWSTVRSU"
+  "QR\204TPQ\2VRSYUV\202\\XY\2ZVWWST\210SOP\202RNO\202QMN\15RNOTPQWSTXT"
+  "U`\\]c_`b^_eabfbcWSTRNOd`a_[\\\203fbc\1hde\202_[\\\1plm\230SOP\203QM"
+  "N\25SOPUQRXTUZVW[WXeabvrs}yzplmc_`a]^_[\\YUV\\XYYUVUQRPLMNJKOKLQMNRN"
+  "O\202TPQ\16UQRVRSWSTYUVZVW[WXUQRVRSXTU[WX\\XY[WXXTUVRS\210SOP\202RNO"
+  "\202QMN\12RNOTPQVRSXTUYUV_[\\YUVWSTa]^`\\]\202VRS\7hdenjkfbc_[\\a]^]"
+  "YZZVW\202c_`\11hdekghiefjfguqr\205\201\202\220\214\215\204\200\201|x"
+  "y\202uqr\10xtuyuvtpqnjkpnorrr```FFF\202<<<\15""999777555333000...,,,"
+  "+++)))''''%&&$%%#$\202$\"#\203#!\"\203$\"#\25%#$'%&(&')'(*(),*+.,-1/"
+  "0312534756:89<:;\77=>A\77 at CABECDFDEHFGJHIKIJ\203OKL\1PLM\202QMN\202R"
+  "NO\202PLM\26QMNSOPUQRXTUZVW[WXeabvrs}yzplmc_`a]^_[\\YUV\\XYYUVUQRPLM"
+  "NJKOKLQMNRNO\202TPQ\16UQRVRSWSTYUVZVW[WXUQRVRSXTU[WX\\XY[WXXTUVRS\210"
+  "SOP\202RNO\202QMN\12RNOTPQVRSXTUYUV_[\\YUVWSTa]^`\\]\202VRS\10hdenjk"
+  "fbc_[\\a]^]YZZVWc_`\230SOP\25QMNUQRWSTSOPOKLRNO]YZgcdjfgkghc_`VRSSOP"
+  "YUVXTUQMNYUVXTUUQRRNOQMN\203PLM\13SOPTPQUQRWSTYUVZVW\\XY]YZVRSXTU[WX"
+  "\202]YZ\3ZVWWSTTPQ\210SOP\204RNO\2SOPTPQ\202VRS\4QMNeabd`aXTU\202ZVW"
+  "\36SOPRNO\\XYkghhde`\\]gcdkghfbceabb^_c_`d`anjk\202~\177\222\216\217"
+  "\213\207\210yuviefa]^YUVVRS[WXd`alhiqmnomnighUSTA\77@\202=;<\15<:;=;"
+  "<8676453121/00.//-.-+,+)**())'((&'\203'%&\1&$%\204'%&\25(&'*()+)*,*+"
+  "-+,/-.1/0423645756978<:;><=@>\77B at AECDGEFHFGIGHKIJLJK\202OKL\202PLM\1"
+  "QMN\204RNO\24UQRWSTSOPOKLRNO]YZgcdjfgkghc_`VRSSOPYUVXTUQMNYUVXTUUQRR"
+  "NOQMN\203PLM\13SOPTPQUQRWSTYUVZVW\\XY]YZVRSXTU[WX\202]YZ\3ZVWWSTTPQ\210"
+  "SOP\204RNO\2SOPTPQ\202VRS\4QMNeabd`aXTU\202ZVW\12SOPRNO\\XYkghhde`\\"
+  "]gcdkghfbceab\230SOP\10OKLVRS[WXXTUQMNMIJPLMUQR\202RNO\6OKLLHIQMNXTU"
+  "VRSOKL\202VRS\4WSTYUVZVW[WX\202\\XY\1ZVW\202[WX\202ZVW\2YUVXTU\202WS"
+  "T\7ZVW]YZ^Z[\\XYXTUUQRTPQ\210SOP\204RNO\1SOP\202TPQ4UQRXTUa]^]YZ[WXb"
+  "^_^Z[RNOQMNJFGfbcmijgcdnjkuqrnjkiefjfgqmnwst\201}~\222\216\217\226\222"
+  "\223{wxXTUTPQRNOPLMMIJKGHMIJPLMRNOQOPNLMDBC><=A\77@@>\77=;<\77=>:898"
+  "676454233121/0/-..,--+,,*++)*\203*()\1)'(\204*()\25+)*-+,.,-/-.0./20"
+  "1312645867:89<:;><=@>\77B at ADBCFDEHFGIGHJHILJKMKL\203PLM\202QMN\203RN"
+  "O\10PLMVRS[WXXTUQMNMIJPLMUQR\202RNO\6OKLLHIQMNXTUVRSOKL\202VRS\4WSTY"
+  "UVZVW[WX\202\\XY\1ZVW\202[WX\202ZVW\2YUVXTU\202WST\7ZVW]YZ^Z[\\XYXTU"
+  "UQRTPQ\210SOP\204RNO\1SOP\202TPQ\21UQRXTUa]^]YZ[WXb^_^Z[RNOQMNJFGfbc"
+  "mijgcdnjkuqrnjkief\230SOP\3NJKRNOVRS\202YUV\23WSTUQRTPQPLMTPQUQRTPQU"
+  "QRVRSTPQPLMRNOTPQWSTZVW]YZ_[\\`\\]a]^\203^Z[\7]YZ[WXXTUUQRTPQWSTZVW\202"
+  "]YZ\2YUVUQR\202TPQ\210SOP\202RNO\206SOP\32gcdSOPC\77 at QMNeabYUVFBCHDE"
+  "NJKkghrnofbciefoklmijnjk\177{|\223\217\220\235\231\232\217\213\214yu"
+  "vhde[WXQMNOKLRNO\202UQR\6QMNMIJLHIKGHECDGEF\202FDE\14IGHCAB=;<><=<:;"
+  ":898676455344232011/0\202/-.\1.,-\202-+,\203,*+\203-+,\20.,-/-.1/020"
+  "1312423645867:89;9:=;<@>\77B at ACABECDGEF\202IGH\3JHILJKMKL\202PLM\203"
+  "QMN\203RNO\3OKLSOPWST\202YUV\23WSTTPQSOPPLMTPQUQRTPQUQRVRSTPQPLMRNOT"
+  "PQWSTZVW]YZ_[\\`\\]a]^\203^Z[\7]YZ[WXXTUUQRTPQWSTZVW\202]YZ\2YUVUQR\202"
+  "TPQ\210SOP\202RNO\206SOP\20gcdSOPC\77 at QMNeabYUVFBCHDENJKkghrnofbcief"
+  "oklmijnjk\230SOP\11XTUTPQPLMQMNTPQVRSUQRRNOTPQ\202VRS\13SOPQMNRNOVRS"
+  "YUVQMNRNOSOPUQRVRSWST\202XTU\2YUVZVW\203[WX\13YUVVRSUQRWSTZVW\\XYYUV"
+  "TPQRNOTPQWST\210SOP\2QMNRNO\204SOP\4RNOQMNfbcVRS\202HDE\21A=>($%)%&J"
+  "FG]YZplmoklfbclhiuqr}yz\210\204\205\215\211\212\213\207\210\200|}njk"
+  "ZVW\202OKL\6TPQQMNRNOTPQSOPQMN\202PLM\4QMNECDKIJJHI\202HFG\2CAB=;<\202"
+  "><=\7<:;:89867756645534312\202201\1""1/0\2020./\203/-.\2030./\20""1/"
+  "0201423534645756867;9:<:;><=\77=>B at ACABDBCFDEHFG\202JHI\3KIJMKLNLM\204"
+  "QMN\204RNO\11XTUTPQPLMQMNTPQVRSTPQRNOTPQ\202VRS\13SOPQMNRNOVRSYUVQMN"
+  "RNOSOPUQRVRSWST\202XTU\2YUVZVW\203[WX\13YUVVRSUQRWSTZVW\\XYYUVTPQRNO"
+  "TPQWST\210SOP\2QMNRNO\204SOP\4RNOQMNfbcVRS\202HDE\14A=>($%)%&JFG]YZp"
+  "lmoklfbclhiuqr}yz\210\204\205\230SOP\4[WXWSTQMNNJK\202OKL\3NJKMIJQMN"
+  "\204PLM\4QMNVRS\\XYSOP\204RNO\1SOP\202TPQ\3SOPUQRWST\202XTU\4VRSTPQR"
+  "NOVRS\202YUV\5UQROKLNJKTPQZVW\210SOP\3QMNRNOSOP\202TPQ\32SOPQMNPLMZV"
+  "WPLM<89.*+#\37\40\32\26\27""1-.]YZeabkghgcdjfgzvw\202~\177\205\201\202"
+  "\217\213\214\204\200\201gcdPLMOKLUQRSOPQMN\202SOP\4QMNOKLNJKMIJ\203N"
+  "JK\17GEFLJKIGHDBCFDEECDA\77@@>\77A\77@\77=>=;<;9::89978867\202645\2""5"
+  "34423\202312\203201\203312\4""423645756867\202978\6;9:=;<\77=>@>\77B"
+  "@ADBC\202FDE\3HFGJHIKIJ\202LJK\2NLMOMN\203QMN\205RNO\4[WXVRSQMNNJK\202"
+  "OKL\3NJKMIJQMN\204PLM\4QMNVRS\\XYSOP\204RNO\1SOP\202TPQ\3SOPUQRWST\202"
+  "XTU\4VRSTPQRNOVRS\202YUV\5UQROKLNJKTPQZVW\210SOP\3QMNRNOSOP\202TPQ\23"
+  "SOPQMNPLMZVWPLM<89.*+#\37\40\32\26\27""1-.]YZeabkghgcdjfgzvw\202~\177"
+  "\205\201\202\217\213\214\230SOP\3QMNRNOUQR\202VRS\4UQRTPQSOPWST\202T"
+  "PQ\202VRS\5SOPQMNRNOUQRTPQ\202SOP\24TPQVRSXTUZVWSOPTPQUQRVRSTPQQMNNJ"
+  "KLHIVRSXTUWSTRNOLHIMIJTPQ[WX\210SOP\3QMNRNOSOP\202TPQ*RNOQMNPLMVRS40"
+  "1\10\4\5\3\0\0*&'NJK`\\]okliefgcdb^_njk\202~\177~z{qmnrnoplm\\XYSOP["
+  "WXZVWMIJKGHVRSUQRSOPRNOSOPTPQSOPPLMMIJLJKQOPLJKECDIGHKIJFDE\202B at A\6"
+  "A\77@><==;<<:;;9::89\202867\2""756645\203534\1""423\204534\4""645867"
+  "978:89\202;9:\6=;<\77=>A\77 at B@ACABFDE\202GEF\7IGHKIJLJKMKLNLMOMNPNO\210"
+  "RNO\3PLMRNOTPQ\203VRS\3UQRTPQWST\202TPQ\202VRS\5SOPQMNRNOUQRTPQ\202S"
+  "OP\24TPQVRSXTUZVWSOPTPQUQRVRSTPQQMNNJKLHIVRSXTUWSTRNOLHIMIJTPQ[WX\210"
+  "SOP\3QMNRNOSOP\202TPQ\23RNOQMNPLMVRS401\10\4\5\3\0\0*&'NJK`\\]oklief"
+  "gcdb^_njk\202~\177~z{qmnrno\260SOP\20RNOSOPUQRTPQPLMNJKRNOYUVXTUVRSP"
+  "LMLHISOP`\\]b^_[WX\210SOP\204RNO\204QMN\7C\77 at B>\77""2./\\XYfbcc_`]Y"
+  "Z\202rno\14fbchdekgh\210\204\205rnomijplmd`aRNOPLMVRSTPQ\202VRS\1NJK"
+  "\204RNO\204QMN\16LJKKIJJHIIGHHFGGEFFDEECDCABB at AA\77@@>\77\77=>=;<\202"
+  "<:;\203:89\202978\203867\203978\5:89;9:<:;=;<><=\202@>\77\13A\77 at CAB"
+  "DBCECDFDEGEFJHIKIJLJKMKLNLM\203OMN\206RNO\232SOP\20RNOSOPUQRTPQPLMNJ"
+  "KRNOYUVXTUVRSPLMLHISOP`\\]b^_[WX\210SOP\204RNO\204QMN\7C\77 at B>\77""2"
+  "./\\XYfbcc_`]YZ\202rno\7fbchdekgh\210\204\205rnomijplm\260SOP\202WST"
+  "\202XTU\14UQRQMNPLMQMNUQRVRSTPQRNOXTUa]^_[\\WST\211SOP\204RNO\203QMN"
+  "\21b^_oklfbcyuvief^Z[YUVuqrb^__[\\gcdief\211\205\206yuvsopmij`\\]\202"
+  "QMN\1WST\202TPQ\2VRSOKL\203RNO\205QMN\1MKL\202LJK\2KIJIGH\202HFG\6GE"
+  "FECDDBCCABB at AA\77@\202\77=>\1><=\203<:;\203;9:\202:89\202;9:\202<:;\4"
+  "=;<><=\77=>@>\77\202B at A\13CABDBCFDEGEFHFGIGHJHIKIJLJKMKLNLM\203OMN\205"
+  "RNO\233SOP\202WST\202XTU\14UQRQMNPLMQMNUQRVRSTPQRNOXTUa]^_[\\WST\211"
+  "SOP\204RNO\203QMN\20b^_oklfbcyuvief^Z[YUVuqrb^__[\\gcdief\211\205\206"
+  "yuvsopmij\260SOP\20UQRWSTXTUWSTUQRRNOOKLNJKSOPVRSXTUYUV^Z[`\\][WXRNO"
+  "\212SOP\206RNO\30SOPeabb^_kgh[WXYUVMIJc_`gcdjfgnjkb^_~z{uqroklb^_ZVW"
+  "NJKRNOYUVSOPRNOUQRPLM\202RNO\207QMN\4PLMOKLNJKMIJ\202LHI\1KGH\202IEF"
+  "\4HDEGCDEABD at A\202C\77@\1@>\77\203\77=>\203><=\1=;<\204\77=>\13@>\77"
+  "A\77 at B@ACABDBCECDFDEGEFHFGIGHJHI\202KIJ\3LJKMKLNLM\204OMN\204RNO\234"
+  "SOP\20UQRWSTXTUWSTUQRRNOOKLNJKSOPVRSXTUYUV^Z[`\\][WXRNO\212SOP\206RN"
+  "O\20SOPeabb^_kgh[WXYUVMIJc_`gcdjfgnjkb^_~z{uqroklb^_\260SOP\4OKLVRSX"
+  "TUSOP\202MIJ\12QMNTPQUQRWSTYUV\\XY_[\\^Z[XTUQMN\215SOP\203RNO\6OKLWS"
+  "TRNO_[\\fbcwst\202VRS\20okltpqqmnZVWrnooklnjka]^VRSMIJSOPYUVRNOPLMTP"
+  "QQMN\203RNO\207QMN\1PLM\202OKL\1NJK\202MIJ\202KGH\6JFGIEFHDEGCDFBCEA"
+  "B\204B at A\203A\77@\1@>\77\204B at A\1CAB\202DBC\2ECDFDE\202GEF\2HFGJHI\202"
+  "KIJ\203LJK\2MKLNLM\204OMN\203RNO\235SOP\4OKLVRSXTUSOP\202MIJ\12QMNTP"
+  "QUQRWSTYUV\\XY_[\\^Z[XTUQMN\215SOP\203RNO\6OKLWSTRNO_[\\fbcwst\202VR"
+  "S\10okltpqqmnZVWrnooklnjka]^\260SOP\11RNO\\XY]YZPLMEABHDESOP[WXYUV\202"
+  "XTU\202[WX\3YUVVRSTPQ\220SOP\27[WXZVWWST^Z[hde|xyHDE\77;<c_`kghokl\\"
+  "XYsopmijrnolhiVRSMIJSOPYUVQMNPLMUQR\207RNO\204QMN\202PLM\1OKL\202NJK"
+  "\1MIJ\202LHI\3KGHJFGIEF\202HDE\1GCD\202ECD\202DBC\204CAB\204DBC\202E"
+  "CD\1FDE\202GEF\202HFG\3IGHJHIKIJ\202LJK\202MKL\1NLM\202OMN\203PNO\1R"
+  "NO\206SOP\1TPQ\230SOP\11RNO\\XY]YZPLMEABHDESOP[WXYUV\202XTU\202[WX\3"
+  "YUVVRSTPQ\220SOP\20[WXZVWWST^Z[hde|xyHDE\77;<c_`kghokl\\XYsopmijrnol"
+  "hi\260SOP\7ZVWa]^]YZMIJC\77 at JFGUQR\202ZVW\202VRS\202YUV\3UQRTPQWST\213"
+  "SOP\207TPQ\22\\XYWSTQMN^Z[*&'1-._[\\fbcrnogcdvrsa]^eabjfg\\XYOKLQMNW"
+  "ST\202QMN\2VRSRNO\205SOP\203RNO\203QMN\1PLM\202OKL\202NJK\202MIJ\1LH"
+  "I\202KGH\1JFG\202IEF\202GEF\203FDE\203ECD\205FDE\1GEF\202HFG\202IGH\202"
+  "JHI\1KIJ\202LJK\1MKL\202NLM\202OMN\204PNO\205SOP\203TPQ\230SOP\7ZVWa"
+  "]^]YZMIJC\77 at JFGUQR\202ZVW\202VRS\202YUV\3UQRTPQWST\213SOP\207TPQ\16"
+  "\\XYWSTQMN^Z[*&'1-._[\\fbcrnogcdvrsa]^eabjfg\260SOP\20WSTXTUPLMD at AFB"
+  "CTPQYUVTPQVRSSOPUQRZVWYUVSOPRNOVRS\212SOP\203TPQ\203UQR\30ZVWTPQ_[\\"
+  "XTULHIZVW,()D at AgcdeaboklgcdmijLHIXTUqmnc_`RNOPLMTPQQMNSOPWSTRNO\205T"
+  "PQ\203SOP\202RNO\202QMN\202PLM\202OKL\203NJK\1MIJ\202LHI\202KGH\203I"
+  "GH\202HFG\203GEF\205HFG\202IGH\203JHI\1KIJ\202LJK\202MKL\202NLM\202O"
+  "MN\205PNO\204SOP\204TPQ\230SOP\20WSTXTUPLMD at AFBCTPQYUVTPQVRSSOPUQRZV"
+  "WYUVSOPRNOVRS\212SOP\203TPQ\203UQR\20ZVWTPQ_[\\XTULHIZVW,()D at Agcdeab"
+  "oklgcdmijLHIXTUqmn\260SOP\20KGHIEF@<=;78JFG^Z[]YZOKLSOPPLMUQR\\XY[WX"
+  "RNOPLMTPQ\212SOP\203TPQ\203UQR\30d`aOKLRNOLHIGCDZVW)%&D at Aief\\XYa]^["
+  "WXa]^B>\77]YZ\212\206\207hdeTPQOKLSOPQMNTPQXTUQMN\203UQR\205TPQ\203R"
+  "NO\203QMN\202PLM\203OKL\1NJK\202MIJ\202LHI\204JHI\203IGH\1HFG\202JHI"
+  "\202IGH\202JHI\204KIJ\1LJK\202MKL\203NLM\202OMN\206PNO\204SOP\204TPQ"
+  "\230SOP\20KGHIEF@<=;78JFG^Z[]YZOKLSOPPLMUQR\\XY[WXRNOPLMTPQ\212SOP\203"
+  "TPQ\203UQR\20d`aOKLRNOLHIGCDZVW)%&D at Aief\\XYa]^[WXa]^B>\77]YZ\212\206"
+  "\207\232SOP\203RNO\202SOP\2TPQRNO\202SOP\1TPQ\202UQR\204VRS\1UQR\202"
+  "TPQ\1SOP\203RNO\22JFGA=>B>\77KGHVRS\\XY^Z[OKLYUVa]^^Z[TPQNJKRNOYUVUQ"
+  "RVRSTPQ\202QMN\5SOPRNOOKLRNOSOP\202TPQ\35MIJkghPLMhde^Z[PLMEABOKLXTU"
+  "D at A512\77;<iefjfgc_`hdeVRSrno{wx}yzeab[WXPLMNJKSOPWSTVRSSOPRNO\202QM"
+  "N\1TPQ\202XTU\12SOPNJKKGHUQRYUVTPQQMNTPQUQRQMN\205PLM\203OKL\210NJK\203"
+  "MIJ\205NJK\205PLM\203QMN\206RNO\214SOP\203RNO\202SOP\2TPQRNO\202SOP\1"
+  "TPQ\202UQR\204VRS\1UQR\202TPQ\1SOP\203RNO\22JFGA=>B>\77KGHVRS\\XY^Z["
+  "OKLYUVa]^^Z[TPQNJKRNOYUVUQRVRSTPQ\202QMN\5SOPRNOOKLRNOSOP\202TPQ\24M"
+  "IJkghPLMhde^Z[PLMEABOKLXTUD at A512\77;<iefjfgc_`hdeVRSrno{wx}yz\230SOP"
+  "\1TPQ\202SOP\1RNO\204QMN\1RNO\203SOP\210TPQ\204SOP\1YUV\202VRS\17YUV"
+  "^Z[]YZWSTQMNYUV[WX\\XYYUVTPQRNOVRSZVWKGHRNO\202XTU\202VRS/XTUYUVb^_F"
+  "BCHDETPQVRS^Z[IEF_[\\TPQSOPMIJLHIJFG734-)*956b^_gcdjfg\177{|wst\220\214"
+  "\215\212\206\207\177{|SOPOKLMIJPLMVRS[WXZVWXTUWSTUQRSOPRNOPLMLHIGCDC"
+  "\77 at SOPZVW[WXTPQPLM\202QMN\1MIJ\206PLM\202OKL\215NJK\203OKL\204PLM\204"
+  "QMN\205RNO\213SOP\1TPQ\202SOP\1RNO\204QMN\1RNO\203SOP\210TPQ\204SOP\1"
+  "YUV\202VRS\17YUV^Z[]YZWSTQMNYUV[WX\\XYYUVTPQRNOVRSZVWKGHRNO\202XTU\202"
+  "VRS\32XTUYUVb^_FBCHDETPQVRS^Z[IEF_[\\TPQSOPMIJLHIJFG734-)*956b^_gcdj"
+  "fg\177{|wst\220\214\215\212\206\207\177{|\230SOP\1TPQ\202SOP\202RNO\202"
+  "QMN\1PLM\202SOP\211RNO\204SOP\13TPQPLMQMNVRS]YZc_``\\]XTUPLMUQRTPQ\203"
+  "SOP\2RNOPLM\202NJK\12SOPWSTTPQNJKLHIRNOZVW<89PLMokl\202UQR\26jfgb^_C"
+  "\77@@<=ZVW\\XYA=>%!\"\35\31\32:67fbcjfglhiokl\211\205\206\202~\177\220"
+  "\214\215{wxd`aRNOSOPVRS\202WST\20VRSSOPQMNNJKOKLPLMOKLMIJKGHLHIMIJXT"
+  "U\\XY[WXTPQPLM\202QMN\1OKL\203QMN\205PLM\214OKL\206PLM\206QMN\204RNO"
+  "\214SOP\1TPQ\202SOP\202RNO\202QMN\1PLM\202SOP\211RNO\204SOP\13TPQPLM"
+  "QMNVRS]YZc_``\\]XTUPLMUQRTPQ\203SOP\2RNOPLM\202NJK\12SOPWSTTPQNJKLHI"
+  "RNOZVW<89PLMokl\202UQR\23jfgb^_C\77@@<=ZVW\\XYA=>%!\"\35\31\32:67fbc"
+  "jfglhiokl\211\205\206\202~\177\220\214\215{wxd`a\230SOP\1RNO\202SOP\204"
+  "TPQ\202SOP\203RNO\207QMN\2RNOSOP\203TPQ\32PLMOKLPLMSOPWSTXTUVRSTPQLH"
+  "IOKLSOPVRSUQRQMNLHIHDEXTUTPQQMNNJKKGHLHIVRS`\\]plmKGH\202[WX\6]YZ=9:"
+  "EABFBC\13\7\10\14\10\11\202\3\0\0\22$\40!EABPLMUQRsopplmmij\202~\177"
+  "sop|xyeabQMNVRSZVW]YZ[WXVRSQMN\202OKL\2KGHOKL\202QMN\14OKLPLMUQRZVWW"
+  "STXTUVRSSOPRNOSOPUQRVRS\205QMN\203PLM\210QMN\203PLM\212QMN\206RNO\215"
+  "SOP\1RNO\202SOP\204TPQ\202SOP\203RNO\207QMN\2RNOSOP\203TPQ\32PLMOKLP"
+  "LMSOPWSTXTUVRSTPQLHIOKLSOPVRSUQRQMNLHIHDEXTUTPQQMNNJKKGHLHIVRS`\\]pl"
+  "mKGH\202[WX\6]YZ=9:EABFBC\13\7\10\14\10\11\202\3\0\0\14$\40!EABPLMUQ"
+  "Rsopplmmij\202~\177sop|xyeabQMN\230SOP\4PLMRNOTPQVRS\204WST\204RNO\205"
+  "QMN\202RNO\202SOP\1TPQ\202UQRB_[\\[WXWSTTPQSOPQMNPLMNJKQMNVRSZVWYUVU"
+  "QRSOPTPQWST[WXRNOOKLUQR[WX]YZ_[\\d`aGCDVRS_[\\A=>RNOQMNEAB\10\4\5\26"
+  "\22\23\77;<XTU[WXc_`jfgoklxtukghlhimij\201}~njktpqeab\\XYQMNUQRWSTUQ"
+  "RQMNPLMTPQXTUTPQVRSXTUUQRQMNPLMSOPWSTXTUUQR\204SOP\2UQRVRS\203RNO\221"
+  "QMN\204RNO\202QMN\207RNO\206SOP\1TPQ\210SOP\4PLMRNOTPQVRS\204WST\204"
+  "RNO\205QMN\202RNO\202SOP\1TPQ\202UQR0_[\\[WXWSTTPQSOPQMNPLMNJKQMNVRS"
+  "ZVWYUVUQRSOPTPQWST[WXRNOOKLUQR[WX]YZ_[\\d`aGCDVRS_[\\A=>RNOQMNEAB\10"
+  "\4\5\26\22\23\77;<XTU[WXc_`jfgoklxtukghlhimij\201}~njktpqeab\\XY\230"
+  "SOP\4PLMQMNTPQVRS\203WST\1VRS\204RNO\204SOP\204TPQ\205UQR\7VRSXTUYUV"
+  "WSTSOPOKLLHI\202WST\7UQRPLMLHIPLM[WXd`a\\XY\202RNO\31^Z[c_`ZVWNJKJFG"
+  "ZVW\\XY[WXhde]YZ\30\24\25\16\12\13\"\36\37\\XYhdegcdhdextuzvwgcdYUVf"
+  "bckghrno\207\203\204\202njk\14`\\]\\XYUQRVRSUQRQMNLHIKGHPLMTPQQMNSOP"
+  "\202UQR\202TPQ\12VRSWST[WXUQRRNOTPQUQRQMNPLMQMN\205RNO\203QMN\210RNO"
+  "\202QMN\212RNO\211SOP\203TPQ\210SOP\4PLMQMNTPQVRS\203WST\1VRS\204RNO"
+  "\204SOP\204TPQ\205UQR\7VRSXTUYUVWSTSOPOKLLHI\202WST\7UQRPLMLHIPLM[WX"
+  "d`a\\XY\202RNO\31^Z[c_`ZVWNJKJFGZVW\\XY[WXhde]YZ\30\24\25\16\12\13\""
+  "\36\37\\XYhdegcdhdextuzvwgcdYUVfbckghrno\207\203\204\202njk\2`\\]\\X"
+  "Y\230SOP\3PLMRNOTPQ\202UQR\3TPQQMNPLM\202QMN\4RNOSOPTPQUQR\202VRS\1W"
+  "ST\204VRS\203UQR\3JFGNJKSOP\202WST\14TPQQMNOKLSOPQMNNJKMIJOKLTPQ[WX_"
+  "[\\YUV\202OKL\7YUVXTUJFG\77;<>:;\3\0\0$\40!\202\3\0\0#\12\6\7\25\21\22"
+  "@<={wxc_`qmnmij`\\]\\XY_[\\mij\205\201\202mijnjkqmn\204\200\201hdefb"
+  "cXTUVRS[WXZVWWSTSOPOKLNJKOKLQMNPLMQMNRNOVRSYUVZVWYUV\202WST\7QMNOKLU"
+  "QRWSTRNOOKLPLM\202SOP\216RNO\202QMN\210RNO\212SOP\204TPQ\210SOP\3PLM"
+  "RNOTPQ\202UQR\3TPQQMNPLM\202QMN\4RNOSOPTPQUQR\202VRS\1WST\204VRS\203"
+  "UQR\3JFGNJKSOP\202WST\14TPQQMNOKLSOPQMNNJKMIJOKLTPQ[WX_[\\YUV\202OKL"
+  "\7YUVXTUJFG\77;<>:;\3\0\0$\40!\202\3\0\0\24\12\6\7\25\21\22@<={wxc_`"
+  "qmnmij`\\]\\XY_[\\mij\205\201\202mijnjkqmn\204\200\201hdefbcXTUVRS\230"
+  "SOP\2QMNSOP\202TPQ\15RNOOKLLHIJFGPLMQMNRNOSOPUQRVRSWSTXTUYUV\202XTU\1"
+  "WST\202VRS\202UQR\203YUV\3VRSRNOPLM\203OKL\10NJKPLMWST`\\]b^_]YZVRSO"
+  "KL\202FBC#NJKOKLHDELHIXTU\210\204\205\211\205\206<89ZVWyuvfbcXTU\211"
+  "\205\206\236\232\233\214\210\211mij`\\]iefgcd_[\\a]^uqrnjkjfg|xyd`ag"
+  "cd_[\\a]^SOPTPQUQRWSTYUV\\XY\202^Z[\3_[\\\\XYZVW\202[WX\13XTUPLMJFGP"
+  "LMIEFJFGTPQYUVUQRRNOTPQ\203SOP\215RNO\202QMN\207RNO\206SOP\1TPQ\204S"
+  "OP\204TPQ\210SOP\2QMNSOP\202TPQ\15RNOOKLLHIJFGPLMQMNRNOSOPUQRVRSWSTX"
+  "TUYUV\202XTU\1WST\202VRS\202UQR\203YUV\3VRSRNOPLM\203OKL\10NJKPLMWST"
+  "`\\]b^_]YZVRSOKL\202FBC\35NJKOKLHDELHIXTU\210\204\205\211\205\206<89"
+  "ZVWyuvfbcXTU\211\205\206\236\232\233\214\210\211mij`\\]iefgcd_[\\a]^"
+  "uqrnjkjfg|xyd`agcd_[\\a]^\210RNO\13XTUSOPVRS]YZYUVOKLPLMYUVNJKSOPRNO"
+  "\202LHI\13TPQXTUUQRVRSTPQVRS\\XYYUVQMNPLMVRS\203QMN\202PLM\11RNOWSTZ"
+  "VWJFGSOPYUVUQRRNOUQR\202XTU3TPQQMNUQRZVWSOPFBCGCDSOP`\\]WSTQMNTPQ]YZ"
+  "b^_^Z[WSTc_`]YZSOPJFGIEFNJKOKLNJKZVWFBCSOP\214\210\211\271\265\266\266"
+  "\262\263\237\233\234\222\216\217qmnvrs\177{|\204\200\201\203\177\200"
+  "\220\214\215ZVW[WXxturnogcda]^d`aiefd`aZVWIEFYUVZVW\202UQR\16PLMNJKW"
+  "STUQRWST_[\\[WXOKLSOPYUVQMNXTUTPQSOP\202VRS\4TPQSOPTPQPLM\202TPQ\25Q"
+  "MNUQR[WXYUVQMNRNOTPQVRSUQRQMNNJKMIJNJKOKLRNOUQRSOPOKLNJKQMNUQR\210RN"
+  "O\13XTUSOPVRS]YZYUVOKLPLMYUVNJKSOPRNO\202LHI\13TPQXTUUQRVRSTPQVRS\\X"
+  "YYUVQMNPLMVRS\203QMN\202PLM\11RNOWSTZVWJFGSOPYUVUQRRNOUQR\202XTU0TPQ"
+  "QMNUQRZVWSOPFBCGCDSOP`\\]WSTQMNTPQ]YZb^_^Z[WSTc_`]YZSOPJFGIEFNJKOKLN"
+  "JKZVWFBCSOP\214\210\211\271\265\266\266\262\263\237\233\234\222\216\217"
+  "qmnvrs\177{|\204\200\201\203\177\200\220\214\215ZVW[WXxturnogcda]^d`"
+  "aiefd`aZVW\203SOP\202TPQ\203UQR#NJKOKLRNOWSTXTUVRSZVWa]^IEFTPQZVWWST"
+  "TPQUQRTPQQMNNJKMIJPLMVRSUQRPLMQMNWST`\\]^Z[[WXXTUVRSTPQSOPRNOZVWVRSR"
+  "NO\203QMN\24NJKLHIWSTYUVZVWVRSJFGC\77 at IEFTPQSOPUQRZVWa]^fbceab_[\\YU"
+  "V\\XYSOP\202MIJ(QMNRNOPLMNJK\\XYb^_sop\177{|plmUQRPLM]YZ[WX^Z[kgh\202"
+  "~\177\211\205\206\215\211\212OKLHDEd`ab^_\\XYYUVd`aplmhdeWSTeabMIJ\77"
+  ";<SOPfbcYUVUQRmijUQRVRS^Z[_[\\\202WST\"XTURNOQMNSOPWST[WX]YZYUVUQRRN"
+  "OWSTVRSRNOOKLUQR]YZ[WXRNOUQRSOPPLMOKLPLMTPQXTUZVWUQRTPQSOPRNOSOPWST["
+  "WX^Z[\203SOP\202TPQ\203UQR#NJKOKLRNOWSTXTUVRSZVWa]^IEFTPQZVWWSTTPQUQ"
+  "RTPQQMNNJKMIJPLMVRSUQRPLMQMNWST`\\]^Z[[WXXTUVRSTPQSOPRNOZVWVRSRNO\203"
+  "QMN\24NJKLHIWSTYUVZVWVRSJFGC\77 at IEFTPQSOPUQRZVWa]^fbceab_[\\YUV\\XYS"
+  "OP\202MIJ\34QMNRNOPLMNJK\\XYb^_sop\177{|plmUQRPLM]YZ[WX^Z[kgh\202~\177"
+  "\211\205\206\215\211\212OKLHDEd`ab^_\\XYYUVd`aplmhdeWST\210RNO\14QMN"
+  "UQRTPQNJKJFGMIJOKLNJKLHITPQZVWWST\202TPQ\14SOPQMNVRSTPQUQRWSTTPQNJKO"
+  "KLSOPYUVUQR\202RNO\12UQRWSTUQRRNO^Z[OKLHDERNO[WXYUV\202VRS\26OKLVRSW"
+  "STMIJEABIEFUQR]YZMIJSOP[WX^Z[[WXUQRPLMMIJVRSKGHIEFSOPXTUSOP\202NJK\20"
+  "QMNWST^Z[a]^ZVWRNOTPQ\\XYhde[WXQMNc_`hdenjkFBCOKL\202sop\31gcd]YZeab"
+  "sopjfgTPQNJK[WXUQRIEFJFGHDEEABJFGVRSSOPTPQVRSUQRRNOSOPUQRRNOTPQXTU\202"
+  "ZVW\3XTUUQRRNO\202UQR\202SOP\15WST[WXUQRLHIUQRRNOOKLNJKOKLPLMQMNPLMR"
+  "NO\202QMN\1RNO\202UQR\2TPQSOP\210RNO\14QMNUQRTPQNJKJFGMIJOKLNJKLHITP"
+  "QZVWWST\202TPQ\14SOPQMNVRSTPQUQRWSTTPQNJKOKLSOPYUVUQR\202RNO\12UQRWS"
+  "TUQRRNO^Z[OKLHDERNO[WXYUV\202VRS\26OKLVRSWSTMIJEABIEFUQR]YZMIJSOP[WX"
+  "^Z[[WXUQRPLMMIJVRSKGHIEFSOPXTUSOP\202NJK\20QMNWST^Z[a]^ZVWRNOTPQ\\XY"
+  "hde[WXQMNc_`hdenjkFBCOKL\202sop\6gcd]YZeabsopjfgTPQ\202UQR\1TPQ\202S"
+  "OP\1RNO\202QMN\20XTU]YZXTUJFGD at AJFGIEFB>\77WSTTPQOKLMIJPLMTPQWSTVRS\203"
+  "WST#UQRRNOOKLPLMSOPRNOLHIGCDJFGSOPYUVZVWXTU^Z[NJKKGH[WXd`a]YZYUV^Z[K"
+  "GHSOPQMNGCDFBCQMNYUVXTU\\XY]YZ_[\\^Z[\\XY[WX\202ZVW\12RNOJFGLHIVRSWS"
+  "TMIJLHIUQRief`\\]\202VRS%b^_lhifbcZVWb^_eaba]^vrsgcdUQR401FBCjfgplmj"
+  "fga]^lhi\204\200\201\206\202\203xtuZVWeabUQRFBC[WXokl^Z[EABXTUUQRMIJ"
+  "LHIPLMNJKQMN]YZUQR\202WST\35SOPQMNSOPUQRTPQNJKRNOWSTXTUVRSQMNKGHEABK"
+  "GHQMNXTUYUVVRSQMNNJKMIJOKLSOPXTUYUVUQRMIJGCDC\77@\202UQR\1TPQ\202SOP"
+  "\1RNO\202QMN\20XTU]YZXTUJFGD at AJFGIEFB>\77WSTTPQOKLMIJPLMTPQWSTVRS\203"
+  "WST#UQRRNOOKLPLMSOPRNOLHIGCDJFGSOPYUVZVWXTU^Z[NJKKGH[WXd`a]YZYUV^Z[K"
+  "GHSOPQMNGCDFBCQMNYUVXTU\\XY]YZ_[\\^Z[\\XY[WX\202ZVW\12RNOJFGLHIVRSWS"
+  "TMIJLHIUQRief`\\]\202VRS\25b^_lhifbcZVWb^_eaba]^vrsgcdUQR401FBCjfgpl"
+  "mjfga]^lhi\204\200\201\206\202\203xtuTPQ\202UQR\3VRSWSTXTU\202YUV\21"
+  "SOPYUVVRSMIJOKLYUV\\XYUQR_[\\SOPIEFLHIVRS\\XY[WXWSTPLM\202RNO\7PLMOK"
+  "LRNOVRSXTU]YZUQR\202MIJ\25TPQ[WX^Z[]YZa]^VRSWSTa]^]YZKGHD at AKGHPLMSOP"
+  "OKLHDELHIVRSUQRJFGTPQ\202RNOGUQRZVW\\XYZVWXTUKGHJFGOKLUQRQMNKGHTPQc_"
+  "`d`ahdeeab[WXVRSZVW[WXWSTPLM^Z[QMNVRS401\40\34\35!\35\36IEFfbcnjklhi"
+  "b^_c_`njkmijb^_d`a[WXSOP]YZeabUQRLHI\\XYPLMYUVRNONJKVRSRNONJK\\XYLHI"
+  "UQRYUVUQRTPQXTUYUVWSTQMNVRSYUVVRSLHIFBCIEFOKLKGHVRS\202a]^\11ZVWVRSY"
+  "UV^Z[TPQYUV]YZYUVPLM\202IEF\2KGHTPQ\202UQR\3VRSWSTXTU\202YUV\21SOPYU"
+  "VVRSMIJOKLYUV\\XYUQR_[\\SOPIEFLHIVRS\\XY[WXWSTPLM\202RNO\7PLMOKLRNOV"
+  "RSXTU]YZUQR\202MIJ\25TPQ[WX^Z[]YZa]^VRSWSTa]^]YZKGHD at AKGHPLMSOPOKLHD"
+  "ELHIVRSUQRJFGTPQ\202RNO9UQRZVW\\XYZVWXTUKGHJFGOKLUQRQMNKGHTPQc_`d`ah"
+  "deeab[WXVRSZVW[WXWSTPLM^Z[QMNVRS401\40\34\35!\35\36IEFfbcnjklhib^_c_"
+  "`njkmijb^_KGHLHINJKPLMRNOUQRVRSWSTPLMQMNPLMOKLTPQ\\XY^Z[[WX^Z[SOPMIJ"
+  "VRS\202a]^\10YUVRNO\\XY^Z[[WXSOPOKLQMN\202TPQ\21WSTRNOMIJNJKTPQ[WX^Z"
+  "[_[\\OKLNJKSOPVRSMIJ=9::67B>\77IEF\202JFG%MIJVRS^Z[[WXSOPUQRTPQSOPUQ"
+  "RVRSQMNGCD\77;<D at AKGHQMNPLMNJKRNO`\\]lhiRNOYUV\\XYWSTRNOTPQXTU[WXRNO"
+  "]YZ:673/0\23\17\20\25\21\22<89sop\202lhiJgcd^Z[TPQHDE956-)*\10\4\5\27"
+  "\23\24/+,QMNkghc_`VRS]YZ:67YUVZVWPLMYUVRNOEABMIJB>\77RNO^Z[]YZ[WX^Z["
+  "\\XYUQRZVWYUVVRSPLMFBCEABRNOb^_]YZa]^`\\]WSTKGHHDEPLMYUVUQRTPQQMNKGH"
+  "FBCIEFSOP\\XYKGHLHINJKPLMRNOUQRVRSWSTPLMQMNPLMOKLTPQ\\XY^Z[[WX^Z[SOP"
+  "MIJVRS\202a]^\10YUVRNO\\XY^Z[[WXSOPOKLQMN\202TPQ\21WSTRNOMIJNJKTPQ[W"
+  "X^Z[_[\\OKLNJKSOPVRSMIJ=9::67B>\77IEF\202JFG%MIJVRS^Z[[WXSOPUQRTPQSO"
+  "PUQRVRSQMNGCD\77;<D at AKGHQMNPLMNJKRNO`\\]lhiRNOYUV\\XYWSTRNOTPQXTU[WX"
+  "RNO]YZ:673/0\23\17\20\25\21\22<89sop\202lhi\6gcd^Z[TPQHDE956-)*\203N"
+  "JK\202MIJ\1LHI\202KGH\16RNOMIJKGHQMNTPQSOPRNOSOP]YZUQRRNOXTU[WXWST\202"
+  "RNO\15_[\\a]^\\XYQMNLHIOKLRNOQMNHDEIEFKGHNJKPLM\203RNO\4""956\77;<EA"
+  "BFBC\202D at A\2JFGPLM\202IEF\2NJKWST\202[WX3]YZb^_iefjfghdec_`[WXRNOKG"
+  "HFBCIEFSOPTPQMIJOKL]YZeabc_`d`a\\XYUQRVRSWSTUQROKLKGHMIJhdeTPQgcd`\\"
+  "]d`awst\213\207\210eabUQRMIJUQR\\XYWSTPLMOKLWSTNJK\77;<IEFeab[WX%!\""
+  "\3\0\0""401\202c_`\4MIJTPQSOPFBC\202LHI\4ZVW_[\\VRSQMN\202UQR\4OKLUQ"
+  "ROKLMIJ\203PLM\1XTU\202c_`\11]YZSOPHDE@<=\77;<C\77 at GCDRNOKGH\202EAB\4"
+  "KGHTPQZVW]YZ\203NJK\202MIJ\1LHI\202KGH\16RNOMIJKGHQMNTPQSOPRNOSOP]YZ"
+  "UQRRNOXTU[WXWST\202RNO\15_[\\a]^\\XYQMNLHIOKLRNOQMNHDEIEFKGHNJKPLM\203"
+  "RNO\4""956\77;<EABFBC\202D at A\2JFGPLM\202IEF\2NJKWST\202[WX\177]YZb^_"
+  "iefjfghdec_`[WXRNOKGHFBCIEFSOPTPQMIJOKL]YZeabc_`d`a\\XYUQRVRSWSTUQRO"
+  "KLKGHMIJhdeTPQgcd`\\]d`awst\213\207\210eabUQRMIJUQR\\XYWSTPLMOKL`\\]"
+  "\\Z[ZVWSQROKLHFGFBCB at ARNOFDEIEFSQRZVWSQRTPQWUV`\\]VTURNOOMNLHIDBCLHI"
+  "TRSD at AGEFIEFA\77 at D@AMKLWSTUSTNJKPNOUQRRPQNJKDBC\77;<:89845<:;A=>=;<C"
+  "\77 at LJKXTUYWX]YZYWX^Z[_]^XTUIGHOKL[YZXTUXVWXTUNLMGCDCABKGHQOPSOPZXYX"
+  "TUJHIRNOa_`b^_PNOWSTPNOQMNTRSVRSNLMSOPXVWNJKcabJFGgefxtu\177\210\206"
+  "\207\225\221\222\222\220\221\203\177\200^\\]JFGTRSiefkijqmnwuvb^_XVW"
+  "VRSQOP1-.\1\0\0\15\11\12FDEB>\77trsoklIGHQMNWUVTPQ\\Z[_[\\cab^Z[FDE="
+  "9:A\77 at JFGGEFFBC\77=>FBCSQR_[\\ZXYXTUUSTSOPJHID at AB@AIEFKIJLHIFDERNOI"
+  "GHGCDMKL^Z[cab_[\\TRS`\\]\\Z[ZVWSQROKLHFGFBCB at ARNOFDEIEFSQRZVWSQRTPQ"
+  "WUV`\\]VTURNOOMNLHIDBCLHITRSD at AGEFIEFA\77 at D@AMKLWSTUSTNJKPNOUQRRPQNJ"
+  "KDBC\77;<:89845<:;A=>=;<C\77 at LJKXTUYWX]YZYWX^Z[_]^XTUIGHOKL[YZXTUXVW"
+  "XTUNLMGCDCABKGHQOPSOPZXYXTUJHI\177RNOa_`b^_PNOWSTPNOQMNTRSVRSNLMSOPX"
+  "VWNJKcabJFGgefxtu\210\206\207\225\221\222\222\220\221\203\177\200^\\"
+  "]JFGTRSiefkijqmnwuv\377\376\377\377\377\377\377\376\377\377\377\377\377"
+  "\376\377\377\377\377\377\376\377\377\377\377\377\376\377\377\377\377"
+  "\377\376\377\377\377\377\377\376\377\377\377\377\377\376\377\377\377"
+  "\377\377\376\377\377\377\377\377\376\377\377\377\377\377\376\377\377"
+  "\377\377\377\376\377\377\377\377\377\376\377\377\377\377\377\376\377"
+  "\377\377\377\377\376\377\377\377\377\377\376\377\377\377\377\377\376"
+  "\377\377\377\377\377\376\377\377\377\377\377\376\377\377\377\377\377"
+  "\376\377\377\377\377\377\376\377\377\377\377\377\376\377\377\377\377"
+  "\377\376\377\377\377\377\377\376\377\377\377\377\377\376\377\377\377"
+  "\377\377\376\377\377\377\377\377\376\377\377\377\377\377\376\377\377"
+  "\377\377\377\376\377\377\377\377\377\376\377\377\377\377\377\376\377"
+  "\377\377\377\377\376\377\377\377\377\377\376\377\377\377\377\377\376"
+  "\377\377\377\377\377\376\377\377\377\377\377\376\377\377\377\377\377"
+  "\376\377\377\377\377\377\376\377\377\377\377\377\376\377\377\377\377"
+  "\377\376\377\377\377\377\377\376\377\377\377\377\377\376\377\377\377"
+  "\377\377\376\377\377\377\377\377\376\377\377\377\377\377\376\377\377"
+  "\377\377\377\376\377\377\377\377\377\376\377\377\377\377\377\376\377"
+  "\377\377\377\377\376\377\377\377\377\377\376\377\177\377\377\377\377"
+  "\376\377\377\377\377\377\376\377\377\377\377\377\376\377\377\377\377"
+  "\377\376\377\377\377\377\377\376\377\377\377\377\377\376\377\377\377"
+  "\377\377\376\377\377\377\377\377\376\377\377\377\377\377\376\377\377"
+  "\377\377\377\376\377\377\377\377\377\376\377\377\377\377\377\376\377"
+  "\377\377\377\377\376\377\377\377\377\377\376\377\377\377\377\377\376"
+  "\377\377\377\377\377\376\377\377\377\377\377\376\377\377\377\377\377"
+  "\376\377\377\377\377\377\376\377\377\377\377\377\376\377\377\377\377"
+  "\377\376\377\377\377\377\377\376\377\377\377\377\377\376\377\377\377"
+  "\377\377\376\377\377\377\377\377\376\377\377\377\377\377\376\377\377"
+  "\377\377\377\376\377\377\377\377\377\376\377\377\377\377\377\376\377"
+  "\377\377\377\377\376\377\377\377\377\377\376\377\377\377\377\377\376"
+  "\377\377\377\377\377\376\377\377\377\377\377\376\377\377\377\377\377"
+  "\376\377\377\377\377\377\376\377\377\377\377\377\376\377\377\377\377"
+  "\377\376\377\377\377\377\377\376\377\377\377\377\377\376\377\377\377"
+  "\377\377\376\377\377\377\377\377\376\377\377\377\377\377\376\377\377"
+  "\377\377\377\376\377\377\377\377\377\376\377\377\377\377\377\376\377"
+  "\377\377\377\377\376\377\377\377\377\377\376\377\377\377\377\377\376"
+  "\377\377\377\377\377\376\377\377\377\377\377\376\377\377\377\377\377"
+  "\376\377\377\377\377\377\376\377\377\377\377\377\376\377\377\377\377"
+  "\377\376\377\377\377\377\377\376\377\377\377\377\377\376\377\377\377"
+  "\377\377\376\377\377\377\377\377\376\377\377\377\377\377\376\377\377"
+  "\377\377\377\376\377\377\377\377\377\376\377\377\377\377\377\376\377"
+  "\377\377\377\16\377\376\377\377\377\377\377\376\377\377\377\377\377\376"
+  "\377\377\377\377\377\376\377\377\377\377\377\376\377\377\377\377\377"
+  "\376\377\377\377\377\377\376\377\377\377\377",
+};
+
+
+#endif

Added: libgpod/trunk/libgpod/branches/upstream/current/src/pixmaps.h
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/pixmaps.h	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/pixmaps.h	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,50 @@
+/* Time-stamp: <2007-01-09 21:59:28 jcs>
+|
+|  Copyright (C) 2002-2006 Jorg Schuler <jcsjcs at users sourceforge net>
+|  Part of the gtkpod project.
+| 
+|  URL: http://www.gtkpod.org/
+|  URL: http://gtkpod.sourceforge.net/
+|
+|  Most of the code in this file has been ported from the perl
+|  script "mktunes.pl" (part of the gnupod-tools collection) written
+|  by Adrian Ulrich <pab at blinkenlights.ch>.
+|
+|  gnupod-tools: http://www.blinkenlights.ch/cgi-bin/fm.pl?get=ipod
+|
+|  The code contained in this file is free software; you can redistribute
+|  it and/or modify it under the terms of the GNU Lesser General Public
+|  License as published by the Free Software Foundation; either version
+|  2.1 of the License, or (at your option) any later version.
+|
+|  This file 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
+|  Lesser General Public License for more details.
+|
+|  You should have received a copy of the GNU Lesser General Public
+|  License along with this code; if not, write to the Free Software
+|  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+|
+|  iTunes and iPod are trademarks of Apple
+|
+|  This product is not supported/written/published by Apple!
+|
+|  $Id: pixmaps.h 1352 2007-01-09 13:31:14Z jcsjcs $
+*/
+
+#ifndef __PIXMAPS_H__
+#define __PIXMAPS_H__
+
+#include "itdb.h"
+
+#ifdef HAVE_GDKPIXBUF
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gdk-pixbuf/gdk-pixdata.h>
+
+extern G_GNUC_INTERNAL const GdkPixdata questionmark_pixdata;
+
+#endif
+
+#endif

Added: libgpod/trunk/libgpod/branches/upstream/current/src/sha1.c
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/sha1.c	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/sha1.c	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,450 @@
+/* (PD) 2001 The Bitzi Corporation
+ * Please see file COPYING or http://bitzi.com/publicdomain 
+ * for more info.
+ *
+ * NIST Secure Hash Algorithm 
+ * heavily modified by Uwe Hollerbach <uh at alumni.caltech edu> 
+ * from Peter C. Gutmann's implementation as found in 
+ * Applied Cryptography by Bruce Schneier 
+ * Further modifications to include the "UNRAVEL" stuff, below 
+ *
+ * This code is in the public domain 
+ *
+ * $Id: sha1.c,v 1.1 2005-12-28 18:06:50 tpm Exp $
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#include <glib.h>
+#define SHA_BYTE_ORDER G_BYTE_ORDER
+
+#include <string.h>
+#include "sha1.h"
+
+/* UNRAVEL should be fastest & biggest */
+/* UNROLL_LOOPS should be just as big, but slightly slower */
+/* both undefined should be smallest and slowest */
+
+#define UNRAVEL
+/* #define UNROLL_LOOPS */
+
+/* SHA f()-functions */
+
+#define f1(x,y,z)	((x & y) | (~x & z))
+#define f2(x,y,z)	(x ^ y ^ z)
+#define f3(x,y,z)	((x & y) | (x & z) | (y & z))
+#define f4(x,y,z)	(x ^ y ^ z)
+
+/* SHA constants */
+
+#define CONST1		0x5a827999L
+#define CONST2		0x6ed9eba1L
+#define CONST3		0x8f1bbcdcL
+#define CONST4		0xca62c1d6L
+
+/* truncate to 32 bits -- should be a null op on 32-bit machines */
+
+#define T32(x)	((x) & 0xffffffffL)
+
+/* 32-bit rotate */
+
+#define R32(x,n)	T32(((x << n) | (x >> (32 - n))))
+
+/* the generic case, for when the overall rotation is not unraveled */
+
+#define FG(n)	\
+    T = T32(R32(A,5) + f##n(B,C,D) + E + *WP++ + CONST##n);	\
+    E = D; D = C; C = R32(B,30); B = A; A = T
+
+/* specific cases, for when the overall rotation is unraveled */
+
+#define FA(n)	\
+    T = T32(R32(A,5) + f##n(B,C,D) + E + *WP++ + CONST##n); B = R32(B,30)
+
+#define FB(n)	\
+    E = T32(R32(T,5) + f##n(A,B,C) + D + *WP++ + CONST##n); A = R32(A,30)
+
+#define FC(n)	\
+    D = T32(R32(E,5) + f##n(T,A,B) + C + *WP++ + CONST##n); T = R32(T,30)
+
+#define FD(n)	\
+    C = T32(R32(D,5) + f##n(E,T,A) + B + *WP++ + CONST##n); E = R32(E,30)
+
+#define FE(n)	\
+    B = T32(R32(C,5) + f##n(D,E,T) + A + *WP++ + CONST##n); D = R32(D,30)
+
+#define FT(n)	\
+    A = T32(R32(B,5) + f##n(C,D,E) + T + *WP++ + CONST##n); C = R32(C,30)
+
+/* do SHA transformation */
+
+static void
+sha_transform (SHA_INFO * sha_info)
+{
+  int i;
+  SHA_BYTE *dp;
+  SHA_LONG T, A, B, C, D, E, W[80], *WP;
+
+  dp = sha_info->data;
+
+/*
+the following makes sure that at least one code block below is
+traversed or an error is reported, without the necessity for nested
+preprocessor if/else/endif blocks, which are a great pain in the
+nether regions of the anatomy...
+*/
+#undef SWAP_DONE
+
+#if (SHA_BYTE_ORDER == 1234)
+#define SWAP_DONE
+  for (i = 0; i < 16; ++i) {
+    T = *((SHA_LONG *) dp);
+    dp += 4;
+    W[i] = ((T << 24) & 0xff000000) | ((T << 8) & 0x00ff0000) |
+        ((T >> 8) & 0x0000ff00) | ((T >> 24) & 0x000000ff);
+  }
+#endif /* SHA_BYTE_ORDER == 1234 */
+
+#if (SHA_BYTE_ORDER == 4321)
+#define SWAP_DONE
+  for (i = 0; i < 16; ++i) {
+    T = *((SHA_LONG *) dp);
+    dp += 4;
+    W[i] = T32 (T);
+  }
+#endif /* SHA_BYTE_ORDER == 4321 */
+
+#if (SHA_BYTE_ORDER == 12345678)
+#define SWAP_DONE
+  for (i = 0; i < 16; i += 2) {
+    T = *((SHA_LONG *) dp);
+    dp += 8;
+    W[i] = ((T << 24) & 0xff000000) | ((T << 8) & 0x00ff0000) |
+        ((T >> 8) & 0x0000ff00) | ((T >> 24) & 0x000000ff);
+    T >>= 32;
+    W[i + 1] = ((T << 24) & 0xff000000) | ((T << 8) & 0x00ff0000) |
+        ((T >> 8) & 0x0000ff00) | ((T >> 24) & 0x000000ff);
+  }
+#endif /* SHA_BYTE_ORDER == 12345678 */
+
+#if (SHA_BYTE_ORDER == 87654321)
+#define SWAP_DONE
+  for (i = 0; i < 16; i += 2) {
+    T = *((SHA_LONG *) dp);
+    dp += 8;
+    W[i] = T32 (T >> 32);
+    W[i + 1] = T32 (T);
+  }
+#endif /* SHA_BYTE_ORDER == 87654321 */
+
+#ifndef SWAP_DONE
+#error Unknown byte order -- you need to add code here
+#endif /* SWAP_DONE */
+
+  for (i = 16; i < 80; ++i) {
+    W[i] = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];
+#if (SHA_VERSION == 1)
+    W[i] = R32 (W[i], 1);
+#endif /* SHA_VERSION */
+  }
+  A = sha_info->digest[0];
+  B = sha_info->digest[1];
+  C = sha_info->digest[2];
+  D = sha_info->digest[3];
+  E = sha_info->digest[4];
+  WP = W;
+#ifdef UNRAVEL
+  FA (1);
+  FB (1);
+  FC (1);
+  FD (1);
+  FE (1);
+  FT (1);
+  FA (1);
+  FB (1);
+  FC (1);
+  FD (1);
+  FE (1);
+  FT (1);
+  FA (1);
+  FB (1);
+  FC (1);
+  FD (1);
+  FE (1);
+  FT (1);
+  FA (1);
+  FB (1);
+  FC (2);
+  FD (2);
+  FE (2);
+  FT (2);
+  FA (2);
+  FB (2);
+  FC (2);
+  FD (2);
+  FE (2);
+  FT (2);
+  FA (2);
+  FB (2);
+  FC (2);
+  FD (2);
+  FE (2);
+  FT (2);
+  FA (2);
+  FB (2);
+  FC (2);
+  FD (2);
+  FE (3);
+  FT (3);
+  FA (3);
+  FB (3);
+  FC (3);
+  FD (3);
+  FE (3);
+  FT (3);
+  FA (3);
+  FB (3);
+  FC (3);
+  FD (3);
+  FE (3);
+  FT (3);
+  FA (3);
+  FB (3);
+  FC (3);
+  FD (3);
+  FE (3);
+  FT (3);
+  FA (4);
+  FB (4);
+  FC (4);
+  FD (4);
+  FE (4);
+  FT (4);
+  FA (4);
+  FB (4);
+  FC (4);
+  FD (4);
+  FE (4);
+  FT (4);
+  FA (4);
+  FB (4);
+  FC (4);
+  FD (4);
+  FE (4);
+  FT (4);
+  FA (4);
+  FB (4);
+  sha_info->digest[0] = T32 (sha_info->digest[0] + E);
+  sha_info->digest[1] = T32 (sha_info->digest[1] + T);
+  sha_info->digest[2] = T32 (sha_info->digest[2] + A);
+  sha_info->digest[3] = T32 (sha_info->digest[3] + B);
+  sha_info->digest[4] = T32 (sha_info->digest[4] + C);
+#else /* !UNRAVEL */
+#ifdef UNROLL_LOOPS
+  FG (1);
+  FG (1);
+  FG (1);
+  FG (1);
+  FG (1);
+  FG (1);
+  FG (1);
+  FG (1);
+  FG (1);
+  FG (1);
+  FG (1);
+  FG (1);
+  FG (1);
+  FG (1);
+  FG (1);
+  FG (1);
+  FG (1);
+  FG (1);
+  FG (1);
+  FG (1);
+  FG (2);
+  FG (2);
+  FG (2);
+  FG (2);
+  FG (2);
+  FG (2);
+  FG (2);
+  FG (2);
+  FG (2);
+  FG (2);
+  FG (2);
+  FG (2);
+  FG (2);
+  FG (2);
+  FG (2);
+  FG (2);
+  FG (2);
+  FG (2);
+  FG (2);
+  FG (2);
+  FG (3);
+  FG (3);
+  FG (3);
+  FG (3);
+  FG (3);
+  FG (3);
+  FG (3);
+  FG (3);
+  FG (3);
+  FG (3);
+  FG (3);
+  FG (3);
+  FG (3);
+  FG (3);
+  FG (3);
+  FG (3);
+  FG (3);
+  FG (3);
+  FG (3);
+  FG (3);
+  FG (4);
+  FG (4);
+  FG (4);
+  FG (4);
+  FG (4);
+  FG (4);
+  FG (4);
+  FG (4);
+  FG (4);
+  FG (4);
+  FG (4);
+  FG (4);
+  FG (4);
+  FG (4);
+  FG (4);
+  FG (4);
+  FG (4);
+  FG (4);
+  FG (4);
+  FG (4);
+#else /* !UNROLL_LOOPS */
+  for (i = 0; i < 20; ++i) {
+    FG (1);
+  }
+  for (i = 20; i < 40; ++i) {
+    FG (2);
+  }
+  for (i = 40; i < 60; ++i) {
+    FG (3);
+  }
+  for (i = 60; i < 80; ++i) {
+    FG (4);
+  }
+#endif /* !UNROLL_LOOPS */
+  sha_info->digest[0] = T32 (sha_info->digest[0] + A);
+  sha_info->digest[1] = T32 (sha_info->digest[1] + B);
+  sha_info->digest[2] = T32 (sha_info->digest[2] + C);
+  sha_info->digest[3] = T32 (sha_info->digest[3] + D);
+  sha_info->digest[4] = T32 (sha_info->digest[4] + E);
+#endif /* !UNRAVEL */
+}
+
+/* initialize the SHA digest */
+
+void
+sha_init (SHA_INFO * sha_info)
+{
+  sha_info->digest[0] = 0x67452301L;
+  sha_info->digest[1] = 0xefcdab89L;
+  sha_info->digest[2] = 0x98badcfeL;
+  sha_info->digest[3] = 0x10325476L;
+  sha_info->digest[4] = 0xc3d2e1f0L;
+  sha_info->count_lo = 0L;
+  sha_info->count_hi = 0L;
+  sha_info->local = 0;
+}
+
+/* update the SHA digest */
+
+void
+sha_update (SHA_INFO * sha_info, const SHA_BYTE * buffer, int count)
+{
+  int i;
+  SHA_LONG clo;
+
+  clo = T32 (sha_info->count_lo + ((SHA_LONG) count << 3));
+  if (clo < sha_info->count_lo) {
+    ++sha_info->count_hi;
+  }
+  sha_info->count_lo = clo;
+  sha_info->count_hi += (SHA_LONG) count >> 29;
+  if (sha_info->local) {
+    i = SHA_BLOCKSIZE - sha_info->local;
+    if (i > count) {
+      i = count;
+    }
+    memcpy (((SHA_BYTE *) sha_info->data) + sha_info->local, buffer, i);
+    count -= i;
+    buffer += i;
+    sha_info->local += i;
+    if (sha_info->local == SHA_BLOCKSIZE) {
+      sha_transform (sha_info);
+    } else {
+      return;
+    }
+  }
+  while (count >= SHA_BLOCKSIZE) {
+    memcpy (sha_info->data, buffer, SHA_BLOCKSIZE);
+    buffer += SHA_BLOCKSIZE;
+    count -= SHA_BLOCKSIZE;
+    sha_transform (sha_info);
+  }
+  memcpy (sha_info->data, buffer, count);
+  sha_info->local = count;
+}
+
+/* finish computing the SHA digest */
+
+void
+sha_final (unsigned char digest[20], SHA_INFO * sha_info)
+{
+  int count;
+  SHA_LONG lo_bit_count, hi_bit_count;
+
+  lo_bit_count = sha_info->count_lo;
+  hi_bit_count = sha_info->count_hi;
+  count = (int) ((lo_bit_count >> 3) & 0x3f);
+  ((SHA_BYTE *) sha_info->data)[count++] = 0x80;
+  if (count > SHA_BLOCKSIZE - 8) {
+    memset (((SHA_BYTE *) sha_info->data) + count, 0, SHA_BLOCKSIZE - count);
+    sha_transform (sha_info);
+    memset ((SHA_BYTE *) sha_info->data, 0, SHA_BLOCKSIZE - 8);
+  } else {
+    memset (((SHA_BYTE *) sha_info->data) + count, 0,
+        SHA_BLOCKSIZE - 8 - count);
+  }
+  sha_info->data[56] = (unsigned char) ((hi_bit_count >> 24) & 0xff);
+  sha_info->data[57] = (unsigned char) ((hi_bit_count >> 16) & 0xff);
+  sha_info->data[58] = (unsigned char) ((hi_bit_count >> 8) & 0xff);
+  sha_info->data[59] = (unsigned char) ((hi_bit_count >> 0) & 0xff);
+  sha_info->data[60] = (unsigned char) ((lo_bit_count >> 24) & 0xff);
+  sha_info->data[61] = (unsigned char) ((lo_bit_count >> 16) & 0xff);
+  sha_info->data[62] = (unsigned char) ((lo_bit_count >> 8) & 0xff);
+  sha_info->data[63] = (unsigned char) ((lo_bit_count >> 0) & 0xff);
+  sha_transform (sha_info);
+  digest[0] = (unsigned char) ((sha_info->digest[0] >> 24) & 0xff);
+  digest[1] = (unsigned char) ((sha_info->digest[0] >> 16) & 0xff);
+  digest[2] = (unsigned char) ((sha_info->digest[0] >> 8) & 0xff);
+  digest[3] = (unsigned char) ((sha_info->digest[0]) & 0xff);
+  digest[4] = (unsigned char) ((sha_info->digest[1] >> 24) & 0xff);
+  digest[5] = (unsigned char) ((sha_info->digest[1] >> 16) & 0xff);
+  digest[6] = (unsigned char) ((sha_info->digest[1] >> 8) & 0xff);
+  digest[7] = (unsigned char) ((sha_info->digest[1]) & 0xff);
+  digest[8] = (unsigned char) ((sha_info->digest[2] >> 24) & 0xff);
+  digest[9] = (unsigned char) ((sha_info->digest[2] >> 16) & 0xff);
+  digest[10] = (unsigned char) ((sha_info->digest[2] >> 8) & 0xff);
+  digest[11] = (unsigned char) ((sha_info->digest[2]) & 0xff);
+  digest[12] = (unsigned char) ((sha_info->digest[3] >> 24) & 0xff);
+  digest[13] = (unsigned char) ((sha_info->digest[3] >> 16) & 0xff);
+  digest[14] = (unsigned char) ((sha_info->digest[3] >> 8) & 0xff);
+  digest[15] = (unsigned char) ((sha_info->digest[3]) & 0xff);
+  digest[16] = (unsigned char) ((sha_info->digest[4] >> 24) & 0xff);
+  digest[17] = (unsigned char) ((sha_info->digest[4] >> 16) & 0xff);
+  digest[18] = (unsigned char) ((sha_info->digest[4] >> 8) & 0xff);
+  digest[19] = (unsigned char) ((sha_info->digest[4]) & 0xff);
+}

Added: libgpod/trunk/libgpod/branches/upstream/current/src/sha1.h
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/src/sha1.h	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/src/sha1.h	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,62 @@
+/* NIST Secure Hash Algorithm */
+/* heavily modified by Uwe Hollerbach <uh at alumni.caltech edu> */
+/* from Peter C. Gutmann's implementation as found in */
+/* Applied Cryptography by Bruce Schneier */
+/* This code is in the public domain */
+/* $Id: sha1.h,v 1.1 2005-12-28 18:06:50 tpm Exp $ */
+
+#ifndef __GST_CDDA_SHA_H__
+#define __GST_CDDA_SHA_H__
+
+#include <stdlib.h>
+#include <stdio.h>
+
+/* Useful defines & typedefs */
+typedef unsigned char SHA_BYTE;	/* 8-bit quantity */
+typedef unsigned long SHA_LONG;	/* 32-or-more-bit quantity */
+
+#define SHA_BLOCKSIZE		64
+#define SHA_DIGESTSIZE		20
+
+typedef struct {
+    SHA_LONG digest[5];		/* message digest */
+    SHA_LONG count_lo, count_hi;	/* 64-bit bit count */
+    SHA_BYTE data[SHA_BLOCKSIZE];	/* SHA data buffer */
+    int local;			/* unprocessed amount in data */
+} SHA_INFO;
+
+#define sha_init   itdb_sha_init
+#define sha_update itdb_sha_update
+#define sha_final  itdb_sha_final
+
+G_GNUC_INTERNAL void sha_init(SHA_INFO *);
+G_GNUC_INTERNAL void sha_update(SHA_INFO *, const SHA_BYTE *, int);
+G_GNUC_INTERNAL void sha_final(unsigned char [20], SHA_INFO *);
+
+#define SHA_VERSION 1
+
+#ifdef HAVE_CONFIG_H 
+#include "config.h"
+
+
+#ifdef WORDS_BIGENDIAN
+#  if SIZEOF_LONG == 4
+#    define SHA_BYTE_ORDER  4321
+#  elif SIZEOF_LONG == 8
+#    define SHA_BYTE_ORDER  87654321
+#  endif
+#else
+#  if SIZEOF_LONG == 4
+#    define SHA_BYTE_ORDER  1234
+#  elif SIZEOF_LONG == 8
+#    define SHA_BYTE_ORDER  12345678
+#  endif
+#endif
+
+#else
+
+#define SHA_BYTE_ORDER 1234
+
+#endif
+
+#endif /* __GST_CDDA_SHA_H__ */

Added: libgpod/trunk/libgpod/branches/upstream/current/tests/Makefile.am
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/tests/Makefile.am	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/tests/Makefile.am	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,54 @@
+if HAVE_GDKPIXBUF
+TESTTHUMBS=test-thumbnails test-write-thumbnails test-photos get-timezone 
+
+test_thumbnails_SOURCES = test-covers.c
+test_thumbnails_CFLAGS = $(AM_CFLAGS)
+
+test_write_thumbnails_SOURCES = test-write-covers.c
+test_write_thumbnails_CFLAGS = $(AM_CFLAGS)
+
+test_photos_SOURCES = test-photos.c
+test_photos_CFLAGS = $(AM_CFLAGS)
+else
+TESTTHUMBS=
+endif
+
+TESTMISC=test-init-ipod
+
+if HAVE_TAGLIB
+TESTTAGLIB=test-rebuild-db
+test_rebuild_db_SOURCES = test-rebuild-db.cc
+test_rebuild_db_LDADD = $(TAGLIB_LIBS)
+test_rebuild_db_CXXFLAGS = $(TAGLIB_CFLAGS)
+else
+TESTTAGLIB=
+endif
+
+test_itdb_SOURCES = itdb_main.c
+test_itdb_LDADD = 
+
+test_ls_SOURCES = test-ls.c
+test_ls_LDADD = 
+
+test_init_ipod_SOURCES = test-init-ipod.c
+test_init_ipod_LDADD = 
+
+test_checksum_SOURCES = test-checksum.c
+
+test_firewire_id_SOURCES = test-fw-id.c
+
+test_sysinfo_extended_parsing_SOURCES = \
+	test-sysinfo-extended-parsing.c \
+	$(top_srcdir)/src/itdb_plist.c  \
+	$(top_srcdir)/src/itdb_sysinfo_extended_parser.c
+
+test_sysinfo_extended_parsing_LDADD =
+
+get_timezone_SOURCES = get-timezone.c
+
+noinst_PROGRAMS=test-itdb test-ls test-checksum test-firewire-id \
+		test-sysinfo-extended-parsing			 \
+	        $(TESTTHUMBS) $(TESTTAGLIB) $(TESTMISC)
+
+INCLUDES=$(LIBGPOD_CFLAGS) -I$(top_srcdir)/src -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\"
+LIBS=$(LIBGPOD_LIBS) $(top_builddir)/src/libgpod.la

Added: libgpod/trunk/libgpod/branches/upstream/current/tests/Makefile.in
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/tests/Makefile.in	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/tests/Makefile.in	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,776 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  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@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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@
+noinst_PROGRAMS = test-itdb$(EXEEXT) test-ls$(EXEEXT) \
+	test-checksum$(EXEEXT) test-firewire-id$(EXEEXT) \
+	test-sysinfo-extended-parsing$(EXEEXT) $(am__EXEEXT_1) \
+	$(am__EXEEXT_2) $(am__EXEEXT_3)
+subdir = tests
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \
+	$(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/python.m4 \
+	$(top_srcdir)/m4/swig.m4 $(top_srcdir)/configure.ac
+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 =
+ at HAVE_GDKPIXBUF_TRUE@am__EXEEXT_1 = test-thumbnails$(EXEEXT) \
+ at HAVE_GDKPIXBUF_TRUE@	test-write-thumbnails$(EXEEXT) \
+ at HAVE_GDKPIXBUF_TRUE@	test-photos$(EXEEXT) \
+ at HAVE_GDKPIXBUF_TRUE@	get-timezone$(EXEEXT)
+ at HAVE_TAGLIB_TRUE@am__EXEEXT_2 = test-rebuild-db$(EXEEXT)
+am__EXEEXT_3 = test-init-ipod$(EXEEXT)
+PROGRAMS = $(noinst_PROGRAMS)
+am_get_timezone_OBJECTS = get-timezone.$(OBJEXT)
+get_timezone_OBJECTS = $(am_get_timezone_OBJECTS)
+get_timezone_LDADD = $(LDADD)
+am_test_checksum_OBJECTS = test-checksum.$(OBJEXT)
+test_checksum_OBJECTS = $(am_test_checksum_OBJECTS)
+test_checksum_LDADD = $(LDADD)
+am_test_firewire_id_OBJECTS = test-fw-id.$(OBJEXT)
+test_firewire_id_OBJECTS = $(am_test_firewire_id_OBJECTS)
+test_firewire_id_LDADD = $(LDADD)
+am_test_init_ipod_OBJECTS = test-init-ipod.$(OBJEXT)
+test_init_ipod_OBJECTS = $(am_test_init_ipod_OBJECTS)
+test_init_ipod_DEPENDENCIES =
+am_test_itdb_OBJECTS = itdb_main.$(OBJEXT)
+test_itdb_OBJECTS = $(am_test_itdb_OBJECTS)
+test_itdb_DEPENDENCIES =
+am_test_ls_OBJECTS = test-ls.$(OBJEXT)
+test_ls_OBJECTS = $(am_test_ls_OBJECTS)
+test_ls_DEPENDENCIES =
+am__test_photos_SOURCES_DIST = test-photos.c
+ at HAVE_GDKPIXBUF_TRUE@am_test_photos_OBJECTS =  \
+ at HAVE_GDKPIXBUF_TRUE@	test_photos-test-photos.$(OBJEXT)
+test_photos_OBJECTS = $(am_test_photos_OBJECTS)
+test_photos_LDADD = $(LDADD)
+test_photos_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_photos_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am__test_rebuild_db_SOURCES_DIST = test-rebuild-db.cc
+ at HAVE_TAGLIB_TRUE@am_test_rebuild_db_OBJECTS =  \
+ at HAVE_TAGLIB_TRUE@	test_rebuild_db-test-rebuild-db.$(OBJEXT)
+test_rebuild_db_OBJECTS = $(am_test_rebuild_db_OBJECTS)
+am__DEPENDENCIES_1 =
+ at HAVE_TAGLIB_TRUE@test_rebuild_db_DEPENDENCIES =  \
+ at HAVE_TAGLIB_TRUE@	$(am__DEPENDENCIES_1)
+test_rebuild_db_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(test_rebuild_db_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+am_test_sysinfo_extended_parsing_OBJECTS =  \
+	test-sysinfo-extended-parsing.$(OBJEXT) itdb_plist.$(OBJEXT) \
+	itdb_sysinfo_extended_parser.$(OBJEXT)
+test_sysinfo_extended_parsing_OBJECTS =  \
+	$(am_test_sysinfo_extended_parsing_OBJECTS)
+test_sysinfo_extended_parsing_DEPENDENCIES =
+am__test_thumbnails_SOURCES_DIST = test-covers.c
+ at HAVE_GDKPIXBUF_TRUE@am_test_thumbnails_OBJECTS =  \
+ at HAVE_GDKPIXBUF_TRUE@	test_thumbnails-test-covers.$(OBJEXT)
+test_thumbnails_OBJECTS = $(am_test_thumbnails_OBJECTS)
+test_thumbnails_LDADD = $(LDADD)
+test_thumbnails_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_thumbnails_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am__test_write_thumbnails_SOURCES_DIST = test-write-covers.c
+ at HAVE_GDKPIXBUF_TRUE@am_test_write_thumbnails_OBJECTS = test_write_thumbnails-test-write-covers.$(OBJEXT)
+test_write_thumbnails_OBJECTS = $(am_test_write_thumbnails_OBJECTS)
+test_write_thumbnails_LDADD = $(LDADD)
+test_write_thumbnails_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(test_write_thumbnails_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -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 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(get_timezone_SOURCES) $(test_checksum_SOURCES) \
+	$(test_firewire_id_SOURCES) $(test_init_ipod_SOURCES) \
+	$(test_itdb_SOURCES) $(test_ls_SOURCES) $(test_photos_SOURCES) \
+	$(test_rebuild_db_SOURCES) \
+	$(test_sysinfo_extended_parsing_SOURCES) \
+	$(test_thumbnails_SOURCES) $(test_write_thumbnails_SOURCES)
+DIST_SOURCES = $(get_timezone_SOURCES) $(test_checksum_SOURCES) \
+	$(test_firewire_id_SOURCES) $(test_init_ipod_SOURCES) \
+	$(test_itdb_SOURCES) $(test_ls_SOURCES) \
+	$(am__test_photos_SOURCES_DIST) \
+	$(am__test_rebuild_db_SOURCES_DIST) \
+	$(test_sysinfo_extended_parsing_SOURCES) \
+	$(am__test_thumbnails_SOURCES_DIST) \
+	$(am__test_write_thumbnails_SOURCES_DIST)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+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@
+GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@
+GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@
+GDKPIXBUF_REQ = @GDKPIXBUF_REQ@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+HALCALLOUTSDIR = @HALCALLOUTSDIR@
+HALFDIDIR = @HALFDIDIR@
+HAL_CFLAGS = @HAL_CFLAGS@
+HAL_LIBS = @HAL_LIBS@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
+INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
+INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
+INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
+INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
+INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
+INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
+INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
+INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@
+INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
+INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
+INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
+INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
+INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
+INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
+LDFLAGS = @LDFLAGS@
+LIBGPOD_CFLAGS = @LIBGPOD_CFLAGS@
+LIBGPOD_LIBS = @LIBGPOD_LIBS@
+LIBGPOD_MAJOR_VERSION = @LIBGPOD_MAJOR_VERSION@
+LIBGPOD_MICRO_VERSION = @LIBGPOD_MICRO_VERSION@
+LIBGPOD_MINOR_VERSION = @LIBGPOD_MINOR_VERSION@
+LIBGPOD_SO_VERSION = @LIBGPOD_SO_VERSION@
+LIBGPOD_VERSION = @LIBGPOD_VERSION@
+LIBOBJS = @LIBOBJS@
+LIBS = $(LIBGPOD_LIBS) $(top_builddir)/src/libgpod.la
+LIBTOOL = @LIBTOOL@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_LIBS = @LIBXML_LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+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@
+PKG_CONFIG = @PKG_CONFIG@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+PYGOBJECT_CFLAGS = @PYGOBJECT_CFLAGS@
+PYGOBJECT_LIBS = @PYGOBJECT_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SGUTILS_LIBS = @SGUTILS_LIBS@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SWIG = @SWIG@
+SWIG_LIB = @SWIG_LIB@
+TAGLIB_CFLAGS = @TAGLIB_CFLAGS@
+TAGLIB_LIBS = @TAGLIB_LIBS@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+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@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+ at HAVE_GDKPIXBUF_FALSE@TESTTHUMBS = 
+ at HAVE_GDKPIXBUF_TRUE@TESTTHUMBS = test-thumbnails test-write-thumbnails test-photos get-timezone 
+ at HAVE_GDKPIXBUF_TRUE@test_thumbnails_SOURCES = test-covers.c
+ at HAVE_GDKPIXBUF_TRUE@test_thumbnails_CFLAGS = $(AM_CFLAGS)
+ at HAVE_GDKPIXBUF_TRUE@test_write_thumbnails_SOURCES = test-write-covers.c
+ at HAVE_GDKPIXBUF_TRUE@test_write_thumbnails_CFLAGS = $(AM_CFLAGS)
+ at HAVE_GDKPIXBUF_TRUE@test_photos_SOURCES = test-photos.c
+ at HAVE_GDKPIXBUF_TRUE@test_photos_CFLAGS = $(AM_CFLAGS)
+TESTMISC = test-init-ipod
+ at HAVE_TAGLIB_FALSE@TESTTAGLIB = 
+ at HAVE_TAGLIB_TRUE@TESTTAGLIB = test-rebuild-db
+ at HAVE_TAGLIB_TRUE@test_rebuild_db_SOURCES = test-rebuild-db.cc
+ at HAVE_TAGLIB_TRUE@test_rebuild_db_LDADD = $(TAGLIB_LIBS)
+ at HAVE_TAGLIB_TRUE@test_rebuild_db_CXXFLAGS = $(TAGLIB_CFLAGS)
+test_itdb_SOURCES = itdb_main.c
+test_itdb_LDADD = 
+test_ls_SOURCES = test-ls.c
+test_ls_LDADD = 
+test_init_ipod_SOURCES = test-init-ipod.c
+test_init_ipod_LDADD = 
+test_checksum_SOURCES = test-checksum.c
+test_firewire_id_SOURCES = test-fw-id.c
+test_sysinfo_extended_parsing_SOURCES = \
+	test-sysinfo-extended-parsing.c \
+	$(top_srcdir)/src/itdb_plist.c  \
+	$(top_srcdir)/src/itdb_sysinfo_extended_parser.c
+
+test_sysinfo_extended_parsing_LDADD = 
+get_timezone_SOURCES = get-timezone.c
+INCLUDES = $(LIBGPOD_CFLAGS) -I$(top_srcdir)/src -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\"
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .cc .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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) --gnu  tests/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  tests/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstPROGRAMS:
+	@list='$(noinst_PROGRAMS)'; for p in $$list; do \
+	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  echo " rm -f $$p $$f"; \
+	  rm -f $$p $$f ; \
+	done
+get-timezone$(EXEEXT): $(get_timezone_OBJECTS) $(get_timezone_DEPENDENCIES) 
+	@rm -f get-timezone$(EXEEXT)
+	$(LINK) $(get_timezone_OBJECTS) $(get_timezone_LDADD) $(LIBS)
+test-checksum$(EXEEXT): $(test_checksum_OBJECTS) $(test_checksum_DEPENDENCIES) 
+	@rm -f test-checksum$(EXEEXT)
+	$(LINK) $(test_checksum_OBJECTS) $(test_checksum_LDADD) $(LIBS)
+test-firewire-id$(EXEEXT): $(test_firewire_id_OBJECTS) $(test_firewire_id_DEPENDENCIES) 
+	@rm -f test-firewire-id$(EXEEXT)
+	$(LINK) $(test_firewire_id_OBJECTS) $(test_firewire_id_LDADD) $(LIBS)
+test-init-ipod$(EXEEXT): $(test_init_ipod_OBJECTS) $(test_init_ipod_DEPENDENCIES) 
+	@rm -f test-init-ipod$(EXEEXT)
+	$(LINK) $(test_init_ipod_OBJECTS) $(test_init_ipod_LDADD) $(LIBS)
+test-itdb$(EXEEXT): $(test_itdb_OBJECTS) $(test_itdb_DEPENDENCIES) 
+	@rm -f test-itdb$(EXEEXT)
+	$(LINK) $(test_itdb_OBJECTS) $(test_itdb_LDADD) $(LIBS)
+test-ls$(EXEEXT): $(test_ls_OBJECTS) $(test_ls_DEPENDENCIES) 
+	@rm -f test-ls$(EXEEXT)
+	$(LINK) $(test_ls_OBJECTS) $(test_ls_LDADD) $(LIBS)
+test-photos$(EXEEXT): $(test_photos_OBJECTS) $(test_photos_DEPENDENCIES) 
+	@rm -f test-photos$(EXEEXT)
+	$(test_photos_LINK) $(test_photos_OBJECTS) $(test_photos_LDADD) $(LIBS)
+test-rebuild-db$(EXEEXT): $(test_rebuild_db_OBJECTS) $(test_rebuild_db_DEPENDENCIES) 
+	@rm -f test-rebuild-db$(EXEEXT)
+	$(test_rebuild_db_LINK) $(test_rebuild_db_OBJECTS) $(test_rebuild_db_LDADD) $(LIBS)
+test-sysinfo-extended-parsing$(EXEEXT): $(test_sysinfo_extended_parsing_OBJECTS) $(test_sysinfo_extended_parsing_DEPENDENCIES) 
+	@rm -f test-sysinfo-extended-parsing$(EXEEXT)
+	$(LINK) $(test_sysinfo_extended_parsing_OBJECTS) $(test_sysinfo_extended_parsing_LDADD) $(LIBS)
+test-thumbnails$(EXEEXT): $(test_thumbnails_OBJECTS) $(test_thumbnails_DEPENDENCIES) 
+	@rm -f test-thumbnails$(EXEEXT)
+	$(test_thumbnails_LINK) $(test_thumbnails_OBJECTS) $(test_thumbnails_LDADD) $(LIBS)
+test-write-thumbnails$(EXEEXT): $(test_write_thumbnails_OBJECTS) $(test_write_thumbnails_DEPENDENCIES) 
+	@rm -f test-write-thumbnails$(EXEEXT)
+	$(test_write_thumbnails_LINK) $(test_write_thumbnails_OBJECTS) $(test_write_thumbnails_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/get-timezone.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/itdb_main.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/itdb_plist.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/itdb_sysinfo_extended_parser.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/test-checksum.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/test-fw-id.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/test-init-ipod.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/test-ls.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/test-sysinfo-extended-parsing.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/test_photos-test-photos.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/test_rebuild_db-test-rebuild-db.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/test_thumbnails-test-covers.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/test_write_thumbnails-test-write-covers.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ 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@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ 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@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ 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 $@ $<
+
+test_photos-test-photos.o: test-photos.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_photos_CFLAGS) $(CFLAGS) -MT test_photos-test-photos.o -MD -MP -MF $(DEPDIR)/test_photos-test-photos.Tpo -c -o test_photos-test-photos.o `test -f 'test-photos.c' || echo '$(srcdir)/'`test-photos.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/test_photos-test-photos.Tpo $(DEPDIR)/test_photos-test-photos.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test-photos.c' object='test_photos-test-photos.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_photos_CFLAGS) $(CFLAGS) -c -o test_photos-test-photos.o `test -f 'test-photos.c' || echo '$(srcdir)/'`test-photos.c
+
+test_photos-test-photos.obj: test-photos.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_photos_CFLAGS) $(CFLAGS) -MT test_photos-test-photos.obj -MD -MP -MF $(DEPDIR)/test_photos-test-photos.Tpo -c -o test_photos-test-photos.obj `if test -f 'test-photos.c'; then $(CYGPATH_W) 'test-photos.c'; else $(CYGPATH_W) '$(srcdir)/test-photos.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/test_photos-test-photos.Tpo $(DEPDIR)/test_photos-test-photos.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test-photos.c' object='test_photos-test-photos.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_photos_CFLAGS) $(CFLAGS) -c -o test_photos-test-photos.obj `if test -f 'test-photos.c'; then $(CYGPATH_W) 'test-photos.c'; else $(CYGPATH_W) '$(srcdir)/test-photos.c'; fi`
+
+itdb_plist.o: $(top_srcdir)/src/itdb_plist.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT itdb_plist.o -MD -MP -MF $(DEPDIR)/itdb_plist.Tpo -c -o itdb_plist.o `test -f '$(top_srcdir)/src/itdb_plist.c' || echo '$(srcdir)/'`$(top_srcdir)/src/itdb_plist.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/itdb_plist.Tpo $(DEPDIR)/itdb_plist.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$(top_srcdir)/src/itdb_plist.c' object='itdb_plist.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o itdb_plist.o `test -f '$(top_srcdir)/src/itdb_plist.c' || echo '$(srcdir)/'`$(top_srcdir)/src/itdb_plist.c
+
+itdb_plist.obj: $(top_srcdir)/src/itdb_plist.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT itdb_plist.obj -MD -MP -MF $(DEPDIR)/itdb_plist.Tpo -c -o itdb_plist.obj `if test -f '$(top_srcdir)/src/itdb_plist.c'; then $(CYGPATH_W) '$(top_srcdir)/src/itdb_plist.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/itdb_plist.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/itdb_plist.Tpo $(DEPDIR)/itdb_plist.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$(top_srcdir)/src/itdb_plist.c' object='itdb_plist.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o itdb_plist.obj `if test -f '$(top_srcdir)/src/itdb_plist.c'; then $(CYGPATH_W) '$(top_srcdir)/src/itdb_plist.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/itdb_plist.c'; fi`
+
+itdb_sysinfo_extended_parser.o: $(top_srcdir)/src/itdb_sysinfo_extended_parser.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT itdb_sysinfo_extended_parser.o -MD -MP -MF $(DEPDIR)/itdb_sysinfo_extended_parser.Tpo -c -o itdb_sysinfo_extended_parser.o `test -f '$(top_srcdir)/src/itdb_sysinfo_extended_parser.c' || echo '$(srcdir)/'`$(top_srcdir)/src/itdb_sysinfo_extended_parser.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/itdb_sysinfo_extended_parser.Tpo $(DEPDIR)/itdb_sysinfo_extended_parser.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$(top_srcdir)/src/itdb_sysinfo_extended_parser.c' object='itdb_sysinfo_extended_parser.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o itdb_sysinfo_extended_parser.o `test -f '$(top_srcdir)/src/itdb_sysinfo_extended_parser.c' || echo '$(srcdir)/'`$(top_srcdir)/src/itdb_sysinfo_extended_parser.c
+
+itdb_sysinfo_extended_parser.obj: $(top_srcdir)/src/itdb_sysinfo_extended_parser.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT itdb_sysinfo_extended_parser.obj -MD -MP -MF $(DEPDIR)/itdb_sysinfo_extended_parser.Tpo -c -o itdb_sysinfo_extended_parser.obj `if test -f '$(top_srcdir)/src/itdb_sysinfo_extended_parser.c'; then $(CYGPATH_W) '$(top_srcdir)/src/itdb_sysinfo_extended_parser.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/itdb_sysinfo_extended_parser.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/itdb_sysinfo_extended_parser.Tpo $(DEPDIR)/itdb_sysinfo_extended_parser.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$(top_srcdir)/src/itdb_sysinfo_extended_parser.c' object='itdb_sysinfo_extended_parser.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o itdb_sysinfo_extended_parser.obj `if test -f '$(top_srcdir)/src/itdb_sysinfo_extended_parser.c'; then $(CYGPATH_W) '$(top_srcdir)/src/itdb_sysinfo_extended_parser.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/itdb_sysinfo_extended_parser.c'; fi`
+
+test_thumbnails-test-covers.o: test-covers.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_thumbnails_CFLAGS) $(CFLAGS) -MT test_thumbnails-test-covers.o -MD -MP -MF $(DEPDIR)/test_thumbnails-test-covers.Tpo -c -o test_thumbnails-test-covers.o `test -f 'test-covers.c' || echo '$(srcdir)/'`test-covers.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/test_thumbnails-test-covers.Tpo $(DEPDIR)/test_thumbnails-test-covers.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test-covers.c' object='test_thumbnails-test-covers.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_thumbnails_CFLAGS) $(CFLAGS) -c -o test_thumbnails-test-covers.o `test -f 'test-covers.c' || echo '$(srcdir)/'`test-covers.c
+
+test_thumbnails-test-covers.obj: test-covers.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_thumbnails_CFLAGS) $(CFLAGS) -MT test_thumbnails-test-covers.obj -MD -MP -MF $(DEPDIR)/test_thumbnails-test-covers.Tpo -c -o test_thumbnails-test-covers.obj `if test -f 'test-covers.c'; then $(CYGPATH_W) 'test-covers.c'; else $(CYGPATH_W) '$(srcdir)/test-covers.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/test_thumbnails-test-covers.Tpo $(DEPDIR)/test_thumbnails-test-covers.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test-covers.c' object='test_thumbnails-test-covers.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_thumbnails_CFLAGS) $(CFLAGS) -c -o test_thumbnails-test-covers.obj `if test -f 'test-covers.c'; then $(CYGPATH_W) 'test-covers.c'; else $(CYGPATH_W) '$(srcdir)/test-covers.c'; fi`
+
+test_write_thumbnails-test-write-covers.o: test-write-covers.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_write_thumbnails_CFLAGS) $(CFLAGS) -MT test_write_thumbnails-test-write-covers.o -MD -MP -MF $(DEPDIR)/test_write_thumbnails-test-write-covers.Tpo -c -o test_write_thumbnails-test-write-covers.o `test -f 'test-write-covers.c' || echo '$(srcdir)/'`test-write-covers.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/test_write_thumbnails-test-write-covers.Tpo $(DEPDIR)/test_write_thumbnails-test-write-covers.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test-write-covers.c' object='test_write_thumbnails-test-write-covers.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_write_thumbnails_CFLAGS) $(CFLAGS) -c -o test_write_thumbnails-test-write-covers.o `test -f 'test-write-covers.c' || echo '$(srcdir)/'`test-write-covers.c
+
+test_write_thumbnails-test-write-covers.obj: test-write-covers.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_write_thumbnails_CFLAGS) $(CFLAGS) -MT test_write_thumbnails-test-write-covers.obj -MD -MP -MF $(DEPDIR)/test_write_thumbnails-test-write-covers.Tpo -c -o test_write_thumbnails-test-write-covers.obj `if test -f 'test-write-covers.c'; then $(CYGPATH_W) 'test-write-covers.c'; else $(CYGPATH_W) '$(srcdir)/test-write-covers.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/test_write_thumbnails-test-write-covers.Tpo $(DEPDIR)/test_write_thumbnails-test-write-covers.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='test-write-covers.c' object='test_write_thumbnails-test-write-covers.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_write_thumbnails_CFLAGS) $(CFLAGS) -c -o test_write_thumbnails-test-write-covers.obj `if test -f 'test-write-covers.c'; then $(CYGPATH_W) 'test-write-covers.c'; else $(CYGPATH_W) '$(srcdir)/test-write-covers.c'; fi`
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ 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 $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ 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) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ 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 $@ $<
+
+test_rebuild_db-test-rebuild-db.o: test-rebuild-db.cc
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_rebuild_db_CXXFLAGS) $(CXXFLAGS) -MT test_rebuild_db-test-rebuild-db.o -MD -MP -MF $(DEPDIR)/test_rebuild_db-test-rebuild-db.Tpo -c -o test_rebuild_db-test-rebuild-db.o `test -f 'test-rebuild-db.cc' || echo '$(srcdir)/'`test-rebuild-db.cc
+ at am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/test_rebuild_db-test-rebuild-db.Tpo $(DEPDIR)/test_rebuild_db-test-rebuild-db.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='test-rebuild-db.cc' object='test_rebuild_db-test-rebuild-db.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_rebuild_db_CXXFLAGS) $(CXXFLAGS) -c -o test_rebuild_db-test-rebuild-db.o `test -f 'test-rebuild-db.cc' || echo '$(srcdir)/'`test-rebuild-db.cc
+
+test_rebuild_db-test-rebuild-db.obj: test-rebuild-db.cc
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_rebuild_db_CXXFLAGS) $(CXXFLAGS) -MT test_rebuild_db-test-rebuild-db.obj -MD -MP -MF $(DEPDIR)/test_rebuild_db-test-rebuild-db.Tpo -c -o test_rebuild_db-test-rebuild-db.obj `if test -f 'test-rebuild-db.cc'; then $(CYGPATH_W) 'test-rebuild-db.cc'; else $(CYGPATH_W) '$(srcdir)/test-rebuild-db.cc'; fi`
+ at am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/test_rebuild_db-test-rebuild-db.Tpo $(DEPDIR)/test_rebuild_db-test-rebuild-db.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='test-rebuild-db.cc' object='test_rebuild_db-test-rebuild-db.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_rebuild_db_CXXFLAGS) $(CXXFLAGS) -c -o test_rebuild_db-test-rebuild-db.obj `if test -f 'test-rebuild-db.cc'; then $(CYGPATH_W) 'test-rebuild-db.cc'; else $(CYGPATH_W) '$(srcdir)/test-rebuild-db.cc'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+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; nonemtpy = 1; } \
+	      END { if (nonempty) { 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; nonempty = 1; } \
+	      END { if (nonempty) { 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=; \
+	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; nonempty = 1; } \
+	      END { if (nonempty) { 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)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    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 $(PROGRAMS)
+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_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-libtool clean-noinstPROGRAMS \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+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:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstPROGRAMS 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-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	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
+
+# 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:

Added: libgpod/trunk/libgpod/branches/upstream/current/tests/get-timezone.c
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/tests/get-timezone.c	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/tests/get-timezone.c	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,39 @@
+/*
+ * Compile with:
+ * gcc $(pkg-config --cflags --libs libgpod-1.0) -o tz ./get-timezone.c
+ *
+ * then run:
+ * ./tz <ipod-mountpoint>
+ *
+ * This should output something like:
+ * Timezone: UTC+1 DST
+ *
+ * which means I'm living in an UTC+1 timezone with DST which adds a 1 hour
+ * shift, ie my local time is UTC+2. DST won't be shown if not active.
+ *
+ */
+
+#include <errno.h>
+#include <stdio.h>
+#include <itdb.h>
+#include <itdb_device.h>
+
+int main (int argc, char **argv)
+{
+    char *mountpoint;
+    Itdb_Device *device;
+
+    if (argc >= 2) {
+        mountpoint = argv[1];
+    } else {
+        g_print ("Usage: %s <mountpoint>\n\n", g_basename(argv[0]));
+        return -1;
+    }
+
+    device = itdb_device_new ();
+    itdb_device_set_mountpoint (device, mountpoint);
+
+    g_print ("Timezone: UTC%+d\n", device->timezone_shift/3600);
+
+    return 0;
+}

Added: libgpod/trunk/libgpod/branches/upstream/current/tests/itdb_main.c
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/tests/itdb_main.c	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/tests/itdb_main.c	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,92 @@
+/*
+|   Copyright (C) 2002-2003 Jorg Schuler <jcsjcs at users.sourceforge.net>
+|   Part of the gtkpod project.
+|
+|   URL: http://gtkpod.sourceforge.net/
+|
+|   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
+|
+|  iTunes and iPod are trademarks of Apple
+|
+|  This product is not supported/written/published by Apple!
+|
+|  $Id: itdb_main.c 1100 2005-09-23 16:59:34Z jcsjcs $
+*/
+/*
+ * Initial main.c file generated by Glade. Edit as required.
+ * Glade will not overwrite this file.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include <libintl.h>
+
+#include "itdb.h"
+
+int
+main (int argc, char *argv[])
+{
+  GError *error=NULL;
+  Itdb_iTunesDB *itdb;
+  gchar *infile = NULL;
+  gchar *outfile = NULL;
+
+  if (argc >= 2)
+      infile = argv[1];
+  if (argc >= 3)
+      outfile = argv[2];
+
+  if (infile == 0)
+  {
+      printf ("Usage: %s <infile> [<outfile>]\n",  g_basename(argv[0]));
+      exit (0);
+  }
+
+  itdb = itdb_parse_file (infile, &error);
+  printf ("%p\n", itdb);
+
+  if (error)
+  {
+      if (error->message)
+	  puts (error->message);
+      g_error_free (error);
+      error = NULL;
+  }
+
+  if (itdb)
+  {
+      printf ("tracks: %d\n", g_list_length (itdb->tracks));
+      printf ("playlists: %d\n", g_list_length (itdb->playlists));
+
+      if (outfile)
+	  itdb_write_file (itdb, outfile, &error);
+      if (error)
+      {
+	  if (error->message)
+	      puts (error->message);
+	  g_error_free (error);
+	  error = NULL;
+      }
+  }
+
+  itdb_free (itdb);
+
+  return 0;
+}

Added: libgpod/trunk/libgpod/branches/upstream/current/tests/test-checksum.c
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/tests/test-checksum.c	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/tests/test-checksum.c	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,181 @@
+/*
+|  Copyright (C) 2007 Christophe Fergeau <teuf at gnome.org>
+|
+|  The code in this file is heavily based on the proof-of-concept code
+|  written by wtbw
+|
+| Redistribution and use in source and binary forms, with or without
+| modification, are permitted provided that the following conditions are met:
+|
+|   1. Redistributions of source code must retain the above copyright
+| notice, this list of conditions and the following disclaimer.
+|   2. Redistributions in binary form must reproduce the above copyright
+| notice, this list of conditions and the following disclaimer in the
+| documentation and/or other materials provided with the distribution.
+|   3. The name of the author may not be used to endorse or promote
+| products derived from this software without specific prior written
+| permission.
+|
+| THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+| IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+| OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+| IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+| INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+| BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+| OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+| ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+| OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+| OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+| OF SUCH DAMAGE.
+|
+|
+|  iTunes and iPod are trademarks of Apple
+|
+|  This product is not supported/written/published by Apple!
+*/
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <glib.h>
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+
+#include "itdb.h"
+#include "itdb_sha1.h"
+
+static unsigned char *
+calculate_db_checksum (const char *itdb_path, guint64 fwid)
+{
+    int fd;
+    struct stat stat_buf;
+    int result;
+    unsigned char *itdb_data;
+    unsigned char *checksum;
+
+    fd = open (itdb_path, O_RDONLY);
+    if (fd < 0) {
+	g_warning ("Couldn't open %s", itdb_path);
+	return NULL;
+    }
+
+    result = fstat (fd, &stat_buf);
+    if (result != 0) {
+	g_warning ("Couldn't stat %s", itdb_path);
+	close (fd);
+	return NULL;
+    }
+
+    if (stat_buf.st_size < 0x80) {
+	g_warning ("%s is too small", itdb_path);
+	close (fd);
+	return NULL;
+    }
+
+    itdb_data = mmap (NULL, stat_buf.st_size, 
+		      PROT_READ | PROT_WRITE, 
+		      MAP_PRIVATE, fd, 0);
+    if (itdb_data == MAP_FAILED) {
+	g_warning ("Couldn't mmap %s", itdb_path);
+	close (fd);
+	return NULL;
+    }
+
+    /* Those fields must be zero'ed out for the sha1 calculation */
+    memset(itdb_data+0x18, 0, 8);
+    memset(itdb_data+0x32, 0, 20);
+    memset(itdb_data+0x58, 0, 20);
+
+    checksum = itdb_compute_hash (fwid, itdb_data, stat_buf.st_size, NULL);
+
+    munmap (itdb_data, stat_buf.st_size);
+    close (fd);
+
+    return checksum;
+}
+
+static gboolean write_checksum_to_file (const char *path, 
+					const unsigned char *checksum,
+					size_t size)
+{
+    FILE *f;
+    int result;
+    size_t count;
+
+    f = fopen (path, "rb+");
+    if (f == NULL) {
+	return FALSE;
+    }
+    
+    result = fseek (f, 0x58, SEEK_SET);
+    if (result != 0) {
+	fclose (f);
+	return FALSE;
+    }
+    
+    count = fwrite (checksum, size, 1, f);
+    fclose (f);
+   
+    return (count == 1);
+}
+
+int
+main (int argc, char *argv[])
+{
+    char *itdb_path;
+    guint64 firewire_id;
+    unsigned char *checksum;
+    int i;
+
+    if (argc < 3) {
+	g_print ("Usage: %s <mountpoint> <firewire_id> [write]\n"
+		 "       firewire_id in hexadecimal, e.g. 00A745....\n"
+		 "       If any third argument is given, the checksum is written back to the iTunesDB.\n",
+		 g_basename(argv[0]));
+	exit (0);
+    }
+    
+    errno = 0;
+    firewire_id = strtoull (argv[2], NULL, 16);
+    if (errno != 0) {
+	g_warning ("Couldn't parse %s as a firewire ID\n", argv[2]);
+	exit (0);	
+    }
+
+    itdb_path = itdb_get_itunesdb_path (argv[1]);
+    checksum = calculate_db_checksum (itdb_path, firewire_id);
+
+    if (argc >= 4)
+    {
+	gboolean success;
+
+	success = write_checksum_to_file (itdb_path, checksum, 20);
+	if (!success)
+	{
+	    g_warning ("Couldn't write checksum back to file '%s'\n",
+		       argv[1]);
+	}
+    }
+
+    g_free (itdb_path);
+    
+    if (checksum == NULL) {
+	g_warning ("Couldn't compute checksum");
+	exit (0);
+    }
+
+    for (i = 0; i < strlen ((char *)checksum); i++) {
+	g_print ("%02x ", checksum[i]);
+    }
+    g_print ("\n");
+    g_free (checksum);
+
+    return 0;
+}

Added: libgpod/trunk/libgpod/branches/upstream/current/tests/test-covers.c
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/tests/test-covers.c	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/tests/test-covers.c	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,127 @@
+/* Copyright (c) 2005, Christophe Fergeau <teuf at gnome.org>
+ * All rights reserved.
+
+ * Redistribution and use in source and binary forms, with or without 
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *    * Redistributions of source code must retain the above copyright notice, 
+ *      this list of conditions and the following disclaimer.
+ *    * Redistributions in binary form must reproduce the above copyright 
+ *      notice, this list of conditions and the following disclaimer in the 
+ *      documentation and/or other materials provided with the distribution.
+ *    * Neither the name of the <ORGANIZATION> nor the names of its 
+ *      contributors may be used to endorse or promote products derived from 
+ *      this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "itdb.h"
+
+#include <locale.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include "itdb_thumb.h"
+
+static void
+save_itdb_thumb (Itdb_Track *track, GdkPixbuf *pixbuf, guint id)
+{
+        char *filename;
+        gint width;
+        gint height;
+
+        g_object_get (G_OBJECT (pixbuf),
+                      "width", &width,
+                      "height", &height,
+                      NULL);
+        filename = g_strdup_printf ("%03d_%s-%s-%s-%xx%x-%016"G_GINT64_MODIFIER"x.png",
+                                    id,
+                                    track->artist, track->album, 
+                                    track->title, width, height,
+                                    track->dbid);
+        if (filename == NULL) {
+                return;
+        }
+        g_print ("  %s\n", filename);
+        gdk_pixbuf_save (pixbuf, filename, "png", NULL, NULL);
+        gdk_pixbuf_unref (pixbuf);
+        /*		g_print ("Saved %s\n", filename); */
+        g_free (filename);
+}
+
+static void
+save_song_thumbnails (Itdb_Track *song)
+{
+        static guint count = 0;
+        GList *it;
+        GList *thumbs;
+        if (song->artwork->thumbnail == NULL) {
+            return;
+        }
+        thumbs = itdb_thumb_to_pixbufs (song->itdb->device,
+                                        song->artwork->thumbnail);
+	for (it = thumbs; it != NULL; it = it->next) {
+                GdkPixbuf *pixbuf;
+
+		pixbuf = GDK_PIXBUF (it->data);
+		g_return_if_fail (pixbuf);
+
+                save_itdb_thumb (song, pixbuf, count);
+                count++;
+	}
+        g_list_free (thumbs);
+}
+
+
+static void
+save_thumbnails (Itdb_iTunesDB *db)
+{
+	GList *it;
+	gint count = 0;
+
+	for (it = db->tracks; it != NULL; it = it->next) {
+		Itdb_Track *song;
+		
+		song = (Itdb_Track *)it->data;
+		g_print ("Track %d (%016"G_GINT64_MODIFIER"x) %s-%s-%s (%08x)\n",
+			 count++, song->dbid,
+			 song->artist, song->album,
+			 song->title, song->mhii_link);
+		save_song_thumbnails (song);
+	}
+}
+
+int
+main (int argc, char **argv)
+{
+	Itdb_iTunesDB *db;
+
+
+	if (argc < 2) {
+		g_print ("Usage: %s mountpoint\n", argv[0]);
+		return 1;
+	}
+	
+	setlocale (LC_ALL, "");
+	g_type_init ();
+	db = itdb_parse (argv[1], NULL);
+	if (db == NULL) {
+		g_print ("Error reading iPod database\n");
+		return 1;
+	}
+
+	g_print ("========== ArtworkDB ==========\n");
+	save_thumbnails (db);
+	itdb_free (db);
+
+	return 0;
+}

Added: libgpod/trunk/libgpod/branches/upstream/current/tests/test-fw-id.c
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/tests/test-fw-id.c	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/tests/test-fw-id.c	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,69 @@
+/*
+|   Copyright (C) 2007 Christophe Fergeau  <teuf at gnome.org>
+|
+|   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
+|
+|  iTunes and iPod are trademarks of Apple
+|
+|  This product is not supported/written/published by Apple!
+|
+*/
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <libintl.h>
+
+#include <glib-object.h>
+
+#include "itdb.h"
+#include "itdb_device.h"
+
+int
+main (int argc, char *argv[])
+{
+    Itdb_Device *device;
+    char *fwid;
+
+    if (argc < 2) {
+        g_print ("Usage: %s <mountpoint>\n", g_basename (argv[0]));
+        return 1;
+
+    }
+ 
+    g_type_init ();
+
+    device = itdb_device_new ();
+    if (device == NULL) {
+        return 1;
+    }
+
+    itdb_device_set_mountpoint (device, argv[1]);
+
+    fwid = itdb_device_get_sysinfo (device, "FirewireGuid");
+    if (fwid == NULL) {
+        g_print ("Couldn't find firewire ID\n");
+        return 1;
+    } else {
+	g_print ("FireWire ID: %s\n", fwid);
+    }
+
+    return 0;
+}

Added: libgpod/trunk/libgpod/branches/upstream/current/tests/test-init-ipod.c
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/tests/test-init-ipod.c	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/tests/test-init-ipod.c	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,102 @@
+/* Copyright (c) 2006, Jorg Schuler
+ * <jcsjcs at users dot sourceforge dot net>
+ *
+ * The code contained in this file is free software; you can redistribute
+ * it and/or modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either version
+ * 2.1 of the License, or (at your option) any later version.
+ *
+ * This file 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this code; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * iTunes and iPod are trademarks of Apple
+ *
+ * This product is not supported/written/published by Apple!
+ *
+ * $Id: test-init-ipod.c 1326 2006-10-02 13:17:58Z jcsjcs $
+ *
+ */
+
+#include "itdb.h"
+
+#include <locale.h>
+#include <glib-object.h>
+#include <glib/gi18n.h>
+
+
+static void usage (const char *argv0)
+{
+    g_print ("Usage: %s mountpoint [modelnumber]\n", argv0);
+    g_print ("This test program will create the standard directories on your iPod\n");
+    g_print ("including empty iTunesDB and ArtworkDB.\n\n");
+    g_print ("Valid model numbers are listed in itdb_device.c, e.g. 'MA350' for a\n");
+    g_print ("1 GB iPod nano\n\n");
+    g_print ("Often the model number can be found in <mountpoint>/iTunes/Device/SysInfo,\n");
+    g_print ("which is written automatically by most iPods when you reset it.\n\n");
+    g_print ("If you omit the model number, this program will try to detect the model\n");
+    g_print ("number and print it.\n");
+}
+
+
+int
+main (int argc, char **argv)
+{
+    if ((argc < 2) || (argc > 3))
+    {
+	usage (argv[0]);
+        return 1;
+    }
+    setlocale (LC_ALL, "");
+    g_type_init ();
+
+    if (argc == 3)
+    {
+	GError *error = NULL;
+
+	if (!itdb_init_ipod (argv[1], argv[2], "iPod", &error))
+	{
+	    if (error)
+	    {
+		g_print (_("Error initialising iPod: %s\n"),
+			 error->message);
+		g_error_free (error);
+		error = NULL;
+	    }
+	    else
+	    {
+		g_print (_("Error initialising iPod, unknown error\n"));
+	    }
+	}
+    }
+    if (argc == 2)
+    {
+	gchar *model_num;
+	Itdb_Device *device = itdb_device_new ();
+	itdb_device_set_mountpoint (device, argv[1]);
+
+	model_num = itdb_device_get_sysinfo (device, "ModelNumStr");
+
+	if (model_num)
+	{
+	    g_print ("Your iPod model number seems to be '%s'.\n",
+		     model_num);
+	}
+	else
+	{
+	    g_print ("Your iPod model number could not be detected.\n");
+	    g_print ("Maybe you have an iPod Shuffle? In that case specify  'M9724' (512 MB)\n");
+	    g_print ("or 'M9725' (1 GB) to setup your iPod.\n");
+	    g_print ("If you have a mobile phone, specify 'Mmobile1'.\n");
+	    g_print ("Otherwise look up the model number on the ipod package or in\n");
+	    g_print ("itdb_device.c (prepend 'M').\n");
+	}
+	itdb_device_free (device);
+    }
+    return 0;
+}

Added: libgpod/trunk/libgpod/branches/upstream/current/tests/test-ls.c
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/tests/test-ls.c	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/tests/test-ls.c	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,173 @@
+/*
+|   Copyright (C) 2002-2003 Jorg Schuler <jcsjcs at users.sourceforge.net>
+|   Copyright (C) 2006 Christophe Fergeau  <teuf at gnome.org>
+|
+|   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
+|
+|  iTunes and iPod are trademarks of Apple
+|
+|  This product is not supported/written/published by Apple!
+|
+*/
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <libintl.h>
+
+#include "itdb.h"
+
+#define LOCALDB "/.gtkpod/local_0.itdb"
+
+static void
+display_recently_played (Itdb_iTunesDB *db)
+{
+    Itdb_Playlist *mpl = itdb_playlist_mpl (db);
+    GList *it;
+
+    g_print ("Recently played:\n");
+    for (it = mpl->members; it != NULL; it = it->next) {
+        Itdb_Track *track = (Itdb_Track*)it->data;
+
+        if (track->recent_playcount != 0) {
+            char date[30];
+            time_t track_time = track->time_played;
+
+            g_print ("%s - %s - %s:\n",
+                     track->artist, track->album, track->title);
+            strftime (date, sizeof (date), "%F %H:%M:%S",
+                      gmtime (&track_time));
+            g_print ("\tUTC: %s\n", date);
+            strftime (date, sizeof (date), "%F %H:%M:%S",
+                      localtime (&track_time));
+            g_print ("\tlocal: %s\n", date);
+            g_print ("track: %ld ", track_time);
+            time (&track_time);
+            g_print ("current: %ld\n", track_time);
+            g_print ("\n");
+        }
+    }
+}
+
+static void
+display_track (Itdb_Track *track, const char *prefix) 
+{
+    g_print ("%s%s - %s - %s\n", prefix,  
+	     track->artist ? track->artist : "(null)",
+	     track->album ? track->album : "(null)",
+	     track->title ? track->title : "(null)");
+    g_print ("%s\t%s\n", prefix, track->ipod_path);
+}
+
+static void
+display_playlist (Itdb_Playlist *playlist, const char *prefix)
+{
+    char *track_prefix;
+    GList *it;
+
+    if (itdb_playlist_is_mpl (playlist)) {
+	g_print ("%s%s (Master Playlist)\n", prefix, playlist->name);
+    } else if (itdb_playlist_is_podcasts (playlist)) {
+	g_print ("%s%s (Podcasts Playlist)\n", prefix, playlist->name);
+    } else {
+	g_print ("%s%s\n", prefix, playlist->name);
+    }
+
+    printf ("%stracks: %d\n", prefix, g_list_length (playlist->members));
+    track_prefix = g_strdup_printf ("%s\t", prefix);
+    for (it = playlist->members; it != NULL; it = it->next) {
+	Itdb_Track *track;
+	
+	track = (Itdb_Track *)it->data;
+	display_track (track, "\t");
+    }
+    g_print ("\n\n");
+    g_free (track_prefix);
+}
+
+int
+main (int argc, char *argv[])
+{
+  GError *error=NULL;
+  const gchar *homeenv="HOME";
+  Itdb_iTunesDB *itdb;
+  gchar *mountpoint = NULL, *playlistname = NULL;
+
+  if (argc >= 2)
+      mountpoint = argv[1];
+
+    if (argc >= 3)
+      playlistname = argv[2];
+ 
+  if (mountpoint == NULL)
+  {
+      g_print ("Usage: %s <mountpoint>|-l [<playlistname>]\n\n"
+               "-l - List from the local repository (~" LOCALDB ")\n"
+	       "<playlistname> - name of the playlist to list (optional)\n",  
+                g_basename(argv[0]));
+      exit (0);
+  }
+
+  if (strcmp(mountpoint, "-l") == 0) {
+      mountpoint = g_build_filename(g_getenv(homeenv), LOCALDB, NULL);
+      itdb = itdb_parse_file (mountpoint, &error);
+  }
+  else
+      itdb = itdb_parse (mountpoint, &error);
+  
+  if (error)
+  {
+      if (error->message) {
+	  g_print("%s\n", error->message);
+      }
+      g_error_free (error);
+      error = NULL;
+  }
+
+  if (itdb)
+  {
+      GList *it;
+
+      printf ("playlists: %d\n", g_list_length (itdb->playlists));
+      for (it = itdb->playlists; it != NULL; it = it->next) {
+	  Itdb_Playlist *playlist;
+
+	  playlist = (Itdb_Playlist *)it->data;
+	  
+	  if (playlistname == NULL || strcmp(playlist->name, playlistname) == 0) 
+	    display_playlist (playlist, "");
+      }
+
+      if (error)
+      {
+	  if (error->message) {
+	      g_print ("%s\n", error->message);
+	  }
+	  g_error_free (error);
+	  error = NULL;
+      }
+
+      display_recently_played (itdb);
+  }
+
+  itdb_free (itdb);
+
+  return 0;
+}

Added: libgpod/trunk/libgpod/branches/upstream/current/tests/test-photos.c
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/tests/test-photos.c	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/tests/test-photos.c	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,407 @@
+/* Copyright (c) 2006, Michael McLellan <mikey at mclellan.org.nz>
+ *
+ * The code contained in this file is free software; you can redistribute
+ * it and/or modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either version
+ * 2.1 of the License, or (at your option) any later version.
+ *
+ * This file 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this code; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * iTunes and iPod are trademarks of Apple
+ *
+ * This product is not supported/written/published by Apple!
+ *
+ * $Id: test-photos.c 2070 2008-07-29 20:11:37Z teuf $
+ *
+ */
+
+#include "itdb.h"
+
+#include <locale.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <string.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib/gi18n-lib.h>
+
+#include "itdb_thumb.h"
+
+static void usage (int argc, char **argv)
+{
+/*    gchar *name = argv[0];*/
+    gchar *name = "test-photos";
+
+    g_print (_("Usage to add photos:\n  %s add <mountpoint> <albumname> [<filename(s)>]\n  <albumname> should be set to 'NULL' to add photos to the master photo album\n  (Photo Library) only. If you don't specify any filenames an empty album will\n  be created.\n"), name);
+    g_print (_("Usage to dump all photos to <output_dir>:\n  %s dump <mountpoint> <output_dir>\n"), name);
+    g_print (_("Usage to list all photos IDs to stdout:\n  %s list <mountpoint>\n"), name);
+    g_print (_("Usage to remove photo IDs from Photo Library:\n  %s remove <mountpoint> <albumname> [<ID(s)>]\n  <albumname> should be set to 'NULL' to remove photos from the iPod\n  altogether. If you don't specify any IDs, the photoalbum will be removed\n  instead.\n  WARNING: IDs may change when writing the PhotoDB file.\n"), name);
+}
+
+/* Retrieve the photo whose ID is @id */
+static Itdb_Artwork *get_photo_by_id (Itdb_PhotoDB *db, guint32 id)
+{
+    GList *gl;
+
+    g_return_val_if_fail (db, NULL);
+
+    for (gl=db->photos; gl; gl=gl->next)
+    {
+	Itdb_Artwork *photo = gl->data;
+	g_return_val_if_fail (photo, NULL);
+
+	if (photo->id == id) return photo;
+    }
+    return NULL;
+}
+
+static void
+dump_thumbs (Itdb_PhotoDB *db, Itdb_Artwork *artwork,
+	     const gchar *album_name, const gchar *dir)
+{
+	GList *it;
+	gint i = 0;
+        GList *thumbnails;
+
+        thumbnails = itdb_thumb_to_pixbufs (db->device, artwork->thumbnail);
+	for (it = thumbnails; it != NULL; it = it->next, i++) {
+		gchar *filename, *path;
+                GdkPixbuf *pixbuf;
+
+                pixbuf = GDK_PIXBUF (it->data);
+
+		g_return_if_fail (pixbuf);
+
+		filename = g_strdup_printf ("%s-%d-%d.png",
+					    album_name, artwork->id, i );
+		path = g_build_filename (dir, filename, NULL);
+		g_free (filename);
+		gdk_pixbuf_save (pixbuf, path, "png", NULL, NULL);
+		gdk_pixbuf_unref (pixbuf);
+		g_free (path);
+	}
+        g_list_free (thumbnails);
+}
+
+static void
+dump_albums (Itdb_PhotoDB *db, const gchar *dir)
+{
+	GList *it;
+	
+	for (it = db->photoalbums; it != NULL; it = it->next) {
+		Itdb_PhotoAlbum *album;
+		GList *it2;
+
+		album = (Itdb_PhotoAlbum *)it->data;
+		g_return_if_fail (album);
+
+		for (it2 = album->members; it2 != NULL; it2 = it2->next) {
+		        Itdb_Artwork *photo = it2->data;
+			dump_thumbs (db, photo, album->name, dir);
+		}
+	}
+}
+
+
+static int do_dump (int argc, char **argv)
+{
+    GError *error = NULL;
+    Itdb_PhotoDB *db;
+
+    if (argc != 4)
+    {
+	g_print (_("Wrong number of command line arguments.\n"));
+	usage (argc, argv);
+	return 1;
+    }
+
+    if (!g_file_test (argv[3], G_FILE_TEST_EXISTS))
+    {
+	if (mkdir (argv[3], 0777) == -1)
+	{
+	    g_print (_("Error creating '%s' (mkdir)\n"), argv[3]);
+	    return 1;
+	}
+    }
+    if (!g_file_test (argv[3], G_FILE_TEST_IS_DIR))
+    {
+	g_print (_("Error: '%s' is not a directory\n"), argv[3]);
+	return 1;
+    }
+
+    db = itdb_photodb_parse (argv[2], &error);
+    if (db == NULL)
+    {
+	if (error)
+	{
+	    g_print (_("Error reading iPod photo database (%s).\n"), error->message);
+	    g_error_free (error);
+	    error = NULL;
+	}
+	else
+	{
+	    g_print (_("Error reading iPod photo database.\n"));
+	}
+	return 1;
+    }
+    dump_albums (db, argv[3]);
+    itdb_photodb_free (db);
+    return 0;
+}
+
+static int do_list (int argc, char **argv)
+{
+    GError *error = NULL;
+    Itdb_PhotoDB *db;
+    GList *gl_album;
+
+
+    if (argc != 3)
+    {
+	g_print (_("Insufficient number of command line arguments.\n"));
+	usage (argc, argv);
+	return 1;
+    }
+
+    db = itdb_photodb_parse (argv[2], &error);
+    if (db == NULL)
+    {
+	if (error)
+	{
+	    g_print (_("Error reading iPod photo database (%s).\n"), error->message);
+	    g_error_free (error);
+	    error = NULL;
+	}
+	else
+	{
+	    g_print (_("Error reading iPod photo database.\n"));
+	}
+	return 1;
+    }
+
+    for (gl_album=db->photoalbums; gl_album; gl_album=gl_album->next)
+    {
+	GList *gl_photo;
+	Itdb_PhotoAlbum *album = gl_album->data;
+	g_return_val_if_fail (album, 1);
+
+	g_print ("%s: ", album->name?album->name:_("<Unnamed>"));
+
+	for (gl_photo=album->members; gl_photo; gl_photo=gl_photo->next)
+	{
+	    Itdb_Artwork *photo = gl_photo->data;
+	    g_return_val_if_fail (photo, 1);
+
+	    g_print ("%d ", photo->id);
+	}
+	if (g_list_length (album->members) > 0)
+	{
+	    g_print ("\n");
+	}
+	else
+	{
+	    g_print (_("<No members>\n"));
+	}
+    }
+    itdb_photodb_free (db);
+    return 0;
+}
+
+
+static int do_add (int argc, char **argv)
+{
+    GError *error = NULL;
+    Itdb_PhotoAlbum *album = NULL;
+    Itdb_PhotoDB *db;
+    gint i; 
+
+    if (argc < 4)
+    {
+	g_print (_("Insufficient number of command line arguments.\n"));
+	usage (argc, argv);
+	return 1;
+    }
+
+    db = itdb_photodb_parse (argv[2], &error);
+    if (db == NULL)
+    {
+	if (error)
+	{
+	    g_print (_("Error reading iPod photo database (%s).\nWill attempt to create a new database.\n"), error->message);
+	    g_error_free (error);
+	    error = NULL;
+	}
+	else
+	{
+	    g_print (_("Error reading iPod photo database, will attempt to create a new database\n"));
+	}
+	db = itdb_photodb_create (argv[2]);
+    }
+
+    /* Find or create specified photoalbum */
+    if (strcmp (argv[3], "NULL") != 0)
+    {
+	album = itdb_photodb_photoalbum_by_name (db, argv[3]);
+	if (!album)
+	{
+	    album = itdb_photodb_photoalbum_create (db, argv[3], -1);
+	}
+    }
+
+    for (i=4; i<argc; ++i)
+    {
+	Itdb_Artwork *photo;
+	
+	photo = itdb_photodb_add_photo (db, argv[i],
+					-1, GDK_PIXBUF_ROTATE_NONE, &error);
+	if (photo == NULL)
+	{
+	    if (error)
+	    {
+		g_print (_("Error adding photo (%s) to photo database: %s\n"),
+			 argv[i], error->message);
+		g_error_free (error);
+		error = NULL;
+	    }
+	}
+	else
+	{
+	    if (album)
+	    {
+		itdb_photodb_photoalbum_add_photo (db, album, photo, -1);
+	    }
+	}
+    }
+
+    itdb_photodb_write (db, NULL);
+    itdb_photodb_free (db);
+    return 0;
+}
+
+
+static int do_remove (int argc, char **argv)
+{
+    GError *error = NULL;
+    Itdb_PhotoDB *db;
+    Itdb_PhotoAlbum *album = NULL;
+
+    if (argc < 4)
+    {
+	g_print (_("Insufficient number of command line arguments.\n"));
+	usage (argc, argv);
+	return 1;
+    }
+
+    db = itdb_photodb_parse (argv[2], &error);
+    if (db == NULL)
+    {
+	if (error)
+	{
+	    g_print (_("Error reading iPod photo database (%s).\n"),
+		     error->message);
+	    g_error_free (error);
+	    error = NULL;
+	}
+	else
+	{
+	    g_print (_("Error reading iPod photo database.\n"));
+	}
+	return 1;
+    }
+
+    /* Find specified photoalbum */
+    if (strcmp (argv[3], "NULL") != 0)
+    {
+	album = itdb_photodb_photoalbum_by_name (db, argv[3]);
+	if (!album)
+	{
+	    g_print (_("Specified album '%s' not found. Aborting.\n"),
+		     argv[3]);
+	    itdb_photodb_free (db);
+	    return 1;
+	}
+    }
+
+    if (argc == 4)
+    {
+	/* Remove photoalbum altogether, but preserve pics */
+	if (album == NULL)
+	{
+	    g_print (_("Cannot remove Photo Library playlist. Aborting.\n"));
+	    itdb_photodb_free (db);
+	    return 1;
+	}
+	itdb_photodb_photoalbum_remove (db, album, FALSE);
+    }
+    else
+    {
+	/* Remove specified pictures */
+	int i;
+	for (i=4; i<argc; ++i)
+	{
+	    Itdb_Artwork *photo;
+	    guint32 id;
+
+	    id = g_strtod (argv[i], NULL);
+
+	    photo = get_photo_by_id (db, id);
+
+	    if (photo == NULL)
+	    {
+		g_print (_("Warning: could not find photo with ID <%d>. Skipping...\n"),
+			 id);
+	    }
+	    else
+	    {
+		itdb_photodb_remove_photo (db, album, photo);
+	    }
+	}
+    }
+
+    itdb_photodb_write (db, NULL);
+    itdb_photodb_free (db);
+    return 0;
+}
+
+
+
+int
+main (int argc, char **argv)
+{
+    if (argc < 2)
+    {
+	g_print (_("Insufficient number of command line arguments.\n"));
+	usage (argc, argv);
+	return 1;
+    }
+    setlocale (LC_ALL, "");
+    g_type_init ();
+
+    if (strcmp (argv[1], "dump") == 0)
+    {
+	return do_dump (argc, argv);
+    }
+    if (strcmp (argv[1], "add") == 0)
+    {
+	return do_add (argc, argv);
+    }
+    if (strcmp (argv[1], "list") == 0)
+    {
+	return do_list (argc, argv);
+    }
+    if (strcmp (argv[1], "remove") == 0)
+    {
+	return do_remove (argc, argv);
+    }
+
+    g_print (_("Unknown command '%s'\n"), argv[1]);
+    usage (argc, argv);
+    return 1;
+}
+

Added: libgpod/trunk/libgpod/branches/upstream/current/tests/test-rebuild-db.cc
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/tests/test-rebuild-db.cc	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/tests/test-rebuild-db.cc	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,255 @@
+/*
+ * Copyright (C) 2006 Christophe Fergeau
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <typeinfo>
+#include <unistd.h>
+
+#include <glib/gstdio.h>
+
+#include <id3v2tag.h>
+#include <mpegfile.h>
+
+#include "itdb.h"
+
+static char *
+itdb_resolve_path (Itdb_iTunesDB *db, const char *filename)
+{
+	const char *mountpoint;
+	char *ipod_path;
+
+	mountpoint = itdb_get_mountpoint (db);
+	if (!g_str_has_prefix (filename, mountpoint)) {
+		return NULL;
+	}
+	if (mountpoint[strlen(mountpoint)-1] == G_DIR_SEPARATOR) {
+		ipod_path = g_strdup (filename + strlen (mountpoint)-1);
+	} else {
+		ipod_path = g_strdup (filename + strlen (mountpoint));
+	}
+	itdb_filename_fs2ipod (ipod_path);
+#ifdef VERBOSE
+	g_print ("Filename: %s\n", filename);
+	g_print ("Mount point: %s (%d)\n", mountpoint, strlen (mountpoint));
+	g_print ("Path resolved to %s\n", ipod_path);
+#endif
+	return ipod_path;
+}
+
+static Itdb_Track *
+track_from_file (const char *filename)
+{
+	TagLib::MPEG::File file(filename);
+	TagLib::Tag *tag;
+	Itdb_Track *track;
+	struct stat st;
+
+	tag = file.tag();
+	if (tag == NULL) {
+		g_print ("Couldn't read tag\n");
+		return NULL;
+	}
+/*	if (typeid (*tag) != typeid (TagLib::ID3v2::Tag)) {
+		g_print ("Unknown tag type\n");
+		return NULL;
+		}*/
+
+	/* FIXME: what happens if we try to open a non-MP3 file? */
+#ifdef VERBOSE
+	g_print ("%s:\n", filename);
+	g_print ("\t%s\n", tag->artist().toCString(true));
+	g_print ("\t%s\n", tag->album().toCString(true));
+	g_print ("\t%s\n", tag->title().toCString(true));
+	g_print ("\t%s\n", tag->genre().toCString(true));
+	g_print ("\t%d\n", tag->year());
+	g_print ("\t%d\n", tag->track());
+	g_print ("\n");
+#endif
+	track = itdb_track_new ();
+	track->title = g_strdup (tag->title().toCString(true));
+	track->album = g_strdup (tag->album().toCString(true));
+	track->artist = g_strdup (tag->artist().toCString(true));
+	track->genre = g_strdup (tag->genre().toCString(true));
+	track->comment = g_strdup (tag->comment().toCString(true));
+	track->filetype = g_strdup ("MP3-file");
+	if (g_stat (filename, &st) == 0) {
+		track->size = st.st_size;
+	}
+	track->tracklen = file.audioProperties()->length() * 1000;
+	track->track_nr = tag->track();
+	track->bitrate = file.audioProperties()->bitrate();
+	track->samplerate = file.audioProperties()->sampleRate();
+	track->year = tag->year();
+	return track;
+}
+
+
+static void
+process_one_file (const char *filename, gpointer data)
+{
+	Itdb_iTunesDB *db;
+	Itdb_Track *track;
+
+	db = (Itdb_iTunesDB *)data;
+	track = track_from_file (filename);
+	track->ipod_path = itdb_resolve_path (db, filename);
+	if (track->ipod_path == NULL) {
+		itdb_track_free (track);
+		return;
+	}
+
+	itdb_track_add (db, track, -1);
+	itdb_playlist_add_track (itdb_playlist_mpl(db), track, -1);
+}
+
+typedef void (*DirTraversalFunc)(const char *filename, gpointer data);
+
+static void
+foreach_file (const char *basedir,
+	      DirTraversalFunc func, gpointer data,
+	      GError **error)
+{
+	GError *tmp_error;
+	const char *name;
+	GDir *dir;
+
+	g_assert (func != NULL);
+
+	tmp_error = NULL;
+	dir = g_dir_open (basedir, 0, &tmp_error);
+ 	if (tmp_error != NULL) {
+		g_propagate_error (error, tmp_error);
+		return;
+	}
+
+	name = g_dir_read_name (dir);
+	while (name != NULL) {
+		char *absolute_path;
+
+		absolute_path = g_build_filename (basedir, name, NULL);
+
+		if (g_file_test (absolute_path, G_FILE_TEST_IS_DIR)) {
+			tmp_error = NULL;
+			foreach_file (absolute_path, func, data, &tmp_error);
+			if (tmp_error != NULL) {
+				g_propagate_error (error, tmp_error);
+				g_free (absolute_path);
+				g_dir_close (dir);
+				return;
+			}
+		} else if (g_file_test (absolute_path, G_FILE_TEST_IS_REGULAR)){
+			func (absolute_path, data);
+		}
+		g_free (absolute_path);
+		name = g_dir_read_name (dir);
+	}
+
+	g_dir_close (dir);
+
+
+}
+
+static void
+fill_db (Itdb_iTunesDB *db, GError **error)
+{
+	GError *err = NULL;
+	char *music_dir;
+
+	music_dir = itdb_get_music_dir (itdb_get_mountpoint (db));
+	foreach_file (music_dir, process_one_file, db, &err);
+	g_free (music_dir);
+	if (err != NULL) {
+		g_propagate_error (error, err);
+		return;
+	}
+	g_print ("Found %d files\n",
+		 g_list_length (itdb_playlist_mpl(db)->members));
+}
+
+static Itdb_iTunesDB *
+itdb_create (const char *mountpoint)
+{
+	Itdb_Playlist *mpl;
+	Itdb_iTunesDB *db;
+
+	db = itdb_new ();
+	if (db == NULL) {
+		return NULL;
+	}
+	itdb_set_mountpoint (db, mountpoint);
+	mpl = itdb_playlist_new ("iPod", FALSE);
+	itdb_playlist_set_mpl (mpl);
+	itdb_playlist_add (db, mpl, -1);
+
+	return db;
+}
+
+int main (int argc, char **argv)
+{
+	Itdb_iTunesDB *db;
+	GError *error;
+
+	if (argc != 2) {
+		g_print ("Usage:\n");
+		g_print ("%s <mountpoint>\n", g_basename (argv[0]));
+		exit (1);
+	}
+
+	db = itdb_create (argv[1]);
+
+	if (db == NULL) {
+		g_print ("Error creating iPod database\n");
+		exit (1);
+	}
+
+	error = NULL;
+	fill_db (db, &error);
+	if (error) {
+		g_print ("Error reading music files\n");
+		if (error->message) {
+			g_print("%s\n", error->message);
+		}
+		g_error_free (error);
+		exit (1);
+	}
+
+	itdb_write (db, &error);
+	if (error) {
+		g_print ("Error writing iPod database\n");
+		if (error->message) {
+			g_print("%s\n", error->message);
+		}
+		g_error_free (error);
+		exit (1);
+	}
+
+	itdb_free (db);
+
+	return 0;
+}

Added: libgpod/trunk/libgpod/branches/upstream/current/tests/test-sysinfo-extended-parsing.c
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/tests/test-sysinfo-extended-parsing.c	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/tests/test-sysinfo-extended-parsing.c	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,24 @@
+#include "itdb_sysinfo_extended_parser.h"
+
+#include <glib.h>
+#include <glib-object.h>
+
+int main (int argc, char **argv)
+{
+    SysInfoIpodProperties *props;
+    GError *error = NULL;
+    if (argc != 2)
+        return(1);
+
+    g_type_init ();
+    props = itdb_sysinfo_extended_parse (argv[1], &error);
+    if (props == NULL) {
+        g_print ("Couldn't parse %s: %s\n", argv[1], error->message);
+    }
+    itdb_sysinfo_properties_dump (props);
+    itdb_sysinfo_properties_free (props);
+    props = NULL;
+
+    return 0;
+}
+

Added: libgpod/trunk/libgpod/branches/upstream/current/tests/test-write-covers.c
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/tests/test-write-covers.c	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/tests/test-write-covers.c	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,126 @@
+/* Copyright (c) 2005, Christophe Fergeau <teuf at gnome.org>
+ * All rights reserved.
+
+ * Redistribution and use in source and binary forms, with or without 
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *    * Redistributions of source code must retain the above copyright notice, 
+ *      this list of conditions and the following disclaimer.
+ *    * Redistributions in binary form must reproduce the above copyright 
+ *      notice, this list of conditions and the following disclaimer in the 
+ *      documentation and/or other materials provided with the distribution.
+ *    * Neither the name of the <ORGANIZATION> nor the names of its 
+ *      contributors may be used to endorse or promote products derived from 
+ *      this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "itdb.h"
+
+#include <locale.h>
+#include <string.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+
+static GList *
+get_cover_list (const char *dirname)
+{
+	GDir *dir;
+	const char *filename;
+	GList *result;
+
+	dir = g_dir_open (dirname, 0, NULL);
+	if (dir == NULL) {
+		return NULL;
+	}
+	result = NULL;
+	filename = g_dir_read_name (dir);
+	while (filename != NULL) {
+		const char *ext;
+		ext = strrchr (filename, '.');
+		if (ext != NULL) {
+			if ((g_ascii_strcasecmp (ext, ".png") == 0) 
+			    || (g_ascii_strcasecmp (ext, ".jpg") == 0)
+			    || (g_ascii_strcasecmp (ext, ".jpeg") == 0)) {
+				char *fullpath;
+				fullpath = g_build_filename (dirname, filename,
+							     NULL);
+				result = g_list_prepend (result, fullpath);
+			}
+		}
+		filename = g_dir_read_name (dir);
+	}
+	g_dir_close (dir);
+	
+	return g_list_reverse (result);
+}
+
+
+int
+main (int argc, char **argv)
+{
+	Itdb_iTunesDB *db;
+	GList *it;
+	GList *covers;
+	int nb_covers;
+
+	if (argc < 3) {
+		g_print ("Usage: %s mountpoint image-dir\n", argv[0]);
+		return 1;
+	}
+	
+	setlocale (LC_ALL, "");
+	g_type_init ();
+	covers = get_cover_list (argv[2]);
+	if (covers == NULL) {
+		g_print ("Error, %s should be a directory containing pictures\n", argv[2]);
+		return 1;
+	}
+	nb_covers = g_list_length (covers);
+	db = itdb_parse (argv[1], NULL);
+	if (db == NULL) {
+		g_print ("Error reading iPod database\n");
+		return 1;
+	}
+	for (it = db->tracks; it != NULL; it = it->next) {
+		Itdb_Track *song;
+		const char *coverpath;
+
+		song = (Itdb_Track*)it->data;
+		itdb_artwork_remove_thumbnails (song->artwork);
+
+		coverpath = g_list_nth_data (covers, 
+					     g_random_int_range (0, nb_covers));
+		itdb_track_set_thumbnails (song, coverpath);
+/*		g_print ("%s - %s - %s gets %s\n",  
+		song->artist, song->album, song->title, coverpath);*/
+
+	}
+/*	if (db->tracks != NULL) {
+		Itdb_Track *song;
+		const char *coverpath;
+		
+		song = (Itdb_Track *)db->tracks->data;
+		coverpath = g_list_nth_data (covers, 
+					     g_random_int_range (0, nb_covers));
+		itdb_track_remove_thumbnail (song);
+		itdb_track_set_thumbnail (song, coverpath);
+		}*/
+
+	itdb_write (db, NULL);
+	itdb_free (db);
+	g_list_foreach (covers, (GFunc)g_free, NULL);
+	g_list_free (covers);
+
+	return 0;
+}

Added: libgpod/trunk/libgpod/branches/upstream/current/tools/20-libgpod-sysinfo-extended.fdi
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/tools/20-libgpod-sysinfo-extended.fdi	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/tools/20-libgpod-sysinfo-extended.fdi	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- -->
+
+<deviceinfo version="0.2">
+  <device>
+    <match key="@info.parent:storage.vendor" contains="Apple">
+      <match key="@info.parent:storage.model" contains="iPod">
+        <match key="volume.fsusage" contains="filesystem"> 
+          <append key="info.callouts.add" type="strlist">libgpod-callout</append>
+        </match>
+      </match>
+    </match>
+  </device>
+</deviceinfo>
+

Added: libgpod/trunk/libgpod/branches/upstream/current/tools/Makefile.am
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/tools/Makefile.am	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/tools/Makefile.am	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,36 @@
+if HAVE_SGUTILS
+
+bin_PROGRAMS=ipod-read-sysinfo-extended
+noinst_PROGRAMS=ipod-time-sync
+
+ipod_read_sysinfo_extended_SOURCES =	\
+	read-sysinfoextended-sgutils.c	\
+	ipod-scsi.c
+ipod_read_sysinfo_extended_CFLAGS=$(LIBGPOD_CFLAGS) $(SGUTILS_CFLAGS) -I$(top_srcdir)/src
+ipod_read_sysinfo_extended_LDADD=$(LIBGPOD_LIBS) $(SGUTILS_LIBS) $(top_builddir)/src/libgpod.la
+
+if HAVE_HAL
+haldir = $(HALCALLOUTSDIR)
+hal_PROGRAMS = libgpod-callout
+
+libgpod_callout_SOURCES =		\
+	hal-callout.c 		\
+	ipod-scsi.c
+libgpod_callout_CFLAGS=$(LIBGPOD_CFLAGS) $(SGUTILS_CFLAGS) -I$(top_srcdir)/src
+libgpod_callout_LDADD=$(LIBGPOD_LIBS) $(SGUTILS_LIBS) $(top_builddir)/src/libgpod.la
+
+ipod_time_sync_SOURCES =	\
+	ipod-time-sync.c	\
+	ipod-scsi.c
+ipod_time_sync_CFLAGS=$(SGUTILS_CFLAGS) $(LIBGPOD_CFLAGS) 
+ipod_time_sync_LDADD=$(SGUTILS_LIBS) $(LIBGPOD_LIBS) 
+
+fdidir = $(HALFDIDIR)/policy/20thirdparty
+fdi_DATA = 20-libgpod-sysinfo-extended.fdi
+
+EXTRA_DIST = $(fdi_DATA)
+
+endif
+
+endif
+

Added: libgpod/trunk/libgpod/branches/upstream/current/tools/Makefile.in
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/tools/Makefile.in	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/tools/Makefile.in	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,761 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  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@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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@
+ at HAVE_SGUTILS_TRUE@bin_PROGRAMS = ipod-read-sysinfo-extended$(EXEEXT)
+ at HAVE_SGUTILS_TRUE@noinst_PROGRAMS = ipod-time-sync$(EXEEXT)
+ at HAVE_HAL_TRUE@@HAVE_SGUTILS_TRUE at hal_PROGRAMS =  \
+ at HAVE_HAL_TRUE@@HAVE_SGUTILS_TRUE@	libgpod-callout$(EXEEXT)
+subdir = tools
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \
+	$(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/python.m4 \
+	$(top_srcdir)/m4/swig.m4 $(top_srcdir)/configure.ac
+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)" "$(DESTDIR)$(haldir)" \
+	"$(DESTDIR)$(fdidir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+halPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS) $(hal_PROGRAMS) $(noinst_PROGRAMS)
+am__ipod_read_sysinfo_extended_SOURCES_DIST =  \
+	read-sysinfoextended-sgutils.c ipod-scsi.c
+ at HAVE_SGUTILS_TRUE@am_ipod_read_sysinfo_extended_OBJECTS = ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.$(OBJEXT) \
+ at HAVE_SGUTILS_TRUE@	ipod_read_sysinfo_extended-ipod-scsi.$(OBJEXT)
+ipod_read_sysinfo_extended_OBJECTS =  \
+	$(am_ipod_read_sysinfo_extended_OBJECTS)
+am__DEPENDENCIES_1 =
+ at HAVE_SGUTILS_TRUE@ipod_read_sysinfo_extended_DEPENDENCIES =  \
+ at HAVE_SGUTILS_TRUE@	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ at HAVE_SGUTILS_TRUE@	$(top_builddir)/src/libgpod.la
+ipod_read_sysinfo_extended_LINK = $(LIBTOOL) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(ipod_read_sysinfo_extended_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+am__ipod_time_sync_SOURCES_DIST = ipod-time-sync.c ipod-scsi.c
+ at HAVE_HAL_TRUE@@HAVE_SGUTILS_TRUE at am_ipod_time_sync_OBJECTS = ipod_time_sync-ipod-time-sync.$(OBJEXT) \
+ at HAVE_HAL_TRUE@@HAVE_SGUTILS_TRUE@	ipod_time_sync-ipod-scsi.$(OBJEXT)
+ipod_time_sync_OBJECTS = $(am_ipod_time_sync_OBJECTS)
+ at HAVE_HAL_TRUE@@HAVE_SGUTILS_TRUE at ipod_time_sync_DEPENDENCIES =  \
+ at HAVE_HAL_TRUE@@HAVE_SGUTILS_TRUE@	$(am__DEPENDENCIES_1) \
+ at HAVE_HAL_TRUE@@HAVE_SGUTILS_TRUE@	$(am__DEPENDENCIES_1)
+ipod_time_sync_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(ipod_time_sync_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am__libgpod_callout_SOURCES_DIST = hal-callout.c ipod-scsi.c
+ at HAVE_HAL_TRUE@@HAVE_SGUTILS_TRUE at am_libgpod_callout_OBJECTS = libgpod_callout-hal-callout.$(OBJEXT) \
+ at HAVE_HAL_TRUE@@HAVE_SGUTILS_TRUE@	libgpod_callout-ipod-scsi.$(OBJEXT)
+libgpod_callout_OBJECTS = $(am_libgpod_callout_OBJECTS)
+ at HAVE_HAL_TRUE@@HAVE_SGUTILS_TRUE at libgpod_callout_DEPENDENCIES =  \
+ at HAVE_HAL_TRUE@@HAVE_SGUTILS_TRUE@	$(am__DEPENDENCIES_1) \
+ at HAVE_HAL_TRUE@@HAVE_SGUTILS_TRUE@	$(am__DEPENDENCIES_1) \
+ at HAVE_HAL_TRUE@@HAVE_SGUTILS_TRUE@	$(top_builddir)/src/libgpod.la
+libgpod_callout_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libgpod_callout_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -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 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(ipod_read_sysinfo_extended_SOURCES) \
+	$(ipod_time_sync_SOURCES) $(libgpod_callout_SOURCES)
+DIST_SOURCES = $(am__ipod_read_sysinfo_extended_SOURCES_DIST) \
+	$(am__ipod_time_sync_SOURCES_DIST) \
+	$(am__libgpod_callout_SOURCES_DIST)
+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|^.*/||'`;
+fdiDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(fdi_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+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@
+GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@
+GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@
+GDKPIXBUF_REQ = @GDKPIXBUF_REQ@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+GTKDOC_CHECK = @GTKDOC_CHECK@
+HALCALLOUTSDIR = @HALCALLOUTSDIR@
+HALFDIDIR = @HALFDIDIR@
+HAL_CFLAGS = @HAL_CFLAGS@
+HAL_LIBS = @HAL_LIBS@
+HTML_DIR = @HTML_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
+INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
+INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
+INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
+INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
+INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
+INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
+INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
+INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@
+INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
+INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
+INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
+INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
+INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
+INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
+LDFLAGS = @LDFLAGS@
+LIBGPOD_CFLAGS = @LIBGPOD_CFLAGS@
+LIBGPOD_LIBS = @LIBGPOD_LIBS@
+LIBGPOD_MAJOR_VERSION = @LIBGPOD_MAJOR_VERSION@
+LIBGPOD_MICRO_VERSION = @LIBGPOD_MICRO_VERSION@
+LIBGPOD_MINOR_VERSION = @LIBGPOD_MINOR_VERSION@
+LIBGPOD_SO_VERSION = @LIBGPOD_SO_VERSION@
+LIBGPOD_VERSION = @LIBGPOD_VERSION@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBXML_CFLAGS = @LIBXML_CFLAGS@
+LIBXML_LIBS = @LIBXML_LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+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@
+PKG_CONFIG = @PKG_CONFIG@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+PYGOBJECT_CFLAGS = @PYGOBJECT_CFLAGS@
+PYGOBJECT_LIBS = @PYGOBJECT_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SGUTILS_LIBS = @SGUTILS_LIBS@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SWIG = @SWIG@
+SWIG_LIB = @SWIG_LIB@
+TAGLIB_CFLAGS = @TAGLIB_CFLAGS@
+TAGLIB_LIBS = @TAGLIB_LIBS@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+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@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+ at HAVE_SGUTILS_TRUE@ipod_read_sysinfo_extended_SOURCES = \
+ at HAVE_SGUTILS_TRUE@	read-sysinfoextended-sgutils.c	\
+ at HAVE_SGUTILS_TRUE@	ipod-scsi.c
+
+ at HAVE_SGUTILS_TRUE@ipod_read_sysinfo_extended_CFLAGS = $(LIBGPOD_CFLAGS) $(SGUTILS_CFLAGS) -I$(top_srcdir)/src
+ at HAVE_SGUTILS_TRUE@ipod_read_sysinfo_extended_LDADD = $(LIBGPOD_LIBS) $(SGUTILS_LIBS) $(top_builddir)/src/libgpod.la
+ at HAVE_HAL_TRUE@@HAVE_SGUTILS_TRUE at haldir = $(HALCALLOUTSDIR)
+ at HAVE_HAL_TRUE@@HAVE_SGUTILS_TRUE at libgpod_callout_SOURCES = \
+ at HAVE_HAL_TRUE@@HAVE_SGUTILS_TRUE@	hal-callout.c 		\
+ at HAVE_HAL_TRUE@@HAVE_SGUTILS_TRUE@	ipod-scsi.c
+
+ at HAVE_HAL_TRUE@@HAVE_SGUTILS_TRUE at libgpod_callout_CFLAGS = $(LIBGPOD_CFLAGS) $(SGUTILS_CFLAGS) -I$(top_srcdir)/src
+ at HAVE_HAL_TRUE@@HAVE_SGUTILS_TRUE at libgpod_callout_LDADD = $(LIBGPOD_LIBS) $(SGUTILS_LIBS) $(top_builddir)/src/libgpod.la
+ at HAVE_HAL_TRUE@@HAVE_SGUTILS_TRUE at ipod_time_sync_SOURCES = \
+ at HAVE_HAL_TRUE@@HAVE_SGUTILS_TRUE@	ipod-time-sync.c	\
+ at HAVE_HAL_TRUE@@HAVE_SGUTILS_TRUE@	ipod-scsi.c
+
+ at HAVE_HAL_TRUE@@HAVE_SGUTILS_TRUE at ipod_time_sync_CFLAGS = $(SGUTILS_CFLAGS) $(LIBGPOD_CFLAGS) 
+ at HAVE_HAL_TRUE@@HAVE_SGUTILS_TRUE at ipod_time_sync_LDADD = $(SGUTILS_LIBS) $(LIBGPOD_LIBS) 
+ at HAVE_HAL_TRUE@@HAVE_SGUTILS_TRUE at fdidir = $(HALFDIDIR)/policy/20thirdparty
+ at HAVE_HAL_TRUE@@HAVE_SGUTILS_TRUE at fdi_DATA = 20-libgpod-sysinfo-extended.fdi
+ at HAVE_HAL_TRUE@@HAVE_SGUTILS_TRUE at EXTRA_DIST = $(fdi_DATA)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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) --gnu  tools/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  tools/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(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) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --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
+install-halPROGRAMS: $(hal_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(haldir)" || $(MKDIR_P) "$(DESTDIR)$(haldir)"
+	@list='$(hal_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) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(halPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(haldir)/$$f'"; \
+	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(halPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(haldir)/$$f" || exit 1; \
+	  else :; fi; \
+	done
+
+uninstall-halPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(hal_PROGRAMS)'; for p in $$list; do \
+	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+	  echo " rm -f '$(DESTDIR)$(haldir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(haldir)/$$f"; \
+	done
+
+clean-halPROGRAMS:
+	@list='$(hal_PROGRAMS)'; for p in $$list; do \
+	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  echo " rm -f $$p $$f"; \
+	  rm -f $$p $$f ; \
+	done
+
+clean-noinstPROGRAMS:
+	@list='$(noinst_PROGRAMS)'; for p in $$list; do \
+	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  echo " rm -f $$p $$f"; \
+	  rm -f $$p $$f ; \
+	done
+ipod-read-sysinfo-extended$(EXEEXT): $(ipod_read_sysinfo_extended_OBJECTS) $(ipod_read_sysinfo_extended_DEPENDENCIES) 
+	@rm -f ipod-read-sysinfo-extended$(EXEEXT)
+	$(ipod_read_sysinfo_extended_LINK) $(ipod_read_sysinfo_extended_OBJECTS) $(ipod_read_sysinfo_extended_LDADD) $(LIBS)
+ipod-time-sync$(EXEEXT): $(ipod_time_sync_OBJECTS) $(ipod_time_sync_DEPENDENCIES) 
+	@rm -f ipod-time-sync$(EXEEXT)
+	$(ipod_time_sync_LINK) $(ipod_time_sync_OBJECTS) $(ipod_time_sync_LDADD) $(LIBS)
+libgpod-callout$(EXEEXT): $(libgpod_callout_OBJECTS) $(libgpod_callout_DEPENDENCIES) 
+	@rm -f libgpod-callout$(EXEEXT)
+	$(libgpod_callout_LINK) $(libgpod_callout_OBJECTS) $(libgpod_callout_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ipod_read_sysinfo_extended-ipod-scsi.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ipod_time_sync-ipod-scsi.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ipod_time_sync-ipod-time-sync.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_callout-hal-callout.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libgpod_callout-ipod-scsi.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ 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@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ 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@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ 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 $@ $<
+
+ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.o: read-sysinfoextended-sgutils.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ipod_read_sysinfo_extended_CFLAGS) $(CFLAGS) -MT ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.o -MD -MP -MF $(DEPDIR)/ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.Tpo -c -o ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.o `test -f 'read-sysinfoextended-sgutils.c' || echo '$(srcdir)/'`read-sysinfoextended-sgutils.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.Tpo $(DEPDIR)/ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='read-sysinfoextended-sgutils.c' object='ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ipod_read_sysinfo_extended_CFLAGS) $(CFLAGS) -c -o ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.o `test -f 'read-sysinfoextended-sgutils.c' || echo '$(srcdir)/'`read-sysinfoextended-sgutils.c
+
+ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.obj: read-sysinfoextended-sgutils.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ipod_read_sysinfo_extended_CFLAGS) $(CFLAGS) -MT ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.obj -MD -MP -MF $(DEPDIR)/ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.Tpo -c -o ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.obj `if test -f 'read-sysinfoextended-sgutils.c'; then $(CYGPATH_W) 'read-sysinfoextended-sgutils.c'; else $(CYGPATH_W) '$(srcdir)/read-sysinfoextended-sgutils.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.Tpo $(DEPDIR)/ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='read-sysinfoextended-sgutils.c' object='ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ipod_read_sysinfo_extended_CFLAGS) $(CFLAGS) -c -o ipod_read_sysinfo_extended-read-sysinfoextended-sgutils.obj `if test -f 'read-sysinfoextended-sgutils.c'; then $(CYGPATH_W) 'read-sysinfoextended-sgutils.c'; else $(CYGPATH_W) '$(srcdir)/read-sysinfoextended-sgutils.c'; fi`
+
+ipod_read_sysinfo_extended-ipod-scsi.o: ipod-scsi.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ipod_read_sysinfo_extended_CFLAGS) $(CFLAGS) -MT ipod_read_sysinfo_extended-ipod-scsi.o -MD -MP -MF $(DEPDIR)/ipod_read_sysinfo_extended-ipod-scsi.Tpo -c -o ipod_read_sysinfo_extended-ipod-scsi.o `test -f 'ipod-scsi.c' || echo '$(srcdir)/'`ipod-scsi.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/ipod_read_sysinfo_extended-ipod-scsi.Tpo $(DEPDIR)/ipod_read_sysinfo_extended-ipod-scsi.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='ipod-scsi.c' object='ipod_read_sysinfo_extended-ipod-scsi.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ipod_read_sysinfo_extended_CFLAGS) $(CFLAGS) -c -o ipod_read_sysinfo_extended-ipod-scsi.o `test -f 'ipod-scsi.c' || echo '$(srcdir)/'`ipod-scsi.c
+
+ipod_read_sysinfo_extended-ipod-scsi.obj: ipod-scsi.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ipod_read_sysinfo_extended_CFLAGS) $(CFLAGS) -MT ipod_read_sysinfo_extended-ipod-scsi.obj -MD -MP -MF $(DEPDIR)/ipod_read_sysinfo_extended-ipod-scsi.Tpo -c -o ipod_read_sysinfo_extended-ipod-scsi.obj `if test -f 'ipod-scsi.c'; then $(CYGPATH_W) 'ipod-scsi.c'; else $(CYGPATH_W) '$(srcdir)/ipod-scsi.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/ipod_read_sysinfo_extended-ipod-scsi.Tpo $(DEPDIR)/ipod_read_sysinfo_extended-ipod-scsi.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='ipod-scsi.c' object='ipod_read_sysinfo_extended-ipod-scsi.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ipod_read_sysinfo_extended_CFLAGS) $(CFLAGS) -c -o ipod_read_sysinfo_extended-ipod-scsi.obj `if test -f 'ipod-scsi.c'; then $(CYGPATH_W) 'ipod-scsi.c'; else $(CYGPATH_W) '$(srcdir)/ipod-scsi.c'; fi`
+
+ipod_time_sync-ipod-time-sync.o: ipod-time-sync.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ipod_time_sync_CFLAGS) $(CFLAGS) -MT ipod_time_sync-ipod-time-sync.o -MD -MP -MF $(DEPDIR)/ipod_time_sync-ipod-time-sync.Tpo -c -o ipod_time_sync-ipod-time-sync.o `test -f 'ipod-time-sync.c' || echo '$(srcdir)/'`ipod-time-sync.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/ipod_time_sync-ipod-time-sync.Tpo $(DEPDIR)/ipod_time_sync-ipod-time-sync.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='ipod-time-sync.c' object='ipod_time_sync-ipod-time-sync.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ipod_time_sync_CFLAGS) $(CFLAGS) -c -o ipod_time_sync-ipod-time-sync.o `test -f 'ipod-time-sync.c' || echo '$(srcdir)/'`ipod-time-sync.c
+
+ipod_time_sync-ipod-time-sync.obj: ipod-time-sync.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ipod_time_sync_CFLAGS) $(CFLAGS) -MT ipod_time_sync-ipod-time-sync.obj -MD -MP -MF $(DEPDIR)/ipod_time_sync-ipod-time-sync.Tpo -c -o ipod_time_sync-ipod-time-sync.obj `if test -f 'ipod-time-sync.c'; then $(CYGPATH_W) 'ipod-time-sync.c'; else $(CYGPATH_W) '$(srcdir)/ipod-time-sync.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/ipod_time_sync-ipod-time-sync.Tpo $(DEPDIR)/ipod_time_sync-ipod-time-sync.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='ipod-time-sync.c' object='ipod_time_sync-ipod-time-sync.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ipod_time_sync_CFLAGS) $(CFLAGS) -c -o ipod_time_sync-ipod-time-sync.obj `if test -f 'ipod-time-sync.c'; then $(CYGPATH_W) 'ipod-time-sync.c'; else $(CYGPATH_W) '$(srcdir)/ipod-time-sync.c'; fi`
+
+ipod_time_sync-ipod-scsi.o: ipod-scsi.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ipod_time_sync_CFLAGS) $(CFLAGS) -MT ipod_time_sync-ipod-scsi.o -MD -MP -MF $(DEPDIR)/ipod_time_sync-ipod-scsi.Tpo -c -o ipod_time_sync-ipod-scsi.o `test -f 'ipod-scsi.c' || echo '$(srcdir)/'`ipod-scsi.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/ipod_time_sync-ipod-scsi.Tpo $(DEPDIR)/ipod_time_sync-ipod-scsi.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='ipod-scsi.c' object='ipod_time_sync-ipod-scsi.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ipod_time_sync_CFLAGS) $(CFLAGS) -c -o ipod_time_sync-ipod-scsi.o `test -f 'ipod-scsi.c' || echo '$(srcdir)/'`ipod-scsi.c
+
+ipod_time_sync-ipod-scsi.obj: ipod-scsi.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ipod_time_sync_CFLAGS) $(CFLAGS) -MT ipod_time_sync-ipod-scsi.obj -MD -MP -MF $(DEPDIR)/ipod_time_sync-ipod-scsi.Tpo -c -o ipod_time_sync-ipod-scsi.obj `if test -f 'ipod-scsi.c'; then $(CYGPATH_W) 'ipod-scsi.c'; else $(CYGPATH_W) '$(srcdir)/ipod-scsi.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/ipod_time_sync-ipod-scsi.Tpo $(DEPDIR)/ipod_time_sync-ipod-scsi.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='ipod-scsi.c' object='ipod_time_sync-ipod-scsi.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ipod_time_sync_CFLAGS) $(CFLAGS) -c -o ipod_time_sync-ipod-scsi.obj `if test -f 'ipod-scsi.c'; then $(CYGPATH_W) 'ipod-scsi.c'; else $(CYGPATH_W) '$(srcdir)/ipod-scsi.c'; fi`
+
+libgpod_callout-hal-callout.o: hal-callout.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_callout_CFLAGS) $(CFLAGS) -MT libgpod_callout-hal-callout.o -MD -MP -MF $(DEPDIR)/libgpod_callout-hal-callout.Tpo -c -o libgpod_callout-hal-callout.o `test -f 'hal-callout.c' || echo '$(srcdir)/'`hal-callout.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_callout-hal-callout.Tpo $(DEPDIR)/libgpod_callout-hal-callout.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='hal-callout.c' object='libgpod_callout-hal-callout.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_callout_CFLAGS) $(CFLAGS) -c -o libgpod_callout-hal-callout.o `test -f 'hal-callout.c' || echo '$(srcdir)/'`hal-callout.c
+
+libgpod_callout-hal-callout.obj: hal-callout.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_callout_CFLAGS) $(CFLAGS) -MT libgpod_callout-hal-callout.obj -MD -MP -MF $(DEPDIR)/libgpod_callout-hal-callout.Tpo -c -o libgpod_callout-hal-callout.obj `if test -f 'hal-callout.c'; then $(CYGPATH_W) 'hal-callout.c'; else $(CYGPATH_W) '$(srcdir)/hal-callout.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_callout-hal-callout.Tpo $(DEPDIR)/libgpod_callout-hal-callout.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='hal-callout.c' object='libgpod_callout-hal-callout.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_callout_CFLAGS) $(CFLAGS) -c -o libgpod_callout-hal-callout.obj `if test -f 'hal-callout.c'; then $(CYGPATH_W) 'hal-callout.c'; else $(CYGPATH_W) '$(srcdir)/hal-callout.c'; fi`
+
+libgpod_callout-ipod-scsi.o: ipod-scsi.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_callout_CFLAGS) $(CFLAGS) -MT libgpod_callout-ipod-scsi.o -MD -MP -MF $(DEPDIR)/libgpod_callout-ipod-scsi.Tpo -c -o libgpod_callout-ipod-scsi.o `test -f 'ipod-scsi.c' || echo '$(srcdir)/'`ipod-scsi.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_callout-ipod-scsi.Tpo $(DEPDIR)/libgpod_callout-ipod-scsi.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='ipod-scsi.c' object='libgpod_callout-ipod-scsi.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_callout_CFLAGS) $(CFLAGS) -c -o libgpod_callout-ipod-scsi.o `test -f 'ipod-scsi.c' || echo '$(srcdir)/'`ipod-scsi.c
+
+libgpod_callout-ipod-scsi.obj: ipod-scsi.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_callout_CFLAGS) $(CFLAGS) -MT libgpod_callout-ipod-scsi.obj -MD -MP -MF $(DEPDIR)/libgpod_callout-ipod-scsi.Tpo -c -o libgpod_callout-ipod-scsi.obj `if test -f 'ipod-scsi.c'; then $(CYGPATH_W) 'ipod-scsi.c'; else $(CYGPATH_W) '$(srcdir)/ipod-scsi.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/libgpod_callout-ipod-scsi.Tpo $(DEPDIR)/libgpod_callout-ipod-scsi.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='ipod-scsi.c' object='libgpod_callout-ipod-scsi.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgpod_callout_CFLAGS) $(CFLAGS) -c -o libgpod_callout-ipod-scsi.obj `if test -f 'ipod-scsi.c'; then $(CYGPATH_W) 'ipod-scsi.c'; else $(CYGPATH_W) '$(srcdir)/ipod-scsi.c'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-fdiDATA: $(fdi_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(fdidir)" || $(MKDIR_P) "$(DESTDIR)$(fdidir)"
+	@list='$(fdi_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(fdiDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(fdidir)/$$f'"; \
+	  $(fdiDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(fdidir)/$$f"; \
+	done
+
+uninstall-fdiDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(fdi_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(fdidir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(fdidir)/$$f"; \
+	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; nonemtpy = 1; } \
+	      END { if (nonempty) { 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; nonempty = 1; } \
+	      END { if (nonempty) { 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=; \
+	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; nonempty = 1; } \
+	      END { if (nonempty) { 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)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    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 $(PROGRAMS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(haldir)" "$(DESTDIR)$(fdidir)"; 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-binPROGRAMS clean-generic clean-halPROGRAMS \
+	clean-libtool clean-noinstPROGRAMS mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-fdiDATA install-halPROGRAMS
+
+install-dvi: install-dvi-am
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+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-binPROGRAMS uninstall-fdiDATA \
+	uninstall-halPROGRAMS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-halPROGRAMS clean-libtool \
+	clean-noinstPROGRAMS ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-fdiDATA \
+	install-halPROGRAMS install-html install-html-am install-info \
+	install-info-am install-man install-pdf install-pdf-am \
+	install-ps install-ps-am 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-binPROGRAMS \
+	uninstall-fdiDATA uninstall-halPROGRAMS
+
+# 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:

Added: libgpod/trunk/libgpod/branches/upstream/current/tools/hal-callout.c
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/tools/hal-callout.c	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/tools/hal-callout.c	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,120 @@
+/* Copyright (c) 2007, Christophe Fergeau  <teuf at gnome.org>
+ * Part of the libgpod project.
+ * 
+ * URL: http://www.gtkpod.org/
+ * URL: http://gtkpod.sourceforge.net/
+ *
+ * The code contained in this file is free software; you can redistribute
+ * it and/or modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either version
+ * 2.1 of the License, or (at your option) any later version.
+ *
+ * This file 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this code; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * iTunes and iPod are trademarks of Apple
+ *
+ * This product is not supported/written/published by Apple!
+ *
+ */
+
+#include <errno.h>
+#include <glib.h>
+#include <glib/gstdio.h>
+#ifndef __USE_BSD
+  #define __USE_BSD /* for mkdtemp */
+#endif
+#include <stdlib.h>
+#include <string.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <sys/mount.h>
+#include <itdb.h>
+#include <itdb_device.h>
+
+extern char *read_sysinfo_extended (const char *device);
+
+static char *mount_ipod (const char *dev_path)
+{
+        char *filename;
+        char *tmpname;
+        const char *fstype;
+        int result;
+
+        fstype = g_getenv ("HAL_PROP_VOLUME_FSTYPE");
+        if (fstype == NULL) {
+                return NULL;
+        }
+        filename = g_build_filename (g_get_tmp_dir (), "ipodXXXXXX", NULL);
+        if (filename == NULL) {
+                return NULL;
+        }
+        tmpname = mkdtemp (filename);
+        if (tmpname == NULL) {
+                g_free (filename);
+                return NULL;
+        }
+        g_assert (tmpname == filename);
+        result = mount (dev_path, tmpname, fstype, 0, NULL);
+        if (result != 0) {
+                g_rmdir (filename);
+                g_free (filename);
+                return NULL;
+        }
+
+        return tmpname;
+}
+
+static gboolean write_sysinfo_extended (const char *mountpoint, 
+                                        const char *data)
+{
+        char *filename;
+        char *devdirpath;
+        gboolean result;
+
+        devdirpath = itdb_get_device_dir (mountpoint);
+        if (devdirpath == NULL) {
+                return FALSE;
+        }
+        filename = g_build_filename (devdirpath, "SysInfoExtended", NULL);
+        g_free (devdirpath);
+        if (filename == NULL) {
+                return FALSE;
+        }
+
+        result = g_file_set_contents (filename, data, -1, NULL);
+        g_free (filename);
+
+        return result;
+}
+
+int main (int argc, char **argv)
+{
+        char *ipod_mountpoint;
+        char *xml;
+
+        xml = read_sysinfo_extended (g_getenv ("HAL_PROP_BLOCK_DEVICE"));
+        if (xml == NULL) {
+                return -1;
+        }
+        ipod_mountpoint = mount_ipod (g_getenv ("HAL_PROP_BLOCK_DEVICE"));
+        if (ipod_mountpoint == NULL) {
+                g_free (xml);
+                return -1;
+        }
+        write_sysinfo_extended (ipod_mountpoint, xml); 
+
+        umount (ipod_mountpoint);
+        g_rmdir (ipod_mountpoint);
+        g_free (ipod_mountpoint);
+        g_free (xml);
+
+        return 0;
+}

Added: libgpod/trunk/libgpod/branches/upstream/current/tools/ipod-scsi.c
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/tools/ipod-scsi.c	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/tools/ipod-scsi.c	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,167 @@
+/* Copyright (c) 2007, Christophe Fergeau  <teuf at gnome.org>
+ * Part of the libgpod project.
+ * 
+ * URL: http://www.gtkpod.org/
+ * URL: http://gtkpod.sourceforge.net/
+ *
+ * The code contained in this file is free software; you can redistribute
+ * it and/or modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either version
+ * 2.1 of the License, or (at your option) any later version.
+ *
+ * This file 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this code; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * iTunes and iPod are trademarks of Apple
+ *
+ * This product is not supported/written/published by Apple!
+ *
+ */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <string.h>
+#include <unistd.h>
+#include <scsi/sg_cmds.h>
+#include <sys/stat.h>
+#include <time.h>
+
+#include <glib.h>
+
+extern void sync_time (const char *device, struct tm *tm);
+extern char *read_sysinfo_extended (const char *device);
+/* do_sg_inquiry and read_sysinfo_extended were heavily
+ * inspired from libipoddevice
+ */
+static unsigned char
+do_sg_inquiry (int fd, int page, char *buf, char **start)
+{
+    const unsigned int IPOD_BUF_LENGTH = 252;
+
+    if (sg_ll_inquiry (fd, 0, 1, page, buf, IPOD_BUF_LENGTH, 1, 0) != 0) {
+	*start = NULL;
+	return 0;
+    } else {
+	*start = buf + 4;
+	return (unsigned char)buf[3];
+    }
+}
+
+G_GNUC_INTERNAL char *
+read_sysinfo_extended (const char *device)
+{
+    int fd;
+    const unsigned int IPOD_XML_PAGE = 0xc0;
+    unsigned char len;
+    char buf[512];
+    char *start;
+    char *offsets;
+    GString *xml_sysinfo;
+    unsigned int i;
+
+    fd = open (device, O_RDWR);
+    if (fd < 0) {
+	return NULL;
+    }
+
+    len = do_sg_inquiry (fd, IPOD_XML_PAGE, buf, &start);
+    if (start == NULL || len == 0) {
+	close(fd);
+	return NULL;
+    }
+
+    offsets = g_new (char, len+1);
+    memcpy(offsets, start, len);
+    offsets[len] = 0;
+
+    xml_sysinfo = g_string_new_len (NULL, 512);
+    if (xml_sysinfo == NULL) {
+	g_free (offsets);
+	close (fd);
+	return NULL;
+    }
+
+    for (i = 0; offsets[i]; i++) {
+	bzero(buf, 512);
+	len = do_sg_inquiry (fd, offsets[i], buf, &start);
+	start[len] = 0;
+	g_string_append (xml_sysinfo, start);
+    }
+    
+    g_free (offsets);
+    close (fd);
+
+    return g_string_free (xml_sysinfo, FALSE);
+}
+
+static void do_sg_write_buffer (const char *device, void *buffer, size_t len)
+{
+    int fd;
+    guint i;
+
+    fd = open (device, O_RDWR);
+    if (fd < 0) {
+	g_warning ("Couldn't open device %s", device);
+	return;
+    }
+
+    g_print ("    Data Payload: ");
+    for (i = 0; i < len; i++) {
+	g_print ("%02x ", *((guchar *)buffer+i));
+    }
+    g_print ("\n");
+    if (sg_ll_write_buffer (fd, 1, 0, 0x0c0000, buffer, len, 1, 1) != 0) {
+	g_print ("Error sending data\n");
+    }
+    close(fd);
+}
+
+G_GNUC_INTERNAL void sync_time (const char *device, struct tm *tm)
+{
+    struct iPodTime {
+	guint16 year;
+	guint16 days;
+	guchar timezone;
+	guchar hour;
+	guchar minute;
+	guchar second;
+	guchar dst;
+	guchar padding[3];
+    } __attribute__((__packed__));
+    struct iPodTime ipod_time;
+
+    if (tm == NULL) {
+	time_t current_time;
+	current_time = time (NULL);
+	tm = localtime (&current_time);
+    }
+
+    ipod_time.year = GUINT16_TO_BE (1900+tm->tm_year);
+    ipod_time.days = GUINT16_TO_BE (tm->tm_yday);
+    /* the timezone value is the shift east of UTC in 15 min chunks
+     * so eg. UTC+2 is 2*4 = 8
+     */
+    ipod_time.timezone = tm->tm_gmtoff / 900;
+    ipod_time.hour = tm->tm_hour;
+    ipod_time.minute = tm->tm_min;
+    ipod_time.second = tm->tm_sec;
+    if (tm->tm_isdst) {
+	ipod_time.dst = 1;
+    } else {
+	ipod_time.dst = 0;
+    }
+    memset (ipod_time.padding, 0, sizeof (ipod_time.padding));
+
+    do_sg_write_buffer (device, &ipod_time, sizeof (ipod_time));
+}

Added: libgpod/trunk/libgpod/branches/upstream/current/tools/ipod-time-sync.c
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/tools/ipod-time-sync.c	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/tools/ipod-time-sync.c	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,44 @@
+/* Copyright (c) 2009, Christophe Fergeau  <teuf at gnome.org>
+ *
+ * The code contained in this file is free software; you can redistribute
+ * it and/or modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either version
+ * 2.1 of the License, or (at your option) any later version.
+ *
+ * This file 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this code; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * iTunes and iPod are trademarks of Apple
+ *
+ * This product is not supported/written/published by Apple!
+ *
+ */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+
+#include <glib.h>
+#include <glib/gi18n.h>
+
+extern void sync_time (const char *dev, struct tm *tm);
+
+int
+main (int argc, char **argv)
+{
+    if (argc < 2) {
+        g_print (_("usage: %s <device> [timezone]\n"), g_basename (argv[0]));
+	return 1;
+    }
+
+    sync_time (argv[1], NULL);
+
+    return 0;
+}

Added: libgpod/trunk/libgpod/branches/upstream/current/tools/read-sysinfoextended-sgutils.c
===================================================================
--- libgpod/trunk/libgpod/branches/upstream/current/tools/read-sysinfoextended-sgutils.c	                        (rev 0)
+++ libgpod/trunk/libgpod/branches/upstream/current/tools/read-sysinfoextended-sgutils.c	2009-10-26 20:11:55 UTC (rev 397)
@@ -0,0 +1,80 @@
+/* Copyright (c) 2007, Christophe Fergeau  <teuf at gnome.org>
+ *
+ * The code contained in this file is free software; you can redistribute
+ * it and/or modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either version
+ * 2.1 of the License, or (at your option) any later version.
+ *
+ * This file 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this code; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * iTunes and iPod are trademarks of Apple
+ *
+ * This product is not supported/written/published by Apple!
+ *
+ */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <glib.h>
+#include <glib/gi18n.h>
+
+#include "itdb.h"
+
+extern char *read_sysinfo_extended (const char *device);
+
+int
+main (int argc, char **argv)
+{
+    char *xml;
+    
+    if (argc < 3) {
+      g_print (_("usage: %s <device> <mountpoint>\n"), g_basename (argv[0]));
+	return 1;
+    }
+
+    xml = read_sysinfo_extended (argv[1]);
+    if (xml == NULL) {
+      g_print (_("Couldn't read xml sysinfo from %s\n"), argv[1]);
+      return 1;
+    } else {
+	const char *mountpoint = argv[2];
+	char *device_path;
+	char *filename;
+	gboolean success;
+
+	device_path = itdb_get_device_dir (mountpoint);
+	if (device_path == NULL) {
+	    g_free (xml);
+	    g_print (_("Couldn't resolve Device directory path on %s"), 
+		     mountpoint);
+	    return 1;
+	}
+
+	filename = g_build_filename (device_path, "SysInfoExtended", NULL);
+	g_free (device_path);
+	if (filename == NULL) {
+	    g_print (_("Couldn't resolve SysInfoExtended path on %s"),
+		     mountpoint);
+	    g_free (xml);
+	    return 1;
+	}
+
+	success = g_file_set_contents (filename, xml, -1, NULL);
+	g_free (xml);
+	g_free (filename);
+	if (!success) {
+	    g_print (_("Couldn't write SysInfoExtended to %s"), mountpoint);
+	    return 1;
+	}
+    }
+
+    return 0;
+}




More information about the Pkg-gtkpod-devel mailing list